query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
1bc6966c500de973d1923402033ebe16
Returns an array containing all sitewide forums
[ { "docid": "ff09c238c5b8c5b4a2b7fddf38e17b3d", "score": "0.71414655", "text": "public function sitewideforum_get_all_forums() {\n $this->init('forums');\n\n $oReturn = new stdClass();\n global $wpdb;\n $sParentQuery = $this->parentid === false ? \"\" : \" AND post_parent=\" . (int) $this->parentid;\n $aForums = $wpdb->get_results($wpdb->prepare(\n \"SELECT ID, post_parent, post_author, post_title, post_date, post_modified\n FROM $wpdb->posts\n WHERE post_type='forum'\" . $sParentQuery\n ));\n\n if (empty($aForums))\n return $this->error('forums', 9);\n\n foreach ($aForums as $aForum) {\n $iId = (int) $aForum->ID;\n $oUser = get_user_by('id', (int) $aForum->post_author);\n $oReturn->forums[$iId]->author[(int) $aForum->post_author]->username = $oUser->data->user_login;\n $oReturn->forums[$iId]->author[(int) $aForum->post_author]->mail = $oUser->data->user_email;\n $oReturn->forums[$iId]->author[(int) $aForum->post_author]->display_name = $oUser->data->display_name;\n $oReturn->forums[$iId]->date = $aForum->post_date;\n $oReturn->forums[$iId]->last_changes = $aForum->post_modified;\n $oReturn->forums[$iId]->title = $aForum->post_title;\n $oReturn->forums[$iId]->parent = (int) $aForum->post_parent;\n }\n $oReturn->count = count($aForums);\n return $oReturn;\n }", "title": "" } ]
[ { "docid": "4caa18504f4407db346af8406d246724", "score": "0.7178926", "text": "function get_forum_list() {\n\t\treturn $this->call('get_forum_list');\n\t}", "title": "" }, { "docid": "d917e9d1dbc9e94f63b61d1461450c5d", "score": "0.7144064", "text": "public function getForums()\n {\n return $this->forums;\n }", "title": "" }, { "docid": "ccf16f0f1c377b708122ee3e6bfe0230", "score": "0.6963871", "text": "public static function getAll()\n {\n $forums = array();\n\n $query = 'select f.ID, f.NAME, f.DESCRIPTION, ' . \n\t\t\t\t' COUNT(m.ID) as MESSAGE_COUNT, ' .\n\t\t\t\t' UNIX_TIMESTAMP(MIN(m.MESSAGE_DATE)) as LATEST_DATE ' .\n\t\t\t\t' from FORUM f ' .\n\t\t\t\t' left join MESSAGE m ' .\n\t\t\t\t' on f.ID = m.FORUM_ID ' .\n\t\t\t\t' group by f.ID, f.NAME, f.DESCRIPTION ' .\n\t\t\t\t' order by COUNT(m.ID) desc'; \n $result = mysql_query($query, $GLOBALS['DB']);\n\t\t\n if (mysql_num_rows($result))\n {\n\t\t\twhile ($row = mysql_fetch_assoc($result))\n\t\t\t{\t\n\t\t\t\t$f = new Forum();\n\t\t\t\tForum::setValuesFromDB($f, $row);\n\t\t\t\t// add the question to the list, using its id as a key\n\t\t\t\tarray_push($forums, $f);\n\t\t\t}\n\t\t}\n\t\tmysql_free_result($result);\n return $forums;\t\t\n }", "title": "" }, { "docid": "e5d0dd3e6bf64e7b1a041e350421b761", "score": "0.69307005", "text": "public function index()\n {\n $forums = Forum::all();\n return $forums;\n }", "title": "" }, { "docid": "17d7531a086a2b72549b067132251619", "score": "0.68010306", "text": "public function sitewideforum_get_forum_topics() {\n $this->init('forums');\n\n $oReturn = new stdClass();\n\n $mForumExists = $this->sitewideforum_check_forum_existence();\n\n if ($mForumExists !== true)\n return $this->error('forums', $mForumExists);\n global $wpdb;\n foreach ($this->forumid as $iId) {\n $aTopics = $wpdb->get_results($wpdb->prepare(\n \"SELECT ID, post_parent, post_author, post_title, post_date, post_modified, post_content\n FROM $wpdb->posts\n WHERE post_type='topic'\n AND post_parent='\" . $iId . \"'\"\n ));\n if (empty($aTopics)) {\n $oReturn->forums[(int) $iId]->topics = \"\";\n continue;\n }\n foreach ($aTopics as $aTopic) {\n $oUser = get_user_by('id', (int) $aTopic->post_author);\n $oReturn->forums[(int) $iId]->topics[(int) $aTopic->ID]->author[(int) $aTopic->post_author]->username = $oUser->data->user_login;\n $oReturn->forums[(int) $iId]->topics[(int) $aTopic->ID]->author[(int) $aTopic->post_author]->mail = $oUser->data->user_email;\n $oReturn->forums[(int) $iId]->topics[(int) $aTopic->ID]->author[(int) $aTopic->post_author]->display_name = $oUser->data->display_name;\n $oReturn->forums[(int) $iId]->topics[(int) $aTopic->ID]->date = $aTopic->post_date;\n if ($this->display_content !== false)\n $oReturn->forums[(int) $iId]->topics[(int) $aTopic->ID]->content = $aTopic->post_content;\n $oReturn->forums[(int) $iId]->topics[(int) $aTopic->ID]->last_changes = $aTopic->post_modified;\n $oReturn->forums[(int) $iId]->topics[(int) $aTopic->ID]->title = $aTopic->post_title;\n }\n $oReturn->forums[(int) $iId]->count = count($aTopics);\n }\n return $oReturn;\n }", "title": "" }, { "docid": "97fd63b436359b6e674aa6aff0b0cbec", "score": "0.6773204", "text": "public function findRootForums() {\n\t\t$query = $this->createQuery();\n\t\t$result = $query\n\t\t\t->matching($query->equals('forum', 0))\n\t\t\t->setOrderings(array('sorting' => 'ASC', 'uid' => 'ASC'))\n\t\t\t->execute();\n\n\t\treturn $this->filterByAccess($result, 'read');\n\t}", "title": "" }, { "docid": "f1bf81ac0ea36f87b10a74d70aed496e", "score": "0.6718399", "text": "function plugin_getfeednames_forum ()\n{\n global $_TABLES;\n\n $feeds = array ();\n $result = DB_query (\"SELECT forum_id,forum_name FROM {$_TABLES['gf_forums']} ORDER BY forum_order\");\n $num = DB_numRows ($result);\n\n if ($num > 0) {\n $feeds[] = array ('id' => '0', 'name' => 'all forums');\n }\n\n for ($i = 0; $i < $num; $i++) {\n $A = DB_fetchArray ($result);\n $feeds[] = array ('id' => $A['forum_id'], 'name' => $A['forum_name']);\n }\n\n return $feeds;\n}", "title": "" }, { "docid": "cefe104c9887532ddf77e5a825b6e42b", "score": "0.67128354", "text": "function &getForums() {\n\t\tif ($this->forums) {\n\t\t\treturn $this->forums;\n\t\t}\n\n\t\t$this->forums = array();\n\t\t$ids = $this->getAllForumIds();\n\n\t\tif (!empty($ids) ) {\n\t\t\tforeach ($ids as $id) {\n\t\t\t\tif (forge_check_perm ('forum', $id, 'read')) {\n\t\t\t\t\t$this->forums[] = new Forum($this->Group, $id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->forums;\n\t}", "title": "" }, { "docid": "64f7fd52d18b7741d4680c3dd270a98c", "score": "0.665814", "text": "public function forums() {\n return $this->hasMany('App\\Forum', 'category_id', 'id')->orderBy('position');\n }", "title": "" }, { "docid": "2ebecd970e2ee0e36236d45aab23c7cc", "score": "0.6558704", "text": "function getForumSections() {\n\t\t\t$data = $this->fetch(\"SELECT * FROM `\" . $this->prefix . \"forum_section` ORDER BY type DESC\");\n\t\t\t return $data;\n\t\t}", "title": "" }, { "docid": "8ebe3474f176814e9c122e345c4434ec", "score": "0.6552567", "text": "function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only = false)\n{\n\tglobal $_CLASS;\n\tstatic $forum_rows;\n\t\n//print_r($_CLASS['forums_auth']->acl_getf('f_read'));\r\n\n\tif (empty($forum_rows))\n\t{\n\t\t// This query is identical to the jumpbox one\n\t\t$sql = 'SELECT forum_id, parent_id, forum_name, forum_type, left_id, right_id\n\t\t\tFROM ' . FORUMS_FORUMS_TABLE . ' ORDER BY left_id ASC';\n\t\t$result = $_CLASS['core_db']->query($sql);\n\n\t\twhile ($row = $_CLASS['core_db']->fetch_row_assoc($result))\n\t\t{\n\t\t\t$forum_rows[] = $row;\n\t\t}\n\t\t$_CLASS['core_db']->free_result();\n\t}\n\n\t$rowset = array();\n\n\tforeach ($forum_rows as $row)\n\t{\n\t\tif ($postable_only && $row['forum_type'] != FORUM_POST)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!$acl_list || $_CLASS['forums_auth']->acl_gets($acl_list, $row['forum_id']))\n\t\t{\n\t\t\t$rowset[] = ($id_only) ? $row['forum_id'] : $row;\n\t\t}\n\t}\n\n\treturn $rowset;\n}", "title": "" }, { "docid": "e9c9b3e52ae48c9c8baffbf5c53e8181", "score": "0.6491024", "text": "function bbp_get_forum_content($forum_id = 0)\n{\n}", "title": "" }, { "docid": "b60ffedb35b6bca12fe1f798893ff1cf", "score": "0.6490717", "text": "function bbp_get_form_forum_content()\n{\n}", "title": "" }, { "docid": "4fa847b80183e184925c96b230441345", "score": "0.6475472", "text": "function &getForumsAdmin() {\n\t\tif ($this->forums) {\n\t\t\treturn $this->forums;\n\t\t}\n\n\t\tif (session_loggedin()) {\n\t\t\tif (!forge_check_perm ('forum_admin', $this->Group->getID())) {\n\t\t\t\t$this->setError(_(\"You don't have a permission to access this page\"));\n\t\t\t\t$this->forums = false;\n\t\t\t} else {\n\t\t\t\t$result = db_query_params('SELECT * FROM forum_group_list_vw\n\t\t\t\t\t\t\tWHERE group_id=$1\n\t\t\t\t\t\t\tORDER BY group_forum_id',\n\t\t\t\t\t\t\tarray($this->Group->getID())) ;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setError(_(\"You don't have a permission to access this page\"));\n\t\t\t$this->forums = false;\n\t\t}\n\n\t\t$rows = db_numrows($result);\n\n\t\tif (!$result) {\n\t\t\t$this->setError(_('Forum not found')._(': ').db_error());\n\t\t\t$this->forums = false;\n\t\t} else {\n\t\t\twhile ($arr = db_fetch_array($result)) {\n\t\t\t\t$this->forums[] = new Forum($this->Group, $arr['group_forum_id'], $arr);\n\t\t\t}\n\t\t}\n\t\treturn $this->forums;\n\t}", "title": "" }, { "docid": "d75f7bd1ba63353d5e8ca0a52dd57922", "score": "0.64504826", "text": "function bbp_forums()\n{\n}", "title": "" }, { "docid": "6c7928f48531960e8a4b379bba2600f2", "score": "0.64268124", "text": "public function sitewideforum_get_forum() {\n $this->init('forums');\n\n $oReturn = new stdClass();\n\n $mForumExists = $this->sitewideforum_check_forum_existence();\n\n if ($mForumExists !== true)\n return $this->error('forums', $mForumExists);\n foreach ($this->forumid as $iId) {\n $oForum = bbp_get_forum((int) $iId);\n $oReturn->forums[$iId]->title = $oForum->post_title;\n $oReturn->forums[$iId]->name = $oForum->post_name;\n $oUser = get_user_by('id', $oForum->post_author);\n $oReturn->forums[$iId]->author[$oForum->post_author]->username = $oUser->data->user_login;\n $oReturn->forums[$iId]->author[$oForum->post_author]->mail = $oUser->data->user_email;\n $oReturn->forums[$iId]->author[$oForum->post_author]->display_name = $oUser->data->display_name;\n $oReturn->forums[$iId]->date = $oForum->post_date;\n $oReturn->forums[$iId]->last_change = $oForum->post_modified;\n $oReturn->forums[$iId]->status = $oForum->post_status;\n $oReturn->forums[$iId]->name = $oForum->post_name;\n $iTopicCount = bbp_get_forum_topic_count((int) $this->forumid);\n $oReturn->forums[$iId]->topics_count = is_null($iTopicCount) ? 0 : (int) $iTopicCount;\n $iPostCount = bbp_get_forum_post_count((int) $this->forumid);\n $oReturn->forums[$iId]->post_count = is_null($iPostCount) ? 0 : (int) $iPostCount;\n }\n\n return $oReturn;\n }", "title": "" }, { "docid": "42337b7799df0a917f84b439d79e2e34", "score": "0.6425523", "text": "private function get_news_forums()\n\t{\n\t\tstatic $forum_ids;\n\n\t\t// Matches acp/acp_board.php\n\t\t$cache_name\t= 'feed_news_forum_ids';\n\n\t\tif (!isset($forum_ids) && ($forum_ids = $this->cache->get('_' . $cache_name)) === false)\n\t\t{\n\t\t\t$sql = 'SELECT forum_id\n\t\t\t\tFROM ' . FORUMS_TABLE . '\n\t\t\t\tWHERE ' . $this->db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');\n\t\t\t$result = $this->db->sql_query($sql);\n\n\t\t\t$forum_ids = array();\n\t\t\twhile ($forum_id = (int) $this->db->sql_fetchfield('forum_id'))\n\t\t\t{\n\t\t\t\t$forum_ids[$forum_id] = $forum_id;\n\t\t\t}\n\t\t\t$this->db->sql_freeresult($result);\n\n\t\t\t$this->cache->put('_' . $cache_name, $forum_ids);\n\t\t}\n\n\t\treturn $forum_ids;\n\t}", "title": "" }, { "docid": "21d08409f9cc0088c375980aa19fbe2f", "score": "0.6389414", "text": "public function permittedForums(): array {\n return array_keys(array_filter($this->info()['forum_access'], fn ($v) => $v === true));\n }", "title": "" }, { "docid": "42123381c40801b47e43505559326115", "score": "0.638764", "text": "public static function findAll( ) {\n \t$cons = \"select * from `\".subforumClass::$tableName.\"`\";\n\t\treturn subforumClass::findByQuery( $cons );\n }", "title": "" }, { "docid": "d66079a6d00b0f74e3a2c380c524745a", "score": "0.63591284", "text": "public function get_forum_categories()\n {\n $sql = \"\n SELECT *\n FROM forum_categories\n ORDER BY rank, name\n \";\n return $this->db->query_all($sql);\n }", "title": "" }, { "docid": "c43e777b888eeb7f8ba50bed97a07bb6", "score": "0.6357064", "text": "public function forumNavList(): array {\n return $this->info()['NavItems'];\n }", "title": "" }, { "docid": "a7400ddfd51131ada6d5d1f9f284e74a", "score": "0.633704", "text": "public function forums()\n {\n $nodes = Forum::get()->toTree();\n $traverse = function ($categories, $prefix = '') use (&$traverse) {\n $option = '';\n foreach ($categories as $category) {\n $selected = $this->selected && $this->selected == $category->id ? $this->selected_string : '';\n $option .= \"<option {$selected} value='{$category->id}'>\" . PHP_EOL . $prefix . ' ' . $category->name . '</option> ';\n $option .= $traverse($category->children, $prefix . '&nbsp&nbsp&nbsp&nbsp');\n }\n return $option;\n };\n $this->forum_options = $traverse($nodes);\n return $this;\n }", "title": "" }, { "docid": "d25c4d796123cffa65b482371fdb7088", "score": "0.6323175", "text": "function bbp_get_form_topic_forum()\n{\n}", "title": "" }, { "docid": "b7461b2a0cdee63e3ba9be28f38d0b62", "score": "0.63213503", "text": "public function display_forum_index()\n {\n }", "title": "" }, { "docid": "173acbaae73685ead3edd4201c02cf73", "score": "0.6241012", "text": "public function groupforum_get_forum_topics() {\n $this->init('forums');\n\n $oReturn = new stdClass();\n\n $mForumExists = $this->groupforum_check_forum_existence();\n\n if ($mForumExists === false)\n return $this->error('base', 0);\n else if (is_int($mForumExists) && $mForumExists !== true)\n return $this->error('forums', $mForumExists);\n\n $aConfig = array();\n $aConfig['type'] = $this->type;\n $aConfig['filter'] = $this->type == 'tag' ? $this->tagname : false;\n $aConfig['forum_id'] = $this->forumid;\n $aConfig['page'] = $this->page;\n $aConfig['per_page'] = $this->per_page;\n\n $aTopics = bp_forums_get_forum_topics($aConfig);\n if (is_null($aTopics))\n $this->error('forums', 7);\n foreach ($aTopics as $aTopic) {\n $oReturn->topics[(int) $aTopic->topic_id]->title = $aTopic->topic_title;\n $oReturn->topics[(int) $aTopic->topic_id]->slug = $aTopic->topic_slug;\n $oUser = get_user_by('id', $aTopic->topic_poster);\n $oReturn->topics[(int) $aTopic->topic_id]->poster[(int) $oUser->data->ID]->username = $oUser->data->user_login;\n $oReturn->topics[(int) $aTopic->topic_id]->poster[(int) $oUser->data->ID]->mail = $oUser->data->user_email;\n $oReturn->topics[(int) $aTopic->topic_id]->poster[(int) $oUser->data->ID]->display_name = $oUser->data->display_name;\n $oReturn->topics[(int) $aTopic->topic_id]->post_count = (int) $aTopic->topic_posts;\n if ($this->detailed === true) {\n $oTopic = bp_forums_get_topic_details($aTopic->topic_id);\n\n $oUser = get_user_by('id', $oTopic->topic_last_poster);\n $oReturn->topics[(int) $aTopic->topic_id]->last_poster[(int) $oTopic->topic_last_poster]->username = $oUser->data->user_login;\n $oReturn->topics[(int) $aTopic->topic_id]->last_poster[(int) $oTopic->topic_last_poster]->mail = $oUser->data->user_email;\n $oReturn->topics[(int) $aTopic->topic_id]->last_poster[(int) $oTopic->topic_last_poster]->display_name = $oUser->data->display_name;\n $oReturn->topics[(int) $aTopic->topic_id]->start_time = $oTopic->topic_start_time;\n $oReturn->topics[(int) $aTopic->topic_id]->forum_id = (int) $oTopic->forum_id;\n $oReturn->topics[(int) $aTopic->topic_id]->topic_status = $oTopic->topic_status;\n $oReturn->topics[(int) $aTopic->topic_id]->is_open = (int) $oTopic->topic_open === 1 ? true : false;\n $oReturn->topics[(int) $aTopic->topic_id]->is_sticky = (int) $oTopic->topic_sticky === 1 ? true : false;\n }\n }\n $oReturn->count = count($aTopics);\n return $oReturn;\n }", "title": "" }, { "docid": "fd2823472f85357b99d08e1ebc5887b0", "score": "0.62371165", "text": "public function forums()\n {\n return $this->belongsToMany('App\\Forum', 'user_forum')->withPivot('type', 'answer');\n }", "title": "" }, { "docid": "53b3d8317c2360b5d1e00f88c2383d98", "score": "0.62086606", "text": "function get_forums_can_read()\n\t\t{\n\t\t\t$mydirname =& $this->mModule->get('dirname');\n\t\t\t$xoopsUser =& $this->mXoopsUser ;\n\t\t\t$db =& $this->db ;\n\t\t\t//$mod_config = $this->mod_config ;\n\t\t\t//$myts = $this->myts ;\n\n\t\t\tif( is_object( $xoopsUser ) ) {\n\t\t\t\t$uid = intval( $xoopsUser->getVar('uid') ) ;\n\t\t\t\t$groups = $xoopsUser->getGroups() ;\n\t\t\t\tif( ! empty( $groups ) ) {\n\t\t\t\t\t$whr4forum = \"fa.`uid`=$uid || fa.`groupid` IN (\".implode(\",\",$groups).\")\" ;\n\t\t\t\t\t$whr4cat = \"`uid`=$uid || `groupid` IN (\".implode(\",\",$groups).\")\" ;\n\t\t\t\t} else {\n\t\t\t\t\t$whr4forum = \"fa.`uid`=$uid\" ;\n\t\t\t\t\t$whr4cat = \"`uid`=$uid\" ;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$whr4forum = \"fa.`groupid`=\".intval(XOOPS_GROUP_ANONYMOUS) ;\n\t\t\t\t$whr4cat = \"`groupid`=\".intval(XOOPS_GROUP_ANONYMOUS) ;\n\t\t\t}\n\n\t\t\t// get categories\n\t\t\t$sql = \"SELECT distinct cat_id FROM \".$db->prefix($mydirname.\"_category_access\").\" WHERE ($whr4cat)\" ;\n\t\t\t$result = $db->query( $sql ) ;\n\t\t\tif( $result ) while( list( $cat_id ) = $db->fetchRow( $result ) ) {\n\t\t\t\t$cat_ids[] = intval( $cat_id ) ;\n\t\t\t}\n\t\t\tif( empty( $cat_ids ) ) return array(0) ;\n\n\t\t\t// get forums\n\t\t\t$sql = \"SELECT distinct f.forum_id FROM \".$db->prefix($mydirname.\"_forums\").\" f LEFT JOIN \".$db->prefix($mydirname.\"_forumaccess\").\" fa ON fa.forum_id=f.forum_id WHERE ($whr4forum) AND f.cat_id IN (\".implode(',',$cat_ids).')' ;\n\t\t\t$result = $db->query( $sql ) ;\n\t\t\tif( $result ) while( list( $forum_id ) = $db->fetchRow( $result ) ) {\n\t\t\t\t$forums[] = intval( $forum_id ) ;\n\t\t\t}\n\n\t\t\tif( empty( $forums ) ) return array(0) ;\n\t\t\telse return $forums ;\n\t\t}", "title": "" }, { "docid": "9177a1d1f9ba1cac35672efba41c5a05", "score": "0.6189863", "text": "public function findAllForumNames() {\n $names = $this->createQueryBuilder('f')\n ->select('f.id')\n // This where removes the admin only forum from search\n ->where('f.id > 0')\n ->addSelect('f.name')\n ->orderBy('f.normalizedName', 'ASC')\n ->getQuery()\n ->useQueryCache(true)->useResultCache(true, 30)\n ->execute();\n\n return array_column($names, 'name', 'id');\n }", "title": "" }, { "docid": "f9c8c7a3c8dd39418ea6f9f87890d72c", "score": "0.61709297", "text": "function yucom_list_subforums( $args = array() ) {\n\t$subforums = bbp_forum_get_subforums();\n\tif ( !empty( $subforums ) ) {\n\t\t$total = count( $subforums );\n\t\t$i = 1;\n\t\tob_start();\n\t\tforeach ( $subforums as $subforum ) :\n\t\t\t$sub_id\t\t\t= $subforum->ID;\n\t\t\t$title\t\t\t= $subforum->post_title;\n\t\t\t$desc\t\t\t= $subforum->post_content;\n\t\t\t$permalink\t\t= bbp_get_forum_permalink( $sub_id );\n\t\t\t$topiclass\t\t= bbp_get_forum_class( $sub_id );\t\t\t\n\t\t\t// Get topic counts\n\t\t\t$topics\t \t\t= bbp_get_forum_topic_count( $sub_id , false );\t\t\t\n\t\t\t// Get the most recent reply\n\t\t\t$reply_id\t\t= bbp_get_forum_last_reply_id( $sub_id );\n\t\t\t$topic_id\t\t= bbp_is_reply( $reply_id ) ? bbp_get_reply_topic_id( $reply_id ) : $reply_id;\n\t\t\t$topic_title\t= bbp_get_topic_title( $topic_id );\n\t\t\t$link \t\t\t= bbp_get_reply_url( $reply_id );\n\t\t\t$topic_excerpt\t= bbp_get_reply_excerpt( $reply_id );\t\t\t\n\t\t\t// Build the html class\n\t\t\t$class = ( $i % 2 ) ? \"sub-forum odd \" : \"sub-forum even \";\n\t\t\t$class .= bbp_get_forum_status( $sub_id );\n\t\t\t?>\n <div id=\"forum-<?php echo $sub_id ?>\" class=\"xlarge-33 large-33 medium-50 small-100 tiny-100 forum_item <?php echo $class; ?>\">\n <div>\n <div class=\"forum_desc\">\n <a class=\"forum_front_iconbg\" href=\"<?php echo $permalink; ?>\" title=\"<?php echo $topic_title; ?>\"> \n <div class=\"forum_iconize\">\n <i class=\"fa <?php\n switch ($sub_id) {\n /* Yucom-Bote */\n case \"9\":\n echo \"fa-bullhorn\";\n break;\n /* Gildenherald */\n case \"11\":\n echo \"fa-paper-plane\";\n break;\n /* Gameblog */\n case \"13\":\n echo \"fa-cubes\";\n break;\n /* Wildstar */\n case \"22\":\n echo \"fa-star\";\n break;\n /* Stammtisch */\n case \"251\":\n echo \"fa-users\";\n break;\n /* PC Gameply */\n case \"253\":\n echo \"fa-desktop\";\n break;\n /* Mediathek */\n case \"256\":\n echo \"fa-ticket\";\n break;\n /* Bewerben */\n case \"260\":\n echo \"fa-pencil-square\";\n break;\n /* Geheimrat */\n case \"262\":\n echo \"fa-gavel\";\n break;\n /* Schwarzes Brett */\n case \"266\":\n echo \"fa-exclamation-triangle\";\n break;\n /* Projektlieter Intern */\n case \"272\":\n echo \"fa-sitemap\";\n break;\n /* Thronsaal */\n case \"274\":\n echo \"fa-crosshairs\";\n break;\n /* Reallife */\n case \"276\":\n echo \"fa-beer\";\n break;\n /* Dunkelzimmer */\n case \"268\":\n echo \"fa-bomb\";\n break;\n /* Projektplaner */\n case \"281\":\n echo \"fa-thumb-tack\";\n break;\n /* Wildstar Intern */\n case \"283\":\n echo \"fa-star\";\n break;\n /* Musikzimmer */\n case \"285\":\n echo \"fa-headphones\";\n break;\n /* Konsoleros */\n case \"288\":\n echo \"fa-gamepad\";\n break;\t\n /* MMORPG */\n case \"290\":\n echo \"fa-flask\";\n break;\n /* Portal Intern */\n case \"296\":\n echo \"fa-cogs\";\n break;\n /* Rollenspiel */\n case \"300\":\n echo \"fa-qq\";\n break;\n /* Helden und Legenden */\n case \"302\":\n echo \"fa-shield\";\n break;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n }\n ?>\"></i> \n </div> \n <div class=\"forum_counter\">\n <div class=\"arrow_box\"></div>\n </div>\n </a>\n <div class=\"forum_title\">\n <a href=\"<?php echo $permalink; ?>\">\n <h2><?php echo $title; ?></h2>\n <span><?php echo $desc; ?></span>\n </a>\n </div>\n <!--<div class=\"forum_recent\">\n <div class=\"forum_recent_autor clearfix\">\n <div class=\"push-left\">\n <?php /* bbp_author_link( array( 'post_id' => $reply_id, 'type' => 'avatar' , 'size' => 30 ) ); */ ?>\n </div>\n <div class=\"push-left forum_recent_info\">\n <?php /* bbp_author_link( array( 'post_id' => $reply_id, 'type' => 'name' ) ); ?> schrieb <?php bbp_topic_last_active_time( $topic_id ); */ ?>:\n </div>\n </div>\n <div class=\"forum_excerpt\">\n <span><?php /* echo $topic_excerpt */ ?></span>\n </div>\n </div>-->\n <div class=\"forum_front_topic\">\n <span>Thema:</span> <a class=\"forum_front_tpctitle\" href=\"<?php echo $link; ?>\" title=\"<?php echo $topic_title; ?>\">\n <?php $topic_title = (strlen($topic_title) > 30) ? substr($topic_title,0,35).'...' : $topic_title;\n echo $topic_title; ?></a>\n </div>\n </div>\n </div>\n </div> \n\t\t<?php endforeach;\t\t\n\t\t// Output the list\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\techo $output;\n\t}\n}", "title": "" }, { "docid": "37f3412f11bd2442550ecc664997a32b", "score": "0.6145422", "text": "public static function getAllMessages(){\n\t\t$users[]=array();\n\t\t$conn=DBUtil::getConnection();\n\t\t$sql=\"SELECT * FROM tb_forum\";\n\t\t$result = $conn->query($sql);\n\t\t$conn->close();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9be76c556a915224364f06acb4dde379", "score": "0.613514", "text": "function mysupport_forums()\r\n{\r\n\tglobal $cache;\r\n\t\r\n\t$forums = $cache->read(\"forums\");\r\n\t$mysupport_forums = array();\r\n\t\r\n\tforeach($forums as $forum)\r\n\t{\r\n\t\t// if this forum/category has MySupport enabled, add it to the array\r\n\t\tif($forum['mysupport'] == 1)\r\n\t\t{\r\n\t\t\tif(!in_array($forum['fid'], $mysupport_forums))\r\n\t\t\t{\r\n\t\t\t\t$mysupport_forums[] = $forum['fid'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if this forum/category hasn't got MySupport enabled...\r\n\t\telse\r\n\t\t{\r\n\t\t\t// ... go through the parent list...\r\n\t\t\t$parentlist = explode(\",\", $forum['parentlist']);\r\n\t\t\tforeach($parentlist as $parent)\r\n\t\t\t{\r\n\t\t\t\t// ... if this parent has MySupport enabled...\r\n\t\t\t\tif($forums[$parent]['mysupport'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t// ... add the original forum we're looking at to the list\r\n\t\t\t\t\tif(!in_array($forum['fid'], $mysupport_forums))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$mysupport_forums[] = $forum['fid'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// this is for if we enable MySupport for a whole category; this will pick up all the forums inside that category and add them to the array\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $mysupport_forums;\r\n}", "title": "" }, { "docid": "cd6dacf0f6e0db943d9d26cb4f543a91", "score": "0.61337364", "text": "function bbp_list_forums($args = array())\n{\n}", "title": "" }, { "docid": "1459c651d2040a872eb19fb5ee7440de", "score": "0.6112741", "text": "function bbp_get_private_forum_ids()\n{\n}", "title": "" }, { "docid": "14662b3643388974229bac8657bfb3d5", "score": "0.6107896", "text": "public function index()\n {\n $topics = ForumTopic::latest()->get();\n return $topics;\n }", "title": "" }, { "docid": "9cf2f6644de1c8af963995459e48a83b", "score": "0.6100751", "text": "function bbp_get_forum_types($forum_id = 0)\n{\n}", "title": "" }, { "docid": "3254ced74c0aac175ff2bb84d0022f98", "score": "0.60790163", "text": "function mysupport_get_categories($forum)\r\n{\r\n\tglobal $mybb, $db;\r\n\t\r\n\t$forums_concat_sql = $groups_concat_sql = \"\";\r\n\t\r\n\t$parent_list = explode(\",\", $forum['parentlist']);\r\n\tforeach($parent_list as $parent)\r\n\t{\r\n\t\tif(!empty($forums_concat_sql))\r\n\t\t{\r\n\t\t\t$forums_concat_sql .= \" OR \";\r\n\t\t}\r\n\t\t$forums_concat_sql .= \"CONCAT(',',forums,',') LIKE '%,\" . intval($parent) . \",%'\";\r\n\t}\r\n\t$forums_concat_sql = \"(\" . $forums_concat_sql . \" OR forums = '-1')\";\r\n\t\r\n\t$usergroup_list = $mybb->user['usergroup'];\r\n\tif(!empty($mybb->user['additionalgroups']))\r\n\t{\r\n\t\t$usergroup_list .= \",\" . $mybb->user['additionalgroups'];\r\n\t}\r\n\t$usergroup_list = explode(\",\", $usergroup_list);\r\n\tforeach($usergroup_list as $usergroup)\r\n\t{\r\n\t\tif(!empty($groups_concat_sql))\r\n\t\t{\r\n\t\t\t$groups_concat_sql .= \" OR \";\r\n\t\t}\r\n\t\t$groups_concat_sql .= \"CONCAT(',',groups,',') LIKE '%,\" . intval($usergroup) . \",%'\";\r\n\t}\r\n\t$groups_concat_sql = \"(\" . $groups_concat_sql . \" OR groups = '-1')\";\r\n\t\r\n\t$query = $db->simple_select(\"threadprefixes\", \"pid, prefix\", \"{$forums_concat_sql} AND {$groups_concat_sql}\");\r\n\t$categories = array();\r\n\twhile($category = $db->fetch_array($query))\r\n\t{\r\n\t\t$categories[$category['pid']] = $category['prefix'];\r\n\t}\r\n\treturn $categories;\r\n}", "title": "" }, { "docid": "edd5e7411cd45cc43739e135adcfe5f7", "score": "0.6071462", "text": "function bbp_get_forums_for_current_user($args = array())\n{\n}", "title": "" }, { "docid": "d250405060df1e0866a099cc5bafd377", "score": "0.60425174", "text": "public function forbiddenForums(): array {\n return array_keys(array_filter($this->info()['forum_access'], fn ($v) => $v === false));\n }", "title": "" }, { "docid": "114dd5337a1bbf46c67e38934135ecbd", "score": "0.6013244", "text": "public function &get_forum()\n {\n /* Get parent Forum Info */\n if (!$this->fid)\n exit ('This topic doesn\\'t have a forum!!!');\n /* Get Forum object */\n if (!isset($GLOBALS['BBForums'][$this->fid]))\n $GLOBALS['BBForums'][$this->fid] = new PHPWSBB_Forum($this->fid);\n return $GLOBALS['BBForums'][$this->fid];\n }", "title": "" }, { "docid": "5a890cc807b61476e01bf97d2b224163", "score": "0.60110503", "text": "public function forumThreads(): HasMany\n {\n return $this->hasMany(Thread::class);\n }", "title": "" }, { "docid": "3310975cdaeb68d3859d09830bef71d7", "score": "0.60078716", "text": "public function index()\n {\n $forum = forum::all();\n \n return view('user.forum',['forum' => $forum]);\n }", "title": "" }, { "docid": "87383532197ae907ccaccd33b8d82a34", "score": "0.5986478", "text": "public function getForumsList() // No Father category's\n {\n return $this->db->where('isfather', '0')\n ->get('ac_discussion_category');\n }", "title": "" }, { "docid": "4de84a74fb05677ec15bdb5d6d765551", "score": "0.5974057", "text": "function bbp_get_hidden_forum_ids()\n{\n}", "title": "" }, { "docid": "53bf34cfa6a02c6917801ab3ff9bb874", "score": "0.59708637", "text": "function orgright_client_create_forums() {\n // refer to http://www.unibia.com/unibianet/drupal/how-create-drupal-forums-and-containers-programmatically\n require_once 'modules/forum/forum.admin.inc';\n $forum_vid = 1; // Forum vocabulary is vocab 1\n // Create a container\n $forum_container_fields = array();\n $forum_container_fields['values']['name'] = st('Miscellaneous');\n $forum_container_fields['values']['description'] = st('This container is for forums of a general nature');\n $forum_container_fields['values']['parent'][0] = 0;\n $forum_container_fields['values']['weight'] = 0;\n $forum_container_fields['values']['vid'] = $forum_vid;\n $container = forum_form_container($forum_container_fields);\n $container['form_id']['#value'] = 'forum_form_container'; // save the form id correctly\n forum_form_submit($container, $forum_container_fields);\n\n // Create an initial forum\n $containerID = taxonomy_get_term_by_name(st('Miscellaneous'));\n $forum_topic_fields = array();\n $forum_topic_fields['values']['name'] = st('General');\n $forum_topic_fields['values']['description'] = st('This forum is for discussions of a general nature about the organisation');\n $forum_topic_fields['values']['parent'][0] = $containerID[0]->tid;\n $forum_topic_fields['values']['weight'] = 0;\n $forum_topic_fields['values']['vid'] = $forum_vid;\n $forum = forum_form_forum($forum_topic_fields);\n forum_form_submit($forum, $forum_topic_fields);\n\n}", "title": "" }, { "docid": "ef20f16a7b2f30398a1fffae38250b9e", "score": "0.59679234", "text": "public function index()\n {\n $forums = Forum::withCount(Forum::COUNTS)->get();\n \n return $this->collectionResponse($forums);\n }", "title": "" }, { "docid": "b95b20ea787f7bccf934702fb485f6f3", "score": "0.59439623", "text": "function bbp_forum_content($forum_id = 0)\n{\n}", "title": "" }, { "docid": "5409b586762267f665c19ea1e7b75113", "score": "0.5902081", "text": "function extendedforum_get_extendedforum_types_all() {\n return array ('news' => get_string('namenews','extendedforum'),\n 'social' => get_string('namesocial','extendedforum'),\n 'general' => get_string('generalextendedforum', 'extendedforum'),\n 'eachuser' => get_string('eachuserextendedforum', 'extendedforum'),\n 'single' => get_string('singleextendedforum', 'extendedforum'),\n 'qanda' => get_string('qandaextendedforum', 'extendedforum'));\n}", "title": "" }, { "docid": "15450f484cb8f22892f2196240bbcb4a", "score": "0.58913857", "text": "function bbp_get_forum_visibility($forum_id = 0)\n{\n}", "title": "" }, { "docid": "1e91293d79d5a0ae3f8825eaeb7583d3", "score": "0.5886455", "text": "function getAll($classId) {\n\n\t\t$classId = intval($classId);\n\t$foo =\t\tClassForum_Queries::getQuery('forumsSorted',\n\t\t\t\tarray($classId)\n\t\t\t);\n\n\t\t$db = DB::getHandle();\n\t\t$db->query(\n\t\t\tClassForum_Queries::getQuery('forumsSorted',\n\t\t\t\tarray($classId)\n\t\t\t)\n\t\t);\n\t\twhile ($db->nextRecord()) {\n\t\t\t$list[] = ClassForumPeer::row2Obj($db->record);\n\t\t}\n\n\t\t$objList = array();\n\t\tforeach ($list as $k=>$v) {\n\t\t\t$x = new ClassForum_Forums();\n\t\t\t$x->_dao = $v;\n\t\t\t$objList[] = $x;\n\t\t}\n\n\t\treturn $objList;\n\t}", "title": "" }, { "docid": "cd883a66918486c6806907b99415fccc", "score": "0.587057", "text": "public function amf_get_forum_discussions($obj)\r\n\t{\r\n\t\t/* \r\n\t\t$obj['instance'] = 45;\r\n\t\t$obj['swfid'] = 24;\r\n\t\t$obj['userid'] = 2;\r\n\t\t$obj['forum'] = 1; // The forum instance ID\r\n\t\t*/\r\n\t\t$capabilities = $this->access->get_capabilities($obj['instance'],$obj['swfid']);\r\n\t\t// If there was a problem with authentication, return the error message\r\n\t\tif(!empty($capabilities->error))\r\n\t\t{\r\n\t\t\treturn $capabilities->error;\r\n\t\t}\r\n\t\tif ($capabilities->is_logged_in && $capabilities->view_own_grades)\r\n\t\t{\r\n\t\t\t// Add view to Moodle log\r\n\t\t\tadd_to_log($capabilities->course, 'swf', 'amfphp get_forum_discussions id:'.$obj['forum'], \"view.php?id=$capabilities->cmid\", \"$capabilities->swfname\"); \r\n\t\t\t\r\n\t\t\t$discussions = get_records('forum_discussions','forum',$obj['forum']);\r\n\t\t\tif($discussions)\r\n\t\t\t{\r\n\t\t\t\t$swf_return->discussions = $discussions;\r\n\t\t\t\t$swf_return->result = 'SUCCESS';\r\n\t\t\t\t$swf_return->message = 'Forum discussions successfully accessed.';\r\n\t\t\t\treturn $swf_return;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$swf_return->result = 'NO_PERMISSION';\r\n\t\t$swf_return->message = 'You do not have permission to access forum discussions.';\r\n\t\treturn $swf_return;\r\n\t}", "title": "" }, { "docid": "9c56d388ecf1420d355843cd63b39bd5", "score": "0.58608186", "text": "public function groupforum_get_forum() {\n $this->init('forums');\n\n $oReturn = new stdClass();\n\n $mForumExists = $this->groupforum_check_forum_existence();\n\n if ($mForumExists === false)\n return $this->error('base', 0);\n else if (is_int($mForumExists) && $mForumExists !== true)\n return $this->error('forums', $mForumExists);\n\n $oForum = bp_forums_get_forum((int) $this->forumid);\n\n $oReturn->forums[(int) $oForum->forum_id]->name = $oForum->forum_name;\n $oReturn->forums[(int) $oForum->forum_id]->slug = $oForum->forum_slug;\n $oReturn->forums[(int) $oForum->forum_id]->description = $oForum->forum_desc;\n $oReturn->forums[(int) $oForum->forum_id]->topics_count = (int) $oForum->topics;\n $oReturn->forums[(int) $oForum->forum_id]->post_count = (int) $oForum->posts;\n return $oReturn;\n }", "title": "" }, { "docid": "f9eb3854adf7b44cab932dc1d574a2c9", "score": "0.58562744", "text": "function display_forums() {\n global $connect;\n\n $fetch_forum_qry = \"select user_details.user_image , forum_tbl.* from user_details , forum_tbl where user_details.user_id = forum_tbl.user_id\";\n $fetch_forum_qry_result = mysqli_query($connect,$fetch_forum_qry);\n $html = '';\n while($forum_array = mysqli_fetch_array($fetch_forum_qry_result)) {\n $html.='\n <div class=\"post\">\n <div class=\"wrap-ut pull-left\">\n <div class=\"userinfo pull-left\">\n <div class=\"avatar\">\n <img src='.user_img_path.$forum_array['user_image'].' alt=\"user-img\" />\n <div class=\"status green\">&nbsp;</div>\n </div>\n </div>\n <div class=\"posttext pull-left\">\n <h2><a href=\"javascript:void(0)\">'.$forum_array['forum_title'].'</a></h2>\n <p>'.$forum_array['forum_description'].'</p>\n </div>\n <div class=\"clearfix\"></div>\n </div>\n <div class=\"clearfix\"></div>\n </div>\n ';\n }\n echo $html;\n }", "title": "" }, { "docid": "af86b71d6ccf2b7743e4f48a857b5c57", "score": "0.5844117", "text": "public function forumAction() {\r\n \r\n $session = new Session();\r\n $session->set('CurrentMenu', 'Forum');\r\n \r\n $em = $this->getDoctrine()->getManager();\r\n $Forums = $em->getRepository('EieinstitutBundle:Forum')->findall();\r\n $Rubriques = $em->getRepository('EieinstitutBundle:Rubrique')->findall();\r\n return $this->render('EieinstitutBundle:Community:Forum.html.twig', array('Rubriques' => $Rubriques, 'Forums' => $Forums));\r\n }", "title": "" }, { "docid": "13f102118107acaf4bc7086e241440c9", "score": "0.58384144", "text": "function bbp_get_form_forum_visibility()\n{\n}", "title": "" }, { "docid": "d4479c56b76bf9b05904c2d1d1346b77", "score": "0.58381754", "text": "function request()\n{\n\tUrl::setCanonicalUrl('/');\n\n\tif(Session::isLoggedIn())\n\t\t$forums = Sql::queryAll(\n\t\t\t'SELECT \n\t\t\t\tf.*,\n\t\t\t\tlu.(_userfields),\n\t\t\t\t(\n\t\t\t\t\tSELECT COUNT(*)\n\t\t\t\t\tFROM {threads} t\n\t\t\t\t\tLEFT JOIN {threadsread} tr ON tr.thread=t.id AND tr.id=?\n\t\t\t\t\tWHERE t.forum=f.id AND t.lastpostdate > IFNULL(tr.date, 0)\n\t\t\t\t) numnew\n\t\t\tFROM {forums} f\n\t\t\tLEFT JOIN {users} lu ON lu.id = f.lastpostuser\n\t\t\tORDER BY forder',\n\t\t\tSession::id());\n\telse\n\t\t$forums = Sql::queryAll(\n\t\t\t'SELECT \n\t\t\t\tf.*,\n\t\t\t\tlu.(_userfields),\n\t\t\t\t0 as numnew\n\t\t\tFROM {forums} f\n\t\t\tLEFT JOIN {users} lu ON lu.id = f.lastpostuser\n\t\t\tORDER BY forder');\n\n\t$categories = Sql::queryAll('SELECT * FROM {categories} ORDER BY corder');\n\n\tforeach($categories as &$cat)\n\t{\n\t\t$cat['forums'] = array();\n\t\tforeach($forums as $forum)\n\t\t\tif($forum['catid'] == $cat['id'])\n\t\t\t{\n\t\t\t\tif(!Permissions::canViewForum($forum)) continue;\n\t\t\t\t$cat['forums'][] = $forum;\n\t\t\t\tforeach($forums as $subforum)\n\t\t\t\t{\n\t\t\t\t\tif(!Permissions::canViewForum($subforum)) continue;\n\t\t\t\t\tif($subforum['catid'] == -$forum['id'])\n\t\t\t\t\t\t$cat['forums'][] = $subforum;\n\t\t\t\t}\n\t\t\t}\n\t}\n\n\t$breadcrumbs = array(\n\t);\n\n\t$actionlinks = array(\n\t);\n\n\tif(Session::isLoggedIn())\n\t\t$actionlinks[] = array('title' => __('Mark all as read'), 'ng' => 'doAction(\"/api/markasread\", {fid: 0})');\n\n\trenderPage('components/forumList.html', array(\n\t\t'categories' => $categories,\n\t\t'breadcrumbs' => $breadcrumbs, \n\t\t'actionlinks' => $actionlinks,\n\t\t'title' => '',\n\t));\n}", "title": "" }, { "docid": "259f247a59d89f055371f31e125008ba", "score": "0.57882214", "text": "function listForums($parentID)\n{\n\n\tglobal $forumQuery;\n\n\t$forumQuery->bind_param(\"i\", $parentID);\n\t$forumQuery->execute();\n\t$forums = $forumQuery->get_result();\n\n\tif ($forums->num_rows > 0) {\n\t\techo \"<h2>Forums</h2>\";\n\t}\n\n\twhile ($forumRow = $forums->fetch_row()) {\n\n\t\t$forumID = $forumRow[0];\n\t\t$forumName = $forumRow[3];\n\t\t$forumDesc = $forumRow[4];\n\n\t\techo \"<div class=\\\"content-row\\\">\";\n\t\techo \"<div class=\\\"post-title\\\">\";\n\t\techo \"<h4><a href=\\\"forum.php?id=$forumID\\\">$forumName</a></h4>\";\n\t\techo \"</div>\";\n\t\techo \"<div class=\\\"post-preview\\\">\";\n\t\techo \"<p>$forumDesc</p>\";\n\t\techo \"</div>\";\n\t\techo \"</div>\";\n\t}\n\n\t$forums->close();\n}", "title": "" }, { "docid": "9a24a6d12a3a68cf1fc397792ac98de6", "score": "0.57725036", "text": "function bbp_get_forum_visibilities($forum_id = 0)\n{\n}", "title": "" }, { "docid": "4e512086b8564b75711e3acb1a0bcede", "score": "0.57577074", "text": "function b_forum_show($options)\n{\n global $xoopsConfig;\n global $access_forums;\n\n $db =& Database::getInstance();\n $myts =& MyTextSanitizer::getInstance();\n $block = array();\n $i = 0;\n $order = \"\";\n $extra_criteria = \"\";\n\tif(!empty($options[2])) {\n\t\t$time_criteria = time() - forum_getSinceTime($options[2]);\n\t\t$extra_criteria = \" AND p.post_time>\".$time_criteria;\n\t}\n $time_criteria = null;\n switch ($options[0]) {\n case 'time':\n default:\n $order = 'p.post_time';\n \t\t$extra_criteria .= \" AND p.approved=1\";\n break;\n }\n $xforumConfig = getConfigForBlock();\n \t\t\t\n if(!isset($access_forums)){\n\t $forum_handler =& xoops_getmodulehandler('forum', 'xforum');\n \tif(!$access_obj =& $forum_handler->getForums(0, 'access', array('forum_id', 'cat_id', 'forum_type')) ){\n\t \treturn null;\n \t}\n \t$access_forums = array_keys( $access_obj ); // get all accessible forums\n \tunset($access_obj );\n\t}\n if (!empty($options[6])) {\n $allowedforums = array_filter(array_slice($options, 6), \"b_forum_array_filter\"); // get allowed forums\n $allowed_forums = array_intersect($allowedforums, $access_forums);\n }else{\n $allowed_forums = $access_forums;\n }\n\n $forum_criteria = ' AND t.forum_id IN (' . implode(',', $allowed_forums) . ')';\n $approve_criteria = ' AND t.approved = 1';\n\n $query = 'SELECT'.\n \t\t'\tDISTINCT t.topic_id, t.topic_replies, t.forum_id, t.topic_title, t.topic_views, t.topic_subject,'.\n \t\t'\tf.forum_name, f.allow_subject_prefix,'.\n \t\t'\tp.post_id, p.post_time, p.icon, p.uid, p.poster_name'.\n \t\t'\tFROM ' . $db->prefix('xf_posts') . ' AS p '.\n \t\t'\tLEFT JOIN ' . $db->prefix('xf_topics') . ' AS t ON t.topic_last_post_id=p.post_id'.\n \t\t'\tLEFT JOIN ' . $db->prefix('xf_forums') . ' AS f ON f.forum_id=t.forum_id'.\n \t\t'\tWHERE 1=1 ' .\n \t\t\t$forum_criteria .\n \t\t\t$approve_criteria .\n \t\t\t$extra_criteria .\n \t\t\t' ORDER BY ' . $order . ' DESC';\n\n $result = $db->query($query, $options[1], 0);\n if (!$result) {\n\t forum_message(\"xforum block query error: \".$query);\n return false;\n }\n $block['disp_mode'] = $options[3]; // 0 - full view; 1 - compact view; 2 - lite view;\n $rows = array();\n $author = array();\n while ($row = $db->fetchArray($result)) {\n $rows[] = $row;\n $author[$row[\"uid\"]] = 1;\n }\n if (count($rows) < 1) return false;\n\t$author_name = forum_getUnameFromIds(array_keys($author), $xforumConfig['show_realname'], true);\n\n foreach ($rows as $arr) {\n $topic_page_jump = '';\n if ($arr['allow_subject_prefix']) {\n $subjectpres = explode(',', $xforumConfig['subject_prefix']);\n if (count($subjectpres) > 1) {\n foreach($subjectpres as $subjectpre) {\n $subject_array[] = $subjectpre;\n }\n \t$subject_array[0] = null;\n }\n $topic['topic_subject'] = $subject_array[$arr['topic_subject']];\n } else {\n $topic['topic_subject'] = \"\";\n }\n $topic['post_id'] = $arr['post_id'];\n $topic['forum_id'] = $arr['forum_id'];\n $topic['forum_name'] = $myts->htmlSpecialChars($arr['forum_name']);\n $topic['id'] = $arr['topic_id'];\n\n $title = $myts->htmlSpecialChars($arr['topic_title']);\n if(!empty($options[5])){\n \t$title = xoops_substr($title, 0, $options[5]);\n \t}\n $topic['title'] = $title;\n $topic['replies'] = $arr['topic_replies'];\n $topic['views'] = $arr['topic_views'];\n $topic['time'] = forum_formatTimestamp($arr['post_time']);\n if (!empty($author_name[$arr['uid']])) {\n \t$topic_poster = $author_name[$arr['uid']];\n } else {\n $topic_poster = $myts->htmlSpecialChars( ($arr['poster_name'])?$arr['poster_name']:$GLOBALS[\"xoopsConfig\"][\"anonymous\"] );\n }\n $topic['topic_poster'] = $topic_poster;\n $topic['topic_page_jump'] = $topic_page_jump;\n $block['topics'][] = $topic;\n unset($topic);\n }\n $block['indexNav'] = intval($options[4]);\n\n return $block;\n}", "title": "" }, { "docid": "cdc482fceb331f1c18bcb1faea97c173", "score": "0.574999", "text": "function show_subforums()\n {\n\t\tif ( $this->ipsclass->forums->read_topic_only == 1 )\n\t\t{\n\t\t\t//$this->sub_output = \"\";\n\t\t\t//return;\n\t\t}\n\t\t\n\t\t$boards = $this->ipsclass->load_class( ROOT_PATH.'sources/action_public/boards.php', 'boards' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Load DB tracked topics\n\t\t//-----------------------------------------\n\t\t\n\t\t$boards->boards_get_db_tracker();\n\t\t\n\t\t$this->sub_output = $boards->show_subforums($this->ipsclass->input['f']);\n }", "title": "" }, { "docid": "37583bd624a543503e5c4d8aa08d18bd", "score": "0.5749514", "text": "function bbp_forum_query_subforum_ids($forum_id)\n{\n}", "title": "" }, { "docid": "b73d47a3a1c345f1193afde36fdd88a1", "score": "0.57484126", "text": "function bbp_form_forum_content()\n{\n}", "title": "" }, { "docid": "5abc864d3daaf92d1a9aabb55eb94c83", "score": "0.5740905", "text": "function break_up_forum_array( $forums ) {\r\n\tglobal $forums;\r\n\tforum_restriction_alter_front_page_forum_list( $forums );\r\n\tforeach ( $forums as $forum ) {\r\n\t\t$forum_ids .= $forum->forum_id.'\\',\\'';\r\n\t}\r\n\t$forum_ids = rtrim($forum_ids, ',\\'\\' ');\r\n\treturn $forum_ids;\r\n}", "title": "" }, { "docid": "9d44f6a09646a6d84f9704ce5462d968", "score": "0.57316864", "text": "public function get_forums($options = array())\n {\n $defaults = array(\n 'id' => array()\n );\n $options = array_merge($defaults, $options);\n\n $values = array();\n $sql = \"\n SELECT f.*,\n lp.id latest_post_id, \n lp.date_created latest_post_date,\n lp.author_id latest_post_author_id,\n lp.author_name latest_post_author_name,\n IF(lp.thread_id IS NULL, lp.url, lpt.url) latest_post_thread_url,\n lp.title latest_post_title,\n t.thread_count,\n r.reply_count\n FROM forums f\n\n LEFT JOIN (\n SELECT p.*, \n a.username author_name\n FROM forum_posts p\n LEFT JOIN cms_accounts a ON p.author_id = a.id\n ORDER BY date_created DESC\n ) lp ON f.id = lp.forum_id\n\n LEFT JOIN (\n SELECT p.*, \n a.username author_name\n FROM forum_posts p\n LEFT JOIN cms_accounts a ON p.author_id = a.id\n ORDER BY date_created DESC \n ) lpt ON lp.thread_id = lpt.id\n\n LEFT JOIN (\n SELECT t.forum_id, COUNT(t.id) thread_count\n FROM forum_posts t\n WHERE t.thread_id IS NULL\n GROUP BY t.forum_id\n ) t ON f.id = t.forum_id\n\n LEFT JOIN (\n SELECT r.forum_id, COUNT(r.id) reply_count\n FROM forum_posts r\n WHERE r.thread_id IS NOT NULL\n GROUP BY r.forum_id\n ) r ON f.id = r.forum_id\n \";\n\n // what are they requesting\n if (is_array($options['id']) && count($options['id']) > 0)\n {\n foreach ($id as $index => $num) { $id[$index] = (int)$num; }\n $sql .= '\n WHERE f.id IN (' . implode(',', $id) . ')\n ';\n } elseif (is_numeric($options['id'])) {\n $sql .= ' WHERE f.id = :id ';\n $values[':id'] = $options['id'];\n } \n\n $sql .= '\n GROUP BY f.id\n ORDER BY f.rank, f.name\n ';\n\n $forums = $this->db->query_all($sql, $values, array('date' => array('latest_post_date')));\n if (is_numeric($options['id']))\n {\n if (count($forums) > 0)\n {\n return $forums[0];\n }\n return NULL;\n } \n return $forums;\n }", "title": "" }, { "docid": "16f880716b3158bf2c0aa364dc69a6c9", "score": "0.5729991", "text": "function getTopics(){\n\tglobal $debug, $message, $Dbc;\n\t$topics = array();\n\ttry{\n\t\t$stmt = $Dbc->query(\"SELECT\n\tfaqTopics.topicId AS 'topicId',\n\tfaqTopics.topic AS 'topic'\nFROM\n\tfaqTopics\nORDER BY faqTopics.topic ASC\");\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t$topics[$row['topicId']] = $row['topic'];\n\t\t}\n\t\treturn $topics;\n\t}catch(PDOException $e){\n\t\terror(__LINE__,'','<pre>' . $e . '</pre>');\n\t}\n}", "title": "" }, { "docid": "120f887f264e60203bb32d6b424f45f2", "score": "0.57228243", "text": "function bbp_admin_setting_callback_group_forums()\n{\n}", "title": "" }, { "docid": "6ab0158f2c6132c77f3f646c8fbe525b", "score": "0.5721682", "text": "public static function getForums\n\t(\n\t\t$categoryID\t\t// <int> The ID of the category you're retrieving forums from.\n\t)\t\t\t\t\t// RETURNS <int:[str:mixed]> an array of forums.\n\t\n\t// $forums = AppForum::getForums($categoryID);\n\t{\n\t\t$clearance = (isset(Me::$clearance) ? Me::$clearance : 0);\n\t\t\n\t\t$results = Database::selectMultiple(\"SELECT f.id, f.has_children, f.url_slug, f.title, f.description, f.posts, f.views, f.last_poster, f.date_lastPost, f.perm_read, f.perm_post, u.role, u.handle, u.display_name FROM forums f LEFT JOIN users u ON u.uni_id=f.last_poster WHERE f.category_id=? AND parent_id=? ORDER BY f.forum_order ASC\", array($categoryID, 0));\n\t\t\n\t\t// Cycle through the list of forums, and remove any that you don't have permission to read\n\t\tforeach($results as $key => $val)\n\t\t{\n\t\t\tif((int) $val['perm_read'] > $clearance)\n\t\t\t{\n\t\t\t\tunset($results[$key]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "ea1844fb3b080c837d6fad5163f4159d", "score": "0.5713908", "text": "private function get_forum_thread_table()\n\t{\n\t\treturn $this->forum_thread_table = Database :: get_course_table(TABLE_FORUM_THREAD);\n\t}", "title": "" }, { "docid": "d8d9150f4a13076ef2d13719acf1fc61", "score": "0.5710097", "text": "public function get_forum($forum_id) { return $this->get_forums(array('id' => $forum_id)); }", "title": "" }, { "docid": "13b41c2a50f7aa4733c00ce50e7e6db2", "score": "0.57074463", "text": "function plugin_searchtypes_forum()\n{\n global $LANG_GF00;\n\n $tmp['forum'] = $LANG_GF00['searchlabel'];\n return $tmp;\n}", "title": "" }, { "docid": "abcc5be7035102463ba80748b02f5b01", "score": "0.57068557", "text": "function bbp_member_forums_topics_content()\n{\n}", "title": "" }, { "docid": "3c53387fcd4499581edfd00122495f91", "score": "0.5706627", "text": "function bbp_get_group_forum_ids($group_id = 0)\n{\n}", "title": "" }, { "docid": "07f19beca5e9394cd1b92ca6714309d5", "score": "0.5704625", "text": "public function get_all_links()\n\t{\n\t\tif (empty($this->course_code)) {\n\t\t\tdie('Error in get_not_created_links() : course code not set');\n\t\t}\n\n\t\t$tbl_grade_links \t= Database :: get_course_table(TABLE_FORUM_THREAD);\n\t\t$tbl_item_property\t= Database :: get_course_table(TABLE_ITEM_PROPERTY);\n\t\t$session_id = api_get_session_id();\n\n\t\tif ($session_id) {\n\t\t\t$session_condition = 'tl.session_id='.api_get_session_id();\n\t\t} else {\n\t\t\t$session_condition = '(tl.session_id = 0 OR tl.session_id IS NULL)';\n\t\t}\n\n\t\t$sql = 'SELECT tl.thread_id, tl.thread_title, tl.thread_title_qualify\n\t\t\t\tFROM '.$tbl_grade_links.' tl INNER JOIN '.$tbl_item_property.' ip\n\t\t\t\tON (tl.thread_id = ip.ref AND tl.c_id = ip.c_id)\n\t\t\t\tWHERE\n\t\t\t\t tl.c_id = '.$this->course_id.' AND\n ip.c_id = '.$this->course_id.' AND\n ip.tool = \"forum_thread\" AND\n ip.visibility <> 2 AND\n '.$session_condition.'\n ';\n\n\t\t$result = Database::query($sql);\n\t\twhile ($data = Database::fetch_array($result)) {\n\t\t\tif ( isset($data['thread_title_qualify']) && $data['thread_title_qualify'] != \"\") {\n\t\t\t\t$cats[] = array($data['thread_id'], $data['thread_title_qualify']);\n\t\t\t} else {\n\t\t\t\t$cats[] = array($data['thread_id'], $data['thread_title']);\n\t\t\t}\n\t\t}\n\t\t$my_cats = isset($cats) ? $cats : null;\n\n\t\treturn $my_cats;\n\t}", "title": "" }, { "docid": "68ad7944f35afcd22a2d61a4cbaf6358", "score": "0.570456", "text": "private function update_forums($forum) {\n\t\t\t\n\t\t\tin_array($forum, $this->forums) != 1 ? array_push($this->forums, $forum) : '';\n\t\t}", "title": "" }, { "docid": "3c07ac59dcbd3cdc0b770d21cf9ab365", "score": "0.5699726", "text": "private function _getThreadDs()\n {\n return Wekit::load('forum.PwThread');\n }", "title": "" }, { "docid": "514253100ab2898e9367e2a5db4e3568", "score": "0.5690144", "text": "public function amf_get_forum_posts($obj)\r\n\t{\r\n\t\t/* \r\n\t\t$obj['instance'] = 45;\r\n\t\t$obj['swfid'] = 24;\r\n\t\t$obj['userid'] = 2;\r\n\t\t$obj['forum'] = 1; // The forum instance on course page\r\n\t\t$obj['discussion'] = 1; // The discussion thread on the forum\r\n\t\t*/\r\n\t\t$capabilities = $this->access->get_capabilities($obj['instance'],$obj['swfid']);\r\n\t\t// If there was a problem with authentication, return the error message\r\n\t\tif(!empty($capabilities->error))\r\n\t\t{\r\n\t\t\treturn $capabilities->error;\r\n\t\t}\r\n\t\tif ($capabilities->is_logged_in && $capabilities->view_own_grades)\r\n\t\t{\r\n\t\t\t// Add view to Moodle log\r\n\t\t\tadd_to_log($capabilities->course, 'swf', 'amfphp get_forum_posts id:'.$obj['discussion'], \"view.php?id=$capabilities->cmid\", \"$capabilities->swfname\"); \r\n\t\t\t\r\n\t\t\t$records = get_records('forum_posts','discussion',$obj['discussion']);\r\n\t\t\tif($records)\r\n\t\t\t{\r\n\t\t\t\t$i = 0;\r\n\t\t\t\t//$posts = array();\r\n\t\t\t\tforeach($records as $record)\r\n\t\t\t\t{\r\n\t\t\t\t\t$post_obj = new object();\r\n\t\t\t\t\t$post_obj->text = strip_tags($record->message); // remove HTML tags\r\n\t\t\t\t\t$post_obj->words = str_word_count( strtolower($post_obj->text),1); // convert text into array of lower case words, including contractions and hyphenated words\r\n\t\t\t\t\t$swf_return->posts[$i] = $post_obj;\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\t\t\t\t//$swf_return->posts = $posts;\r\n\t\t\t\t$swf_return->result = 'SUCCESS';\r\n\t\t\t\t$swf_return->message = 'Forum posts successfully accessed.';\r\n\t\t\t\treturn $swf_return;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$swf_return->result = 'NO_PERMISSION';\r\n\t\t$swf_return->message = 'You do not have permission to access forum posts.';\r\n\t\treturn $swf_return;\r\n\t}", "title": "" }, { "docid": "b9d70e0c959c24bec019f1b1af5fe139", "score": "0.56585294", "text": "public function adminForm()\r\n\t{\r\n\t\t$this->lang->loadLanguageFile( array( 'admin_forums' ), 'forums' );\r\n\t\t$this->lang->loadLanguageFile( array( 'admin_manage' ), 'ibmarket' );\r\n\t\t\r\n\t\trequire_once( IPSLib::getAppDir( 'forums' ) . \"/sources/classes/forums/class_forums.php\" );\r\n\t\trequire_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/admin_forum_functions.php' );\r\n\t\t\r\n\t\t$forum_functions = new admin_forum_functions( $this->registry );\r\n\t\t$forum_functions->forumsInit();\r\n\t\t$forumlist = $forum_functions->adForumsForumList();\r\n\t\t$deleteForum = array_merge(array(array(0, $this->lang->words['remove_all_posts'])), $forumlist);\r\n\t\t\r\n\t\t$perm_masks = array();\r\n\t\t$perm_masks[] = array('*',$this->lang->words['frm_global']);\r\n\t\t$this->DB->build( array( 'select' => '*', 'from' => 'forum_perms' ) );\r\n\t\t$q = $this->DB->execute();\r\n\t\twhile ( $r = $this->DB->fetch($q) )\r\n\t\t{\r\n\t\t\t$perm_masks[] = array( $r['perm_id'], $r['perm_name'] );\r\n\t\t}\r\n\t\t\r\n\t\t$dd_prune = array( \r\n\t\t\t\t\t\t\t 0 => array( 1, $this->lang->words['for_today'] ),\r\n\t\t\t\t\t\t\t 1 => array( 5, $this->lang->words['for_last5'] ),\r\n\t\t\t\t\t\t\t 2 => array( 7, $this->lang->words['for_last7'] ),\r\n\t\t\t\t\t\t\t 3 => array( 10, $this->lang->words['for_last10'] ),\r\n\t\t\t\t\t\t\t 4 => array( 15, $this->lang->words['for_last15'] ),\r\n\t\t\t\t\t\t\t 5 => array( 20, $this->lang->words['for_last20'] ),\r\n\t\t\t\t\t\t\t 6 => array( 25, $this->lang->words['for_last25'] ),\r\n\t\t\t\t\t\t\t 7 => array( 30, $this->lang->words['for_last30'] ),\r\n\t\t\t\t\t\t\t 8 => array( 60, $this->lang->words['for_last60'] ),\r\n\t\t\t\t\t\t\t 9 => array( 90, $this->lang->words['for_last90'] ),\r\n\t\t\t\t\t\t\t 10=> array( 100, $this->lang->words['for_showall'] ),\r\n\t\t\t\t\t\t\t);\r\n\t\t\r\n\t\t$dd_order = array( \r\n\t\t\t\t\t\t\t 0 => array( 'last_post', $this->lang->words['for_s_last'] ),\r\n\t\t\t\t\t\t\t 1 => array( 'title' , $this->lang->words['for_s_topic'] ),\r\n\t\t\t\t\t\t\t 2 => array( 'starter_name', $this->lang->words['for_s_name'] ),\r\n\t\t\t\t\t\t\t 3 => array( 'posts' , $this->lang->words['for_s_post'] ),\r\n\t\t\t\t\t\t\t 4 => array( 'views' , $this->lang->words['for_s_view'] ),\r\n\t\t\t\t\t\t\t 5 => array( 'start_date', $this->lang->words['for_s_date'] ),\r\n\t\t\t\t\t\t\t 6 => array( 'last_poster_name' , $this->lang->words['for_s_poster'] )\r\n\t\t\t\t\t\t\t);\r\n\t\t\r\n\t\t$dd_by = array( \r\n\t\t\t\t\t\t\t 0 => array( 'Z-A', $this->lang->words['for_desc'] ),\r\n\t\t\t\t\t\t\t 1 => array( 'A-Z', $this->lang->words['for_asc'] )\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\r\n\t\t$dd_filter\t = array(\r\n\t\t\t\t\t\t\t 0 => array( 'all', \t$this->lang->words['for_all'] ),\r\n\t\t\t\t\t\t\t 1 => array( 'open', \t$this->lang->words['for_open'] ),\r\n\t\t\t\t\t\t\t 2 => array( 'hot',\t\t$this->lang->words['for_hot'] ),\r\n\t\t\t\t\t\t\t 3 => array( 'poll',\t$this->lang->words['for_poll'] ),\r\n\t\t\t\t\t\t\t 4 => array( 'locked',\t$this->lang->words['for_locked'] ),\r\n\t\t\t\t\t\t\t 5 => array( 'moved',\t$this->lang->words['for_moved'] ),\r\n\t\t\t\t\t\t\t 6 => array( 'istarted', $this->lang->words['for_istarted'] ),\r\n\t\t\t\t\t\t\t 7 => array( 'ireplied', $this->lang->words['for_ireplied'] ),\r\n\t\t\t\t\t\t\t);\r\n\t\t\r\n\t\t$timeUnits = array(array(86400,$this->lang->words['days']),array(604800,$this->lang->words['weeks']));\r\n\t\t\r\n\t\t$form['lasting'] = ipsRegistry::getClass('output')->formSimpleInput('item[lasting]', $this->itemSettings['lasting']);\r\n\t\t$form['time_unit'] = ipsRegistry::getClass('output')->formDropdown('item[time_unit]', $timeUnits, $this->itemSettings['time_unit']);\r\n\t\t$form['parent_forum'] = ipsRegistry::getClass('output')->formDropdown('item[parent_forum]', $forumlist, $this->itemSettings['parent_forum']);\r\n\t\t$form['set_password'] = ipsRegistry::getClass('output')->formYesNo('item[set_password]', $this->itemSettings['set_password']);\r\n\t\t$form['allow_html'] = ipsRegistry::getClass('output')->formYesNo('item[allow_html]', $this->itemSettings['allow_html']);\r\n\t\t$form['allow_bbcode'] = ipsRegistry::getClass('output')->formYesNo('item[allow_bbcode]', $this->itemSettings['allow_bbcode']);\r\n\t\t$form['allow_quick_reply'] = ipsRegistry::getClass('output')->formYesNo('item[allow_quick_reply]', $this->itemSettings['allow_quick_reply']);\r\n\t\t$form['allow_polls'] = ipsRegistry::getClass('output')->formYesNo('item[allow_polls]', $this->itemSettings['allow_polls']);\r\n\t\t$form['allow_poll_bump'] = ipsRegistry::getClass('output')->formYesNo('item[allow_poll_bump]', $this->itemSettings['allow_poll_bump']);\r\n\t\t$form['allow_rating'] = ipsRegistry::getClass('output')->formYesNo('item[allow_rating]', $this->itemSettings['allow_rating']);\r\n\t\t$form['allow_post_inc'] = ipsRegistry::getClass('output')->formYesNo('item[allow_post_inc]', $this->itemSettings['allow_post_inc']);\r\n\t\t$form['min_posts_post'] = ipsRegistry::getClass('output')->formInput('item[min_posts_post]', $this->itemSettings['min_posts_post']);\r\n\t\t$form['min_posts_view'] = ipsRegistry::getClass('output')->formInput('item[min_posts_view]', $this->itemSettings['min_posts_view']);\r\n\t\t$form['can_view_others'] = ipsRegistry::getClass('output')->formYesNo('item[can_view_others]', $this->itemSettings['can_view_others']);\r\n\t\t$form['prune'] = ipsRegistry::getClass('output')->formDropdown('item[prune]', $dd_prune, $this->itemSettings['prune']);\r\n\t\t$form['sort_key'] = ipsRegistry::getClass('output')->formDropdown('item[sort_key]', $dd_order, $this->itemSettings['sort_key']);\r\n\t\t$form['sort_order'] = ipsRegistry::getClass('output')->formDropdown('item[sort_order]', $dd_by, $this->itemSettings['sort_order']);\r\n\t\t$form['sort_filter'] = ipsRegistry::getClass('output')->formDropdown('item[sort_filter]', $dd_filter, $this->itemSettings['sort_filter']);\r\n\t\t$form['market_reply'] = ipsRegistry::getClass('output')->formYesNo('item[market_reply]', $this->itemSettings['market_reply']);\r\n\t\t$form['market_topic'] = ipsRegistry::getClass('output')->formYesNo('item[market_topic]', $this->itemSettings['market_topic']);\r\n\t\t$form['market_reply_amount'] = marketFormatter::currencyFormat(ipsRegistry::getClass('output')->formSimpleInput('item[market_reply_amount]', $this->itemSettings['market_reply_amount'], 10));\r\n\t\t$form['market_topic_amount'] = marketFormatter::currencyFormat(ipsRegistry::getClass('output')->formSimpleInput('item[market_topic_amount]', $this->itemSettings['market_topic_amount'], 10));\r\n\t\t$form['edit_post'] = ipsRegistry::getClass('output')->formYesNo('item[edit_post]', $this->itemSettings['edit_post']);\r\n\t\t$form['edit_title'] = ipsRegistry::getClass('output')->formYesNo('item[edit_title]', $this->itemSettings['edit_title']);\r\n\t\t$form['delete_post'] = ipsRegistry::getClass('output')->formYesNo('item[delete_post]', $this->itemSettings['delete_post']);\r\n\t\t$form['delete_topic'] = ipsRegistry::getClass('output')->formYesNo('item[delete_topic]', $this->itemSettings['delete_topic']);\r\n\t\t$form['open_topic'] = ipsRegistry::getClass('output')->formYesNo('item[open_topic]', $this->itemSettings['open_topic']);\r\n\t\t$form['close_topic'] = ipsRegistry::getClass('output')->formYesNo('item[close_topic]', $this->itemSettings['close_topic']);\r\n\t\t$form['pin_topic'] = ipsRegistry::getClass('output')->formYesNo('item[pin_topic]', $this->itemSettings['pin_topic']);\r\n\t\t$form['unpin_topic'] = ipsRegistry::getClass('output')->formYesNo('item[unpin_topic]', $this->itemSettings['unpin_topic']);\r\n\t\t$form['split_merge'] = ipsRegistry::getClass('output')->formYesNo('item[split_merge]', $this->itemSettings['split_merge']);\r\n\t\t$form['mod_can_set_open_time'] = ipsRegistry::getClass('output')->formYesNo('item[mod_can_set_open_time]', $this->itemSettings['mod_can_set_open_time']);\r\n\t\t$form['mod_can_set_close_time'] = ipsRegistry::getClass('output')->formYesNo('item[mod_can_set_close_time]', $this->itemSettings['mod_can_set_close_time']);\r\n\t\t$form['show_forum'] = ipsRegistry::getClass('output')->formMultiDropdown('item[show_forum][]', $perm_masks, $this->itemSettings['show_forum']);\r\n\t\t$form['read_topic'] = ipsRegistry::getClass('output')->formMultiDropdown('item[read_topic][]', $perm_masks, $this->itemSettings['read_topic']);\r\n\t\t$form['reply_topic'] = ipsRegistry::getClass('output')->formMultiDropdown('item[reply_topic][]', $perm_masks, $this->itemSettings['reply_topic']);\r\n\t\t$form['start_topic'] = ipsRegistry::getClass('output')->formMultiDropdown('item[start_topic][]', $perm_masks, $this->itemSettings['start_topic']);\r\n\t\t$form['upload'] = ipsRegistry::getClass('output')->formMultiDropdown('item[upload][]', $perm_masks, $this->itemSettings['upload']);\r\n\t\t$form['download'] = ipsRegistry::getClass('output')->formMultiDropdown('item[download][]', $perm_masks, $this->itemSettings['download']);\r\n\t\t$form['move_deleted'] = ipsRegistry::getClass('output')->formDropdown('item[move_deleted]', $deleteForum, $this->itemSettings['move_deleted']);\r\n\t\treturn <<<EOF\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>\r\n\t\t\t\t\t\t{$this->lang->words['how_long_create_forum']}\r\n\t\t\t\t\t\t<span class=\"desctext\">{$this->lang->words['how_long_create_forum_desc']}</span>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t<div style='display: inline-block'>\r\n\t\t\t\t\t\t{$form['lasting']}\r\n\t\t\t\t\t\t{$form['time_unit']}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['create_forum_parent']}</label>\r\n\t\t\t\t\t{$form['parent_forum']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['create_forum_password']}</label>\r\n\t\t\t\t\t{$form['most_items']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>\r\n\t\t\t\t\t\t{$this->lang->words['frm_f_post_html']}\r\n\t\t\t\t\t\t<span class=\"desctext\">{$this->lang->words['frm_f_post_html_info']}</span>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t{$form['allow_html']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_f_post_bb']}</label>\r\n\t\t\t\t\t{$form['allow_bbcode']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_f_post_qreply']}</label>\r\n\t\t\t\t\t{$form['allow_quick_reply']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_f_post_poll']}</label>\r\n\t\t\t\t\t{$form['allow_polls']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>\r\n\t\t\t\t\t\t{$this->lang->words['frm_f_post_bump']}\r\n\t\t\t\t\t\t<span class=\"desctext\">{$this->lang->words['frm_f_post_bump_info']}</span>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t{$form['allow_poll_bump']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_f_post_rate']}</label>\r\n\t\t\t\t\t{$form['allow_rating']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>\r\n\t\t\t\t\t\t{$this->lang->words['frm_f_post_inc']}\r\n\t\t\t\t\t\t<span class=\"desctext\">{$this->lang->words['frm_f_post_inc_info']}</span>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t{$form['allow_post_inc']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>\r\n\t\t\t\t\t\t{$this->lang->words['frm_f_min_posts_post']}\r\n\t\t\t\t\t\t<span class=\"desctext\">{$this->lang->words['frm_f_min_posts_post_info']}</span>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t{$form['min_posts_post']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>\r\n\t\t\t\t\t\t{$this->lang->words['frm_f_min_posts_view']}\r\n\t\t\t\t\t\t<span class=\"desctext\">{$this->lang->words['frm_f_min_posts_view_info']}</span>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t{$form['min_posts_view']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_canviewothers']}</label>\r\n\t\t\t\t\t{$form['can_view_others']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_f_sort_cutoff']}</label>\r\n\t\t\t\t\t{$form['prune']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_f_sort_key']}</label>\r\n\t\t\t\t\t{$form['sort_key']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_f_sort_order']}</label>\r\n\t\t\t\t\t{$form['sort_order']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_f_sort_filter']}</label>\r\n\t\t\t\t\t{$form['sort_filter']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['forum_reply_overwrite']}</label>\r\n\t\t\t\t\t{$form['market_reply']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['forum_reply_amount']}</label>\r\n\t\t\t\t\t{$form['market_reply_amount']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['forum_topic_overwrite']}</label>\r\n\t\t\t\t\t{$form['market_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['forum_topic_amount']}</label>\r\n\t\t\t\t\t{$form['market_topic_amount']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_edit']}</label>\r\n\t\t\t\t\t{$form['edit_post']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_topic']}</label>\r\n\t\t\t\t\t{$form['edit_title']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_delete']}</label>\r\n\t\t\t\t\t{$form['delete_post']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_deletetop']}</label>\r\n\t\t\t\t\t{$form['delete_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_open']}</label>\r\n\t\t\t\t\t{$form['open_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_close']}</label>\r\n\t\t\t\t\t{$form['close_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_pin']}</label>\r\n\t\t\t\t\t{$form['pin_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_unpin']}</label>\r\n\t\t\t\t\t{$form['unpin_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_split']}</label>\r\n\t\t\t\t\t{$form['split_merge']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_opentime']}</label>\r\n\t\t\t\t\t{$form['mod_can_set_open_time']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['frm_m_closetime']}</label>\r\n\t\t\t\t\t{$form['mod_can_set_close_time']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['perm_forums_view']}</label>\r\n\t\t\t\t\t{$form['show_forum']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['perm_forums_read']}</label>\r\n\t\t\t\t\t{$form['read_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['perm_forums_reply']}</label>\r\n\t\t\t\t\t{$form['reply_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['perm_forums_start']}</label>\r\n\t\t\t\t\t{$form['start_topic']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['perm_forums_upload']}</label>\r\n\t\t\t\t\t{$form['upload']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['perm_forums_download']}</label>\r\n\t\t\t\t\t{$form['download']}\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['create_forum_move_deleted']}</label>\r\n\t\t\t\t\t{$form['move_deleted']}\r\n\t\t\t\t</li>\r\n\r\nEOF;\r\n\t}", "title": "" }, { "docid": "ba2b394e34ab7975ee961090b0a2e12c", "score": "0.5651915", "text": "function get_club_forums($id) {\n\t\t$conn = db_conn();\n\t\t$query = \"select id, name, description, type from forums where club_id = $id\";\n\t\t$result = $conn->query($query);\n\t\tif ( !$result ) {\n\t\t\t$conn->close();\n\t\t\tthrow new Exception(\"Could not retrieve forum info.\");\n\t\t} else {\n\t\t\t$conn->close();\n\t\t\tif ( $result->num_rows == 0 )\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn $result;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "6e20a458eb0a20a80f6f2af0985a283c", "score": "0.5645506", "text": "function extendedforum_get_readable_extendedforums($userid, $courseid=0) {\n\n global $CFG, $USER;\n require_once($CFG->dirroot.'/course/lib.php');\n\n if (!$extendedforummod = get_record('modules', 'name', 'extendedforum')) {\n error('The extendedforum module is not installed');\n }\n\n if ($courseid) {\n $courses = get_records('course', 'id', $courseid);\n } else {\n // If no course is specified, then the user can see SITE + his courses.\n // And admins can see all courses, so pass the $doanything flag enabled\n $courses1 = get_records('course', 'id', SITEID);\n $courses2 = get_my_courses($userid, null, null, true);\n $courses = array_merge($courses1, $courses2);\n }\n if (!$courses) {\n return array();\n }\n\n $readableextendedforums = array();\n\n foreach ($courses as $course) {\n\n $modinfo =& get_fast_modinfo($course);\n if (is_null($modinfo->groups)) {\n $modinfo->groups = groups_get_user_groups($course->id, $userid);\n }\n\n if (empty($modinfo->instances['extendedforum'])) {\n // hmm, no extendedforums?\n continue;\n }\n\n $courseextendedforums = get_records('extendedforum', 'course', $course->id);\n\n foreach ($modinfo->instances['extendedforum'] as $extendedforumid => $cm) {\n if (!$cm->uservisible or !isset($courseextendedforums[$extendedforumid])) {\n continue;\n }\n $context = get_context_instance(CONTEXT_MODULE, $cm->id);\n $extendedforum = $courseextendedforums[$extendedforumid];\n\n if (!has_capability('mod/extendedforum:viewdiscussion', $context)) {\n continue;\n }\n\n /// group access\n if (groups_get_activity_groupmode($cm, $course) == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context)) {\n if (is_null($modinfo->groups)) {\n $modinfo->groups = groups_get_user_groups($course->id, $USER->id);\n }\n if (empty($CFG->enablegroupings)) {\n $extendedforum->onlygroups = $modinfo->groups[0];\n $extendedforum->onlygroups[] = -1;\n } else if (isset($modinfo->groups[$cm->groupingid])) {\n $extendedforum->onlygroups = $modinfo->groups[$cm->groupingid];\n $extendedforum->onlygroups[] = -1;\n } else {\n $extendedforum->onlygroups = array(-1);\n }\n }\n\n /// hidden timed discussions\n $extendedforum->viewhiddentimedposts = true;\n if (!empty($CFG->extendedforum_enabletimedposts)) {\n if (!has_capability('mod/extendedforum:viewhiddentimedposts', $context)) {\n $extendedforum->viewhiddentimedposts = false;\n }\n }\n\n /// qanda access\n if ($extendedforum->type == 'qanda'\n && !has_capability('mod/extendedforum:viewqandawithoutposting', $context)) {\n\n // We need to check whether the user has posted in the qanda extendedforum.\n $extendedforum->onlydiscussions = array(); // Holds discussion ids for the discussions\n // the user is allowed to see in this extendedforum.\n if ($discussionspostedin = extendedforum_discussions_user_has_posted_in($extendedforum->id, $USER->id)) {\n foreach ($discussionspostedin as $d) {\n $extendedforum->onlydiscussions[] = $d->id;\n }\n }\n }\n\n $readableextendedforums[$extendedforum->id] = $extendedforum;\n }\n\n unset($modinfo);\n\n } // End foreach $courses\n\n //print_object($courses);\n //print_object($readableextendedforums);\n\n return $readableextendedforums;\n}", "title": "" }, { "docid": "08fc915a9c13ef3c9a2ca5a777bca01c", "score": "0.5641376", "text": "public function get_forum_threads($options = array())\n {\n $defaults = array(\n 'forum_id' => NULL,\n 'order_by' => NULL,\n 'limit' => NULL\n );\n $options = array_merge($defaults, $options);\n\n $account = $this->auth->get_user_account();\n\n $values = array(\n ':score_window_date' => date('Y-m-d H:i:s', FORUM_SCORE_WINDOW_DATE),\n ':account_id' => ($account ? $account->id : NULL),\n ':entity_type' => 'forum_posts'\n );\n $sql = '\n SELECT t.*,\n lr.id latest_reply_id,\n lr.author_id latest_reply_author_id,\n lr.author_name latest_reply_author_name,\n lr.date_created latest_reply_date,\n lr.title latest_reply_title,\n a.id author_id,\n a.username author_name,\n a.avatar author_avatar,\n r.reply_count,\n s.score,\n ws.score window_score,\n v.score user_vote,\n ftv.date_viewed\n\n FROM forum_posts t\n LEFT JOIN (\n SELECT lr.id,\n lr.author_id,\n lr.title,\n a.username author_name,\n lr.date_created,\n lr.thread_id\n FROM forum_posts lr\n LEFT JOIN cms_accounts a ON lr.author_id = a.id\n ORDER BY lr.date_created DESC\n ) lr ON t.id = lr.thread_id\n\n LEFT JOIN (\n SELECT COUNT(r.id) reply_count,\n r.thread_id\n FROM forum_posts r\n GROUP BY r.thread_id\n ) r ON t.id = r.thread_id\n\n LEFT JOIN cms_accounts a ON t.author_id = a.id\n\n LEFT JOIN votes v ON v.entity_type = :entity_type AND v.entity_id = t.id AND v.account_id = :account_id\n\n LEFT JOIN forum_thread_views ftv ON ftv.thread_id = t.id AND ftv.account_id = :account_id\n\n LEFT JOIN (\n SELECT entity_id, \n SUM(score) AS score\n FROM votes\n WHERE entity_type = \\'forum_posts\\'\n GROUP BY entity_id\n ) s ON t.id = s.entity_id\n\n LEFT JOIN (\n SELECT entity_id, \n SUM(score) AS score\n FROM votes\n WHERE entity_type = :entity_type\n AND date_created >= :score_window_date\n GROUP BY entity_id\n ) ws ON t.id = ws.entity_id\n\n WHERE t.thread_id IS NULL\n ';\n\n if (is_array($options['forum_id']) && count($options['forum_id'] > 0))\n {\n foreach ($options['forum_id'] as $index => $id) { $options['forum_id'][$index] = (int)$id; }\n $sql .= ' AND t.forum_id IN (' . implode(',', $options['forum_id']) . ') ';\n\n } elseif (is_numeric($options['forum_id'])) {\n\n $sql .= ' AND t.forum_id = :id ';\n $values[':id'] = $options['forum_id'];\n }\n\n $sql .= \"\n GROUP BY t.id\n \";\n if (!empty($options['order_by']))\n {\n $sql .= ' ORDER BY ' . implode(' ', $options['order_by']);\n } else { \n $sql .= '\n ORDER BY t.sticky DESC, IF(lr.date_created IS NULL, t.date_created, lr.date_created) DESC\n ';\n }\n\n if (!empty($options['limit']))\n {\n $sql .= ' LIMIT 0, ' . $options['limit'] . ' ';\n }\n\n $results = $this->db->query_all($sql, $values);\n\n foreach ($results as $index => $result)\n {\n $results[$index]->latest_reply_date = strtotime($result->latest_reply_date);\n }\n\n return $results;\n }", "title": "" }, { "docid": "1648a41bcd529d89683a3f569b3d1313", "score": "0.5638566", "text": "function bbp_the_forum()\n{\n}", "title": "" }, { "docid": "6259a9a139770933e84c0decdb11226a", "score": "0.5619171", "text": "function bbp_forum_query_topic_ids($forum_id)\n{\n}", "title": "" }, { "docid": "d14c04a994da8ae46f5ceec40b82bc9d", "score": "0.56119853", "text": "function bbp_get_forum_group_ids($forum_id = 0)\n{\n}", "title": "" }, { "docid": "7ab20d0f92762665b556b6e5ba84ed20", "score": "0.5608764", "text": "function bbp_get_forum_caps()\n{\n}", "title": "" }, { "docid": "d937881c90b5d6f374160211c0174032", "score": "0.5607788", "text": "public function getForum() {\n\t\tif ($this->forum == NULL) {\n\t\t\treturn $this->objectManager->get('Tx_MmForum_Domain_Model_Forum_RootForum');\n\t\t}\n\t\treturn $this->forum;\n\t}", "title": "" }, { "docid": "c730ac8f125bd2bd04af62da1cf96bf6", "score": "0.5607622", "text": "function bbp_get_form_forum_moderators()\n{\n}", "title": "" }, { "docid": "79520e74ccedf94b7d107aa28f55f60a", "score": "0.5606684", "text": "function plugin_getadminoption_forum()\n{\n global $_TABLES, $_CONF, $LANG_GF00;\n\n if (SEC_hasRights('forum.edit')) {\n $numtopics = DB_getITEM($_TABLES['gf_topic'],\"count(*)\");\n return array($LANG_GF00['pluginlabel'], $_CONF['site_admin_url'] . '/plugins/forum/index.php', $numtopics);\n }\n\n}", "title": "" }, { "docid": "199f115b36634fecffce39e04473fd5b", "score": "0.5595058", "text": "private function generate_forumtree($forums) {\n\n\t\t\tif (is_array($forums) && count($forums) >= 1) {\n\n\t\t\t\tforeach ($forums as $key => $forum) {\n\n\t\t\t\t\tif ($forum->post_status === 'publish') {\n\n\t\t\t\t\t\t$topic = get_posts(array('post_type' => 'topic', 'post_parent' => $forum->ID, 'post_status' => 'publish', 'orderby' => 'date', 'numberposts' => 1));\n\n\t\t\t\t\t\tif (! empty($topic)) {\n\n\t\t\t\t\t\t\t$url = get_permalink($forum->ID);\n\t\t\t\t\t\t\t$changefreq = $this->get_page_changefreq($forum->ID, 'forum');\n\t\t\t\t\t\t\t$level = $forum->post_parent != 0 ? 1 : 0;\n\t\t\t\t\t\t\t$priority = $this->get_priority(0, $level, 'forum');\n\t\t\t\t\t\t\t$comments = 0;\n\n\t\t\t\t\t\t\t$this->update_tree($forum->ID, $topic[0]->post_modified, $url, $comments, 'forum', $level, $changefreq, $priority, 0);\n\n\t\t\t\t\t\t\t$this->update_forums($forum->ID);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Adding the forum topics to the sitemap tree\n\n\t\t\t\tif (is_array($this->forums) && count($this->forums) >= 1) {\n\n\t\t\t\t\tforeach ($this->forums as $key => $id) {\n\n\t\t\t\t\t\t$topics = get_posts(array('post_type' => 'topic', 'post_parent' => $id, 'post_status' => 'publish', 'orderby' => 'date', 'numberposts' => -1));\n\n\t\t\t\t\t\tif (!empty($topics)) {\n\n\t\t\t\t\t\t\tforeach ($topics as $key => $topic) {\n\n\t\t\t\t\t\t\t\t$url = get_permalink($topic->ID);\n\t\t\t\t\t\t\t\t$changefreq = $this->get_page_changefreq($topic->ID, 'forum topic');\n\t\t\t\t\t\t\t\t$priority = $this->get_priority(0, 0, 'forum topic');\n\t\t\t\t\t\t\t\t$comments = $topic->comment_count;\n\t\t\t\t\t\t\t\t$level = 0;\n\n\t\t\t\t\t\t\t\t$this->update_tree($topic->ID, $topic->post_modified, $url, $comments, 'forum topic', $level, $changefreq, $priority, 0);\n\n\t\t\t\t\t\t\t\t$tags = get_the_terms($topic->ID, bbp_get_topic_tag_tax_id());\n\t\t\t\t\t\t\t\tempty($tags) ? '' : $this->update_topic_tags($tags);\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// Adding the forum topic tags to the sitemap tree\n\n\t\t\t\tif (is_array($this->topics) && count($this->topics) >= 1) {\n\n\t\t\t\t\tforeach ($this->topics as $key => $id) {\n\n\t\t\t\t\t\t$term = get_term($id);\n\t\t\t\t\t\t$post = get_posts(array('post_type' => 'topic', 'topic-tag' => $term->name, 'orderby' => 'date', 'numberposts' => 1));\n\n\t\t\t\t\t\t$url = get_term_link($id);\n\t\t\t\t\t\t$changefreq = $this->get_page_changefreq($id, 'forum tag');\n\t\t\t\t\t\t$priority = $this->get_priority(0, 0, 'forum tag');\n\t\t\t\t\t\t$comments = 0;\n\t\t\t\t\t\t$level = 0;\n\n\t\t\t\t\t\t$this->update_tree($id, $post[0]->post_modified, $url, $comments, 'forum tag', $level, $changefreq, $priority, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3b31fee35b15de9f38e1aa821044c522", "score": "0.55928415", "text": "function bbp_get_stickies($forum_id = 0)\n{\n}", "title": "" }, { "docid": "e6a3a8b37202df93f0327c70998f5c16", "score": "0.55805206", "text": "public function forumPosts(): HasMany\n {\n return $this->hasMany(Post::class);\n }", "title": "" }, { "docid": "1f567ada066ec75b6b0851fd7c4353fd", "score": "0.557882", "text": "public static function getSubforums\n\t(\n\t\t$parentID\t\t// <int> The ID of the forum you're retrieving subforums from.\n\t)\t\t\t\t\t// RETURNS <int:[str:mixed]> an array of forums.\n\t\n\t// $subforums = AppForum::getSubforums($parentID);\n\t{\n\t\t$clearance = (isset(Me::$clearance) ? Me::$clearance : 0);\n\t\t\n\t\t$results = Database::selectMultiple(\"SELECT f.id, f.has_children, f.url_slug, f.title, f.description, f.posts, f.views, f.last_poster, f.date_lastPost, f.perm_read, f.perm_post, u.role, u.handle, u.display_name FROM forums f LEFT JOIN users u ON u.uni_id=f.last_poster WHERE f.category_id=? AND parent_id=? ORDER BY f.forum_order ASC\", array(0, $parentID));\n\t\t\n\t\t// Cycle through the list of forums, and remove any that you don't have permission to read\n\t\tforeach($results as $key => $val)\n\t\t{\n\t\t\tif((int) $val['perm_read'] > $clearance)\n\t\t\t{\n\t\t\t\tunset($results[$key]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "5dc21f3ff8123e36d2b59453a344acbe", "score": "0.5575615", "text": "public function index()\n {\n $forumPosts = Auth::user()->forumPosts;\n return view('forum.forum', compact('forumPosts'));\n }", "title": "" }, { "docid": "cfba16d9f36f1133ec9174c5537be8f7", "score": "0.55731994", "text": "public function findForIndex() {\n\t\treturn $this->findRootForums();\n\t}", "title": "" }, { "docid": "8746220f661a4ab8add35a04f030c694", "score": "0.55713475", "text": "function getPostsForTopic($topicId) {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM n2u_forum_post WHERE topic_id=? ORDER BY date_created DESC\");\n $stmt->bind_param(\"i\", $topicId);\n $stmt->execute();\n $result = $stmt->get_result();\n $forums = array();\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n array_push($forums, $row);\n }\n }\n $stmt->close();\n return $forums;\n }", "title": "" }, { "docid": "144de32c9a96ab338900f956a51b3c8b", "score": "0.5560679", "text": "function bbp_get_excluded_forum_ids()\n{\n}", "title": "" }, { "docid": "5c99ccb42bc671cee1779ec2888f724f", "score": "0.5553665", "text": "public static function getThreads\n\t(\n\t\t$forumID\t\t\t\t// <int> The ID of the forum you're retrieving threads from.\n\t,\t$page \t\t\t\t\t// <int> The page that you're viewing.\n\t,\t$show = 20\t\t\t\t// <int> The number of threads to show.\n\t,\t$stickyList = array()\t// <array> List of thread IDs that were stickied.\n\t)\t\t\t\t\t\t\t// RETURNS <int:[str:mixed]> an array of threads.\n\t\n\t// $threads = AppForum::getThreads($forumID, $page, $show = 20);\n\t{\n\t\t$startLimit = max(0, ($page - 1) * $show);\n\t\t\n\t\treturn Database::selectMultiple(\"SELECT t.id, t.forum_id, t.url_slug, t.title, t.posts, t.views, t.author_id, t.last_poster_id, t.date_last_post, t.perm_post, u.role, u.handle, u.display_name FROM threads t INNER JOIN users u ON u.uni_id=t.last_poster_id WHERE t.forum_id=? ORDER BY t.date_last_post DESC LIMIT \" . ($startLimit + 0) . ', ' . (max(1, $show) + 1), array($forumID));\n\t}", "title": "" }, { "docid": "278f96c83fb6692d1d8b861d1a51f8ec", "score": "0.5533391", "text": "function extendedforum_get_extendedforum_types() {\n return array ('general' => get_string('generalextendedforum', 'extendedforum'),\n 'eachuser' => get_string('eachuserextendedforum', 'extendedforum'),\n 'single' => get_string('singleextendedforum', 'extendedforum'),\n 'qanda' => get_string('qandaextendedforum', 'extendedforum'));\n}", "title": "" }, { "docid": "f5f88ec8819cbadb7f7d49ee18e579c6", "score": "0.5530637", "text": "function fetch_forum_info($forum_id, $db) {\n $sql = \"SELECT * FROM phpbb_forums WHERE forum_id=$forum_id LIMIT 1\";\n return $db->query($sql)->fetch();\n }", "title": "" }, { "docid": "efa7e98b64a260b8277e5f224efbe9f2", "score": "0.5530144", "text": "function bbp_get_single_forum_template()\n{\n}", "title": "" }, { "docid": "a01fe7c9fd496807167227892b1f9b78", "score": "0.55279803", "text": "function bbp_form_topic_forum()\n{\n}", "title": "" }, { "docid": "8e10005e6fbd5574577f9acf9bd3cabe", "score": "0.55194616", "text": "public function nameList() {\n self::$db->prepared_query(\"\n SELECT ID, Name FROM forums ORDER BY Sort\n \");\n return self::$db->to_array();\n }", "title": "" } ]
0ddf072138ec50299aecc88efb2e2a8d
Check if user with specified email or nick exists
[ { "docid": "4ef6f91e5b029a885500a46f1160d819", "score": "0.0", "text": "public function is_registered($idstr)\n {\n return $this->ci->users->is_registered($idstr);\n }", "title": "" } ]
[ { "docid": "ccadb85881909f322d9d40be92d0e92d", "score": "0.74688953", "text": "private function checkIsUserExists($nickname, $email) {\n\t\tif(sizeof($this->getUserByName($nickname)) == 0 && sizeof($this->getUserByEmail($email)) == 0)\n\t\t\treturn 1;\n\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "52455f4c8570ca0808b2b17696aefffd", "score": "0.7363161", "text": "function user_exists($email, $scrname, $con) {\r\n\t$exists = false;\r\n\t\t\r\n\tif (email_exists($email, $con)) {\r\n\t\t$exists = true;\r\n\t}\r\n\t\r\n\tif (scrname_exists($scrname, $con)) {\r\n\t\t$exists = true;\r\n\t}\r\n\t\r\n\treturn $exists;\r\n}", "title": "" }, { "docid": "4e4aaa5070a15ef538d7c40f6a3ad520", "score": "0.73542494", "text": "function checkExistUser() {\n\t\tglobal $db;\n\t\t$email = FSInput::get ( 'email' );\n\t\t$username = FSInput::get ( 'username' );\n\t\n\t}", "title": "" }, { "docid": "be3991240f6c70876eb0d70ea7161557", "score": "0.7333759", "text": "function has_email($nick){\n\n $query = $this->db->where(array('NICKNAME' => $nick))->get('users');\n if ($query->num_rows > 0){\n $row = $query->row();\n return $row->EMAIL;\n }\n else\n return '';\n }", "title": "" }, { "docid": "1397919b6915d9a0b06a2eaa0d2f30ad", "score": "0.7312738", "text": "public function userExists($identification){\n if($this->config['features']['email_login'] === true){\n $query = \"SELECT COUNT(1) FROM \". $this->config['db']['table'] .\" WHERE \". $this->config[\"db\"][\"columns\"][\"username\"] .\"=:login OR \". $this->config[\"db\"][\"columns\"][\"email\"] .\"=:login\";\n }else{\n $query = \"SELECT COUNT(1) FROM \". $this->config['db']['table'] .\" WHERE \". $this->config[\"db\"][\"columns\"][\"username\"] .\"=:login\";\n }\n $sql = $this->dbh->prepare($query);\n $sql->execute(array(\n \":login\" => $identification\n ));\n return $sql->fetchColumn() == \"0\" ? false : true;\n }", "title": "" }, { "docid": "9dcb534f254905931e2fffbd00167206", "score": "0.72790027", "text": "function user_exists($email)\n{\n\tglobal $conn;\n\t$stmt = $conn->prepare('SELECT email FROM tbl_users WHERE email = :email');\n\t$stmt->bindValue(':email', $email);\n\treturn execute_exists($stmt);\n}", "title": "" }, { "docid": "06602487ff13518b73c15b62a54e0f33", "score": "0.72346884", "text": "public function checkUserEmailExistence($email);", "title": "" }, { "docid": "d640e82d3842c85abd5701d16d17a6c3", "score": "0.7213519", "text": "protected function CheckIfUserExist($nick){\n $CountUser = Users::where('nick',$nick)->count();\n if($CountUser > 0){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "f84ac292a902039fcd1b587bd596a3fd", "score": "0.7167683", "text": "private function userExists ()\n\t{\n\t\t$Statement = $this->Database->prepare(\"SELECT id FROM users WHERE email = ?\");\n\t\t$Statement->execute(array($this->email));\n\t\t$rowCount = $Statement->rowCount();\n\t\t\n\t\treturn ($rowCount == 0) ? false : true;\n\t}", "title": "" }, { "docid": "4257b1cc36cc7ee026d0717d5cadc43a", "score": "0.715148", "text": "private function isUserExist($username, $email) {\n\t\t $stmt = $this->con->prepare(\" SELECT id FROM user WHERE username = ? OR\n\t\t\t email = ?\");\n\t\t $stmt->bind_param(\"ss\", $username, $email);\n\t\t $stmt->execute();\n\t\t $stmt->store_result();\n\t\t return $stmt->num_rows > 0; //this values\n\n\t }", "title": "" }, { "docid": "e65bcf49df95ed8bfbaa634ca93ca2e0", "score": "0.713368", "text": "function check_user($userEmail, $db)\n{\n $user_check_query = \"SELECT * FROM users WHERE email='$userEmail' LIMIT 1\";\n $result = mysqli_query($db, $user_check_query);\n $user = mysqli_fetch_assoc($result);\n\n if ($user) { // if user exists\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "9aaf1ec97d4fdc429bf06c12e5dfac82", "score": "0.7121578", "text": "public function checkCredentials($username, $email){\n $db = $this->_getGateway();\n $query = $db->query(\"SELECT * FROM users WHERE `username`='$username' OR `email`='$email'\");\n if($query->num_rows() == 0){\n //Username and email dont exist\n return true;\n }else{\n //Username or email already exist\n return false;\n }\n }", "title": "" }, { "docid": "8672b7f97f35e794642d8b25e822f470", "score": "0.71161205", "text": "public function isUserExisted($email) {\r\r\n $result = mysql_query(\"SELECT client_id from oauth_clients WHERE client_id = '$email'\");\r\r\n $no_of_rows = mysql_num_rows($result);\r\r\n if ($no_of_rows > 0) {\r\r\n // user existed\r\r\n return true;\r\r\n } else {\r\r\n // user not existed\r\r\n return false;\r\r\n }\r\r\n }", "title": "" }, { "docid": "e6b5fa69ab96f30090f3034d4fe15159", "score": "0.7108438", "text": "private function checkAccountExist($email, $nickname)\n {\n return (User::where('email', $email)->orWhere('nickname', $nickname)->count() > 0) ? true : false;\n }", "title": "" }, { "docid": "30f61a873b5ce4a38460e470667def0c", "score": "0.7103544", "text": "function exists($params) {\n $exists = USER::exists($_POST['email']);\n if($exists)\n print '1';\n else \n print '0';\n die();\n }", "title": "" }, { "docid": "f84de7ce1a7907376a1efeb878490590", "score": "0.70937616", "text": "public function doesUserExist($user);", "title": "" }, { "docid": "1e4936d395b0f5a89fa05c4cc98d035c", "score": "0.7087061", "text": "private function isUserExists($email) {\r\n $stmt = $this->conn->prepare(\"SELECT * from users WHERE username = ?\");\r\n $stmt->bind_param(\"s\",$email);\r\n $stmt->execute();\r\n $stmt->store_result();\r\n $num_rows = $stmt->num_rows;\r\n $stmt->close();\r\n return $num_rows > 0;\r\n }", "title": "" }, { "docid": "496ce6492cbfa2c7b8ee0ab3677d8c07", "score": "0.7082653", "text": "public function isUserExisted($email) {\n $result = mysql_query(\"SELECT mail from personne WHERE mail = '$email'\");\n $no_of_rows = mysql_num_rows($result);\n if ($no_of_rows > 0) {\n // user existed \n return true;\n } else {\n // user not existed\n return false;\n }\n }", "title": "" }, { "docid": "32bdb1ccfa6e7e0d3fe585610cfd4d9a", "score": "0.70419097", "text": "public function doesUserExist($username);", "title": "" }, { "docid": "9781ea103fd78004dc4425cb79a8c131", "score": "0.7036305", "text": "public function findUserByEmail($username){\n $this->db->query('SELECT * FROM server_user WHERE username = :username');\n // Bind value\n $this->db->bind(':username', $username);\n\n $row = $this->db->single();\n\n // Check row\n if($this->db->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "28376ce266bc0175f914aec697bff489", "score": "0.7018062", "text": "function userEmailExists($email) {\n global $db;\n $q = \"SELECT `user_email` FROM `users` WHERE `user_email`=:email\";\n $s = $db->prepare($q);\n $s->execute(['email'=>$email]);\n if($s->rowCount() > 0){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "99532204face51b54dfa7f9f13bd194c", "score": "0.6973435", "text": "function is_user_exist()\n\t{\n\t\t$query = $GLOBALS['connection']->query(\"SELECT * FROM users WHERE email='\". $GLOBALS['email'] .\"' AND password='\". md5($GLOBALS['password']) .\"'\");\n\t\n\t\treturn $query->fetch_assoc();\n\t}", "title": "" }, { "docid": "4e69d8179bd4b6bc428ba6d3e376b5a0", "score": "0.6950385", "text": "public function isUserExisted($email) {\n\t $stmt = $this->conn->prepare(\"SELECT email from usuarios WHERE email = ?\");\n\t\n\t $stmt->bind_param(\"s\", $email);\n\t\n\t $stmt->execute();\n\t\n\t $stmt->store_result();\n\t\n\t if ($stmt->num_rows > 0) {\n\t // user existed \n\t $stmt->close();\n\t return true;\n\t } else {\n\t // user not existed\n\t $stmt->close();\n\t return false;\n\t }\n\t }", "title": "" }, { "docid": "59f763be2cf9787b0eca721ef716aebc", "score": "0.6943352", "text": "public function accountExist( $email ){\n\n $doesExist = false;\n\n $sql = 'SELECT name FROM users WHERE name=\"'.$email.'\"';\n\n $results = $this->generic_db->customQuery( 'users', $sql );\n\n if( count( $results ) > 0 )\n $doesExist = true;\n \n return $doesExist;\n }", "title": "" }, { "docid": "b80aef37384f2067f0e2cd2facfe50d8", "score": "0.6933271", "text": "public static function existeEmail(String $user){\n return false;\n}", "title": "" }, { "docid": "5b459b1a7de58bbc3e3eb487fa1760f2", "score": "0.69230384", "text": "function isUserExist($email)\n {\n $stmt = $this->con->prepare(\"SELECT id_user FROM user WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->store_result();\n return $stmt->num_rows > 0;\n }", "title": "" }, { "docid": "8f0bde12cfe82f877c9ce5f1a72adf0f", "score": "0.69146216", "text": "public function isUserExist($name, $email)\n {\n $query = $this->db->prepare(\"SELECT id FROM tbl_user WHERE email=:email OR name=:name\");\n $query->bindParam(\"email\", $email, PDO::PARAM_STR);\n $query->bindParam(\"name\", $name, PDO::PARAM_STR);\n $query->execute();\n\n return $query->rowCount() > 0;\n }", "title": "" }, { "docid": "28cd699c96510639cdd067c074fa44d0", "score": "0.69078743", "text": "private function checkUserExist($email)\n\t{\n\t\tif(!$email) return false;\n\t\t$this->hoverClient = $this->getHoverClient();\n\t\t$headers = ['headers'=>[\n\t\t\t'Authorization' => \"Bearer {$this->hoverClient->access_token}\",\n\t\t\t]\n\t\t];\n \t\t$data = [\n\t\t\t\"search\" =>\t$email,\n\t\t];\n \t\t$response = $this->sandboxRequestV2->request('GET', 'users'.'?'.http_build_query($data), $headers);\n\t\t$jsonResponse = json_decode($response->getBody(), 1);\n \t\treturn !empty($jsonResponse['results']);\n\t}", "title": "" }, { "docid": "f63ba95333dc9524aad03fa02a931cbc", "score": "0.69076604", "text": "public function userExists($uname, $email) {\n\n $param = array($uname, $email);\n $sql = \"SELECT * FROM \". $this->site->pdo->TP .\"users WHERE uname=? OR email=?\";\n $this->site->pdo->query($sql, $param, true);\n $rows = $this->site->pdo->numRows();\n if($rows > 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "730ffeb720be7837282adc253176dee6", "score": "0.6894591", "text": "public function userExists($email) {\r\n $query = 'SELECT 1 FROM usermanagement.users WHERE email=\\'' . pg_escape_string($email) . '\\'';\r\n $results = $this->dbDriver->fetch($this->dbDriver->query(($query)));\r\n return !empty($results);\r\n }", "title": "" }, { "docid": "aee644d36330c2786a6b05c73fa719b8", "score": "0.6889366", "text": "static function userexists($control) { \n // get all usernames \n $db_users = \\Nette\\Environment::getService('usersmanager');\n $users = $db_users->getUsers();\n \n $usernamesArray = array();\n foreach ($users as $user) {\n $usernamesArray[] = $user->username;\n }\n \n $text = $control->value;\n $text = trim($text);\n if ($text !== '') {\n if (in_array($text, $usernamesArray)) {\n return false;\n } else {\n return true;\n }\n } \n// return true;\n }", "title": "" }, { "docid": "9b7bc391ec66cbf78949e7562777efd5", "score": "0.6881007", "text": "public function isEmailExists($user_email)\n {\n return $this->userDao->checkUserEmail($user_email); \n }", "title": "" }, { "docid": "8edd752926c14d1b2b480d7657eb9522", "score": "0.6879985", "text": "public function isUserExisted($email) {\r\n $stmt = $this->conn->prepare(\"SELECT email from users WHERE email = ?\");\r\n \r\n $stmt->bind_param(\"s\", $email);\r\n \r\n $stmt->execute();\r\n \r\n $stmt->store_result();\r\n \r\n if ($stmt->num_rows > 0) {\r\n // user existed \r\n $stmt->close();\r\n return true;\r\n } else {\r\n // user not existed\r\n $stmt->close();\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "549162a2539d8cf35e06ea5e98887520", "score": "0.6875463", "text": "private function isUserExists($email) {\r\n $stmt = $this->conn->prepare(\"SELECT user_id from user WHERE user_email = ?\");\r\n $stmt->bind_param(\"s\", $email);\r\n $stmt->execute();\r\n $stmt->store_result();\r\n $num_rows = $stmt->num_rows;\r\n $stmt->close();\r\n return $num_rows > 0;\r\n }", "title": "" }, { "docid": "dbd50e2d57241d8e673a965c0a82f0ac", "score": "0.68700826", "text": "public function isUserExisted($email) {\n $sql = \"SELECT phone from users WHERE phone = ?\";\n $stmt = $db->prepareStatement($sql);\n $db->bindParameter($stmt,'s',$email);\n $db->executeStatement($stmt);\n $result = $db->getResult($stmt);\n $no_of_rows = mysqli_num_rows($result);\n if ($no_of_rows > 0) {\n // user existed \n return true;\n } else {\n // user not existed\n return false;\n }\n }", "title": "" }, { "docid": "1b2f22f4d4f053f6d23aaec131eccda1", "score": "0.6866625", "text": "function user_exists($user)\n{\n\tglobal $conn;\n\tif ((int)$user){\n\t\t$qry = $conn->prepare(\"SELECT COUNT(*) AS entries FROM `account`.`account` WHERE id = ?\");\n\t\t$ret = $qry->execute([$user]);\n\n\t\tif ($qry->fetchObject()->entries >= 1) {\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\t$qry = $conn->prepare(\"SELECT COUNT(*) AS entries FROM `account`.`account` WHERE login = ?\");\n\t\t$ret = $qry->execute([$user]);\n\n\t\tif ($qry->fetchObject()->entries >= 1) {\n\t\t\treturn true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "45b8e948a27d874aa74538ffc78472cd", "score": "0.68399143", "text": "private function isUserExists($email) {\r\n $stmt = $this->conn->prepare(\"SELECT userID from user WHERE email=?\");\r\n $stmt->bind_param(\"s\", $email);\r\n $stmt->execute();\r\n $stmt->store_result();\r\n $num_rows = $stmt->num_rows;\r\n $stmt->close();\r\n return $num_rows > 0;\r\n }", "title": "" }, { "docid": "288c2d197b3a2ff1a82d94b55dd1e357", "score": "0.68348825", "text": "public static function isUserExists($fields) {\n $field=filter_var($fields, FILTER_VALIDATE_EMAIL);\n $cond=\"\";\n if($field){\n $cond=\"email\";\n }else{\n $cond=\"id\";\n }\n //$UserExist=self::execQuery('SELECT id from users WHERE '.$cond.' =?', array($fields));\n $UserExist=self::execQuery('SELECT id from persons WHERE '.$cond.' =?', array($fields));\n if ($UserExist) {\n return $UserExist;\n }else{\n return NULL;\n }\n }", "title": "" }, { "docid": "f9a34e1121c6c8622cf1f5809e9a21b9", "score": "0.6828989", "text": "private function isUserExist($email){\n $stmt = $this->con->prepare(\"SELECT user_id FROM users WHERE email = ? ;\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute(); \n $stmt->store_result(); \n return $stmt->num_rows > 0; \n }", "title": "" }, { "docid": "25154ef841c728dbfe1fa26bfc1de75c", "score": "0.68281156", "text": "function check_if_user_exists($email) {\n $database = load_database_file();\n $users = array_filter($database, function ($user) use ($email) {\n return $user['email'] === $email;\n });\n\n return count($users) > 0;\n}", "title": "" }, { "docid": "6b5f4f07583daff57a1f7ded5725a4b1", "score": "0.6825475", "text": "public function isUserExisted($email) {\n $result = mysql_query(\"SELECT email from gcm_users WHERE email = '$email'\");\n $no_of_rows = mysql_num_rows($result);\n if ($no_of_rows > 0) {\n // user existed\n return true;\n } else {\n // user not existed\n return false;\n }\n }", "title": "" }, { "docid": "2c5d9a06894dc9211253555d763a85bb", "score": "0.68242335", "text": "private function isUserExists($email) {\r\n $stmt = $this->conn->prepare(\"SELECT id from map_user WHERE email = ?\");\r\n $stmt->bind_param(\"s\", $email);\r\n $stmt->execute();\r\n $stmt->store_result();\r\n $num_rows = $stmt->num_rows;\r\n $stmt->close();\r\n return $num_rows > 0;\r\n }", "title": "" }, { "docid": "ac94d55adda8246fa33a519cce62bbaa", "score": "0.6820674", "text": "function does_email_exist($dbhandler, $email){\n\n\t$stmt = $dbhandler->prepare(\"SELECT id FROM tbl_user WHERE username = :email\");\n\t$stmt->bindParam(\":email\",$email);\n\t$stmt->execute();\n\n\t$id = $stmt->fetchAll();\n\tif(!empty($id))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "4d8bc8dfd87c4538a8d91078df93e333", "score": "0.6813404", "text": "function emailExist ($email) {\n\t\t$email = addslashes ($email);\n\t\t$result = $this->genDB->query (\"SELECT username FROM \".TBL_USERS . \" WHERE email='$email'\");\n\t\tif ($this->genDB->num_rows ($result) != 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "dac3961022562cbf94497b421c9d0f55", "score": "0.6811854", "text": "function check_has_username($email)\n{\n\t//Declare the result of the return\n $result = null;\n\n //Treat the query syntax as a string, stored in the $sql variable\n $sql = \"SELECT * FROM `realuser` WHERE `email` = '{$email}';\";\n\n //Use the mysqli_query method to take the execution request (that is, the sql syntax),\n //and the result of the request will be stored in the $query variable.\n $query = mysqli_query($_SESSION['link'], $sql);\n\n //If the request is successful\n if ($query)\n {\n //Use the mysqli_num_rows method to determine the syntax of the execution,\n //the amount of data it has, and whether there is a data\n if (mysqli_num_rows($query) >= 1)\n {\n //If the amount obtained is greater than 0, it means that there is data.\n //The returned $result is true to mean the account has existed and cannot be added.\n $result = true;\n }\n\n //Release the memory of the database query\n mysqli_free_result($query);\n }\n else\n {\n echo \"{$sql} execution failed, error message:\" . mysqli_error($_SESSION['link']);\n }\n\n //Return the result\n return $result;\n}", "title": "" }, { "docid": "e1e52b6dfaef2c0d97e49c6e2032b4c4", "score": "0.6811088", "text": "static function exists($ident) {\n\n\t\trequire_once 'DBO.class.php';\n\n\t\t$db = DBO::getInstance();\n\t\t$ids = $db->prepare('SELECT count(*) nr\n\t\t\t\tFROM users \n\t\t\t\tWHERE email = :ident');\n\t\t$ids->execute(array(':ident' => $ident));\n\t\t\n\t\tif($ids->errorCode() != 0)\t{\n\t\t\t$error = $ids->errorInfo();\n\t\t\tthrow new Exception($error[2]);\n\t\t}\n\n\t\tif($id = $ids->fetch())\n\t\t\tif($id[nr] != 0)\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bb40296b6666df0fb29df2e1657778d5", "score": "0.6802634", "text": "function checkIfUsernameOrEmailExist($conn, $uname, $uemail){\n\t\tglobal $same_name_email_error;\n\t\ttry{\n\t\t\t$user_db_check = $conn->prepare(\"SELECT COUNT(*) FROM User WHERE `username` = '$uname' or `email` = '$uemail'\");\n\t\t\t$user_db_check->execute();\n\t\t\t$count = $user_db_check->fetchColumn();\n\t\t\tif($count >= 1){\n\t\t\t\t$same_name_email_error .= \"<br>Valitsemasi käyttäjätunnus tai sähköpostiosoite on jo käytössä.\";\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "fe2dab73aafcfc5db2b8e2657616aede", "score": "0.6801911", "text": "function checkuser($email)\r\n\t{\r\n\t\tif($this->dbm->getuserbyemail($email)==false)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "da589cb2fbc0d3c99288d90ff9814bca", "score": "0.67998177", "text": "private function isUserExists($email) {\n $stmt = $this->conn->prepare(\"SELECT user_id from users WHERE user_email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows > 0;\n }", "title": "" }, { "docid": "30c6b5356a1b06eb99555578c6d12bd9", "score": "0.679785", "text": "function chckusername($useremail, $userpass){\n $check = \"SELECT * FROM accounts WHERE email='$useremail'\";\n $check_q = runQuery($check); \n if (count($check_q) == 1) {\n chcklogin($useremail, $userpass);\n }\n else{\n echo \"<div id='loginmsg'>This email does not exist. Please try again or create an account.</div>\";\n }\n }", "title": "" }, { "docid": "f37dfc2ce1449d521da0c0bbc2b68ca5", "score": "0.67941314", "text": "public function isUserExisted($email) {\n $stmt = $this->conn->prepare(\"SELECT email from users WHERE email = ?\");\n \n $stmt->bind_param(\"s\", $email);\n \n $stmt->execute();\n \n $stmt->store_result();\n \n if ($stmt->num_rows > 0) {\n // user existed \n $stmt->close();\n return true;\n } else {\n // user not existed\n $stmt->close();\n return false;\n }\n\n }", "title": "" }, { "docid": "e200f97ba7f2860fc32870820c61357c", "score": "0.6793571", "text": "private function isUserExists($email) {\n $stmt = $this->conn->prepare(\"SELECT user_id from users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows > 0;\n }", "title": "" }, { "docid": "fc46899529e62e3cd65b2ed5e6f22da8", "score": "0.6790704", "text": "function userExists($email){\n //this function checks if a user exist by looking up the email address in the database user table\n global $link, $email;\n \t$query = \"SELECT email FROM users WHERE email = '\".$email.\"'\";\n \t\n \t$getEmail = mysqli_fetch_assoc(mysqli_query($link, $query));\n $dbEmail = $getEmail['email'];\n \tif($dbEmail) {\n \t return true;\n \t} else {\n \t return false;\n \t}; \n }", "title": "" }, { "docid": "603c9f3117ba62a5b1df44ddaf26176a", "score": "0.6788389", "text": "public function isUserExisted($email) {\n $stmt = $this->conn->prepare(\"SELECT email from users WHERE email = ?\");\n \n $stmt->bind_param(\"s\", $email);\n \n $stmt->execute();\n \n $stmt->store_result();\n \n if ($stmt->num_rows > 0) {\n // user existed \n $stmt->close();\n return true;\n } else {\n // user not existed\n $stmt->close();\n return false;\n }\n }", "title": "" }, { "docid": "8314834cee2c7de686ad4cd223b6c4fc", "score": "0.6787977", "text": "function check_same_email_exists_for_other_user($email, $user_id){\n\tglobal $conn;\n\t$sql = \"SELECT * FROM users WHERE email= ? AND user_id !=?\";\n\t\n\tif ($stmt_obj = mysqli_prepare($conn, $sql)) {\n\t\tmysqli_stmt_bind_param($stmt_obj, 'ss',$email, $user_id);\n\t\tmysqli_stmt_execute($stmt_obj);\n\n\t\t$result_obj = mysqli_stmt_get_result($stmt_obj);\n\n\t\tif (mysqli_num_rows($result_obj) > 0) { \n\t\t\treturn TRUE;\n\t\t} \n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\t\n } \n}", "title": "" }, { "docid": "30244ca5a4b5f0a1e7f85054ff242aa8", "score": "0.67856586", "text": "function email_exists($email, $activated=false){\n if ($activated) $and = \" AND activated = 1\";\n $sql = \"SELECT user_id FROM users WHERE email = '$email' $and\";\n $result = mysql_query($sql);\n if (mysql_num_rows($result) == 1) {\n return true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "d1c5d5086fa8abc7fa4cebfa196c3e00", "score": "0.67807955", "text": "function find_user_by_email_and_name($email,$name,$connection)\n {\n $salt_string=\"@!\";\n $name.=$salt_string;\n $email.=$salt_string;\n $query=\"SELECT email and name FROM user_details WHERE email='$email' and name='$name'\";\n $result=mysqli_query($connection,$query);\n if($result)\n {\n if(mysqli_num_rows($result)>=1)\n return true;\n else\n return false;\n\n }\n }", "title": "" }, { "docid": "3c2dd4b5d49fa3c2f3fcacafa3bd2779", "score": "0.67789406", "text": "function checkUser($email){\n $this->db->where(\"email\", \"$email\");\n if(!empty($this->db->getOne(\"users\"))){\n return 1;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "00cd2324e0abeb8b2bc71826025ab819", "score": "0.6778695", "text": "function is_email_exist($conn,$email){\n # Fetch user id from users table using email id\n $FETCH_USER_ID = \"SELECT id from users WHERE email='$email'\";\n $result = mysqli_query($conn,$FETCH_USER_ID);\n if(mysqli_num_rows($result)>0){\n $row = mysqli_fetch_assoc($result);\n return $row['id']; # returns the user id\n }\n return false; # if registration fails\n }", "title": "" }, { "docid": "99475616832c974ba14b5a6d5bfc3502", "score": "0.6775562", "text": "public function isUserExisted($email) {\n $result = mysqli_query($this->conn, \"SELECT email FROM users WHERE email='$email'\") or die(mysqli_error($this->conn));\n\t\tif (mysqli_num_rows($result) > 0) {\n \treturn true;\n\t\t} else {\n \t\t return false;\n\t }\n\n }", "title": "" }, { "docid": "c27f3ef1cd11c30051e2dfa1bec453b7", "score": "0.67737097", "text": "public function userExistsIdentifiedByEmail($email) {\r\n\t $this->dbConnectorAsterisk->where(\"email\", $email);\r\n\t $this->dbConnectorAsterisk->get(CRM_USERS_TABLE_NAME_ASTERISK);\r\n\t return ($this->dbConnectorAsterisk->getRowCount() > 0);\r\n }", "title": "" }, { "docid": "6a05eaa6b4a20d4e035110bf233f38f0", "score": "0.6767396", "text": "private function check_user() {\n $cond = NULL;\n if($this->type != 'add') {\n $cond = \"AND id != {$this->id}\";\n }\n $ch = $this->select(\"*\", \"admins\", \"WHERE username = ? {$cond}\");\n $ch->execute(array($this->user));\n $info = $ch->rowCount();\n if($info > 0) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4f58716324231e4a1db555ef94738942", "score": "0.67651296", "text": "protected function _userExist($email)\n {\n $req = Mysql::_getConnection()->prepare(\"SELECT * FROM users WHERE email = ?\");\n $req->execute(array($email));\n if ($req->rowCount() > 0) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a1f3def68f72154d2a9c2113ad38d7da", "score": "0.6765117", "text": "function userExists($dbName, $email){\n $db = connectToDB($dbName);\n\n // Create the query that looks for the user with the given email.\n $query = \"select * from users where email=\". $db->quote($email);\n\n $result = $db->query($query);\n\n // Verify things ran okay.\n if(!$result) dieWithError($db->errorInfo());\n\n // Count the number of rows returned: if no rows, then the user\n // doesn't exist, so return false. Otherwise, return the first (and what\n // should be the only) row.\n $result = $result->fetchAll();\n if(count($result) == 0)\n return false;\n else\n return $result[0];\n}", "title": "" }, { "docid": "e9dd23a90c46db14a4be2e9a619da4a7", "score": "0.6763067", "text": "public static function isExistUser($email)\r\n {\r\n $connection = CDatabase::Connect();\r\n $query = \"SELECT user_id from users where user_email = '\".$email.\"' limit 1;\"; \r\n $resultData = CDatabase::Query($connection, $query); \r\n if(pg_num_rows($resultData) === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n $result = pg_fetch_array($resultData);\r\n return $result[\"user_id\"];\r\n }\r\n }", "title": "" }, { "docid": "2849cd0796b0fc629207bc94c0cb1659", "score": "0.67594177", "text": "function exists_username()\n {\n if ($this->Hotel_model->isUserexist($this->input->post('email')))\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "b6a20459e1ff9671df4cb24a9dfad923", "score": "0.6757235", "text": "function email_exist($email)\n{\n\tglobal $connection;\n\t\n\t$query = mysqli_query($connection,\"SELECT * FROM user WHERE email = '$email'\");\n\t$row = mysqli_num_rows($query);\n\treturn ($row == 1)? true : false;\n}", "title": "" }, { "docid": "fa82ae404a4fbc58d907801684bda07c", "score": "0.6754825", "text": "function email_exists($conn, $email) {\n\t$email = sanitize($email);\n\n\t$query = $conn->query(\"SELECT COUNT(`user_id`) as `count` FROM `users` WHERE `email` = '$email'\");\n\t//$query = mysql_query(\"SELECT COUNT(`user_id`) FROM `users` WHERE `email` = '$email'\");\n\n\treturn ($query->fetch(PDO::FETCH_ASSOC)['count'] == 1) ? true : false;\n\t//return (mysql_result($query, 0) == 1) ? true : false;\n}", "title": "" }, { "docid": "19084ed68dbc5897e31edf7bd4c2e0fc", "score": "0.6752927", "text": "function user_exist_user($email){\n global $link;\n $query = \"SELECT * FROM user WHERE email='$email'\";\n $query_run = mysqli_query($link, $query);\n if(mysqli_num_rows($query_run) == 1){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "f4e2c1e672a4d272f176a90aa1970ac7", "score": "0.6748683", "text": "function usernameExists($username =''){\n\t\t$conn = Doctrine_Manager::connection();\n\t\t# validate unique username and email\n\t\t$id_check = \"\";\n\t\tif(!isEmptyString($this->getID())){\n\t\t\t$id_check = \" AND id <> '\".$this->getID().\"' \";\n\t\t}\n\t\n\t\tif(isEmptyString($username)){\n\t\t\t$username = $this->getUsername();\n\t\t}\n\t\t\n\t\t// list of reserved usernames\n\t\t$reservednames = getInvalidSubdomains();\n\t\t$reservednames = array_combine($reservednames, $reservednames);\n\t\tif(!isArrayKeyAnEmptyString($username, $reservednames)){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$query = \"SELECT id FROM company WHERE username = '\".$username.\"' AND status = '1' AND username <> '' \".$id_check;\n\t\t// debugMessage($query);\n\t\t$result = $conn->fetchOne($query);\n\t\t// debugMessage('>'.$result);\n\t\tif(isEmptyString($result)){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f9d682585b558d3dfa5a3e64458539c7", "score": "0.6742823", "text": "function user_exist($email){\n global $link;\n $query = \"SELECT * FROM login WHERE username='$email'\";\n $query_run = mysqli_query($link, $query);\n if(mysqli_num_rows($query_run) == 1){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "04fa0017216c8ad52bfb75fe0781958b", "score": "0.67395276", "text": "public function emailExists($email);", "title": "" }, { "docid": "04fa0017216c8ad52bfb75fe0781958b", "score": "0.67395276", "text": "public function emailExists($email);", "title": "" }, { "docid": "80af9df5b6676ff738b746e2c209e5b0", "score": "0.6734086", "text": "public function isUserExisted($email) {\n $stmt = $this->conn->prepare(\"SELECT email from user WHERE email = ?\");\n\n $stmt->bind_param(\"s\", $email);\n\n $stmt->execute();\n\n $stmt->store_result();\n\n if ($stmt->num_rows > 0) {\n // user existed \n $stmt->close();\n return true;\n } else {\n // user not existed\n $stmt->close();\n return false;\n }\n }", "title": "" }, { "docid": "f9635c2d02f9d5067b53e108562d9ef9", "score": "0.6728843", "text": "private function userIsMember() {\n\t$checkEmailSql = \"SELECT email FROM CITIZEN WHERE email = '$this->email'\";\n\t$checkEmailQuery = new Query($checkEmailSql, $this->db->getConnectionID());\n\n\tif($checkEmailQuery->error()) {\n\t header('HTTP/1.1 500 Sorry. Try Again!');\n\t die();\n\t}\n\n\t//check if email exists in records\n\tif($checkEmailQuery->numRows() > 0) {\n\t header('HTTP/1.1 500 Such email is already in our database.');\n\t die();\n\t}\n }", "title": "" }, { "docid": "c70e63aa1b999c9b27b8df586ca765b9", "score": "0.6711405", "text": "public function hasUser($email)\n {\n $sql = \" SELECT * FROM User \n WHERE email = :email \";\n \n \n /* Prepare and Execute SELECT statement for email verification */\n $stmt = $this->db->prepare($sql); \n $result = $stmt->execute(array( \n \"email\" => $email\n ));\n if ($result === false)\n {throw new Exception('UserDB->hasUser - Could not execute SELECT User query'); }\n \n /* should return 1 result or 0 due to SQL unique constraint */\n //NOTE: this is using fetch() not fetchAll() [no foreach needed]\n $account = $stmt->fetch();\n \n return ($account) ? $account : false; \n }", "title": "" }, { "docid": "50f9ceceb5176172f50982d5467e80b5", "score": "0.6707613", "text": "function nick_exist($nick, $id=-1){\n if ($id < 0)\n $query = $this->db->where(array('NICKNAME' => $nick))->get('users');\n else{\n $query = $this->db->where(array('NICKNAME' => $nick, 'ID !=' => $id))->get('users');\n }\n return ($query->num_rows > 0)?TRUE:FALSE;\n }", "title": "" }, { "docid": "9fecedd9e03fc16eba1f1fbfd0e793b8", "score": "0.67068964", "text": "public function usernameExists($username);", "title": "" }, { "docid": "f64cc83b687db286f9bbcc051bec08e6", "score": "0.670421", "text": "public function existuser($dni, $email) {\n try {\n $stm = $this->pdo->prepare(\"SELECT dni, email FROM usuarios WHERE (dni = ? || email = ?) \");\n\n\n $stm->execute(array($dni, $email));\n return $stm->fetchObject(\"Usuario\");\n } catch (Exception $e) {\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "c6da349867c22439174104e529610275", "score": "0.6702502", "text": "private function isUserExists($email) {\n $stmt = $this->conn->prepare(\"SELECT id from users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows > 0;\n }", "title": "" }, { "docid": "c6da349867c22439174104e529610275", "score": "0.6702502", "text": "private function isUserExists($email) {\n $stmt = $this->conn->prepare(\"SELECT id from users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows > 0;\n }", "title": "" }, { "docid": "c6da349867c22439174104e529610275", "score": "0.6702502", "text": "private function isUserExists($email) {\n $stmt = $this->conn->prepare(\"SELECT id from users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows > 0;\n }", "title": "" }, { "docid": "095e7b6410d99b117adb1b64fb309467", "score": "0.67000043", "text": "function user_exists($login) {\n global $mysqlMainDb;\n\n $username_check = mysql_query(\"SELECT username FROM `$mysqlMainDb`.user\n\tWHERE username='\".mysql_real_escape_string($login).\"'\");\n if (mysql_num_rows($username_check) > 0)\n return TRUE;\n else\n return FALSE;\n}", "title": "" }, { "docid": "16ab2ec543131399754f3644a05a840d", "score": "0.66984355", "text": "function check($username, $email){\n\t $query = $this->db->query(\"SELECT username, email from users where username = '\".$username.\"';\");\n\t if(count($query->result_array()) == 1){\n\t\t $_SESSION['username'] = $username;\n\t\t $_SESSION['authorized'] = 'yes';\n\t\t $_SESSION['email'] = $query->row(0)->email;\n\t\t return true;\n\t }else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b6b1ae2a3e7196c3785b540e02acb2aa", "score": "0.66976404", "text": "public function isUserExisted($email)\n {\n $mysql_qry = \"SELECT email from users WHERE email = '$email';\";\n $result = mysqli_query($this->conn, $mysql_qry);\n $no_of_rows = mysqli_num_rows($result);\n if (is_bool($no_of_rows) === true) {\n $no_of_rows = 0;\n }\n if ($no_of_rows > 0) {\n // user existed\n return true;\n } else {\n // user not existed\n return false;\n }\n }", "title": "" }, { "docid": "5593db89754052a1b627e4b235360770", "score": "0.66835123", "text": "public function chk_user_exists($username){\n\t\t$user_chk_qry = \"SELECT user_id FROM yourls_users WHERE email='\".$username.\"'\";\n\t\t$result = mysql_query($user_chk_qry);\n\t\tif(mysql_num_rows($result) ==0){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "d20c06a726bed794aa1c793b16386306", "score": "0.6680904", "text": "public function isUserExistedByUsername($username,$id=null) {\r\n $condition = \"\";\r\n \r\n if(isset($id)){\r\n $condition.=\" AND id!=\".$id.\"\";\r\n }\r\n \r\n\t\t$stmt = $this->conn->prepare(\"SELECT * from admins WHERE (username = '\".$username.\"' OR email='\".$username.\"') \".$condition.\" \");\r\n\r\n $stmt->execute();\r\n \r\n $stmt->store_result();\r\n \r\n if ($stmt->num_rows!=0) {\r\n // user existed \r\n $stmt->close();\r\n return 1;\r\n } else {\r\n // user not existed\r\n $stmt->close();\r\n return 0;\r\n }\r\n }", "title": "" }, { "docid": "24091edd41d65eb90fe20af213d87776", "score": "0.66770256", "text": "private function emailExists($email){\r\n\t\t$sql = $this->con->prepare(\"SELECT user_id FROM users WHERE email_id = ? \");\r\n\t\t$sql->bind_param(\"s\",$email);\r\n\t\t$sql->execute() or die($this->con->error);\r\n\t\t$result = $sql->get_result();\r\n\t\tif($result->num_rows > 0){\r\n\t\t\treturn 1;\r\n\t\t}else{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dcdf3101daf6aefd835bcd4cc727a594", "score": "0.66739446", "text": "function check_email_my_profile($handle, $mail, $us)\n{\n\t// efectuamos la consulta\n\t$result=$handle->query(\"SELECT user_name,email FROM users WHERE user_name='$us' AND email='$mail'\");\n\t// verificamos\n\tif($result->num_rows > 0){ // esto significa que el email no a cambiado no efectuamos la actualizacion\n\t$result->free();\t\t\n\treturn true;\t\n\t}\n\telse{\n\t// significa que el email ha cambiado verificamos si esta disponible\n\t $verify=$handle->query(\"SELECT email FROM users WHERE email='$mail'\");\n\t // verificamos\n\t\tif($verify->num_rows > 0){\n\t\t// significa que el email esta en uso\n\t $verify->free();\n\t\talready_email();\t\n\t\texit;\n\t\t}\n\t\telse{ // significa que el email esta libre procedemos a actualizar\n\t\t$handle->query(\"UPDATE users SET email='$mail' WHERE user_name='$us'\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "66ff610ff58280b5bb0687913bf34686", "score": "0.6673884", "text": "public function existUser($email) {\n $db = self::getDb();\n\n $query = (\"SELECT * FROM users WHERE email='$email'\");\n $data = $db->exec($query)->fetchAll();\n if (isset($data[0])) {\n //// echo 'existe';\n return $data[0];\n } else {\n // echo 'nao existe';\n return FALSE;\n }\n }", "title": "" }, { "docid": "f1af7c8a88306d5eb124c9b710912250", "score": "0.66723263", "text": "public function isUserExisted($email) {\n $stmt = $this->conn->prepare(\"SELECT email from users WHERE email = ?\");\n\n $stmt->bind_param(\"s\", $email);\n\n $stmt->execute();\n\n $stmt->store_result();\n\n if ($stmt->num_rows > 0) {\n // user existed\n $stmt->close();\n return true;\n } else {\n // user not existed\n $stmt->close();\n return false;\n }\n }", "title": "" }, { "docid": "f05218bb237ae933a3f6115134f29419", "score": "0.66657877", "text": "public static function isExistingMediaWikiUser( $email ) {\n\t\t$dbr = wfGetDB( DB_REPLICA );\n\n\t\t$result = $dbr->select( 'user',\n\t\t\t[ 'user_id' ],\n\t\t\t[ 'user_email' => $email ]\n\t\t);\n\n\t\t$result = $result->fetchObject();\n\n\t\treturn (bool)$result ? $result->user_id : false;\n\t}", "title": "" }, { "docid": "676e1fd5155cd0c9b48593ad8f499f60", "score": "0.6664558", "text": "public function isUserExisted($email) {\n\t\ttry {\n\t\t\t$sql = \"SELECT email from gcm_users WHERE email = '$email'\";\n\n\t\t\t$result = $this->db->query($sql);\n\n\t\t\t$no_of_rows = $result->fetchColumn();\n\t\tif ($no_of_rows > 0) {\n\n\t\t\t// user exists\n\n\t\t\treturn true;\n\n\t\t}\n\n else {\n\n\t\t\t// user doesn't exist\n\n\t\t\treturn false;\n\n\t }\n\n\t}\n\t\tcatch (PDOException $e) {\n\n\t\t\t$error = 'Error fetching user by email: ' . $e->getMessage();\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "5008241a5974c96afae8899a2f5e1230", "score": "0.6660299", "text": "function check_ifemail_exist_tbluser($email)\n\t{\n\t\t$q = $this->db->get_where('tbluser',array('e_mail'=>$email));\n\t\t\n\t\tif ($q->num_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "07cbe6c646843f81d7edc577280c0c83", "score": "0.6658155", "text": "function checkemail($email)\n{\n //Database object\n global $user_exists_error;\n $obj = new Database;\n //write sql\n $sqlemail = \"SELECT * from user where email = '$email'\";\n //execute querry\n $user = $obj->query($sqlemail);\n\n //if the return table is empty\n if ($user && empty($obj->fetch()))\n return true;\n //registernewuser();\n else {\n $user_exists_error = \"We already have a user with this email\";\n return false;\n }\n}", "title": "" }, { "docid": "d3e380484f38a25742b56ae171d803fb", "score": "0.6654743", "text": "public function findUserByEmail($email) {\r\n $sql = \"SELECT * FROM users WHERE email = '$email'\";\r\n $stmt = $this->db->query($sql);\r\n \r\n if ($this->db->rowCount() > 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "ac70fbb03102dd4654b99b6197b39c03", "score": "0.6648448", "text": "private function verifyExistsUserByLoginOrEmail($params)\n {\n $query = \"SELECT id FROM usuarios where login = '{$params[login]}' or email = '{$params[email]}' \";\n $resultQuery = $this->db->fetchOne($query, Phalcon\\Db::FETCH_ASSOC);\n\n if(isset($resultQuery['id']) && strlen($resultQuery['id']) > 0) {\n return (int) $resultQuery['id'];\n }\n\n return false;\n }", "title": "" }, { "docid": "ccae46506ad09eea1cf3a224ed66f7e7", "score": "0.66458404", "text": "function email_exists($user_email) {\n global $connection;\n \n $query = \"SELECT user_email FROM users WHERE user_email = '$user_email' \";\n $result = mysqli_query($connection, $query);\n confirm_post($result);\n \n if(mysqli_num_rows($result) > 0) {\n return true;\n }else {\n return false;\n }\n}", "title": "" }, { "docid": "5a488d59bb076abf593f8b07b08b57de", "score": "0.66408956", "text": "function emailExists($email)\n{\n $query = \"SELECT UserId FROM User WHERE EmailAddress = '\".$email.\"'\";\n $users = mysql_query($query)\n or die(mysql_error());\n $numRecords = mysql_num_rows($users);\n if ($numRecords > 0)\n return true;\n else\n return false;\n}", "title": "" }, { "docid": "0e0707a9bf05ab4ce4d719a4d20b824f", "score": "0.66403455", "text": "function EXISTE_USER($nick)\n\n{\n\n\n\ninclude(\"./config.php\"); // Incluimos la configuracion\n\n\n$array_nicks=OBTENER_NICKS();\n\n\n\n\n$total = TOTAL_ARRAY($array_nicks);\n\nfor($j=0;$j<$total;$j++){\n\n\tif($array_nicks[$j]==$nick){\n\t\treturn(true);\n\t\tdie;\n\t}\n\n\n}\n\nreturn(false);\ndie;\n\n\n\n}", "title": "" }, { "docid": "1abd562bda1a6ff5e5d5bcc7b695449a", "score": "0.6633111", "text": "public function findUser($email,$username)\n {\n\n $this->db->query('SELECT * FROM users WHERE email= :email OR username= :username');\n $this->db->bind(':email', $email);\n $this->db->bind(':username', $username);\n $row = $this->db->fetch();\n\n if ($this->db->rowCount() > 0) {\n return true;\n }\n return false;\n \n }", "title": "" } ]
97b79aa15b6c2527fdb6e72fceedc82b
Indexer where the release was grabbed
[ { "docid": "8cff70179b0d40c4c0bbf0f7b90b2e6e", "score": "0.69414234", "text": "public function getReleaseIndexer()\n {\n return $this->releaseIndexer;\n }", "title": "" } ]
[ { "docid": "b4081b994fe6ff7a7ec75012fb61ddf1", "score": "0.5891766", "text": "public function getIndexInfo() {\n\n }", "title": "" }, { "docid": "221ae9b5bf654552514011c668b6097a", "score": "0.5856528", "text": "public static function _index() {\n\t\treturn self::$_index;\n\t}", "title": "" }, { "docid": "6c5fb71484ff9974a14d42fff14cce92", "score": "0.57374066", "text": "public function getIndex() {\n \treturn $this->index;\n }", "title": "" }, { "docid": "1f7103f8f22ecc0169546697b3e06e5f", "score": "0.5691958", "text": "public static function _index()\n\t{\n\t\treturn self::$_index;\n\t}", "title": "" }, { "docid": "d6574c1b9b5fc580a9066216f432ec67", "score": "0.5644287", "text": "function &getIndexes(){\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.56350636", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.56350636", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.56346565", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.56346565", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.5633737", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.5633737", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.5633737", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.5633737", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.5633737", "text": "public function getIndex() {}", "title": "" }, { "docid": "133c9eee93d219314e7477d9f166177d", "score": "0.5632489", "text": "function getIndex() ;", "title": "" }, { "docid": "a15254a1e8dc552325ba20972297a0c6", "score": "0.5620095", "text": "private function getIndexedReleasesList(): array\n {\n $response = (new Client())->get(self::DOWNLOAD_UPDATE_API);\n $signature = $response->getHeader('X-Shopware-Signature');\n\n if ($this->openSSLVerifier->isSystemSupported()\n && !$this->openSSLVerifier->isValid($response->getBody(), $signature[0])\n ) {\n throw new \\RuntimeException('API signature verification failed');\n }\n\n $releases = \\json_decode($response->getBody(), true);\n if (empty($releases)) {\n throw new \\RuntimeException('Could not get releases list package');\n }\n\n $indexedReleases = [];\n foreach ($releases as $release) {\n $indexedReleases[$release['version']] = $release;\n }\n\n return $indexedReleases;\n }", "title": "" }, { "docid": "b698366ba5d29e90625b286249da5396", "score": "0.55269045", "text": "public function getIndex()\n\t{\n\t\treturn $this->hit['_index'];\n\t}", "title": "" }, { "docid": "b4d56f11899bc3a962ed6c6e1bbc10a1", "score": "0.5523588", "text": "public function getLogIndex()\n {\n return $this->log_index;\n }", "title": "" }, { "docid": "10b7d9e424c5a5f7a8ee4f77eef67d6b", "score": "0.5511927", "text": "public static function getIndex()\n {\n return static::$index;\n }", "title": "" }, { "docid": "cee8863620f2190624594b7c6c1cb3f7", "score": "0.54949504", "text": "public function index(): array;", "title": "" }, { "docid": "29a3a993e656cfd51149f845d96e8f5c", "score": "0.54876506", "text": "public function key() {\n return $this->index;\n }", "title": "" }, { "docid": "bb7f11780cc2116cc3bc75652f042946", "score": "0.5458216", "text": "public function takeIndex()\n\t\t{\n\t\t\t$this->csv->takeIndexCSV();\n\t\t\t$this->txt->takeIndexTXT();\n\t\t}", "title": "" }, { "docid": "d74e5334163f2ebe780aca7c8c31c5f1", "score": "0.54356086", "text": "public function key(){\n return $this->index;\n }", "title": "" }, { "docid": "463e1d9a0ffcd028bcc408ae3a7b0447", "score": "0.5432696", "text": "public function func_refindex() {}", "title": "" }, { "docid": "5e0d6e2fb81e0121e225258ed59b6e4e", "score": "0.5429312", "text": "public function getOSDoIndexProduct();", "title": "" }, { "docid": "a1fda0a4ef0b38ed4caf0d06416e79ad", "score": "0.5428249", "text": "public function indexes();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.5414699", "text": "public function getIndex();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.5414699", "text": "public function getIndex();", "title": "" }, { "docid": "eaad22b33ea35fb3dd8592e83355d360", "score": "0.53973305", "text": "public function getIndex() {\r\n\t\treturn $this->_index;\r\n\t}", "title": "" }, { "docid": "3e86b6141f5973cb22f05da5b6226004", "score": "0.53754836", "text": "public function getIndex() {\n\t\treturn $this->index;\n\t}", "title": "" }, { "docid": "3e86b6141f5973cb22f05da5b6226004", "score": "0.53754836", "text": "public function getIndex() {\n\t\treturn $this->index;\n\t}", "title": "" }, { "docid": "2909b2fd804a0a3d030187e1318d343c", "score": "0.535995", "text": "public function getDetails(){\n\t\treturn $this->indexField;\n\t}", "title": "" }, { "docid": "2770a91bdf0825b9275c29c6ac2dc0a4", "score": "0.5354895", "text": "public function index() {\n if ($this->_m_index !== null)\n return $this->_m_index;\n $this->_m_index = ($this->isIndexSeparate() ? $this->indexSeparate() : $this->indexInTag());\n return $this->_m_index;\n }", "title": "" }, { "docid": "14f01b950ae686ec2efd5b334f020b80", "score": "0.5344637", "text": "public function getIndex() \n\t{\n\t\treturn $this->idLog;\n\t}", "title": "" }, { "docid": "75d4d909a5afefa0c0219479211e3509", "score": "0.5330026", "text": "public function key() {\n return $this->index;\n }", "title": "" }, { "docid": "8a408c57136fb057a6ae272709f0f40c", "score": "0.53177273", "text": "public function getIndex() {\n return $this->index;\n }", "title": "" }, { "docid": "1b8eb9f839de26dbc0da0e4ba080de58", "score": "0.531667", "text": "function getImageIndex() { return $this->_imageindex; }", "title": "" }, { "docid": "b7802f74e123f7ce2acead6ddada0a65", "score": "0.5312054", "text": "public function key()\n {\n return $this->index;\n }", "title": "" }, { "docid": "b7802f74e123f7ce2acead6ddada0a65", "score": "0.5312054", "text": "public function key()\n {\n return $this->index;\n }", "title": "" }, { "docid": "2a1ad80e2c36939f1ce69e42ac5fbd0c", "score": "0.53075755", "text": "public function getIndex() {\r\n\t\t\treturn $this->index;\r\n\t\t}", "title": "" }, { "docid": "48624d3149cc4ac0fbf6ba8857f47495", "score": "0.52804065", "text": "public function getIndex()\n {\n return $this->index;\n }", "title": "" }, { "docid": "48624d3149cc4ac0fbf6ba8857f47495", "score": "0.52804065", "text": "public function getIndex()\n {\n return $this->index;\n }", "title": "" }, { "docid": "48624d3149cc4ac0fbf6ba8857f47495", "score": "0.52804065", "text": "public function getIndex()\n {\n return $this->index;\n }", "title": "" }, { "docid": "48624d3149cc4ac0fbf6ba8857f47495", "score": "0.52804065", "text": "public function getIndex()\n {\n return $this->index;\n }", "title": "" }, { "docid": "48624d3149cc4ac0fbf6ba8857f47495", "score": "0.52804065", "text": "public function getIndex()\n {\n return $this->index;\n }", "title": "" }, { "docid": "48624d3149cc4ac0fbf6ba8857f47495", "score": "0.52804065", "text": "public function getIndex()\n {\n return $this->index;\n }", "title": "" }, { "docid": "48624d3149cc4ac0fbf6ba8857f47495", "score": "0.52804065", "text": "public function getIndex()\n {\n return $this->index;\n }", "title": "" }, { "docid": "6e6f0fd26ce8bb05f0810c3a47156f95", "score": "0.52320445", "text": "public function getIndexMeta()\n {\n return $this->index_meta;\n }", "title": "" }, { "docid": "e4fd060006eb2e7fbc0213c6cd376831", "score": "0.52296287", "text": "public function index()\n\t{\n\t\treturn $this->index;\n\t}", "title": "" }, { "docid": "ccb2f5ad2a614544c3d9487806c1e137", "score": "0.522673", "text": "public function key()\n {\n return key($this->revs);\n }", "title": "" }, { "docid": "adb1b61e6d0084459927401ecd9b8aac", "score": "0.5226329", "text": "public function getObjectsIndex()\n {\n return $this->objects;\n }", "title": "" }, { "docid": "b367c633b3e6bef69c725927eff6af77", "score": "0.52024585", "text": "abstract protected function getRepoReleaseInfo();", "title": "" }, { "docid": "da06a3754a16b20973ca8af99bf6b33c", "score": "0.5201765", "text": "function putIndex(){\n\n }", "title": "" }, { "docid": "db783c05d1de8a4b48969bf6d8f53a51", "score": "0.5201076", "text": "public function getIndex()\n {\n //\n }", "title": "" }, { "docid": "974765cb4bc700284087cd37fe0c71a4", "score": "0.52000433", "text": "abstract public function getIndexes();", "title": "" }, { "docid": "ab07755b1d8067b7466bc7c03a11c864", "score": "0.51712316", "text": "public function indexToSearchIndex();", "title": "" }, { "docid": "ce8e5a7607e6914f11bd69c5b0a796ec", "score": "0.5128736", "text": "protected function _getIndexer()\n {\n return Mage::getSingleton('algoliasearch/algolia');\n }", "title": "" }, { "docid": "cd33803b83a6933227caad967dabc379", "score": "0.512183", "text": "public function key()\n\t{\n\t\treturn $this->index;\n\t}", "title": "" }, { "docid": "cd33803b83a6933227caad967dabc379", "score": "0.512183", "text": "public function key()\n\t{\n\t\treturn $this->index;\n\t}", "title": "" }, { "docid": "bc52b814f03da00542467539549f4884", "score": "0.5117872", "text": "function getIndexes();", "title": "" }, { "docid": "1754f598798014c4d41e426cb84c8a05", "score": "0.5111409", "text": "public function getIndexerId()\n {\n return static::INDEXER_ID;\n }", "title": "" }, { "docid": "d4e405c574c4d5dd3ec5df85d03ffbe1", "score": "0.5109092", "text": "protected function getReferenceIndexStatus() {}", "title": "" }, { "docid": "987b758fd6712cf684c69b39995797e4", "score": "0.5101595", "text": "public function createIndexProvider()\n {\n return [\n [['foo' => 1]],\n [(object)['foo' => 1]]\n ];\n }", "title": "" }, { "docid": "8b7e9037d05447bd18dc777c50efd5f7", "score": "0.50994486", "text": "protected function getFileIndexRepository() {}", "title": "" }, { "docid": "8b7e9037d05447bd18dc777c50efd5f7", "score": "0.50994486", "text": "protected function getFileIndexRepository() {}", "title": "" }, { "docid": "8b7e9037d05447bd18dc777c50efd5f7", "score": "0.50994486", "text": "protected function getFileIndexRepository() {}", "title": "" }, { "docid": "8b7e9037d05447bd18dc777c50efd5f7", "score": "0.50994486", "text": "protected function getFileIndexRepository() {}", "title": "" }, { "docid": "8b7e9037d05447bd18dc777c50efd5f7", "score": "0.50994486", "text": "protected function getFileIndexRepository() {}", "title": "" }, { "docid": "4d951996a0e3996b3fa7a0d0755b7719", "score": "0.50687355", "text": "public function _INDEX()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "cae1666cfbb578c700defb0bfdaf23ec", "score": "0.50586027", "text": "function _loadIndex () \n {\n $this->_enterSection('_loadIndex');\n \n $index = array();\n \n $a = strcspn ($this->_options['dsn'], ':');\n $proto = substr ($this->_options['dsn'], 0, $a);\n $path = substr ($this->_options['dsn'], $a + 3);\n\n switch ($proto) {\n case 'file' : \n $f = sprintf($path, $this->_indexName);\n $data = '';\n if ($fp = @fopen ($f,'r')) {\n $this->_enterSection('_loadIndex (acquiring read lock)');\n flock($fp, LOCK_SH);\n $this->_leaveSection('_loadIndex (acquiring read lock)');\n $this->_enterSection('_loadIndex (reading data)');\n while (!feof($fp)) {\n $data .= fread ($fp, 0xFFFF);\n }\n fclose ($fp);\n $this->_leaveSection('_loadIndex (reading data)');\n }\n \n $this->_enterSection('_loadIndex (unserializing/uncompressing)');\n if ($data) {\n if ($this->_options['gz_level']) {\n $index = unserialize(gzuncompress($data));\n } else {\n $index = unserialize($data);\n }\n }\n $this->_leaveSection('_loadIndex (unserializing/uncompressing)');\n break;\n }\n $this->_index = $index;\n \n $this->_leaveSection('_loadIndex');\n }", "title": "" }, { "docid": "4809f8b23d3cfc8ad55b28951ca63c67", "score": "0.5040239", "text": "private function _index_tags() {\n $s = $nix = $ix = self::$_ar_;\n $ids = $this->ids;\n foreach($this->tags as $id => $n) {\n if(!isset($ix[$n])) $ix[$n] = array();\n $ix[$n][$id] = $ids[$id];\n }\n foreach($ix as $n => $v) {\n foreach($v as $id => $e) $this->tags[$id] = $n;\n if(isset($nix[$n])) continue;\n $_n = strtolower($n);\n if(!isset($nix[$_n])) $nix[$_n] = $v;\n else {\n foreach($v as $id => $e) $nix[$_n][$id] = $e;\n $s[] = $_n;\n }\n }\n foreach($s as $_n) asort($nix[$_n]);\n return $this->tag_idx = $nix;\n }", "title": "" }, { "docid": "f6bc4757d6a0854c09171b17d112effe", "score": "0.50377834", "text": "public function index() {\n\t\t$this->post_indexation->index();\n\t\t$this->term_indexation->index();\n\t\t$this->general_indexation->index();\n\t\t$this->post_type_archive_indexation->index();\n\t\t$this->post_link_indexing_action->index();\n\t\t$this->term_link_indexing_action->index();\n\t\t$this->complete_indexation_action->complete();\n\t}", "title": "" }, { "docid": "b1966337374c47ff8614dc3fa3af9740", "score": "0.5037707", "text": "public function toObjects() {\n // Since the index is stored as reference => object we don't need to do anything to it\n return $this->getIndex();\n }", "title": "" }, { "docid": "49f677d2c2dbc30479d2df323b27f183", "score": "0.50353605", "text": "public function getIndex()\n {\n \n }", "title": "" }, { "docid": "dcbfaf20e4911f9f88ef9eb2812a1c35", "score": "0.50275826", "text": "public function get_resource_index(){\n return $this->resource_index;\n }", "title": "" }, { "docid": "1f8bc94a5d9a1fb68a2ec7f58d58f861", "score": "0.50187016", "text": "public function getTableIndex()\n\t{\n\t\treturn $this->getModule()->baseIndex;\n\t}", "title": "" }, { "docid": "e89c9b6b8629187fc61068b7fcf01e0b", "score": "0.50186783", "text": "abstract protected function getIndexName();", "title": "" }, { "docid": "6f2c1d1788403a53f1e434a2c6990808", "score": "0.5011966", "text": "public function indexByPath() {\n $oCollection = $this->Get();\n $aIndex = array();\n \n foreach ($oCollection as $oItem) {\n $aIndex[$oItem->getPath()] = $oItem->getValue();\n }\n \n return $aIndex;\n }", "title": "" }, { "docid": "dbfe73359681f4a180c63bc6a59be8a3", "score": "0.50107074", "text": "public function getKeyIndex()\n\t{\n\t\treturn $this->keyIndex;\n\t}", "title": "" }, { "docid": "2509b059c1f781397311b3abca7a0563", "score": "0.50104564", "text": "public function getIndex()\n {\n return isset($this->index) ? $this->index : null;\n }", "title": "" }, { "docid": "f51a66cec56acc05763fffdef2737f7a", "score": "0.49809846", "text": "public function getIndexes()\n {\n\treturn $this->indexes;\n }", "title": "" }, { "docid": "168f84cbb9623de076af8e90d88ba503", "score": "0.49787468", "text": "public function getStageIndex()\n {\n return $this->get(self::_STAGE_INDEX);\n }", "title": "" }, { "docid": "a4410c79a5b96e25fd44c9b9feed384c", "score": "0.4972345", "text": "public function index() {\n\t\treturn array_keys($this->info->centralDirectory);\n\t}", "title": "" }, { "docid": "b84fd50ccae42d716ab5f472e377463c", "score": "0.4959866", "text": "public function getIndexes()\n {\n return [\n ['keys' => ['issueId' => 1, 'customerId' => 1, 'provider' => 1, 'entity' => 1], 'options' => ['unique' => true]],\n ];\n }", "title": "" }, { "docid": "659cff99719178b0478d661a3432fe43", "score": "0.49595538", "text": "function getIndex() {\n\t\tglobal $_zp_current_search, $_zp_current_album;\n\t\tif ($this->index == NULL) {\n\t\t\t$album = $this->getAlbum();\n\t\t\tif (!is_null($_zp_current_search) && !in_context(ZP_ALBUM_LINKED) || $album->isDynamic()) {\n\t\t\t\tif ($album->isDynamic()) {\n\t\t\t\t\t$images = $album->getImages();\n\t\t\t\t\tfor ($i=0; $i < count($images); $i++) {\n\t\t\t\t\t\t$image = $images[$i];\n\t\t\t\t\t\tif ($this->filename == $image['filename']) {\n\t\t\t\t\t\t\t$this->index = $i;\n\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} else {\n\t\t\t\t\t$this->index = $_zp_current_search->getImageIndex($this->album->name, $this->filename);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$images = $this->album->getImages(0);\n\t\t\t\tfor ($i=0; $i < count($images); $i++) {\n\t\t\t\t\t$image = $images[$i];\n\t\t\t\t\tif ($this->filename == $image) {\n\t\t\t\t\t\t$this->index = $i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->index;\n\t}", "title": "" }, { "docid": "9c17187e2b34ed32715e8195e92cd8c3", "score": "0.49459964", "text": "public function getIndex()\n {\n $arrIndex = array(); \n \n $arrIndex['Damage'] = $this->Damage;\n $arrIndex['Defence'] = $this->Defence;\n $arrIndex['Critical'] = $this->Critical;\n $arrIndex['Vitality'] = $this->Vitality;\n\n return $arrIndex;\n }", "title": "" }, { "docid": "783edb252d23e2e53d4e5deb7364e52e", "score": "0.4942673", "text": "public function key()\n\t{\n\t\treturn $this->_index;\n\t}", "title": "" }, { "docid": "26f60e9bb128c89c706294a96e998f78", "score": "0.49409357", "text": "public function getNewIndex()\n {\n return $this->new_index;\n }", "title": "" }, { "docid": "1b2eed4ce06ac37db6a27decccabd446", "score": "0.4939961", "text": "public function defineIndexes()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "58308c15d34a4aed740f10b9f2939cf6", "score": "0.4920324", "text": "public function getIdx()\n {\n return $this->get(self::_IDX);\n }", "title": "" }, { "docid": "da41981b923845fe69fbbebf67d5f526", "score": "0.49044573", "text": "public function getRelease() {}", "title": "" }, { "docid": "7650dc726236725d25e7eba4e0e4a54e", "score": "0.48997235", "text": "public function getIndexesToAdd() {\n return $this->indexToAdd;\n }", "title": "" }, { "docid": "9a9403b6ef325c6ead684de4bc9becf1", "score": "0.48926815", "text": "public function getIndexs(){\n\t\tif($this->fields){\n\t\t\t$primaryKey = null;\n\t\t\tforeach($this->fields as $field){\n\t\t\t\tif($field->getIndex() != null){\n\t\t\t\t\tif($field->getIndex()->getType() == 'primary'){\n\t\t\t\t\t\t$primaryKey = $field->getIndex();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tarray_unshift($this->indexs,$field->getIndex());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($primaryKey != null){\n\t\t\t\tarray_unshift($this->indexs,$primaryKey);\n\t\t\t}\n\t\t}\n\t\treturn $this->indexs;\n\t}", "title": "" }, { "docid": "808a28582e299e32ba5dec995f7d6098", "score": "0.48891902", "text": "function indexFields()\n\t{\n\t\tif (empty($this->name)) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$set = array();\n\t\t// Field is not tokenized nor indexed, but is stored in the index.\n\n\t\t// Field is not tokenized, but is indexed and stored within the index\n\t\t$set[] = Zend_Search_Lucene_Field::Keyword('link','/' . strtolower(get_class($this)) . '/view/' . $this->id);\n\t\t$set[] = Zend_Search_Lucene_Field::Keyword('name',$this->name);\n\t\t// $set[] = Zend_Search_Lucene_Field::Keyword('title',$this->name);\n\n\t\t// Field is tokenized and indexed, but is not stored in the index.\n\t\t$content = null;\n\t\tforeach ($this->_properties as $p) {\n\t\t\t$x = substr($p,-2);\n\t\t\tif ( ($x=='id') || ($x=='ts') ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$content.= $this->$p . ' ';\n\t\t}\n\t\t$set[] = Zend_Search_Lucene_Field::UnStored('text',trim($content));\n\t\treturn $set;\n\t}", "title": "" }, { "docid": "c2f97811940174887da2425332b0d718", "score": "0.48883882", "text": "public function getHeavyIndexing()\n {\n return $this->heavyIndexing;\n }", "title": "" }, { "docid": "d07b9623f8d3ef8b013f3846f5d9e6cd", "score": "0.4886528", "text": "public function isIndexed() {}", "title": "" }, { "docid": "d07b9623f8d3ef8b013f3846f5d9e6cd", "score": "0.48841876", "text": "public function isIndexed() {}", "title": "" }, { "docid": "d07b9623f8d3ef8b013f3846f5d9e6cd", "score": "0.4884185", "text": "public function isIndexed() {}", "title": "" }, { "docid": "853b38ac22cfde1580d76c4752fdf11a", "score": "0.48763484", "text": "public function getIndex() {\n return $this->index();\n }", "title": "" }, { "docid": "ea0c2891e2019b79b4c64f00e2f09387", "score": "0.4870989", "text": "public function getIndex()\n {\n return $this->get(self::_INDEX);\n }", "title": "" } ]
248c9f0c24bf1124a6b7d51f6a45dd24
URI POST Location for system login
[ { "docid": "9fd8f50dcd460841ab7db7cbc2d884e9", "score": "0.0", "text": "public function login()\n {\n $this->set( 'view', 'login' );\n\n return $this->show();\n }", "title": "" } ]
[ { "docid": "d0c2bf2d404c1d16346a0ebfc8b00773", "score": "0.6469401", "text": "public function login(){\r\n\t\t$returnTo = $this->input->get('returnTo');\r\n\t\t$re = !$returnTo ? site_url() . \"/page/overview\" : $returnTo;\r\n\r\n\t\t//SSO starts here\r\n\r\n\t\t$this->auth->login($re);\r\n\t}", "title": "" }, { "docid": "c84ad5d6165c35ed2f4065c0fdb329c7", "score": "0.64485496", "text": "public function gluu_sso_login_url()\n\t{\n $config = $this->config('gluu_sso.default');\n\t\t$openidurl=$config->get('openidurl');\n\t\t$oxd_port=$config->get('oxd_port');\n\t\t$user_acr=$config->get('user_acr');\n $oxd_id=$config->get('gluu_oxd_id');\n\t\t$scopes=$config->get('gluu_scopes');\n $gluu_config=$config->get(\"gluu_config\");\n $base_url=self::gluu_sso_getbaseurl();\n if($oxd_id =='')\n {\n drupal_set_message('Please check your admin settings');\n $response = new RedirectResponse($base_url);\n $response->send();\n return;\n }\n else {\n\n $get_authorization_url = new Get_authorization_url();\n $get_authorization_url->setRequestOxdId($oxd_id);\n $get_authorization_url->setRequestScope($gluu_config['scope']);\n $get_authorization_url->setRequestAcrValues(array($user_acr));\n $get_authorization_url->request();\n header(\"Location: \".$get_authorization_url->getResponseAuthorizationUrl());\n\t\t exit;\n }\n\t}", "title": "" }, { "docid": "32127b645026ca47c132ef7f82421843", "score": "0.6416954", "text": "abstract function send_login_request();", "title": "" }, { "docid": "79a73bdc8457ca1cb77c90f2dae7d10a", "score": "0.640539", "text": "public static function login_url($returnURL = \"\");", "title": "" }, { "docid": "21f8d709108a2f0c6f496d9c96c92237", "score": "0.6316466", "text": "public function get_login_url() { }", "title": "" }, { "docid": "e7cfccc9a1b1dc88f5568db1cee783dc", "score": "0.62838304", "text": "public static function login()\n\t{\n\t\t\n\t\t$login = self::url([\"login\"]);\n\t\treturn $login;\n\t\t\n\t}", "title": "" }, { "docid": "f00fdfc3c82e03092c77c0793eaca48c", "score": "0.62780523", "text": "function login()\n\t{\n\t\tJRequest::checkToken('request') or jexit( 'Invalid Token' );\n\n\t\tglobal $mainframe;\n\n\t\tif ($return = JRequest::getVar('return', '', 'method', 'base64')) {\n\t\t\t$return = base64_decode($return);\n\t\t\tif (!JURI::isInternal($return)) {\n\t\t\t\t$return = '';\n\t\t\t}\n\t\t}\n\n\t\t$options = array();\n\t\t$options['remember'] = JRequest::getBool('remember', false);\n\t\t$options['return'] = $return;\n\n\t\t$credentials = array();\n\t\t$credentials['username'] = JRequest::getVar('username', '', 'method', 'username');\n\t\t$credentials['password'] = JRequest::getString('passwd', '', 'post', JREQUEST_ALLOWRAW);\n\n\t\t//preform the login action\n\t\t$error = $mainframe->login($credentials, $options);\n\n\t\tif(!JError::isError($error))\n\t\t{\n\t\t\t// Redirect if the return url is not registration or login\n\t\t\tif ( ! $return ) {\n\t\t\t\t$return\t= 'index.php?option=com_user';\n\t\t\t}\n\n\t\t\t$mainframe->redirect( $return );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Facilitate third party login forms\n\t\t\tif ( ! $return ) {\n\t\t\t\t$return\t= 'index.php?option=com_user&view=login';\n\t\t\t}\n\n\t\t\t// Redirect to a login form\n\t\t\t$mainframe->redirect( $return );\n\t\t}\n\t}", "title": "" }, { "docid": "2cfa49c7cbdcae8b522dec1f9f5c6e27", "score": "0.62745756", "text": "public function login()\n {\n redirect($this->get_loginURL());\n }", "title": "" }, { "docid": "2490c944404c240e4232a1da889d4f92", "score": "0.62458813", "text": "public function afterLoginSuccessPath();", "title": "" }, { "docid": "04bc7ec9273a64f77fb74af73b3f75c6", "score": "0.6238703", "text": "public function loginUrl()\n\t{\n\t\tif (isset($this->file->login) && $this->file->login) {\n\t\t\tdefine(\"USER_LOGIN\", $this->file->login);\n\t\t}\n\t}", "title": "" }, { "docid": "97f08c4de0a4c29a6677ecd1bf472511", "score": "0.6237662", "text": "public function login($redirect_url=NULL);", "title": "" }, { "docid": "db6d4cc83be269dee906145ad3442d88", "score": "0.61673796", "text": "public function loginAction() {\n $post = $this->request->getPost();\n\n $result = array(\n 'success' => FALSE,\n 'message' => ''\n );\n\n if (isset($post['email'], $post['passwd'])) {\n if ($this->auth->login($post['email'], $post['passwd'])) {\n $result['success'] = TRUE;\n $result['data'] = $this->auth->getCurrentUser();\n } else {\n $result['message'] = $this->auth->getError();\n }\n } else {\n $result['message'] = _('Invalid parameters');\n }\n\n $this->response->setJsonContent($result);\n }", "title": "" }, { "docid": "f5e91e208a97aff6b5cd1b49323a5945", "score": "0.6163797", "text": "public function outputLoginUrl()\n\t{\n\t\techo App::e($this->app->uri->getLogin());\n\t}", "title": "" }, { "docid": "0ef5757f4310e817eaae0351e8c86e86", "score": "0.61418784", "text": "function loginUser() {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $auth = UserAuth::getInstance();\n if (isset($_POST['redirect_uri'])) {\n $validator = Validator::getInstance();\n $uri = $validator->Check('URL',$_POST['redirect_uri'],[]);\n if ($uri) {\n unset($_POST['redirect_uri']);\n } else {\n return DATA_FORMAT_ERROR['text'];\n }\n }\n if ($token = $auth->login()) {\n if (isset($uri)) {\n // Redirect to /auth/set_cookie page\n $redirect_uri = 'http://'.parse_url($uri)['host'].\"/auth/set_cookie?value=$token&uri=\".urlencode($uri);\n $headers = HeadersController::getInstance();\n $headers->respondLocation(['value' => $redirect_uri]);\n } else {\n return 'Пользователь успешно авторизован!';\n }\n } else {\n return AUTH_ERROR['text'];\n }\n } else {\n return POST_DATA_ABSENT['text'];\n }\n }", "title": "" }, { "docid": "ca82bb32db7fb4094c7972f43abac75b", "score": "0.6139598", "text": "public function login_api_request(){\n\t\t$data = json_decode(file_get_contents(\"php://input\"));\n\t\tif(isset($_GET['username']) && isset($_GET['password'])){\n\t\t\t$username = $_GET['username'];\n\t\t\t$password = $_GET['password'];\n\t\t\techo \"{\\\"username\\\":\\\"$username\\\", \\\"password\\\":\\\"$password\\\"}\";\n\t\t}else{\n\t\t\techo \"ops you have no creditials {\\\"username\\\":\\\"empty\\\", \\\"password\\\":\\\"empty\\\"}\";\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "cd02f275f44eccdc044132e525e5948f", "score": "0.61197746", "text": "public static function RedirectToLogin() {\n\t\t\tQApplication::Redirect('/login/?strReferer=' . urlencode(QApplication::$RequestUri));\n\t\t}", "title": "" }, { "docid": "c0260b278b5c8ee7a3455be99dff40ef", "score": "0.61181134", "text": "public static function login() {\n return new moodle_url('/login/index.php');\n }", "title": "" }, { "docid": "6c76e1364c46a6ccf16f08d6bee029a6", "score": "0.6060913", "text": "function loginRedirect() {\n\t\t$this->getSession()->set('PPI_Login::returnUrl', $this->getFullUrl());\n\t\t$this->redirect('user/login');\n\t}", "title": "" }, { "docid": "9570a549b586c9f78a74cd91a3be5d42", "score": "0.6050377", "text": "public function login() {\n $this->session->data['redirect'] = $this->request->post['redirect'];\n $this->redirect($this->url->https('account/login'));\n }", "title": "" }, { "docid": "9f2e4ab32db3416e00c40beed1fef22e", "score": "0.6039918", "text": "public function getLoginRedirect()\n {\n return [\"/\"];\n }", "title": "" }, { "docid": "59778fcecd80401ca220a94972fa8514", "score": "0.6023771", "text": "public function loginAction()\n {\n\t\t$raw = $this->getRequest()->getRawBody();\n\t\t$json = Zend_Json::decode($raw);\n\t\t$pin = $json['pin'];\n\t\t$device_id = $json['device_id'];\n\t\t$registrant_id = $json['registrant_id'];\n\t\tif(!isset($pin) || !isset($device_id) || !isset($registrant_id)){\n\t\t\t$this->getResponse()->setHttpResponseCode(400);\n\t\t\t$data = array('status'=>'FAILED','message'=>'NO_DATA_PROVIDED');\n\t\t\techo $this->_helper->json($data);\n\t\t\texit();\n\t\t}\n\t\t$authTable = new Application_Model_DbTable_Auth();\n\t\t$user = $authTable->fetchRow($authTable->select()->where('pin=?',$pin)->where('device_id=?',$device_id));\n\t\t\n\t\t//Row not found\n\t\tif($user==null){\n\t\t\t$this->getResponse()->setHttpResponseCode(400);\n\t\t\t$data = array('status'=>'FAILED','message'=>'INVALID_LOGIN');\n\t\t\techo $this->_helper->json($data);\n\t\t\texit();\n\t\t}\n\t\t\n\t\t//Generate SKEY now.\n\t\t$skey = $this->generateKey();\n\t\t//Save the users secret key for this session.\n\t\t$user->secret_key = $skey;\n\t\t$user->registrant_id = $registrant_id;\n\t\t$user->save();\n\t\t\n\t\t//Let the api consumer know it worked.\t\t\n\t\t$data = array('status'=>'SUCCESS','skey'=>$skey,'bsn'=>$user->bsn);\n\t\techo $this->_helper->json($data);\n }", "title": "" }, { "docid": "b89d07b4b243e95053d7d1be58f8bc1b", "score": "0.6009604", "text": "public function loginAction()\n {\n if ($this->request->isPost() /*&& $this->security->checkToken(null, null, false)*/) {\n $username = $this->request->getPost(\"username\");\n $password = $this->request->getPost(\"password\");\n /**\n * @var $server RestPlugin\n */\n $server = $this->di->get(\"server\");\n\n if ($server->login($username, $password) === true) {\n $this->response->redirect(\"dashboard\");\n /*$this->dispatcher->forward(array(\n \"controller\" => \"dashboard\",\n \"action\" => \"index\"\n ));*/\n return;\n } else {\n $this->response->redirect(\"\");\n /*\n $this->dispatcher->forward(array(\n \"controller\" => \"index\",\n \"action\" => \"index\"\n ));*/\n return;\n }\n }\n\n $this->dispatcher->forward(array(\n \"controller\" => \"error\",\n \"action\" => \"show401\"\n ));\n }", "title": "" }, { "docid": "4963b59468a6b5d62512415fa2802be6", "score": "0.6009205", "text": "public function loginPostAction()\n {\n if (!$this->_validateFormKey()) {\n $this->_redirect('*/*/');\n return;\n }\n\n if ($this->_getSession()->isLoggedIn()) {\n $this->_redirect('*/*/');\n return;\n }\n $session = $this->_getSession();\n\n if ($this->getRequest()->isPost()) {\n $login = $this->getRequest()->getPost('login');\n if (!empty($login['username']) && !empty($login['password'])) {\n $this->loadLayout();\n $this->getLayout()->getBlock('hukmedia.wso2.customer.login.redirect')->setLogin($login);\n $this->renderLayout();\n return;\n } else {\n $session->addError($this->__('Login and password are required.'));\n }\n }\n\n $this->_loginPostRedirect();\n }", "title": "" }, { "docid": "8463655ab0414cb40295effed8e1f3cf", "score": "0.5998311", "text": "private function gvLogin(){\n\t\t$init_login = $this->curlGet($this->init_url);\n\n\t\t//get/set login fields\n\t\t$fields = $this->getFormFields($init_login, true);\n\t\t$fields['Email'] = $this->email_address;\n\t\t$fields['Passwd'] = $this->password;\n\t\t//$fields['_utf8'] = '%E2%98%83';\n\t\t$post_string = '';\n\t\tforeach($fields as $key => $value) {\n \t\t\t$post_string .= $key . '=' . urlencode($value) . '&';\n\t\t}\n\t\t$post_string = substr($post_string, 0, -1);\n\n\t\t//do login\n\t\t$curl_login = $this->curlPost($this->login_url, $post_string, $this->refer_url);\n\n\t\treturn $curl_login;\n\t}", "title": "" }, { "docid": "bbf9a3d2340e451562c0bf06c225f30d", "score": "0.598472", "text": "private function _loginPostRedirect()\n {\n $session = $this->_getSession();\n if ($referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME)) {\n $referer = Mage::helper('core')->urlDecode($referer);\n if ((strpos($referer, Mage::app()->getStore()->getBaseUrl()) === 0) ||\n (strpos($referer, Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, TRUE)) === 0)) {\n $session->setBeforeAuthUrl($referer);\n } else {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\n }\n } else {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\n }\n\n $this->_redirectUrl($session->getBeforeAuthUrl(TRUE));\n }", "title": "" }, { "docid": "61d36d865fe293132376b4e4c5abd9a0", "score": "0.5982164", "text": "public function logintURL()\n {\n $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);\n $request_token = $connection->getRequestToken(OAUTH_CALLBACK);\n if ($request_token) {\n $token = $request_token['oauth_token'];\n $_SESSION['request_token'] = $token ;\n $_SESSION['request_token_secret'] = $request_token['oauth_token_secret'];\n $_SESSION['login_url'] = $connection->getAuthorizeURL($token);\n header('Location'.filter_var($_SESSION['login_url'], FILTER_SANITIZE_URL));\n }\n }", "title": "" }, { "docid": "49b6eb8f15900851fe4ca72f3dea7f69", "score": "0.5978775", "text": "public function login_redirect() {\n\n\t\t/**\n\t\t * this function is overwritten in the inheriting classes\n\t\t */\n\t}", "title": "" }, { "docid": "8f669fc7853049dd5b18573a4c38f4ce", "score": "0.596852", "text": "public function login_url() {\n\t\t$login_url = \"\";\n\t\treturn $login_url;\n\t}", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.59640545", "text": "public function login();", "title": "" }, { "docid": "c6b6d2a73b602c5065cb43f750467f38", "score": "0.59625596", "text": "function post()\n\t{\n\t\t$username = $_POST[\"username\"];\n\t\t$passwd = $_POST[\"passwd\"];\n\n\t\t// TODO: check for login here\n\t\t// if valid redirect to /citizen/dashboard\n\t\t// else return to /citizen/login with error message\n\t\theader(\"Set-Cookie: username={$username}\");\n\t\theader(\"Location: /citizen/dashboard\");\n\t}", "title": "" }, { "docid": "7a84df2eca9bac2223fd3c40720deb86", "score": "0.5955179", "text": "function joints_login_url() { return home_url(); }", "title": "" }, { "docid": "1ac1c7c89b20afd58dc0e2ae7d6ec231", "score": "0.5944959", "text": "public function loginAction()\n {\n// On récupérer la route que l'on veux accéder apres l'authentification CAS\n $target = urlencode($this->container->getParameter('cas_login_target'));\n// On récupère l'url d'accès à la connexion CAS\n $url = 'https://' . $this->container->getParameter('cas_host') . '/login?service=';\n\n// On redirige l'utilisateur vers la connection cas en précisant la route vers laquelle CAS va nous redirigé\n return $this->redirect($url . $target);\n }", "title": "" }, { "docid": "c23e0f0b84a25b93523d0831a919e481", "score": "0.59345734", "text": "function logInAction()\n {\n if (isset($this->request->login) && isset($this->request->password)) {\n if ($this->session->loginUser($this->request->login, md5($this->request->password), \"login\", \"administrator\")) {\n $httpClient = new HttpClient();\n $this->session->set(\"scriptLastVersion\", $httpClient->getSiteContent(\"http://script.arfooo.com/version/version.html\", false));\n $this->redirect($this->moduleLink(\"index\"));\n } else {\n $this->set(\"loginError\", 1);\n }\n }\n }", "title": "" }, { "docid": "06396b4788acaade65530bf5bb382bff", "score": "0.59191257", "text": "protected function getLoginUrl()\n {\n }", "title": "" }, { "docid": "7678a9c185e3795c97a45b402d6c8550", "score": "0.59166884", "text": "function redirectLogin()\n{\n\tglobal $CONFIGVAR;\n\n\t$ajax->redirect('/' . $CONFIGVAR['html_login_page']['value']);\n\texit;\n}", "title": "" }, { "docid": "cbe1ab5f1cd2f5ab309bc3c3e8741067", "score": "0.59014004", "text": "protected function getLoginUrl()\n {\n return $this->host . self::REQUEST_URI_LOGIN;\n }", "title": "" }, { "docid": "28ac4bf6595201b42d8bd56f57a8af26", "score": "0.58965147", "text": "function loginForm() {\n $uri = false;\n if (isset($_GET['redirect_uri'])) {\n $validator = Validator::getInstance();\n $uri = $validator->Check('URL',$_GET['redirect_uri'],[]);\n }\n include ROOTDIR.'/app/views/login_form.html.php';\n }", "title": "" }, { "docid": "06971c3b02873a2f3cd75dbe81b6f1c2", "score": "0.58886063", "text": "public function getLoginUrl();", "title": "" }, { "docid": "6df66ccf21561fb4e7d1518b8ab10dc0", "score": "0.5882736", "text": "function logInAction()\n {\n if (!Config::get(\"registrationOfWebmastersEnabled\")) {\n $this->return404();\n }\n\n //if form was posted\n if (isset($this->request->email) && isset($this->request->password)) {\n $email = $this->request->email;\n\n //check that user haven't got banned ip/email and password is correct\n if (!$this->bannedEmail->isBanned($email) && !$this->bannedIp->isBanned($this->request->getIp()) && $this->session->loginUser($email, md5($this->request->password), \"email\", \"webmaster\")) {\n if (!empty($this->request->rememberMe)) {\n $expire = time() + 60 * 60 * 24 * 30;\n\n $this->response->setCookie(\"rememberMe\", true, $expire);\n $this->response->setCookie(\"email\", $this->request->email, $expire);\n $this->response->setCookie(\"password\", md5($this->request->password), $expire);\n }\n //if yes redirect to managment panel\n $this->redirect($this->moduleLink(\"manage\"));\n } else {\n //if no set error message\n $this->set(\"loginError\", 1);\n }\n }\n\n $this->set(\"directoryCondition\", $this->getDirectoryCondition());\n }", "title": "" }, { "docid": "0ec7e5d8e6fdd69de663af039373de2f", "score": "0.5879641", "text": "public function loginPath1()\n\t{\n\t\treturn '/auth/login1';\n\t}", "title": "" }, { "docid": "f1291c458e8f262ea2d109f8aecf8201", "score": "0.587754", "text": "public function redirectToLogin() {\n\t\tHttpResponse::redirect($this->loginURL, array('returnURL' => $_SERVER['REQUEST_URI']));\n\t}", "title": "" }, { "docid": "a7a6b647b255228044bb3b6196873c4a", "score": "0.58774304", "text": "public function login()\r\n {\r\n $this->setTpl('login.htm');\r\n $this->setControllerTitle('Bridge');\r\n $this->setLayout('loginLayout');\r\n $this->setCurrentControllerName('Login');\r\n\r\n $oUser = $this->oEm->getRepository('Apollo\\Entity\\User')->findOneBy(array('login' => $_POST['login'],\r\n 'password' => $_POST['pwd']));\r\n\r\n if (false === is_null($oUser)) {\r\n $_SESSION['login'] = $_POST['login'];\r\n $_SESSION['isLogged'] = true;\r\n //$_SESSION['right'] = $right;\r\n header(\"Location: \".HTML_ROOT_PATH.\"home/\");\r\n } else {\r\n $this->aVars['sLogin'] = $_POST['login'];\r\n }\r\n }", "title": "" }, { "docid": "476e6cc02177ecb2ff9120632fb66af9", "score": "0.5872694", "text": "public function aolloginAction() {\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t\t$this->view->form = $form = new Seaocore_Form_Aollogin();\r\n\t\tif( $this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost()) )\r\n {\r\n\t\t\tinclude_once APPLICATION_PATH . '/application/modules/Seaocore/Api/Aol/aolapi.php';\r\n\t $values = $form->getValues();\r\n\t\t\t$session = new Zend_Session_Namespace();\r\n\t\t\t$session->windowlivemsnredirect = 0;\t\t\r\n\t\t\t$session->yahooredirect = 0;\r\n\t\t\t$session->googleredirect =0;\t\r\n\t\t\t$session->aolredirect = 1;\r\n\t\t\t$session->facebookredirect =0;\r\n\t\t\t$session->linkedinredirect = 0;\t\r\n\t\t\t$session->twitterredirect =0;\r\n\t\t\t$loginsuccess = getaolcontacts($values['email'], $values['password'], true);\r\n\t\t\tif ($loginsuccess) {\r\n\t\t\t\t$session->aol_email = $values['email'];\r\n\t\t\t\t$session->aol_password = $values['password'];\t\t\r\n\t\t\t\t// the domain that you entered when registering your application for redirecting from google site.\r\n\t\t\t\t$callback = $this->_getParam('redirect_uri', null) . '?redirect_aol=1';\r\n\t\t\t\theader('location:'. $callback);\r\n\t\t\t}\r\n\t\t\telse {\r\n $this->view->error = Zend_Registry::get('Zend_Translate')->_(\"Incorrect Username or Password\");\r\n\t\t\t}\r\n\t\t}\r\n }", "title": "" }, { "docid": "070fdeefe11bf355e22dd705984ada21", "score": "0.58686686", "text": "public function LoginURL() {\n\t\treturn $this->Link(\"login\");\n\t}", "title": "" }, { "docid": "9b38c7bd3ec5acb101e35fef9ba64c40", "score": "0.58682245", "text": "public function loginAction()\n {\n if (isset($_POST['email']) && isset($_POST['password'])) {\n\n /* request connection */\n $auth_service = new AuthService();\n $user = $auth_service->connection(htmlspecialchars($_POST['email']), htmlspecialchars($_POST['password']));\n\n /* if user exist or login */\n if ($user !== null) {\n $_SESSION['user'] = $user;\n $_SESSION['last_login_timestamp'] = time();\n\n $_POST = array();\n\n if($_SESSION['user']['admin'])\n {\n echo json_encode(1); // if login right and user is admin\n }else{\n echo json_encode(2); // if login right and user is franchisee\n }\n }\n else /* if user does not exist or login */ {\n echo json_encode(0); // if login is wrong\n }\n }\n else {\n http_response_code(400);\n }\n }", "title": "" }, { "docid": "794b00095b168ce38069ba926642153b", "score": "0.5864162", "text": "function quindo_login_url() { return home_url(); }", "title": "" }, { "docid": "539aa88e85d71c349c63356dc7ca650a", "score": "0.58456683", "text": "public function login($input);", "title": "" }, { "docid": "db912326e909b54b86844db38cc87693", "score": "0.58189136", "text": "public function loginCheckAction()\n {\n //NOTE: nothing to do here, the security component takes care of it, just need to have the route defined.\n }", "title": "" }, { "docid": "8570f1b4d92a32ee0c71f5cd7f86e269", "score": "0.5818903", "text": "public function appLoginAction()\n {\n // URL after successfull login.\n $redirectUrl = (string)$this->params()->fromQuery('redirectUrl', '');\n if (strlen($redirectUrl)>2048) {\n throw new \\Exception(\"Too long redirectUrl argument passed\");\n }\n\n $appLogin_result = array();\n $appLogin_post = $_POST;\n if (empty($appLogin_post)){\n exit;\n }\n // Create login form\n $form = new LoginForm();\n $form->get('redirect_url')->setValue($redirectUrl);\n\n // Store login status.\n $isLoginError = false;\n\n // Check if user has submitted the form\n // if ($this->getRequest()->isPost()) {\n\n // Fill in the form with POST data\n // $data = $this->params()->fromPost();\n\n // $form->setData($data);\n\n // Validate form\n // if($form->isValid()) {\n\n // Get filtered and validated data\n // $data = $form->getData();\n\n // Perform login attempt.\n $result = $this->authManager->login($appLogin_post['email'],\n $appLogin_post['password'], 1);\n\n // Check result.\n\n if ($result->getCode() == Result::SUCCESS) {\n $appLogin_result['login_result'] = 'LOGIN SUCCESS';\n $appLogin_result['error'] = '0';\n\n\n\n\n $appLogin_result['uid'] = '1';\n // $appLogin_result['user'] = '1';\n $appLogin_result['name'] = 'occupi';\n $appLogin_result['email'] = $appLogin_post['email'];\n $appLogin_result['created_at'] = time(0);\n // Get redirect URL.\n /*\n $redirectUrl = $this->params()->fromPost('redirect_url', '');\n\n if (!empty($redirectUrl)) {\n // The below check is to prevent possible redirect attack\n // (if someone tries to redirect user to another domain).\n $uri = new Uri($redirectUrl);\n if (!$uri->isValid() || $uri->getHost()!=null)\n throw new \\Exception('Incorrect redirect URL: ' . $redirectUrl);\n }\n\n // If redirect URL is provided, redirect the user to that URL;\n // otherwise redirect to Home page.\n if(empty($redirectUrl)) {\n return $this->redirect()->toRoute('home');\n } else {\n $this->redirect()->toUrl($redirectUrl);\n }*/\n } else {\n $appLogin_result['login_result'] = 'LOGIN ERROR';\n $appLogin_result['error'] = '1';\n }\n // } else {\n // $isLoginError = true;\n // }\n // }\n\n echo json_encode($appLogin_result);\n die();\n }", "title": "" }, { "docid": "84b8cd95aac3e3548f5b386c529f73f5", "score": "0.58184934", "text": "public function doLoginAction() {\n $this->AuthenticationService->doLogin();\n header('Location: /' . $this->Configuration->get(\"www.uri\"));\n die;\n }", "title": "" }, { "docid": "36be38c2fd05301109b97c460bf99c38", "score": "0.5810132", "text": "function login($request){\n $this->authsource=$_POST['idp'];\n\n $as = new SAMLHandler($this->authsource,$this->config);\n $user=$_POST['username'];\n $pass=$_POST['password'];\n $idp=$_POST['idp'];\n// $sp=$_POST['sp'];\n $params=['ErrorURL'=>'http://localhost/SAMLDEMO/www/pages/login.php?&msg=badcredentials',\n// 'ReturnTo'=>'http://localhost/SAMLDEMO/www/pages/index.php?username='.$user.'&password='.$pass.'&idp='.$idp,\n 'ReturnTo'=>'http://localhost/SAMLDEMO/www/pages/index.php',\n 'KeepPost' => true];\n// $as->requireAuth($params);\n// var_dump($as);die;\n $state=$as->login($params);\n $authdata=$as->getAuthDataArray();\n $_POST['state']=$state;\n $_POST['authdata']=$authdata;\n HTTP::redirectTrustedURL('http://localhost/SAMLDEMO/www/pages/index.php',$_POST);\n\n }", "title": "" }, { "docid": "5eb55bc018789dc961236400d38386f3", "score": "0.5805508", "text": "public function getlogin()\n{\nif(isset($_REQUEST[‘username’]) && isset($_REQUEST[‘password’])){\nif($_REQUEST[‘username’]==’admin’ && $_REQUEST[‘password’]==’admin’){\nreturn ‘login’;\n}\n else{\nreturn ‘invalid_user’;\n}\n}\n}", "title": "" }, { "docid": "88cee8af41fa288b842d0e0212eb8aea", "score": "0.5803959", "text": "public function login_parser(){\n echo $_POST[\"lUname\"];\n echo \"<br>\";\n echo $_POST[\"lPass\"];\n \n }", "title": "" }, { "docid": "936a849e02f055c5d43bfc9a1e504a77", "score": "0.580314", "text": "public function getLoginPostUrl(){\n $secure = Mage::app()->getStore()->isCurrentlySecure();\n return $this->getUrl(\"oink/checkout/loginPost\",array(\"_secure\"=>$secure));\n }", "title": "" }, { "docid": "4ce275eea38f38660cc65290f78adf5b", "score": "0.58023584", "text": "function login_POST() {\n $username = $this->post('username');\n $password = $this->post('password');\n $return = $this->m_login->loginApi($username,md5($password));\n if ($return) {\n $result = [\n 'data' => $return,\n 'status' => 'ok',\n 'msg' => 'Selamat Datang '.$return['name'],\n ];\n $this->response($result, 200);\n }else{\n $result = [\n 'data' => $return,\n 'status' => 'not_ok',\n 'msg' => 'gagal login',\n ];\n $this->response($result, 200);\n }\n }", "title": "" }, { "docid": "f7eac8253908dd33748316b3b4222b64", "score": "0.5795295", "text": "public function request_login_post()\n {\n// $card_number = $this->post('card_number');\n $makatizen_number = $this->post('makatizen_number');\n $password = $this->post('password');\n\n if (!empty($makatizen_number) && !empty($password)) {\n\n $result = $this->account->validate_account_with_makatizen_num($makatizen_number, $password);\n\n if ($result != false) {\n //Account Valid\n $this->response(array(\n 'valid' => true,\n 'message' => 'Login Successful',\n 'account_id' => (int)$result['id'] /* Account ID */\n ), REST_Controller::HTTP_OK);\n } else {\n //Account not valid\n $this->response(array(\n 'valid' => false,\n 'message' => 'Login Credentials is Invalid'\n ), REST_Controller::HTTP_OK);\n }\n } else {\n // Set the response and exit\n $this->response(\"Provide makatizen number and password.\", REST_Controller::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "3f02cc1791dec17d4d93398a5268dc3e", "score": "0.5790405", "text": "public function loginUser()\n {\n $token = SecurityToken::inst();\n $callback = $this->AbsoluteLink('Login');\n $callback = $token->addToUrl($callback);\n $consumer = self::get_zend_oauth_consumer_class($callback);\n $token = $consumer->getRequestToken();\n Session::set('Twitter.Request.Token', serialize($token));\n $url = $consumer->getRedirectUrl();\n return self::curr()->redirect($url);\n }", "title": "" }, { "docid": "ed06aeb56aa091d28c55d2be7bf1edb7", "score": "0.5788419", "text": "public function action_login() {\n if ($this->request->method == 'POST') {\n\t\t\t$id = $this->request->post('identifier');\n\t\t\t$password = $this->request->post('password');\n\t\t\t$role = $this->request->post('role');\n\n\t\t\t$auth = $this->pixie->auth;\n\t\t\t$auth->provider('password')->login($id,$password);\n\t\t\t$user = $auth->user();\n\t\t\tif (!empty($user)) {\n\t\t\t\tif ($auth->has_role('admin')) {\n\t\t\t\t\treturn $this->redirect('/admin');\n\t\t\t\t}\n\t\t\t\treturn $this->redirect('/user');\n\t\t\t}\n\t\t\t$this->pixie->fail('Login failed!');\n\t\t\tif ($role=='admin') { $this->redirect('/login/login_admin'); }\n\t\t}\n\t\t// Something is wrong, try again\n\t\t$this->redirect('/login');\n\t}", "title": "" }, { "docid": "001ac45e5f7f9b724c42b44006ebd3ca", "score": "0.57871336", "text": "public function login(){\n\t\t$input = \\Input::all();\n\n\t$response = \\Curl::to(config('f45.login'))\n ->withData([\n \t'email' => $input['email'],\n \t'password'=> $input['password']\n ])\n ->asJson(true)\n ->post();\n\n if($response['success']){\n\n \tif($this->franchisee($response['data']['franchisee_id'])){\n \t\t//set session\n \t\tSession::put('user', $response['data']);\n\n \t\t//redirect to dashboard\n \t\treturn Redirect::to('dashboard');\n \t}else{\n \t\t$response['errors'] = \"Location is not yet approved.\";\n \t}\n \n \t\n }\n\n return Redirect::back()->withErrors($response['errors']);\n\t}", "title": "" }, { "docid": "0f5bba5a6dab3b6407731724ad4c828d", "score": "0.5780758", "text": "function auth_redirect()\n{\n}", "title": "" }, { "docid": "8221901f9309c0eddca5f7908f0405cf", "score": "0.5775562", "text": "function redirectToLogin()\n{\n // Get this page's URL\n $protocol = 'http';\n if (array_key_exists('HTTPS', $_SERVER) == true)\n {\n $protocol = 'https';\n }\n\n $redirect = urlencode($protocol . '://' . $_SERVER['SERVER_NAME'] . '/' . $_SERVER['REQUEST_URI']);\n\n header(\"Location: https://websso.it.northwestern.edu/amserver/UI/Login?goto=$redirect\");\n exit;\n}", "title": "" }, { "docid": "f91a50c1bbb92388355323f585cffc44", "score": "0.57557106", "text": "public function login() {\n\t\tSession::set('Security.Message.message', _t('SiteSprocket.CREDENTIALS','Please login to access SiteSprocket'));\n\t\tSession::set('Security.Message.type', 'status');\n\t\tSession::set(\"BackURL\", $this->Link());\n\t\tDirector::redirect('Security/login');\n\t}", "title": "" }, { "docid": "133241f9e8b9496008780d6428d98cd5", "score": "0.5754387", "text": "public function login()\n {\n var_dump($_SERVER);\n }", "title": "" }, { "docid": "99c465f637c6bf300cb9f7dee27de6a3", "score": "0.57538676", "text": "public function actionLogin(){\n\t\tif(isset($_GET['email']) && isset($_GET['password']))\n\t\t{\n\t\t\t$email = mysql_real_escape_string($_GET['email']);\n\t\t\t$password = md5(mysql_real_escape_string($_GET['password']));\n\t\t\t$db = DbController::connect();\n\t\t\t$user = User::login($email,$password,$db);\n\t\t\tif(gettype($user) != 'integer')\n\t\t\t\tApi::response(200, array('data'=>'Login success, access_token = '.$user->getToken()));\n\t\t\telse\n\t\t\t\tApi::response(400, array('error'=>'Missing datas'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tApi::response(400, array('error'=>'Missing datas'));\n\t\t}\n\t}", "title": "" }, { "docid": "bddb0eb8e7c8cebcdf4e8493e8e32003", "score": "0.57522947", "text": "public function login(){\n\t\t$a_host = array(\n\t\t\t'hostname' => $this->input->post('s_host'),\n\t\t\t'username' => $this->input->post('s_usernmae'),\n\t\t\t'password' => $this->input->post('s_password'),\n\t\t);\n\t\t\n\t\tif ( $a_host['hostname'] && $a_host['username'] ) {\n\t\t\t$this->_login($a_host);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "656c05adf37a6cc67c8b1c6600ddc7ee", "score": "0.5750856", "text": "function get_login_redirect() {\n global $aws_region;\n\n // Get the instance id for this by using instance metadata\n $instance_id = file_get_contents('http://169.254.169.254/latest/meta-data/instance-id/');\n\n // Need an Ec2Client\n $ec2 = new Ec2Client([\n 'region' => $aws_region,\n 'version' => 'latest'\n ]);\n\n // Get the tags for this instance id\n $result = $ec2->describeTags([\n 'Filters' => [\n [\n 'Name' => 'resource-id',\n 'Values' => [$instance_id, ],\n ],\n ],\n ]);\n\n // Username is stored in the tags with key -- 'analyserver-owner'\n for ($i=0; $i<count($result['Tags']); $i++) {\n if ($result['Tags'][$i]['Key'] == 'redirect-to-authserver') {\n $_SESSION['redirect_url'] = $result['Tags'][$i]['Value'];\n break;\n }\n }\n }", "title": "" }, { "docid": "313d34213fca947957feef665add6f2d", "score": "0.57483196", "text": "public function login();", "title": "" }, { "docid": "816c843a9295fd53888f8987886c8bbe", "score": "0.5748235", "text": "function auth_redirectToLogin(){\n $app = \\Slim\\Slim::getInstance();\n $rootUri = $app->request()->getRootUri();\n $redir = $rootUri . $app->request()->getResourceUri();\n $app->flash('errors', ['Login required']);\n $app->redirect($rootUri . '/login?continue=' . $redir);\n}", "title": "" }, { "docid": "bffaf46603f3fdf4ecbd3c8e74790dab", "score": "0.5740475", "text": "function remote_login($site_name) {\n $success = false;\n require_once('remote_logins/remote_login_request.class.php');\n\n $request = new remote_login_request();\n if ($request->create($_REQUEST)) {\n $success = $request->handle($_SESSION['user']['user_id']);\n }\n $success ? redirect($success) : redirect('/index.php');\n}", "title": "" }, { "docid": "6cbd823e96022145ab81cf74ac8c06c5", "score": "0.57331926", "text": "public function p_login () {\n\n\t\t# Sanitize data entered in login form\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\t\t\n\t\t# Hash password and add salt\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\t\n\t\t# Try to get token from DB for submitted email/password combination\n\t\t$q = \"SELECT token\n\t\t\tFROM users\n\t\t\tWHERE email = '\".$_POST['email'].\"'\n\t\t\tAND password = '\".$_POST['password'].\"'\n\t\t\t\";\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\t\t\n\t \t# If no token was returned, submitted password/combination does not exist\n\t\t# so return to homepage with variable to trigger error message\n\t\tif($token == \"\") {\n\t\t\tRouter::redirect(\"/index/index/error\");\n\t\t}\n\t\t# Otherwise, set cookie using token and redirect to landing page\n\t\telse {\n\t\t\tsetcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\tRouter::redirect(\"/meals/view/stream\");\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "e507f516dc0bcdaf597e909680f50f8a", "score": "0.5732422", "text": "Abstract Public Function login();", "title": "" }, { "docid": "687480573d1627dda330a5ddf4ba28cb", "score": "0.5720359", "text": "public function postLogin(){\n return $this->freeApi->postLogin(Input::all());\n }", "title": "" }, { "docid": "d7fd50fb2a81d44352659db07260bbaf", "score": "0.5719401", "text": "protected function _loginRequest()\r\n {\r\n \t$loginResponse = $this->_loginClient\r\n \t ->setParameterPost('req_username', $this->_identity)\r\n ->setParameterPost('req_password', $this->_credential)\r\n ->setParameterPost('csrf_token', $this->_csrfToken)\r\n ->setParameterPost('redirect_url', $this->_authUrl . '?csrf_token=' . $this->_csrfToken)\r\n #->setHeaders('Cookie', $this->_cookie)\r\n ->request();\r\n \r\n // debugging\r\n #fb($this->_loginClient,'$loginClient');\r\n #fb($loginResponse->getBody(),'$loginResponse');\r\n #echo $loginResponse->getBody();\r\n \r\n if (strpos($loginResponse->getBody(), 'logged in successfully')) {\r\n \r\n \treturn true;\r\n }\r\n \r\n return false;\r\n }", "title": "" }, { "docid": "878d1890c1050472803ad2c8c7652195", "score": "0.5714456", "text": "function send_login_page() {\n global $mac;\n global $login_url;\n global $location;\n\n echo '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n </head>\n <body>\n <form id=\"redirect\" action=\"' . $login_url . '\" method=\"post\">\n <input type=\"hidden\" name=\"mac\" value=\"' . $mac . '\">';\n\n if ($location) {\n echo ' <input type=\"hidden\" name=\"location\" value=\"' . $location . '\">';\n }\n\n echo ' <input type=\"submit\" value=\"Continue\">\n </form>\n <p>If the page does not load automatically, please click the button to continue.</p>\n <script>\n document.getElementById(\"redirect\").submit();\n </script>\n </body>\n</html>';\n}", "title": "" }, { "docid": "6a9c3d11a24e4f094b158677d0203ff8", "score": "0.5699342", "text": "function bones_login_url() { return home_url(); }", "title": "" }, { "docid": "6a9c3d11a24e4f094b158677d0203ff8", "score": "0.5699342", "text": "function bones_login_url() { return home_url(); }", "title": "" }, { "docid": "ecd4e0b602aab370767eaa133c07b5ce", "score": "0.5695567", "text": "public function loginAction()\n\t\t{\n\t\t\tZend_Layout::getMvcInstance()->setLayout( 'admin-login' );\n\t\t\t$config = Config::getInstance();\n\t\t\t// Process a form request.\n\t\t\tif ( $this->getRequest()->isPost() ) {\n\t\t\t\t// Get an admin.\n\t\t\t\t$admin = Table::_( 'admins' )->getAdmin(\n\t\t\t\t\t$this->_getParam( 'nickname' )\n\t\t\t\t);\n\t\t\t\tif ( $admin ) {\n\t\t\t\t\t// Check password.\n\t\t\t\t\t$password = trim( mcrypt_decrypt( MCRYPT_DES, $config->crypt->key, $admin->password, MCRYPT_MODE_ECB ) );\n\t\t\t\t\tif ( $password == $this->_getParam( 'password' ) ) {\n\t\t\t\t\t\t// Log in and go to dashboard.\n\t\t\t\t\t\t$session = new Zend_Session_Namespace( 'pc.admin' );\n\t\t\t\t\t\t$session->admin = $admin;\n\t\t\t\t\t\treturn $this->getHelper( 'Redirector' )\n\t\t\t\t\t\t\t->gotoSimple( 'index' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->view->password = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->view->nickname = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "de9e390dac2c6540810cbe240096c79b", "score": "0.56949365", "text": "public function autoLoginAction()\n {\n return $this->redirect('http://' . $this->getHost() . '/login');\n }", "title": "" }, { "docid": "de9d61fcc612d2f21fc1f8ebea69644d", "score": "0.569466", "text": "public function postLogin()\n\t{\n\t\t$attempt = array('password' => $this->input->get('password'));\n\n\t\t$settings = $this->perm->load('vessel.site');\n\t\tif ($settings->registration_confirm === true)\n\t\t\t$attempt['confirmed'] = true;\n\n\t\t// check if username or email\n\t\tif (strpos($this->input->get('usernameemail'), '@') === false)\n\t\t\t$attempt['username'] = $this->input->get('usernameemail');\n\t\telse\n\t\t\t$attempt['email'] = $this->input->get('usernameemail');\n\n\t\t// attempt login\n\t\tif ($this->auth->attempt($attempt, $this->input->get('remember')))\n\t\t{\n\t\t\t$this->notification->success(t('messages.auth.login-success', array('name' => $this->auth->user()->username)));\n\t\t\treturn $this->redirect->intended('vessel');\n\t\t}\n\n\t\t// back with error\n\t\t$this->notification->error(t('messages.auth.login-error'));\n\t\treturn $this->redirect->route('vessel.login')->withInput($this->input->except('password'));\n\t}", "title": "" }, { "docid": "aac3a3b1d5c0360cc5235eeb7dbade3c", "score": "0.5694138", "text": "public function loginMobile()\n {\n $response = $this->api->invoke('/user/login/mobile.json', EpiRoute::httpPost);\n $redirect = '/';\n if(isset($_POST['redirect']))\n $redirect = $_POST['redirect'];\n\n if($response['code'] == 200)\n $this->route->redirect($redirect);\n else\n $this->route->redirect(sprintf('%s&%s', $redirect, 'error=1'));\n }", "title": "" }, { "docid": "54c39bd56e5b771ecc35992018248253", "score": "0.56930053", "text": "function markcond_login_url() { return home_url(); }", "title": "" }, { "docid": "5d376225138358d1d30d1786f797f501", "score": "0.56874907", "text": "public function login()\n {\n header('Content-Type: application/json');\n if ($this->input->method(true) != 'POST') {\n echo json_encode(array(\"message:\" => \"Use the HTTP POST method to login to the system.\"));\n return;\n } else\n if (check_jwt_cookie($this->auth[\"service_name\"], $this->auth[\"cookie_name\"])) {\n echo json_encode(regenerate_jwt_cookie($this->auth[\"service_name\"], $this->auth[\"cookie_name\"]));\n return;\n } else {\n echo json_encode(authorize($this->auth[\"table\"], $this->auth[\"fields\"],\n $this->auth[\"username_field\"], $this->auth[\"password_field\"], $this->auth[\"id_field\"],\n $_POST[\"username\"], hash(\"md5\", $_POST[\"password\"], false),\n $this->auth[\"service_name\"], $this->auth[\"cookie_name\"]\n ));\n return;\n }\n }", "title": "" }, { "docid": "0524f9c2e38ff19c38ad26552b44e93e", "score": "0.56797683", "text": "public function getLoginUri()\n {\n return $this->loginUri;\n }", "title": "" }, { "docid": "4b6c5880eab11b146a80b66f6f409a74", "score": "0.56774735", "text": "public function action_login() {\r\n\t\tif ($this->auth->logged_in())\r\n\t\t{\r\n\t\t\t$this->go_to();\r\n\t\t}\r\n\r\n\t\tif (Arr::get($_POST, 'cipher'))\r\n\t\t\tNossl::decipher();\r\n\r\n\t\t$user = Arr::get($_POST, 'user');\r\n\t\t$pass = Arr::get($_POST, 'pass');\r\n\r\n\t\tif (!empty($user) AND !empty($pass))\r\n\t\t{\r\n\t\t\tif (Kohana::$environment == Kohana::PRODUCTION)\r\n\t\t\t{\r\n\t\t\t\tsleep(rand(2,10));\r\n\t\t\t}\r\n\t\t\tif ($this->auth->login($user, $pass))\r\n\t\t\t{\r\n\t\t\t\tKohana::$log->add(Log::INFO, 'access to admin from :ip :user::pass', array(\r\n\t\t\t\t\t':ip' => $_SERVER['REMOTE_ADDR'],\r\n\t\t\t\t\t':user' => $user,\r\n\t\t\t\t\t':pass' => $pass,\r\n\t\t\t\t));\r\n\t\t\t\t$ref = Session::instance()->get_once('referer');\r\n\t\t\t\tif ($ref)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->redirect($ref);\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$this->go_to();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tKohana::$log->add(Log::INFO, 'fail admin login from :ip :user::pass', array(\r\n\t\t\t\t':ip' => $_SERVER['REMOTE_ADDR'],\r\n\t\t\t\t':user' => $user,\r\n\t\t\t\t':pass' => $pass,\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tNossl::init();\r\n\t\t$pass = '';\r\n\t\t$this->template->set('user', $user)->set('pass', $pass);\r\n\t}", "title": "" }, { "docid": "50687f0e9eabeaeef538ec81ca72e444", "score": "0.5675712", "text": "public function login_user_post() {\n $username = $this->post('username');\n $password = $this->post('password');\n\n $user = $this->user_model->login_user($username, $password);\n\n $message = [\n 'status' => 200,\n 'msg' => ($user) ? $user : 'false'\n ];\n\n $this->set_response($message, REST_Controller::HTTP_CREATED); // CREATED (201) being the HTTP response code\n }", "title": "" }, { "docid": "8578b3902e72d92908f898981fb32e1b", "score": "0.5673928", "text": "function login() {\n $loginpage = grab_home();\n $form_action = parse_action($loginpage);\n $inputs = parse_inputs($loginpage);\n $post_params = \"\";\n foreach ($inputs as $input) {\n switch ($input->getAttribute('name')) {\n case 'email':\n $post_params .= 'email=' . urlencode($GLOBALS['email']) . '&';\n break;\n case 'pass':\n $post_params .= 'pass=' . urlencode($GLOBALS['pass']) . '&';\n break;\n default:\n $post_params .= $input->getAttribute('name') . '=' . urlencode($input->getAttribute('value')) . '&';\n }\n }\n echo \"[i] Using these login parameters: $post_params\";\n /*\n * Login using previously collected form parameters\n */\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_COOKIEJAR, $GLOBALS['cookies']);\n curl_setopt($ch, CURLOPT_COOKIEFILE, $GLOBALS['cookies']);\n curl_setopt($ch, CURLOPT_USERAGENT, $GLOBALS['uagent']);\n curl_setopt($ch, CURLOPT_URL, $form_action);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);\n $loggedin = curl_exec($ch);\n if ($GLOBALS['debug']) {\n echo $loggedin;\n }\n curl_close($ch);\n /*\n * Check if location checking is turned on or you have to verify location\n */\n if (strpos($loggedin, \"machine_name\") || strpos($loggedin, \"/checkpoint/\") || strpos($loggedin, \"submit[Continue]\")) {\n echo \"\\n[i] Found a checkpoint...\\n\";\n checkpoint($loggedin);\n echo \"\\n[i] Checkpoints passed...\\n\";\n }\n}", "title": "" }, { "docid": "95edc810fe36ea91508e6fea271d18f5", "score": "0.5671768", "text": "public function loginAction() {\n\n $this->view->disable();\n\n $users = new Users();\n\n $user_login = $this->request->getPost('user_login');\n $user_passwd = sha1(md5($this->request->getPost('user_passwd')));\n $user = $users::findFirst(\"(user_login = '$user_login' OR user_email = '$user_login') AND user_passwd = '$user_passwd'\");\n if ($user->user_active) {\n $this->createSession($user->user_id, $user_login);\n $data['success'] = true;\n }\n else {\n $data['success'] = false;\n $data['message'] = 'Usuário ou senha invalido!';\n }\n\n echo json_encode($data);\n }", "title": "" }, { "docid": "2a32185e642d2b36af30e0c0073218bd", "score": "0.56709504", "text": "public function action_login2()\r\n {\r\n $user = Model_User::get_user(Arr::get($_POST, 'username', FALSE),\r\n Arr::get($_POST, 'password', FALSE));\r\n\r\n // pee off, peon\r\n if (!$user)\r\n Request::current()->redirect('site/login');\r\n \r\n VNQ::login();\r\n self::home();\r\n }", "title": "" }, { "docid": "6c1233fcc28733eebc1fc44f84c50256", "score": "0.56708956", "text": "function _loginRedirect(){\n \t// send user to the login page\n \theader(\"Location:/login.php\");\n }", "title": "" }, { "docid": "1693c683f56c03e1baa309d71f35d02f", "score": "0.5670863", "text": "protected function login(){\n $this->browser->visit($this->defaults['domain'] . $this->defaults['page']['login']);\n $this->page = $this->browser->getPage();\n $this->page->findById('edit-email')->setValue($this->email);\n $this->page->findById('edit-password')->setValue($this->pass);\n $this->page->findById('account-api-form')->submit();\n }", "title": "" }, { "docid": "823c2b2fb8623b9bf037dbd6ef5f07f6", "score": "0.56694186", "text": "public function getLoginRedirectUrl();", "title": "" }, { "docid": "457ab9cd2d0ffc8d3e60c736a0bfd1b3", "score": "0.5658597", "text": "public function loginForm()\n {\n $_SESSION['login_return_link'] = parse_url($_SERVER['HTTP_REFERER'],PHP_URL_PATH);\n return ['Login/LoginForm.php'];\n }", "title": "" }, { "docid": "7e19c856188cf349cc93b20b083cdd5a", "score": "0.5649903", "text": "protected function getLoginUrl()\n {\n return $this->router->generate('api_login');\n }", "title": "" }, { "docid": "0755d2988b6ca31073332bb2261c9069", "score": "0.56325436", "text": "public function actionLogin()\n {\n //Redirect if user already logged in\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n \n //check for post values, if return user status to show otp if pending state\n if(!empty($_POST))\n {\n $userstatus = LoginForm::user_login($_POST);\n if($userstatus == 1)\n {\n $otp = User::create_otp();\n User::send_otp_to_user($_POST['email'],'',$otp);\n }\n return $userstatus;\n }\n else\n {\n return $this->render('//login');\n } \n \n }", "title": "" }, { "docid": "f8af2af12f032f61590a59783940c944", "score": "0.5626971", "text": "function log_url(){\n\t\t$this->referal_login = do_links('login');\n\t}", "title": "" }, { "docid": "b072b5d39b7476e746cc702490cb131b", "score": "0.561634", "text": "public function loginAction()\n {\n if ($this->request->isPost()) {\n $password = $this->request->getPost(\"password\", \"string\");\n $username = $this->request->getPost(\"username\", \"string\");\n\n if (empty($username) || empty($password)) {\n $data = array(\"result\" => 1, \"msg\" => \"用户名、密码不能为空!\", \"success\" => false);\n } else {\n $user = AdminUser::findFirst([\n 'conditions' => 'username = :username:',\n 'bind' => ['username' => $username]\n ]);\n\n if ($user) {\n $security = Di::getDefault()->get(Services::SECURITY);\n\n if (!$security->checkHash($password, $user->password)) {\n $data = array(\"msg\" => \"密码错误,请重试!\", \"status\" => 1);\n } else {\n if ($user != false) {\n $this->_registerSession($user);\n $data = array(\"msg\" => \"登陆成功!\", \"status\" => 0, \"url\" => \"/admin/index/index\");\n } else {\n $data = array(\"msg\" => \"用户名不存在,请重试!\", \"status\" => 1);\n }\n }\n }\n }\n return $this->response->setJsonContent($data);\n }\n }", "title": "" }, { "docid": "f002b240b0df1cf269d4b3562261b174", "score": "0.561601", "text": "public function loginAction() {\n\t\t//figure out where the user came from\n\t\t$session = Mage::getSingleton('customer/session');\n\t\tif (!$session->getData('fbc_refer') && isset($_SERVER['HTTP_REFERER'])) {\n\t\t\t$session->setData('fbc_refer', $_SERVER['HTTP_REFERER']);\n\t\t}\n\t\t//get SSL aware attributes\n\t\tif ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')) {\n\t\t\t$forceSecure = TRUE;\n\t\t} else {\n\t\t\t$forceSecure = FALSE;\n\t\t}\n\t\t$locale = Mage::getStoreConfig('general/locale/code');\n\t\t$urlParams = array();\n\t\t$urlParts = array();\n\t\t$urlParams['return_session'] = 1;\n\t\t$urlParams['fbconnect'] = 1;\n\t\t$urlParams['extern'] = 2;\n\t\t$urlParams['display'] = 'popup';\n\t\t$urlParams['api_key'] = urlencode(Mage::getStoreConfig('metrof_fbc/fbconnect/apikey'));\n\t\t$urlParams['next'] = urlencode(Mage::getUrl('fbc/index/xdreceiver', array('_forced_secure'=>$forceSecure)));\n\t\t$urlParams['cancel_url'] = urlencode(Mage::getUrl('*'));\n\t\t$urlParams['fname'] = '_opener';\n\t\t$urlParams['locale'] = $locale;\n\t\t$urlParams['channel_url'] = urlencode(Mage::getUrl('fbc/index/xdreceiver', array('_forced_secure'=>$forceSecure)));\n\t\t$url = 'http://www.facebook.com/login.php?';\n\n\t\tforeach ($urlParams as $_k => $_v) {\n\t\t\t$urlParts[] = $_k.'='.$_v;\n\t\t}\n\t\t$url .= implode('&', $urlParts);\n\t\theader('Location: '.$url);\n\t\texit();\n\n\t}", "title": "" }, { "docid": "e4a1f77f90c97718514484efd7dbe7d1", "score": "0.561364", "text": "public function getLoginRedirectRoute();", "title": "" }, { "docid": "474d339537c619f2c0586354debf3b71", "score": "0.5609595", "text": "public function login()\n {\n $request = $this->getRequest();\n\n if (!$request->isPost()) {\n return $this->goBack();\n }\n\n $data = $request->getParams();\n\n if ($errors = $this->getFormErrors($data)) {\n $this->displayFormErrors($errors);\n return $this->goBack();\n }\n\n if (false === $user = $this->getUser($data)) {\n $this->displayLoginError();\n return $this->goBack();\n }\n $this->saveSession($user);\n if ($this->isAdmin()) {\n return $this->goAdmin();\n } elseif ($this->isDealer()) {\n return $this->goDashboard();\n }\n\n return $this->logout();\n }", "title": "" }, { "docid": "dc6df81cb0b5c4e65a0a37c0b53d95c9", "score": "0.5608222", "text": "protected function login_func() {\n if (//$this->request->is('ajax') && \n \t$this->request->is('post')) {\n\t\t\ttry {\n\t\t\tif (Configure::read('debug'))\n\t\t\t\t$website = '192.168.192.111';\n\t\t\telse\n\t \t$website = $this->request->data('website') . '.com';\n\t\t\t$http = new Client();\n\t\t\t\t$response = $http->get(\"http://$website/attendance.php\");\n\t\t\t\tif ($response->isOk()) {\n\t\t\t\t\t$content_type = $response->header('content-type');\n\t\t\t\t\tif(strpos($content_type, 'json') > 3) {\n\t\t\t\t\t\t$body = $response->body('json_decode');\n\t\t\t\t\t\t$secret = 'logged in';\n\t\t\t\t\t\t$this->Cookie->write('loggedIn',true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$secret = $content_type;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$secret = $response->code;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (\\Cake\\Core\\Exception\\Exception $e) {\n\t\t\t\t$secret = $e->getMessage();\n\t\t\t\t$this->Cookie->write('loggedIn',false);\n\t\t\t}\n\t\t} \n /*\n curl -i -d \"secret=Abc\" -H \"Accept: application/json\" \"http://localhost:8765/umb-skeletons/login\"\nHTTP/1.1 200 OK\nHost: localhost:8765\nConnection: close\nX-Powered-By: PHP/7.0.32-0ubuntu0.16.04.1\nContent-Type: application/json; charset=UTF-8\nX-DEBUGKIT-ID: 957b0bf2-e09a-4ff0-b3fa-35c39846772b\n\n{\n \"secret\": \"Abc\"\n}\n\t\t*/\n\t\telse\n\t\t\t$secret = \"Forbidden\";\n\t\treturn $secret;\n\t}", "title": "" }, { "docid": "9aca1b46e48cc5a9f7ecf2bd2cd23cb1", "score": "0.5604012", "text": "public function openAuthorizationUrl(){\r\n header('Location: '.$this->getAuthorizationUrl());\r\n exit(1);\r\n }", "title": "" } ]
a1e80fd9712ac72f24f8eacae69b4665
Handle the Marker "deleted" event.
[ { "docid": "1d0044d5f1cbd444e94856d72f68cf42", "score": "0.68692964", "text": "public function deleted(Marker $marker): void\n {\n $marker->markerMedia->each(function ($markerMedia) {\n $markerMedia->delete();\n });\n }", "title": "" } ]
[ { "docid": "a50217d315184108f90eb059b0b083f5", "score": "0.68387103", "text": "abstract public static function deleted($callback);", "title": "" }, { "docid": "43fe94adb6f79d73022631fedbb15a19", "score": "0.6837791", "text": "public function forceDeleted(Marker $marker): void\n {\n //\n }", "title": "" }, { "docid": "43315a625ab4efa2c865d54c37344d11", "score": "0.679645", "text": "abstract public function handleDelete($event);", "title": "" }, { "docid": "1fe4c54bfe734def6a0f3e3c1c352796", "score": "0.6789082", "text": "public static function deleted($event) {\n\n\t\t$item = $event->getSubject();\n\n\t\t// Trigger the onFinderAfterSave event.\n JPluginHelper::importPlugin('finder');\n\t\tJDispatcher::getInstance()->trigger('onFinderAfterDelete', array($item->app->component->self->name.'.item', &$item));\n\n\t\t$item->app->route->clearCache();\n\t}", "title": "" }, { "docid": "9663715156a87098815bc70662cb681e", "score": "0.6775065", "text": "public function onAfterDelete(MapperEvent $e)\n {\n }", "title": "" }, { "docid": "9ab5813d956429553c5566968bb94fe7", "score": "0.6754567", "text": "public function deleted(): void;", "title": "" }, { "docid": "09023671142dc6d4a25fbc85cb27655f", "score": "0.6693303", "text": "public function deleted();", "title": "" }, { "docid": "0dcc589145da8fc03f0e8de0118b0711", "score": "0.66324097", "text": "public function deleted(Event $event)\n {\n //\n }", "title": "" }, { "docid": "6157d06a258b753f7e11f09dd02dcbfe", "score": "0.660513", "text": "public function onAfterDeleteCommit(MapperEvent $e)\n {\n }", "title": "" }, { "docid": "bf91f9e278f288642f4dd424c2659fff", "score": "0.66034925", "text": "protected function onDelete(): Delete\r\n {\r\n }", "title": "" }, { "docid": "5b58ab6583a6e098bfe8c0ceadd3e3cb", "score": "0.65985286", "text": "protected function _afterDelete() {}", "title": "" }, { "docid": "90879a5798d9e08d9d07bdea5b9fa762", "score": "0.65962434", "text": "public function onBeforeDelete(MapperEvent $e)\n {\n }", "title": "" }, { "docid": "13e067f8defa4d9a42af8d886efb3841", "score": "0.659475", "text": "protected function afterDelete() {}", "title": "" }, { "docid": "cd65f8f2f3573c2199eabf95c3dee0f5", "score": "0.65351665", "text": "protected function after_delete()\n\t{\n\t}", "title": "" }, { "docid": "6fc19d0e34a47080d4806a2a55835a3d", "score": "0.65122384", "text": "protected function _afterDelete()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "187ea25f92444c905290d075d1659479", "score": "0.64597154", "text": "protected function afterDelete()\n {\n }", "title": "" }, { "docid": "f7370c86eaa73e64f7a7ea37fdb4faa6", "score": "0.64434016", "text": "public static function deleted($callback, $priority = 0)\n {\n static::registerModelEvent('deleted', $callback, $priority);\n }", "title": "" }, { "docid": "e4576990b1cc58822516658f5f67df18", "score": "0.64285874", "text": "public function afterDelete()\n {\n\t$to_delete = CalendarEntry::find()->where([\"external_source_id\"=>$this->id])->all();\n\tforeach ($to_delete as $event)\n\t\t$event->delete(); \n parent::afterDelete();\n }", "title": "" }, { "docid": "69938d257b7b2f67559be69cc2b4ad45", "score": "0.64199746", "text": "public function deleted(EntryInterface $entry)\n {\n $this->commands->dispatch(new DeleteTypeStream($entry));\n\n parent::deleted($entry);\n }", "title": "" }, { "docid": "87009af42fdc9b560a24277e29252f5a", "score": "0.6399377", "text": "public function after_delete() {\r\n }", "title": "" }, { "docid": "8e930f328ee1373280f0100629c25855", "score": "0.6361788", "text": "public function afterDelete()\n\t{\n\t\t$this->trigger('afterDelete', new Event($this));\n\t}", "title": "" }, { "docid": "b4e8db9f5a523766fb47733ad2726e54", "score": "0.63613766", "text": "public function afterDelete()\n {\n }", "title": "" }, { "docid": "6f511fba59061a7656a05f14bccbe668", "score": "0.6323282", "text": "public function afterDelete(): void;", "title": "" }, { "docid": "ad134a39c918351533e6236c8d92b735", "score": "0.6307719", "text": "protected function onDeleted(Model $item)\n {\n }", "title": "" }, { "docid": "8ce6a1785f35c62a38eaea767daf0a9e", "score": "0.63067585", "text": "protected function _postDelete() {\n\t}", "title": "" }, { "docid": "44ff1821a312d7abb0e3906f3ec4cfd2", "score": "0.62917644", "text": "public function onDelete($param)\n\t{\n\t\t$this->raiseEvent('OnDelete', $this, $param);\n\t}", "title": "" }, { "docid": "3d24991dae34e97cc1662f8b5f933d9f", "score": "0.6261839", "text": "public function onBeforeDelete() {\n\n\t\t$table = ClassInfo::table_for_object_field($this->owner->getClassName(),'Deleted');\n\t\t$now = SS_Datetime::now()->Rfc2822(); // from DataObject::write()\n\n\t\tDB::prepared_query(\"UPDATE \\\"{$table}_versions\\\"\n\t\t\t\tSET \\\"Deleted\\\" = ?\n\t\t\t\tWHERE \\\"RecordID\\\" = ? AND \\\"Version\\\" = ?\",\n\t\t\tarray($now, $this->owner->ID, $this->owner->Version)\n\t\t);\n\n\t}", "title": "" }, { "docid": "90ecfb693d0748f88a9f417b748f34e5", "score": "0.624031", "text": "public function onDeleting() {\n if($this->persistable())\n $this->kernel->gs()->delNode($this->id());\n }", "title": "" }, { "docid": "5e06cee20f9c4d9dc8bea70fdbb9e8ef", "score": "0.6212499", "text": "public function delete() {\n\t\t$this->deleted = true;\n\t}", "title": "" }, { "docid": "946d4b1c49d5505e226c95f5027ab4d5", "score": "0.61805093", "text": "public function delete()\r\n\t{\r\n\t\t$this->deleted = true;\r\n\t}", "title": "" }, { "docid": "ca827416f2a4da86778a4409ad02b779", "score": "0.6170371", "text": "protected function before_delete()\n\t{\n\t}", "title": "" }, { "docid": "ee656798b77eb78a1f492363b4acdaeb", "score": "0.61311746", "text": "public function forceDeleted(Event $event)\n {\n //\n }", "title": "" }, { "docid": "7e48743436e799d272f5c2f7a5ebee38", "score": "0.6130032", "text": "public function deleted($entity) {}", "title": "" }, { "docid": "a421575c2bf4de9ebb40d5e77221d98c", "score": "0.6116728", "text": "public function beforeHandleDelete () {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "19aaeacd5185a9c0e0972532fe43e5a8", "score": "0.6115751", "text": "public function onAdtypeDeleted($event)\n {\n //dispatch(new UpdateCache($event->adtype, true));\n }", "title": "" }, { "docid": "328db1aecbfbafa48db0d35d6ab70f95", "score": "0.61122173", "text": "public static function deleted($callback, $priority = 0);", "title": "" }, { "docid": "8e0b2e10d4fcab89e15536ab6e7f3360", "score": "0.6102982", "text": "public function onNoteDelete()\n {\n $note = $this->getActiveNote();\n $note->delete();\n }", "title": "" }, { "docid": "b9ccc4864369fe0d6c769e3f8a10d55c", "score": "0.6097641", "text": "public static function deleted($event) {\n\n\t\t$account = $event->getSubject();\n\n\t}", "title": "" }, { "docid": "3b77df844369ce8de67025dcfd9b4e22", "score": "0.60919684", "text": "protected function afterDelete()\n\t{\n\t\t$this->eventNotify('model.'.$this->getModelBaseName().'.afterDelete');\n\t}", "title": "" }, { "docid": "e3a3e10601818d3fa437dc714f60de57", "score": "0.6077495", "text": "public function delete(){\n\t\t$this->_mDeleted = true;\n\t}", "title": "" }, { "docid": "61bb7d93f9c2ade1041b16ad3004d534", "score": "0.60430706", "text": "function AfterDelete($where, &$deleted_values, &$message, &$pageObject)\n{\n\n\t\t$data = array();\n$data[\"member_id\"] = $deleted_values['member_id'];\n$data[\"chat_id\"] = $deleted_values['chat_id'];\n$data[\"flag\"] = \"1\";\nDB::Delete(\"outbox_line\", $data );\nDB::Delete(\"outbox_whatsapp\", $data );\nDB::Delete(\"outbox_telegram\", $data );\nDB::Delete(\"outbox_mail_mailchimp\", $data );\nDB::Delete(\"outbox_mail_aws\", $data );\nDB::Delete(\"outbox_mail_alibaba\", $data );\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "1ee1e4551d96a7d40aa5b250ccf4b1eb", "score": "0.60364544", "text": "function afterDelete(&$dataEntity) {\n\t}", "title": "" }, { "docid": "31dc62c2485e434b87ad387cf294106d", "score": "0.6035106", "text": "public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}", "title": "" }, { "docid": "31dc62c2485e434b87ad387cf294106d", "score": "0.6035106", "text": "public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}", "title": "" }, { "docid": "ada3215e316e4ec0c229574b6ab05c12", "score": "0.6033876", "text": "public static function customerDeleted($callback)\n {\n static::listenForCustomerEvents();\n static::registerModelEvent('customerDeleted', $callback);\n }", "title": "" }, { "docid": "ccab2e6e790f584672d5be7c8808d156", "score": "0.6015014", "text": "public function hook_after_delete($request,$records) {\n //Your code here\n\n }", "title": "" }, { "docid": "6dda8c4098d31144ba244df1cafded25", "score": "0.60050976", "text": "abstract public static function deleting($callback);", "title": "" }, { "docid": "6dda8c4098d31144ba244df1cafded25", "score": "0.60050976", "text": "abstract public static function deleting($callback);", "title": "" }, { "docid": "c8c768af4f7871824de73197d62f297b", "score": "0.59640384", "text": "public function onAdtypeDeleting($event)\n {\n }", "title": "" }, { "docid": "03c2530ed6b9470354bc0f4b4525c783", "score": "0.59540814", "text": "protected function ___deleted(array $entryIDs) {\n\t\t// for hooks to implement whatever they want\n\t}", "title": "" }, { "docid": "c8f363105a263527f1c3cd8a19f4c3ff", "score": "0.5952033", "text": "public function onafterdelete($request = [], $flags = [])\n\t{\n\t\t// Do something\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4b8fe824fea08606b7e0fec039f7dc74", "score": "0.5951638", "text": "public function onAfterDelete($event)\n {\n $this->raiseEvent('onAfterDelete', $event);\n }", "title": "" }, { "docid": "7b3d25fbe8e17136135ac1673264de73", "score": "0.5943357", "text": "public static function onDelete(ORM\\Event $event)\n\t{\n\t\t//TODO: need refactoring\n\n\t\t$id = $event->getParameter(\"id\");\n\n\t\t//Delete information blocks\n\t\t$iblockList = IblockTable::getList(array(\n\t\t\t\"select\" => array(\"ID\"),\n\t\t\t\"filter\" => array(\n\t\t\t\t\"=IBLOCK_TYPE_ID\" => $id[\"ID\"],\n\t\t\t),\n\t\t\t\"order\" => array(\"ID\" => \"DESC\")\n\t\t));\n\t\twhile ($iblock = $iblockList->fetch())\n\t\t{\n\t\t\t$iblockDeleteResult = IblockTable::delete($iblock[\"ID\"]);\n\t\t\tif (!$iblockDeleteResult->isSuccess())\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tunset($iblock);\n\t\tunset($iblockList);\n\n\t\t//Delete language messages\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$result = TypeLanguageTable::deleteByIblockTypeId($id[\"ID\"]);\n\t}", "title": "" }, { "docid": "ded47282b73edb69d0f8cc88305909e0", "score": "0.59086156", "text": "public function deleted(Message $message)\n {\n //\n }", "title": "" }, { "docid": "0cc18e950c57f1b09061c2ba6f5cec45", "score": "0.59060097", "text": "public static function onAfterDelete(Event $event)\n\t{\n\t\t$primary = $event->getParameter('primary');\n\t\t\\CIBlock::CleanCache($primary['ID']);\n\t}", "title": "" }, { "docid": "4e652f033c9587737ff343b5cc21700a", "score": "0.5901913", "text": "public function isDeleted ();", "title": "" }, { "docid": "5ed8d964c793874b410560aa2a5cc3ee", "score": "0.5886599", "text": "public function callback_beforedelete1()\n {\n }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5876587", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5876587", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5876587", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "46f0837a3d98f2cd572db6fdc3ec37d1", "score": "0.5873952", "text": "public function removed();", "title": "" }, { "docid": "3dad07dabc710592589220957a4d869f", "score": "0.5873748", "text": "public function delete(Events\\Deleted $event)\n {\n $this->deleteFile($event->website->uuid);\n $this->runScripts();\n }", "title": "" }, { "docid": "3844a162673df40404bcc3575a0df972", "score": "0.5871888", "text": "public function delete($eventPlace){\n }", "title": "" }, { "docid": "d971adab74afbb719cc1ddf4d36ca22d", "score": "0.58659804", "text": "public function onbeforedelete($request = [], $flags = [])\n\t{\n\t\t// Do something\n\t}", "title": "" }, { "docid": "290f26c693292eaba1ea6ddef68286bf", "score": "0.5856596", "text": "private function handle_delete() {\n\t\tif ( ( $value = filter_input( INPUT_GET, 'delete' ) ) && ! empty( $value ) ) {\n\t\t\tforeach ( $this->data as $id => $dt ) {\n\t\t\t\tif ( $dt == $value ) {\n\t\t\t\t\tunset( $this->data[ $id ] );\n\n\t\t\t\t\tif ( $this->type === 'spam_ip_addresses' ) {\n\t\t\t\t\t\tupdate_option( 'spamlytics_ip_addresses', $this->data );\n\t\t\t\t\t} elseif ( $this->type === 'spam_referrals' ) {\n\t\t\t\t\t\tupdate_option( 'spamlytics_referrals', $this->data );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->show_validation_error();\n\t\t}\n\t}", "title": "" }, { "docid": "b075dd8655d0da1bd4b67d552f699bfd", "score": "0.5850907", "text": "function onDelete($param)\n {\n // define the delete action\n $action = new TAction(array($this, 'Delete'));\n $action->setParameters($param); // pass the key parameter ahead\n \n // shows a dialog to the user\n new TQuestion('Tem Certeza que deseja deletar ?', $action);\n }", "title": "" }, { "docid": "4f6320dafe9b7e881a095bc45093acf9", "score": "0.584214", "text": "function AfterDelete($where,&$deleted_values,&$message,&$pageObject)\n{\n\n\t\t/*\nglobal $conn;\n$id=$deleted_values['id'];\n$sql_del= \"DELETE FROM t_facilities_timetable WHERE fid=$id\";\n$query_del=db_exec($sql_del,$conn);\n*/\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "ba730de019292fea0258bb9dfe742737", "score": "0.5836864", "text": "public function onPostDelete(StorageEvent $event)\n {\n $id = $event->getId();\n $contenttype = $event->getContentType();\n $record = $event->getContent();\n\n $storageEvent = new PusherStorageEvent($id, $contenttype, $record);\n $this->container['dispatcher']->dispatch(PusherEvents::PREPARE_STORAGE_EVENT, $storageEvent);\n\n $config = $this->container['pusher.config'];\n\n if ($config->isValid() && $contenttype = $config->getContentType($contenttype)) {\n if ($contenttype->get('deleted')) {\n $this->container['pusher']->trigger($storageEvent->getChannelName(), $storageEvent->getDeletedEventName(), $storageEvent->getData());\n }\n }\n }", "title": "" }, { "docid": "e9eb7d84967a097f97a4e53d517f6c5f", "score": "0.5833972", "text": "public function deleted(Customer $customer)\n {\n //\n }", "title": "" }, { "docid": "dacd68d7b907da23afda79bee544f933", "score": "0.58296204", "text": "public function hook_after_delete($id) {\r\n\t //Your code here\r\n\r\n\t }", "title": "" }, { "docid": "dacd68d7b907da23afda79bee544f933", "score": "0.58296204", "text": "public function hook_after_delete($id) {\r\n\t //Your code here\r\n\r\n\t }", "title": "" }, { "docid": "02e931ef5b1497be72af9c8c73525bfd", "score": "0.5824296", "text": "public function isDeleted();", "title": "" }, { "docid": "02e931ef5b1497be72af9c8c73525bfd", "score": "0.5824296", "text": "public function isDeleted();", "title": "" }, { "docid": "0ebe8c54a49250ae546fb02980b78b7b", "score": "0.5821501", "text": "public function afterDelete()\n {\n\t\t$this->_clearCache();\n }", "title": "" }, { "docid": "7f9464d9417f20952c57a019bc840271", "score": "0.5820086", "text": "protected function doDel()\n {\n \n }", "title": "" }, { "docid": "7f9464d9417f20952c57a019bc840271", "score": "0.5820086", "text": "protected function doDel()\n {\n \n }", "title": "" }, { "docid": "dc8daf6babf2c6ff56d905aeb0e283c2", "score": "0.5815339", "text": "public function afterDelete(\\DotbBean $activity);", "title": "" }, { "docid": "6b4cf2a612e559e874d420a17c2b82ba", "score": "0.58152497", "text": "public function deleted($seriesAlias)\n {\n parent::deleted($seriesAlias);\n\n Log::Info(\"Deleted series alias\", ['series alias' => $seriesAlias->id, 'series' => $seriesAlias->series->id]);\n }", "title": "" }, { "docid": "7815743fd701e1b08a73f348a0cb52a9", "score": "0.5814401", "text": "public function delete()\n {\n $this->setIsDeleted();\n }", "title": "" }, { "docid": "33d708da50093ae11b2cc0288d33ad60", "score": "0.5808474", "text": "public function deleting(): void;", "title": "" }, { "docid": "5e19b0028e7adfa24a77dfb2f68b983e", "score": "0.5807661", "text": "public function afterDelete($event)\n {\n $this->removeFiles();\n }", "title": "" }, { "docid": "b3e19bf0131dcb5da4008e87ee1bf1ba", "score": "0.5806061", "text": "protected function _beforeDelete()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7ecfe463cfbf4bd5d7b7f4da77ce650a", "score": "0.57994413", "text": "public function deleted(Convocatoria $convocatoria)\n {\n //\n }", "title": "" }, { "docid": "fef4861d75a1bd65701cf4c03a953d21", "score": "0.57978123", "text": "public function onDelete() {\n /** Check if this is even set **/\n if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) {\n /** cycle through each id **/\n foreach ($checkedIds as $objectId) {\n /** Check if there's an object actually related to this id\n * Make sure you replace MODELNAME with your own model you wish to delete from.\n **/\n if (!$object = Email::find($objectId))\n continue; /** Screw this, next! **/\n /** Valid item, delete it **/\n $object->delete();\n }\n\n }\n /** Return the new contents of the list, so the user will feel as if\n * they actually deleted something\n **/\n return $this->listRefresh();\n }", "title": "" }, { "docid": "b70be6486b1b2e37cc593773eb709bdd", "score": "0.5788437", "text": "public function onAfterDeletePerson(KEvent $event)\n {\n return true;\n }", "title": "" }, { "docid": "e7f54f5c275c4329778498458ab1edd7", "score": "0.5787015", "text": "protected function beforeDelete()\n {\n $this->dispatcher->getEventsManager()->fire(Events::BEFORE_DELETE, $this);\n }", "title": "" }, { "docid": "aba2d7e8cd7e37e2255ceb0b75c77360", "score": "0.57799846", "text": "protected function attachToEntityDeleted()\n {\n $this->getEventManager()->attach(\n static::SERVICE_NAME . '::entity_deleted',\n function(Event $event) {\n $entity = $event->getParam('entity');\n $tablePrefix = $event->getParam('table_prefix');\n\n // Remove entity from cache\n $this->removeEntityFromCache($entity, $tablePrefix);\n }\n );\n }", "title": "" }, { "docid": "7c732667e3be7c327345526845ab9cc1", "score": "0.5778373", "text": "public function before_delete() {\r\n }", "title": "" }, { "docid": "25ac9600e22a3c46aa01eba877676f80", "score": "0.57693374", "text": "public static function deleted($event) {\n\n\t\t$submission = $event->getSubject();\n\n\t}", "title": "" }, { "docid": "3fa2594616b52a5983bec360fccc2977", "score": "0.5769337", "text": "protected function observeDeletion(MetaItem $item)\n {\n $item::deleted(function ($model)\n {\n if (! is_null($key = $this->findItem($model->name))) {\n $this->forget($key);\n }\n });\n }", "title": "" }, { "docid": "f13e5ee1d1dc1d64b886f5feb91aad2a", "score": "0.57598567", "text": "protected function _delete() {\n\t}", "title": "" }, { "docid": "49d15f822dfd652237898762b1555ff1", "score": "0.57562035", "text": "public function onRemove()\n {\n try {\n $this->repository->getFilesystem()->delete($this->storageKey);\n } catch (FileNotFound $e) {\n if (!$this->isMissingFileIgnoredOnDelete()) {\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "99497105095dc34aa34fd909f9a5b72d", "score": "0.5753656", "text": "public function delete_event()\n {\n delete_event($this->serial_number, $this->tablename);\n }", "title": "" }, { "docid": "e7cb2af3183bec55c372c3362add9657", "score": "0.5751329", "text": "public function preDelete(){}", "title": "" }, { "docid": "e17f0bd077db7c10ce149cafb3ad7fce", "score": "0.5749939", "text": "public function onImageWasDeleted(ImageWasDeleted $event)\n {\n $m = new Medium();\n $medium = Medium::where('path', $m->convertFilemanagerEventPathToMediumPath($event->path()))\n ->where('medium_name', basename($event->path()))\n ->get()->first();\n $medium->delete();\n }", "title": "" }, { "docid": "2238093eb94f2dc84da228802f849319", "score": "0.5748736", "text": "public function whenStreamDeleted(StreamDeletedEvent $event)\n {\n $this->execute(new DropStreamsEntryTableCommand($event->getStream()));\n }", "title": "" }, { "docid": "67119488143baef283231b621cf4fa0b", "score": "0.5747415", "text": "public function hook_after_delete($id) {\n\n //Your code here\n\n }", "title": "" }, { "docid": "8aa0de51846e795f280bb4dcd6882178", "score": "0.57465106", "text": "public function afterDelete()\n {\n parent::afterDelete();\n Comment::deleteAll('post_id = :post_id', [':post_id' => $this->id]);\n Tag::updateFrequency($this->tags, '');\n }", "title": "" }, { "docid": "01785fa14757ce425dc56778e11281b4", "score": "0.57463837", "text": "public function deleted(Post $post)\n {\n //\n }", "title": "" }, { "docid": "01785fa14757ce425dc56778e11281b4", "score": "0.57463837", "text": "public function deleted(Post $post)\n {\n //\n }", "title": "" } ]
8d3ea2eaec945ec74fdea09586c3a147
Revisar la existencia del correo electronico del alumno
[ { "docid": "6b349c51773ec01ee55d601424df62b6", "score": "0.0", "text": "public function checkExistenceAlumno($email){\n $sqlquery = \"SELECT email FROM alumno WHERE email = :EMAIL\";\n $statement = $this -> conexion ->prepare($sqlquery);\n $statement ->bindParam(\":EMAIL\", $email, PDO::PARAM_STR);\n $statement -> execute();\n $dato = $statement ->fetch(PDO::FETCH_ASSOC);\n return $dato ? true : false;\n }", "title": "" } ]
[ { "docid": "e593beba05039acc3bf3e946b5783352", "score": "0.684002", "text": "function estaRegistrado($correo){\r\n $cliente = getCliente($correo);\r\n $correo = $cliente['correo'];\r\n $celular =$cliente['celular'];\r\n\r\n if($correo!=\"\" && $celular!=0){\r\n return true;\r\n\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "8115a1ee94b5bd0fc3af78f90c8f583e", "score": "0.6574223", "text": "public function crearCorreoInstitucional(){\n $nom0 = $this->attributes['nombre'];\n //tomo el/los apellido/s del preinscripto\n $ape0 = $this->attributes['apellido'];\n //defino el dominio que tendrá cada mail creado\n $dominio = \"@udc.edu.ar\";\n \n $nom = $this->inicialesDeNombres($nom0);\n $nom1 = $this->sanear_string($nom);\n \n $ape = $this->apellidosCompletos($ape0);\n $ape1 = $this->sanear_string($ape);\n \n $correo_institucional = $nom1.$ape1.$dominio; \n $this->attributes['email_institucional'] = $correo_institucional;\n $this->save();\n }", "title": "" }, { "docid": "7c4a4791819ff52e2b5e3aa9d98c4b3e", "score": "0.6219538", "text": "function pregistrarUsuario($phone, $email,$codigo_verficacion)\r\n{\r\n global $configuracion;\r\n $mysqli= $configuracion->mysqli;\r\n //Buscar el numero en la BD\r\n if(isEmailinClienteTable($email)== false){\r\n $addphone = \"Insert into cliente\r\n(correo,celular,fecha_registro,saldo,codigo_verficacion,numero_temporal)\r\nVALUES ('$email','','','','$codigo_verficacion','$phone')\";\r\n }\r\n else {\r\n $addphone = \"UPDATE cliente\r\n SET\r\n codigo_verficacion='$codigo_verficacion',\r\n numero_temporal='$phone'\r\n WHERE correo='$email'\";\r\n }\r\n\r\n $rs = $mysqli->query($addphone);\r\n if ($rs == true) {\r\n $resultado = true;\r\n } else {\r\n $resultado = false;\r\n }\r\n\r\n return $resultado;\r\n\r\n}", "title": "" }, { "docid": "c00e59734cb0bd1ce44f82969a1c9eec", "score": "0.616329", "text": "public static function existeUsuario($correo){\n\n $query = \"SELECT usuario_id,nombre,apellido,correo,telefono,fecha_registro,privilegio_id \n FROM usuario WHERE correo= :correo\";\n \n self::getConexion();\n \n $resultado = self::$cnx->prepare($query);\n\n $resultado->bindParam(\":correo\", $correo);\n \n $resultado->execute();\n $filas= $resultado->fetch();\n\n $cantidadFilas = mysqli_num_rows($filas);\n\n if($cantidadFilas>0)\n {\n return false;\n }else{\n // $usuario = new Usuario();\n\n // $usuario->setId($filas[\"usuario_id\"]);\n // $usuario->setNombre($filas[\"nombre\"]);\n // $usuario->setApellido($filas[\"apellido\"]);\n // $usuario->setCorreo($filas[\"correo\"]);\n // $usuario->setTelefono($filas[\"telefono\"]);\n // $usuario->setFecha_registro($filas[\"fecha_registro\"]);\n // $usuario->setPrivilegioId($filas[\"privilegio_id\"]);\n //info ya cargada en el objeto\n //ahora se retorna esa entidad\n return true;\n }\n\n \n }", "title": "" }, { "docid": "0b50f0ae349465bb9ac27c651c81ea80", "score": "0.6104276", "text": "function envia_correo2($idcode, $tipocorreo, $idpaquete){\nreturn true;\n}", "title": "" }, { "docid": "65067f96c3ca72432afdf44a04e3b51d", "score": "0.6098161", "text": "function enviarCorreoElectronico($matrizDeDestinatariosPrincipales, $asunto, $titular, $cadenaDeMensaje, $matrizDeCC, $procesoGenerador, $idDeEmpresaDestino, $matrizDeFicherosAdjuntos = array()) {\n\t\tglobal $conexion; // Para grabar el historico.\n\t\tglobal $nombreDeLaEmpresaGestora;\n\t\tglobal $correoParaGestion;\n\n\t// Si la empresa de destino está dada de baja, no se envía ni graba nada.\n\t\tif ($idDeEmpresaDestino > \"0\") {\n\t\t\t$abandonarProceso = false;\n\t\t\t$consulta = \"SELECT \";\n\t\t\t$consulta .= \"sigue_vigente \";\n\t\t\t$consulta .= \"FROM \";\n\t\t\t$consulta .= \"maestro_de_empresas \";\n\t\t\t$consulta .= \"WHERE \";\n\t\t\t$consulta .= \"id_de_empresa = '\".$idDeEmpresaDestino.\"';\";\n\t\t\t$hacerConsulta = mysql_query($consulta, $conexion);\n\t\t\tif (mysql_num_rows($hacerConsulta) == 0) {\n\t\t\t\t$abandonarProceso = true;\n\t\t\t} else {\n\t\t\t\tif (mysql_result($hacerConsulta, 0, \"sigue_vigente\") == \"N\")\n\t\t\t\t\t$abandonarProceso = true;\n\t\t\t}\n\t\t\t@mysql_free_result($hacerConsulta);\n\t\t\tif ($abandonarProceso) return;\n\t\t}\n\t// Fin de comprobación de si la empresa destinataria está vigente.\n\n\t\tif (isset($matrizDeOrigen))\tunset($matrizDeOrigen);\n\t\t$matrizDeOrigen = array();\n\t\t$matrizDeOrigen[\"nombre\"] = $nombreDeLaEmpresaGestora;\n\t\t$matrizDeOrigen[\"correo\"] = $correoParaGestion;\n\t\t\n\t// Comprobamos si hay destinatarios principales.\n\t\tif (count($matrizDeDestinatariosPrincipales) == 0) return; // Si no hay destinatarios, no hay correo.\n\t\t\t\n\t// Recortamos los límites de las cadenas recibidas.\n\t\t$asunto = trim($asunto);\n\t\t$titular = trim($titular);\n\t\t$cadenaDeMensaje = trim($cadenaDeMensaje);\n\n\t\tglobal $URL_imagenDeCorreo;\n\t\tglobal $PAIS_deOrigen;\n\n\t// Variables de encabezado y pie de correos.\n\t\t$encabezadoGeneral = \"\";\n\t\t$encabezadoGeneral .= \"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\";\n\t\t$encabezadoGeneral .= \"<html xmlns='http://www.w3.org/1999/xhtml'>\";\n\t\t$encabezadoGeneral .= \"<head>\";\n\t\t$encabezadoGeneral .= \"<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-15' />\";\n\t\t$encabezadoGeneral .= \"</head>\";\n\t\t$encabezadoGeneral .= \"<body>\";\n\t\t$encabezadoGeneral .= \"<div style='text-align:left; padding:10px; font-size:16px; font-family:Arial,Tahoma,Verdana; color:blue; \";\n\t\t$encabezadoGeneral .= \"border-top:3px solid #DBDBDB; border-left:3px solid #DBDBDB; border-bottom: 1px solid #808080; border-right: 1px solid #808080;'>\";\n\t\t$encabezadoGeneral .= $titular;\n\t\t$encabezadoGeneral .= \"</div><br /><br />\";\n\t\t$encabezadoGeneral .= \"<div style='font-family:Arial,Tahoma,Verdana,sans-serif; font-size:12px; color:#000 !important; text-align:justify;'>\";\n\t\t$pieGeneral = \"\";\n\t\t$pieGeneral .= \"</div><br /><br />\";\n\t\tif ($PAIS_deOrigen == \"es\") {\n\t\t\t$pieGeneral .= \"<p style='font-family:Arial,Tahoma,Verdana,sans-serif; font-size:10px; color:#000 !important; text-align:justify;'>\";\n\t\t\t$pieGeneral .= \"Este correo electrónico y la información contenida en el mismo es de carácter confidencial y está sometida al secreto profesional, \";\n\t\t\t$pieGeneral .= \"dirigiéndose exclusivamente al destinatario mencionado en el encabezamiento, cuyos datos forman parte de un fichero responsabilidad \";\n\t\t\t$pieGeneral .= \"de ENTORNO DE GESTIÓN DOCUMENTAL, S.L. con dirección en CL IGLESIA Nº11 3º, CP 28220, MAJADAHONDA (Madrid) y cuya finalidad \";\n\t\t\t$pieGeneral .= \"es contactar con el titular de los datos a través del correo electrónico. Le informamos que cuenta con los derechos ARCO, \";\n\t\t\t$pieGeneral .= \"que podrá ejercitar en la dirección arriba indicada o mediante el envío de un e-mail, adjuntando fotocopia de su DNI. \";\n\t\t\t$pieGeneral .= \"Si el receptor de la comunicación no fuera el destinatario, le informamos que cualquier divulgación, copia, distribución o utilización no \";\n\t\t\t$pieGeneral .= \"autorizada de la información contenida en la misma está prohibida por la legislación vigente.\";\n\t\t\t$pieGeneral .= \"</p><br /><br />\";\n\t\t}\n\t\t$pieGeneral .= \"<img src='cid:sello' width='132' height='31' border='0' />\";\n\t\t$pieGeneral .= \"</body></html>\";\n\n\t\tinclude_once(\"correos/class.phpmailer.php\");\n\t\t$objetoDeCorreo = new phpMailer();\n\t\t$objetoDeCorreo->IsSMTP();\n\t\t$objetoDeCorreo->SMTPAuth = true;\n\t\t$objetoDeCorreo->Host = \"127.0.0.1\";\n\t\t$objetoDeCorreo->From = $matrizDeOrigen[\"correo\"];\n\t\t$objetoDeCorreo->FromName = $matrizDeOrigen[\"nombre\"];\n\t\t$objetoDeCorreo->AddEmbeddedImage($URL_imagenDeCorreo, \"sello\", $URL_imagenDeCorreo);\n\t\t$objetoDeCorreo->isHTML(true);\n\t\t$listaDeDestinatarios = \"\"; // Para el historico\n\t\tforeach ($matrizDeDestinatariosPrincipales as $destino) {\n\t\t\t$objetoDeCorreo->AddAddress(key($destino));\n\t\t\t$listaDeDestinatarios .= key($destino).\",\"; // Para el historico\n\t\t}\n\t\tforeach ($matrizDeCC as $cc) $objetoDeCorreo->AddCC($cc);\n\n\t\t$objetoDeCorreo->Subject = $asunto;\n\t\t$mensaje = $encabezadoGeneral.$cadenaDeMensaje.$pieGeneral;\n\n\t\t$objetoDeCorreo->Body = $mensaje;\n\t\t$objetoDeCorreo->WordWrap = 50;\n\t\t\n\t\tforeach ($matrizDeFicherosAdjuntos as $adjunto)\t$objetoDeCorreo->AddAttachment($adjunto);\n\t\t$resultado = $objetoDeCorreo->Send();\n\t\tunset($objetoDeCorreo);\n\n\t// A partir de aquí se graba el correo en el histórico (se pone como opcional, durante la implantación, pero tras esa fase, operará siempre).\n\t\t$cadenaDeMensaje = str_replace(\"'\", \"`\", $cadenaDeMensaje);\n\t\t$consulta = \"INSERT INTO historico_de_correos (\";\n\t\t$consulta .= \"fecha, \";\n\t\t$consulta .= \"hora, \";\n\t\t$consulta .= \"correos_de_destinatarios, \";\n\t\t$consulta .= \"id_de_empresa, \";\n\t\t$consulta .= \"asunto, \";\n\t\t$consulta .= \"titular, \";\n\t\t$consulta .= \"contenido, \";\n\t\t$consulta .= \"testigo_de_adicionales, \";\n\t\t$consulta .= \"proceso, \";\n\t\t$consulta .= \"adjuntos\";\n\t\t$consulta .= \") VALUES (\";\n\t\t$consulta .= \"'\".date(\"Y-m-d\").\"', \";\n\t\t$consulta .= \"'\".date(\"H:i:s\").\"', \";\n\t\t$consulta .= \"'\".$listaDeDestinatarios.\"', \";\n\t\t$consulta .= \"'\".$idDeEmpresaDestino.\"', \";\n\t\t$consulta .= \"'\".$asunto.\"', \";\n\t\t$consulta .= \"'\".$titular.\"', \";\n\t\t$consulta .= \"'\".$cadenaDeMensaje.\"', \";\n\t\t$consulta .= \"'\".implode(\",\", $matrizDeCC).\"', \";\n\t\t$consulta .= \"'\".$procesoGenerador.\"', \";\n\t\t$consulta .= \"'\".implode(\",\", $matrizDeFicherosAdjuntos).\"'\";\n\t\t$consulta .= \");\";\n\t\t$hacerConsulta = mysql_query($consulta, $conexion);\n\t\t@mysql_free_result($hacerConsulta);\n\t}", "title": "" }, { "docid": "0aa1adba84807a531b9d34da2da08650", "score": "0.60926783", "text": "function envia_correo_detencion($id_campana,$opcion){\n\n\n\n\t$query=\"Select nombre,id_empresa from Campanas Where id='\".$id_campana.\"'\";\n\t$campanas=exe_query($query,2);\n\n\t$query=\"Select email2 from Empresas Where id='\".$campanas['id_empresa'].\"'\";\n\t$correos=exe_query($query,4);\n\t\n\t$query=\"Select compania From Empresas Where id='\".$campanas['id_empresa'].\"'\";\n\t$nombre_empresa=exe_query($query,4);\n\t\t\n\tif($correos == \"\")\n\t\t$correos=\"chernandez@conectatel.com.mx;aramirez@conectatel.com.mx;edorantes@conectatel.com.mx\";\n\t\t\n\t$nombre_campana=$campanas['nombre'];\n\t\t\n\t\t\n\t\t\n\tif($opcion==\"cron\"){\n\t\t\t\n\t\t$query=\"Insert into Historial_estado_campanas (id_empresa,id_campana,estado,fecha,comentarios) values ('\".$campanas['id_empresa'].\"','\".$id_campana.\"','2',NOW(),'Detencion de la campana por cron')\";\n\t\texe_query($query,\"\");\n\t\t\t\n\t\t$mensaje=\"La Campana \".$nombre_campana.\" de la empresa <strong>$nombre_empresa</strong> ha sido detenida de manera automatica por el sistema\n\t\t\t\t \n\t\t\t\tLa campana estaba en proceso pero no ha respondido desde hace mas de 2 minutos\n\t\t\t\t\t\n\t\t\t\tInicie de manera manual la campaņa o programe su ejecucion\n\t\t\t\t\t\n\t\t\t\tNota: No responda a este mensaje, ha sido generado de manera automatica\";\n\t\t\t\n\t\tenviacorreo('ssl://smtp.gmail.com',465,'ccs@conectatel.com.mx','C0n3ctat3l@2012','ccs@conectatel.com.mx','Infinit Call Center Suite','Detencion de Campana: '.$nombre_campana.' por el sistema',$mensaje,$correos);\n\t}\n\n\n\n\n\tif($opcion==\"manual\"){\n\n\t\tglobal $empresa;\n\t\tglobal $user;\n\t\t\t\n\t\t$query=\"Insert into Historial_estado_campanas (id_empresa,id_campana,estado,fecha,comentarios) values ('\".$empresa->getid().\"','\".$id_campana.\"','2',NOW(),'Detencion de la campana por usuario \".$user->getnombre().\"')\";\n\t\texe_query($query,\"\");\n\t\t\t\n\t\t$mensaje=\"La Campana \".$nombre_campana.\" de la empresa <strong>$nombre_empresa</strong> ha sido detenida de manera manual por el usuario \".$user->getnombre().\"\n\t\t\t\t\t\n\t\t\t\tNota: No responda a este mensaje, ha sido generado de manera automatica\";\n\t\t\t\n\t\tenviacorreo('ssl://smtp.gmail.com',465,'ccs@conectatel.com.mx','C0n3ctat3l@2012','ccs@conectatel.com.mx','Infinit Call Center Suite','Detencion de Campana: '.$nombre_campana.' por usuario',$mensaje,$correos);\n\t}\n\n\n\n\tif($opcion==\"schedule\"){\n\t\t\t\n\t\t$query=\"Insert into Historial_estado_campanas (id_empresa,id_campana,estado,fecha,comentarios) values ('\".$campanas['id_empresa'].\"','\".$id_campana.\"','2',NOW(),'Detencion programada de campana')\";\n\t\texe_query($query,\"\");\n\t\t\t\n\t\t$mensaje=\"La Campana \".$nombre_campana.\" de la empresa <strong>$nombre_empresa</strong> ha sido detenida de manera programada\n\t\t\t\t \n\t\t\t\tNota: No responda a este mensaje, ha sido generado de manera automatica\";\n\t\t\t\n\t\tenviacorreo('ssl://smtp.gmail.com',465,'ccs@conectatel.com.mx','C0n3ctat3l@2012','ccs@conectatel.com.mx','Infinit Call Center Suite','Detencion programada de Campana: '.$nombre_campana.'',$mensaje,$correos);\n\t}\n\n\n\n\tif($opcion==\"inicio\"){\n\t\t\t\n\t\t$query=\"Insert into Historial_estado_campanas (id_empresa,id_campana,estado,fecha,comentarios) values ('\".$campanas['id_empresa'].\"','\".$id_campana.\"','1',NOW(),'Iniciando campana por restauracion del sistema')\";\n\t\texe_query($query,\"\");\n\t\t\t\n\t\t$mensaje=\"La Campana \".$nombre_campana.\" de la empresa <strong>$nombre_empresa</strong> ha sido reanudada manera automatica por el sistema\n\t\t\t\t \n\t\t\t\tLa campana se habia detenido por no estar resgistrandose desde hace 2 minutos\n\t\t\t\t\t\n\t\t\t\tNota: No responda a este mensaje, ha sido generado de manera automatica\";\n\t\t\t\n\t\tenviacorreo('ssl://smtp.gmail.com',465,'ccs@conectatel.com.mx','C0n3ctat3l@2012','ccs@conectatel.com.mx','Infinit Call Center Suite','Inicio automatico de Campana: '.$nombre_campana.' por el sistema',$mensaje,$correos);\n\t}\n\n\n\n}", "title": "" }, { "docid": "78aab0a9a785a68fcd7ae776ee0ecd76", "score": "0.6000345", "text": "function envia_correo($idcode, $tipocorreo, $idpaquete){\n $id_paquete=$idpaquete;\n //Primero obtenemos los datos del cliente\n $qry = mysql_query(\"select * from Cliente where id_cliente='$idcode'\");\n if(mysql_num_rows($qry) > 0){\n $nombre = mysql_result($qry, 0, \"nombre\");\n $apellidos = mysql_result($qry, 0, \"apellidos\");\n $dir = mysql_result($qry, 0, \"direccion\");\n $direccion = $dir;\n $numext = mysql_result($qry, 0, \"numext\");\n $numint = mysql_result($qry, 0, \"numint\");\n $colonia = mysql_result($qry, 0, \"colonia\");\n $poblacion = mysql_result($qry, 0, \"poblacion\");\n $zip = mysql_result($qry, 0, \"codigo_postal\");\n $idedo = get_nombre_estado(mysql_result($qry, 0, \"id_estado\"));\n $estado = $idedo;\n $telefono = mysql_result($qry, 0, \"telefono\");\n $email = mysql_result($qry, 0, \"email\");\n $cantidad = mysql_result($qry, 0, \"auxiliar1\");\n }\n else\n return(\"null\");\n\n $bolmain = split(\":\", get_boletos($idcode, $idpaquete, 1));\n $printmain = \"<table border=2 width=300><tr><td><font face=Arial, Helvetica, sans-serif size=2><b>\";\n $i=1;\n foreach($bolmain as $key){\n if($i==3)\n $printmain .= \"<br>\";\n $printmain = $printmain .\"&nbsp; $key &nbsp;\";\n $i++;\n }\n $printmain .= \"</td></tr></table>\";\n\n\n //Obtenemos el mail de confirmacion\n $ruta = \"/var/www/html/edm/paquete\".$idpaquete.\"/mailbot/\";\n if($tipocorreo == \"si\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolgiv = split(\":\", get_boletos($idcode, $idpaquete, 5));\n $bol2 = split(\":\", get_boletos($idcode, $idpaquete, 4));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses.php\";\n include $ruta;\n }\n if($tipocorreo == \"bnk\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_banco.php\";\n include $ruta;\n }\n if($tipocorreo == \"bnk2\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolgiv = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_BNK2.php\";\n include $ruta;\n }\n if($tipocorreo == \"tdc\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolgiv = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_TDC.php\";\n include $ruta;\n }\n if($tipocorreo == \"tdc2\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolgiv = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_TDC2.php\";\n include $ruta;\n }\n if($tipocorreo == \"efe\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolyes2 = split(\":\", get_boletos($idcode, $idpaquete, 4));\n $url_oxxo = get_codigo_oxxo($idcode, $idpaquete);\n $url_seven = get_codigo_seven($idcode, $idpaquete);\n $num_oxxo = substr($url_oxxo, -26);\n $num_seven = substr($url_seven, -32);\n $vimiento = date(\"d-M-Y\", mktime(0, 0, 0, date('m'), date('d')+15, date('Y')));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_efe.php\";\n include $ruta;\n }\n if($tipocorreo == \"meses\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolyes2 = split(\":\", get_boletos($idcode, $idpaquete, 4));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_tarjeta_meses.php\";\n include $ruta;\n } \n if($tipocorreo == \"pr\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_pr.php\";\n include $ruta;\n } \n if($tipocorreo == \"full\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolyes1 = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yes.php\";\n include $ruta;\n } \n if($tipocorreo == \"contado\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolrubi = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $bolyes2 = split(\":\", get_boletos($idcode, $idpaquete, 4));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_contado.php\";\n include $ruta;\n } \n if($tipocorreo == \"abonos\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolrubi = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $bolyes2 = split(\":\", get_boletos($idcode, $idpaquete, 4));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_abonos.php\";\n include $ruta;\n } \n if($tipocorreo == \"tel\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolrubi = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_tel.php\";\n include $ruta;\n } \n if($tipocorreo == \"tel2\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolrubi = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_tel2.php\";\n include $ruta;\n } \n if($tipocorreo == \"DD\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolgiv = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yessesDD.php\";\n include $ruta;\n }\n if($tipocorreo == \"no\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2)); \n $bolyes1 = split(\":\", get_boletos($idcode, $idpaquete, 3)); \n $subject = \"Confirmaci�n de Participaci�n\";\n $ruta = $ruta.\"mail_noes.php\";\n include $ruta;\n }\n if($tipocorreo == \"triple\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolgiv = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"$nombre, gracias por tu orden!!\";\n $ruta = $ruta.\"mail_triple.php\";\n @include $ruta;\n }\n if($tipocorreo == \"datos\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolgiv = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"$nombre, gracias por favor completa los datos de tu obsequiado!!\";\n $ruta = $ruta.\"mail_datos.php\";\n @include $ruta;\n }\n if($tipocorreo == \"BML\"){\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolgiv = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $subject = \"$nombre, gracias por tu orden!!\";\n $ruta = $ruta.\"mail_yes_BML.php\";\n @include $ruta;\n }\n\n $headers = \"From: Reader's Digest <servicio.clientes@selecciones.etapafinal2.com.mx> \\n\";\n $headers .= \"Content-Type: text/html; charset=iso-8859-1\\n\";\n\n if(isset($mailbody)){\n if(!mail($email, $subject, $mailbody, $headers))\n return false;\n }else\n return false;\n }", "title": "" }, { "docid": "1d3a65294df977fcbbfa0b69b361df64", "score": "0.5883829", "text": "public function validar(){\r\n\t\tforeach ($this->aEmpleados as $key => $value) {\r\n\t\t\tif ($value == $this->sNomActual) {\r\n\t\t\t\t$this->bExiste = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\tif($this->bExiste){\r\n\t\t\t\techo 'Bienvenido '. $this->sNomActual;\r\n\t\t\t}else{\r\n\t\t\t\techo 'Usted no es un empleado.';\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "db7f52740f64b0e88ca5281e4c61396b", "score": "0.57836235", "text": "function enviar_notificacion($nombre_emisor, $correos_destino, $nombre_destinatario, $mensaje, $asunto, $correos_con_copia, $correos_con_copia_oculta, $archivos_adjuntos, $id_plaza, $id_almacen){\n\t\n\t// *** Extrae los correos de destino, con_copia y con_copia_oculta segun la opcion *** //\n\tif($correos_destino == \"\"){\n\t\t$where = \"\";\n\t\t\n\t\tif($id_plaza != \"\"){ // *** Asignacion de Pipeline *** //\n\t\t\t$where .= \" AND id_plaza = \".$id_plaza;\n\t\t}\n\t\t\n\t\tif($id_almacen != \"\"){ // *** Asignacion de Pipeline *** //\n\t\t\t$where .= \" AND id_almacen = \".$id_almacen;\n\t\t}\n\t\t\n\t\t$query_correos_destino = \"\n\t\t\tSELECT GROUP_CONCAT(correo) AS correos\n\t\t\tFROM cl_notificaciones\n\t\t\tWHERE opcion_notificacion = \".$opcion.\" AND activo = 1\n\t\t\tAND tipo_envio = 'destino' \".$where.\"\n\t\t\tGROUP BY opcion_notificacion\n\t\t\";\n\t\t$result_correos_destino = mysql_query($query_correos_destino);\n\t\t$datos_correos_destino = mysql_fetch_array($result_correos_destino);\n\t\t$correos_destino = $datos_correos_destino[\"correos\"];\n\t\t\n\t\t$query_correos_con_copia = \"\n\t\t\tSELECT GROUP_CONCAT(correo) AS correos\n\t\t\tFROM cl_notificaciones\n\t\t\tWHERE opcion_notificacion = \".$opcion.\" AND activo = 1\n\t\t\tAND tipo_envio = 'con_copia' \".$where.\"\n\t\t\tGROUP BY opcion_notificacion\n\t\t\";\n\t\t$result_correos_con_copia = mysql_query($query_correos_con_copia);\n\t\t$datos_correos_con_copia = mysql_fetch_array($result_correos_con_copia);\n\t\t$correos_con_copia = $datos_correos_con_copia[\"correos\"];\n\t\t\n\t\t$query_correos_con_copia_oculta = \"\n\t\t\tSELECT GROUP_CONCAT(correo) AS correos\n\t\t\tFROM cl_notificaciones\n\t\t\tWHERE opcion_notificacion = \".$opcion.\" AND activo = 1\n\t\t\tAND tipo_envio = 'con_copia_oculta' \".$where.\"\n\t\t\tGROUP BY opcion_notificacion\n\t\t\";\n\t\t$result_correos_con_copia_oculta = mysql_query($query_correos_con_copia_oculta);\n\t\t$datos_correos_con_copia_oculta = mysql_fetch_array($result_correos_con_copia_oculta);\n\t\t$correos_con_copia_oculta = $datos_correos_con_copia_oculta[\"correos\"];\n\t}\n\t// *** Termina Extrae los correos de destino, con_copia y con_copia_oculta segun la opcion *** //\n\t\n\t$subject = '';\n\t$link = '';\n\t$ruta_base_sys = 'http://201.99.107.11/sysaudinet_dev/';\n\t$ruta_base_red = 'http://201.99.107.11/redaudinet_dev/';\n\t\n\t$body = '\n\t\t<div style=\"width: 100%;\">\n\t\t\t<div style=\"border: 1px solid #CCC; margin: auto; width: 70%;\">\n\t\t\t\t<div style=\"padding-left: 15px; padding-right: 15px;\">\n\t\t\t\t\t<p style=\"font-weight: bold; font-size: 14px;\">Estimado (a): '.$nombre_destinatario.'</p>\n\t\t\t\t\t<hr style=\"color: #CCC;\">\n\t\t\t\t\t<p style=\"padding-bottom: 17px;\"></p>\n\t';\n\t\t\n\tif($opcion == 2){ // *** Importacion de migraciones - remesas *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; } \n\t\telse { $subject = 'Importación de Migraciones - Remesas.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se ha realizado una importación de remesas.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_sys.'code/especiales/migracionesAsignacionFacturas.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/sysaudinetmaster\n\t\t\t\t</a>';\n\t} elseif($opcion == 3){ // *** Generacion de requisicion *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Generación de requisición.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se ha generado una requisición.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_sys.'code/especiales/requisicionPendienteAprobacion.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/sysaudinetmaster\n\t\t\t\t</a>';\n\t} elseif($opcion == 4){ // *** Generacion de Orden de compra *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Generación de Orden de Compra.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se ha generado una orden de compra.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_sys.'code/especiales/ordenDeCompraPendienteDeAprobacion.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/sysaudinetmaster\n\t\t\t\t</a>';\n\t} elseif($opcion == 5){ // *** Importacion Pipeline *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Importacion Pipeline.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se ha realizado la importación del pipeline.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_sys.'code/especiales/asignarPipeline.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/sysaudinetmaster\n\t\t\t\t</a>';\n\t} elseif($opcion == 6){ // *** Migraciones - Asignacion de Facturas *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Migraciones - Asignacion de Facturas.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se han asignado facturas a migraciones.</p>';}\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_sys.'code/especiales/migracionesLiberaciones.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/sysaudinetmaster\n\t\t\t\t</a>';\n\t} elseif($opcion == 7){ // *** Liberacion de migraciones *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Liberacion de Migraciones.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que tiene migraciones por facturar.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_red.'code/especiales/migracionesFacturacion.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/redaudinettest\n\t\t\t\t</a>';\n\t} elseif($opcion == 9){ // *** Arqueo Distribuidores *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Arqueo Distribuidores.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se realizo un arqueo de distribuidores.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_red.'code/especiales/apruebaCheques.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/redaudinettest\n\t\t\t\t</a>';\n\t} elseif($opcion == 10){ // *** Aprobar o Rechazar cheques (arqueo) *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Aprobacion y Rechazo de Cheques (arqueo).'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Aprobacion y Rechazo de Cheques (arqueo).</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_sys.'\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/sysaudinetmaster\n\t\t\t\t</a>';\n\t} elseif($opcion == 11){ // *** Liberar Comisiones para facturar *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Liberacion de comisiones para facturar.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se han liberado comisiones para facturar.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_red.'code/especiales/liberaciones/comisionesPendientesFacturar.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/redaudinettest\n\t\t\t\t</a>';\n\t} elseif($opcion == 12){ // *** Asignacion de Pipeline *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Asignación de pipeline.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se ha realizado la asignación del pipeline.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_sys.'\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/sysaudinetmaster\n\t\t\t\t</a>';\n\t\t\n\t\t$correos_destino = \"vluna@gmail.com\";\n\t} elseif($opcion == 13){ // *** Liberacion de Penalizaciones *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Liberacion de Penalizaciones.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se han liberado penalizaciones.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_red.'/code/especiales/liberaciones/liberaPenalizacionPorPlaza.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/redaudinettest\n\t\t\t\t</a>';\n\t} elseif($opcion == 14){ // *** Liberacion de Bonos *** //\n\t\tif($asunto != \"\"){ $subject = $asunto; }\n\t\telse { $subject = 'Liberacion de bonos para facturar.'; }\n\t\t\n\t\tif($mensaje != \"\"){ $body .= $mensaje; }\n\t\telse { $body .= '<p>Le informamos que se han liberado bonos para facturar.</p>'; }\n\t\t\n\t\t$link = '<a href=\"'.$ruta_base_red.'code/especiales/liberaciones/bonosPendientesFacturar.php\" target=\"_blank\">\n\t\t\t\t\t201.99.107.11/redaudinettest\n\t\t\t\t</a>';\n\t} else {\n\t\t$subject = $asunto;\n\t\t$body .= $mensaje;\n\t}\n\t\n\t$body_cierre = '\t\n\t\t\t\t\t<p style=\"padding-top: 20px;\">\n\t\t\t\t\t\t'.$link.'\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"text-align:center; padding-top: 40px; color: #444; font-size: 8pt;\">\n\t\t\t\t\tCopyright &copy;2015 Audicel. Todos los derechos reservados.\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t';\n\t\n\t$mail = new PHPMailer();\n\t/*\n\t$mail->IsSMTP();\n\t$mail->SMTPAuth = true;\n\t$mail->Mailer = \"smtp\";\n\t$mail->SMTPSecure = \"ssl\";\n\t$mail->Host = \"sysandweb.com\";\n\t$mail->Port = 465;\n\t$mail->From = 'smtp_sw@sysandweb.com';\n\t$mail->FromName = 'NOTIFICACIONES AUDINET';\n\t$mail->Username = \"smpt_facelec2014@sysandweb.com\";\n\t$mail->Password = \"SaWeRd2015\";\n\t\n\t$mail->IsHTML(true);\n\t$mail->Subject = $subject;\n\t$mail->Body = $body;\n\t$mail->AddEmbeddedImage(\"../../imagenes/header_bg.jpg\", \"fondo_azul\");\n\t$mail->AddEmbeddedImage(\"../../imagenes/header_logo.png\", \"logo\");\n\t*/\n\t/*\n\t$mail->IsSMTP();\n\t$mail->SMTPAuth = true;\n\t$mail->SMTPSecure = \"tls\";\n\t$mail->Host = \"smtp.live.com\";\n\t$mail->Port = 587;\n\t$mail->From = 'correo@hotmail.com';\n\t$mail->FromName = 'NOTIFICACIONES AUDINET';\n\t$mail->Username = \"correo@hotmail.com\";\n\t$mail->Password = \"passwd\";\n\t*/\n\t$mail->IsSMTP();\n\t$mail->SMTPAuth = true;\n\t$mail->SMTPSecure = \"tls\";\n\t$mail->Host = \"mail.audicel.com.mx\";\n\t$mail->Port = 2525;\n\t$mail->From = 'audicelfact@audicel.com.mx';\n\t$mail->FromName = 'NOTIFICACIONES AUDINET';\n\t$mail->Username = \"audicelfact@audicel.com.mx\";\n\t$mail->Password = \"facturas12\";\n\t\n\t$mail->IsHTML(true);\n\t//$mail->Subject = '=?UTF-8?B?'.base64_encode($subject).'?=';\n\t$mail->Subject = mb_convert_encoding($subject,\"ISO-8859-1\",\"UTF-8\");\n\t$mail->Body = $body . $body_cierre;\n\t//$mail->AddEmbeddedImage(\"../../imagenes/header_logo.png\", \"logo\");\n\t//$mail->SMTPDebug = 2;\n\t$tiene_correo_destino = \"no\";\n\t\n\tif($correos_destino != ''){\n\t\t$arr_correos_destino = explode(\",\", $correos_destino);\n\t\tfor($i = 0; $i < count($arr_correos_destino); $i++){\n\t\t\t$mail -> AddAddress($arr_correos_destino[$i]);\n\t\t\t$tiene_correo_destino = \"si\";\n\t\t}\n\t}\n\t\n\tif($correos_con_copia != \"\"){\n\t\t$arr_correos_con_copia = explode(\",\", $correos_con_copia);\n\t\tfor($i = 0; $i < count($arr_correos_con_copia); $i++){\n\t\t\t$mail -> AddCC($arr_correos_con_copia[$i]);\n\t\t}\n\t}\n\t\n\tif($correos_con_copia_oculta != \"\"){\n\t\t$arr_correos_con_copia_oculta = explode(\",\", $correos_con_copia_oculta);\n\t\tfor($i = 0; $i < count($arr_correos_con_copia_oculta); $i++){\n\t\t\t$mail -> AddBCC($arr_correos_con_copia_oculta[$i]);\n\t\t}\n\t}\n\t\n\tif ($archivos_adjuntos != \"\") {\n\t\t$arr_archivos_adjuntos = explode(\",\", $archivos_adjuntos);\n\t\tfor($i = 0; $i < count($arr_archivos_adjuntos); $i++){\n\t\t\t$mail -> AddAttachment($arr_archivos_adjuntos[$i]);\n\t\t}\n\t}\n\t\n\tif($tiene_correo_destino == \"si\"){\n\t\t$exito = $mail->Send();\n\t\t\n\t\tif(!$exito){ return $mail->ErrorInfo; }\n\t} else {\n\t\treturn \"No se agrego un correo de destino.\";\n\t}\n\tunset($mail);\n}", "title": "" }, { "docid": "303cd4b86970a278517c25b9947c659c", "score": "0.57784116", "text": "public static function autorizarContacto($inmueble){\n $arrendador= APIUsuario::usuarioActual();\n if (!$arrendador->isAuthenticated()) {\n return false;\n }\n $inmueble->set(\"activado\", true);\n $query = new ParseQuery(\"UsuarioVeDatosCasa\");\n $query->equalTo(\"idInmueble\", $inmueble);\n $query->equalTo(\"arrendador\", $arrendador);\n $query->equalTo(\"validado\", false);\n $res= $query->find();\n $fin =count($res);\n for($i=0;$i<$fin;$i++){\n //$res[$i]-> fetch();\n $user= $res[$i]->get(\"idUsuario\");\n $user->fetch();\n $mail= $user->get(\"email\");\n $asunto = \"El arrendador de la casa que solicitaste se quiere contactar contigo!\";\n $txt=\"Hola! \" . $user->get(\"username\"). \", Nos complase informarte que el usuario \". $arrendador->get(\"username\")\n .\" ha desidido contactarse contigo y llegar a un acuerdo para la venta/renta de su casa ubicada en \"\n .$inmueble->get(\"direccion\").\". Puedes ponerte en contacto con el a traves de este correo: \"\n .$arrendador->get(\"email\").\".\";\n APIUsuario::enviarNotificacion($mail,$asunto,$txt);\n //echo \"se envio correo informativo a \". $mail. \" con el contenido: <br>\". $txt.\" <br>\";\n $res[$i]->set(\"validado\", true);\n $res[$i]->save();\n }\n }", "title": "" }, { "docid": "c7fedb4a999e6850750c6b1bbd8f780f", "score": "0.577521", "text": "function corregirCorrespondencia()\n\t{\n\t\t$this->objFunSeguridad=$this->create('MODCorrespondencia');\n\t\t$this->res=$this->objFunSeguridad->corregirCorrespondencia($this->objParam);\n\t\t//imprime respuesta en formato JSON\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\n\t\t\n\t}", "title": "" }, { "docid": "71cc3bc61e3844a6a1aeb785c3e8b425", "score": "0.5751263", "text": "function sameMailSelf($con,$correo,$id){\n $checkMailSelf = \"SELECT correo FROM usuario WHERE id_usuario LIKE '$id' AND correo LIKE '$correo'\";\n $resultMailSelf = mysqli_query($con,$checkMailSelf);\n\n $responseSelf = [];\n while($row = mysqli_fetch_assoc($resultMailSelf))\n {\n array_push($responseSelf, $row);\n }\n\n if (count($responseSelf) > 0) {\n return true;\n }else {\n return false;\n }\n }", "title": "" }, { "docid": "7aad11c9e8474382d705b39eadd79f8d", "score": "0.5744376", "text": "function SolicitarContrato(){\n \n $this->objFunc=$this->create('MODCotizacion' );\n $this->res=$this->objFunc->SolicitarContrato($this->objParam);\n \n if($this->res->getTipo()=='ERROR'){\n $this->res->imprimirRespuesta($this->res->generarMensajeJson());\n exit;\n }\n \n //genera archivo adjunto\n $file = $this->reporteOC(true);\n $correo=new CorreoExterno();\n //destinatario\n $email = $this->objParam->getParametro('email');\n $correo->addDestinatario($email);\n \n $email_cc = $this->objParam->getParametro('email_cc');\n $correo->addCC($email_cc);\n \n \n \n //asunto\n $asunto = $this->objParam->getParametro('asunto');\n $correo->setAsunto($asunto);\n //cuerpo mensaje\n $body = $this->objParam->getParametro('body');\n $correo->setMensaje($body);\n $correo->setTitulo('Solicitud de contrato');\n $correo->addAdjunto($file);\n \n $correo->setDefaultPlantilla();\n $resp=$correo->enviarCorreo(); \n \n if($resp=='OK'){\n $mensajeExito = new Mensaje();\n $mensajeExito->setMensaje('EXITO','Cotizacion.php','Correo enviado',\n 'Se mando el correo con exito: OK','control' );\n $this->res = $mensajeExito;\n $this->res->imprimirRespuesta($this->res->generarJson());\n \n } \n else{\n //echo $resp; \n echo \"{\\\"ROOT\\\":{\\\"error\\\":true,\\\"detalle\\\":{\\\"mensaje\\\":\\\" Error al enviar correo\\\"}}}\"; \n \n } \n \n unlink($file);\n exit;\n \n \n }", "title": "" }, { "docid": "87c7cbf3a7c8f01c29de6753790ff75c", "score": "0.57219785", "text": "function organisme_existe($nom,$connexion)\n{\n\tif($_GET['maj'] == 0)// uniquement si demande de création\n\t{\n\t\t$requete=\"SELECT org_nom FROM organisme WHERE org_nom = '$_GET[nom]'\";\n\t\t$resultat = ExecRequete($requete,$connexion);\n\t\t$donnees = mysql_fetch_array($resultat);\n\t\tif($donnees)return true;\n\t\telse return false;\n\t}\n}", "title": "" }, { "docid": "670b79adf0a82a6c4da3ef5eed1971f5", "score": "0.5717337", "text": "static public function mdlIngresarContactosProveedor($datos){\r\n try {\r\n \r\n $stmt = Conexion::conectar()->prepare(\"INSERT INTO tproveedorcontactos\"\r\n . \" (EMAIL, ESTADO, PRINCIPAL, NOMBRE, IDPROVEEDOR) VALUES \"\r\n . \"(:email, 0, :principal, :nombre, :idProveedor)\");\r\n\r\n $stmt->bindParam(\":email\", $datos[\"email\"],PDO::PARAM_STR);\r\n $stmt->bindParam(\":principal\", $datos[\"principal\"],PDO::PARAM_STR);\r\n $stmt->bindParam(\":nombre\", $datos[\"nombre\"],PDO::PARAM_STR);\r\n $stmt->bindParam(\":idProveedor\", $datos[\"idProveedor\"],PDO::PARAM_STR);\r\n \r\n if ($stmt->execute()){\r\n return \"ok\";\r\n }\r\n \r\n } catch (PDOException $ex) {\r\n print \"ERROR\" . $ex->getMessage();\r\n return $ex->getMessage();\r\n } \r\n }", "title": "" }, { "docid": "8fa429a84f3921843f42125e3c954f80", "score": "0.57125956", "text": "public function validar_exist_registro($nro_registro_siembra){\r\n\r\n $sql=\"SELECT IF (EXISTS (SELECT 1 from registro_cultivo_u rcu \r\n left join condiciones_ambientales ch on rcu.id_condiciones = ch.id_condiciones \r\n where rcu.nro_registro_siembra='$nro_registro_siembra'),1,0)\";\r\n\r\n $resul=mysqli_query($this->con(),$sql);\r\n\r\n if ($row = mysqli_fetch_row($resul)) {\r\n $id = trim($row[0]);\r\n }\r\n \r\n return $id;\r\n\r\n }", "title": "" }, { "docid": "c2ed5835e922a9e997a39cecdfaf3019", "score": "0.5711943", "text": "function seek_existe_usuario() {\n $this->query = \"\n SELECT * FROM usuario\n WHERE username = '$this->responsable_actividad';\n \";\n $this->get_one_result_from_query();\n if ($this->feedback['ok']){ // Éxito en la obtención\n if ($this->feedback['code'] == '00002') { // Vuelve vacío\n $this->feedback['code'] = '10006';\n } else { // Vuelve con datos\n $this->feedback['code'] = '10007';\n }\n } else {\n if ($this->feedback['code'] != '00101') // Si no fallo de gestor de BD\n $this->feedback['code'] = '10008'; // Error de obtención\n }\n return $this->feedback;\n \n}", "title": "" }, { "docid": "f5a58dd278310884212582e35c404ff8", "score": "0.57074845", "text": "function modificarDocCompletoCajero()\n {\n $cone = new conexion();\n $link = $cone->conectarpdo();\n $copiado = false;\n try {\n $link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $link->beginTransaction();\n\n /////////////////////////\n // inserta cabecera de la solicitud de compra\n ///////////////////////\n\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento = 'conta.ft_doc_compra_venta_ime';\n $this->transaccion = 'CONTA_DCVCAJ_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n $this->setParametro('revisado', 'revisado', 'varchar');\n $this->setParametro('movil', 'movil', 'varchar');\n $this->setParametro('tipo', 'tipo', 'varchar');\n $this->setParametro('importe_excento', 'importe_excento', 'numeric');\n $this->setParametro('id_plantilla', 'id_plantilla', 'int4');\n $this->setParametro('fecha', 'fecha', 'date');\n $this->setParametro('nro_documento', 'nro_documento', 'varchar');\n $this->setParametro('nit', 'nit', 'varchar');\n $this->setParametro('importe_ice', 'importe_ice', 'numeric');\n $this->setParametro('nro_autorizacion', 'nro_autorizacion', 'varchar');\n $this->setParametro('importe_iva', 'importe_iva', 'numeric');\n $this->setParametro('importe_descuento', 'importe_descuento', 'numeric');\n $this->setParametro('importe_doc', 'importe_doc', 'numeric');\n $this->setParametro('sw_contabilizar', 'sw_contabilizar', 'varchar');\n $this->setParametro('tabla_origen', 'tabla_origen', 'varchar');\n $this->setParametro('estado', 'estado', 'varchar');\n $this->setParametro('id_depto_conta', 'id_depto_conta', 'int4');\n $this->setParametro('id_origen', 'id_origen', 'int4');\n $this->setParametro('obs', 'obs', 'varchar');\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('codigo_control', 'codigo_control', 'varchar');\n $this->setParametro('importe_it', 'importe_it', 'numeric');\n $this->setParametro('razon_social', 'razon_social', 'varchar');\n $this->setParametro('importe_descuento_ley', 'importe_descuento_ley', 'numeric');\n $this->setParametro('importe_pago_liquido', 'importe_pago_liquido', 'numeric');\n $this->setParametro('nro_dui', 'nro_dui', 'varchar');\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\n $this->setParametro('importe_pendiente', 'importe_pendiente', 'numeric');\n $this->setParametro('importe_anticipo', 'importe_anticipo', 'numeric');\n $this->setParametro('importe_retgar', 'importe_retgar', 'numeric');\n $this->setParametro('importe_neto', 'importe_neto', 'numeric');\n $this->setParametro('id_auxiliar', 'id_auxiliar', 'integer');\n $this->setParametro('id_int_comprobante', 'id_int_comprobante', 'integer');\n\n $this->setParametro('estacion', 'estacion', 'varchar');\n $this->setParametro('id_punto_venta', 'id_punto_venta', 'integer');\n $this->setParametro('id_agencia', 'id_agencia', 'integer');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al ejecutar en la bd\", 3);\n }\n\n $respuesta = $resp_procedimiento['datos'];\n\n $id_doc_compra_venta = $respuesta['id_doc_compra_venta'];\n\n //////////////////////////////////////////////\n //inserta detalle de la compra o venta\n /////////////////////////////////////////////\n\n\n //decodifica JSON de detalles\n $json_detalle = $this->aParam->_json_decode($this->aParam->getParametro('json_new_records'));\n\n //var_dump($json_detalle)\t;\n\n if ($this->aParam->getParametro('regitrarDetalle') == 'si') {\n foreach ($json_detalle as $f) {\n\n $this->resetParametros();\n //Definicion de variables para ejecucion del procedimiento\n\n\n //modifica los valores de las variables que mandaremos\n $this->arreglo['id_centro_costo'] = $f['id_centro_costo'];\n $this->arreglo['id_doc_concepto'] = $f['id_doc_concepto'];\n\n $this->arreglo['descripcion'] = $f['descripcion'];\n $this->arreglo['precio_unitario'] = $f['precio_unitario'];\n $this->arreglo['id_doc_compra_venta'] = $id_doc_compra_venta;\n $this->arreglo['id_orden_trabajo'] = (isset($f['id_orden_trabajo']) ? $f['id_orden_trabajo'] : 'null');\n $this->arreglo['id_concepto_ingas'] = $f['id_concepto_ingas'];\n $this->arreglo['precio_total'] = $f['precio_total'];\n $this->arreglo['precio_total_final'] = $f['precio_total_final'];\n $this->arreglo['cantidad_sol'] = $f['cantidad_sol'];\n\n\n $this->procedimiento = 'conta.ft_doc_concepto_ime';\n $this->tipo_procedimiento = 'IME';\n //si tiene ID modificamos\n if (isset($this->arreglo['id_doc_concepto']) && $this->arreglo['id_doc_concepto'] != '') {\n $this->transaccion = 'CONTA_DOCC_MOD';\n } else {\n //si no tiene ID insertamos\n $this->transaccion = 'CONTA_DOCC_INS';\n }\n\n\n //throw new Exception(\"cantidad ...modelo...\".$f['cantidad'], 1);\n\n //Define los parametros para la funcion\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n $this->setParametro('id_orden_trabajo', 'id_orden_trabajo', 'int4');\n $this->setParametro('id_centro_costo', 'id_centro_costo', 'int4');\n $this->setParametro('id_concepto_ingas', 'id_concepto_ingas', 'int4');\n $this->setParametro('descripcion', 'descripcion', 'text');\n $this->setParametro('cantidad_sol', 'cantidad_sol', 'numeric');\n $this->setParametro('precio_unitario', 'precio_unitario', 'numeric');\n $this->setParametro('precio_total', 'precio_total', 'numeric');\n $this->setParametro('precio_total_final', 'precio_total_final', 'numeric');\n $this->setParametro('id_doc_concepto', 'id_doc_concepto', 'numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al insertar detalle en la bd\", 3);\n }\n\n\n }\n\n /////////////////////////////\n //elimia conceptos marcado\n ///////////////////////////\n\n $this->procedimiento = 'conta.ft_doc_concepto_ime';\n $this->transaccion = 'CONTA_DOCC_ELI';\n $this->tipo_procedimiento = 'IME';\n\n $id_doc_conceto_elis = explode(\",\", $this->aParam->getParametro('id_doc_conceto_elis'));\n //var_dump($json_detalle)\t;\n for ($i = 0; $i < count($id_doc_conceto_elis); $i++) {\n\n $this->resetParametros();\n $this->arreglo['id_doc_concepto'] = $id_doc_conceto_elis[$i];\n //Define los parametros para la funcion\n $this->setParametro('id_doc_concepto', 'id_doc_concepto', 'int4');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al eliminar concepto en la bd\", 3);\n }\n\n }\n //verifica si los totales cuadran\n $this->resetParametros();\n $this->procedimiento = 'conta.ft_doc_compra_venta_ime';\n $this->transaccion = 'CONTA_CHKDOCSUM_IME';\n $this->tipo_procedimiento = 'IME';\n\n $this->arreglo['id_doc_compra_venta'] = $id_doc_compra_venta;\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al verificar cuadre \", 3);\n }\n\n }//fin del if tiene detalle\n\n //si todo va bien confirmamos y regresamos el resultado\n $link->commit();\n $this->respuesta = new Mensaje();\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\n $this->respuesta->setDatos($respuesta);\n } catch (Exception $e) {\n $link->rollBack();\n $this->respuesta = new Mensaje();\n if ($e->getCode() == 3) {//es un error de un procedimiento almacenado de pxp\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\n } else if ($e->getCode() == 2) {//es un error en bd de una consulta\n $this->respuesta->setMensaje('ERROR', $this->nombre_archivo, $e->getMessage(), $e->getMessage(), 'modelo', '', '', '', '');\n } else {//es un error lanzado con throw exception\n throw new Exception($e->getMessage(), 2);\n }\n\n }\n\n return $this->respuesta;\n }", "title": "" }, { "docid": "c14f0e9dd4512fdb8e1bce8f8eb36daa", "score": "0.5695801", "text": "public function modificar()\n\t{\n\t\t$inten= new Conexion();\n\t\t$con=$inten->conm();\n\t\t\n\t\t//sentencia sql\n\n\t\t$actualizar= \"UPDATE `usuarios` SET `identificacion`= '$this->ide',`nombre`= '$this->nom',`correo`= '$this->co',contrasena=aes_encrypt('$this->cont','2018') WHERE identificacion='$this->dato_e'\";\n\t\t\n\t\treturn $a=mysqli_query($con,$actualizar);//ejecucion de la actualizacion teniendo en cuenta el lugar de origen de los datos en la tabla a traves del boton editar\n\t}", "title": "" }, { "docid": "c4aa2d62f8ef59acc278012507d0aa76", "score": "0.56948054", "text": "public function validateCedula( $correo, $email ){\n // se hace una validacion si cedula es verdadera\n // quiere decir que si es una cedula real\n if( $cedula == true ){\n //se insera ala db el codigo nuevo, se envia hacia que responda la encuesta\n }else{\n // se envia un correo diciendole que su cedula es falsa,\n }\n }", "title": "" }, { "docid": "c9614ac8c7ea8adc95670654af9bcfeb", "score": "0.56764674", "text": "function existeConsentimiento($cedula){\n $con = new DBManager;\n //usamos el metodo conectar para realizar la conexion\n if($con->conectar()==true){\n $query = \"SELECT * FROM consentimiento WHERE caso='$cedula'\";\n\t$result = @mysql_query($query);\n\t $row=mysql_fetch_row($result);\n\t if (!$row)\n\t return true;\n\t else\n\t return false;\n }\n }", "title": "" }, { "docid": "a86de8744d456b1a14366afb30bb96f7", "score": "0.56716555", "text": "public function setCorreo($value){\n if($this->validateEmail($value)){\n $this->correo = $value;\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "be924d0c335bb06f5de9e307f5bc18b4", "score": "0.56647027", "text": "function envia_correo_safetypay($idorden){\n //Primero obtenemos los datos del cliente\n $qry = mysql_query(\"select * from Cliente c, orden o where o.id_orden=$idorden and o.id_cliente=c.id_cliente \");\n\n if(mysql_num_rows($qry) > 0){\n $nombre = mysql_result($qry, 0, \"nombre\");\n $apellidos = mysql_result($qry, 0, \"apellidos\");\n $dir = mysql_result($qry, 0, \"direccion\");\n $direccion = $dir;\n $numext = mysql_result($qry, 0, \"numext\");\n $numint = mysql_result($qry, 0, \"numint\");\n $colonia = mysql_result($qry, 0, \"colonia\");\n $poblacion = mysql_result($qry, 0, \"poblacion\");\n $zip = mysql_result($qry, 0, \"codigo_postal\");\n $idedo = get_nombre_estado(mysql_result($qry, 0, \"id_estado\"));\n $estado = $idedo;\n $telefono = mysql_result($qry, 0, \"telefono\");\n //$idpaquete = mysql_result($qry, 0, \"id_paquete\");\n //$idcode = mysql_result($qry, 0, \"id_cliente\");\n $email = mysql_result($qry, 0, \"email\");\n }\n else\n return(\"null\");\n\n //$bolmain = split(\":\", get_boletos($idcode, $idpaquete, 1));\n $printmain = \"<table border=2 width=300><tr><td><font face=Arial, Helvetica, sans-serif size=2><b>\";\n $i=1;\n foreach($bolmain as $key){\n if($i==3)\n $printmain .= \"<br>\";\n $printmain = $printmain .\"&nbsp; $key &nbsp;\";\n $i++;\n }\n $printmain .= \"</td></tr></table>\";\n\n\n //Obtenemos el mail de confirmacion\n $ruta = \"/var/www/html/edm/safetypay/mail/\";\n\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolrubi = split(\":\", get_boletos($idcode, $idpaquete, 3));\n $bolyes2 = split(\":\", get_boletos($idcode, $idpaquete, 4));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_safetypay.php\";\n include $ruta;\n\n $headers = \"From: Reader's Digest <servicio.clientes@selecciones.etapafinal2.com.mx> \\n\";\n $headers .= \"Content-Type: text/html; charset=iso-8859-1\\n\";\n\n if(isset($mailbody)){\n if(!mail($email, $subject, $mailbody, $headers))\n return false;\n }else\n return false;\n }", "title": "" }, { "docid": "9055e3afba0b8d8723f61a451149aac4", "score": "0.56645894", "text": "public function correlativo($id_oficina,$id_tipo){\r\n $result=ORM::factory('correlativo')->where('id_oficina','=',$id_oficina)->and_where('id_tipo','=',$id_tipo)->find();\r\n if($result->loaded()){\r\n $result->correlativo=$result->correlativo+1; \r\n $result->save();\r\n return substr('000'.$result->correlativo,-4);\r\n }\r\n else{\r\n return FALSE;\r\n }\r\n }", "title": "" }, { "docid": "eac28dddac649443521861f5032ef35a", "score": "0.5657162", "text": "function modificarMemoriaCalculo(){\n\t\t$this->procedimiento='pre.ft_memoria_calculo_ime';\n\t\t$this->transaccion='PRE_MCA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_memoria_calculo','id_memoria_calculo','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('importe_total','importe_total','numeric');\n\t\t$this->setParametro('obs','obs','varchar');\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_objetivo','id_objetivo','int4');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "2a901c8c3b6eed364b44b58c77ab3112", "score": "0.56552786", "text": "public function existeUsuarioDatos($correo, $nickname){\n\t\t\t$correo = dbConnector::escape($correo);\n\t\t\t$nickname = dbConnector::escape($nickname);\n\t\t\t$resultado = DB::select($this->t_usuarios)->columns(['id', 'nickname', 'email'])\n\t\t\t\t->where('email', '=', $correo)\n\t\t\t\t->orWhere('nickname', '=', $nickname)\n\t\t\t\t->first();\n\t\t\tif( $resultado ){\n\t\t\t\tif( $resultado['nickname'] == $nickname ) $this->error[] = 'usuario_repetido';\n\t\t\t\tif( $resultado['email'] == $correo ) $this->error[] = 'email_repetido';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a7dd56584ae2a4431a334af6076835f9", "score": "0.56484115", "text": "function enviarCorreoSimple($correo_destino,$asunto,$mensaje){\n \n $dbh = new Conexion();\n $fechaActual=date(\"Y-m-d H:m:s\");\n if($correo_destino==''||$asunto==''||$mensaje==''){\n return 1;\n }else{\n $mail_username=\"\";//Correo electronico emisor\n $mail_userpassword=\"\";// contraseña correo emisor\n $mail_addAddress=$correo_destino;//correo electronico destino\n $template=\"../notificaciones_sistema/PHPMailer/email_template.html\";//Ruta de la plantilla HTML para enviar nuestro mensaje\n /*Inicio captura de datos enviados por $_POST para enviar el correo */\n $mail_setFromEmail=$mail_username;\n $mail_setFromName=\"IBNORCA\";\n $txt_message=$mensaje;\n $mail_subject=$asunto; //el subject del mensaje\n\n $flag=sendemail($mail_username,$mail_userpassword,$mail_setFromEmail,$mail_setFromName,$mail_addAddress,$txt_message,$mail_subject,$template,1);\n if($flag!=0){//se envio correctamente\n $sqlInsert=\"INSERT INTO log_instancias_envios_correo(detalle,fecha,cod_alumno,cod_persona,correo) \n VALUES ('$asunto','$fechaActual',0,0,'$correo_destino')\";\n $stmtBInsert = $dbh->prepare($sqlInsert);\n $stmtBInsert->execute();\n return 0; \n }else{//error al enviar el correo\n return 1;\n }\n }\n }", "title": "" }, { "docid": "251db7d96b7c89447ff25636c819dcfe", "score": "0.56439", "text": "public function existePersona(){\n $resultado = true;\n $persona = '';\n \n if(isset($this->id) && !empty($this->id)){\n $persona = $this->buscarPersonaEnRegistral(['cuil'=>$this->cuil, 'diff_id'=>$this->id]);\n }else{\n $persona = $this->buscarPersonaEnRegistral(['cuil'=>$this->cuil]);\n }\n\n if(empty($persona)){\n $resultado = false;\n }\n\n return $resultado;\n }", "title": "" }, { "docid": "e3de9b2b37dd129dfb61f64dd5dc4e9b", "score": "0.5633758", "text": "function corregirCorrespondencia()\n {\n $this->objFunSeguridad = $this->create('MODCorrespondencia');\n $this->res = $this->objFunSeguridad->corregirCorrespondencia($this->objParam);\n //imprime respuesta en formato JSON\n $this->res->imprimirRespuesta($this->res->generarJson());\n\n }", "title": "" }, { "docid": "e8b40047cf145390ae889171b9e67929", "score": "0.5629446", "text": "function seek_existe_usuario() {\n $this->query = \"\n SELECT * FROM usuario\n WHERE username = '$this->username';\n \";\n $this->get_one_result_from_query();\n if ($this->feedback['ok']){ // Éxito en la obtención\n if ($this->feedback['code'] == '00002') { // Vuelve vacío\n $this->feedback['code'] = '10006';\n } else { // Vuelve con datos\n $this->feedback['code'] = '10007';\n }\n } else {\n if ($this->feedback['code'] != '00101') // Si no fallo de gestor de BD\n $this->feedback['code'] = '10008'; // Error de obtención\n }\n return $this->feedback;\n \n }", "title": "" }, { "docid": "861886776ffafaa89564e952cf690694", "score": "0.5614956", "text": "private function enviarExistencia() {\n\t\t\tif(isset($_POST) == true):\n\t\t\t\t$this->enviarVacio();\n\t\t\telse:\n\t\t\t\texit('No Hay Datos Post para procesar');\n\t\t\tendif;\n\t\t}", "title": "" }, { "docid": "d124dcc11cbb7441e272ecf83942f8ee", "score": "0.5594677", "text": "function modeloUserComprobacionesNuevo($usuarioid,$valoresusuario, $passrepetida ,&$msg, &$idDiv){\r\n if(modeloUserComprobarId($usuarioid, $msg, $idDiv)){\r\n if(comprobarContraseñas($valoresusuario[0],$passrepetida, $msg, $idDiv)){\r\n if(modeloUserComprobarNombre($valoresusuario[1], $msg, $idDiv)){\r\n if(modeloUserComprobarMail($valoresusuario[2], $msg, \"\", $idDiv)){\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "356bf1feeae50af33b58b567c24b66e3", "score": "0.5591182", "text": "function Register(){\n\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM PROF_TITULACION \n\t\t\t\twhere (CODTITULACION = '$this->codTitulacion' AND DNI = '$this->DNI'\n\t\t\t\t\t)\";\n\n\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'Inserción fallida: el elemento ya existe';\n\t\t}\n\t\telse{\n\t \t\treturn true; //no existe el usuario\n\t\t}\n\n\t}", "title": "" }, { "docid": "c84c539d7b98adde028111c70f8f0b33", "score": "0.55902505", "text": "public function setCorreo($value)\n {\n //Se valida que el Correo ingresado contenga el formato indicado.\n if ($this->validateEmail($value)) {\n //Se guarda el dato.\n $this->correo = $value;\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f67156f81e5773fb4ddde8bc33110e90", "score": "0.5585651", "text": "function modificar(){\n\t\t$ced=$this->objCliente->getCedula();\n\t\t$nom=$this->objCliente->getNombre();\n\t\t$tipo=$this->objCliente->getTipoCliente();\n\t\t$fechaRe=$this->objCliente->getFechaRegistro();\n\t\t$fechaIn=$this->objCliente->getFechaInactivo();\n\t\t$image=$this->objCliente->getImagen();\n\t\t$email=$this->objCliente->getEmail();\n\t\t$tel=$this->objCliente->getTelefono();\n\t\t$cupoCred=$this->objCliente->getCupoCredito();\n\t\t//$estado=$this->objCliente->getEstado();\n\t\t$usuario=$this->objCliente->getUsuario();\n\t\t$contrasena=$this->objCliente->getContrasena();\n\t\t\n\t\t$objConexion = new ControlConexion();\n\t\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n $comandoSql=\"UPDATE CLIENTE SET NOMBRE='\".$nom.\"',NOMBRE_TMP='\".$nom.\"', TIPOCLIENTE='\".$tipo.\"',FECHAREGISTRO='\".$fechaRe.\"',FECHAINACTIVO='\".$fechaIn.\"',IMAGEN='\".$image.\"',EMAIL='\".$email.\"',TELEFONO='\".$tel.\"',IMAGEN_TMP='\".$image.\"',EMAIL_TMP='\".$email.\"',TELEFONO_TMP='\".$tel.\"',CUPOCREDITO='\".$cupoCred.\"', ESTADO=1 ,USUARIO='\".$usuario.\"',CONTRASENA='\".$contrasena.\"' WHERE CEDULA='\".$ced.\"'\";\n\t\t$objConexion->ejecutarComandoSql($comandoSql);\n\t\t$objConexion->cerrarBd();\n\t}", "title": "" }, { "docid": "0683ae536972c61e860e2c03b2c19f54", "score": "0.5582815", "text": "function enviarSMS($parametros)\n {\n $id = 1;\n if (!autorizar($id, $_SESSION['USER'])){\n \n echo \"No Autorizado!\";\n \n } else {\n global $conex;\n $NumerosEnviados = \"\";\n $status = \"V\";\n $usuario = $_SESSION['USER'];\n $hoy = date(\"d/m/Y G:i:s\");\n $idPersona = $parametros['ID_Persona'];\n $fechaDeEnvio = $parametros['fechaEnvio'];\n $cedulaDePersona = $parametros['cedula'];\n $telefonosAEnviar = explode(\",\",$parametros['telefonos']);\n $contenidoDelSMS = $parametros['contenidoSMS'];\n\n\n // print_r($telefonosAEnviar);\n \n \n if (isset($parametros['recordatorio'])){\n // Se obtienen los valores a guardar\n\n\n $montoPromesa = $parametros['montoPromesa'];\n $fechaPromesa = $parametros['fechaPromesa'];\n $fechaPromesa = date(\"d/m/Y\",strtotime($fechaPromesa));\n\n\n } else {\n\n $montoPromesa = \"\";\n $fechaPromesa = \"\";\n\n }\n\n\n\n\n $fechaDeEnvio = date(\"d/m/Y\",strtotime($fechaDeEnvio));\n\n // Se comprueba los telefonos a enviar con la funcion comprobarTelefonos\n $telefonosProcesados = comprobarTelefonos($telefonosAEnviar, $fechaDeEnvio);\n\n // Se imprime mensaje en caso de que existan telefonos a los que no se enviara SMS\n if (!empty($telefonosProcesados))\n {\n\n echo \"No se Envio SMS a estos numeros: \".implode(\", \", $telefonosProcesados).\" ya que se envio SMS anteriormente uno el dia de hoy.\";\n\n }\n\n\n // Se verifica que la variable obtenida sea un arreglo\n if(is_array($telefonosProcesados)){\n\n // Se comparan los arreglos para descartar valores repetidos\n $telefonosAEnviar = array_diff($telefonosAEnviar, $telefonosProcesados);\n\n\n // se recorre arreglo\n foreach ($telefonosAEnviar as $value)\n {\n\n // query que se ejecutara\n $sql = \"insert into sr_SMS (id_persona, id_gestor, cedula, monto_promesa, telefono, sms, f_envio, f_promesa, estatus, fecha, origen)\n values ('$idPersona', '$usuario', '$cedulaDePersona', '$montoPromesa', '$value', '$contenidoDelSMS', '$fechaDeEnvio', '$fechaPromesa', '$status', SYSDATE, 'M')\";\n\n\n // Se ejecuta el Query\n $st = $conex -> consulta($sql);\n\n $NumerosEnviados .= $value.\", \";\n\n }\n // Se imprime mesaje a mostrar al usuario\n echo \"<br><br>SMS Enviado a: $NumerosEnviados\";\n\n } //FIN IF\n\n // Se destruyen variables\n unset($telefonosAEnviar);\n unset($telefonosProcesados);\n unset($cedulaDePersona);\n unset($usuario);\n unset($montoPromesa);\n unset($contenidoDelSMS);\n unset($fechaDeEnvio);\n unset($fechaPromesa);\n unset($status);\n\n\n } //FIN de FUNSION enviarSMS\n }", "title": "" }, { "docid": "6d01291af29ab1d22bd6344fc49a249d", "score": "0.5578881", "text": "function verificarPersona($cadena) {\n global $sql, $configuracion;\n $respuesta = array();\n\n $tablas = array(\"personas\");\n $columnas = array(\"cedula\" => \"documento_identidad\",\n \"tipoDoc\" => \"id_tipo_documento\",\n \"ciudadDoc\" => \"id_ciudad_documento\",\n \"primerNombre\" => \"primer_nombre\",\n \"segundoNombre\" => \"segundo_nombre\",\n \"primerApellido\" => \"primer_apellido\",\n \"segundoApellido\" => \"segundo_apellido\",\n \"fechaNacimiento\" => \"fecha_nacimiento\",\n \"ciudadResidencia\" => \"id_ciudad_residencia\",\n \"direccion\" => \"direccion\",\n \"telefono\" => \"telefono\",\n \"celular\" => \"celular\",\n \"fax\" => \"fax\",\n \"correo\" => \"correo\",\n \"sitioWeb\" => \"sitio_web\",\n \"genero\" => \"genero\",\n \"idImagen\" => \"id_imagen\",\n \"observaciones\" => \"observaciones\",\n \"activo\" => \"activo\"\n );\n $consulta = $sql->seleccionar($tablas, $columnas, \"documento_identidad = '\" . $cadena . \"'\");\n\n if ($sql->filasDevueltas) {\n $persona = $sql->filaEnObjeto($consulta);\n\n $persona->ciudadDocumento = $sql->obtenerValor(\"lista_ciudades\", \"cadena\", \"id = '\" . $persona->ciudadDoc . \"'\");\n $persona->ciudadResidencia = $sql->obtenerValor(\"lista_ciudades\", \"cadena\", \"id = '\" . $persona->ciudadResidencia . \"'\");\n\n $ruta = $sql->obtenerValor(\"imagenes\", \"ruta\", \"id = '\" . $persona->idImagen . \"'\");\n\n $persona->imagenMiniatura = $configuracion[\"SERVIDOR\"][\"media\"] . $configuracion[\"RUTAS\"][\"imagenesMiniaturas\"] . \"/\" . $ruta;\n $persona->imagenNormal = $configuracion[\"SERVIDOR\"][\"media\"] . $configuracion[\"RUTAS\"][\"imagenesNormales\"] . \"/\" . $ruta;\n\n $respuesta[\"cedula\"] = $persona->cedula;\n $respuesta[\"tipoDoc\"] = $persona->tipoDoc;\n $respuesta[\"ciudadDocumento\"] = $persona->ciudadDocumento;\n $respuesta[\"primerNombre\"] = $persona->primerNombre;\n $respuesta[\"segundoNombre\"] = $persona->segundoNombre;\n $respuesta[\"primerApellido\"] = $persona->primerApellido;\n $respuesta[\"segundoApellido\"] = $persona->segundoApellido;\n $respuesta[\"fechaNacimiento\"] = $persona->fechaNacimiento;\n $respuesta[\"ciudadResidencia\"] = $persona->ciudadResidencia;\n $respuesta[\"direccion\"] = $persona->direccion;\n $respuesta[\"telefono\"] = $persona->telefono;\n $respuesta[\"celular\"] = $persona->celular;\n $respuesta[\"fax\"] = $persona->fax;\n $respuesta[\"correo\"] = $persona->correo;\n $respuesta[\"sitioWeb\"] = $persona->sitioWeb;\n $respuesta[\"genero\"] = $persona->genero;\n $respuesta[\"imagenMiniatura\"] = $persona->imagenMiniatura;\n $respuesta[\"imagenNormal\"] = $persona->imagenNormal;\n $respuesta[\"observaciones\"] = $persona->observaciones;\n $respuesta[\"activo\"] = $persona->activo;\n } else {\n $respuesta[\"error\"] = true;\n }\n\n Servidor::enviarJSON($respuesta);\n}", "title": "" }, { "docid": "d50b2373a980dee3efbe3786c53211ab", "score": "0.5564814", "text": "function mIniciadoYExisteBD(){\n if (mAdminIniciado()) {\n $con = conexion();\n $idadmin = $_SESSION[\"idadmin\"];\n $consulta = \"SELECT idadmin\n FROM final_admins\n WHERE idadmin = '$idadmin'\";\n \n $resultado = $con->query($consulta);\n if ($resultado->num_rows == 0) {\n mCerrarSesion();\n return false;\n } else {\n return true;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ace32afed6bd16dadb4d75b9266e59f9", "score": "0.555917", "text": "function modificarDocCompraVenta()\n {\n $this->procedimiento = 'conta.ft_doc_compra_venta_ime';\n $this->transaccion = 'CONTA_DCV_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int8');\n $this->setParametro('revisado', 'revisado', 'varchar');\n $this->setParametro('movil', 'movil', 'varchar');\n $this->setParametro('tipo', 'tipo', 'varchar');\n $this->setParametro('importe_excento', 'importe_excento', 'numeric');\n $this->setParametro('id_plantilla', 'id_plantilla', 'int4');\n $this->setParametro('fecha', 'fecha', 'date');\n $this->setParametro('nro_documento', 'nro_documento', 'varchar');\n $this->setParametro('nit', 'nit', 'varchar');\n $this->setParametro('importe_ice', 'importe_ice', 'numeric');\n $this->setParametro('nro_autorizacion', 'nro_autorizacion', 'varchar');\n $this->setParametro('importe_iva', 'importe_iva', 'numeric');\n $this->setParametro('importe_descuento', 'importe_descuento', 'numeric');\n $this->setParametro('importe_doc', 'importe_doc', 'numeric');\n $this->setParametro('sw_contabilizar', 'sw_contabilizar', 'varchar');\n $this->setParametro('tabla_origen', 'tabla_origen', 'varchar');\n $this->setParametro('estado', 'estado', 'varchar');\n $this->setParametro('id_depto_conta', 'id_depto_conta', 'int4');\n $this->setParametro('id_origen', 'id_origen', 'int4');\n $this->setParametro('obs', 'obs', 'varchar');\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('codigo_control', 'codigo_control', 'varchar');\n $this->setParametro('importe_it', 'importe_it', 'numeric');\n $this->setParametro('razon_social', 'razon_social', 'varchar');\n $this->setParametro('importe_descuento_ley', 'importe_descuento_ley', 'numeric');\n $this->setParametro('importe_pago_liquido', 'importe_pago_liquido', 'numeric');\n $this->setParametro('nro_dui', 'nro_dui', 'varchar');\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\n\n $this->setParametro('importe_pendiente', 'importe_pendiente', 'numeric');\n $this->setParametro('importe_anticipo', 'importe_anticipo', 'numeric');\n $this->setParametro('importe_retgar', 'importe_retgar', 'numeric');\n $this->setParametro('importe_neto', 'importe_neto', 'numeric');\n\n $this->setParametro('id_auxiliar', 'id_auxiliar', 'integer');\n\n $this->setParametro('fecha_vencimiento', 'fecha_vencimiento', 'date');\n $this->setParametro('tipo_cambio', 'tipo_cambio', 'numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "bf51aaf33ef0f83243c66e8f01308212", "score": "0.55576694", "text": "public function verificar()\n {\n $sql = \"SELECT * FROM \" . self::$tabla . \" WHERE email='{$this->email}'\" . \" LIMIT 1\";\n $resultado = self::$db->query($sql);\n if (!$resultado->num_rows) {\n self::$errores[] = \"No existe el usuario con este correo 😓\";\n return false;\n } else {\n return $resultado;\n }\n }", "title": "" }, { "docid": "04b0b4a8456e4c7b925a52b4732a56b8", "score": "0.55407375", "text": "function modeloUserComprobacionesNuevo($usuarioid,$valoresusuario, $passrepetida ,&$msg){\r\n if(modeloUserComprobarId($usuarioid, $msg)){\r\n if(comprobarContraseñas($valoresusuario[0],$passrepetida, $msg)){\r\n if(modeloUserComprobarNombre($valoresusuario[1], $msg)){\r\n if(modeloUserComprobarMail($valoresusuario[2], $msg, \"\")){\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "0a577da9574851a364bded12ced8140a", "score": "0.55326927", "text": "function consultarUsuarioCorreo()\n\t{\n\t\t$usuario = $this->input->post('usuario');\n\t\t$correo = $this->input->post('correo');\n\t\t$consultarUsuarioCorreo=$this->consultas_usuarios->consultar_usuario_correo($usuario, $correo);\n\t\t$correo=$consultarUsuarioCorreo[0][6];\n\t\t$correo2=$consultarUsuarioCorreo[0][7];\n\t\t$vars=array();\n\t\tif($consultarUsuarioCorreo[0][0]==\"\")\n\t\t{\n\t\t $mensaje=\"El Usuario no existe, por favor Verifique los datos\";\n\t\t\t$this->session->set_flashdata('msg', $mensaje);\n\t\t\tredirect('principal/recuperarClave',$vars);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n $id_usuario = $consultarUsuarioCorreo[0][9];\n $token = md5($consultarUsuarioCorreo[0][6] . time());\n $guardarToken = $this->consultas_usuarios->guardar_token($correo, $token, $id_usuario);\n\n $url = '<a href=\"' . base_url() . 'index.php/principal/recuperarClave?token=' . $token . '\">Clic aquí</a>';\n $configuracionSrvCorreo = $this->configuraEmail->configSrvEmail();\n $this->email->initialize($configuracionSrvCorreo);\n $this->email->from('correspondencia@mijp.gob.ve', 'Sistema de Conciliación de Servicios');\n $this->email->to($correo);\n $this->email->bcc($correo2);\n $this->email->subject('Recuperación de Contraseña - Sistema de Conciliación de Servicios MPPRIJP');\n $this->email->message(\"Para recuperar su contraseña, siga el siguiente Link: \" . $url);\n $this->email->send();\n\n\n $mensaje=\"Los pasos para recuperar su clave de acceso al Sistema han sido enviados a su Correo\";\n\t\t\t$this->session->set_flashdata('msg', $mensaje);\n\t\t\tredirect('principal/login','refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "2c138acfc4f7dd41563117907b3add28", "score": "0.55252594", "text": "function presentarMensajeNoEspacios(){\r\n $this->iniciarTabla();\r\n ?><br>NO HAY ESPACIOS REGISTRADOS EN EL PLAN DE ESTUDIOS<br><br><?\r\n $this->cerrarTabla();\r\n }", "title": "" }, { "docid": "e92deb4abab5feeb64afeff6421911c5", "score": "0.55214024", "text": "function seek_existe_actividad() {\n $this->query = \"\n SELECT * FROM actividad\n WHERE id_actividad = '$this->id_actividad';\n \";\n $this->get_one_result_from_query();\n if ($this->feedback['ok']){ // Éxito en la obtención\n if ($this->feedback['code'] == '00002') { // Vuelve vacío\n $this->feedback['code'] = '60010';\n } else { // Vuelve con datos\n $this->feedback['code'] = '60011';\n }\n } else {\n if ($this->feedback['code'] != '00101') // Si no fallo de gestor de BD\n $this->feedback['code'] = '60012'; // Error de obtención\n }\n return $this->feedback;\n \n }", "title": "" }, { "docid": "274486a18eb766a1ac1fec5df2c0b560", "score": "0.5509059", "text": "static public function mdlIngresarPersonaContacto($tabla, $datos) {\n\n\t\t$pdo = Conexion::conectarBDFicha();\n\t\t\t\n\t\t$stmt = $pdo->prepare(\"INSERT INTO $tabla(paterno_contacto, materno_contacto, nombre_contacto, relacion_contacto, edad_contacto, telefono_contacto, direccion_contacto, fecha_contacto, lugar_contacto, id_ficha) VALUES (:paterno_contacto, :materno_contacto, :nombre_contacto, :relacion_contacto, :edad_contacto, :telefono_contacto, :direccion_contacto, :fecha_contacto, :lugar_contacto, :id_ficha)\");\n\n\t\t$stmt->bindParam(\":paterno_contacto\", $datos[\"paterno_contacto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":materno_contacto\", $datos[\"materno_contacto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":nombre_contacto\", $datos[\"nombre_contacto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":relacion_contacto\", $datos[\"relacion_contacto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":edad_contacto\", $datos[\"edad_contacto\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":telefono_contacto\", $datos[\"telefono_contacto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":direccion_contacto\", $datos[\"direccion_contacto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha_contacto\", $datos[\"fecha_contacto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":lugar_contacto\", $datos[\"lugar_contacto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_ficha\", $datos[\"id_ficha\"], PDO::PARAM_INT);\n\n\t\tif ($stmt->execute()) {\n\n\t\t\t$id_persona_contacto = $pdo->lastInsertId();\n\n\t\t\treturn $id_persona_contacto;\n\n\t\t} else {\n\t\t\t\n\t\t\treturn \"error\";\n\n\t\t}\n\t\t\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "title": "" }, { "docid": "908d3db04a786b27e12823555bb24247", "score": "0.5506796", "text": "function modificarDocCompleto()\n {\n $cone = new conexion();\n $link = $cone->conectarpdo();\n $copiado = false;\n try {\n $link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $link->beginTransaction();\n\n /////////////////////////\n // inserta cabecera de la solicitud de compra\n ///////////////////////\n\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento = 'conta.ft_doc_compra_venta_ime';\n $this->transaccion = 'CONTA_DCV_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n $this->setParametro('revisado', 'revisado', 'varchar');\n $this->setParametro('movil', 'movil', 'varchar');\n $this->setParametro('tipo', 'tipo', 'varchar');\n $this->setParametro('importe_excento', 'importe_excento', 'numeric');\n $this->setParametro('id_plantilla', 'id_plantilla', 'int4');\n $this->setParametro('fecha', 'fecha', 'date');\n $this->setParametro('nro_documento', 'nro_documento', 'varchar');\n $this->setParametro('nit', 'nit', 'varchar');\n $this->setParametro('importe_ice', 'importe_ice', 'numeric');\n $this->setParametro('nro_autorizacion', 'nro_autorizacion', 'varchar');\n $this->setParametro('importe_iva', 'importe_iva', 'numeric');\n $this->setParametro('importe_descuento', 'importe_descuento', 'numeric');\n $this->setParametro('importe_doc', 'importe_doc', 'numeric');\n $this->setParametro('sw_contabilizar', 'sw_contabilizar', 'varchar');\n $this->setParametro('tabla_origen', 'tabla_origen', 'varchar');\n $this->setParametro('estado', 'estado', 'varchar');\n $this->setParametro('id_depto_conta', 'id_depto_conta', 'int4');\n $this->setParametro('id_origen', 'id_origen', 'int4');\n $this->setParametro('obs', 'obs', 'varchar');\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('codigo_control', 'codigo_control', 'varchar');\n $this->setParametro('importe_it', 'importe_it', 'numeric');\n $this->setParametro('razon_social', 'razon_social', 'varchar');\n $this->setParametro('importe_descuento_ley', 'importe_descuento_ley', 'numeric');\n $this->setParametro('importe_pago_liquido', 'importe_pago_liquido', 'numeric');\n $this->setParametro('nro_dui', 'nro_dui', 'varchar');\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\n $this->setParametro('importe_pendiente', 'importe_pendiente', 'numeric');\n $this->setParametro('importe_anticipo', 'importe_anticipo', 'numeric');\n $this->setParametro('importe_retgar', 'importe_retgar', 'numeric');\n $this->setParametro('importe_neto', 'importe_neto', 'numeric');\n $this->setParametro('id_auxiliar', 'id_auxiliar', 'integer');\n $this->setParametro('id_int_comprobante', 'id_int_comprobante', 'integer');\n\n $this->setParametro('estacion', 'estacion', 'varchar');\n $this->setParametro('id_punto_venta', 'id_punto_venta', 'integer');\n $this->setParametro('id_agencia', 'id_agencia', 'integer');\n\n $this->setParametro('fecha_vencimiento', 'fecha_vencimiento', 'date');\n $this->setParametro('tipo_cambio', 'tipo_cambio', 'numeric');\n\n $this->setParametro('importe_iehd', 'importe_iehd', 'numeric');\n $this->setParametro('importe_ipj', 'importe_ipj', 'numeric');\n $this->setParametro('importe_tasas', 'importe_tasas', 'numeric');\n $this->setParametro('importe_gift_card', 'importe_gift_card', 'numeric');\n $this->setParametro('otro_no_sujeto_credito_fiscal', 'otro_no_sujeto_credito_fiscal', 'numeric');\n $this->setParametro('importe_compras_gravadas_tasa_cero', 'importe_compras_gravadas_tasa_cero', 'numeric');\n\n $this->setParametro('id_plan_pago', 'id_plan_pago', 'integer');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al ejecutar en la bd\", 3);\n }\n\n $respuesta = $resp_procedimiento['datos'];\n\n $id_doc_compra_venta = $respuesta['id_doc_compra_venta'];\n\n //////////////////////////////////////////////\n //inserta detalle de la compra o venta\n /////////////////////////////////////////////\n\n\n //decodifica JSON de detalles\n $json_detalle = $this->aParam->_json_decode($this->aParam->getParametro('json_new_records'));\n\n //var_dump($json_detalle)\t;\n\n if ($this->aParam->getParametro('regitrarDetalle') == 'si') {\n foreach ($json_detalle as $f) {\n\n $this->resetParametros();\n //Definicion de variables para ejecucion del procedimiento\n\n\n //modifica los valores de las variables que mandaremos\n $this->arreglo['id_centro_costo'] = $f['id_centro_costo'];\n $this->arreglo['id_doc_concepto'] = $f['id_doc_concepto'];\n\n $this->arreglo['descripcion'] = $f['descripcion'];\n $this->arreglo['precio_unitario'] = $f['precio_unitario'];\n $this->arreglo['id_doc_compra_venta'] = $id_doc_compra_venta;\n $this->arreglo['id_orden_trabajo'] = (isset($f['id_orden_trabajo']) ? $f['id_orden_trabajo'] : 'null');\n $this->arreglo['id_concepto_ingas'] = $f['id_concepto_ingas'];\n $this->arreglo['precio_total'] = $f['precio_total'];\n $this->arreglo['precio_total_final'] = $f['precio_total_final'];\n $this->arreglo['cantidad_sol'] = $f['cantidad_sol'];\n\n\n $this->procedimiento = 'conta.ft_doc_concepto_ime';\n $this->tipo_procedimiento = 'IME';\n //si tiene ID modificamos\n if (isset($this->arreglo['id_doc_concepto']) && $this->arreglo['id_doc_concepto'] != '') {\n $this->transaccion = 'CONTA_DOCC_MOD';\n } else {\n //si no tiene ID insertamos\n $this->transaccion = 'CONTA_DOCC_INS';\n }\n\n\n //throw new Exception(\"cantidad ...modelo...\".$f['cantidad'], 1);\n\n //Define los parametros para la funcion\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n $this->setParametro('id_orden_trabajo', 'id_orden_trabajo', 'int4');\n $this->setParametro('id_centro_costo', 'id_centro_costo', 'int4');\n $this->setParametro('id_concepto_ingas', 'id_concepto_ingas', 'int4');\n $this->setParametro('descripcion', 'descripcion', 'text');\n $this->setParametro('cantidad_sol', 'cantidad_sol', 'numeric');\n $this->setParametro('precio_unitario', 'precio_unitario', 'numeric');\n $this->setParametro('precio_total', 'precio_total', 'numeric');\n $this->setParametro('precio_total_final', 'precio_total_final', 'numeric');\n $this->setParametro('id_doc_concepto', 'id_doc_concepto', 'numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al insertar detalle en la bd\", 3);\n }\n\n\n }\n\n /////////////////////////////\n //elimia conceptos marcado\n ///////////////////////////\n\n $this->procedimiento = 'conta.ft_doc_concepto_ime';\n $this->transaccion = 'CONTA_DOCC_ELI';\n $this->tipo_procedimiento = 'IME';\n\n $id_doc_conceto_elis = explode(\",\", $this->aParam->getParametro('id_doc_conceto_elis'));\n //var_dump($json_detalle)\t;\n for ($i = 0; $i < count($id_doc_conceto_elis); $i++) {\n\n $this->resetParametros();\n $this->arreglo['id_doc_concepto'] = $id_doc_conceto_elis[$i];\n //Define los parametros para la funcion\n $this->setParametro('id_doc_concepto', 'id_doc_concepto', 'int4');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al eliminar concepto en la bd\", 3);\n }\n\n }\n //verifica si los totales cuadran\n $this->resetParametros();\n $this->procedimiento = 'conta.ft_doc_compra_venta_ime';\n $this->transaccion = 'CONTA_CHKDOCSUM_IME';\n $this->tipo_procedimiento = 'IME';\n\n $this->arreglo['id_doc_compra_venta'] = $id_doc_compra_venta;\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al verificar cuadre \", 3);\n }\n\n }//fin del if tiene detalle\n\n //si todo va bien confirmamos y regresamos el resultado\n $link->commit();\n $this->respuesta = new Mensaje();\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\n $this->respuesta->setDatos($respuesta);\n } catch (Exception $e) {\n $link->rollBack();\n $this->respuesta = new Mensaje();\n if ($e->getCode() == 3) {//es un error de un procedimiento almacenado de pxp\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\n } else if ($e->getCode() == 2) {//es un error en bd de una consulta\n $this->respuesta->setMensaje('ERROR', $this->nombre_archivo, $e->getMessage(), $e->getMessage(), 'modelo', '', '', '', '');\n } else {//es un error lanzado con throw exception\n throw new Exception($e->getMessage(), 2);\n }\n\n }\n\n return $this->respuesta;\n }", "title": "" }, { "docid": "38dd3179089ca6560a27f8f06eabda34", "score": "0.5496629", "text": "public function regUsuario(){\n\t\textract($_POST); \n\t\t$r= usuario_modelo::validarCorreo($correo);\n\t\tif( $r > 0){\n\t\t\techo json_encode(array(\"texto\" => \"ya existe este correo\", \"success\" => 1));\n\t\t}else{\n\t\t\t\tusuario_controlador::validarDatos();\n\t\t\t\textract($_POST);\n\t\t\t$respuesta = usuario_modelo::mdl_regUsuario($nombre,$correo,$telefono);\n\t\t\tif ($respuesta==1) {\n\t\t\t\techo json_encode(array(\"texto\" => \"usuario registrado exitosamente\", \"success\"=>1));\n\t\t\t}else{\n\t\t\t\t$respuesta['success'] = 2;\n\t\t\t\techo json_encode(array(\"texto\" => \"error al registrar usuario \", \"success\"=>2));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "61011187d1bdfc5423701775185d46f0", "score": "0.5493648", "text": "function existeElectro($cedula){\n $con = new DBManager;\n //usamos el metodo conectar para realizar la conexion\n if($con->conectar()==true){\n $query = \"SELECT * FROM electrocardiograma WHERE caso='$cedula'\";\n\t$result = @mysql_query($query);\n\t $row=@mysql_fetch_row($result);\n\t if (!$row)\n\t return false;\n\t else\n\t return true;\n }\n }", "title": "" }, { "docid": "c311cc5bc3bf439584260b018d5f52e1", "score": "0.5492237", "text": "function registra_orden_num($idcode, $id_paquete, $num_cte , $pr){\n if(!existe_orden($idcode, $id_paquete)){\n $qry = \"insert into orden (id_cliente, fe_orden, id_paquete, id_banner, instant, compra) values('$idcode',now(),$id_paquete,'$_SESSION[cve_envio]', '$num_cte', '$pr')\";\n $execqry = mysql_query($qry);\n if(mysql_affected_rows() > 0)\n return(\"true\");\n else{\n return(\"null\");\n }\n }\n else\n if(existe_orden_confirmada($idcode, $id_paquete)){\n $_SESSION['compra']=1;\n return(\"existe\");\n }else\n return(\"existe\");\n }", "title": "" }, { "docid": "6303fbddde7ce9f77ab56debfbff5c70", "score": "0.5488696", "text": "public function bucarCorreo($email){\n\t\t$conexion = Conectar::conexion();\n\n\t\t$sql = \"SELECT email FROM t_usuarios WHERE email = '$email'\";\n\t\t$result = mysqli_query($conexion, $sql);\n\n\t\t$datos = mysqli_fetch_array($result);\n\n\t\tif($datos['email'] != \"\" || $datos['email'] == $email){\n\t\t\treturn 1;\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t }", "title": "" }, { "docid": "6e925c43b54cabd4ecca9f469fe1be82", "score": "0.54775417", "text": "public function ver_correo ($id_persona){\n if($this->verificar_predeterminado($id_persona) != 0){\n $sql = \"SELECT * FROM `correos_personas` WHERE id_persona='\".$id_persona.\"' AND predeterminado='1' LIMIT 1 \";\n $this->_conexion->ejecutar_sentencia($sql);\n return $this->retornar_SELECT();\n } else {\n if ($this->cant_correos($id_persona) !=0){\n $sql = \"SELECT * FROM `correos_personas` WHERE id_persona='\".$id_persona.\"' ORDER BY id_correo_per DESC LIMIT 1\";\n $this->_conexion->ejecutar_sentencia($sql);\n return $this->retornar_SELECT();\n } else {\n return 0;\n }\n }\n }", "title": "" }, { "docid": "541089b2aa81c00a390cc84995ae9a5a", "score": "0.5476334", "text": "protected function noticarActivacion($correo){\r\n\t\t$mailer = new Correo();\r\n\t\t$body ='Registro completado. <BR/>\r\n\t\t \t\t Su registro ha sido aprobado por la coordinaci&oacute;n de pasant&iacute;as. Ya puede iniciar sesi&oacute;n y realizar sus operaciones.<BR/>';\r\n\t\t$body .='Visite el siguiente enlace: http://'. $this->getServer('SERVER_NAME').'/SIGP';\r\n\t\t$mailer->enviarCorreo($correo, 'Registro en el sistema', $body);\r\n\t}", "title": "" }, { "docid": "08094da78ae48766c36f51cf9c26b29b", "score": "0.5475688", "text": "public function isEdificioYArduinoCongruente()\n {\n if($this->arduino===null){\n return true;\n }\n if ($this->edificio===$this->arduino->getEdificio()||\n $this->arduino->getEdificio()===null) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "eaa9f139a987c5770b51d57a5ecfcc5f", "score": "0.54746425", "text": "function validarSiAnexo(){\t\r\n $colRadAnexo= $this->getNumColEnc(\"RAD_ANEXO\");\r\n if ($colRadAnexo!=-1){\t\r\n $objRadicado = new Radicado($this->conexion);\r\n //Recorre todos los registros del CSV\r\n for($i=0; $i < count ($this->datos) ; $i++){\t\r\n $dato = $this->datos[$i][$colRadAnexo];\r\n //Si la columna que contiene el campo RAD_ANEXO se refiere a un radicado que no existe\r\n if ( strlen (trim($dato)) > 0 && !$objRadicado->radicado_codigo($dato)){\r\n $this->errorRadAnexo[]=\"REG \".($i+1).\": $dato\";\r\n }\t\r\n }\r\n }\t\r\n }", "title": "" }, { "docid": "e85fd98e45ceb3dad4334c0d1ec4bd70", "score": "0.546821", "text": "function modeloUserComprobacionesModificar($valoresusuario, &$msg, $datosUsuario){\r\n if(modeloUserComprobarNombre($valoresusuario[1], $msg)){\r\n if(modeloUserComprobarMail($valoresusuario[2], $msg, $datosUsuario[2])){\r\n if($datosUsuario[0]!=$valoresusuario[0]){//condicion para ver si se cambio la contraseña y de ser asi se comprueba la nueva\r\n if(comprobarContraseñas($valoresusuario[0],$valoresusuario[0], $msg)){ \r\n return true;}\r\n }else{\r\n return true;\r\n } } }return false;\r\n}", "title": "" }, { "docid": "62de283f5ee094ad961df590d3249371", "score": "0.54663634", "text": "function enviarCorreo($verradicado2, $correo, $usuario, $Nomb_usua, $Email_usua, $servidorSmtp, $adjuntos, $ext, $respuesta, $correocopia, $nurad, $rutaArchivo, $db) {\r\n $mail = new PHPMailer();\r\n $cuerpo = \"<br>El Departamento Nacional de Planeacion\r\n <br> ha dado respuesta a su solicitud No. \" . $nurad . \" mediante el oficio No.\" . $verradicado2 . \", la cual tambien puede ser consultada en el portal.</p>\r\n <br><br><b><center>Si no puede visualizar bien el correo, o no llegaron bien los Adjuntos, puede Consultarlos en :\r\n <a href='http://miip/pqr/consulta.php?rad=$nurad'>http://miip/pqr/consulta.php</a><br><br><br>\".htmlspecialchars($respuesta).\"</b></center><BR>\r\n \";\r\n $db = new ConnectionHandler(\"$ruta_raiz\");\r\n $db->conn->SetFetchMode(ADODB_FETCH_ASSOC);\r\n $iSqlRadPadre = \"Select RADI_PATH from radicado where radi_nume_radi=$nurad\";\r\n\r\n $rsPath = $db->conn->Execute($iSqlRadPadre);\r\n $pathPadre = $rsPath->fields[\"RADI_PATH\"];\r\n $mail->Mailer = \"smtp\";\r\n $mail->From = $correo;\r\n $mail->FromName = $usuario;\r\n $mail->Host = $servidorSmtp;\r\n $mail->Mailer = \"smtp\";\r\n $mail->SMTPAuth = \"true\";\r\n $mail->Subject = \"Respuesta al radicado \" . $nurad . \" Departamento Nacional de Planeacion\";\r\n $mail->AltBody = \"Para ver el mensaje, por favor use un visor de E-mail compatible!\";\r\n $mail->Body = $cuerpo;\r\n $mail->IsHTML(true);\r\n $mail->SMTPDebug = 0; // enables SMTP debug information (for testing)\r\n // 1 = errors and messages\r\n // 2 = messages only\r\n\r\n if(trim($Email_usua)){\r\n $emailSend = split(\";\",$Email_usua);\r\n $enviadoA = \"\";\r\n foreach($emailSend as $mailDir){\r\n if($mailDir) $mail->AddAddress(trim($mailDir));\r\n echo \">\".$mailDir . \" <br> \";\r\n $enviadoA .= \">\".$mailDir. \" <br> \";\r\n }\r\n }\r\n $conCopiaA =\"\";\r\n if(trim($correocopia)){\r\n $emailSend = split(\";\",$correocopia);\r\n foreach($emailSend as $mailDir){\r\n if($mailDir) $mail->AddCC(trim($mailDir));\r\n echo \"CC> \".$mailDir . \" <br> \";\r\n $conCopiaA .=\"CC>\".$mailDir.\"<br>\";\r\n }\r\n }\r\n $conCopiaOcultaA= \"\";\r\n if(trim($_POST[\"concopiaOculta\"])){\r\n $emailSend = split(\";\",$_POST[\"concopiaOculta\"]);\r\n foreach($emailSend as $mailDir){\r\n if($mailDir) $mail->AddBCC(trim($mailDir));\r\n echo \"BCC> \".$mailDir . \" <br> \";\r\n $conCopiaOcultaA .= $mailDir;\r\n }\r\n }\r\n $mail->AddReplyTo($correo, $usuario);\r\n $posExt = stripos($pathPadre,\".\");\r\n $docRecibido = \"Documento Recibido\".substr($pathPadre,$posExt,strlen($pathPadre));\r\n //$docRecibido = str_replace(\"/\".$nurad,\"DocRecibido\", $pathP);\r\n\r\n $mail->AddAttachment(\"../bodega/\".$pathPadre, $docRecibido);\r\n $mail->AddAttachment(\"../bodega/\".$rutaArchivo, \"Respuesta\".$verradicado2.\".pdf\");\r\n\r\n //$anex = new Anexo($db);\r\n if ($adjuntos != NULL){\r\n $i=0;\r\n $usua = $_POST[\"usualog\"];\r\n $anexo = new Anexo($db);\r\n while($i < count($adjuntos)){\r\n if($i<(count($adjuntos)-1))\r\n {\r\n $anexoAno = date('Y');\r\n $mail->AddAttachment(\"../bodega/tmp/\".$adjuntos[$i], $adjuntos[$i]);\r\n $anexo->anex_radi_nume = $nurad;\r\n $anexo->usuaCodi = 1;\r\n $anexo->depe_codi = coddepe;\r\n $anexo->anex_solo_lect = \"'S'\";\r\n $anexo->anex_tamano = \"0\";\r\n $anexo->anex_creador = \"'\".$usua.\"'\";\r\n $anexo->anex_desc = \"Adjunto: \". str_replace($adjuntos[$i], \"\", $adjuntos[$i]);\r\n $anexo->anex_nomb_archivo = $adjuntos[$i];\r\n $auxnumero = $anexo->obtenerMaximoNumeroAnexo($nurad);\r\n $anexoCodigo = $anexo->anexarFilaRadicado($auxnumero);\r\n $file = $adjuntos[$i];\r\n $destin = \"../bodega/tmp/\".$file;\r\n $newfile = \"../bodega\". $anexo->anexoRutaArchivo;\r\n if (!copy($destin, $newfile)) {\r\n echo \"<font color=RED><B>No se Pudo Copiar el archivo < $file > ...</B></FONT><br>\";\r\n }\r\n }\r\n $i++;\r\n }\r\n }\r\n\r\n\r\n if (!$mail->Send()) {\r\n echo \"<BR><BR><CENTER><font color=RED><B>Error enviando correo: \" . $mail->ErrorInfo . \"<br>Destinatario: \" . $Email_usua . \"</B></FONT></CENTER><br>\";\r\n //return false;\r\n $envioOk = \"No\";\r\n }else{\r\n\r\n $mail->ClearAddresses();\r\n $mail->ClearAttachments();\r\n $envioOk = \"Si\";\r\n $sql_sgd_renv_codigo = \"select SGD_RENV_CODIGO FROM SGD_RENV_REGENVIO ORDER BY SGD_RENV_CODIGO DESC \";\r\n $rsRegenvio = $db->conn->SelectLimit($sql_sgd_renv_codigo,2);\r\n $nextval = $rsRegenvio->fields[\"SGD_RENV_CODIGO\"];\r\n $nextval++;\r\n $fechaActual = $db->conn->OffsetDate(0,$db->conn->sysTimeStamp);\r\n $destinatarios = \"Destino:\".$_POST[\"destinatario\"].\" Copia:\".$_POST[\"concopia\"];\r\n $dependencia = $_POST[\"depecodi\"];\r\n $iSqlEnvio = \"INSERT INTO SGD_RENV_REGENVIO(SGD_RENV_CODIGO\r\n ,SGD_FENV_CODIGO,SGD_RENV_FECH,RADI_NUME_SAL,SGD_RENV_DESTINO,SGD_RENV_MAIL\r\n ,SGD_RENV_PESO,SGD_RENV_VALOR,SGD_RENV_ESTADO,USUA_DOC,SGD_RENV_NOMBRE\r\n ,SGD_RENV_PLANILLA,SGD_RENV_FECH_SAL,DEPE_CODI,SGD_DIR_TIPO,RADI_NUME_GRUPO,SGD_RENV_DIR\r\n ,SGD_RENV_CANTIDAD,SGD_RENV_TIPO,SGD_RENV_OBSERVA\r\n ,SGD_RENV_GRUPO,SGD_RENV_VALORTOTAL,SGD_RENV_VALISTAMIENTO,SGD_RENV_VDESCUENTO,SGD_RENV_VADICIONAL,SGD_DEPE_GENERA,SGD_RENV_PAIS,SGD_RENV_NUMGUIA)\r\n VALUES ($nextval ,106 ,$fechaActual\r\n ,$verradicado2,'$destinatarios'\r\n ,'$destinatarios','0','0',1,\".$_SESSION[\"usua_doc\"].\"\r\n ,'\".$_POST[\"destinatario\"].\"', '0' ,$fechaActual\r\n ,\".$dependencia.\", 1,$verradicado2 ,'$destinatarios'\r\n ,1 ,1 ,'Envio Respuesta Rapida a Correo Electronico'\r\n ,$verradicado2 ,'0','0','0','0'\r\n ,$dependencia\r\n ,'Colombia'\r\n ,'0')\";\r\n\r\n $rsRegenvio = $db->conn->query($iSqlEnvio);\r\n return $envioOk;\r\n\r\n }\r\n}", "title": "" }, { "docid": "0f2592cc4670d559f9baf36f2b2a00da", "score": "0.54624885", "text": "public function comprobarUsuario(){\n $conexion = UsuarioDB::connectDB();\n $usuario = $this->usuario;\n // Comprueba si ya existe un usuario con el CORREO o NOMBRE USUARIO proporcionado\n $consulta = $conexion->query(\"SELECT usuario FROM usuarios WHERE usuario='$usuario'\");\n var_dump($consulta);\n if ($consulta != false && $consulta->rowCount() > 0) {\n //echo 'existe';\n return false;\n }else {\n //echo 'no existe';\n return true;\n }\n }", "title": "" }, { "docid": "f589b7d0ae915be4872a4df3bf74367c", "score": "0.54608864", "text": "function modificaDatos()\r\n\t{\r\n\t\t$query = \"UPDATE \" . self::TABLA . \" SET Nombre='\".$this->Nombre.\"', Apellidos='\".$this->Apellidos.\"',\tNIFNIE='\".$this->NIFNIE.\"',\tUsuario='\".$this->Usuario.\"'\tWHERE IdPersona = \".$this->IdPersona.\";\";\r\n\t\treturn parent::modificaRegistro( $query);\r\n\t}", "title": "" }, { "docid": "8a9c75d5633e046d8b85cdf792ccff3a", "score": "0.54530966", "text": "function RellenaDatos()\n {\t// se construye la sentencia de busqueda de la tupla\n $sql = \"SELECT * FROM NOTA_TRABAJO WHERE (IdTrabajo = '$this->idTrabajo' AND login = '$this->login')\";\n // Si la busqueda no da resultados, se devuelve el mensaje de que no existe\n if (!($resultado = $this->mysqli->query($sql))){\n return 'No existe en la base de datos'; //\n }\n else{ // si existe se devuelve la tupla resultado\n $result = $resultado->fetch_array();\n return $result;\n }\n }", "title": "" }, { "docid": "525f09c44f09fd6c15a267a51a95b7c0", "score": "0.5450674", "text": "public function Register($Nombre,$Apellido,$Nombre_Usuario,$Telefono,$Correo,$Clave){\n\n $consult = $this->connect()->prepare('SELECT correo FROM usuario WHERE correo =:correo');\n $consult->bindParam(':correo',$Correo);\n $consult->execute();\n $data = $consult->fetchAll(PDO::FETCH_ASSOC);\n if(count($data) > 0){\n $validar = false;\n }\n else{\n $stmt = $this->connect()->prepare('INSERT INTO usuario (nombre, apellido,nombre_usuario,telefono,correo,clave) VALUES\n (:nombre, :apellido, :nombre_usuario, :telefono, :correo, :clave)');\n $stmt->bindParam(':nombre',$Nombre);\n $stmt->bindParam(':apellido',$Apellido);\n $stmt->bindParam(':nombre_usuario',$Nombre_Usuario);\n $stmt->bindParam(':telefono',$Telefono);\n $stmt->bindParam(':correo',$Correo);\n $stmt->bindParam(':clave',$Clave);\n\n if($stmt->execute()){\n $message = 'El usuario se ha registrado con exito';\n header('Location: ../Login_Registro/Login.php');\n $validar = true;\n }else{\n $message = 'Ha ocurrido un fallo al crear la cuenta';\n }\n }\n\n\n \n \n }", "title": "" }, { "docid": "efc22429cad447c0d172e9b791543600", "score": "0.54451174", "text": "public function enviarCorreoEnCola() {\n $respuesta = General::validarParametros($_POST, [\"max_registros\"]);\n if (!is_null($respuesta)) {\n return $respuesta;\n }\n $this->conectar();\n $correoDAO = new CorreoDAO();\n $correoDAO->setConexion($this->conexion);\n $this->enviarCorreo($correoDAO->getColaCorreos('E', \"3\", $_POST[\"max_registros\"]), $correoDAO);\n $this->enviarCorreo($correoDAO->getColaCorreos('P', null, $_POST[\"max_registros\"]), $correoDAO);\n $this->cerrarConexion();\n return General::setRespuesta(\"1\", \"Proceso culminado con éxito\", \"\");\n }", "title": "" }, { "docid": "aaa19fa1f069c39efac2408559e6c271", "score": "0.5435475", "text": "function smsNoLeidos($usuario = \"NULL\", $idPersona = \"NULL\")\n {\n $id = 8;\n \n if (!autorizar($id, $_SESSION['USER'])){\n \n return false;\n \n } else {\n\n\n //Declaracion de varable global para la conexion\n\n global $conex;\n\n // Se verifica que parametos se estan enviando para asignar query segun valores\n if($usuario == \"NULL\" && $idPersona == \"NULL\")\n {\n $sql = \"select count(*) from SR_SMS_ENTRADA where STATUS = 1\";\n\n } else if ($usuario == \"NULL\" && $idPersona != \"NULL\")\n\n {\n $sql = \"select count(*) from SR_SMS_ENTRADA where STATUS = 1 and CEDULA = '{$idPersona}'\";\n\n } else if ($usuario != \"NULL\" && $idPersona == \"NULL\")\n {\n\n $sql = \"select count(*) from SR_SMS_ENTRADA where STATUS = 1 and USUARIO = '{$usuario}'\";\n\n } else\n {\n $sql = \"select count(*) from SR_SMS_ENTRADA where STATUS = 1 and USUARIO = '{$usuario}' or CEDULA = '{$idPersona}'\"; \n }\n\n // Se ejecuta el query\n $st = $conex -> consulta($sql);\n\n\n // Recorremos las filas devueltas de la consulta\n while ($fila = $conex -> fetch_array($st)) \n {\n $contador = $fila[0];\n\n }\n //liberamos memoria\n unset($st);\n unset($fila);\n unset($sql);\n return $contador;\n }\n }", "title": "" }, { "docid": "4ed4bb687aec8b44ddfadbd9aab3d345", "score": "0.54341435", "text": "public function insertarEnvioRecomendado( $nombre, $correo,$mensaje){\n $obj = array(\n 'nombre' => $nombre,\n 'correo'=> $correo,\n 'justificacion'=>$mensaje,\n 'status'=>3\n );\n return $this->db_encuesta->insert('porValidar', $obj);\n }", "title": "" }, { "docid": "7069e8636c3cc109aaf818ef5b8435d0", "score": "0.54323184", "text": "function ingresar()\n\t{\n\t\t$correo=$this->input->post('correo');\n\t\t$nombre=$this->input->post('nombre');\n\t\t$telefono=$this->input->post('telefono');\n\t\t$perfil=$this->input->post('perfil');\n\t\t$clave=$this->input->post('clave');\n\t\t//\n\t\t$correo=$this->security->xss_clean($correo);\n\t\t$nombre=$this->security->xss_clean($nombre);\n\t\t$telefono=$this->security->xss_clean($telefono);\n\t\t$perfil=$this->security->xss_clean($perfil);\n\t\t$clave=$this->security->xss_clean($clave);\n\t\t//\n\t\t/*\n\t\tPara validar si un registro ya existe podemos usar la funcion get_where de CI \n\t\tla cual si encuentra registro devuelve el array o en caso contrario devuelve en array pero en 0\n\t\t*/\n\t\t//\n\t\t$query=$this->db->get_where(\"usuarios\",array(\"correo\"=>$correo));\n\t\t$resultado=$query->result_array();\n\t\tif(count($resultado)>0)\n\t\t{\n\t\t\t$resp=\"este regisro ya se encuentra. revise los datos\";\n\t\t}else\n\t\t{\n\t\t\t//el siguiente proceso aplica tanto para modificar o inserta. CI nos recomienda pasar los datos en un array y ejecutar insert o el update\n\t\t\t$vector=array(\n\t\t\t\t\"correo\"=>$correo,\n\t\t\t\t\"clave\"=>md5($clave),\n\t\t\t\t\"nombre\"=>$nombre,\n\t\t\t\t\"telefono\"=>$telefono,\n\t\t\t\t\"perfil\"=>$perfil\n\t\t\t);\n\t\t\t$this->db->insert(\"usuarios\",$vector);\n\t\t\t$resp=\"Registro insertado con exito\";\n\t\t}\n\t\treturn $resp;\n\t}", "title": "" }, { "docid": "66eb0fed97b343d744d6be0e9bea4f52", "score": "0.54282117", "text": "public function cuentaContable(){\n $val=$this->nombreCuenta();\n if($val['ok']){\n return (string)CHtml::link($val['message'],array(\"plancuentasnec/update\",\"id\"=>$this->cuentacontable));\n }else{\n return $val['message'];\n }\n\n }", "title": "" }, { "docid": "9593af461641837512beb56bd5400038", "score": "0.5427892", "text": "function resultadoCompra(){\n if( $this->validaFirma() ){\n $this->guardaRegistro();\n }\n }", "title": "" }, { "docid": "e34b1bf1af05c026232529012430ba0c", "score": "0.5427254", "text": "function sameMailAll($con,$correo,$id){\n $checkMailAll = \"SELECT correo FROM usuario WHERE correo LIKE '$correo'\";\n $resultMailAll = mysqli_query($con,$checkMailAll);\n\n $responseAll = [];\n while($row = mysqli_fetch_assoc($resultMailAll))\n {\n array_push($responseAll, $row);\n }\n\n if (count($responseAll) > 0) {\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "944fa16424a386065dd115ea13b124e7", "score": "0.5427215", "text": "function insertarCorrespondenciaExterna()\n {\n\n\n $this->objParam->addParametro('id_funcionario_usuario', $_SESSION[\"ss_id_funcionario\"]);\n $this->objFunc = $this->create('MODCorrespondencia');\n $this->res = $this->objFunc->insertarCorrespondenciaExterna();\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "title": "" }, { "docid": "919d885d11c4ed3bb87d253a2f8dd249", "score": "0.54271114", "text": "public function checkcompromisos ($nombreclase=null){\n //verificando la propedad relatriosn\n //VAR_DUMP($this->_estacomprometido);DIE();\n if(!$this->_estacomprometido){ //Solo efectuarla en el caso de que el flag de compromisos ea falso\n //en otro caso se supopne q ue ya esta comppemtido, para evitar sobrecarga de trabajo \n $relaciones =$this->relations();\n $puentes=array();\n foreach($relaciones as $clave=>$valor){\n if(in_array($valor[0],array(self::STAT,self::HAS_ONE,self::HAS_MANY))){\n $puentes[]=$clave;\n }\n \n }\n //var_dump($puentes);die();\n $retorno=false;\n foreach($puentes as $clave=>$valore){\n $valor=$this->{$valore};\n if(!is_null($valor)){\n /* En estee caos se trataria de campos STAT */\n if(in_array(gettype($valor),array('string','integer','float')) ){\n if(($valor+0)>0){\n $retorno=true;break;//QUIERE DECIR QUE EXISTEN SUMATORIAS O COUNTERS MAOYRES QUE CERO \n }else{\n $retorno=false;\n }\n }\n \n if(gettype($valor)=='object' ){ //HAS_ONE \n //PREVINIEDO ERRORES\n //var_dump(get_class($valor)); var_dump($nombreclase);\n IF(method_exists($valor,__FUNCTION__)){\n if (get_class($valor)==$nombreclase){ //Si se trata del mismo objeto, es una relacion reflexiva \n //en este caso, desestimar. porque se trata del mismo objeto \n //POR EJEMPLO $tempdesolpe->desolpe RELACION DE UNO AUNO\n // cUNADO ANALICE desolpe tambien encontrara la relacion de \n // uno a uno y llegara otra vez a $tempdesolpe \n //En este caso se trata del miso objeto y no vale para el analisis\n //echo \"sale\";\n } else{\n //En este caso se trata de de otro registro relacionado de de uno auno\n //toca anaizarlo recursivamente \n // var_dump($valor);die();\n $retorno=$valor->checkcompromisos($nombreclase);//pero evitar mas recursiones con final=true\n }\n }else{\n \n } \n }\n \n if(is_array($valor) ){ //HAS_MANY\n if(count($valor)>0){$retorno=true;break;}else{$retorno=false;}\n }\n }else{//si es nulo no pas anada \n $retorno=false; \n }\n \n } \n $this->_estacomprometido=$retorno;\n }\n return $this->_estacomprometido;\n }", "title": "" }, { "docid": "2d6ec30fcbe211d80f9bb3963a112f28", "score": "0.54085994", "text": "public function ReenviarNotificaciones()\n {\n try {\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $content = trim(file_get_contents(\"php://input\"));\n $data = json_decode($content, true);\n\n $dbm->getConnection()->beginTransaction();\n foreach ($data[\"alumnoporcicloid\"] as $ac) {\n $entidad=$dbm->getRepositorioById(\"CeAlumnoporciclo\",\"alumnoporcicloid\",$ac);\n $usuariodestino=$dbm->getRepositorioById(\"Usuario\",\"alumnoid\",$entidad->getAlumnoid()->getAlumnoid());\n if (!$usuariodestino){\n return new View(\"Uno de los alumnos no tienen un usuario asignado\", Response::HTTP_PARTIAL_CONTENT);\n }\n $actividad=[\n \"tipoactividadid\"=>27,\n \"usuariodestinoid\"=>$usuariodestino->getUsuarioid()\n ];\n \\AppBundle\\Dominio\\RegistroActividad::ActividadAlumno($actividad,$entidad,$dbm,$this->get('mailer'), null);\n $entidad->setCorreoenviado(1);\n $dbm->saveRepositorio($entidad);\n\n\n }\n $dbm->getConnection()->commit();\n\n \n\n return new View(\"Se reenviaron las .\", Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "f4424ebc274f587ca63f3ce680fd847f", "score": "0.54080397", "text": "private function existsUser(string $correo): bool\n\t{\n\t\t$mail = Usuarios::where(\"correo\", \"=\", $correo)->get();\n\t\tif(sizeof($mail) > 0){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e787a1b99f282cca768058cc1c8e60f3", "score": "0.540589", "text": "function getExisteCentroLogistico($nombre) {\n\t\t$consultaSql = sprintf(\"select id_centro_logistico from centros_logisticos where centro_logistico=%s and activo=1\",\n\t\t\t$this->makeValue($nombre, \"text\"));\n\t\t$this->setConsulta($consultaSql);\n\t\t$this->ejecutarConsulta();\n\t\t$resultados = $this->getPrimerResultado();\n\t\treturn $resultados[\"id_centro_logistico\"];\n\t}", "title": "" }, { "docid": "9bedf768ae1040670001fd85e2a280d6", "score": "0.54019946", "text": "function ActualizaVenta($codigoRespuesta,$msgRespuesta,$corre,$idalquiler){\n\t\t\t$db = new conexion();\n\t\t\t$link = $db->conexion();\n\t\t\treturn $link->query(\"UPDATE al_venta SET codigo_respuesta='$codigoRespuesta',\n\t\t\t\tmensaje_respuesta='$msgRespuesta'\n\t\t\tWHERE idalquiler ='$idalquiler'\");\n\n\n\n\t\t}", "title": "" }, { "docid": "1a11182003b576a7914952b619e3d0f6", "score": "0.5398627", "text": "function exist_no_dossier($nodossier)\n {\n $sql = mysqli_connect(\"localhost\",\"root\",\"\",\"hopital_2\");\n $verify = mysqli_query($sql,\"SELECT * FROM dossier WHERE no_dossier = '\".$nodossier.\"'\");\n if(mysqli_num_rows($verify))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "a4abf344ddd6bf4cb2720c312ba0d614", "score": "0.5393522", "text": "function ingresa_tel_contacto($idcode, $id_paquete, $telefono, $horario){\n $qry = mysql_query(\"select id_orden from orden where id_paquete=$id_paquete and id_cliente='$idcode'\");\n $result=mysql_fetch_array($qry);\n $orden = $result[0];\n\n $qry2 = \"insert into contacto (id_orden, id_cliente, id_paquete, telefono, horario, creado) values($orden, '$idcode', $id_paquete, '$telefono', $horario, now())\";\n $execqry = mysql_query($qry2);\n if(mysql_affected_rows() > 0)\n return(\"true\");\n else{\n return(\"null\");\n }\n }", "title": "" }, { "docid": "25ad2d0790f507e96f977bc6b159d4e7", "score": "0.5388913", "text": "public function sinceraCorreo($mail){\n \n \n if($this->isAttributeSafe('mail')){\n $this->mail=$mail;\n if( $this->save()){\n // ECHO \"GRABO\"; die();\n }else{\n //print_r($this->getErrors()); die();\n }\n }ELSE{\n // ECHO \"MAIL NO STRA \"; DIE();\n }\n \n return false;\n }", "title": "" }, { "docid": "d33b461d6c4fdc64a91206865e37de6b", "score": "0.538734", "text": "function scliexiste(){\n\t\t$cliente = rawurldecode($this->input->post('codigo'));\n\t\t$existe = $this->datasis->dameval(\"SELECT count(*) FROM scli WHERE cliente='\".addslashes($cliente).\"'\");\n\t\t$devo = 'N '.$id;\n\t\tif ($existe > 0 ) {\n\t\t\t$devo ='S';\n\t\t\t$devo .= $this->datasis->dameval(\"SELECT descrip FROM sinv WHERE codigo='\".addslashes($id).\"'\");\n\t\t}\n\t\techo $devo;\n\t}", "title": "" }, { "docid": "16424b2af249a3ca1cb40a4bf0f6b35c", "score": "0.53809494", "text": "public function cierre_convocatoria() {\n// exit();\n $subjet_mail = 'Dictamen de evaluación';\n// $result = ['tp_msg'=> En_tpmsg::DANGER, 'html'=>'La información se guardo correctamente'];\n $result = ['tp_msg' => En_tpmsg::SUCCESS, 'html' => 'La información se guardo correctamente'];\n $output['solicitantes'] = $this->solicitantes();\n $info_extra['total_solicitudes'] = $this->gestion_revision->total_solicitudes();\n $info_extra['total_aceptados'] = $this->gestion_revision->total_aceptados()['total_aceptados'];\n $info_extra['subject'] = $subjet_mail;\n// pr($output['solicitantes']);\n// pr($$info_extra);\n// $output['revisados'] = $this->revisados();\n $output['dictamen'] = $this->get_dictamen();\n $output['candidatos'] = $this->candidatos(null);//con null obtiene todos los candidatos de todos los estados de solicitud\n// pr($output['dictamen']);\n// pr($output['solicitantes']['result']);\n// exit();\n $indicador_error = FALSE;\n if (!empty($output['solicitantes']['result'])) {//Valida que existan candidatos\n $solicitantes = $output['solicitantes']['result'];\n if (!empty($output['candidatos']['result'])) {//Valida que existan candidatos\n $numero = 0;\n foreach ($output['candidatos']['result'] as $key => $val_candidatos) {\n $solicitante_data = array_merge($solicitantes[$val_candidatos['id_solicitud']], $info_extra);\n if (isset($output['dictamen'][$key])) {//Valida que este dictaminado\n// pr($key);\n// pr($val_candidatos);\n// pr($output['dictamen'][$key]);\n $dictamen_reg = $output['dictamen'][$key];\n if ($dictamen_reg['aceptado'] == 1) {//aceptados\n// continue;\n ++$numero;\n $secuencial = sprintf(\"%04d\", $numero);\n $folio_dictamen = $val_candidatos['id_solicitud'] . strtoupper($dictamen_reg['id_nivel']) . $secuencial;\n $result = $this->actualiza_dictamen($dictamen_reg['id_dictamen'], ['folio_dictamen' => $folio_dictamen]);\n if ($result['tp_msg'] == En_tpmsg::SUCCESS) {\n $solicitante_data['folio'] = $folio_dictamen;\n $solicitante_data['promedio'] = $dictamen_reg['promedio'];\n $solicitante_data['cve_estado_solicitud'] = En_estado_solicitud::ACEPTADOS;\n $config = ['folio', 'total_solicitudes', 'total_aceptados', 'subject', 'promedio'];\n $this->gestion_revision->guardar_historico_estado($val_candidatos['id_solicitud'], En_estado_solicitud::ACEPTADOS);\n $this->gurda_registros_correo_dictamen($solicitante_data, $config);\n// $this->enviar_correo_electronico('correo_excelencia/aceptado.php', $solicitante_data['email'], $solicitante_data, $subjet_mail);\n unset($solicitantes[$val_candidatos['id_solicitud']]); //Retira informacion del solicitante ya trabajado\n } else {\n if (!$indicador_error) {\n $indicador_error = true;\n }\n }\n } else {//Rechazados\n $config = ['total_solicitudes', 'total_aceptados', 'subject'];\n $solicitante_data['cve_estado_solicitud'] = En_estado_solicitud::RECHAZADOS;\n $this->gestion_revision->guardar_historico_estado($val_candidatos['id_solicitud'], En_estado_solicitud::RECHAZADOS);\n $this->gurda_registros_correo_dictamen($solicitante_data, $config);\n// $this->enviar_correo_electronico('correo_excelencia/rechazado.php', $solicitante_data['email'], $solicitante_data, $subjet_mail);\n unset($solicitantes[$val_candidatos['id_solicitud']]); //Retira informacion del solicitante ya trabajado\n }\n } else {\n// continue;\n $config = ['total_solicitudes', 'total_aceptados', 'subject'];\n $solicitante_data['cve_estado_solicitud'] = En_estado_solicitud::RECHAZADOS;\n $this->gestion_revision->guardar_historico_estado($val_candidatos['id_solicitud'], En_estado_solicitud::RECHAZADOS);\n $this->gurda_registros_correo_dictamen($solicitante_data, $config);\n// $this->enviar_correo_electronico('correo_excelencia/rechazado.php', $solicitante_data['email'], $solicitante_data, $subjet_mail);\n unset($solicitantes[$val_candidatos['id_solicitud']]); //Retira informacion del solicitante ya trabajado\n }\n }\n// exit();\n $this->notifica_cierre_rechazados($solicitantes, $output['candidatos']['result'], $info_extra, $subjet_mail);\n $this->cerrar_convocatoria(); //Cierra la convocatoria\n $this->enviar_correo_control_envios_dictamen(); //Envio de correoes\n //Envia correos a todos los solicitantes que no partisipan\n if ($result['tp_msg'] == En_tpmsg::SUCCESS) {\n// $result = ['tp_msg' => En_tpmsg::DANGER, 'html' => 'Ocurrio un error. Por favor intentelo nuevamente'];\n $result['html'] = 'La información se guardo correctamente';\n }\n header('Content-Type: application/json;charset=utf-8');\n echo json_encode($result);\n } else {\n $result = ['tp_msg' => En_tpmsg::DANGER, 'html' => 'Ocurrio un error. Por favor intentelo nuevamente'];\n header('Content-Type: application/json;charset=utf-8');\n echo json_encode($result);\n }\n } else {\n\n $result = ['tp_msg' => En_tpmsg::DANGER, 'html' => 'Ocurrio un error. Por favor intentelo nuevamente'];\n header('Content-Type: application/json;charset=utf-8');\n echo json_encode($result);\n }\n }", "title": "" }, { "docid": "dc9715042acd6c7677f3092721cba19b", "score": "0.53792757", "text": "public function ctrCrearContacto(){\n\t\tif(isset($_POST[\"accionContacto\"]) && ($_POST[\"accionContacto\"] == \"crear\")){\t\t\t\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$fechaActual = $fecha.' '.$hora;\n\t\t\t$fchRegistroContacto = explode(\"-\", $_POST[\"fechaRegistroContacto\"]);\n\t\t\t$fchAtencion = explode(\"-\", $_POST[\"fechaAtencionContacto\"]);\n\t\t\t$tabla1 = \"vtaca_contacto\";\n\t\t\t$tabla2 = \"vtade_contacto_informe\";\n\t\t\t$codContacto = maximoCodigoTabla($tabla1,'cod_contacto','CON');\n\t\t\t$tipoContacto = explode(\"|\", $_POST[\"tipoContacto\"]);\n\t\t\t$rutaGlobal = realpath(dirname(__FILE__));\n\t\t\t$rutaGlobal = rutaGlobal($rutaGlobal);\n\t\t\t$datos = array(\"cod_contacto\" => $codContacto,\n\t\t\t\t\t\t \"cod_cliente\" => $_POST[\"clienteContacto\"],\n\t\t\t\t\t\t \"cod_canal\" => $_POST[\"canalContacto\"],\n\t\t\t\t\t\t \"cod_tipo\" => $tipoContacto[0],\n\t\t\t\t\t\t \"cod_estado\" => $_POST[\"estadoContacto\"],\n\t\t\t\t\t\t \"dsc_nombre_contacto\" => ms_escape_string(trim($_POST[\"nombreContacto\"])),\n\t\t\t\t\t\t \"dsc_correo_contacto\" => ms_escape_string(trim($_POST[\"correoContacto\"])),\n\t\t\t\t\t\t \"dsc_telefono_contacto\" => ms_escape_string(trim($_POST[\"telefonoContacto\"])),\n\t\t\t\t\t\t \"fch_registro_contacto\" => $fchRegistroContacto[2].'-'.$fchRegistroContacto[1].'-'.$fchRegistroContacto[0],\n\t\t\t\t\t\t \"dsc_detalle_contacto\" => ms_escape_string(trim($_POST[\"detalleContacto\"])),\n\t\t\t\t\t\t \"cod_trabajador_atencion\" => $_POST[\"trabajadorAtencionContacto\"],\n\t\t\t\t\t\t \"dsc_detalle_atencion\" => ms_escape_string(trim($_POST[\"detalleAtencionContacto\"])),\n\t\t\t\t\t\t \"fch_atencion\" => $fchAtencion[2].'-'.$fchAtencion[1].'-'.$fchAtencion[0],\n\t\t\t\t\t\t \"cod_usr_registro\" => $_SESSION[\"cod_trabajador\"],\n\t\t\t\t\t\t \"fch_registro\" => $fechaActual\n\t\t\t\t\t\t);\n\t\t\t$listaInformeContacto = json_decode($_POST[\"listaInformeContacto\"],true);\n\t\t\tif(count($listaInformeContacto) > 0){\n\t\t\t\tforeach ($listaInformeContacto as $key => $value) {\n\t\t\t\t\t$listaInformeContacto[$key][\"dsc_actividad\"] = Utf8Decode(ms_escape_string(trim($listaInformeContacto[$key][\"dsc_actividad\"])));\n\t\t\t\t\t$listaInformeContacto[$key][\"dsc_lugar\"] = Utf8Decode(ms_escape_string(trim($listaInformeContacto[$key][\"dsc_lugar\"])));\n\t\t\t\t\t$listaInformeContacto[$key][\"dsc_participantes_cliente\"] = Utf8Decode(ms_escape_string(trim($listaInformeContacto[$key][\"dsc_participantes_cliente\"])));\n\t\t\t\t\t$listaInformeContacto[$key][\"dsc_participantes_indelat\"] = Utf8Decode(ms_escape_string(trim($listaInformeContacto[$key][\"dsc_participantes_indelat\"])));\n\t\t\t\t\t$listaInformeContacto[$key][\"dsc_acuerdo\"] = Utf8Decode(ms_escape_string(trim($listaInformeContacto[$key][\"dsc_acuerdo\"])));\n\t\t\t\t\t$listaInformeContacto[$key][\"dsc_objetivo\"] = Utf8Decode(ms_escape_string(trim($listaInformeContacto[$key][\"dsc_objetivo\"])));\n\t\t\t\t}//foreach\n\t\t\t}//if\t\n\t\t}//else\n\t\t$respuesta = ModeloContacto::mdlIngresarContacto($tabla1,$tabla2,$codContacto,$datos,$listaInformeContacto,$tipoContacto[1]);\n\t\tif($respuesta == \"ok\"){\n\t\t\t$contListaOriginalInformeContacto = $_POST[\"contadorListaOriginalInformeContacto\"];\n\t\t\t$numLineaArchivo = 1;\n\t\t\tfor ($i=1; $i <= $contListaOriginalInformeContacto; $i++) {\n\t\t\t\tif(isset($_FILES[\"archivoInformeContacto\".$i][\"name\"])){\n\t\t\t\t\t$nombreImagen = $codContacto.\"-\".$numLineaArchivo.\"-\".trim(utf8_decode($_FILES[\"archivoInformeContacto\".$i][\"name\"]));\n\t\t\t\t\t$ruta = $rutaGlobal.\"/archivos/contacto/informe/\".$nombreImagen;\n\t\t\t\t\tmove_uploaded_file($_FILES[\"archivoInformeContacto\".$i][\"tmp_name\"], $ruta);\n\t\t\t\t\t//$respuesta .= $_FILES[\"archivoInformeContacto\".$i][\"name\"].'&'.$numLineaArchivo.'||';\n\t\t\t\t\t$numLineaArchivo++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\t\t\t\n\t\treturn $respuesta;\n\t}", "title": "" }, { "docid": "0602bf74abd2ed3cb8ffa45d6f421c8b", "score": "0.5378798", "text": "function comprobarCentroLogisticoDuplicado() {\n\t\tif($this->id_centro_logistico == NULL) {\n\t\t\t$consulta = sprintf(\"select id_centro_logistico from centros_logisticos where centro_logistico=%s and activo=1\",\n\t\t\t\t$this->makeValue($this->nombre, \"text\"));\n\t\t} else {\n\t\t\t$consulta = sprintf(\"select id_centro_logistico from centros_logisticos where centro_logistico=%s and activo=1 and id_centro_logistico<>%s\",\n\t\t\t\t$this->makeValue($this->nombre, \"text\"),\n\t\t\t\t$this->makeValue($this->id_centro_logistico, \"int\"));\n\t\t}\n\t\t$this->setConsulta($consulta);\n\t\t$this->ejecutarConsulta();\n\t\tif($this->getNumeroFilas() == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "8d28313881e745e3b4ce7d2c3e8436be", "score": "0.53782994", "text": "public function comprovarContrasenya($correu, $password) {\n // Convertim el password en hash\n $hash = hash('sha1', $password);\n $statement = $this->pdo->prepare('SELECT correu, password FROM users WHERE correu = ? AND password = ? ');\n $statement->bindValue(1, $correu, \\PDO::PARAM_STR);\n $statement->bindValue(2, $hash, \\PDO::PARAM_STR);\n $statement->execute();\n\n // Comprovem si hi ha cap coincidència\n if ($statement->fetch()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "5e50c3d923ef4f5026cf1628b7237520", "score": "0.5371251", "text": "function existeEspirometria($cedula){\n $con = new DBManager;\n //usamos el metodo conectar para realizar la conexion\n if($con->conectar()==true){\n $query = \"SELECT * FROM espirometria WHERE caso='$cedula'\";\n\t$result = @mysql_query($query);\n\t $row=@mysql_fetch_row($result);\n\t if (!$row)\n\t return false;\n\t else\n\t return true;\n }\n }", "title": "" }, { "docid": "b89bf74d422291dd711fd3517911d34c", "score": "0.5369853", "text": "function seek_existe_grupo() {\n $this->query = \"\n SELECT * FROM grupo\n WHERE id_grupo = '$this->id_grupo';\n \";\n $this->get_one_result_from_query();\n if ($this->feedback['ok']){ // Éxito en la obtención\n if ($this->feedback['code'] == '00002') { // Vuelve vacío\n $this->feedback['code'] = '20011';\n } else { // Vuelve con datos\n $this->feedback['code'] = '20012';\n }\n } else {\n if ($this->feedback['code'] != '00101') // Si no fallo de gestor de BD\n $this->feedback['code'] = '20013'; // Error de obtención\n }\n return $this->feedback;\n\n }", "title": "" }, { "docid": "4a88193dd4a4eb4b7d25969cc54ef4ab", "score": "0.5368887", "text": "public function registerConvocado($idModo=null) {\n \n /*Buscamos el programa actual*/\n if(is_null($idModo)){\n $modelModo=$this->resolveModo(true); \n if(is_null($modelModo)){\n $this->addError('codalu',yii::t('base_errors','Could not resolve mode'));\n return null;\n }\n }else{\n $modelModo=InterModos::findOne($idModo); \n if(is_null($modelModo)){\n $this->addError('codalu',yii::t('base_errors','Could not resolve mode for id {id}',['id'=>$idModo]));\n \n return null;\n }\n }\n \n \n \n \n $external=$this->isExternal();\n \n if($this instanceof $modelModo->modelofuente && \n $this->esConvocable()){\n $model=new \\frontend\\modules\\inter\\models\\InterConvocados();\n $model->setScenario($model::SCENARIO_CONVOCATORIAMINIMA);\n $model->setAttributes(\n [\n 'universidad_id'=>($external)?$this->unidest_id:$this->universidad_id,\n 'facultad_id'=>($external)?$this->facudest_id:$this->facultad_id,\n 'depa_id'=>$modelModo->depa_id,\n 'modo_id'=>$modelModo->id,\n 'persona_id'=>$this->persona->id,\n //'docente_id'=>$postulante->id,\n 'programa_id'=>$modelModo->programa_id,\n 'codperiodo'=>$modelModo->programa->codperiodo,\n 'codocu'=>$model::CODIGO_DOCUMENTO,\n \n \n ]);\n $attr=$this->pushAttributeInterModo(\n $model->attributes);\n //var_dump($model->attributes['docente_id']);die();\n // var_dump($attr);die();\n $insertar=$model->firstOrCreate($attr,\n $model::SCENARIO_CONVOCATORIAMINIMA);\n return $insertar;\n //if($insertar)$this->mailNotificaIsUser();\n }else{\n if($this instanceof $modelModo->modelofuente){\n $this->addError('codalu',yii::t('base_errors','The source model class {class} does not correspond',['class'=> $modelModo->modelofuente]));\n return null; \n }\n if( $this->esConvocable()){\n $this->addError('codalu',yii::t('base_errors','This student cannot be summoned'));\n return null; \n }\n \n }\n \n \n \n \n }", "title": "" }, { "docid": "76ed1daf14a52deb7bb57107c266de47", "score": "0.53653157", "text": "public function registrarEstudiante($nombre, $telefono, $correo, $password, $confirm){\n\t\t$consulta1 = \"SELECT COUNT(correo) FROM estudiante WHERE correo = '\".$correo.\"'\";\n\t\t$resultado;\n\t\t$this->modelo->conectar();\n\t\t$resultado=$this->modelo->consultar($consulta1);\n\t\t$this->modelo->desconectar();\n\n\n\t\t$row = mysqli_fetch_array($resultado);\n\t\t\n\t \t//Si la consulta no me arrojo resultados, quiere decir que la persona no existe, entonces la agrego a la bd\n\t\tif($row[0] == 0){\n\n\t\t\t$passh= password_hash($password, PASSWORD_DEFAULT);\n\n\t\t\t$consulta2 = \"INSERT INTO estudiante VALUES( null, '\".$nombre.\"', '\".$correo.\"', '\".$telefono.\"', '\".$passh.\"')\";\n\t\t\t$this->modelo->conectar();\n\t\t\t$this->modelo->consultar($consulta2);\n\t\t\t$this->modelo->desconectar();\n\n\t\t\t\n\t \t \t//Guardo un mensaje para ser mostrado al registrar el usuario\n\t\t\techo'<script type=\"text/javascript\">\n \t\talert(\"Registro exitoso.\");\n \t\t</script>';\n\t\t\theader('Location: index.php');\n\n\t\t}else{\n\n\t \t \t//Si el usuario ya esta registrado muestre la vista de registro\n\t\t\techo'<script type=\"text/javascript\">\n \t\talert(\"Registro fallido: Usuario ya existe.\");\n \t\t</script>';\n\t\t\theader('Location: index.php');\n\t\t}\n\t}", "title": "" }, { "docid": "e7179dd02998a3d3db9717af1265c300", "score": "0.5362748", "text": "function incluirMembrosnaCelulaControle($matricula,$celula){\r\n require_once (\"control/dao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $objDao = dao::getInstance();\r\n \r\n return $objDao->incluirMembrosnaCelulaDao($matricula,$celula);\r\n \r\n }", "title": "" }, { "docid": "b8518be160c98cd05295ca94ea667cde", "score": "0.53622043", "text": "public static function aprobo_diagnostico($user_id, $id_curso){\n $database = DatabaseFactory::getFactory()->getConnection();\n switch($id_curso){\n case 1:\t\t\n $sql = \"SELECT diagnostico FROM cintroduccion WHERE user_id = :user_id LIMIT 1\";\n break;\n }\t\n $query = $database->prepare($sql);\n $query->execute(array(':user_id' => $user_id));\n\n if ($query->rowCount() == 0) {\n return false;\n}else{\n $realmente_aprobo = $query->fetch()-> diagnostico;\n\n if($realmente_aprobo == \"\" or $realmente_aprobo == '0'){\n return false;\n }else {\n return true;\n }\n}\n}", "title": "" }, { "docid": "52e20b8d27e58f9c7119c61be046daf9", "score": "0.53616834", "text": "private function comprobarIden(){\n\t\t//comprobamos que existe el usuario\n\t\trequire_once \"BD.class.php\";\n\t\t$miBD = new DB();\n\t\t$sSQL = \"SELECT id FROM usuario WHERE alias = '$this->sAlias' AND \n\t\tpassword = '$this->sPass'\";\n\t\t$iNumRes = $miBD->contarResultadosQuery($sSQL);\n\t\tif($iNumRes >= 1){\n\t\t\t$this->redirigeAAdmin($sSQL, $miBD);\n\t\t}else{\n\t\t\t$this->bMostrarError = true;\n\t\t}\n\t}", "title": "" }, { "docid": "20c16fec48ebb8966e3d7c853ac89a7f", "score": "0.53598976", "text": "public function recuperar(){\n\t\t$query = sprintf(\"SELECT\n\t\t\t\t\t\t\t\t\t\t\t\t*\n\t\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\t\tcampanha\n\t\t\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\t\t\tidCampanha = %d\",\n\t\t\t\t\t\t\t\t\t\t\t\t$this->getConexao()->escape($this->getIdCampanha()));\n\t\ttry{\n\t\t\t$result = $this->getConexao()->query($query);\n\n\t\t\tif(!$result){\n\t\t\t\tthrow new Exception($this->getConexao()->getError());\n\t\t\t}\n\t\t\t\t\n\t\t\tif(mysqli_num_rows($result) <= 0){\n\t\t\t\tthrow new Exception(\"Campanha não econtrado\");\n\t\t\t}\n\n\t\t\t$row = mysqli_fetch_assoc($result);\n\t\t\t$this\n\t\t\t\t->setIdCampanha($row[\"idCampanha\"])\n\t\t\t\t->setDataCadastro($row[\"dataCadastro\"])\n\t\t\t\t->setDescricao($row[\"descricao\"])\n\t\t\t\t->setIdUsuario($row[\"idUsuario\"])\n\t\t\t\t->setStatus($row[\"status\"])\n\t\t\t\t->setCorpo($row[\"corpo\"]);\n\t\t\tmysqli_free_result($result);\n\t\t\treturn true;\n\n\t\t}catch(Exception $e){\n\t\t\t$this->setMensagemErro($e->getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "6f57451ed737162fb0477d15c116c28e", "score": "0.5355372", "text": "public function alterar(){\r\n // recebe dados do formulario\r\n $post = DadosFormulario::formRhCargoComissao(NULL, 2);\r\n // valida dados do formulario\r\n $oValidador = new ValidadorFormulario();\r\n if(!$oValidador->validaFormRhCargoComissao($post, 2)){\r\n $this->msg = $oValidador->msg;\r\n return false;\r\n }\r\n // cria variaveis para validacao com as chaves do array\r\n foreach($post as $i => $v) $$i = utf8_encode($v);\r\n // cria objeto para grava-lo no BD\r\n $oSicasServidor = new SicasServidor($cd_servidor);\r\n $oSicasLotacao = new SicasLotacao($cd_lotacao);\r\n $oRhCargoComissao = new RhCargoComissao($cd_cargo_comissao,$oSicasLotacao, $oSicasServidor, $descricao, $das, $status);\r\n $oRhCargoComissaoBD = new RhCargoComissaoBD();\r\n if(!$oRhCargoComissaoBD->alterar($oRhCargoComissao)){\r\n $this->msg = $oRhCargoComissaoBD->msg;\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "d88a0148371de48547d8d14dab76c89d", "score": "0.5354475", "text": "function modificarDocCompletoEXT()\n {\n\n //Abre conexion con PDO\n $cone = new conexion();\n $link = $cone->conectarpdo();\n $copiado = false;\n try {\n $link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $link->beginTransaction();\n\n /////////////////////////\n // inserta cabecera de la solicitud de compra\n ///////////////////////\n\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento = 'conta.ft_doc_compra_venta_ime';\n $this->transaccion = 'CONTA_DCVEXT_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n $this->setParametro('revisado', 'revisado', 'varchar');\n $this->setParametro('movil', 'movil', 'varchar');\n $this->setParametro('tipo', 'tipo', 'varchar');\n $this->setParametro('importe_excento', 'importe_excento', 'numeric');\n $this->setParametro('id_plantilla', 'id_plantilla', 'int4');\n $this->setParametro('fecha', 'fecha', 'date');\n $this->setParametro('nro_documento', 'nro_documento', 'varchar');\n $this->setParametro('nit', 'nit', 'varchar');\n $this->setParametro('importe_ice', 'importe_ice', 'numeric');\n $this->setParametro('nro_autorizacion', 'nro_autorizacion', 'varchar');\n $this->setParametro('importe_iva', 'importe_iva', 'numeric');\n $this->setParametro('importe_descuento', 'importe_descuento', 'numeric');\n $this->setParametro('importe_doc', 'importe_doc', 'numeric');\n $this->setParametro('sw_contabilizar', 'sw_contabilizar', 'varchar');\n $this->setParametro('tabla_origen', 'tabla_origen', 'varchar');\n $this->setParametro('estado', 'estado', 'varchar');\n $this->setParametro('id_depto_conta', 'id_depto_conta', 'int4');\n $this->setParametro('id_origen', 'id_origen', 'int4');\n $this->setParametro('obs', 'obs', 'varchar');\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('codigo_control', 'codigo_control', 'varchar');\n $this->setParametro('importe_it', 'importe_it', 'numeric');\n $this->setParametro('razon_social', 'razon_social', 'varchar');\n $this->setParametro('importe_descuento_ley', 'importe_descuento_ley', 'numeric');\n $this->setParametro('importe_pago_liquido', 'importe_pago_liquido', 'numeric');\n $this->setParametro('nro_dui', 'nro_dui', 'varchar');\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\n $this->setParametro('importe_pendiente', 'importe_pendiente', 'numeric');\n $this->setParametro('importe_anticipo', 'importe_anticipo', 'numeric');\n $this->setParametro('importe_retgar', 'importe_retgar', 'numeric');\n $this->setParametro('importe_neto', 'importe_neto', 'numeric');\n $this->setParametro('id_auxiliar', 'id_auxiliar', 'integer');\n $this->setParametro('id_int_comprobante', 'id_int_comprobante', 'integer');\n\n $this->setParametro('estacion', 'estacion', 'varchar');\n $this->setParametro('id_punto_venta', 'id_punto_venta', 'integer');\n $this->setParametro('id_agencia', 'id_agencia', 'integer');\n\n $this->setParametro('fecha_vencimiento', 'fecha_vencimiento', 'date');\n $this->setParametro('tipo_cambio', 'tipo_cambio', 'numeric');\n\n $this->setParametro('costo_directo', 'costo_directo', 'varchar');\n $this->setParametro('c_emisor', 'c_emisor', 'varchar');\n $this->setParametro('no_gravado', 'no_gravado', 'numeric');\n $this->setParametro('base_21', 'base_21', 'numeric');\n $this->setParametro('base_27', 'base_27', 'numeric');\n $this->setParametro('base_10_5', 'base_10_5', 'numeric');\n $this->setParametro('base_2_5', 'base_2_5', 'numeric');\n $this->setParametro('percepcion_caba', 'percepcion_caba', 'numeric');\n $this->setParametro('percepcion_bue', 'percepcion_bue', 'numeric');\n $this->setParametro('percepcion_iva', 'percepcion_iva', 'numeric');\n $this->setParametro('percepcion_salta', 'percepcion_salta', 'numeric');\n $this->setParametro('imp_internos', 'imp_internos', 'numeric');\n $this->setParametro('percepcion_tucuman', 'percepcion_tucuman', 'numeric');\n $this->setParametro('percepcion_corrientes', 'percepcion_corrientes', 'numeric');\n $this->setParametro('otros_impuestos', 'otros_impuestos', 'numeric');\n $this->setParametro('percepcion_neuquen', 'percepcion_neuquen', 'numeric');\n $this->setParametro('id_proveedor', 'id_proveedor', 'int4');\n //$this->setParametro('control', 'control', 'varchar');\n\n $this->setParametro('importe_postergacion_covid', 'importe_postergacion_covid', 'numeric');\n\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al ejecutar en la bd\", 3);\n }\n\n $respuesta = $resp_procedimiento['datos'];\n\n $id_doc_compra_venta = $respuesta['id_doc_compra_venta'];\n\n //////////////////////////////////////////////\n //inserta detalle de la compra o venta\n /////////////////////////////////////////////\n\n\n //decodifica JSON de detalles\n $json_detalle = $this->aParam->_json_decode($this->aParam->getParametro('json_new_records'));\n\n //var_dump($json_detalle)\t;\n\n if ($this->aParam->getParametro('regitrarDetalle') == 'si') {\n foreach ($json_detalle as $f) {\n\n $this->resetParametros();\n //Definicion de variables para ejecucion del procedimiento\n\n\n //modifica los valores de las variables que mandaremos\n $this->arreglo['id_centro_costo'] = $f['id_centro_costo'];\n $this->arreglo['id_doc_concepto'] = $f['id_doc_concepto'];\n\n $this->arreglo['descripcion'] = $f['descripcion'];\n $this->arreglo['precio_unitario'] = $f['precio_unitario'];\n $this->arreglo['id_doc_compra_venta'] = $id_doc_compra_venta;\n $this->arreglo['id_orden_trabajo'] = (isset($f['id_orden_trabajo']) ? $f['id_orden_trabajo'] : 'null');\n $this->arreglo['id_concepto_ingas'] = $f['id_concepto_ingas'];\n $this->arreglo['precio_total'] = $f['precio_total'];\n $this->arreglo['precio_total_final'] = $f['precio_total_final'];\n $this->arreglo['cantidad_sol'] = $f['cantidad_sol'];\n\n\n $this->procedimiento = 'conta.ft_doc_concepto_ime';\n $this->tipo_procedimiento = 'IME';\n //si tiene ID modificamos\n if (isset($this->arreglo['id_doc_concepto']) && $this->arreglo['id_doc_concepto'] != '') {\n $this->transaccion = 'CONTA_DOCC_MOD';\n } else {\n //si no tiene ID insertamos\n $this->transaccion = 'CONTA_DOCC_INS';\n }\n\n\n //throw new Exception(\"cantidad ...modelo...\".$f['cantidad'], 1);\n\n //Define los parametros para la funcion\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n $this->setParametro('id_orden_trabajo', 'id_orden_trabajo', 'int4');\n $this->setParametro('id_centro_costo', 'id_centro_costo', 'int4');\n $this->setParametro('id_concepto_ingas', 'id_concepto_ingas', 'int4');\n $this->setParametro('descripcion', 'descripcion', 'text');\n $this->setParametro('cantidad_sol', 'cantidad_sol', 'numeric');\n $this->setParametro('precio_unitario', 'precio_unitario', 'numeric');\n $this->setParametro('precio_total', 'precio_total', 'numeric');\n $this->setParametro('precio_total_final', 'precio_total_final', 'numeric');\n $this->setParametro('id_doc_concepto', 'id_doc_concepto', 'numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al insertar detalle en la bd\", 3);\n }\n\n\n }\n\n /////////////////////////////\n //elimia conceptos marcado\n ///////////////////////////\n\n $this->procedimiento = 'conta.ft_doc_concepto_ime';\n $this->transaccion = 'CONTA_DOCC_ELI';\n $this->tipo_procedimiento = 'IME';\n\n $id_doc_conceto_elis = explode(\",\", $this->aParam->getParametro('id_doc_conceto_elis'));\n //var_dump($json_detalle)\t;\n for ($i = 0; $i < count($id_doc_conceto_elis); $i++) {\n\n $this->resetParametros();\n $this->arreglo['id_doc_concepto'] = $id_doc_conceto_elis[$i];\n //Define los parametros para la funcion\n $this->setParametro('id_doc_concepto', 'id_doc_concepto', 'int4');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al eliminar concepto en la bd\", 3);\n }\n\n }\n //verifica si los totales cuadran\n $this->resetParametros();\n $this->procedimiento = 'conta.ft_doc_compra_venta_ime';\n $this->transaccion = 'CONTA_CHKDOCSUM_IME';\n $this->tipo_procedimiento = 'IME';\n\n $this->arreglo['id_doc_compra_venta'] = $id_doc_compra_venta;\n $this->setParametro('id_doc_compra_venta', 'id_doc_compra_venta', 'int4');\n\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al verificar cuadre \", 3);\n }\n\n }//fin del if tiene detalle\n\n //si todo va bien confirmamos y regresamos el resultado\n $link->commit();\n $this->respuesta = new Mensaje();\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\n $this->respuesta->setDatos($respuesta);\n } catch (Exception $e) {\n $link->rollBack();\n $this->respuesta = new Mensaje();\n if ($e->getCode() == 3) {//es un error de un procedimiento almacenado de pxp\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\n } else if ($e->getCode() == 2) {//es un error en bd de una consulta\n $this->respuesta->setMensaje('ERROR', $this->nombre_archivo, $e->getMessage(), $e->getMessage(), 'modelo', '', '', '', '');\n } else {//es un error lanzado con throw exception\n throw new Exception($e->getMessage(), 2);\n }\n\n }\n\n return $this->respuesta;\n }", "title": "" }, { "docid": "a4b0c85aa01c59382a5fc2800230f7af", "score": "0.53508675", "text": "public function registroAction(Request $request)\n{\n $persona = new Personas();\n $estudiantes = new Estudiantes();\n $persona->setEstudiantes($estudiantes);\n\n //GENERAR CONTRASEÑA\n $autocont = $this->get(\"app.autocont\");\n $pass = $autocont->obtener();\n\n //recibir del get el CARNE\n $var=$request->query->get(\"carne\");\n $nuevavar = (int)$var;\n $carne=$var;\n\n //CONSULTAR EL SERVICIO DE LA CUNOC\n if(isset($carne))\n {\n $datos1 = $this->get(\"app.registrocunoc\");\n $datos = $datos1->consultar($carne);\n }\n\n $nomComp =\"\"; $carrera =\"\"; $telefono=\"\"; $correo=\"\"; $direccion=\"\"; $muni_dep=\"\";\n\n $permiso = false;\n if(isset($datos))\n {\n if($datos == 1)\n {\n $status = \"ERROR DE CONEXIÓN\";\n $this->session->getFlashBag()->add(\"status\", $status);\n }\n else if($datos==6)\n {\n $status = \"CARNE INCORRECTO\";\n $this->session->getFlashBag()->add(\"status\", $status);\n }\n else if($datos==16)\n {\n $status = \"EL ESTUDIANTE NO SE ENCUENTRA INSCRITO\";\n $this->session->getFlashBag()->add(\"status\", $status);\n }\n else if($datos==10)\n {\n $status = \"EL ESTUDIANTE NO ESTA INSCRITO EN LA DIVISIÓN DE CIENCIAS JURIDICAS Y SOCIALES\";\n $this->session->getFlashBag()->add(\"status\", $status);\n }\n else if(isset($datos->STATUS,$datos->DATOS[0]->CARNET,$datos->DATOS[0]->NOM1))\n {\n if($datos->STATUS==1 )\n {\n $carne = $datos->DATOS[0]->CARNET;\n $nomComp =$datos->DATOS[0]->NOM1.\" \".$datos->DATOS[0]->NOM2.\" \".$datos->DATOS[0]->NOM3.\" \".$datos->DATOS[0]->APE1.\" \".$datos->DATOS[0]->APE2;\n $telefono=$datos->DATOS->TELEFONO;\n $correo=$datos->DATOS->CORREO;\n $direccion=$datos->DATOS->DIRECCION;\n $muni_dep=$datos->DATOS->MUNICIPIO.\" \".$datos->DATOS->DEPARTAMENTO;\n }\n }\n else {\n $status = \"NO ENCONTRADO\";\n }\n }\n\n $form = $this->createForm('BufeteBundle\\Form\\PersonasEstudianteType', $persona,\n array(\n 'carneEnvio' => $carne,\n 'nombreEnvio'=> $nomComp,\n 'telefonoEnvio'=>$telefono,\n 'direccionEnvio'=>$direccion,\n 'correoEnvio'=>$correo,\n 'passEnvio' =>$pass,\n ));\n\n $form->handleRequest($request);\n $confirm = null;\n $status=null;\n $unavariable=\"\";\n if ($form->isSubmitted()){\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $estudiante_repo = $em->getRepository(\"BufeteBundle:Estudiantes\");\n $est = $estudiante_repo->findOneBy(array('carneEstudiante' => $carne));\n $persona_repo = $em->getRepository(\"BufeteBundle:Personas\");\n $pe = $persona_repo->findOneBy(array('usuarioPersona' => $form->get(\"usuarioPersona\")->getData()));\n\n if(count($est) == 0){\n if(count($pe) == 0){\n $factory = $this->get(\"security.encoder_factory\");\n $encoder = $factory->getEncoder($persona);\n $password = $encoder->encodePassword($form->get(\"passPersona\")->getData(), $persona->getSalt());\n $persona->setPassPersona($password);\n $persona->setIdBufete($this->getUser()->getIdBufete());\n $em->persist($persona);\n $flush = $em->flush();\n if ($flush == null) {\n $status = \"El usuario se ha creado correctamente\";\n $confirm = true;\n } else {\n $status = \"El usuario no se pudo registrar\";\n }\n }else {\n $status = \"el nombre de usuario ya existe\";\n }\n }else {\n $status = \"El carne ya esta registrado\";\n }\n }\n if ($confirm) {\n\n return $this->redirectToRoute('personas_detalle', array('idPersona' => $persona->getIdPersona()));\n }else {\n $this->session->getFlashBag()->add(\"status\", $status);\n }\n }\n\n\n return $this->render('personas/registro.html.twig', array(\n 'persona' => $persona,\n 'form' => $form->createView(),\n 'carne' => $carne,\n 'nombre' => $nomComp,\n 'carrera' => $carrera,\n 'telefono' => $telefono,\n 'correo' => $correo,\n 'direccion' => $direccion.\" \".$muni_dep,\n ));\n }", "title": "" }, { "docid": "5542af9396df70afa0b503ffc6300eaf", "score": "0.53397936", "text": "function existeVisiometria2($cedula){\n $con = new DBManager;\n //usamos el metodo conectar para realizar la conexion\n if($con->conectar()==true){\n $query = \"SELECT * FROM visiometria WHERE caso='$cedula'\";\n\t$result = @mysql_query($query);\n\t $row=mysql_fetch_row($result);\n\t if (!$row)\n\t return false;\n\t else\n\t return true;\n }\n }", "title": "" }, { "docid": "3f159e5310dc0b8c8494988a7970d038", "score": "0.533705", "text": "function emailAlreadyExists($email)\n{\n $sql = \"SELECT phone_number FROM users WHERE email = :mail\";\n $cerere = DB::get_connnection()->prepare($sql);\n $cerere->execute([\n 'mail' => $email\n ]);\n // daca exista semnalez o eroare si returnez false\n return $cerere->rowCount() >= 1;\n}", "title": "" }, { "docid": "c2346c95322706ba4fe27db276964fb6", "score": "0.5336688", "text": "function modificarCliente(){\n\t\t$ced=$this->objCliente->getCedula();\n\t\t$nomTmp=$this->objCliente->getNombreTmp();\n\t\t$nom=$this->objCliente->getNombre();\n\t\t$tipo=$this->objCliente->getTipoCliente();\n\t\t$fechaRe=$this->objCliente->getFechaRegistro();\n\t\t$fechaIn=$this->objCliente->getFechaInactivo();\n\t\t$imagen=$this->objCliente->getImagen();\n\t\t$imagenTmp=$this->objCliente->getImagenTmp();\n\t\t$email=$this->objCliente->getEmail();\n\t\t$emailTmp=$this->objCliente->getEmailTmp();\n\t\t$tel=$this->objCliente->getTelefono();\n\t\t$telTmp=$this->objCliente->getTelefonoTmp();\n\t\t$cupoCred=$this->objCliente->getCupoCredito();\n\t\t$estado=$this->objCliente->getEstado();\n\t\t$usuario=$this->objCliente->getUsuario();\n\t\t$contrasena=$this->objCliente->getContrasena();\n\t\t\t\n\t\t \n\t\t$objConexion = new ControlConexion();\n\t\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t\t//$comandoSql=\"UPDATE CLIENTE SET NOMBRE_TMP='\".$nomTmp.\"',NOMBRE_TMP='\".$nomTmp.\"', TIPOCLIENTE='\".$tipo.\"',FECHAREGISTRO='\".$fechaRe.\"',IMAGEN_TMP='\".$image.\"',EMAIL_TMP='\".$email.\"',TELEFONO_TMP='\".$tel.\"',IMAGEN_TMP='\".$image.\"',EMAIL_TMP='\".$email.\"',TELEFONO_TMP='\".$tel.\"',CUPOCREDITO='\".$cupoCred.\"', ESTADO=1 ,USUARIO='\".$usuario.\"',CONTRASENA='\".$contrasena.\"' WHERE CEDULA='\".$ced.\"'\";\n\t\t$comandoSql=\"UPDATE CLIENTE SET NOMBRE_TMP='\".$nomTmp.\"', TIPOCLIENTE='\".$tipo.\"',FECHAREGISTRO='\".$fechaRe.\"',IMAGEN_TMP='\".$imagenTmp.\"',EMAIL_TMP='\".$emailTmp.\"',TELEFONO_TMP='\".$telTmp.\"',CUPOCREDITO='\".$cupoCred.\"', CONTRASENA='\".$contrasena.\"' WHERE CEDULA='\".$ced.\"'\";\n\t\t\n\t\t\n\t\t$objConexion->ejecutarComandoSql($comandoSql);\n\t\t$objConexion->cerrarBd();\n\t}", "title": "" }, { "docid": "0a012423c223f85bd8f76fef7b2ba523", "score": "0.53332907", "text": "function existe_nombre() {\n $this->seek_nombre();\n if ($this->feedback['code'] === '60014')\n return true;\n else return false;\n }", "title": "" }, { "docid": "9911e728ee08da05130b3cc614f96dcd", "score": "0.5330144", "text": "public function registrarAutorizacionMedicalizada() {\n\n $tipo ='TRATAMIENTO';\n $idSesion =Sesion::getValue('ID_USUARIO');\n $usuario =$_POST['usuario'];\n $clave =$_POST['pass'];\n $this->_mdlLogin->__SET(\"_Usuario\", $usuario);\n $resPswd = $this->_mdlLogin->ConsultarClaveUsuario();\n\n if($resPswd) {\n\n $realPassword = $resPswd->clave;\n $clave = Encrypter::decrypt(Encrypter::encrypt($clave));\n $decrypted = Encrypter::decrypt($realPassword);\n\n if($decrypted === $clave && strtoupper($resPswd->descripcionRol) === 'MEDICO') {\n $resultado =$resPswd->idUsuario;\n $descripcion =$_POST['descripcion'];\n $cedula =$_POST['cedula'];\n date_default_timezone_set('America/Bogota');\n $time = time();\n $horaEnvio = date(\"Y-m-d H:i:s\", $time);\n $id =$_POST['id'];\n $RespuestaValidacion = $this->_mdlTratamientoA->registrarAutorizacionMedicalizada($tipo,$idSesion,$descripcion,$horaEnvio,$id,$cedula,$resultado);\n\n if ($RespuestaValidacion) {\n echo json_encode([\"Registro exitoso\"]);\n } else {\n echo json_encode([\"Registro NO exitoso\"]);\n }\n\n }\n }\n\n }", "title": "" }, { "docid": "6efe93dcf46097b54de2c9a7b6ac6f0f", "score": "0.5329343", "text": "function envia_correo_banco($idcode, $tipocorreo, $idpaquete, $ban, $inv, $serf, $hsbc, $bbva,$idorden){\n $id_paquete=$idpaquete;\n $id_orden=$idorden;\n $id_code=$idcode;\n //Primero obtenemos los datos del cliente\n $qry = mysql_query(\"select * from Cliente where id_cliente='$idcode'\");\n if(mysql_num_rows($qry) > 0){\n $nombre = mysql_result($qry, 0, \"nombre\");\n $apellidos = mysql_result($qry, 0, \"apellidos\");\n $dir = mysql_result($qry, 0, \"direccion\");\n $direccion = $dir;\n $numext = mysql_result($qry, 0, \"numext\");\n $numint = mysql_result($qry, 0, \"numint\");\n $colonia = mysql_result($qry, 0, \"colonia\");\n $poblacion = mysql_result($qry, 0, \"poblacion\");\n $zip = mysql_result($qry, 0, \"codigo_postal\");\n $idedo = get_nombre_estado(mysql_result($qry, 0, \"id_estado\"));\n $estado = $idedo;\n $telefono = mysql_result($qry, 0, \"telefono\");\n $email = mysql_result($qry, 0, \"email\");\n $cantidad = mysql_result($qry, 0, \"auxiliar1\");\n }\n else\n return(\"null\");\n\n $bolmain = split(\":\", get_boletos($idcode, $idpaquete, 1));\n $printmain = \"<table border=2 width=300><tr><td><font face=Arial, Helvetica, sans-serif size=2><b>\";\n $i=1;\n foreach($bolmain as $key){\n if($i==4)\n $printmain .= \"<br>\";\n $printmain = $printmain .\"&nbsp; $key &nbsp;\";\n $i++;\n }\n $printmain .= \"</td></tr></table>\";\n\n\n //Obtenemos el mail de confirmacion\n $ruta = \"/var/www/html/edm/paquete\".$idpaquete.\"/mailbot/\";\n \n if($tipocorreo == \"bnk\"){\n $url_oxxo = get_codigo_oxxo($idcode, $idpaquete);\n $num_oxxo = substr($url_oxxo, -26);\n $vencimiento = date(\"d-M-Y\", mktime(0, 0, 0, date('m'), date('d')+15, date('Y')));\n $lineaserf = $serf;\n $lineainv = $inv;\n $lineahsbc = $hsbc;\n $lineaban = $ban;\n $lineabbva = $bbva;\n $bolyes = split(\":\", get_boletos($idcode, $idpaquete, 2));\n $bolyes2 = split(\":\", get_boletos($idcode, $idpaquete, 4));\n $subject = \"Confirmaci�n de Orden\";\n $ruta = $ruta.\"mail_yesses_banco.php\";\n @include $ruta;\n }\n $headers = \"From: Reader's Digest <servicio.clientes@etapafinal2.com.mx> \\n\";\n $headers .= \"Content-Type: text/html; charset=iso-8859-1\\n\";\n\n if(isset($mailbody)){\n if(!mail($email, $subject, $mailbody, $headers))\n return false;\n }else\n return false;\n }", "title": "" }, { "docid": "af8bd6a6cdf145117a06d943403ca5c0", "score": "0.5326857", "text": "public function actionDomicilioCliente(){\n $fkCliente = Yii::app()->getRequest()->getParam(\"fkClient\");\n $modelAddress = ClassroomAddress::model()->getClassroomAddress($fkCliente);\n if(count($modelAddress) > 0){\n echo '{\"calle\": \"'.$modelAddress->street.\n '\", \"numero\": \"'.$modelAddress->street_number.\n '\", \"numeroInt\": \"'.$modelAddress->street_number_int.\n '\", \"colonia\": \"'.$modelAddress->neighborhood.\n '\", \"municipio\": \"'.$modelAddress->county.\n '\", \"estado\": \"'.$modelAddress->fk_state_dir.\n '\", \"pais\": \"'.$modelAddress->country.\n '\", \"cp\": \"'.$modelAddress->zipcode.\n '\", \"telefono\": \"'.$modelAddress->phone.\n '\", \"existe\" : true}';\n }else{\n echo '{\"existe\" : false}';\n }\n }", "title": "" }, { "docid": "9590655e115a9c9d9d2d3e525826daa9", "score": "0.53251415", "text": "function existeVisiometria($cedula){\n $con = new DBManager;\n //usamos el metodo conectar para realizar la conexion\n if($con->conectar()==true){\n $query = \"SELECT * FROM visiometria WHERE caso='$cedula' AND estado='Cerrado'\";\n\t$result = @mysql_query($query);\n\t $row=mysql_fetch_row($result);\n\t if (!$row)\n\t return false;\n\t else\n\t return true;\n }\n }", "title": "" } ]
a2aea1e22026a9711f3f06fe8f5aeb2a
Returns a pointer to the JSON object that will be returned in the response. Return the JSON response for manipulation
[ { "docid": "27f7b8186d432d68712556c58e2c1408", "score": "0.0", "text": "public function &data($data = null) {\n\t\tif ($data !== null) {\n\t\t\t$this->json[\"data\"] = $data;\n\t\t}\n\t\treturn $this->json[\"data\"];\n\t}", "title": "" } ]
[ { "docid": "1797683f7b954faaf06fcdb3c9fea21e", "score": "0.7514361", "text": "public function GetResponseJSON();", "title": "" }, { "docid": "0877680b7e058d230ece784089025f3e", "score": "0.72858393", "text": "public function getResponseJson(){\n if(!empty($this->response)) return json_encode($this->response);\n return null;\n }", "title": "" }, { "docid": "e0b850e86ffde54dcb08d28f6cefe243", "score": "0.71160805", "text": "public function getResponseJson()\r\n\t{\r\n\t\treturn json_encode($this->getResponse());\r\n\t}", "title": "" }, { "docid": "e922925496b42c8c445a299824bc81d0", "score": "0.694067", "text": "protected function respond()\n {\n $response = new JsonResponse;\n return $response->setData($this->response);\n }", "title": "" }, { "docid": "4a9cfe214a0484927b334085562e9948", "score": "0.69136107", "text": "public function json(){\n $response = [\n 'code' => $this->appCode,\n 'message' => $this->message,\n 'data' => $this->data\n ];\n\n if($this->errors){$response['errors'] = $this->errors;}\n if($this->links && $this->meta){$response['paginator']=[\n 'links' => $this->links,\n 'meta' => $this->meta\n ];}\n\n return Response::json($response,$this->httpStatus);\n }", "title": "" }, { "docid": "968883ca7c6cd769403a5a4d9ef54c71", "score": "0.6869627", "text": "public function getJson()\n\t{\n\t\ttry {\n\t\t\t$return = parent::getJson();\n\t\t}\n\t\tcatch (\\yetti\\API\\Exception $e)\n\t\t{\n\t\t\t$template = new \\stdClass();\n\t\t\t$template->id = null;\n\t\t\t$template->name = null;\n\t\t\t\n\t\t\t$this->setJson($template);\n\t\t}\n\t\t\n\t\treturn parent::getJson();\n\t}", "title": "" }, { "docid": "ca0a7b90cb61647e66cccf9b85753aee", "score": "0.6859423", "text": "public function json()\n {\n return new JsonResponse($this->data, $this->status, $this->headers, $this->options);\n }", "title": "" }, { "docid": "9d72d9ce6faa4f24aeba3d911cc83df8", "score": "0.6779053", "text": "function get_json() {\r\n $data = $this->get_data();\r\n return json_encode( $data );\r\n }", "title": "" }, { "docid": "c7ba80e7fb4c22456ff46b5458a3d3a7", "score": "0.67498213", "text": "public function __invoke(): JsonResponse\n {\n $ads = $this->show_properties_to_clients_use_case->execute();\n\n $response = new JsonResponse($ads);\n $response->setEncodingOptions( $response->getEncodingOptions() | JSON_PRETTY_PRINT );\n\n return $response;\n }", "title": "" }, { "docid": "9efa43a659cbe6a96cc49a715b047ca3", "score": "0.67394745", "text": "public function jsonSerialize()\n {\n Response::jsonField('version', $this->getVersion());\n Response::jsonField('title', $this->getTitle());\n Response::jsonField('description', $this->getDescription());\n Response::jsonField('termsOfService', $this->getTermsOfService());\n Response::jsonField('contact', $this->getContact());\n Response::jsonField('license', $this->getLicense());\n\n return Response::jsonSerialize($this);\n }", "title": "" }, { "docid": "1b1fffacbb9d54f2ab4b99a7671a4703", "score": "0.67388386", "text": "public function getJson() {\n\t return $this->json;\n\t }", "title": "" }, { "docid": "559319d0ae9a121acea65b8dd42dd9c3", "score": "0.6711684", "text": "public function json()\n\t{\n\t\t$ret = \"\";\n\n\t\tif (count($this->error) == 0)\n\t\t\t$this->run(); \n\n\t\tif (count($this->error) == 0)\n\t\t{\n\t\t\t$this->prepare();\n\t\t\t$ret = $this->data;\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader(\"HTTP/1.0 500 smartVISU Service Error\");\n\t\t\t$ret = $this->error;\n\t\t}\n\n\t\t$this->debug($ret, \"data\");\n\n\t\theader('Content-Type: text/json');\n\t\treturn json_encode($ret);\n\t}", "title": "" }, { "docid": "da1ef33fa73a5680dcc5715b03a00f68", "score": "0.6647572", "text": "public function json() {\n\t\t$this->to_json();\n\t\treturn $this->json;\n\t}", "title": "" }, { "docid": "efe684c15342b70529eb911f7a2d8aaa", "score": "0.66365457", "text": "public function getJson()\n {\n return $this->_json;\n }", "title": "" }, { "docid": "c67090a460538e4a634aa6386f184ac2", "score": "0.66337854", "text": "public function singleJSON()\n\t{\n\t\theader('Content-Type: application/json');\n\t\t$this->execute();\n\t\treturn json_encode($this->statement->fetch(PDO::FETCH_ASSOC), JSON_PRETTY_PRINT);\n\t}", "title": "" }, { "docid": "acf269d5c31fa4469693f7f300116fe1", "score": "0.66309094", "text": "public function jsonSerialize()\n {\n $jsonObject = parent::jsonSerialize();\n $jsonObject->success = $this->isSuccessful();\n\n return $jsonObject;\n }", "title": "" }, { "docid": "ab314be3fe09852925bc65c8992b06d7", "score": "0.66154414", "text": "public static function GET_JSON(){\n\t\tif(self::$mkJson){\n\t\t\tself::$json = json_encode(self::$d);\n\t\t\tself::$mkJson = false;\n\t\t}\n\t\treturn self::$json;\n\t}", "title": "" }, { "docid": "b0eed53a6224f702c8ccb140b771583d", "score": "0.6575425", "text": "protected function getJsonResponse(): JsonResponse\n {\n ControllerUtil::requireActionController($this);\n \n /** @noinspection PhpParamsInspection */\n return TypoContext::getInstance()->di()\n ->getService(ResponseFactory::class)\n ->make($this->request, $this->view, JsonControllerUtil::resolveRow($this));\n }", "title": "" }, { "docid": "07dedf1f21f0823833328ef1ec68b343", "score": "0.6567328", "text": "public function json($params){\n\t\treturn (new JSONResponse()) -> setBody($params);\n\t}", "title": "" }, { "docid": "ad5398fae2a4fa9c2bd91cee4cef0a69", "score": "0.6529069", "text": "protected function getJsonFromResponse()\n {\n return json_decode($this->response->getContent(), true);\n }", "title": "" }, { "docid": "7774688f461538df3899ecce04e4739a", "score": "0.6488515", "text": "public function create()\n {\n return Util::coreJsonResponse();\n }", "title": "" }, { "docid": "b5b7f32d281508387372949c002263a2", "score": "0.64779603", "text": "public function getJSON() {\n return $this->jsonData;\n }", "title": "" }, { "docid": "020f3f6edeb38b208bedbad588ed35ea", "score": "0.645155", "text": "protected function _returnData()\n {\n $_output = array(\n 'error' => $this->_errorResponse,\n 'html' => $this->_htmlResponse,\n 'data' => $this->_dataResponse,\n );\n return $this->_json($_output);\n }", "title": "" }, { "docid": "5191aa85bc37bd3ffd396f4a755475fd", "score": "0.64445746", "text": "public\n\nfunction response():JsonResponse {\n\t\t//return $this->Jsondata;\n\t\treturn response()->json(\n\t\t\t[\n\t\t\t\t'status' => $this->status != 200?false:true,\n\t\t\t\t'message' => $this->message,\n\t\t\t\t'result' => $this->Jsondata,\n\t\t\t\t'meta' => $this->meta,\n\t\t\t\t'errors' => $this->errors,\n\t\t\t\t'errorCode' => $this->status,\n\t\t\t],\n\t\t\t$this->status, [\n\t\t\t\t'Content-Type' => 'application/json',\n\t\t\t\t'Charset' => 'utf-8',\n\t\t\t], JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);\n\t}", "title": "" }, { "docid": "a1a52671fb001b48ac682190a122135c", "score": "0.6435566", "text": "function get_json(){\r\n $array=array();\r\n $array[\"name\"] = $this->name;\r\n $array[\"body\"] = $this->body;\r\n $array[\"avatar\"] = $this->avatar;\r\n $array[\"time\"] = $this->time;\r\n $array[\"tally\"] = $this->tally;\r\n $array[\"key\"] = $this->key;\r\n return json_encode($array);\r\n }", "title": "" }, { "docid": "17a11c33b9cd098ab8962c66efb8b038", "score": "0.64288586", "text": "function responeJson($obj){\n\theader('Content-Type: application/json');\n\techo json_encode($obj);\n}", "title": "" }, { "docid": "4229ec221f6c6cb11481aaa5356a32bd", "score": "0.640313", "text": "public function getResponse() {\n\t\treturn json_decode($this->_response, true);\n\t\t}", "title": "" }, { "docid": "25b66a0e3018e8420a7a544709f82e88", "score": "0.6386759", "text": "public function execJson()\n {\n $response = $this->exec();\n if ($response->data && empty($response->errors)) {\n $data = json_decode($response->data, 1);\n if (!empty($data)) {\n $response->data = $data;\n } else {\n $response->errors[] = 'Could not parse json!';\n }\n }\n return $response;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.6364717", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.6364717", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.6364717", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.6364717", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.6364717", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "fcef41f111c95900bba2f1052b553331", "score": "0.6353776", "text": "function getJson(){\n $arr = array('error' => $this->error, 'message' => $this->message, 'data' => $this->data);\n return json_encode($arr);\n }", "title": "" }, { "docid": "8d2350dcf808e6e7619624c2902c2c20", "score": "0.6351637", "text": "private function getResponse()\n {\n return json_decode($this->response->getBody(), true);\n }", "title": "" }, { "docid": "53fce73b566a45971c0e14b6d34904aa", "score": "0.6348496", "text": "function returnJson($response)\n{\n header('Content-Type: application/json');\n echo json_encode($response);\n exit;\n\n}", "title": "" }, { "docid": "4559c8410eafa0c4d3718226d303d12c", "score": "0.6346707", "text": "public function as_object()\n {\n if( $response = json_decode( $this->response_data ) )\n {\n return $response;\n }\n\n return new \\stdClass;\n }", "title": "" }, { "docid": "642204ff25a05ab3628b306c8c00e698", "score": "0.634652", "text": "public function json() {\n\t\thttp_response_code( $this->status_code );\n\t\theader( 'Content-type: application/json; charset=utf-8' );\n\n\t\t// set custom headers.\n\t\tif ( $this->headers ) {\n\t\t\tforeach ( $this->headers as $header_key => $header_value ) {\n\t\t\t\theader( $header_key . ': ' . $header_value );\n\t\t\t}\n\t\t}\n\n\t\tif ( substr( $this->status_code, 0, 1 ) === \"2\" ) {\n\t\t\techo json_encode( [\n\t\t\t\t'data' => $this->data\n\t\t\t] );\n\t\t} else {\n\t\t\t$errors = [\n\t\t\t\t'status' => $this->status_code,\n\t\t\t\t'title' => $this->status_codes[ $this->status_code ],\n\t\t\t];\n\n\t\t\tif ( $this->data && is_string( $this->data ) ) {\n\t\t\t\t$errors['detail'] = $this->data;\n\t\t\t}\n\t\t\techo json_encode( [\n\t\t\t\t'errors' => $errors\n\t\t\t] );\n\t\t}\n\n\t}", "title": "" }, { "docid": "02c156e742fe5d5925b501f59311ed77", "score": "0.6341155", "text": "function get_response() {\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "fdb1e1dc3ba8f06e65732723369dc95f", "score": "0.63331604", "text": "public function json()\n\t{\n\t\treturn json_encode($this->data);\n\t}", "title": "" }, { "docid": "b74e2519932efe0683ff6014763c85b2", "score": "0.63291967", "text": "public function getApiJson()\n {\n Yii::$app->response->headers->add('Content-Type', 'application/json');\n return Json::encode($this->getApiArray());\n }", "title": "" }, { "docid": "5406ee74d451dbfb94989aa13d7e6ed2", "score": "0.63160306", "text": "private function getResponse()\n {\n return json_decode($this->response->getBody(), true);\n }", "title": "" }, { "docid": "5406ee74d451dbfb94989aa13d7e6ed2", "score": "0.63160306", "text": "private function getResponse()\n {\n return json_decode($this->response->getBody(), true);\n }", "title": "" }, { "docid": "5406ee74d451dbfb94989aa13d7e6ed2", "score": "0.63160306", "text": "private function getResponse()\n {\n return json_decode($this->response->getBody(), true);\n }", "title": "" }, { "docid": "336aae82e532002b3394ecb4305060a9", "score": "0.6310387", "text": "function buildResponse($json) {\n $storageObj = new Storage();\n $jsonDocList = array();\n\n $storageObj->setJsonDocList($jsonDocList);\n $storageObj->setStrResponse($json);\n $jsonObj = new JSONObject($json);\n $jsonObjApp42 = $jsonObj->__get(\"app42\");\n $jsonObjResponse = $jsonObjApp42->__get(\"response\");\n $storageObj->setResponseSuccess($jsonObjResponse->__get(\"success\"));\n $jsonObjStorage = $jsonObjResponse->__get(\"storage\");\n $this->buildObjectFromJSONTree($storageObj, $jsonObjStorage);\n\n if (!$jsonObjStorage->has(\"jsonDoc\"))\n return $storageObj;\n\n if ($jsonObjStorage->__get(\"jsonDoc\") instanceof JSONObject) {\n // Only One attribute is there\n $jsonObjDoc = $jsonObjStorage->__get(\"jsonDoc\");\n $document = new JSONDocument($storageObj);\n $this->buildJsonDocument($document, $jsonObjDoc);\n } else {\n // There is an Array of attribute\n $jsonObjDocArray = $jsonObjStorage->getJSONArray(\"jsonDoc\");\n for ($i = 0; $i < count($jsonObjDocArray); $i++) {\n // Get Individual Attribute Node and set it into Object\n $jsonObjDoc = $jsonObjDocArray[$i];\n $document = new JSONDocument($storageObj);\n //$jsonObjDoc = new JSONObject($jsonObjDoc);\n $this->buildJsonDocument($document, $jsonObjDoc);\n }\n }\n\n return $storageObj;\n }", "title": "" }, { "docid": "d9c56ec48e1988b920d1ae608d104978", "score": "0.6308001", "text": "private function ajson($data){\n $json = $this->get('serializer')->serialize($data, 'json');\n\n // Response with httpfoundation\n $response = new Response();\n\n // Assign content to the response\n $response->setContent($json);\n\n // Specify response format\n $response->headers->set('Content-Type', 'application/json');\n\n // Return response\n return $response;\n }", "title": "" }, { "docid": "96778f736da4764d90719c7a351c64dd", "score": "0.63079524", "text": "public function toJSON(){\n // $json_request = $this->request;\n // $json_request[\"params\"][\"order\"] = $this->order_id;\n // $json_request[\"params\"][\"amount\"] = $this->amount;\n // $json_request[\"params\"][\"currency\"] = $this->currency;\n // $json_request[\"params\"][\"group_id\"] = $this->group_id;\n // $json_request[\"params\"][\"original_url\"] = $this->original_url;\n // $json_request[\"params\"][\"notify\"][\"result\"] = $this->notify;\n // //PSD2 params\n // if($this->sca_exemptions !== null){\n // $json_request[\"params\"][\"sca_exemptions\"] = $this->sca_exemptions;\n // }\n // if($this->emv3ds !== null){\n // $json_request[\"params\"][\"emv3ds\"] = $this->emv3ds;\n // }\n \n return json_encode($this->toArray());\n }", "title": "" }, { "docid": "2a3d600c80222095ff87fd423fcc4925", "score": "0.6300208", "text": "public function getJson(): string {\n return $this->json;\n }", "title": "" }, { "docid": "0ed355794021404fedc7cded28ae8be4", "score": "0.62991506", "text": "public function jsonContent() {\n if(is_null($this->jsonReceived))\n $this->jsonReceived = json_decode(file_get_contents(\"php://input\"));\n return $this->jsonReceived;\n }", "title": "" }, { "docid": "0864e78c568ef38ca3cd89881d99dc53", "score": "0.62933093", "text": "public function json(): mixed\n {\n $json = null;\n if (str_starts_with($this->content_type, 'application/json')) {\n $json = json_decode($this->raw_data, true);\n }\n\n return $json;\n }", "title": "" }, { "docid": "a18f66dabbed3585a57be48f6eb0b897", "score": "0.62910616", "text": "protected function json($data)\r\n {\r\n return $this->response->json($data);\r\n }", "title": "" }, { "docid": "8a76f75efbec7889b20dcb60128c0bf1", "score": "0.6289153", "text": "public function jsonSerialize()\n {\n return $this->getBody();\n }", "title": "" }, { "docid": "83b510eda017fbf2a3bcbfda7a9573f6", "score": "0.628191", "text": "public function postJsonp(){\n\t\treturn json_decode(file_get_contents('php://input'), true);\n\t}", "title": "" }, { "docid": "5f8c357e0a4b340da7350ddd9dc5ec22", "score": "0.6281581", "text": "public function getResponseObject() {\n return $this->responseObject;\n }", "title": "" }, { "docid": "d9874ed7ec07870da10e7cbe7f730b5e", "score": "0.6279468", "text": "public function json()\n\t{\n\t\treturn json_decode($this->content);\n\t}", "title": "" }, { "docid": "bd1d4eb38742e31cf9263f4c3934f6f3", "score": "0.6271318", "text": "public function getJSON()\n {\n return json_encode($this->data);\n }", "title": "" }, { "docid": "1c246ca4f2f272c64beec190ab4f3709", "score": "0.62594587", "text": "function response() {\n \n // Build output.\n $output = ['status' => $this->status, 'process' => $this->process];\n \n if( !$this->error ) {\n \n if( !empty($this->data) or $this->method == 'GET' ) { $output['data'] = $this->data; }\n \n if( !empty($this->features) ) { $output = array_merge($output, $this->features); }\n \n }\n \n // Save the data to the cache.\n if( $this->caching && !$this->params[0] == 'progress' ) $this->__cache();\n \n // Set response code.\n http_response_code( $this->status['code'] );\n \n // Return JSON.\n return json_encode($output);\n \n }", "title": "" }, { "docid": "d6504f71ad715a5d7ab33137ec2f5590", "score": "0.6258762", "text": "public function toResponse()\n {\n return response()->json($this, $this->status, $this->headers);\n }", "title": "" }, { "docid": "5754967f7013ab2607dd85b36ea7a29e", "score": "0.62527007", "text": "public function getJSON()\n{\n return\n \"{\" . \"<br>\" . \n \"\\\"id\\\":\" . $this->get_id() . \",\" . \"<br>\" . \n \"\\\"author_id\\\":\" . $this->get_author_id() . \",\" . \"<br>\" . \n \"\\\"written_stamp\\\":\\\"\" . $this->get_written_stamp() . \"\\\"\" . \",\" . \"<br>\" . \n \"\\\"reader_id\\\":\" . $this->get_reader_id() . \",\" . \"<br>\" . \n \"\\\"read_stamp\\\":\\\"\" . $this->get_read_stamp() . \"\\\"\" . \",\" . \"<br>\" . \n \"\\\"text\\\":\\\"\" . $this->get_text() . \"\\\"\" . \",\" . \"<br>\" . \n \"\\\"media_id\\\":\" . $this->get_media_id() . \"<br>\" . \n \"}\"; \n}", "title": "" }, { "docid": "8a68d6497bdcbf3116cda0b00466dd7c", "score": "0.6245451", "text": "public function toJSONObject()\n {\n }", "title": "" }, { "docid": "9e9061f4b485c63258fcd5c3bf2a4f01", "score": "0.62370217", "text": "public function output_json()\n {\n $output = $this->output();\n return json_encode($output);\n }", "title": "" }, { "docid": "81a15623fb5801299959e7d1c956b695", "score": "0.6220746", "text": "function jsonSerialize()\n {\n return $this->data;\n }", "title": "" }, { "docid": "31f1dce16af1588d8bfe1c56b8bd221b", "score": "0.6216758", "text": "public function getResponseBody();", "title": "" }, { "docid": "c8fd3426defb9a82b0c5964a975dd79b", "score": "0.6202823", "text": "public function getJsonStr(){\n return json_encode($this->result);\n }", "title": "" }, { "docid": "6ae7289a45b25d31fcfb5cfe60deb2a4", "score": "0.6202475", "text": "public function getJson()\n {\n return json_encode($this->data);\n }", "title": "" }, { "docid": "f435cea19864827f2e0f06a8ef7271f3", "score": "0.619379", "text": "public function json() {\n\t\t$json = parent::json();\n\t\t$json['heading'] = $this->heading;\n\t\t$json['expanded'] = $this->expanded;\n\t\t$json['parent'] = $this->parent;\n\n\t\treturn $json;\n\t}", "title": "" }, { "docid": "1c074dce23361cea8eea776d341bc0a8", "score": "0.6177772", "text": "public function jsonSerialize()\n {\n $json = array();\n $json['success'] = $this->success;\n $json['statusCode'] = $this->statusCode;\n $json['statusText'] = $this->statusText;\n $json['service'] = $this->service;\n $json['data'] = $this->data;\n\n return $json;\n }", "title": "" }, { "docid": "a621bc5ddcdf57409ec04549b5234dab", "score": "0.61771655", "text": "public function getJsonBody()\n {\n return $this->json_body;\n }", "title": "" }, { "docid": "abe251c6d9168f3c4d2b2ef18e2f6a89", "score": "0.6150167", "text": "public function index() : JSONResponse\n\t{\n\t\treturn new JSONResponse($this->product->all());\t\n\t}", "title": "" }, { "docid": "10a8c160129f554a8376cbd6c489b0ed", "score": "0.61387897", "text": "public function callback()\n\t{\t\n\t\t$this->getRawResponse();\n\t\treturn json_decode($this->response);\n\t}", "title": "" }, { "docid": "5f4d4a5b2fdede6122c0cc31f3269b77", "score": "0.6132058", "text": "public function json(){\n $return = $this->getData();\n $this->reInit();\n return json_encode($return->fetchAll());\n }", "title": "" }, { "docid": "c20189d7a83a214c6860eb7f6f66e622", "score": "0.61316645", "text": "public function getJsonData()\n {\n\n return $this->json_data;\n }", "title": "" }, { "docid": "388ed9f09f81d33ab5c8c43eb97e569b", "score": "0.6129065", "text": "public function jsonSerialize()\n {\n return $this->data;\n }", "title": "" }, { "docid": "cd9907665aa23a2ecb86482d0f23c602", "score": "0.61220294", "text": "public function getJson()\n {\n $content = $this->getMinkContext()->getSession()->getPage()->getContent();\n return json_decode($content);\n }", "title": "" }, { "docid": "e98ea1c358c7f28d3d1eee70dc35ff89", "score": "0.6118088", "text": "function createResponse()\r\n\t{\r\n\t\t$response = new Art_Model_JSONRPC_Response;\r\n\t\t$response->setId($this->getId());\r\n\t\t\r\n\t\tif( !$this->isValid() )\r\n\t\t{\r\n\t\t\t$response->setError($this->_error_code);\r\n\t\t}\r\n\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "afeeb2e52297f9d61b98ca2198fe21af", "score": "0.61112994", "text": "public function JsonResponse ($data, $terminate = TRUE, $jsonEncodeFlags = 0);", "title": "" }, { "docid": "b940a974778eee5866e63267f18aad18", "score": "0.6106129", "text": "public function json() {\n $json = parent::json();\n $json['pro_text'] = $this->pro_text;\n $json['pro_url'] = $this->pro_url;\n return $json;\n }", "title": "" }, { "docid": "98a6d5b483668655bd79e1d8eb6d4079", "score": "0.6102235", "text": "function jsonSerialize()\n {\n return array(\n \"id\" => $this->id,\n \"name\" => $this->name,\n \"life\" => $this->life\n );\n }", "title": "" }, { "docid": "4df2709e722459090483e82e4dadeb1b", "score": "0.6102211", "text": "public function json()\r\n\t{\r\n\t\treturn to_json($this);\r\n\t}", "title": "" }, { "docid": "5eb2ff2f1f0cf6ba7dc644546890651d", "score": "0.6101443", "text": "public function get_response();", "title": "" }, { "docid": "98d4f31d943eda5d40a0aa8917970cdf", "score": "0.6093565", "text": "function response($result, $request) {\r\n\t\t$response = array(\r\n\t\t\t'result' => $result,\r\n\t\t\t'id' => $request['id'],\r\n\t\t);\r\n\t\treturn json_encode($response);\r\n\t}", "title": "" }, { "docid": "2028c9a408853f72639b8df6b95c4157", "score": "0.6085551", "text": "private function resjson($data){\n $json = $this->get('serializer')->serialize($data, 'json');\n // Response con httpfoundation\n $response = new Response();\n // Asignar contenido a la respuesta\n $response->setContent($json);\n // Indicar formato de respuesta\n $response->headers->set('Content-Type', 'application/json');\n // Devolver la respuesta\n return $response;\n }", "title": "" }, { "docid": "76757db972cee4856753218a26f709a0", "score": "0.6084558", "text": "public function makeJSON() {\r\n\r\n if ($this->date instanceof DateTime) {\r\n $timezone = $this->date->getTimezone();\r\n } else {\r\n $timezone = new DateTimeZone(\"Australia/Melbourne\");\r\n }\r\n\r\n if (!filter_var($this->id, FILTER_VALIDATE_INT)) {\r\n throw new Exception(\"Cannot make a JSON object for the requested news article beacause no valid article ID was found. Something's wrong....\");\r\n }\r\n\r\n if (empty( $this->getParagraphs() ) && !empty( $this->source )) {\r\n if ($this->url instanceof Url) {\r\n $this->url->url = $this->source;\r\n } else {\r\n $this->url = $this->source;\r\n }\r\n }\r\n\r\n $response = array(\r\n \"namespace\" => $this->Module->namespace,\r\n \"module\" => $this->Module->name,\r\n \"article\" => array(\r\n \"id\" => $this->id,\r\n \"title\" => $this->title,\r\n \"hits\" => $this->hits,\r\n \"blurb\" => $this->getLead(),\r\n \"body\" => $this->getParagraphs(),\r\n \"image\" => $this->featured_image,\r\n \"approved\" => $this->approved,\r\n \"queued\" => $this->queued,\r\n \"source\" => $this->source,\r\n\r\n \"url\" => $this->url instanceof Url ? $this->url->getURLs() : array( \"url\" => sprintf(\"/news/article-%d\", $this->id) ),\r\n\r\n \"topic\" => $this->Topic->getArray(),\r\n\r\n \"thread\" => array(\r\n \"id\" => $this->topic_id,\r\n \"url\" => array(\r\n \"view\" => filter_var($this->topic_id, FILTER_VALIDATE_INT) ? sprintf(\"/f-t%d.htm\", $this->topic_id) : \"\"\r\n )\r\n ),\r\n\r\n \"date\" => array(\r\n \"absolute\" => $this->date->format(\"Y-m-d H:i:s\"),\r\n \"timezone\" => $timezone->getName(),\r\n \"unixtime\" => $this->date->getTimestamp()\r\n ),\r\n\r\n \"author\" => array(\r\n \"id\" => $this->Author->id,\r\n \"username\" => $this->Author->username,\r\n \"url\" => array(\r\n \"view\" => $this->Author->url instanceof Url ? $this->Author->url->url : $this->Author->url\r\n )\r\n ),\r\n\r\n \"staff\" => array(\r\n \"id\" => $this->Staff->id,\r\n \"username\" => $this->Staff->username,\r\n \"url\" => array(\r\n \"view\" => $this->Staff->url instanceof Url ? $this->Staff->url->url : $this->Staff->url\r\n )\r\n ),\r\n )\r\n );\r\n\r\n if (!isset( $response['article']['url']['edit'] )) {\r\n $response['article']['url']['edit'] = sprintf(\"/news?mode=article.edit&id=%d\", $this->id);\r\n }\r\n\r\n $response = json_encode($response);\r\n\r\n $this->Memcached->save(sprintf(\"json:railpage.news.article=%d\", $this->id), $response);\r\n\r\n return $response;\r\n }", "title": "" }, { "docid": "f53276a2b7a74d2f40d19be10a10caa4", "score": "0.6078644", "text": "public function jsonSerialize(): stdClass\n {\n return (object) [\n 'avatar_url' => ($url = $this->getAvatarURL()) ? (string) $url : null,\n 'description' => $this->getDescription(),\n 'full_name' => $this->getFullName(),\n 'id' => $this->getId(),\n 'location' => $this->getLocation(),\n 'username' => $this->getUsername(),\n 'visibility' => $this->getVisibility(),\n 'website' => ($url = $this->getWebsite()) ? (string) $url : null\n ];\n }", "title": "" }, { "docid": "c6a0cfc1ff54fb0827e1a66c33a4ce09", "score": "0.6072815", "text": "function output($Return=array()){\r\n /*Set response header*/\r\n header(\"Access-Control-Allow-Origin: *\");\r\n header(\"Content-Type: application/json; charset=UTF-8\");\r\n /*Final JSON response*/\r\n exit(json_encode($Return));\r\n}", "title": "" }, { "docid": "1747a01b9b6d985dc23d529e6c3e7ef5", "score": "0.60693806", "text": "public function toJsonData()\n {\n return json_encode(\n array(\n 'body' => $this->body,\n 'private' => $this->private,\n 'user_id' => $this->userId\n )\n );\n }", "title": "" }, { "docid": "61903f638ca78b5240cd4fa8c7729f52", "score": "0.60632485", "text": "public function getJsonString()\r\n\t{\r\n\t\t$json = $this->data;\r\n\r\n\t\tif( isset( $json['prizes'] ) && !is_null( $json['prizes'] ) ) {\r\n\t\t\t$json['prizes'] = $json['prizes']->getJsonArray();\r\n\t\t}\r\n\r\n\t\tif( isset( $json['attrs'] ) && !is_null( $json['attrs'] ) ) {\r\n\t\t\t$json['attrs'] = $json['attrs']->getJsonArray();\r\n\t\t}\r\n\r\n\t\tif( isset( $json['scarcity'] ) && !is_null( $json['scarcity'] ) ) {\r\n\t\t\t$json['scarcity'] = $json['scarcity']->getJsonArray();\r\n\t\t}\r\n\r\n\t\tif( isset( $json['customFields'] ) && !is_null( $json['customFields'] ) ) {\r\n\t\t\t$customFieldsArr = array();\r\n\t\t\tforeach( $json['customFields'] as $customField ) {\r\n\t\t\t\tarray_push( $customFieldsArr, $customField->getJsonArray() );\r\n\t\t\t}\r\n\t\t\t$json['customFields'] = $customFieldsArr;\r\n\t\t}\r\n\r\n\t\tif( isset( $json['translations'] ) && !is_null( $json['translations'] ) ) {\r\n\t\t\t$translationsArr = array();\r\n\t\t\tforeach( $json['translations'] as $translation ) {\r\n\t\t\t\tarray_push( $translationsArr, $translation->getJsonArray() );\r\n\t\t\t}\r\n\t\t\t$json['translations'] = $translationsArr;\r\n\t\t}\r\n\r\n\t\treturn json_encode( $json );\r\n\t}", "title": "" }, { "docid": "43d2ef5da36ef23653a2340def72e2e5", "score": "0.6049362", "text": "public function response() {\n $this->jsonApiGenerator->reset();\n $this->jsonApiGenerator->setEntities($this->getEntities());\n $this->jsonApiGenerator->setLinks($this->getLinks());\n $this->jsonApiGenerator->setMetadata($this->getMetadata());\n $this->jsonApiGenerator->setIncludes($this->getIncludes());\n\n // Build a return the response.\n $response = new ResourceResponse(\n $this->jsonApiGenerator->generate(FALSE),\n 200,\n $this->getHeaders()\n );\n\n // Add the response cacheability.\n $response->addCacheableDependency(\n $this->jsonApiGenerator\n );\n $response->addCacheableDependency((new CacheableMetadata())\n ->addCacheContexts($this->getCacheContexts())\n ->addCacheTags($this->getCacheTags()));\n\n return $response;\n }", "title": "" }, { "docid": "61c4d7548ba4998b7a98779c9fd51493", "score": "0.60491866", "text": "function jsonSerialize()\n {\n return array(\n \"id\" => $this->getId(),\n \"content\" => $this->getContent(),\n \"author\" => $this->getAuthor(),\n \"date\" => $this->getDate()->format('Y-m-d H:m:s')\n );\n }", "title": "" }, { "docid": "0ff2ecac1889b00aa2f79a25727233bb", "score": "0.60426354", "text": "public function toJSON ()\n {\n $json = json_encode($this);\n if ($json == null) {\n throw new ApiJsonException(\"JSON encode failed ( error : \" . json_last_error() . \" )\");\n }\n return $json;\n }", "title": "" }, { "docid": "4598671780c7b1b1163585dac976c3c6", "score": "0.6036333", "text": "public function jsonResponse($data)\n {\n return self::Json($data);\n }", "title": "" }, { "docid": "fff3d4288c36ae1876fd4e34c8ed3025", "score": "0.6036126", "text": "public function json($data, array $context = []): Response;", "title": "" }, { "docid": "f734362c6a003331be183ecb0a72c082", "score": "0.6029475", "text": "public function json() {\n\t\t$json = parent::json();\n\t\t$json['button_text'] = $this->button_text;\n\t\t$json['button_url'] = $this->button_url;\n\t\t$json['options'] = $this->options;\n\t\t$json['explained_features'] = $this->explained_features;\n\t\t$json['show_pro_label'] = $this->show_pro_label;\n\t\t$json['pro_label'] = $this->pro_label;\n\t\treturn $json;\n\t}", "title": "" }, { "docid": "c588ca9c17580294fdb10355b2470c71", "score": "0.60271657", "text": "public function jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['description'] = $this->description;\n $json['amount'] = $this->amount;\n $json['status'] = $this->status;\n\n return $json;\n }", "title": "" }, { "docid": "78a3118a50b44fd774212cc504d1e6e9", "score": "0.6026196", "text": "function responseJson($data=null, int $code = 200, string $reasonPhrase = '')\n {\n $res=app()->getResponseFactory()->createResponse($code, $reasonPhrase);\n $res->getBody()->write(json_encode($data));\n return $res->withHeader('content-type','application/json');\n }", "title": "" }, { "docid": "3800e9133b0010d7f5554f64457c20f7", "score": "0.60208184", "text": "public function jsonSerialize()\n {\n return $this->_raw;\n }", "title": "" }, { "docid": "3586dbcf31f2128a54185609cb817792", "score": "0.60191846", "text": "public function getJsonObject(): \\stdClass {\n return json_decode($this->getJson());\n }", "title": "" }, { "docid": "ed6ac9d981bc8a8a84614e702d7abea4", "score": "0.60183096", "text": "function jsonSerialize()\n\t{\n\t\treturn $this->results;\n\t}", "title": "" }, { "docid": "19afd5b6da92e3fe268730a583bf6b1d", "score": "0.6014578", "text": "public function getResponse () {}", "title": "" }, { "docid": "d0af4ea5a2a9e23d53a7ac96844473f1", "score": "0.60058284", "text": "public function getResponse() {\n\t\treturn array('response'=>$this->_response);\n\t}", "title": "" }, { "docid": "b875e8b0199decf781fa4f0aecb2f84a", "score": "0.60055965", "text": "final public function create(): JsonResponse\n {\n $this->setResponseVars(\n 'Form Data',\n [\n 'timezones' => Timezone::select(['id as value', 'name as label'])->get(),\n 'currencies' => [['value' => 1, 'label' => 'USD']],\n 'event_templates' => [['value' => 1, 'label' => 'Test Template']],\n 'logos' => [['value' => 1, 'label' => 'Test logo']]\n ]\n );\n return $this->apiResponse();\n }", "title": "" } ]
1ef868ca9f3c85b2d122a210b65877f2
Use the mtc_event table
[ { "docid": "80e4c81bfa8a4c29b37c5bb6e660a85f", "score": "0.5795497", "text": "public function __construct()\n {\n parent::__construct(\"MtcEvent\", BaseMtc_event::TABLE_NAME, \n BaseMtc_event::PRIMARY_KEY, BaseMtc_event::SCHEMA);\n }", "title": "" } ]
[ { "docid": "efb1f8bc567bab833bf327e385829222", "score": "0.5846758", "text": "function afficherevents(){\r\n\t\t$sql=\"SElECT * From event\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "title": "" }, { "docid": "65a7e76b8a170094048e6e28d3a56dd6", "score": "0.57844806", "text": "function eventclass_tb_pihakketiga()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\t\t$this->events[\"BeforeInsert\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "title": "" }, { "docid": "9cd1b353216a0b7107a83fc7f5f01f67", "score": "0.57628125", "text": "function eventclass_Tindakkan()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryList\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "title": "" }, { "docid": "19935661c2adc8f8c4b00e1f02957057", "score": "0.56177914", "text": "function eventreg_init()\n{\n\t// Get datbase setup - note that both pnDBGetConn() and pnDBGetTables()\n // return arrays but we handle them differently. For pnDBGetConn()\n // we currently just want the first item, which is the official\n // database handle. For pnDBGetTables() we want to keep the entire\n // tables array together for easy reference later on\n list($dbconn) = pnDBGetConn();\n $pntable = pnDBGetTables();\n\n // It's good practice to name the table and column definitions you\n // are getting - $table and $column don't cut it in more complex\n // modules\n\t\n $eventreg_events_table = $pntable['eventreg_events'];\n $eventreg_events_column = &$pntable['eventreg_events_column'];\n\n // Create the table - the formatting here is not mandatory, but it does\n // make the SQL statement relatively easy to read. Also, separating out\n // the SQL statement from the Execute() command allows for simpler\n // debug operation if it is ever needed\n $sql = \"DROP TABLE IF EXISTS $eventreg_events_table;\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _DROPTABLEFAILED);\n return false;\n }\n // Added the MyISAM table def to all three tables.\n\t$sql = \"CREATE TABLE $eventreg_events_table (\n $eventreg_events_column[eventid] int(11) NOT NULL auto_increment,\n $eventreg_events_column[name] varchar(255) default '',\n $eventreg_events_column[orgname] varchar(255) default '',\n $eventreg_events_column[category] varchar(10) default '',\n $eventreg_events_column[event_start] datetime default '0000-00-00 00:00:00',\n $eventreg_events_column[event_end] datetime default '0000-00-00 00:00:00',\n $eventreg_events_column[reg_start] datetime default '0000-00-00 00:00:00',\n $eventreg_events_column[reg_end] datetime default '0000-00-00 00:00:00',\n $eventreg_events_column[location] text default '',\n $eventreg_events_column[printtickets] TINYINT(1) ,\n $eventreg_events_column[country] varchar(15) default '',\n $eventreg_events_column[summary] longtext,\n $eventreg_events_column[header] longtext,\n $eventreg_events_column[description] longtext,\n $eventreg_events_column[registrations] tinyint(1)default '0',\n $eventreg_events_column[max_regs] int(11) default '0',\n $eventreg_events_column[fee] int(11) default '0',\n $eventreg_events_column[phone] text,\n $eventreg_events_column[eventlogo] varchar(255) default '',\n $eventreg_events_column[eventicon] varchar(255) default '',\n $eventreg_events_column[dateadded] datetime default '0000-00-00 00:00:00',\n $eventreg_events_column[addedby] varchar (255) default '',\n $eventreg_events_column[commentfieldlabel] varchar(255) default 'Comments?',\n $eventreg_events_column[notifyemail] varchar(255) default '',\n PRIMARY KEY(pn_id)) TYPE=MyISAM\";\n $dbconn->Execute($sql);\n\n // Check for an error with the database code, and if so set an\n // appropriate error message and return\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', \" \" . $eventreg_events_column[eventid] . \" \" . _CREATEEVENTSTABLEFAILED . \" \" . $sql);\n\t\t$output = new pnHTML();\n\t\techo $output->$eventreg_events_column[eventlogo];\n\t\techo $output->$sql;\n return false;\n }\n\n\t// It's good practice to name the table and column definitions you\n // are getting - $table and $column don't cut it in more complex\n // modules\n $eventreg_categories_table = $pntable['eventreg_categories'];\n $eventreg_categories_column = &$pntable['eventreg_categories_column'];\n\n // Create the table - the formatting here is not mandatory, but it does\n // make the SQL statement relatively easy to read. Also, separating out\n // the SQL statement from the Execute() command allows for simpler\n // debug operation if it is ever needed\n $sql = \"DROP TABLE IF EXISTS $eventreg_categories_table;\";\n $dbconn->Execute($sql);\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _DROPTABLEFAILED);\n return false;\n }\n\t$sql = \"CREATE TABLE $eventreg_categories_table (\n $eventreg_categories_column[categoryid] int(10) NOT NULL auto_increment,\n $eventreg_categories_column[name] varchar(255) NOT NULL default '',\n $eventreg_categories_column[description] longtext NOT NULL default '',\n $eventreg_categories_column[pc_categoryid] varchar(10) default '',\n PRIMARY KEY(pn_id)) TYPE=MyISAM\";\n $dbconn->Execute($sql);\n\n // Check for an error with the database code, and if so set an\n // appropriate error message and return\n // LDH - not 100% sure if pc_categoryid is an INT(10) or varchar(10)\n // Decided to follow suit with thhe eventreg_events table\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', \"CREATE TABLE $eventreg_categories_table (\n $eventreg_categories_column[categoryid] int(10) NOT NULL auto_increment,\n $eventreg_categories_column[name] varchar(255) NOT NULL default '',\n $eventreg_categories_column[description] longtext NOT NULL default '',\n $eventreg_categories_column[pc_categoryid] varchar(10) default '',\n PRIMARY KEY(pn_id)) TYPE=MyISAM\" . ' - ' . _CREATETABLEFAILED);\n return false;\n }\n\n\n// It's good practice to name the table and column definitions you\n // are getting - $table and $column don't cut it in more complex\n // modules\n $eventreg_registrations_table = $pntable['eventreg_registrations'];\n $eventreg_registrations_column = &$pntable['eventreg_registrations_column'];\n\n // Create the table - the formatting here is not mandatory, but it does\n // make the SQL statement relatively easy to read. Also, separating out\n // the SQL statement from the Execute() command allows for simpler\n // debug operation if it is ever needed\n $sql = \"DROP TABLE IF EXISTS $eventreg_registrations_table;\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _DROPTABLEFAILED);\n return false;\n }\n\n\t$sql = \"CREATE TABLE $eventreg_registrations_table (\n $eventreg_registrations_column[registrationid] int(10) NOT NULL auto_increment,\n\t\t $eventreg_registrations_column[eventid] int(11) NOT NULL default '0',\n $eventreg_registrations_column[userid] varchar(255) NOT NULL default '',\n $eventreg_registrations_column[comments] longtext NOT NULL,\n\t\t $eventreg_registrations_column[roomassignment] varchar(100) default '0',\n \t\t $eventreg_registrations_column[confirmationsent] int(1) default '0',\n \t\t $eventreg_registrations_column[numberofpeople] int(5) default '1',\n \t\t $eventreg_registrations_column[nameregistered] varchar(50) default '',\n \t\t $eventreg_registrations_column[altphone] varchar(14) default '',\n\t\t $eventreg_registrations_column[regemail] varchar(255) default '',\n PRIMARY KEY(pn_id)) TYPE=MyISAM\";\n $dbconn->Execute($sql);\n\n // Check for an error with the database code, and if so set an\n // appropriate error message and return\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n // Set up an initial value for a module variable. Note that all module\n // variables should be initialised with some value in this way rather\n // than just left blank, this helps the user-side code and means that\n // there doesn't need to be a check to see if the variable is set in\n // the rest of the code as it always will be\n\n pnModSetVar('EventReg', 'usepostcalendar', false);\n pnModSetVar('EventReg', 'eventsperpage', 10);\n\tpnModSetVar('EventReg', 'categorycolumns', 3);\n\tpnModSetVar('EventReg', 'mapservice', null);\n\tpnModSetVar('EventReg', 'viewregistrationlevel', ACCESS_ADMIN);//Sets detfault to admin only viewing registrations\n\tpnModSetVar('EventReg', 'notifyemail', pnConfigGetVar('adminmail'));//default person to notify of a registration is the site admin\n pnModSetVar('EventReg', 'timeformat','g:i a');\n pnModSetVar('EventReg', 'dateformat','m/d/Y');\n\tpnModSetVar('EventReg', 'AllowMultipleRegs',false);\n\tpnModAPIFunc(\"Permissions\",\"admin\",\"create\",array('type' =>'group',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'realm' =>0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'id' =>1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'component' =>'EventReg::',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'instance' =>'.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'level' =>600,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'insseq' =>-1));\n\n\n // Initialisation successful\n return true;\n}", "title": "" }, { "docid": "416815f6cada2fb89cd18b1176bc9bf2", "score": "0.55604935", "text": "public static function getTable()\n {\n return new Table('events');\n }", "title": "" }, { "docid": "805c2ee68150672e37039519aa4c738e", "score": "0.5558006", "text": "public function fetchEvents();", "title": "" }, { "docid": "7c8743d4570bae63f141751a1e53744a", "score": "0.54455227", "text": "function event_get($event_CID){\n\tglobal $contenttypes;\n\n\t// Get the relevant table\n\t$tablename=$contenttypes['event']['table'];\n\n\t// Get the event from the DB\n\t$items['query']\t=\"SELECT * FROM `$tablename` WHERE `cid` = '$event_CID';\";\n\t$items['result']=data_query($items['query']);\n\n\t// Return the result as-is\n\treturn $items['result'];\n}", "title": "" }, { "docid": "f53a4fe912b97f2ce0698d9732cc90f3", "score": "0.5408981", "text": "function class_GlobalEvents()\n\t{\n\t\t$this->events[\"AfterSuccessfulLogin\"]=true;\n\n\t\t$this->events[\"ModifyMenuItem\"]=true;\n\n\n//\tonscreen events\n\n\n\t\n\t\t$this->events[\"IsRecordEditable\"][\"timetable\"] = true;\n\t\n\t\t}", "title": "" }, { "docid": "a061fb33dde3b8655337c6e8a1c1635d", "score": "0.53230125", "text": "public static function getInstance()\n {\n return Doctrine_Core::getTable('DeviceEvent');\n }", "title": "" }, { "docid": "ba664815b590064a641048fb35d84283", "score": "0.5291434", "text": "function events_all()\n {\n return $GLOBALS['horus_events'];\n }", "title": "" }, { "docid": "e2658727a23f787e41df7d2ed9f5e917", "score": "0.52471733", "text": "abstract public function getEventType();", "title": "" }, { "docid": "e2658727a23f787e41df7d2ed9f5e917", "score": "0.52471733", "text": "abstract public function getEventType();", "title": "" }, { "docid": "824b2652afa9b14d0657235cf246df03", "score": "0.52278185", "text": "public function get_all_events(){\n\n\t}", "title": "" }, { "docid": "83dcc90d0b62c82244151fa86880b9be", "score": "0.515857", "text": "function affichersingle($nom_event){\r\n\t\t$sql=\"SElECT * From event where nom_event = $nom_event\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "title": "" }, { "docid": "adb835c220b6a5f0d02326bb6c0359fe", "score": "0.5156475", "text": "public function setEvent( $event );", "title": "" }, { "docid": "bd9a92057b48daf7d5d8e5e9b356351a", "score": "0.5114963", "text": "public function getEvent();", "title": "" }, { "docid": "5474aebf001689c10b208a44501dc9ea", "score": "0.5097888", "text": "private function getEventTableData()\n {\n $tableData = array();\n foreach ($this->collectedEvents as $info) {\n $key = $info['senderClass'] . $info['name'];\n if (isset($tableData[$key])) {\n $tableData[$key]['count']++;\n continue;\n }\n $info['count'] = 1;\n $tableData[$key] = $info;\n }\n\n \\usort($tableData, static function ($infoA, $infoB) {\n $cmp = \\strcmp($infoA['senderClass'], $infoB['senderClass']);\n if ($cmp) {\n return $cmp;\n }\n return $infoA['index'] - $infoB['index'];\n });\n return $tableData;\n }", "title": "" }, { "docid": "25acd063ff2aa1fb4e9764942c66dc1e", "score": "0.50971425", "text": "public function eventsList();", "title": "" }, { "docid": "2710c4a982e4ff28986c58f72b39c741", "score": "0.5079846", "text": "function ReadUnitOpenEvents()\n {\n $this->EventsObj()->Sql_Table_Structure_Update();\n $this->EventsObj()->ReadOpenEvents();\n }", "title": "" }, { "docid": "c5d73c1014ca4884239dc257b8eb26d4", "score": "0.5056303", "text": "function getEventData($id){\n\t\t$query=$this->db->query(\"SELECT * FROM events where id='\".$id.\"'\");\n\t\treturn $query->result();\n\n\t}", "title": "" }, { "docid": "c9db43974e4c753b9ef9d5085e636a1c", "score": "0.5051965", "text": "public function __construct()\n {\n parent::__construct(\"AtaEvent\", BaseAta_event::TABLE_NAME, \n BaseAta_event::PRIMARY_KEY, BaseAta_event::SCHEMA);\n }", "title": "" }, { "docid": "8e56fff16d89222610a58d2d5b2fffef", "score": "0.5045329", "text": "function Friend_Event_Rows($event)\n {\n $row=$this->EventsObj()->MyMod_Item_Row(0,$event,$this->EventsObj()->GetGroupDatas(\"Basic\"));\n\n return\n array\n (\n $row,\n );\n }", "title": "" }, { "docid": "66157e04b236ffff4af61f2732b320e8", "score": "0.504012", "text": "function manageEvent($args){\n\t\t\n\t}", "title": "" }, { "docid": "fd08d2b4f673f44d858055991a8702b8", "score": "0.5038309", "text": "public function pullEventData()\n {\n // Make the query to retreive event information from events table in database: \n $q = \"SELECT id_team, date, time, opponent, venue_name,\n venue_address, result, note, type\n FROM events\n WHERE id_event = {$this->_id}\n LIMIT 1\";\n\n // Execute the query & store the result\n $result = $this->_dbObject->getRow($q);\n\n // Found result\n if($result !== false) {\n $this->setEventAttributes($result['id_team'], $result['date'], $result['time'],\n $result['opponent'], $result['venue_name'],\n $result['venue_address'], $result['result'],\n $result['note'], $result['type']);\n }\n }", "title": "" }, { "docid": "efde62aea82e924b7f744618aebdc69e", "score": "0.5036943", "text": "abstract protected function insert_event_entries($evententries);", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.5018452", "text": "public function getEvents();", "title": "" }, { "docid": "1faf4d2ec310701dbafd271fc43d34ad", "score": "0.5014201", "text": "abstract protected function buildEventCache();", "title": "" }, { "docid": "279c12e76e74ac2237ef545b40d0eb94", "score": "0.5012246", "text": "private function event(){\n\t\t\tif($this->get_request_method() != \"GET\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$query=\"SELECT distinct c.eventId, c.eventName, c.eventDesc, c.picURL, c.eventDetails FROM event c order by c.eventId desc\";\n\t\t\t$r = $this->mysqli->query($query) or die($this->mysqli->error.__LINE__);\n\n\t\t\tif($r->num_rows > 0){\n\t\t\t\t$result = array();\n\t\t\t\twhile($row = $r->fetch_assoc()){\n\t\t\t\t\t$result[] = $row;\n\t\t\t\t}\n\t\t\t\t$this->response($this->json($result), 200); // send user details\n\t\t\t}\n\t\t\t$this->response('',204);\t// If no records \"No Content\" status\n\t\t}", "title": "" }, { "docid": "847e196064d9c01b6c410bb016efe3ab", "score": "0.50034416", "text": "public function testUpdateEvent0()\n {\n }", "title": "" }, { "docid": "847e196064d9c01b6c410bb016efe3ab", "score": "0.50034416", "text": "public function testUpdateEvent0()\n {\n }", "title": "" }, { "docid": "541947399d5e76e200d5ef8208552d1a", "score": "0.50028485", "text": "protected function logCollectedEvents()\n {\n $tableData = $this->getEventTableData();\n foreach ($tableData as &$info) {\n unset($info['index']);\n $info['senderClass'] = $this->debug->abstracter->crateWithVals($info['senderClass'], array(\n 'typeMore' => Abstracter::TYPE_STRING_CLASSNAME,\n ));\n $info['eventClass'] = $this->debug->abstracter->crateWithVals($info['eventClass'], array(\n 'typeMore' => Abstracter::TYPE_STRING_CLASSNAME,\n ));\n }\n\n $debug = $this->debug->rootInstance->getChannel('events');\n $debug->table(\\array_values($tableData));\n }", "title": "" }, { "docid": "4338b4ace3db2f24c18f04d1e467291b", "score": "0.49997714", "text": "public function testEvent()\n {\n }", "title": "" }, { "docid": "d1a524ac3b062c26a89afd8fcbd541fa", "score": "0.49994028", "text": "public function nextEvent();", "title": "" }, { "docid": "7a14f31db11fec3d7f71e1fe62abd3af", "score": "0.49978745", "text": "function InscriptionEventTable()\n {\n return \"\";\n }", "title": "" }, { "docid": "391fc3937388c63e673427b540ee0eb6", "score": "0.49917296", "text": "public static function getInstance()\n {\n return Doctrine_Core::getTable('PluginMetaEvent');\n }", "title": "" }, { "docid": "5840041930f056507b506bb1709b8c0b", "score": "0.49792847", "text": "public function testCreateEvent0()\n {\n }", "title": "" }, { "docid": "5840041930f056507b506bb1709b8c0b", "score": "0.49792847", "text": "public function testCreateEvent0()\n {\n }", "title": "" }, { "docid": "cffe9f7951fca0339827b22ccbb374aa", "score": "0.49729025", "text": "function table()\n {\n return array(\n 'facebook_id'=>129,\n 'eventdatetime_id'=>129,\n 'calendar_id'=>129,\n 'page_name'=>130,\n );\n }", "title": "" }, { "docid": "299856822f980cb224162691e356570a", "score": "0.49717435", "text": "private function _getEventList(){\n\t\t/* variable initialization */\n\t\t$strWhereClauseArr\t= array('company_code' => $this->getCompanyCode());\n\t\t$strFilterArr\t\t= array('table'=>'events_'.$this->getCompanyCode());\n\t\t/* Getting the status list */\n\t\treturn\t$this->_objDataOperation->getDataFromTable($strFilterArr, $strWhereClauseArr);\n\t}", "title": "" }, { "docid": "a0073bfec5c69ec48231ad710ad6bb3f", "score": "0.49624404", "text": "function Friend_Events_Table($friend=array())\n {\n $this->EventsObj()->ItemData();\n $this->EventsObj()->Actions();\n\n $table=array();\n $n=1;\n foreach ($this->Friend_Events_Read($friend) as $event)\n {\n $event[ \"No\" ]=$n;\n $table=\n array_merge\n (\n $table,\n $this->Friend_Event_Rows($event)\n );\n $n++;\n }\n \n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Friend_Events_Table_Title\")).\n $this->Html_Table\n (\n $this->EventsObj()->GetDataTitles($this->EventsObj()->GetGroupDatas(\"Basic\")),\n $table\n ).\n \"\";\n }", "title": "" }, { "docid": "7ddb98cedae814b89800213718866fee", "score": "0.49582836", "text": "function __construct()\n\t{\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\t\t$this->events[\"BeforeProcessExport\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\t\t$this->events[\"ListGetRowCount\"]=true;\n\n\t\t$this->events[\"ListQuery\"]=true;\n\n\t\t$this->events[\"ListFetchArray\"]=true;\n\n\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextPrint\"]=true;\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessRowList\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessRowPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeOut\"]=true;\n\n\t\t$this->events[\"BeforeProcessSearch\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"Daily_Next_Prev\"] = true;\n\t\t$this->events[\"caldaily_snippet1\"] = true;\n\t\t$this->events[\"caldaily_snippet2\"] = true;\n\n\t}", "title": "" }, { "docid": "b3c16cc6e6d4603c30dcb8b77bc4b7be", "score": "0.4932671", "text": "function template_preprocess_event(array &$variables) {\n // Fetch Event Entity Object.\n $event = $variables['elements']['#event'];\n\n // Helpful $content variable for templates.\n foreach (Element::children($variables['elements']) as $key) {\n $variables['content'][$key] = $variables['elements'][$key];\n }\n\n // Inline function to generate table rows.\n $add_row = function ($label, $value) {\n return [\n ['data' => $label, 'header' => TRUE],\n $value,\n ];\n };\n\n // Get the severity values.\n $severity_values = $event->getFieldDefinition('severity')\n ->getFieldStorageDefinition()\n ->getSetting('allowed_values');\n\n // Map severity classes.\n $severity_classes = [\n LogLevel::DEBUG => 'secondary',\n LogLevel::INFO => 'primary',\n LogLevel::NOTICE => 'secondary',\n LogLevel::WARNING => 'warning',\n LogLevel::ERROR => 'danger',\n LogLevel::CRITICAL => 'danger',\n LogLevel::ALERT => 'danger',\n LogLevel::EMERGENCY => 'danger',\n ];\n\n // Pick the severity class.\n $severity_class = $severity_classes[$event->getSeverity()];\n\n // Extract the event URL field value.\n $event_url = $event->getUrl();\n\n // Generate a link.\n $link = $event_url ? Link::fromTextAndUrl($event_url->toString(), $event_url->setOption('attributes', ['target' => '_blank'])) : NULL;\n\n // Extract the channel.\n $channel = $event->getParent();\n\n // Create a table to display the field values.\n $variables['table'] = [\n '#theme' => 'table',\n '#header' => [],\n '#rows' => [\n $add_row(t('Channel'), $channel ? $channel->link() : t('Deleted channel')),\n $add_row(t('Event ID'), $event->uuid()),\n $add_row(t('Type'), $event->getType()),\n $add_row(t('Severity'), new FormattableMarkup('<span class=\"badge badge-pill badge-@severity-class\">@value</span>', ['@severity-class' => $severity_class, '@value' => $severity_values[$event->getSeverity()]])),\n $add_row(t('User'), $event->getUser()),\n $add_row(t('URL'), $link),\n $add_row(t('Date'), format_date($event->getCreatedTime(), 'long')),\n $add_row(t('Expires'), format_date($event->getExpiration(), 'long')),\n $add_row(t('Message'), $event->getMessage()),\n ],\n ];\n}", "title": "" }, { "docid": "cdcb740c521ac501a3e03c06024482dd", "score": "0.49286994", "text": "function get_events() {\r\n global $db;\r\n $query = 'SELECT * FROM events\r\n ORDER BY eventName';\r\n $statement = $db->prepare($query);\r\n $statement->execute();\r\n $events = $statement->fetchAll();\r\n $statement->closeCursor();\r\n return $events;\r\n}", "title": "" }, { "docid": "ddf6e0421ee8e5ef03208aa18a2b224d", "score": "0.49237615", "text": "private function _get_event_metadatas ($eventidhash) \n\t {\n\t\t$this->load->helper('url');\n\t\t$this->load->model('Event_model');\n\t\t$this->load->model('User_model');\n\t\t$this->load->model('Stats_model');\n\t\t$this->output->set_header(\"Cache-Control: no-store, no-cache, must-revalidate\");\n\t\t$this->output->set_header(\"Cache-Control: post-check=0, pre-check=0\");\n\t\t$this->output->set_header(\"Pragma: no-cache\");\n\n\t\t$event = $this->Event_model->get_event($eventidhash);\n\t\t$user = $this->User_model->get_user($event['userid']);\n\t\t\n\t\tif ($event['timebeforebegin']<=0 && $event['timebeforeend']>0)\n\t\t\t$event['status']='onair';\n\t\telse if ($event['timebeforeend']<=0)\n\t\t\t$event['status']='finished';\n\t\telse\n\t\t\t$event['status']='upcoming';\n\n\t\t$event['stats']=intval($this->Stats_model->get_live_stats($user['channel']));\n//\t\texit(var_dump($event['stats']));\n\t\tif ($event['stats']==0) $event['stats']=1;\n\t\t\n\t\tif ($event['timebeforebegin']<=0)\n\t\t{\n\t\t\t//now stats\n\t\t\t$stats_array=array();\n\t\t\t$stats_from_db=$this->Stats_model->get_stats($user['channel'],$event['startdate'],$event['enddate']);\n\t\t\t\n\t\t\t$i=0;\n\t\t\tforeach ($stats_from_db as $row)\n\t\t\t{\n\t\t\t\t$list[$i]['epoch']=intval($row['epoch']);\n\t\t\t\t$list[$i]['viewers']=intval($row['viewers']);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tif ($i>0 && $event['status']=='onair')\n\t\t\t{\n\t\t\t\t$list[$i]['epoch']=strtotime($event['enddate'])*1000 - 1;\n\t\t\t\t$list[$i]['viewers']=null;\n\t\t\t\t\n\t\t\t\t$list[$i+1]['epoch']=strtotime($event['enddate'])*1000;\n\t\t\t\t$list[$i+1]['viewers']=0;\n\t\t\t}\n\t\t\t\n/*\t\t\t$list[0]['epoch']=1365439465000; $list[0]['viewers']=3;\n\t\t\t$list[1]['epoch']=1365439475000; $list[1]['viewers']=6;\n\t\t\t$list[2]['epoch']=1365439485000; $list[2]['viewers']=13;\n\t\t\t$list[3]['epoch']=1365439495000; $list[3]['viewers']=11;\n\t\t\t$list[4]['epoch']=1365439505000; $list[4]['viewers']=16;\n\t\t\t$list[5]['epoch']=1365439515000; $list[5]['viewers']=15;\n\t\t\t$list[6]['epoch']=1365439525000; $list[6]['viewers']=15;\n\t\t\t$list[7]['epoch']=1365439535000; $list[7]['viewers']=14;\n\t\t\t$list[8]['epoch']=1365439545000; $list[8]['viewers']=10;\n\t\t\t$list[9]['epoch']=1365439555000; $list[9]['viewers']=7;\n\t\t\t$list[10]['epoch']=1365439624000; $list[10]['viewers']=null;\n//\t\t\t$list[11]['epoch']=1365439575000; $list[11]['viewers']=null;\n//\t\t\t$list[12]['epoch']=1365439585000; $list[12]['viewers']=null;\n//\t\t\t$list[13]['epoch']=1365439595000; $list[13]['viewers']=null;\n//\t\t\t$list[14]['epoch']=1365439605000; $list[14]['viewers']=null;\n//\t\t\t$list[15]['epoch']=1365439615000; $list[15]['viewers']=null;\n\t\t\t$list[11]['epoch']=1365439625000; $list[11]['viewers']=0;\n\t\t\t*/\n\t\t\tif (isset($list)) $stats_array['list']=$list;\n\t\t\telse $stats_array['list']=null;\n\n\t\t\t$event['stats_chart']=json_encode($stats_array);\n\t\t}\n\t\t$this->output->set_output(json_encode($event));\n\t}", "title": "" }, { "docid": "3efff21949c916b99cee10992377954d", "score": "0.49056846", "text": "public function __construct()\n {\n parent::__construct(\"MtcEventHasMtcMember\", BaseMtc_event_has_mtc_member::TABLE_NAME, \n BaseMtc_event_has_mtc_member::PRIMARY_KEY, BaseMtc_event_has_mtc_member::SCHEMA);\n }", "title": "" }, { "docid": "65140743252f32db4e0b1eeda8c03f8c", "score": "0.49039015", "text": "function FriendEventsHtmlTable($friend)\n {\n $this->ApplicationObj()->EventGroup=\"Inscriptions\";\n\n //Zero to force reread\n $this->ApplicationObj()->Events=array();\n $this->ReadFriendEvents($friend);\n \n if (empty($this->ApplicationObj()->Events)) { return \"\"; }\n \n return\n $this->H(3,$this->MyMod_Language_Message(\"Events_History_Table_Title\")).\n $this->Html_Table\n (\n \"\",\n $this->Events_Table\n (\n 0,\n $this->ApplicationObj()->Events\n )\n );\n }", "title": "" }, { "docid": "84e4801a1c7f362dcdc3d4628e977605", "score": "0.4888966", "text": "public function get() {\n $sType = Phpfox::getParam('themesupporter.block_event_type');\n $sCacheId = $this->cache()->set('brodev_themesupporter_event_'. $sType);\n if (!$aRecords = $this->cache()->get($sCacheId, 300)) {\n $iTimeDisplay = Phpfox::getLib('date')->mktime(0, 0, 0, Phpfox::getTime('m'), Phpfox::getTime('d'), Phpfox::getTime('Y'));\n $sWhere = 'e.view_id = 0 AND e.privacy = 0 AND e.item_id = 0 ';\n switch ($sType) {\n case 'Today':\n $sWhere .= \" AND e.start_time > \". Phpfox::getLib('date')->mktime(0, 0, 0, Phpfox::getTime('m'), Phpfox::getTime('d') , Phpfox::getTime('Y')) .\" AND e.start_time < \" .Phpfox::getLib('date')->mktime(0, 0, 0, Phpfox::getTime('m'), Phpfox::getTime('d') + 1 , Phpfox::getTime('Y'));\n $this->database()->order('e.time_stamp');\n break;\n case 'Week': $iFirstDay = @date(\"w\", @mktime(0,0,0,Phpfox::getTime('m'), Phpfox::getTime('d') , Phpfox::getTime('Y')));\n $iLastDay = 7- $iFirstDay;\n $sWhere .= \" AND e.start_time > \". Phpfox::getLib('date')->mktime(0, 0, 0, Phpfox::getTime('m'), Phpfox::getTime('d') - $iFirstDay , Phpfox::getTime('Y')) . \" AND e.start_time < \" .Phpfox::getLib('date')->mktime(0, 0, 0, Phpfox::getTime('m'), Phpfox::getTime('d') + $iLastDay , Phpfox::getTime('Y'));\n $this->database()->order('e.time_stamp');\n break;\n case 'Month':\n $sWhere .= \" AND e.start_time > \". Phpfox::getLib('date')->mktime(0, 0, 0, Phpfox::getTime('m'), 1 , Phpfox::getTime('Y')) .\" AND e.start_time < \" .Phpfox::getLib('date')->mktime(0, 0, 0, Phpfox::getTime('m') + 1, 1 , Phpfox::getTime('Y'));\n $this->database()->order('e.time_stamp');\n break;\n case 'All':\n $this->database()->order('e.time_stamp');\n $sWhere .= \" AND e.start_time >= \" . $iTimeDisplay;\n break;\n case 'Most':\n $sWhere .= \" AND e.start_time >= \" . $iTimeDisplay;\n $aMostEventId = $this->database()\n ->select('event_id')\n ->from(Phpfox::getT('event_invite'))\n ->group('event_id')\n ->order('count(event_id) desc')\n ->limit(Phpfox::getParam('themesupporter.block_event_number'))\n ->execute('getRows');\n $aEventIds[] = 0;\n foreach($aMostEventId as $aMostEvent) {\n $aEventIds[] = $aMostEvent['event_id'];\n }\n $sWhere .= \" AND e.event_id IN (\". implode(\", \", $aEventIds) .\")\";\n\n }\n $iLimit = Phpfox::getParam('themesupporter.block_event_number');\n $aRecords = $this->database()\n ->select('e.*, u.user_name as user_name, u.full_name as full_name, u.user_image as user_image, et.description_parsed as description')\n ->from($this->_sTable, 'e')\n ->leftJoin(Phpfox::getT('user'), 'u', 'e.user_id = u.user_id')\n ->leftJoin(Phpfox::getT('event_text'), 'et', 'e.event_id = et.event_id')\n ->where($sWhere)\n ->limit($iLimit)\n ->execute('getRows');\n if (empty($aRecords)) {\n return false;\n }\n foreach ($aRecords as $iKey => $aVal) {\n $aRecords[$iKey]['attending'] = $this->countInvite($aVal['event_id']);\n $aRecords[$iKey]['url'] = Phpfox::getLib('url')->permalink('event', $aVal['event_id'], $aVal['title']);\n $aRecords[$iKey]['start_time_phrase'] = Phpfox::getTime(Phpfox::getParam('event.event_browse_time_stamp'), $aVal['start_time']);\n $aRecords[$iKey]['start_time_phrase_stamp'] = Phpfox::getTime('g:sa', $aVal['start_time']);\n $aRecords[$iKey]['aFeed'] = array(\n 'feed_display' => 'mini',\n 'comment_type_id' => 'event',\n 'privacy' => $aVal['privacy'],\n 'comment_privacy' => $aVal['privacy_comment'],\n 'like_type_id' => 'event',\n 'feed_is_liked' => (isset($aVal['is_liked']) ? $aVal['is_liked'] : false),\n 'feed_is_friend' => (isset($aVal['is_friend']) ? $aVal['is_friend'] : false),\n 'item_id' => $aVal['event_id'],\n 'user_id' => $aVal['user_id'],\n 'total_comment' => $aVal['total_comment'],\n 'feed_total_like' => $aVal['total_like'],\n 'total_like' => $aVal['total_like'],\n 'feed_link' => Phpfox::getLib('url')->permalink('event', $aVal['event_id'], $aVal['title']),\n 'feed_title' => $aVal['title']\n );\n }\n\n $this->cache()->save($sCacheId, $aRecords);\n }\n\n\n return $aRecords;\n\n }", "title": "" }, { "docid": "6ce93ec2638cd2700724e033ee95d0c8", "score": "0.48866895", "text": "public function setEvent($event) {\r\n\t$this->event = $event;\r\n }", "title": "" }, { "docid": "dc3ad7c086abb211f7639b13da95491d", "score": "0.48818144", "text": "public function testListEvents()\n {\n }", "title": "" }, { "docid": "14d16405598ea4d9cb472ed290fa34a7", "score": "0.48565912", "text": "function eventclass_UserView()\n\t{\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"CopyOnLoad\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "title": "" }, { "docid": "4fea922867f7ca4b9407fe7c52e06e72", "score": "0.4853693", "text": "private function initEvent( $page )\n\t{\n\t\t/**\n\t\t * If the page is not an event related page or there is not an events\n\t\t * related collection on the page, then we don't need to process this.\n\t\t * Processing events when they are not needed just slows the system\n\t\t * down.\n\t\t */\n\t\t$pageTemplates = array_map('trim', explode( ',', $this->config->get('plugins.events.event_template_types') ) );\n\t\tif ( ! in_array($page->template(), $pageTemplates) ) return;\n\n\t\t/**\n\t\t * Getting the associated date information with the event to store\n\t\t * as protected vars in the instantiated object. This will allow us\n\t\t * to use these for calculations throughout the rest of the class.\n\t\t */\n\t\t$header \t= $page->header();\n \t\t$start \t\t= isset($header->event['start']) ? $header->event['start'] : false;\n \t\t$end \t\t= isset($header->event['end']) ? $header->event['end'] : false;\n\t\t$repeat \t= isset($header->event['repeat']) ? $header->event['repeat'] : false;\n\t\t$freq \t\t= isset($header->event['freq']) ? $header->event['freq'] : false;\n\t\t$until \t\t= isset($header->event['until']) ? $header->event['until'] : false;\n\n\t\t/**\n\t\t * Bug out if start or end is null. We can't do the calculations if\n\t\t * these are missing.\n\t\t */\n\t\tif ( ! $start || ! $end ) return;\n\n\t\t// get the epoch strings to use for later calculations\n\t\t$this->event['startDate'] = $this->getCarbonDate( $start );\n\t\t$this->event['endDate'] = $this->getCarbonDate( $end );\n\t\t$this->event['untilDate'] = $this->getCarbonDate( $until );\n\n\t\t// get the epoch time string\n\t\t$this->event['startEpoch'] = strtotime( $start );\n\t\t$this->event['endEpoch'] = strtotime( $end );\n\t\t$this->event['untilEpoch'] = strtotime( $until );\n\n\t\t// store the repeat rules\n\t\t$this->event['repeat'] = $repeat;\n\t\t$this->event['freq'] = $freq;\n\n\t\t// we save the event title to generate tokens against\n\t\t$this->event['id'] = $page->id();\n\n\t\treturn $this->event;\n\t}", "title": "" }, { "docid": "7e697a53a899a2938ca0b64ab50c7e91", "score": "0.48411432", "text": "public function Get_Stat_Events($application_id)\n\t\t{\n\t\t\t// Check that we've set the table name\n\t\t\t$this->tableName($application_id);\n\t\t\t\n\t\t\t$ret_val = array();\n\t\t\t\n\t\t\t$query = \"\n\t\t\t\tSELECT\n\t\t\t\t\tel.event_id,\n\t\t\t\t\te.event\n\t\t\t\tFROM\n\t\t\t\t\t$this->table el\n\t\t\t\t\tJOIN `events` e ON el.event_id = e.event_id\n\t\t\t\tWHERE\n\t\t\t\t\tel.application_id = $application_id\n\t\t\t\t\tAND e.event LIKE 'STAT_%'\";\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$result = $this->sql->Query($this->database, $query);\n\t\t\t\t\n\t\t\t\twhile(($row = $this->sql->Fetch_Object_Row($result)))\n\t\t\t\t{\n\t\t\t\t\t$ret_val[$row->event_id] = $row->event;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\t$ret_val = false;\n\t\t\t}\n\t\t\t\n\t\t\treturn $ret_val;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "82d452fc2252dff53f0dd4b2a2fad87c", "score": "0.48406744", "text": "function bbp_digest_event() {\r\n\t/* Load translations */\r\n\tbbp_digest_load_textdomain();\r\n\t/* Load file with event function */\r\n\trequire_once( dirname( __FILE__ ) . '/inc/event.php' );\r\n\t/* Do event */\r\n\tbbp_digest_do_event();\r\n}", "title": "" }, { "docid": "c8efc94c8595c09682317bc55f009bea", "score": "0.48381776", "text": "abstract public function makeEvent();", "title": "" }, { "docid": "c8efc94c8595c09682317bc55f009bea", "score": "0.48381776", "text": "abstract public function makeEvent();", "title": "" }, { "docid": "6a423e51526c43961635b6994d8ecd88", "score": "0.48362127", "text": "function _displayFormEvent($event='')\r\n\t{\r\n\t\t$ut =& $this->_ut;\r\n\t\t$isSquash = $ut->getParam('issquash', false);\r\n\t\t$utpage = new utPage('events');\r\n\t\t$utpage->_page->addAction('onload', array('resize', 500, 800));\r\n\t\t$content =& $utpage->getPage();\r\n\t\t$form =& $content->addForm('fevents', 'events', KID_UPDATE);\r\n\r\n\t\t$date = getdate();\r\n\t\t$curSeason = $date['year']-2006;\r\n\t\tif ($date['mon'] >= 8) $curSeason++;\r\n\t\t$infos = array('evnt_name' => '',\r\n\t\t 'evnt_date' => '',\r\n\t\t 'evnt_place' => '',\r\n\t\t 'evnt_organizer' => '',\r\n\t\t 'evnt_cmt' => '',\r\n\t\t 'evnt_datedraw' => '',\r\n\t\t 'evnt_deadline' => '',\r\n\t\t 'evnt_type' => WBS_EVENT_INDIVIDUAL,\r\n\t\t 'evnt_nature' => WBS_NATURE_TOURN,\r\n\t\t 'evnt_level' => WBS_LEVEL_CLUB,\r\n\t\t 'evnt_scoringsystem' => WBS_SCORING_3X21,\r\n\t\t 'evnt_ranksystem' => WBS_RANK_FR2,\r\n\t\t 'evnt_numauto' => '',\r\n\t\t 'evnt_url' => '',\r\n\t\t 'evnt_firstday' => '',\r\n\t\t 'evnt_lastday' => '',\r\n\t\t 'evnt_zone' => '',\r\n\t\t 'evnt_urlrank' => $ut->getParam('ffba_url'),\r\n\t\t 'evnt_nbdrawmax' => 3,\r\n\t\t 'evnt_id' => -1,\r\n\t\t 'evnt_ownerid' => utvars::getUserId(),\r\n\t\t 'evnt_season' => $curSeason,\r\n\t\t 'evnt_catage' => WBS_EVENT_CATAGE_SENIOR);\r\n\t\tif ($isSquash)\r\n\t\t{\r\n\t\t\t$infos['evnt_scoringsystem'] = WBS_SCORING_5X11;\r\n\t\t\t$infos['evnt_ranksystem'] = WBS_RANK_SQUASH;\r\n\t\t}\r\n\r\n\t\t$ute = new utevent();\r\n\t\tif (is_array($event)) $infos = $event;\r\n\t\telse if ($event != '') $infos = $ute->getEvent($event);\r\n\r\n\t\tif ($infos['evnt_id'] != -1) $form->setTitle('tEditEvent');\r\n\t\telse $form->setTitle('tNewEvent');\r\n\r\n\t\t$utd = new utdate();\r\n\t\tif (isset($infos['errMsg'])) $form->addWng($infos['errMsg']);\r\n\t\t$form->addHide('evntId', $infos['evnt_id']);\r\n\t\t$kedit =& $form->addEdit('evntName', $infos['evnt_name'], 45);\r\n\t\t$kedit->setMaxLength(200);\r\n\t\t$kedit =& $form->addEdit('evntDate', $infos['evnt_date'], 45);\r\n\t\t$kedit->setMaxLength(25);\r\n\t\t$kedit->noMandatory();\r\n\t\t$utd->setIsoDate($infos['evnt_firstday']);\r\n\t\t$kedit =& $form->addEdit('evntFirstday', $utd->getdate(), 15);\r\n\t\t$kedit->setMaxLength(15);\r\n\t\t$utd->setIsoDate($infos['evnt_lastday']);\r\n\t\t$kedit =& $form->addEdit('evntLastday', $utd->getdate(), 15);\r\n\t\t$kedit->setMaxLength(15);\r\n\t\t$kedit =& $form->addEdit('evntPlace', $infos['evnt_place'], 45);\r\n\t\t$kedit->setMaxLength(25);\r\n\t\t$kedit->noMandatory();\r\n\t\t$kedit =& $form->addEdit('evntZone', $infos['evnt_zone'], 45);\r\n\t\t$kedit->setMaxLength(25);\r\n\t\t$kedit->noMandatory();\r\n\t\t$kedit =& $form->addEdit('evntOrganizer', $infos['evnt_organizer'], 45);\r\n\t\t$kedit->setMaxLength(75);\r\n\t\t$kedit->noMandatory();\r\n\t\tif ($isSquash) $form->addHide('evntNbDrawMax', 1);\r\n\t\telse\r\n\t\t{\r\n\t\t\t$kedit =& $form->addEdit('evntNbDrawMax', $infos['evnt_nbdrawmax'], 45);\r\n\t\t\t$kedit->setMaxLength(1);\r\n\t\t\t$kedit->noMandatory();\r\n\t\t}\r\n\t\t$kedit =& $form->addEdit('evntNumauto', $infos['evnt_numauto'], 45);\r\n\t\t$kedit->setMaxLength(150);\r\n\t\t$kedit->noMandatory();\r\n\t\t$kedit =& $form->addHide('evntUrl', $infos['evnt_url']);\r\n\t\t$kedit =& $form->addEdit('evntUrlRank', $infos['evnt_urlrank'], 45);\r\n\t\t$kedit->setMaxLength(200);\r\n\t\t$kedit->noMandatory();\r\n\t\t$kedit =& $form->addArea('evntCmt', $infos['evnt_cmt'] , 30 );\r\n\t\t$kedit->noMandatory();\r\n\t\t$utd->setIsoDate($infos['evnt_datedraw']);\r\n\t\t$kedit =& $form->addEdit('evntDatedraw', $utd->getDate(), 10 );\r\n\t\t$kedit->noMandatory();\r\n\t\t$utd->setIsoDate($infos['evnt_deadline']);\r\n\t\t$kedit =& $form->addEdit('evntDeadline', $utd->getDate(), 10 );\r\n\t\t$kedit->noMandatory();\r\n\t\tif ($isSquash)\r\n\t\t{\r\n\t\t\t$scoring[WBS_SCORING_NONE] = $ut->getLabel(WBS_SCORING_NONE);\r\n\t\t\tfor ($i=WBS_SCORING_1X5; $i <=WBS_SCORING_5X11; $i++) $scoring[$i] = $ut->getLabel($i);\r\n\t\t\t$combo =& $form->addCombo('evntScoring', $scoring, $ut->getLabel($infos['evnt_scoringsystem']) );\r\n\t\t\t$kedit->noMandatory();\r\n\t\t\t$form->addHide('evntRanking', WBS_RANK_SQUASH);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor ($i=WBS_SCORING_NONE; $i < WBS_SCORING_1X5; $i++) $scoring[$i] = $ut->getLabel($i);\r\n\t\t\t$combo =& $form->addCombo('evntScoring', $scoring, $ut->getLabel($infos['evnt_scoringsystem']) );\r\n\t\t\t$kedit->noMandatory();\r\n\r\n\t\t\tfor ($i=WBS_RANK_FR1; $i < WBS_RANK_SQUASH; $i++)\t$ranking[$i] = $ut->getLabel($i);\r\n\t\t\t$combo =& $form->addCombo('evntRanking', $ranking, $ut->getLabel($infos['evnt_ranksystem']) );\r\n\t\t\t$kedit->noMandatory();\r\n\t\t}\r\n\t\t$form->addRadio('evntNature', $infos['evnt_nature']== WBS_NATURE_TOURN,\r\n\t\tWBS_NATURE_TOURN);\r\n\t\t$form->addRadio('evntNature', $infos['evnt_nature']== WBS_NATURE_EQUIP,\r\n\t\tWBS_NATURE_EQUIP);\r\n\t\t$form->addRadio('evntNature', $infos['evnt_nature']== WBS_NATURE_INDIV,\r\n\t\tWBS_NATURE_INDIV);\r\n\t\tif ($isSquash)\r\n\t\t{\r\n\t\t\t$elts = array('evntNature3', 'evntNature1', 'evntNature2');\r\n\t\t\t$form->addBlock('blkType', $elts);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$form->addRadio('evntNature', $infos['evnt_nature']== WBS_NATURE_TROPH,\r\n\t\t\tWBS_NATURE_TROPH);\r\n\t\t\t$form->addRadio('evntNature', $infos['evnt_nature']== WBS_NATURE_INTERCODEP,\r\n\t\t\tWBS_NATURE_INTERCODEP);\r\n\t\t\t$form->addRadio('evntNature', $infos['evnt_nature']== WBS_NATURE_OTHER,\r\n\t\t\tWBS_NATURE_OTHER);\r\n\t\t\t$elts = array('evntNature3', 'evntNature4', 'evntNature1');\r\n\t\t\t$form->addBlock('blkType1', $elts);\r\n\t\t\t$elts = array('evntNature2', 'evntNature5', 'evntNature6');\r\n\t\t\t$form->addBlock('blkType2', $elts);\r\n\t\t\t$elts = array('blkType1', 'blkType2');\r\n\t\t\t$form->addBlock('blkType', $elts);\r\n\t\t}\r\n\t\t$form->addRadio('evntLevel', $infos['evnt_level']==WBS_LEVEL_CLUB,\r\n\t\tWBS_LEVEL_CLUB);\r\n\t\t$form->addRadio('evntLevel', $infos['evnt_level']==WBS_LEVEL_REG,\r\n\t\tWBS_LEVEL_REG);\r\n\t\t$form->addRadio('evntLevel', $infos['evnt_level']==WBS_LEVEL_NAT,\r\n\t\tWBS_LEVEL_NAT);\r\n\t\tif(!$isSquash)\r\n\t\t{\r\n\t\t$form->addRadio('evntLevel', $infos['evnt_level']==WBS_LEVEL_DEP,\r\n\t\tWBS_LEVEL_DEP);\r\n\t\t$form->addRadio('evntLevel', $infos['evnt_level']==WBS_LEVEL_INTER_DEPT,\r\n\t\tWBS_LEVEL_INTER_DEPT);\r\n\t\t$form->addRadio('evntLevel', $infos['evnt_level']==WBS_LEVEL_INTER_REGION,\r\n\t\tWBS_LEVEL_INTER_REGION);\r\n\t\t$form->addRadio('evntLevel', $infos['evnt_level']==WBS_LEVEL_INT,\r\n\t\tWBS_LEVEL_INT);\r\n\t\t}\t\r\n\t\t$elts = array('evntLevel1', 'evntLevel4', 'evntLevel2', 'evntLevel3'); \r\n\t\t$form->addBlock('blkLevel2', $elts);\r\n\t\t\t\r\n\t\t$elts = array('evntLevel5', 'evntLevel6', 'evntLevel7');\r\n\t\t$form->addBlock('blkLevel3', $elts);\r\n\r\n\t\t$elts = array('blkLevel2', 'blkLevel3');\r\n\t\t$form->addBlock('blkLevel', $elts);\r\n\r\n\t\t$form->addRadio('evntCatage', $infos['evnt_catage']== WBS_EVENT_CATAGE_SENIOR,\r\n\t\t\tWBS_EVENT_CATAGE_SENIOR);\r\n\t\t$form->addRadio('evntCatage', $infos['evnt_catage']== WBS_EVENT_CATAGE_YOUNG,\r\n\t\t\tWBS_EVENT_CATAGE_YOUNG);\r\n\t\tif (!$isSquash)\r\n\t\t{\r\n\t\t\t$form->addRadio('evntCatage', $infos['evnt_catage']== WBS_EVENT_CATAGE_BOTH,\r\n\t\t\tWBS_EVENT_CATAGE_BOTH);\r\n\t\t}\r\n\t\t$elts = array('evntCatage1','evntCatage2', 'evntCatage3');\r\n\t\t$form->addBlock('blkCatage', $elts);\r\n\t\t\r\n\t\tif (utvars::_getSessionVar('userAuth') == WBS_AUTH_ADMIN)\r\n\t\t{\r\n\t\t\t$list = $this->_dt->getSelUsers();\r\n\t\t\t$combo =& $form->addCombo('evntOwnerId', $list, $infos['evnt_ownerid']);\r\n\t\t\t$fields = array('select' => $infos['evnt_season'],\r\n\t\t 'link' => '');\r\n\t\t\t$seas = $this->getSeasons($fields);\r\n\t\t\t$combo =& $form->addCombo('evntSeason', $seas);\r\n\t //$form->addEdit('evntSeason', $infos['evnt_season']);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$form->addHide('evntOwnerId', $infos['evnt_ownerid']);\r\n\t\t\t$form->addHide('evntSeason', $infos['evnt_season']);\r\n\t\t}\r\n\t\t$elts = array('evntName', 'evntDate', 'evntFirstday','evntLastday',\r\n\t\t 'evntPlace', 'evntZone', 'evntOrganizer', \r\n\t\t 'evntNumauto', 'evntUrl', 'evntUrlRank', 'evntCmt', \r\n\t\t 'evntNbDrawMax', 'evntDeadline', 'evntDatedraw', \r\n\t\t 'evntScoring', 'evntRanking', 'evntOwnerId',\r\n\t\t 'evntSeason');\r\n\t\t$form->addBlock('blkEvent', $elts);\r\n\r\n\t\t$form->addBtn('btnRegister', KAF_SUBMIT);\r\n\t\t$form->addBtn('btnCancel');\r\n\t\t$elts = array('btnRegister', \"btnCancel\");\r\n\t\t$form->addBlock('blkBtn', $elts);\r\n\t\t$utpage->display();\r\n\t\texit();\r\n\t}", "title": "" }, { "docid": "0e3c9a43d5713f29386506bae3eb50ce", "score": "0.48360696", "text": "public static function e($key) {\n return self::getInstance()->event[$key];\n }", "title": "" }, { "docid": "da9088b6402c45848bb7d8367a1dd2c7", "score": "0.48227668", "text": "function booking_events()\r\n\t{\r\n\t\t//BT, CD, ID\r\n\t\t$query = 'select * from hotel_booking_details where domain_origin='.get_domain_auth_id();\r\n\t\treturn $this->db->query($query)->result_array();\r\n\t}", "title": "" }, { "docid": "cbbb4bcb1b15955f9fc10c976f360b9d", "score": "0.48186392", "text": "function getTracksByEvent($event) {\n $query = \"SELECT id, laenge, bezeichnung, beschreibung, streckenverlauf_url, termin FROM main.strecke WHERE wettkampf_id = \".pg_escape_literal($event).\" ORDER BY id ASC;\";\n return $query;\n}", "title": "" }, { "docid": "64850b10e58bc03da1807140ae5f7f7d", "score": "0.48135027", "text": "public static function SYS_MSG() \r\n { \r\n return new EventType(7); \r\n }", "title": "" }, { "docid": "cf9745e8593f85f6a6eb35c19e54a375", "score": "0.48131707", "text": "function getEventList()\n {\n if (!isset($this->tables['eventtypes_table'])) {\n return array();\n }\n\n $sql = <<<SQL\n\nSELECT *\nFROM {$this->tables['eventtypes_table']}\nORDER BY display\n\nSQL;\n $result = $this->query($sql);\n\n $rows = array();\n while ($row = $result->fetch_assoc()) {\n $eventrows[] = $row;\n }\n\n return $eventrows;\n }", "title": "" }, { "docid": "6d7912d241811c30849b40dd0d8a29e1", "score": "0.47997862", "text": "function eventclass_pengguna()\n\t{\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "title": "" }, { "docid": "6f29846b05c5ba8c3846af49b459d0d8", "score": "0.47989285", "text": "abstract protected function _getEventFactory();", "title": "" }, { "docid": "a993d176d831efad443e7b2ea67751b3", "score": "0.479876", "text": "function showEventData() {\n\t$event = [];\n\tglobal $conn;\n\tif(isset($_GET['action']) && $_GET['action'] == \"edit_event\") {\n\t\t$get_the_id = $_GET['e_id'];\n\t\t$query = \"SELECT * FROM event WHERE id=$get_the_id\";\n\t\t$result = mysqli_query($conn, $query);\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t$event['event_title'] = $row['event_title'];\n\t\t\t$event['event_desc'] = $row['event_desc'];\n\t\t\t$event['event_image'] = $row['event_image'];\n\t\t}\n\t}\n\treturn $event;\n}", "title": "" }, { "docid": "7039bc230298e629edb342a5cd04073a", "score": "0.47908163", "text": "protected function get_event_name() {\n\t\treturn self::EVENT_NAME;\n\t}", "title": "" }, { "docid": "58d53dbd644192553b5cd1d0758e344f", "score": "0.4783393", "text": "function get_events() {\n\t\treturn $this->events;\n\t}", "title": "" }, { "docid": "d7eafad7fbdf4b43bb5de43ea748e3e6", "score": "0.47811857", "text": "function displayEvents()\n {\n $this->connect();\n try {\n $events = array();\n $query = \"SELECT * FROM astonEvents\";\n foreach ($this->db->query($query) as $row) {\n //array_push($events, $row);\n $events[] = $row;\n }\n return $events;\n } catch (PDOException $ex) {\n echo \"ERROR: \" . $ex->getMessage();\n }\n }", "title": "" }, { "docid": "4d7d1cd4ed895fbcd3dd349b179255a1", "score": "0.47779867", "text": "public function getEvents(): array;", "title": "" }, { "docid": "4c3d00be9c6fd01592a8c960d3bb79fb", "score": "0.4772565", "text": "public function DoEvent($nEvent) {}", "title": "" }, { "docid": "4c3d00be9c6fd01592a8c960d3bb79fb", "score": "0.4772565", "text": "public function DoEvent($nEvent) {}", "title": "" }, { "docid": "dd06040f60a5a8fc5642d84806220d13", "score": "0.47660804", "text": "function questionnaire_set_events($questionnaire) {\n // Adding the questionnaire to the eventtable.\n global $DB;\n if ($events = $DB->get_records('event', array('modulename' => 'questionnaire', 'instance' => $questionnaire->id))) {\n foreach ($events as $event) {\n $event = calendar_event::load($event);\n $event->delete();\n }\n }\n\n // The open-event.\n $event = new stdClass;\n $event->description = $questionnaire->name;\n $event->courseid = $questionnaire->course;\n $event->groupid = 0;\n $event->userid = 0;\n $event->modulename = 'questionnaire';\n $event->instance = $questionnaire->id;\n $event->eventtype = 'open';\n $event->timestart = $questionnaire->opendate;\n $event->visible = instance_is_visible('questionnaire', $questionnaire);\n $event->timeduration = ($questionnaire->closedate - $questionnaire->opendate);\n\n if ($questionnaire->closedate && $questionnaire->opendate && ($event->timeduration <= QUESTIONNAIRE_MAX_EVENT_LENGTH)) {\n // Single event for the whole questionnaire.\n $event->name = $questionnaire->name;\n calendar_event::create($event);\n } else {\n // Separate start and end events.\n $event->timeduration = 0;\n if ($questionnaire->opendate) {\n $event->name = $questionnaire->name.' ('.get_string('questionnaireopens', 'questionnaire').')';\n calendar_event::create($event);\n unset($event->id); // So we can use the same object for the close event.\n }\n if ($questionnaire->closedate) {\n $event->name = $questionnaire->name.' ('.get_string('questionnairecloses', 'questionnaire').')';\n $event->timestart = $questionnaire->closedate;\n $event->eventtype = 'close';\n calendar_event::create($event);\n }\n }\n}", "title": "" }, { "docid": "f72ec17fe5b543e3e1ec4ce5f1376b8b", "score": "0.4765857", "text": "function em_load_event(){\r\n\tglobal $EM_Event, $EM_Recurrences, $EM_Location, $EM_Mailer;\r\n\t$EM_Recurrences = array();\r\n\tif( isset( $_REQUEST['event_id'] ) && is_numeric($_REQUEST['event_id']) ){\r\n\t\t$EM_Event = new EM_Event($_REQUEST['event_id']);\r\n\t}elseif( isset($_REQUEST['recurrence_id']) && is_numeric($_REQUEST['recurrence_id']) ){\r\n\t\t//Eventually we can just remove this.... each event has an event_id regardless of what it is.\r\n\t\t$EM_Event = new EM_Event($_REQUEST['recurrence_id']);\r\n\t}elseif( isset($_REQUEST['location_id']) && is_numeric($_REQUEST['location_id']) ){\r\n\t\t$EM_Location = new EM_Location($_REQUEST['location_id']);\r\n\t}\r\n\t$EM_Mailer = new EM_Mailer();\r\n\tdefine('EM_URI', get_permalink(get_option(\"dbem_events_page\"))); //PAGE URI OF EM\r\n\tdefine('EM_RSS_URI', get_bloginfo('wpurl').\"/?dbem_rss=main\"); //RSS PAGE URI\r\n}", "title": "" }, { "docid": "ef089380d5c9342095468dd9e33e36b8", "score": "0.4739", "text": "public function fetchEventData()\n {\n try {\n $select = $this->tableGateway->getSql()->select();\n $select->columns(array(\n 'id',\n 'tag_name',\n 'module_id',\n 'file_name',\n 'file_path',\n ));\n \n $select->join('event', \" documents.module_id = event.id\", \n array('title','is_home','published_date','end_date','status'), 'left');\n $select->where(array(\n 'event.is_home' => '1',\n 'documents.module_name' => 'event',\n 'gatekeeper_status' => 'Approved',\n 'event.is_deleted' => 'n',\n 'documents.is_deleted' => 'n'\n ));\n $select->group('documents.module_id');\n $sqlStmt = $select->getSqlString();\n $sqlStmt = str_replace('\"', '', $sqlStmt);\n// echo $sqlStmt; die;\n $statement = $this->getDbAdapter()\n ->query($sqlStmt, \\Zend\\Db\\Adapter\\Adapter::QUERY_MODE_EXECUTE)\n ->toArray();\n return $statement;\n } catch (\\Exception $e) {\n throw new \\Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "e68cc616838737244449d5f4da492f1e", "score": "0.4724912", "text": "private function _loadEventById($id){\r\n if ( empty($id) )\r\n {\r\n return NULL;\r\n }\r\n /*\r\n * Load the events info array\r\n */\r\n $event = $this->_loadEventData($id);\r\n \r\n if ( isset($event[0]) )\r\n {\r\n return new Event($event[0]);\r\n }\r\n else\r\n {\r\n return NULL;\r\n }\r\n }", "title": "" }, { "docid": "4c970a236165c89476c4ede94b6133a1", "score": "0.47168374", "text": "function mrc_events_post_update_8_0_7_alpha1() {\n \\Drupal::service('module_installer')->install(['menu_position', 'eck']);\n /** @var \\Drupal\\config_update\\ConfigReverter $config_update */\n $config_update = \\Drupal::service('config_update.config_update');\n $config_update->revert('node_type', 'stanford_event');\n\n if (!MenuPositionRule::load('events')) {\n $config_update->import('menu_position_rule', 'events');\n }\n $config_update->revert('menu_position_rule', 'events');\n\n if (!EckEntityType::load('event_collections')) {\n $config_update->import('eck_entity_type', 'event_collections');\n $config_update->import('event_collections_type', 'speaker');\n }\n\n\n mrc_events_create_field('node', 'stanford_event', 'field_s_event_speaker', 'bricks', 'Speaker');\n $config_update->revert('field_storage_config', 'node.field_s_event_speaker');\n $config_update->revert('field_config', 'node.stanford_event.field_s_event_speaker');\n $config_update->revert('entity_form_display', 'node.stanford_event.default');\n $config_update->revert('entity_view_display', 'node.stanford_event.default');\n}", "title": "" }, { "docid": "3993cae7706bfdba8238b22b801e8609", "score": "0.47134754", "text": "function eventEdit(){\n\t\t$result = mysql_query(getEvent($_GET['event']));\n\t\t$GLOBALS['adminObjectId'] = $_GET['event'];\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetEventGlobals($row);\n\t\t\teventForm(\"edit\");\n\t\t}\n\t}", "title": "" }, { "docid": "311906fc0d1ccde73c4d9e3864cd1ac0", "score": "0.47115296", "text": "public function getEvent($name) {\n\t\tif(array_key_exists($name, $this->events)) {\n\t\t\treturn $this->events[$name];\n\t\t}\n\t}", "title": "" }, { "docid": "a8b8ff982bc46eaef99dae1ae264ed4e", "score": "0.47110078", "text": "function mrc_events_post_update_8_0_5() {\n \\Drupal::service('module_installer')\n ->install(['views_taxonomy_term_name_depth']);\n $configs = [\n 'views.view.mrc_events',\n 'core.entity_view_display.node.stanford_event.default',\n ];\n module_load_install('stanford_mrc');\n $path = drupal_get_path('module', 'mrc_events') . '/config/install';\n stanford_mrc_update_configs(TRUE, $configs, $path);\n\n $config_factory = \\Drupal::configFactory();\n $config = $config_factory->getEditable('core.entity_form_display.node.stanford_event.default');\n $config->set('content.field_s_event_date.settings.increment', 15);\n $config->save();\n}", "title": "" }, { "docid": "9485c694c544180ec7e105192e9b54ad", "score": "0.47085434", "text": "function readEvents() {\n\t\tglobal $dbio;\n\t\t$events = $dbio->readAllEvent();\n\t\treturn $events;\n\t}", "title": "" }, { "docid": "2b5b8129640362065610dc0e52a3cef3", "score": "0.47085413", "text": "private function get_EventData( $id )\n {\n $date = date('Y-m-d');\n\n return $this->db->query_DB(\"SELECT `ID`, `Name`, `Date`, `Start`, `End`, `Location`, `Address`, `Created`, `Creator_User_ID`, `Person_Code`, `Remote_Code`,\n `Approved`, `Estimated_Budget`, `Actual_Budget`, `Deleted`\n FROM `Events`\n WHERE `ID` = '$id'\"\n )[0];\n }", "title": "" }, { "docid": "695f11d28397412cec1c76e5718b9851", "score": "0.47018388", "text": "public function getCompatibleEvents()\n {\n return array(\n TaskModel::EVENT_CREATE_UPDATE ,\n );\n }", "title": "" }, { "docid": "70ffb00693e2f40fbd57c442ff3c71a5", "score": "0.46976644", "text": "public function get_eventType()\n { \n $this->db->select(\"{$this->event_type_table}.*\");\n\t\t$result = $this->db->get($this->event_type_table);\n\t\treturn $result->result_array();\n \n }", "title": "" }, { "docid": "cfe979a8c29c9bdfb9990363ba073b12", "score": "0.46968976", "text": "public function get($event_name = ''){\n \n $ret_list = array();\n \n if(empty($event_name)){\n \n $ret_list = $this->event_map;\n \n }else{\n \n if(isset($this->event_map[$event_name])){\n $ret_list = $this->event_map[$event_name];\n }//if\n \n }//if/else\n \n return $ret_list;\n \n }", "title": "" }, { "docid": "77b084ae46e4e1375769f179e0b75987", "score": "0.46949676", "text": "function listTable($events) {\n\t\t$lastEventTime = 0;\n\t\t$firstEventTime = 0;\n\t\t$i = 0;\n\t\tforeach ($events as $event => $key) {\n\t\t\tif ($firstEventTime == 0) {\n\t\t\t\t$firstEventTime = $key['begin'];\n\t\t\t}\n\t\t\tif ($key['begin'] >= $this->conf['listStartTime'] OR $key['end'] >= $this->conf['listStartTime']) {\n\t\t\t\tif($i == $this->conf['listEntryCount']) {\n\t\t\t\t\t$lastEventTime = $key['begin'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// $markerArray['###TITLE###'] = $key['title'];\n\t\t\t\t$markerArray['###TITLE###'] = $this->makeEventLink($key, $key['begin']);\n\t\t\t\t\n\t\t\t\t$markerArray['###DATE_BEGIN###'] = strftime($this->conf['dateFormat'], $key['begin']);\n\t\t\t\t$markerArray['###TIME_BEGIN###'] = $key['allday'] == 0 ? strftime($this->conf['timeFormat'], $key['begin']) : $this->pi_getLL('alldayLabel');\n\t\t\t\t$markerArray['###CATEGORY###'] = $key['category'];\n\t\t\t\t$markerArray['###CATCOLOR###'] = $key['catcolor'];\n\t\t\t\t$markerArray['###ODD_EVEN###'] = $i%2==0 ? 'even' : 'odd';\n\t\t\t\t\n\t\t\t\t$markerArray['###LOCATION###'] = !empty($key['location_name']) ? $key['location_name'] : $key['location'];\n\t\t\t\t$markerArray['###ORGANIZER###'] = !empty($key['organizer_name']) ? $key['organizer_name'] : $key['organizer'];\n\n\t\t\t\t$markerArray['###READ_MORE###'] = $this->makeEventLink($key, $key['begin'], $this->pi_getLL('readMore'), 1);\n\n\t\t\t\tif($key['teaser']) {\n\t\t\t\t\t$markerArray['###TEASER###'] = $this->cObj->crop(strip_tags($key['teaser']), $this->conf['croppingLenght']);\n\t\t\t\t} else\n\t\t\t\t\t$markerArray['###TEASER###'] = $key['description'] ? $this->cObj->crop(strip_tags($key['description']), $this->conf['croppingLenght']):'';\n\n\t\t\t\t$content .= $this->cObj->substituteMarkerArrayCached($this->itemTemplateCode, $markerArray, $subpartsArray, array());\n\n\t\t\t\t$lastEventTime = 0;\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\t// return $content;\n\t\treturn array($content,$firstEventTime,$lastEventTime);\n\t}", "title": "" }, { "docid": "ed755aa868c8b17d02cf301397b7ce58", "score": "0.46896377", "text": "function set_next_event() {\n\tglobal $xoopsDB;\n\t$now = time();\n\t// Search already passed event that exist next extent.\n\t$res = $xoopsDB->query( \"SELECT eid, min(exdate),edate FROM \" . EGTBL . \" LEFT JOIN \" . EXTBL . \" ON eid=eidref AND exdate>$now WHERE (edate<$now OR ldate=0) AND ldate<$now AND expire>$now GROUP BY eid\" );\n\twhile ( list( $eid, $exdate, $edate ) = $xoopsDB->fetchRow( $res ) ) {\n\t\tif ( empty( $exdate ) ) {\n\t\t\t$exdate = $edate;\n\t\t}\n\t\t$xoopsDB->queryF( \"UPDATE \" . EGTBL . \" SET ldate=$exdate WHERE eid=$eid\" );\n\t}\n}", "title": "" }, { "docid": "c5ddcd451ec19ca306c7d5c02b445701", "score": "0.4689046", "text": "protected function initObserverEventType(){\n\t}", "title": "" }, { "docid": "1f7ebd8935b6d0a827188152439fd1c8", "score": "0.46871322", "text": "public function initialize()\n {\n // attributes\n $this->setName('EventType');\n $this->setPhpName('EventType');\n $this->setClassname('Webmis\\\\Models\\\\EventType');\n $this->setPackage('Models');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('id', 'id', 'INTEGER', true, null, null);\n $this->addColumn('createDatetime', 'createDatetime', 'TIMESTAMP', true, null, null);\n $this->addColumn('createPerson_id', 'createPersonId', 'INTEGER', false, null, null);\n $this->addColumn('modifyDatetime', 'modifyDatetime', 'TIMESTAMP', true, null, null);\n $this->addColumn('modifyPerson_id', 'modifyPersonId', 'INTEGER', false, null, null);\n $this->addColumn('deleted', 'deleted', 'BOOLEAN', true, 1, false);\n $this->addColumn('code', 'code', 'VARCHAR', true, 8, null);\n $this->addColumn('name', 'name', 'VARCHAR', true, 64, null);\n $this->addForeignKey('purpose_id', 'purposeId', 'INTEGER', 'rbEventTypePurpose', 'id', false, null, null);\n $this->addForeignKey('purpose_id', 'purposeId', 'INTEGER', 'rbResult', 'eventPurpose_id', false, null, null);\n $this->addColumn('finance_id', 'financeId', 'INTEGER', false, null, null);\n $this->addColumn('scene_id', 'sceneId', 'INTEGER', false, null, null);\n $this->addColumn('visitServiceModifier', 'visitServiceModifier', 'VARCHAR', true, 128, null);\n $this->addColumn('visitServiceFilter', 'visitServiceFilter', 'VARCHAR', true, 32, null);\n $this->addColumn('visitFinance', 'visitFinance', 'BOOLEAN', true, 1, false);\n $this->addColumn('actionFinance', 'actionFinance', 'BOOLEAN', true, 1, false);\n $this->addColumn('period', 'period', 'TINYINT', true, null, null);\n $this->addColumn('singleInPeriod', 'singleinPeriod', 'TINYINT', true, null, null);\n $this->addColumn('isLong', 'isLong', 'BOOLEAN', true, 1, false);\n $this->addColumn('dateInput', 'dateInput', 'BOOLEAN', true, 1, false);\n $this->addColumn('service_id', 'serviceId', 'INTEGER', false, null, null);\n $this->addColumn('context', 'context', 'VARCHAR', true, 64, null);\n $this->addColumn('form', 'form', 'VARCHAR', true, 64, null);\n $this->addColumn('minDuration', 'minDuration', 'INTEGER', true, null, 0);\n $this->addColumn('maxDuration', 'maxDuration', 'INTEGER', true, null, 0);\n $this->addColumn('showStatusActionsInPlanner', 'showStatusActionsInPlanner', 'BOOLEAN', true, 1, true);\n $this->addColumn('showDiagnosticActionsInPlanner', 'showDiagnosticActionsInPlanner', 'BOOLEAN', true, 1, true);\n $this->addColumn('showCureActionsInPlanner', 'showCureActionsInPlanner', 'BOOLEAN', true, 1, true);\n $this->addColumn('showMiscActionsInPlanner', 'showMiscActionsInPlanner', 'BOOLEAN', true, 1, true);\n $this->addColumn('limitStatusActionsInput', 'limitStatusActionsInput', 'BOOLEAN', true, 1, false);\n $this->addColumn('limitDiagnosticActionsInput', 'limitDiagnosticActionsInput', 'BOOLEAN', true, 1, false);\n $this->addColumn('limitCureActionsInput', 'limitCureActionsInput', 'BOOLEAN', true, 1, false);\n $this->addColumn('limitMiscActionsInput', 'limitMiscActionsInput', 'BOOLEAN', true, 1, false);\n $this->addColumn('showTime', 'showTime', 'BOOLEAN', true, 1, false);\n $this->addColumn('medicalAidType_id', 'medicalAidTypeId', 'INTEGER', false, null, null);\n $this->addColumn('eventProfile_id', 'eventProfileId', 'INTEGER', false, null, null);\n $this->addColumn('mesRequired', 'mesRequired', 'INTEGER', true, 1, 0);\n $this->addColumn('mesCodeMask', 'mesCodeMask', 'VARCHAR', false, 64, '');\n $this->addColumn('mesNameMask', 'mesNameMask', 'VARCHAR', false, 64, '');\n $this->addColumn('counter_id', 'counterId', 'INTEGER', false, null, null);\n $this->addColumn('isExternal', 'isExternal', 'BOOLEAN', true, 1, false);\n $this->addColumn('isAssistant', 'isAssistant', 'BOOLEAN', true, 1, false);\n $this->addColumn('isCurator', 'isCurator', 'BOOLEAN', true, 1, false);\n $this->addColumn('canHavePayableActions', 'canHavePayableActions', 'BOOLEAN', true, 1, false);\n $this->addColumn('isRequiredCoordination', 'isRequiredCoordination', 'BOOLEAN', true, 1, false);\n $this->addColumn('isOrgStructurePriority', 'isOrgStructurePriority', 'BOOLEAN', true, 1, false);\n $this->addColumn('isTakenTissue', 'isTakenTissue', 'BOOLEAN', true, 1, false);\n $this->addColumn('sex', 'sex', 'TINYINT', true, null, 0);\n $this->addColumn('age', 'age', 'VARCHAR', true, 9, null);\n $this->addColumn('rbMedicalKind_id', 'rbMedicalKindId', 'INTEGER', false, null, null);\n $this->addColumn('age_bu', 'ageBu', 'TINYINT', false, 3, null);\n $this->addColumn('age_bc', 'ageBc', 'SMALLINT', false, null, null);\n $this->addColumn('age_eu', 'ageEu', 'TINYINT', false, 3, null);\n $this->addColumn('age_ec', 'ageEc', 'SMALLINT', false, null, null);\n $this->addColumn('requestType_id', 'requestTypeId', 'INTEGER', false, null, null);\n // validators\n }", "title": "" }, { "docid": "8715410eb828c99440a8347880e53c7c", "score": "0.46868077", "text": "function getEventList()\r\n {\r\n return array('PreItem', 'QuickMenu');\r\n }", "title": "" }, { "docid": "bf0e7392f24896cd7c59b7848dc92d65", "score": "0.46849012", "text": "function event2($info) {\n\t\t$this->event->trigger('kaboom');\n\t}", "title": "" }, { "docid": "ee1230f1764c21bdf348a7954114d2ed", "score": "0.46564546", "text": "private function insertEvents()\n {\n $pdo = new DB();\n $pdo = $pdo->getInstance();\n\n $pdo->beginTransaction();\n $req = $pdo->prepare('INSERT INTO events (place, name, address, heading, type, lat, lon, description, level, reward) VALUES (:place, :name, :address, :heading, :type, :lat, :lon, :description, :level, :reward)');\n\n foreach ($this->events as $event)\n {\n $req->bindValue(':place', $event['place']->id);\n $req->bindValue(':name', $event['script']->name . ' ' . $event['place']->name);\n $req->bindValue(':address', $event['place']->address);\n $req->bindValue(':heading', $event['place']->heading);\n $req->bindValue(':type', $event['place']->type);\n $req->bindValue(':lat', $event['place']->lat);\n $req->bindValue(':lon', $event['place']->lon);\n $req->bindValue(':description', $event['script']->description);\n $req->bindValue(':level', $event['script']->level);\n $req->bindValue(':reward', $event['script']->reward);\n $req->execute();\n }\n $this->status = $pdo->commit();\n }", "title": "" }, { "docid": "9e04a102bd3878c6aaec9c4369a9d75c", "score": "0.4635837", "text": "public function event()\r\n {\r\n\r\n $event = new Event();\r\n\r\n $event->beforeSave = function (PageControl $model) {\r\n if (ZArrayHelper::getValue(Az::$app->params, paramNoEvent))\r\n return null;\r\n else\r\n Az::$app->cores->appPage->control($model, $this->isNewRecord);\r\n };\r\n\r\n $event->beforeDelete = function (PageControl $model) {\r\n if (ZArrayHelper::getValue(Az::$app->params, paramNoEvent))\r\n return null;\r\n else\r\n Az::$app->cores->appPage->move_control($model);\r\n };\r\n// $event->beforeDelete = function (CoreControl $model) {\r\n// return null;\r\n// };\r\n//\r\n// $event->afterDelete = function (CoreControl $model) {\r\n// return null;\r\n// };\r\n//\r\n// $event->beforeSave = function (CoreControl $model) {\r\n// return null;\r\n// };\r\n//\r\n//\r\n// $event->beforeValidate = function (CoreControl $model) {\r\n// return null;\r\n// };\r\n//\r\n// $event->afterValidate = function (CoreControl $model) {\r\n// return null;\r\n// };\r\n//\r\n// $event->afterRefresh = function (CoreControl $model) {\r\n// return null;\r\n// };\r\n//\r\n// $event->afterFind = function (CoreControl $model) {\r\n// return null;\r\n// };\r\n//\r\n//\r\n//\r\n// $event->afterSave = function (CoreControl $model) {\r\n//\r\n//\r\n//\r\n//\r\n//\r\n//\r\n// return null;\r\n// };\r\n\r\n return $event;\r\n\r\n }", "title": "" }, { "docid": "714fe53b560e0cfc40767132ec9e2d28", "score": "0.4622774", "text": "public function getEventsManager() {}", "title": "" }, { "docid": "061fb8c0e27df709a12acac1f98c9511", "score": "0.46216038", "text": "private function Create_Table()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$query = \"CREATE TABLE {$this->table} LIKE \";\n\t\t\t\t$query .= self::EVENT_LOG_REFERENCE_TABLE;\n\t\t\t\t\n\t\t\t\t$this->sql->Query($this->database, $query);\n\t\t\t}\n\t\t\tcatch(MySQL_Exception $e)\n\t\t\t{\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "35a06d919399c3b57f70f3030d433097", "score": "0.46198592", "text": "function getEventId($where, $table){\n\t\treturn $this->db->get_where($table, $where)->result();\n\t}", "title": "" }, { "docid": "b26c84f773f8cb38da15fb0a871d6055", "score": "0.46140212", "text": "function Get_Events(){\n\t\t$query = \"select E.ID, E.Name,E.Name_Amharic,E.About_Event,E.About_Event_Amharic,E.Event_Start,E.Event_End,if(E.Event_End<CURDATE(),'EXPIRED','NOT_EXPIRED') as Event_Status from event as E order by Event_Start\";\n\n\t\t$result = mysqli_query($this->getDbc(),$query);\n\n\t\tif($result){\n\t\t\treturn $result;\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "da999eb7d6c94c3b2b3229fff2cf6c71", "score": "0.46129125", "text": "public function testImplementedEvents(): void\n {\n $table = new ImplementedEventsTable();\n $result = $table->implementedEvents();\n $expected = [\n 'Model.beforeMarshal' => 'beforeMarshal',\n 'Model.buildValidator' => 'buildValidator',\n 'Model.beforeFind' => 'beforeFind',\n 'Model.beforeSave' => 'beforeSave',\n 'Model.afterSave' => 'afterSave',\n 'Model.beforeDelete' => 'beforeDelete',\n 'Model.afterDelete' => 'afterDelete',\n 'Model.afterRules' => 'afterRules',\n ];\n $this->assertEquals($expected, $result, 'Events do not match.');\n }", "title": "" }, { "docid": "be19f29dede5696415b6c23aa67ada2c", "score": "0.46122637", "text": "function event_list($events, $ref_name='', $ref_link='', $show_actions=false) {\n // $header_row = array('Date', 'Apartment', 'Guest', 'Type', 'Status', 'Address', '# Guests', 'Alert', 'Notes', ''); \n $header_row = array('Date', 'Address', 'Guest', '# Guests', 'Alert', 'Notes', ''); \n if(isset($_GET['print'])) $show_actions = false;\n if($show_actions) $header_row[] = '';\n $rows = array();\n foreach($events as $obj) {\n $apt_name = $obj->res_id ? get_object('property', $obj->apt_id, 'name') : '?';\n $num_guests = $obj->res_id ? get_object('reservation', $obj->res_id, 'num_guests') : '?';\n $row = array(sql2human($obj->start_time, array('show_weekday' => true, 'show_time' => true)), $obj->start_address, $obj->customer_name, $num_guests, $obj->alert, $obj->notes);\n if($show_actions) array_unshift($row, recordset_buttons('event', $obj, '', '', $ref_name, $ref_link)); // recordset_buttons_inline($enq_type, $id, $fields, $options)\n $rows[] = $row;\n }\n if(count($rows)) array_unshift($rows, $header_row);\n return $rows;\n}", "title": "" }, { "docid": "68fa22610c2b081e8faaaf5eec1ee94a", "score": "0.46075627", "text": "function eventreg_upgrade($oldversion)\n{\n//this is the initial release\nlist($dbconn) = pnDBGetConn();\n$pntable = pnDBGetTables();\n\n$eventreg_events_table = $pntable['eventreg_events'];\n$eventreg_events_column = &$pntable['eventreg_events_column'];\n\n$eventreg_categories_table = $pntable['eventreg_categories'];\n$eventreg_categories_column = &$pntable['eventreg_categories_column'];\n\n$eventreg_registrations_table = $pntable['eventreg_registrations'];\n$eventreg_registrations_column = &$pntable['eventreg_registrations_column'];\n\nswitch($oldversion){\n\tcase \".50\":\n\tcase \".51\":\n\tcase \".52\":\n\t\t$sql = \"ALTER TABLE `\" . $eventreg_events_table . \"` \n\t\t\t\tADD $eventreg_events_column[printtickets] TINYINT( 1 ) ,\n\t\t\t\tADD $eventreg_events_column[country] varchar(15) default '',\n\t\t\t\tCHANGE $eventreg_events_column[location] $eventreg_events_column[location] TEXT;\";\n\t $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n\t\t if ($dbconn->ErrorNo() != 0) {\n\t pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n \t\treturn false;\n\t\t }\n\n\t\t//upgrade module variabless \n\t\tpnModDelVar('EventReg', 'categoriesperpage');\n\t\tpnModSetVar('EventReg', 'categorycolumns', 3);\n\t\tpnModSetVar('EventReg', 'mapservice', null);\n\tcase \".53\":\n\t\t$sql = \"ALTER TABLE `\" . $eventreg_events_table . \"` \n\t\t\t\tADD $eventreg_events_column[regstartampm] TINYINT( 1 ) ,\n\t\t\t\tADD $eventreg_events_column[regendampm] TINYINT( 1 ) ,\n\t\t\t\tADD $eventreg_events_column[eventstartampm] TINYINT( 1 ) ,\n\t\t\t\tADD $eventreg_events_column[eventendampm] TINYINT( 1 );\";\n\t $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n\t\t if ($dbconn->ErrorNo() != 0) {\n\t pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n \t\treturn false;\n\t\t } \n\t\t \n\t\t //upgrade module variables \n\t\tpnModSetVar('EventReg', 'viewregistrationlevel', ACCESS_ADMIN);//Sets detfault to admin only viewing registrations\n\t\treturn true;\n\tcase \".54\":\n\t\t//upgrade the tables for Brian's (the_lorax) addition of e-mail notification\n\t\t\n\t\t//add field to events table to hold e-mail address to notify of registration\n\t\t$sql = \"ALTER TABLE `\" . $eventreg_events_table . \"` \n\t\t\t\tADD $eventreg_events_column[notifyemail] varchar(255) default '';\";\n\t\t\t$dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n\t\t if ($dbconn->ErrorNo() != 0) {\n\t pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n \t\treturn false;\n\t\t } \n\t\t \t\n\t\t //Modify categories table to add in field to hold corresponding PostCalendar categoryID\n\t\t $sql = \"ALTER TABLE `\" . $eventreg_categories_table . \"` \n\t\t\t\tADD $eventreg_categories_column[pc_categoryid] int(10) default '';\";\n\t \n\t\t \n\t $dbconn->Execute($sql);\n\t\t// Check for an error with the database code, and if so set an\n\t\t// appropriate error message and return\n\t\tif ($dbconn->ErrorNo() != 0) {\n\t\t pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n\t \treturn false;\n\t\t}\n\t\t// It's good practice to name the table and column definitions you\n\t\t // are getting - $table and $column don't cut it in more complex\n\t // modules\n\t $eventreg_registrations_table = $pntable['eventreg_registrations'];\n\t $eventreg_registrations_column = &$pntable['eventreg_registrations_column'];\n //modify the registrations table to add in the registered e-mail\n \t\t $sql = \"ALTER TABLE `\" . $eventreg_registrations_table . \"` \n\t\t\t\tADD $eventreg_registrations_column[regemail] varchar(255) default '';\";\n\t $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n\t\t if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n return false;\n\t\t }\n\t\t\t\t\n\t\t pnModSetVar('EventReg', 'notifyemail', pnConfigGetVar('adminmail'));//default person to notify of a registration is the site admin\n\t\t\t\treturn true;\n\t\t//break;\n\tcase \".55\":\n\tcase \".551\":\n\tcase \".56\":\n $sql = \"ALTER TABLE `\" . $eventreg_events_table . \"` \n\t ADD $eventreg_events_column[reg_start] DATETIME NOT NULL ,\n\t ADD $eventreg_events_column[reg_end] DATETIME NOT NULL ,\n\t ADD $eventreg_events_column[event_start] DATETIME NOT NULL ,\n\t ADD $eventreg_events_column[event_end] DATETIME NOT NULL;\";\n\n\t $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n\t\t if ($dbconn->ErrorNo() != 0) {\n \t pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n \t\treturn false;\n\t\t }\n\n\n $sql = \"UPDATE `$eventreg_events_table` SET $eventreg_events_column[reg_start] = \n DATE_ADD($eventreg_events_column[reg_startdate],INTERVAL $eventreg_events_column[reg_starttime] HOUR_SECOND ),\n $eventreg_events_column[reg_end] = \n DATE_ADD($eventreg_events_column[reg_enddate],INTERVAL $eventreg_events_column[reg_endtime] HOUR_SECOND ),\n $eventreg_events_column[event_start] = \n DATE_ADD($eventreg_events_column[startdate],INTERVAL $eventreg_events_column[starttime] HOUR_SECOND ),\n $eventreg_events_column[event_end] = \n DATE_ADD($eventreg_events_column[enddate],INTERVAL $eventreg_events_column[endtime] HOUR_SECOND );\";\n\n\t $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n\t\t if ($dbconn->ErrorNo() != 0) {\n\t pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n \t\treturn false;\n\t\t }\n\n $sql = \"UPDATE `$eventreg_events_table` SET $eventreg_events_column[reg_start] = \n DATE_ADD($eventreg_events_column[reg_start],INTERVAL 12 HOUR )\n WHERE $eventreg_events_column[regstartampm] = \\\"2\\\";\";\n\n\t $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n\t\t if ($dbconn->ErrorNo() != 0) {\n\t pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n \t\treturn false;\n\t\t }\n\n\t $sql = \"UPDATE `$eventreg_events_table` SET $eventreg_events_column[reg_end] = \n DATE_ADD($eventreg_events_column[reg_end],INTERVAL 12 HOUR )\n WHERE $eventreg_events_column[regendampm] = \\\"2\\\";\";\n\n $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n return false;\n }\n\n\n\n $sql = \"UPDATE `$eventreg_events_table` SET $eventreg_events_column[event_start] = \n DATE_ADD($eventreg_events_column[event_start],INTERVAL 12 HOUR )\n WHERE $eventreg_events_column[eventstartampm] = \\\"2\\\";\";\n\n $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n return false;\n }\n $sql = \"UPDATE `$eventreg_events_table` SET $eventreg_events_column[event_end] = \n DATE_ADD($eventreg_events_column[event_end],INTERVAL 12 HOUR )\n WHERE $eventreg_events_column[eventendampm] = \\\"2\\\";\";\n\n $dbconn->Execute($sql);\n\t\t // Check for an error with the database code, and if so set an\n\t\t // appropriate error message and return\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _EVENTREGUPGRADEFAILED . \" Error: $sql \" . $dbconn->ErrorNo());\n return false;\n }\n pnModSetVar('EventReg', 'timeformat','g:i a');\n pnModSetVar('EventReg', 'dateformat','m/d/Y');\n\n\tcase \".57\":\n pnModSetVar('EventReg', 'AllowMultipleRegs',false);\n\n\tcase \".58\":\n\t\treturn true;\n //Current Version\n\n\tdefault:\n\n\t} // switch\n\n}", "title": "" }, { "docid": "589abaf3b79fe315da276dbf9c6c2962", "score": "0.4605673", "text": "function view_event($event) {\t\r\n\tglobal $class_suffix, $showBackButton, $mosConfig_live_site;\r\n\tglobal $database, $mainframe;\r\n\t\r\n\t$linktag = '<link href=\"' . $mosConfig_live_site . '/component/eventcal/style.css\" rel=\"stylesheet\" type=\"text/css\"/>';\r\n\techo $linktag;\r\n\t$category = new mosCategory( $database );\r\n\t$category->load( $event->catid );\r\n\tHTML_EventCal::component_header( $category->name );\r\n\t?>\t\r\n\t<table align=\"center\" class=\"<?php echo $class_suffix ?>event\" width=\"95%\">\r\n\t\t<tr>\r\n\t\t\t<th >\r\n\t\t\t\t<span class=\"event\" style=\"border-color:#99ddff\">\r\n\t\t\t\t\t<form >\r\n\t\t\t\t\t\t<?php echo $event->title ?>\r\n\t\t\t\t\t\t<?php if (hasAccess( \"edit_event\" )) { ?>\r\n\t\t\t\t\t\t\t<input type=\"button\" onClick=\"window.location.href='<?php echo $mosConfig_live_site . \"/index.php?c=eventcal&task=eventform&eventid=$event->id&catid=$event->catid\" ?>'\" value=\"EDIT\" />\r\n\t\t\t\t\t\t<?php } ?>\t\t\r\n\t\t\t\t\t</form>\r\n\t\t\t\t</span>\r\n\t\t\t</th>\r\n\t\t\t<th class=\"date\">\r\n\t\t\t<?php\r\n\t\t\t\tif(@$event->type == \"complete\" && $event->start_date == $event->end_date) { \r\n\t\t\t\t\techo strftime( _DAYVIEW_CAPTION, $event->start_date);\r\n\t\t\t\t} else if(@$event->type == \"complete\") { \r\n\t\t\t\t\techo strftime( _DAYVIEW_CAPTION . \" \" . _DAYVIEW_EVENT_START, $event->start_date) . strftime(_DAYVIEW_EVENT_END,$event->end_date);\r\n\t\t\t\t} else if (@$event->type == \"middle\") {\r\n\t\t\t\t\techo strftime(_NORMAL_DATE_FORMAT . \" \" . _DAYVIEW_EVENT_START,$event->start_date) . \" - \" . strftime(_NORMAL_DATE_FORMAT . \" \" . _DAYVIEW_EVENT_START,$event->end_date);\r\n\t\t\t\t} else if (@$event->type == \"start\") {\r\n\t\t\t\t\techo strftime( _NORMAL_DATE_FORMAT . \" \" . _DAYVIEW_EVENT_START,$event->start_date) . \" - \" . strftime(_NORMAL_DATE_FORMAT . \" \" . _DAYVIEW_EVENT_START,$event->end_date);\r\n\t\t\t\t} else if (@$event->type == \"end\") {\r\n\t\t\t\t\techo strftime( _NORMAL_DATE_FORMAT . \" \" . _DAYVIEW_EVENT_START,$event->start_date) . \" - \" . strftime(_DAY_TODAY . \" \" . _DAYVIEW_EVENT_START,$event->end_date);\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo strftime( _NORMAL_DATE_FORMAT . \" \" . _DAYVIEW_EVENT_START,$event->start_date) . \" - \" . strftime(_NORMAL_DATE_FORMAT . \" \" . _DAYVIEW_EVENT_START,$event->end_date);\r\n\t\t\t\t}\r\n\t\t\t?>\r\n\t\t\t</th>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" class=\"description\">\r\n\t\t\t<?php echo nl2br( $event->description ) ?>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<?php if ($event->contact <> \"\" || $event->email <> '' || $event->url <> '') { ?>\r\n\t\t\t<tr>\r\n\t\t\t\t<th class=\"contact\" colspan=\"2\"><?php echo _CONTACT_TITLE ?></th>\r\n\t\t\t</tr> \r\n\t\t\t<?php if ($event->contact <> '') { ?>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"contactdesc\"><?php echo _CONTACT_CONTACT ?></td>\r\n\t\t\t\t<td class=\"contacttext\"><?php echo $event->contact ?></td>\r\n\t\t\t</tr>\t\t\t\t\r\n\t\t\t<?php } if ($event->email <> '') { ?>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"contactdesc\"><?php echo _CONTACT_EMAIL ?></td>\r\n\t\t\t\t<td class=\"contacttext\"><?php echo mosHTML::emailCloaking( $event->email ) ?></td>\r\n\t\t\t</tr>\t\t\t\t\r\n\t\t\t<?php } if ($event->url <> '') { ?>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"contactdesc\"><?php echo _CONTACT_URL ?></td>\r\n\t\t\t\t<td class=\"contacttext\"><a href=\"<?php echo $event->url ?>\" target=\"_blank\"><?php echo $event->url ?></a></td>\r\n\t\t\t</tr>\t\t\t\t\r\n\t\t\t<?php } ?>\r\n\t\t<?php } ?>\r\n\t\t<?php if ($showBackButton) { ?>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"2\">&nbsp;</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"backbutton\" colspan=\"2\">\r\n\t\t\t\t\t<form><input type=\"button\" onClick=\"history.back()\" value=\"<?php echo _CMN_PREV ?>\" /></form>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t<?php } ?>\r\n\t</table>\r\n\t<?php \r\n\t}", "title": "" }, { "docid": "75f762aa4ad846f144c3d1c798f5ac6b", "score": "0.46015048", "text": "public function updateEvent()\n\t{\n\t\t//Verifier l'administration\n\t\t$eventId = Bn::getValue('eventId');\n\t\t$test = Osecure::isEventAdmin(Bn::getValue('user_id') , $eventId);\n\t\tif ( $test != true ) return false;\n\n\t\t// Recuperer les donnees\n\t\t$oEvent = new Oevent($eventId);\n\t\t$name = Bn::getValue('txtName');\n\t\t$oEvent->setVal('type', Bn::getValue('cboType')); //OEVENT_TYPE_INDIVIDUAL;\n\t\t$oEvent->setVal('nature', Bn::getValue('cboNature'));\n\t\t$oEvent->setVal('level', Bn::getValue('cboLevel'));\n\t\t$oEvent->setVal('name', $name);\n\t\t$oEvent->setVal('date', Bn::getValue('txtDate'));\n\t\t$oEvent->setVal('place', Bn::getValue('txtPlace'));\n\t\t$oEvent->setVal('organizer', Bn::getValue('txtOrganizer'));\n\t\t$oEvent->setVal('datedraw', Bn::getValue('txtDatedraw', null));\n\t\t$oEvent->setVal('deadline', Bn::getValue('txtDeadline', null));\n\t\t$oEvent->setVal('ownerid', Bn::getValue('lstOwner'));\n\t\t$oEvent->setVal('ranksystem', Bn::getValue('lstRank'));\n\t\t$oEvent->setVal('numauto', Bn::getValue('txtNumauto'));\n\t\t$oEvent->setVal('firstday', Bn::getValue('txtFirstday'));\n\t\t$oEvent->setVal('lastday', Bn::getValue('txtLastday'));\n\t\t$oEvent->setVal('url', Bn::getValue('txtUrl'));\n\t\t$oEvent->setVal('scoringsystem', Bn::getValue('lstScoring'));\n\t\t$oEvent->setVal('liveentries', Bn::getValue('chkLiveentries', '') =='' ? NO:YES);\n\t\t$oEvent->setVal('season', Bn::getValue('lstSeason'));\n\t\t$oEvent->setVal('nbvisited', Bn::getValue('txtVisited'));\n\t\t$oEvent->setVal('dpt', Bn::getValue('txtDpt'));\n\t\t$oEvent->setVal('zone', Bn::getValue('txtZone'));\n\t\t$oEvent->setVal('poster', Bn::getValue('txtPoster'));\n\t\t$oEvent->setVal('textconvoc', Bn::getValue('txtTextConvoc'));\n\t\t$oEvent->setVal('lieuconvoc', Bn::getValue('txtLieuConvoc'));\n\t\t$oEvent->setVal('convoc', Bn::getValue('rdoConvoc'));\n\t\t$oEvent->setVal('archived', Bn::getValue('chkArchived', '') == '' ? NO:YES);\n\t\t$oEvent->setVal('nbdrawmax', Bn::getValue('txtNbDraw', null));\n\n\t\t// Mise a jour du tournoi\n\t\t$oEvent->saveEvent();\n\t\tif ( $oEvent->isError() )\n\t\t{\n\t\t\tBn::setUserMsg($oEvent->getMsg());\n\t\t\treturn EVENTS_PAGE_EDIT_EVENT;\n\t\t}\n\n\t\t//------ Sauvegarde des donnees extra\n\t\t// Categorie d'age\n\t\t$catages = array();\n\t\tfor ($i=OPLAYER_CATAGE_POU; $i <= OPLAYER_CATAGE_VET; $i++)\n\t\t{\n\t\t\tif ( Bn::getValue('chk'.$i, '') != '' ) $catages[] = $i;\n\t\t}\n\n\t\t// Discipline\n\t\t$disci = array();\n\t\tfor ($i=OPLAYER_DISCIPLINE_MS; $i <= OPLAYER_DISCIPLINE_MX; $i++)\n\t\t{\n\t\t\tif ( Bn::getValue('chk'.$i, '') != '') $disci[] = $i;\n\t\t}\n\n\t\t// Series\n\t\t$serials = array();\n\t\tif ( Bn::getValue('chkElite', '') != '') $serials[] = 'Elite,';\n\t\tif ( Bn::getValue('chkA', '') != '') $serials[] = 'A';\n\t\tif ( Bn::getValue('chkB', '') != '') $serials[] = 'B';\n\t\tif ( Bn::getValue('chkC', '') != '') $serials[] = 'C';\n\t\tif ( Bn::getValue('chkD', '') != '') $serials[] = 'D';\n\t\tif ( Bn::getValue('chkNC', '') != '') $serials[] = 'NC';\n\n\t\t$oExtra = new Oeventextra($eventId);\n\t\t$oExtra->setVal('catage', implode(',', $catages));\n\t\t$oExtra->setVal('disci', implode(',', $disci));\n\t\t$oExtra->setVal('serial', implode(',', $serials));\n\t\t$oExtra->setVal('deptid', Bn::getValue('cboDpt'));\n\t\t$oExtra->setVal('regionid', Bn::getValue('cboRegion'));\n\t\t$oExtra->setVal('eventid', $eventId);\n\t\t$oExtra->setVal('fedeid', Bn::getValue('txtFedeid'));\n\t\t$oExtra->setVal('promoted', Bn::getValue('chkPromoted', '')=='' ? NO:YES);\n\t\t$oExtra->setVal('liveupdate', Bn::getValue('chkLiveupdate', '')=='' ? NO:YES);\n\t\t$oExtra->setVal('livescoring', Bn::getValue('chkLivescoring', '')=='' ? NO:YES);\n\t\t$oExtra->setVal('promoimg', Bn::getValue('txtPromoimg'));\n\t\t$oExtra->save();\n\n\t\t//------ Sauvegarde des frais\n\t\t$data = array('IS' => Bn::getValue('txtFeeS', 0),\n\t\t'ID' => Bn::getValue('txtFeeD', 0),\n\t\t'IM' => Bn::getValue('txtFeeM', 0),\n\t\t'I1' => Bn::getValue('txtFee1', 0),\n\t\t'I2' => Bn::getValue('txtFee2', 0),\n\t\t'I3' => Bn::getValue('txtFee3', 0)\n\t\t);\n\t\t$oEvent->saveFees($data);\n\t\tif ( $oEvent->isError() )\n\t\t{\n\t\t\tBn::setUserMsg($oEvent->getMsg());\n\t\t\treturn EVENTS_PAGE_EDIT_EVENT;\n\t\t}\n\n\t\t//@todo Sauvegarde des donnes meta\n\t\t//$data = array('fees' => Bn::getValue('txtFees', 0));\n\t\t//$o->saveMeta($data);\n\t\tif ( $oEvent->isError() )\n\t\t{\n\t\t\tBn::setUserMsg($oEvent->getMsg());\n\t\t\treturn EVENTS_PAGE_EDIT_EVENT;\n\t\t}\n\n\t\treturn EVENTS_PAGE_EVENTS;\n\t}", "title": "" } ]
7165007e7c962aaff3de7498a0f643d2
Array of attributes to getter functions (for serialization of requests)
[ { "docid": "493b38b40d53841a1300d3df811c097d", "score": "0.0", "text": "public static function getters()\n {\n return self::$getters;\n }", "title": "" } ]
[ { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.65085584", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.65085584", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.65085584", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.65085584", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a387e323ac41c0d1ec5e2a67f495f899", "score": "0.6407862", "text": "protected abstract function getAccessorFunctions();", "title": "" }, { "docid": "8abcf07dc68686e13ab1c4ff6cc7e154", "score": "0.6375163", "text": "public function attributes(): array;", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "9669f01785919822eb0fe737cf95da70", "score": "0.631272", "text": "abstract public function getAttributes();", "title": "" }, { "docid": "9669f01785919822eb0fe737cf95da70", "score": "0.631272", "text": "abstract public function getAttributes();", "title": "" }, { "docid": "dc217153001c7bd874a29b6bdcce7bb2", "score": "0.63104624", "text": "private function getMethods()\n {\n $setters = [];\n $getters = [];\n\n foreach ($this->getFields() as $fieldName => $metaField) {\n if ($this->isFieldAllowedToSet($metaField)) {\n $set = $metaField->getSetMethodData();\n if ($set) {\n $setters[$set['name']] = $set['target'];\n }\n }\n\n $get = $metaField->getGetMethodData();\n if ($get) {\n $getters[$get['name']] = $get['target'];\n }\n }\n\n return [\n 'setters' => $setters,\n 'getters' => $getters,\n ];\n }", "title": "" }, { "docid": "d78cdc4bf9b4d38c50a3f11cef09160e", "score": "0.63034123", "text": "private function getGetters()\n {\n $getters = array();\n $methods = get_class_methods($this->model);\n \n foreach ($methods as $method) {\n if (preg_match('/^(is|get)([A-Z]+.*)/', $method, $matches)) {\n $getters[lcfirst($matches[2])] = $method;\n }\n }\n \n return $getters;\n }", "title": "" }, { "docid": "5b58a95a0095fc14c76116009069833b", "score": "0.6258218", "text": "public static function getters()\n {\n return [\n 'device_code' => 'getDeviceCode',\n 'user_code' => 'getUserCode',\n 'verification_uri' => 'getVerificationUri',\n 'verification_uri_complete' => 'getVerificationUriComplete',\n 'expires_in' => 'getExpiresIn',\n 'interval' => 'getInterval'\n ];\n }", "title": "" }, { "docid": "fbd7335a2da30c82d69e4bfbed90de23", "score": "0.6234229", "text": "public function all()\n {\n $transformation = [];\n\n foreach (array_keys($this->attributes) as $attribute) {\n $transformation[$attribute] = $this->get($attribute);\n }\n\n $reflector = new ReflectionClass($this);\n $methods = $reflector->getMethods(ReflectionMethod::IS_PROTECTED);\n $mapping = [];\n\n $methods = array_filter($methods, function ($method) {\n $attribute = $this->snakeCase((string)$method->getName());\n\n return $this->isAttributeMethod($attribute)\n && ! array_key_exists($attribute, $this->attributes);\n });\n\n array_walk($methods, function ($method) use (&$mapping) {\n $method = (string)$method->getName();\n $mapping[$this->snakeCase($method)] = $method;\n }, $methods);\n\n foreach (array_diff_key($mapping, $transformation) as $attribute => $method) {\n $transformation[$attribute] = $this->$method();\n }\n\n return $transformation;\n }", "title": "" }, { "docid": "770e6924ca037ddfc943dbe29ca96dc6", "score": "0.61809653", "text": "public function getAttributes()\r\n {\r\n $data = [];\r\n\r\n foreach ($this->getSafeAttributes() as $value) {\r\n $data[$value] = $this->$value;\r\n }\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "20087d2bf6a377cd9bc0cffffb891c74", "score": "0.6180059", "text": "function getAttributes();", "title": "" }, { "docid": "0dbf3bbb21760d1c3cc2d1981387ad47", "score": "0.6178781", "text": "public function getCustomAttributes();", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "3fe1e97f3d50c826077937e7f0c7725e", "score": "0.6008685", "text": "abstract public function attributeValues();", "title": "" }, { "docid": "29c6663cd4bfb15d70d8e72e30b1f109", "score": "0.60031223", "text": "protected function attributes() { // ?static? (trying not to use $obj param) \n\t\t// called by: sanitizedAttributes() and hasAttribute() ???\n\t\t// return an array of attribute names and their values\n\t\t$attributes = array();\n\t\t$dbFields = self::getDBFieldsAry();\n\t\tforeach($dbFields as $field) {\n\t\t\techo \" in attributes trying to set: \" . $field . \"<br/>\";\n\t\t\tif (property_exists(get_called_class(), $field)) { // ???instead of $this: get_called_class()\n\t\t\t\t// note below: $this->$field dynamically naming the attribute by $field variable value\n\t\t\t\t// *** DEBUG NOT able to use $this->$field because I was using a static?????????\n\t\t\t\t$attributes[$field] = $this->$field;\t// *** should work: $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "c0e6fb079dc4bead2c24da90c4f5b38a", "score": "0.5962848", "text": "public function attributes()\n{\n $attributes = array();\n foreach(self::$db_fields as $field)\n {\n if(property_exists($this,$field))\n {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n}", "title": "" }, { "docid": "e5ced6f4e54abd97a59059ed4dea8cd1", "score": "0.59550124", "text": "protected function attributes() {\n\t\t\t$attributes = array();\n\t\t\tforeach(self::$fields as $field) {\n\t\t\t\tif (property_exists($this, $field)) {\n\t\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t\t}\n\t\t\t}\t\n\t\t\treturn $attributes;\n\t\t}", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "90e0f3dbb56829f4d72aff3ec7ecde22", "score": "0.59332705", "text": "public function attributes();", "title": "" }, { "docid": "994f6f80498a5f9a4f2312a88d1f0dbd", "score": "0.59132147", "text": "abstract protected function getAttributes(Request $request): array;", "title": "" }, { "docid": "667648b483c5ab50639a3223a4e476ab", "score": "0.58917534", "text": "public static function getSerializableAttributes() : array;", "title": "" }, { "docid": "ec303feac5e323ad25fe613cb987162a", "score": "0.58861876", "text": "public function getAttributes(): IAttributes;", "title": "" }, { "docid": "b1bff4989c4da50e35d10e48ab316f8b", "score": "0.5879483", "text": "public static function requestMethodDataProvider() {\n\t\treturn array(\n\t\t\tarray('get'),\n\t\t\tarray('post'),\n\t\t\tarray('put'),\n\t\t\tarray('delete'),\n\t\t);\n\t}", "title": "" }, { "docid": "d2968786799ab8eb7b8001dafb12180e", "score": "0.5872044", "text": "final public function _getAttrs()\n\t{\n\t\t$attrs = array();\n\t\tforeach ($this->_properties as $attr => $value)\n\t\t\t$attrs[$attr] = $this->{$attr};\n\t\treturn $attrs;\n\t}", "title": "" }, { "docid": "95078a85e5da3eb9e246e8481542625b", "score": "0.5866066", "text": "protected function attributes(){\n\t\t$attributes = array();\n\t\tforeach(static::$db_fields as $field){\n\t\t\tif(property_exists($this, $field)){\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn\t$attributes;\n\t}", "title": "" }, { "docid": "2f002fcd56cca196dc334f26fb31e1e3", "score": "0.58559227", "text": "protected static function retrieveFieldToAttributeMap()\n {\n /*\n return array(\n 'dataField' => 'objectAttribute'\n );\n */\n return array();\n }", "title": "" }, { "docid": "689e8b4ddf4741223cda504569966dac", "score": "0.5835835", "text": "public function attributes(): array\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "5803f60106583c415876107373491871", "score": "0.5834203", "text": "public function getAttributes() {\n return [\n 'id', \n 'sku',\n 'name',\n 'amount_ordered',\n 'amount_invoiced',\n 'tax_rate',\n 'price',\n 'price_gross',\n 'subtotal',\n 'subtotal_gross',\n 'discount_rate',\n 'discount_value',\n 'discount_value_gross',\n 'discount_total',\n 'discount_total_gross',\n ];\n }", "title": "" }, { "docid": "3a1aeb4ec8bc464ee95ef55968340872", "score": "0.5831748", "text": "protected function attributes(){\n return get_object_vars($this);\n }", "title": "" }, { "docid": "41be27799080ea3b1b1e7c389dc78a84", "score": "0.5830724", "text": "protected function attributes()\n {\n // возвращаем массив имён аттрибутов и их значений\n $attributes = array();\n foreach (static::$db_fields as $field) {\n if (property_exists($this, $field)) {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "7bf03c10326f0449132a9d2afbfe06d6", "score": "0.5800526", "text": "public function attributes() {\n $attri = array();\n foreach ($this->db_fields as $fields) {\n if (property_exists($this, $fields)) {\n $attri[$fields] = $this->$fields;\n }\n }\n return $attri;\n }", "title": "" }, { "docid": "ab74bc16bedfbe2d5c1652228df900a5", "score": "0.5799639", "text": "public function get_attributes() {\n\t\treturn [ $this->attributes ];\n\t}", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.5797117", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "6efa17788278e87f3517b8cffd3343fa", "score": "0.57946056", "text": "public function __get($method)\r\n\t{\r\n\t\treturn array($this, $method);\t\t\r\n\t}", "title": "" }, { "docid": "bf4b9c02d95028b5fcda6d7eba12b783", "score": "0.5793536", "text": "function getAttributesValues();", "title": "" }, { "docid": "c370a8a8666fee68620d31152035a0db", "score": "0.5788779", "text": "public function jsonSerialize(): array\n {\n $data = [];\n\n foreach (\\get_class_methods(static::class) as $method) {\n if ('getService' !== $method && 0 === \\strpos($method, 'get')) {\n $key = \\strtolower((string) \\substr($method, 3));\n $data[$key]\n = $this->$method();\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "a929972e285fd7a732115bb5e55a4baa", "score": "0.57823", "text": "public function __get($method)\n\t{\n\t\treturn array($this, $method);\t\t\n\t}", "title": "" }, { "docid": "4249f3eb7738b9ea21595628fef3791d", "score": "0.57793933", "text": "public function getEAttributes();", "title": "" }, { "docid": "a1f9222b210f65ad7ad66bf44dd205c6", "score": "0.5778208", "text": "protected function getMethods()\n {\n return array(\n 'click' => 'POST',\n 'submit' => 'POST',\n 'text' => 'GET',\n 'value' => 'POST',\n 'name' => 'GET',\n 'clear' => 'POST',\n 'selected' => 'GET',\n 'enabled' => 'GET',\n 'attribute' => 'GET',\n 'equals' => 'GET',\n 'displayed' => 'GET',\n 'location' => 'GET',\n 'location_in_view' => 'GET',\n 'size' => 'GET',\n 'css' => 'GET',\n );\n }", "title": "" }, { "docid": "6559ec9457545b30b130f6cd86075204", "score": "0.5767524", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'actionName' => fn(ParseNode $n) => $o->setActionName($n->getStringValue()),\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'enabledForScopeValidation' => fn(ParseNode $n) => $o->setEnabledForScopeValidation($n->getBooleanValue()),\n 'resource' => fn(ParseNode $n) => $o->setResource($n->getStringValue()),\n 'resourceName' => fn(ParseNode $n) => $o->setResourceName($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "02d95cab7345525e6576430a8c87e2c0", "score": "0.57577604", "text": "public function getAttributes()\n\t{\n\t\t$return = [];\n\t\tforeach ($this->attr as $attr => $info)\n\t\t{\n\t\t\t$return[$attr] = $this->getAttribute($attr);\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "2e8e26ab9b738bd52917d0c8df1b4c8e", "score": "0.57457983", "text": "public function getAttributes()\n\t{\n\t\t$array = array();\n\t\tforeach($this as $key => $value)\n\t\t{\n\t\t\t$array[$key] = $value;\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "2bbe9c033879bb7b338dedee4ebdd08f", "score": "0.5740331", "text": "protected function attributes() {\r\n\t global $mydb;\r\n\t $attributes = array();\r\n\t foreach($this->dbfields() as $field) {\r\n\t if(property_exists($this, $field)) {\r\n\t\t\t$attributes[$field] = $this->$field;\r\n\t\t}\r\n\t }\r\n\t return $attributes;\r\n\t}", "title": "" }, { "docid": "e0322f9be21d3ad44aebd5ad5d367bba", "score": "0.5733352", "text": "public function getTableMap()\n {\n $atts = $this->getMethods();\n $attributes[MapperModel::MAP_RELATIONSHIP] = $this->getRelationShips();\n $attributes[MapperModel::MAP_SETTERS] = $atts['setters'];\n $attributes[MapperModel::MAP_GETTERS] = $atts['getters'];\n $attributes[MapperModel::MAP_MODEL] = $atts['getters'];\n\n return $attributes;\n }", "title": "" }, { "docid": "1c1bff3635a0cd589b7a65081f130c49", "score": "0.5722245", "text": "public function getAttributes($attrs)\n {\n $modelsAttrs = array();\n \n if (is_string($attrs)) {\n foreach ($this as $m) {\n $modelsAttrs[] = $m->getProperty($attrs);\n }\n } else {\n foreach ($this->members() as $m) {\n $modelAttrs = [];\n foreach ($attrs as $attr) {\n $modelAttrs[$attr] = $m->getProperty($attr);\n } \n $modelsAttrs[] = $modelAttrs;\n }\n }\n \n return $modelsAttrs;\n }", "title": "" }, { "docid": "e7c003e728982efa3ff844c10d268921", "score": "0.57212234", "text": "public function getAttributes($names=true)\n\t{\n\t\t$attributes = $this->_attributes;\n\t\tforeach ($this->getMetaData()->fields as $name => $value) {\n\t\t\tif (property_exists($this, $name))\n\t\t\t\t$attributes[$name] = $this->$name;\n\t\t\telse if ($names === true && !isset($attributes[$name]))\n\t\t\t\t$attributes[$name] = null;\n\t\t}\n\t\tif (is_array($names)) {\n\t\t\t$attrs = array();\n\t\t\tforeach ($names as $name) {\n\t\t\t\tif (property_exists($this, $name))\n\t\t\t\t\t$attrs[$name] = $this->$name;\n\t\t\t\telse\n\t\t\t\t\t$attrs[$name] = isset($attributes[$name]) ? $attributes[$name] : null;\n\t\t\t}\n\t\t\treturn $attrs;\n\t\t}\n\t\telse\n\t\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "16527ab2de39233eceb3ab61ba845152", "score": "0.5720195", "text": "protected function attributes() {\n $attributes = array();\n foreach(static::$db_fields as $field) {\n if(property_exists($this, $field)) {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "ca5d6dbf200f50dd8604c1b6c4d55cf2", "score": "0.57127386", "text": "public function getter() : Array{\n return ['name' => $this->name,'genre' => $this->genre,'length' => $this->length,'price' => $this->price];\n }", "title": "" }, { "docid": "0a2a8a08390c49a35decf73e6fab7de4", "score": "0.5710822", "text": "public function getAttributes()\r\n {\r\n return $this->handleGetRequest('/de/api/get/attributes/', null);\r\n }", "title": "" }, { "docid": "0bf76685a94772cafb46d25eee0f803d", "score": "0.5702306", "text": "public static function attributeMap()\n {\n return [\n 'device_code' => 'device_code',\n 'user_code' => 'user_code',\n 'verification_uri' => 'verification_uri',\n 'verification_uri_complete' => 'verification_uri_complete',\n 'expires_in' => 'expires_in',\n 'interval' => 'interval'\n ];\n }", "title": "" }, { "docid": "e5040e6da7a9466a0f257a8a2f48b2a0", "score": "0.5695277", "text": "public function toArray()\n {\n $properties = array();\n\n foreach ($this as $member => $default) {\n\n $func = 'get' . ucfirst($member);\n\n if (method_exists($this, $func)) {\n $properties[$member] = $this->$func();\n }\n }\n\n return $properties;\n }", "title": "" }, { "docid": "e20727071d540791f07a0dccd5df04db", "score": "0.5693352", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'formulaHidden' => fn(ParseNode $n) => $o->setFormulaHidden($n->getBooleanValue()),\n 'locked' => fn(ParseNode $n) => $o->setLocked($n->getBooleanValue()),\n ]);\n }", "title": "" }, { "docid": "7fc7bb832b4fc5f7c8f223e4b5eaeee9", "score": "0.5689368", "text": "abstract public function getMethods(): array;", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5688089", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5688089", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "cf893e04335fc83fed7c417e36a18c4f", "score": "0.56864893", "text": "private function requestedAttributes()\n {\n\n $default = [\n 'id',\n 'name',\n 'level',\n 'rarity',\n 'image',\n 'category.0',\n 'category.1',\n 'vendor_price',\n 'buy.quantity',\n 'buy.price',\n 'buy.last_change.time',\n 'buy.last_change.quantity',\n 'buy.last_change.price',\n 'sell.quantity',\n 'sell.price',\n 'sell.last_change.time',\n 'sell.last_change.quantity',\n 'sell.last_change.price',\n 'last_update'\n ];\n\n $requested = $this->getInput('attributes') ?: $default;\n\n if (!is_array($requested)) {\n $requested = explode(',', $requested);\n }\n\n return $requested;\n\n }", "title": "" }, { "docid": "8056c439cf0d18ee82c35598e459736f", "score": "0.5683283", "text": "protected function attributes() {\n\t $attributes = array();\n\t foreach(self::$db_fields as $field) {\n\t if(property_exists($this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n\t}", "title": "" }, { "docid": "8056c439cf0d18ee82c35598e459736f", "score": "0.5683283", "text": "protected function attributes() {\n\t $attributes = array();\n\t foreach(self::$db_fields as $field) {\n\t if(property_exists($this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n\t}", "title": "" }, { "docid": "8a6e85088d4f64701cff2ee5681fe376", "score": "0.5680752", "text": "public function getAttributeValues();", "title": "" }, { "docid": "34b5dfc8a97857279309c8bc48958eb6", "score": "0.5667904", "text": "public function getAccessors()\n {\n $this->prepareAccessors();\n return $this->accessors;\n }", "title": "" }, { "docid": "3fe75e87ae52dd69bd2aae4cb6936b26", "score": "0.56655085", "text": "function attributes() {\n\t $attributes = array();\n\t foreach(self::$db_fields as $field) {\n\t if(property_exists($this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n\t}", "title": "" }, { "docid": "911f8393a36a34135481402c1b1fbfaf", "score": "0.5657605", "text": "protected static function enumAttributes(): array\n {\n return [\n 'method' => HttpMethods::getEnums()\n ];\n }", "title": "" }, { "docid": "546613d001f3b19aff6928144d64fbc1", "score": "0.5655166", "text": "public function __get($attribute);", "title": "" }, { "docid": "bf5e853c8f839c5e6b53aaa1504f180d", "score": "0.56517607", "text": "protected function defineAttributes()\n {\n return array(\n\n );\n }", "title": "" }, { "docid": "3ac24245f10a5f74ace54603fefb1bdf", "score": "0.56508076", "text": "public function getAttributes()\n\t{\n\t\t$attributes = array();\n\t\tforeach($this->_collection_attributes as $attribute){\n\t\t\t$attributes[$attribute] = $this->$attribute;\n\t\t}\n\t\t\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "45c6c278c28a5d90a252fe7437ba825c", "score": "0.56418884", "text": "public function getAccessors()\n {\n return $this->accessors;\n }", "title": "" }, { "docid": "914228bb250b5f952aa05bdb9498baed", "score": "0.5638449", "text": "public function getMethods() {\n return array(\n 'integer',\n 'normalized',\n 'hex',\n 'base64',\n );\n }", "title": "" }, { "docid": "fcda6d26f1675ebf5703ade5f50a0f38", "score": "0.56346685", "text": "protected function _getAttributes(){\n\t\tif(!isset(self::$_attributes[get_class($this)])){\n\t\t\t$tableDefinition = $this->_tableDefinition();\n\t\t\t$attributes = array();\n\t\t\tforeach($tableDefinition['attributes'] as $attributeName => $definition){\n\t\t\t\t$attributes[] = $attributeName;\n\t\t\t}\n\t\t\tself::$_attributes[get_class($this)] = $attributes;\n\t\t\treturn $attributes;\n\t\t} else {\n\t\t\treturn self::$_attributes[get_class($this)];\n\t\t}\n\t}", "title": "" }, { "docid": "228fc88e9bb7f75106347693f0a7293d", "score": "0.56329614", "text": "public function attributes(){\n\n return $this->getAttributes();\n\n }", "title": "" }, { "docid": "9c5ae3cb07180e5f2746a4fb10adbab0", "score": "0.56328195", "text": "public function getItemAttributes();", "title": "" }, { "docid": "76c010d80126b076a456f1b0ec243ed4", "score": "0.5626159", "text": "private function returnArray()\n\t{\n\t\t$this->valueArray = [];\n\t\tarray_map(function($str){$this->valueArray[$str] = $this->{$str};}, $this->attributes());\n\t\treturn $this->valueArray;\n\t}", "title": "" }, { "docid": "e241a17cae8bab652d302fea2d34f38a", "score": "0.56184155", "text": "public function getData() {\n $arrData = [];\n foreach(preg_grep('|^get(?!Data)|', get_class_methods($this)) as $method) {\n $arrData[($Field = lcfirst(substr($method, 3)))] = $this->{$method}();\n if(is_object($arrData[$Field])) {\n $arrData[$Field] = $arrData[$Field]->getData();\n }\n }\n \n return $arrData;\n }", "title": "" }, { "docid": "d9f3e167690deb955e578598a93d790c", "score": "0.56132245", "text": "public function attributes()\n {\n \n return [];\n }", "title": "" }, { "docid": "e85998061c57f782a1171700afac902f", "score": "0.56073177", "text": "public function getAttributeList()\n\t{\n\t\t$input = Request::all();\n\t\t$attributes = $this->repo->getAttributeList($input);\n\t\treturn ApiResponse::success(\n\t\t\t$this->response->collection($attributes, (new TradesTransformer)->setDefaultIncludes(['attributes']))\n\t\t);\n\t}", "title": "" }, { "docid": "41d2a95bd4fd03e17c73ef77b26a4a3b", "score": "0.55996364", "text": "public function attributes()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "41d2a95bd4fd03e17c73ef77b26a4a3b", "score": "0.55996364", "text": "public function attributes()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "41d2a95bd4fd03e17c73ef77b26a4a3b", "score": "0.55996364", "text": "public function attributes()\n {\n return [\n //\n ];\n }", "title": "" } ]
c7d3d19e4604ed98066e349312f66ac4
Set Header Lets you set a server header which will be outputted with the final display. Note: If a file is cached, headers will not be sent. We need to figure out how to permit header data to be saved with the cache data...
[ { "docid": "2d7f2b93f98702b477406a1d4e673411", "score": "0.63111883", "text": "public function setHeader($header, $replace = TRUE){\n\t\t// If zlib.output_compression is enabled it will compress the output,\n\t\t// but it will not modify the content-length header to compensate for\n\t\t// the reduction, causing the browser to hang waiting for more data.\n\t\t// We'll just skip content-length in those cases.\n\n\t\tif ($this->_zlib && strncasecmp($header, 'content-length', 14) == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->headers[] = array($header, $replace);\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "c3a2bbbb8ebb7295f2689da0da397b62", "score": "0.76096207", "text": "abstract protected function setHeader();", "title": "" }, { "docid": "5ac11fe8024eb823b1eac0f5cabc07d2", "score": "0.75284195", "text": "function _set_header( $header_file ) {\n\t\t$this->_header = $header_file;\n\t}", "title": "" }, { "docid": "b0f4b39fc01f831057122a27175096aa", "score": "0.74148124", "text": "function set_header($header) {\n $this->header = $header;\n }", "title": "" }, { "docid": "a88a79c51cea90116d0050dbe3278c3a", "score": "0.7366944", "text": "public function setHeader( $key, $value );", "title": "" }, { "docid": "31c3ab7559b25f4ef3d126b882a66bc6", "score": "0.7277117", "text": "function setHeader(string $name, string $value);", "title": "" }, { "docid": "8bfe942879ca79996cb40498f6a6b169", "score": "0.726099", "text": "public function setHeader($header, $value);", "title": "" }, { "docid": "13bac51fad8823c2c7a7c783cae5e9f8", "score": "0.72019225", "text": "protected function setHeader($key, $value) {\n header($key . ': ' . $value);\n }", "title": "" }, { "docid": "a5e5ec8b6c2d395053eff648927388a6", "score": "0.7143404", "text": "public function setHeader($file)\n\t{\n\t\t$this->header = $file;\n\t}", "title": "" }, { "docid": "268322631583af81451f2a185ac75a5d", "score": "0.7138827", "text": "public function setHeader(string $header, $value);", "title": "" }, { "docid": "55d1f43634fa195e06fc9967f44f8480", "score": "0.71111566", "text": "public function setHeader($name, $value);", "title": "" }, { "docid": "b2f0cbb1bed64503da2dade207323a51", "score": "0.6943723", "text": "function setHeader($key, $value)\n {\n $this->_reset_status();\n $key = strtolower($key);\n $this->headers[$key] = $value;\n }", "title": "" }, { "docid": "d98897561c7b1d8a1e28c2b582d75a4b", "score": "0.68275034", "text": "function setHeader($filename)\n {\n header(\"Pragma: public\");\n header(\"Expires: 0\");\n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Content-Type: application/force-download\");\n header(\"Content-Type: application/octet-stream\");\n header(\"Content-Type: application/download\");;\n header(\"Content-Disposition: attachment;filename=$filename\");\n header(\"Content-Transfer-Encoding: binary \");\n }", "title": "" }, { "docid": "3d47521b79a04655cd807a5acdca3763", "score": "0.68168586", "text": "function setHeaders() {\n }", "title": "" }, { "docid": "4808b2d163e3d5d418f23c8f6d146718", "score": "0.68007976", "text": "public function SetHeaders() { }", "title": "" }, { "docid": "cdf2a9c0d7b625a9ff370f62d141eafc", "score": "0.6744288", "text": "public function setHeader($header, $value = null)\n {\n }", "title": "" }, { "docid": "466b591e1137ec535ac5ffdd096fafcd", "score": "0.6725674", "text": "public function setHeader($key, $value)\n {\n $this->headers[$key] = $value ? \"{$key}: {$value}\" : $value;\n }", "title": "" }, { "docid": "97d91a0c044358c073da3fe7e1ebae9a", "score": "0.6720019", "text": "public function set_header($header) {\n $this->headers[] = $header;\n }", "title": "" }, { "docid": "c4097fa61c35313cb1d9a13735d38704", "score": "0.6711106", "text": "function setHeader($header, $throwException = FALSE) {\n\tif (!headers_sent()) {\n\t\theader($header);\n\t} else {\n\t\tif ($throwException) {\n\t\t\tthrow new Exception(_('Could not send new headers.'));\n\t\t}\n\t}\n}", "title": "" }, { "docid": "0c6e077072b9b8acd1696447d425b180", "score": "0.66097647", "text": "public function header($key);", "title": "" }, { "docid": "4dce0af0fae6d39ecb5a18d1412cfefa", "score": "0.6607832", "text": "public function setHeader($header)\n\t{\n\t\t$this->_config['header'] = $header;\n\t}", "title": "" }, { "docid": "121cfbf06d9ea2faf62a8bd9dc34a1b0", "score": "0.66048145", "text": "public function setHeader($header, $value)\n {\n $this->headers[$header] = $value;\n }", "title": "" }, { "docid": "72276a8ce7e5967a5c9e33440267313b", "score": "0.6598932", "text": "function put_headers(){\n//\tHeader(\"Pragma: no-cache\");\n//\tHeader(\"Cache-Control: no-cache\");\n//\tHeader(\"Expires: \".GMDate(\"D, d M Y H:i:s\").\" GMT\");\n}", "title": "" }, { "docid": "6fb7c9adda2ad2bdd75c7d1a48580cca", "score": "0.65743196", "text": "public function setHeader($key, $value)\n {\n $this->headers[$key] = $value;\n $this->updateHeaders();\n }", "title": "" }, { "docid": "3363d92509b77cbef3f8f6fd3e6fe8ae", "score": "0.65708375", "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": "67730fd290e4da8de1472f4dbbc8a565", "score": "0.6556993", "text": "public function setCachingHeaders(): void\n {\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');\n }", "title": "" }, { "docid": "882a5966a6b1653a8d70cbd07682c2d3", "score": "0.6554767", "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": "edc43f483a9bbd614d50c84064db0f5b", "score": "0.65508187", "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": "67b360c7330ae0e1a520c75848c512de", "score": "0.6538292", "text": "private function setHeader(string $key, $value)\n {\n $this->headers[$key] = $value;\n }", "title": "" }, { "docid": "15cef1960ae50f5fd0854ca4f9fc8e16", "score": "0.65262395", "text": "public function set_header($header_name, $header_value)\n\t{\n\t\t$this->headers[$header_name] = $header_value;\n\t}", "title": "" }, { "docid": "2a21df189c9df511919877d0056b9400", "score": "0.6515964", "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": "c983832029fcb5fd100eb31f4f5d3b03", "score": "0.6514597", "text": "function setDataHeader($head) {\n $this->dataHeader = $head;\n }", "title": "" }, { "docid": "c9639148bee500eb2f9f969194157db2", "score": "0.6509606", "text": "function addHeader($header, $value);", "title": "" }, { "docid": "ba49cd71982dcfab07b62036856eb1bf", "score": "0.65067035", "text": "protected function headers()\r\n {\r\n header('Cache-Control: no-cache, must-revalidate');\r\n header('Expires: -1');\r\n }", "title": "" }, { "docid": "a52c3ff34c25be7250b9492388247674", "score": "0.64989513", "text": "public function writeHeader();", "title": "" }, { "docid": "dfa212acc710c1b8a939e159012c3987", "score": "0.6495505", "text": "public function setHttpHeader($header, $value) {\r\n\t\t$this->_httpHeaders[$header] = $value;\r\n\t}", "title": "" }, { "docid": "82fdf79deb76e9d89ce4562994f6142b", "score": "0.6481702", "text": "public function setHeader(){\r\n\t\treturn $this->header = HEAD;\r\n\t}", "title": "" }, { "docid": "02a2ea244f203cce549dce16dc53cd3a", "score": "0.64641374", "text": "function abp01_send_header($header, $replace = true, $httpResponseCode = 0) {\n\t\theader($header, $replace, $httpResponseCode);\n\t}", "title": "" }, { "docid": "b5b442f9183dbe0cc223cfb19d9c2e19", "score": "0.6442448", "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": "a73f5c8c8f487edc07f66b41d1093aa2", "score": "0.6431627", "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": "ff0cb49404d22cc6d052a652fc80cdc6", "score": "0.64262", "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": "c330476187783775c575eeb13bbedf26", "score": "0.6423654", "text": "public function header() {}", "title": "" }, { "docid": "57d685e12b453ae2706647fdf59a51d1", "score": "0.6406351", "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": "b0affc667ade0a93b28bd8bcb63c1852", "score": "0.64028215", "text": "public function setHeader(string $name, $value): HttpResponseInterface;", "title": "" }, { "docid": "3378ec92d2242094443b75d92c4e06bb", "score": "0.64005274", "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": "4c4fa7f9bcad0fb7868a47e52b9217c5", "score": "0.6395077", "text": "public function setHeader()\n {\n $this->header = base64_encode(json_encode(array(\"alg\" => self::ALG, \"type\" => self::TYPE)));\n }", "title": "" }, { "docid": "6197098c74fc2ed7b6d0430e97bb8e15", "score": "0.6392407", "text": "private function setHeaders(){\n $this->headers = apache_request_headers();\n }", "title": "" }, { "docid": "9a8b9184dd6273e5abad71ab7f7051aa", "score": "0.6391401", "text": "protected function doHeader() {\n\t\theader ( \"Content-type: text/html; charset=UTF-8\" );\n\t}", "title": "" }, { "docid": "ab38a25d74c44377113aa22299de3e83", "score": "0.6368895", "text": "public function set_cache_headers()\n {\n $this->response()->headers()->add(\"Cache-Control\", \"max-age=300\");\n }", "title": "" }, { "docid": "edcd503bcf9b7e5b7393fa2ba1342822", "score": "0.6362139", "text": "public function sendHeader() {\n\t}", "title": "" }, { "docid": "27028e15bb3732d84c06bad7dafff8e6", "score": "0.63529694", "text": "private static function send_headers()\n\t{\n\t\tif(!headers_sent())\n\t\t{\n\t\t\tself::$headers = array_unique(self::$headers);\n\n\t\t\tforeach(self::$headers as $name => $value)\n\t\t\t{\n\t\t\t\tif($name != '_status')\n\t\t\t\t{\n\t\t\t\t\theader($name . ':' . $value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($value === 304)\n\t\t\t\t\t{\n\t\t\t\t\t\theader('Status: 304 Not Modified', TRUE, 304);\n\t\t\t\t\t}\n\t\t\t\t\telseif($value === 500)\n\t\t\t\t\t{\n\t\t\t\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "98f1270eb48275fea1d666fcb10eb455", "score": "0.63449013", "text": "public function header($string)\n\t{\n\t\theader($string);\n\t}", "title": "" }, { "docid": "6872c86edb8df325938622bddc19d972", "score": "0.6340545", "text": "public function addHeader( $key, $value );", "title": "" }, { "docid": "fc587c7d3b7fd63bc5ca8526a9831988", "score": "0.6322646", "text": "function sendContentHeader($imageFormat, $cacheTime) {\n $contentType = image_type_to_mime_type($imageFormat);\n header('Content-type: '.$contentType);\n if ($this->publicMode && $cacheTime > 0) {\n header('Expires: '.gmdate(\"D, d M Y H:i:s\", time() + (int)$cacheTime).\" GMT\");\n header(\n sprintf(\n 'Cache-Control: max-age=%s, pre-check=%s, no-transform',\n (int)$cacheTime,\n (int)$cacheTime\n )\n );\n header('Pragma:');\n } else {\n header('Expires: '.gmdate(\"D, d M Y H:i:s\", time() - 86400).\" GMT\");\n header('Cache-Control:\tno-store, no-cache, must-revalidate, post-check=0, pre-check=0');\n header('Pragma:\tno-cache');\n }\n }", "title": "" }, { "docid": "d9f40e0fb594c63cc3fc77a617c9cad8", "score": "0.6318921", "text": "private function setCsvHeaders() {\n header(\"Content-Disposition: attachment; filename=\\\"$this->filename\" . '.csv' . \"\\\"\");\n header(\"Content-Type: text/csv; charset=UTF-8\");\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n }", "title": "" }, { "docid": "85109df8da1644e18dd2ea3656d64cdb", "score": "0.6307182", "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": "e7181e1a4fc7f37d9ed3d6dd256156e6", "score": "0.6307084", "text": "public function renderHeader()\n {\n if (true == $this->canSetHeader() && true == count($this->m_aHeader)) {\n foreach ($this->m_aHeader as $headerLine) {\n header($headerLine);\n }\n }\n }", "title": "" }, { "docid": "ac04ff304321f88573ab9ec5f9796b86", "score": "0.6297642", "text": "public function testSettingResponseHeader()\n {\n $this->page->setHeader('foo', 'bar');\n $this->assertEquals(\n 'bar', $this->page->getResponse()->getHeader('foo')\n );\n }", "title": "" }, { "docid": "cf5dd365ba0976e8a59801ed7286e263", "score": "0.6289211", "text": "protected function setHeaders()\n {\n parent::setHeaders();\n\n $this->headers['headers']['Authorization'] = 'OAuth '.$this->params['token'];\n }", "title": "" }, { "docid": "119578eed4feb5307ba1d227cdb8656a", "score": "0.62823075", "text": "function pageHeader($title, $location, $header=true)\n{\n global $g_options, $HTTP_GET_VARS;\n if(!headers_sent()) {\n ob_start();\n } else {\n error(_(\"Headers already sent\"), false);\n $g_options['doGzip'] = false;\n }\n if($header)include(INCLUDE_PATH . \"/header.inc\");\n}", "title": "" }, { "docid": "3dcaea9b118271c975569363f36d8f6a", "score": "0.62753755", "text": "function setHeaderDoc($file_name)\n{\nheader(\"Content-type: application/x-ms-download\");\nheader(\"Content-Disposition: attachment; filename=$file_name\");\nheader('Cache-Control: public');\n}", "title": "" }, { "docid": "25f97a87b658b3ca7bf8421f90460193", "score": "0.62750196", "text": "public function setHeader($name, $value)\n {\n $this->getClient()->appendRequestHeader($name, $value);\n }", "title": "" }, { "docid": "71fec390587276fbbc68acea6e46eed5", "score": "0.6274094", "text": "protected function sendHeader($header)\n\t{\n\t\theader($header);\n\t}", "title": "" }, { "docid": "db6e5a8a2f843898990c823b22612885", "score": "0.62571543", "text": "private function set_header($header, $value) {\n // Filters the input by removing all \"\\\\n\" and \"\\\\r\" characters.\n $this->headers[$header] = str_replace(array(\"\\n\", \"\\r\"), '', $value);\n }", "title": "" }, { "docid": "034f7a8dd22e9652b37541462b7c064f", "score": "0.625415", "text": "public function setHeader( $name, $value )\r\n {\r\n $this->headers[$name] = $value;\r\n }", "title": "" }, { "docid": "f8998d81dfa6a27fae593b54521a8161", "score": "0.62458324", "text": "public function createRequestHeader(){\n header('Content-type: '.$this->headerType);\n header('HTTP/1.1 '.$this->httpResponseCode.' '.$this->getHttpResponseMessage($this->httpResponseCode));\n }", "title": "" }, { "docid": "4a00cde306622ccb3f33022e71256018", "score": "0.6243756", "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": "7c598ecc2d8fb3f2b09f793cc47775c3", "score": "0.6234635", "text": "private function setHeader($code) { \n \n //if we were not passed a legit code\n if (! isset(self::$statuses[$code])) {\n return false;\n } \n\n //create our string\n $header_string = Input::server('server_protocol') . ' ' . $code . ' ' . self::$statuses[$code];\n\n //set the header with the protocol version, the code and the status\n header($header_string);\n\n //set our response code\n http_response_code($code); \n }", "title": "" }, { "docid": "5ef84ca452c131be99a9c128477b18c5", "score": "0.6231624", "text": "public function setRequestHeader($key, $value) {\n\t\t$this->requestHeaders[$key] = $value;\n\t}", "title": "" }, { "docid": "97a793eed646ca25568a3ec6bf856080", "score": "0.6210207", "text": "public function setResponseHeaders($responseHeader)\n {\n $this->responseHeaders = $responseHeader;\n }", "title": "" }, { "docid": "84529a18f34c3196ab8c22548538dfcb", "score": "0.6202006", "text": "public function header(string $header, string $value = \"\"){\n if($value != \"\"){\n $this->headers[$header] = $value;\n } else {\n $this->headers[] = $header;\n }\n }", "title": "" }, { "docid": "e735333dbbdd62a60bb406a0e4240ac2", "score": "0.6189924", "text": "public function setHeaderData() {\n\t\t\t$this->assign('_PAGE_URL', PAGE_URL);\n\t\t\t$this->assign('_META', $this->_meta);\n\t\t\t$this->assign('_STYLES', $this->_styles);\n\t\t\t$this->assign('_SCRIPTS', $this->_scripts);\n\t\t}", "title": "" }, { "docid": "6a33ba793d00dca9d334bb6fc3351d66", "score": "0.6186596", "text": "public function setHeader(array $header) {\n $this->header = $header;\n }", "title": "" }, { "docid": "98249abb25ffd6540fbbfb5626d624ca", "score": "0.61829436", "text": "function viewFileHeader($file, $header) {\n header($header);\n header(\"Content-Lenght: \".filesize($file));\n readfile($file);\n }", "title": "" }, { "docid": "e49431202e1dfe6462333242a4c9b1dd", "score": "0.617844", "text": "public function setHeader($name, $value) {\n\n $this->headers[$name] = $value;\n\n }", "title": "" }, { "docid": "ce69fc1289e799df50dac0cc0c237b15", "score": "0.61716765", "text": "public static function header($key, $value, $replace = TRUE){\n\n if(headers_sent()){\n \n return false;\n }\n\n return header($key . ': ' . $value, $replace); \n }", "title": "" }, { "docid": "2ac433642d2e3d44c3efe3e6ce638c0a", "score": "0.6167518", "text": "function setHtmlOutput(){ \n self::$headers->item['ct']=array('Content-Type: text/html; charset=utf-8');\n }", "title": "" }, { "docid": "f254e2d4c90c85ff77e27cfd25f98fc0", "score": "0.61637837", "text": "protected function loadResponseHeader() {\n $status_header = 'HTTP/1.1 '.$this->respCode.' '.$this->getStatusCodeMessage($this->respCode);\n // set the status\n header($status_header);\n // set the content type\n header('Content-type: ' . $this->responseContentType . '; charset=utf-8');\n }", "title": "" }, { "docid": "fa6436d1887ad18197593759fcb2b24c", "score": "0.61609656", "text": "public function setHeader($name, $value)\n {\n $this->headers[$name] = $value;\n }", "title": "" }, { "docid": "7b6b49ea0a4b999ce86f7ec73b58d421", "score": "0.61528563", "text": "function header(string $string, bool $replace = true, ?int $http_response_code = null): void\n {\n HTTPFunctions::header($string, $replace, $http_response_code);\n }", "title": "" }, { "docid": "d52d77a0453e315c17271edd398ee17f", "score": "0.61428696", "text": "protected function sendHeader($header)\n {\n $this->headers_sent[] = $header;\n }", "title": "" }, { "docid": "5ca5ba816904dc03e6524c056f4e029a", "score": "0.61315185", "text": "public function addHeader($head){\n\t\t$this->header .= $head;\n\t}", "title": "" }, { "docid": "3e985957409d4cd3347b0c6c6eae0355", "score": "0.6129756", "text": "public function setHeader($header_name,$header_value,$replace=true)\r\n\t{\r\n\t\t$header = array($header_value,$replace);\r\n\t\t$this->_Headers[$header_name] = $header;\r\n\t}", "title": "" }, { "docid": "63d2c648a8e0a33ee9053f81223fd102", "score": "0.6114342", "text": "protected function addHeader($header)\n\t{\r\n $this->headers .= $header.\"\\r\\n\";\r\n }", "title": "" }, { "docid": "4e09981d62cd00c5ac9df55263dbe736", "score": "0.61125064", "text": "public function setHeader(array $header)\n\t{\n\t\t$this->_header = $header;\n\t}", "title": "" }, { "docid": "6e32812b75bc803207d42964a0afa898", "score": "0.6111697", "text": "public function setHeaderAttr($attr) {\n\t\t$this->_headerAttr = $attr;\n\t}", "title": "" }, { "docid": "367b2c6fe7f11b46b35e7603b8d6972d", "score": "0.61091447", "text": "public function sendHeaders()\n {\n if ($this->headersSent) {\n return;\n }\n\n if (!isset($this->headers[\"Content-Length\"])) {\n $this->sendContentLengthHeaders();\n }\n\n $this->httpResponse->writeHead($this->status, $this->headers);\n $this->headersSent = true;\n }", "title": "" }, { "docid": "5307e7cf2f864baf907ddfb43c44c71c", "score": "0.61050993", "text": "function http_headers()\n{\n header(\"Content-Type: text/html; charset=\" . get_charset());\n // We want to prevent IE8 offering \"Compatability View\" as that really\n // messes up MRBS, especially on the Report page\n header(\"X-UA-Compatible: IE=Edge\");\n header(\"Pragma: no-cache\"); // HTTP 1.0\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\"); // Date in the pastt\n}", "title": "" }, { "docid": "3193d987e074474ff53948663cb61cab", "score": "0.6098973", "text": "public function SetHeaderValue($key, $value) {\n $this->requestHeaderElements[$key] = $value;\n }", "title": "" }, { "docid": "78aabdbd9aabcd40cfd5792e5797c9a2", "score": "0.6096361", "text": "public function setHeaders($headers);", "title": "" }, { "docid": "78aabdbd9aabcd40cfd5792e5797c9a2", "score": "0.6096361", "text": "public function setHeaders($headers);", "title": "" }, { "docid": "23ae6fba46d1f71eaa4f91f1cd9c0f37", "score": "0.60951746", "text": "private function setExcelHeaders() {\n header(\"Content-Disposition: attachment; filename=\\\"$this->filename\" . '.xls' . \"\\\"\");\n header(\"Content-Type: application/vnd.ms-excel; charset=UTF-8\");\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n }", "title": "" }, { "docid": "2a5aa5f73ef6858bc9675bbb0b8ba704", "score": "0.609123", "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": "5a1a60a9fe1b9d3a8d4a039516497900", "score": "0.6083913", "text": "public function\n\t\tsend_http_headers()\n\t{\n\t\tparent::send_http_headers();\n\t\t\n\t\t/*\n\t\t * Make sure that the user is logged in.\n\t\t */\n\t\t$alm = UserLogin_LoginManager::get_instance();\n\t\t\n\t\tif (!$alm->is_logged_in()) {\n\t\t\t$_SESSION['user-login-data']['desired-url'] = new HTMLTags_URL();\n\t\t\t\n\t\t\t$_SESSION['user-login-data']['desired-url']->set_file('/');\n\t\t\t\n\t\t\t$redirection_manager = new PublicHTML_RedirectionManager();\n\t\t\t$redirection_url = $redirection_manager->get_url();\n\t\t\t\n\t\t\t$redirection_url->set_file('/');\n\t\t\t\n\t\t\t$location_header_line = 'Location: ' . $redirection_url->get_as_string();\n\t\t\t\n\t\t\theader($location_header_line);\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "de617dc8fd85302f43f90b929c03988f", "score": "0.6077846", "text": "public function sendHeader($header, $value = '')\n {\n if (!empty($value)) {\n $header .= ': ' . $value;\n }\n header($header);\n }", "title": "" }, { "docid": "87cfdf4c5f6faaa7290d32aed317f5cc", "score": "0.60766715", "text": "function setHeaderLatin()\r\n\t{\r\n\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\" ); \r\n\t\theader(\"Last-Modified: \" . gmdate( \"D, d M Y H:i:s\" ) . \"GMT\" ); \r\n\t\theader(\"Cache-Control: no-cache, must-revalidate\" ); \r\n\t\theader(\"Pragma: no-cache\" );\r\n\t\theader(\"Content-type: text/html; charset=ISO-8859-1\");\r\n\t}", "title": "" }, { "docid": "8832e18d05b544bc706893f3e28feea2", "score": "0.60730773", "text": "function send_page_headers()\n{\n\tglobal $mybb;\n\n\tif($mybb->settings['nocacheheaders'] == 1)\n\t{\n\t\theader(\"Expires: Sat, 1 Jan 2000 01:00:00 GMT\");\n\t\theader(\"Last-Modified: \".gmdate(\"D, d M Y H:i:s\").\" GMT\");\n\t\theader(\"Cache-Control: no-cache, must-revalidate\");\n\t\theader(\"Pragma: no-cache\");\n\t}\n}", "title": "" }, { "docid": "b8207a91327fe47758042ec2c315bba8", "score": "0.60704046", "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": "821e774ed93a0a9af12ef368a4c9b792", "score": "0.6066389", "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": "bf0afa33f5523bed1df3b0fe9515084b", "score": "0.6063011", "text": "function WriteHeaders(){\r\n\t\tglobal $CELULARES_WAP;\r\n\t\tglobal $ua;\r\n\r\n\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\"); // Date in the past\r\n\t\theader(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\r\n\t\theader(\"Cache-Control: no-store, no-cache, must-revalidate\"); // HTTP/1.1\r\n\t\theader(\"Cache-Control: post-check=0, pre-check=0\", false);\r\n\t\theader(\"Pragma: no-cache\"); // HTTP/1.0\r\n\r\n\r\n\r\n\t\tif(!($ct = $this->_soportaXHTML()) || $this->mode == WML_MODE) {\r\n\t\t\theader(\"Content-type: text/vnd.wap.wml\");\r\n\t\t\techo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>';\r\n\t\t\techo '<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">';\r\n//\t\t\techo '<!DOCTYPE WML PUBLIC \"-//WAPFORUM//DTD WML 1.0//EN\" \"http://www.wapforum.org/DTD/wml.xml\">';\r\n\t\t\techo \"\\n\";\r\n\r\n\t\t} else {\r\n\t\t\theader(\"Content-type: \".$ct);\r\n\r\n\t\t\t//ISO-8859-1\r\n\t\t\techo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>';\r\n\t\t\techo '<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">';\r\n\t\t}\r\n\r\n\r\n\t}", "title": "" }, { "docid": "8a640f5386c8bca1a785cafc4a975f5d", "score": "0.60567886", "text": "public static function header($headers)\n {\n WorkerHttp::header($headers);\n }", "title": "" } ]
87fdc2e9e8e683ec6b6ef3249df4537c
end cross check Delete a unit from the server
[ { "docid": "0ed61a198aa5cfc2e2cbcf92385b6f48", "score": "0.65986466", "text": "function delete_unit($id=0)\n {\n $page = $this->page;\n \n if ($id != 0)\n {\n $this->db->query('DELETE FROM combatunits WHERE combatunit_id='.$id);\n }\n \n redirect('admin/cross_check', 'refresh');\n \n }", "title": "" } ]
[ { "docid": "0f647b618c267ef4ed2f483ad9d7b909", "score": "0.7222606", "text": "public function deleted(Unit $unit)\n {\n //\n }", "title": "" }, { "docid": "319301b075630e94431df849d0bde221", "score": "0.6861681", "text": "public function delete_services_method_unit(){\n\t\t\t$query=\"delete from `\".$this->table_name.\"` where `id`='\".$this->id.\"' \";\n\t\t\t$result=mysqli_query($this->conn,$query);\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "195fb8e670e65a9a7de14420dd529181", "score": "0.67547965", "text": "public function testDeleteWarehouse()\n {\n }", "title": "" }, { "docid": "1801e684598f85bab46b2ce6ac52177a", "score": "0.6715099", "text": "public function testDeleteDismantleReusableEquipmentAndParts()\n {\n }", "title": "" }, { "docid": "b9ca0242f68ca4fea85dd6c81d7f440c", "score": "0.6684737", "text": "public function destroy(Unit $unit)\n {\n\t $unit->delete();\n\t return 1;\n }", "title": "" }, { "docid": "205afbea2050827f7e8edce519cc4764", "score": "0.6656396", "text": "function testDeleteResult() {\n // ================================\n \n \n // To verify delete result Game Final is valid\n // ================================\n \n echo $this->unit->report();\n echo $this->returnResult($this->unit->result()); \n\n\n }", "title": "" }, { "docid": "ecfa2b2028a9fc137e2795ddf6e3c4d0", "score": "0.66296023", "text": "public function deleteAction() {\n //ID from route\n $id = $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('unit');\n }\n $request = $this->getRequest();\n if ($request->isPost()) {\n $del = $request->getPost('del', 'No');\n\n if ($del == 'Yes') {\n $id = (int) $request->getPost('id');\n $this->getUnitQueries()->deleteUnit($id);\n }\n\n // Redirect to list of users\n return $this->redirect()->toRoute('unit');\n } else {\n //delete Unit\n $this->getUnitQueries()->deleteUnit($id);\n return $this->redirect()->toRoute('unit');\n }\n }", "title": "" }, { "docid": "849372e907a6f62f56e335a3e67083bc", "score": "0.6607077", "text": "public function delete(){}", "title": "" }, { "docid": "d732e8bf5fde02b0d1e7bc49f77304a4", "score": "0.65960646", "text": "public function testDeleteCdAdmin(){\n $token = $this->getTokenAdmin();\n $headers = array(\n \"Authorization\"=>\"Bearer $token\"\n );\n\n $this->delete('cd/1', [], $headers);\n $this->assertResponseStatus(200);\n $this->seeJsonContains([\n 'success' => true,\n 'message' => 'Delete CD success'\n ]);\n }", "title": "" }, { "docid": "2f6597ac98b29a2c0df3760e4d3ccc48", "score": "0.65955", "text": "public function testdelete()\n\t{\n\t\t$this->viderTable();\t\n\t\t$this->creer1Encadrant();\n\t\t$this->creer1Encadrant();\n\t\t$es = new EncadrantService($this->em);\n\t\t\n\t\t$en = $es->delete(2);\n\t\t\n\t\t$en = $this->em->getRepository('DTDoctoramaBundle:Encadrant')->findAll();\n\t\t$this->assertEquals(1, sizeof($en));\n\t}", "title": "" }, { "docid": "c78ab0ff8da78cb537b60a39e18cef94", "score": "0.65907127", "text": "public function del(){}", "title": "" }, { "docid": "3b6f07979d2b39211acdc22bc9850445", "score": "0.65825117", "text": "public function actionDeletereq()\n {\n // get member id\n $memberId = $this->getMemberId();\n // get id array\n $idStr = substr(Yii::$app->request->get('id'), 0, -1);\n $ids = explode(',', $idStr);\n\n $this->getBsSdClass()->deleteSd($ids, new BsSdCapitalReq(), $memberId);\n $this->redirect('req');\n }", "title": "" }, { "docid": "6bd7ba646a5ac737bac6d5d3e88bde84", "score": "0.65397996", "text": "public function test_deleteProductionLot() {\n\n }", "title": "" }, { "docid": "ba5ed4cee85cff6733753cf1fd9004c6", "score": "0.6520855", "text": "public function testDeleteById()\n {\n $server = $this->server->getByAssetId('87523');\n $this->assertTrue($this->server->deleteById($server->getId()));\n }", "title": "" }, { "docid": "cdefc71937a02b288486669bd2021eae", "score": "0.649", "text": "function delete_unit_promo($id_unit)\n\t{\n\t\t$this->access_lib->_is(\"adm,stk\");\n\t\t\n\t\t$this->load->model('promo_m');\n\t\t$this->load->model('unit_m');\n\t\t\n\t\t$data_unit = $this->unit_m->get_by_id($id_unit)->row();\n\t\t\n\t\tif ($data_unit->status_transaksi == \"\")\n\t\t{\n\t\t\t$this->promo_m->delete_unit_promo($id_unit);\n\t\t\t$this->access_lib->logging('Hapus data unit promo : '.$data_unit->kode_unit);\n\t\t\techo \"ok\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"Data unit gagal dihapus, unit \".$data_unit->kode_unit.\" masih dalam proses transaksi.\";\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "1720749d71531999255bba82b01f4938", "score": "0.64810765", "text": "public function testDeleteTest() \n {\n $user = factory(User::class)->create();\n \n $response = $this->actingAs($user)->json('POST', '/api/uf', ['uf' => 'PB', 'descricao' => 'PARABIBA']);\n\n $json = json_decode($response->getContent());\n\n $response = $this->json('DELETE', '/api/uf/' . $json->id);\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "ebe59cba03c7071d88afd2be98e4c4f7", "score": "0.6463789", "text": "public function testServicescatSupp28(){\n //login user\n $this->setSession();\n $catId = $this->ServiceCategories->get(2)->id;\n\n //supprimer produit 1\n $this->post('/my-enterprise/serviceCategories/delete/2');\n $DeleteServ=$this->Services->find()->where(['service_category_id'=> $catId])->toArray();\n $this->assertEmpty($DeleteServ);\n }", "title": "" }, { "docid": "754cebea0723e179e344f3fea65ef7cb", "score": "0.6463558", "text": "public function del()\n {\n }", "title": "" }, { "docid": "2e4570b864f7838ec82bf5c1991a072e", "score": "0.64545673", "text": "public function testDeleteEntity()\n {\n }", "title": "" }, { "docid": "6f47cc6b7e9b7f831991662fe1409a9f", "score": "0.64530337", "text": "public function destroy($id)\n {\n // return response()->json($id);\n $unit = Unit::find($id);\n $unit->delete();\n\n \n\n }", "title": "" }, { "docid": "03a485e88e3806999ccac1db601fc7fc", "score": "0.64163524", "text": "public function destroy(Unit $unit)\n {\n //change the status of the previous components to free\n $component_id = explode('|', $unit->components);\n foreach ($component_id as $key => $value) {\n $component = Component::find($value);\n $component->status = 1;\n $component->unit_id = null;\n $component->save();\n }\n $unit->delete();\n\n return redirect()\n ->route('unit.index')\n ->with('warning', 'Unit Has Been Deleted');\n }", "title": "" }, { "docid": "b693b462904b1f448af01436f6d835b9", "score": "0.6394677", "text": "public function testDeleteAccountUsingDELETE()\n {\n }", "title": "" }, { "docid": "59bc9a4e1dca1fcac8c5fefe950ebbb5", "score": "0.6389415", "text": "public function testDeleteLoyaltyCard()\n {\n }", "title": "" }, { "docid": "b3d7894618a75ea949f336a945c036cf", "score": "0.6383085", "text": "public function testDeleteUser(){\n\t}", "title": "" }, { "docid": "7a90c01d9934bdc9084d127228415d1d", "score": "0.6379452", "text": "public function testShouldDeleteData()\n {\n \n }", "title": "" }, { "docid": "16d4930cdb66bf636499915e9c49445e", "score": "0.6375779", "text": "public function testDelete04(): void\n {\n $client = static::createClient([], [\n 'PHP_AUTH_USER' => UserUsername::USER_USERNAME_DEFAULT_ADMIN,\n 'PHP_AUTH_PW' => UserPassword::USER_PASSWORD_DEFAULT_VALUE,\n ]);\n\n $tests = $client->getContainer()->get('doctrine.orm.entity_manager')->getRepository(Test::class)->findAll();\n $id = end($tests)->getId();\n\n $client->xmlHttpRequest('GET', \"/admin/test/delete/$id\");\n\n $this->save('result.html', $client->getResponse()->getContent());\n\n $this->assertEquals(Response::HTTP_OK, $client->getResponse()->getStatusCode());\n\n $content = json_decode($client->getResponse()->getContent(), true);\n\n $this->assertEquals(true, $content['success']);\n }", "title": "" }, { "docid": "0214b6079026bea24cd68ff3e6fdccbf", "score": "0.63636696", "text": "public function deleteDeDB(){\r\n }", "title": "" }, { "docid": "7f9464d9417f20952c57a019bc840271", "score": "0.6350017", "text": "protected function doDel()\n {\n \n }", "title": "" }, { "docid": "35309e69e21d064b8e35ad5daed419a3", "score": "0.63444793", "text": "public function testDestroy()\n {\n $this->actingAs($this->user1)\n ->delete(\n '/api/device-application',\n [\n 'application_id' => 1,\n 'device_id' => 1,\n ]\n )\n ->assertResponseStatus(200);\n }", "title": "" }, { "docid": "7ef228a02e3ea53c8a96d738726bb983", "score": "0.63337255", "text": "public function delete(){\r\n self::$operation = \"Delete\";\r\n $sql = 'delete from '.static::$tableName.' where id =' .$this->id;\r\n $this->runQuery($sql);\r\n }", "title": "" }, { "docid": "8d9cb9709c18b92cb6f41ee7bcc21c8c", "score": "0.63329977", "text": "public function delete(){\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "94c05d7b342e236f394bb1b9ae395d96", "score": "0.6326337", "text": "public function delete() {\n\t}", "title": "" }, { "docid": "23df02e9ff574d065ab4d05612834e50", "score": "0.6326143", "text": "function delete_unitofarea($id) {\r\n $response = $this->db->delete('cs_unitofarea', array('UOA_ID' => $id));\r\n if ($response) {\r\n return \"utility deleted successfully\";\r\n } else {\r\n return \"Error occuring while deleting utility\";\r\n }\r\n }", "title": "" }, { "docid": "9ae7bba29db7e74da71c7d124cc69601", "score": "0.63105184", "text": "public function operationDelete();", "title": "" }, { "docid": "a8517a5f37dec3e797e3940feeced6c5", "score": "0.6296832", "text": "public function delete()\n {\n /**\n * TODO: would need to delete automagic storage of \"Individual \" . $this->name Lab as well\n */\n\n if ($this->inDatabase() == false) {\n throw new Exception(\"The lab component attempting to be deleted does not exist\");\n }\n\n // find primay key of lab component units\n $drug_units = $this->findUnitId($this->default_units);\n\n // Query to delete lab component\n $query = \"DELETE FROM `LabTestsComponents` WHERE `LabTestComponent` = :LabTestComponent AND `LabTestComponentDefaultUnitId` = :LabTestComponentDefaultUnitId;\";\n $stmt_delete_component = $this->con->prepare($query);\n $stmt_delete_component->bindParam(\":LabTestComponent\", $this->name);\n $stmt_delete_component->bindParam(\":LabTestComponentDefaultUnitId\", $drug_units);\n $stmt_delete_component->execute();\n }", "title": "" }, { "docid": "0a6c74e85e1274b414e4c566ff7b2466", "score": "0.62952363", "text": "public function delete()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "ca760c7acadedc3adc3970ed7a4089c8", "score": "0.62932825", "text": "public function delete() {\n }", "title": "" }, { "docid": "ca760c7acadedc3adc3970ed7a4089c8", "score": "0.62932825", "text": "public function delete() {\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.6288921", "text": "public function delete();", "title": "" }, { "docid": "1fd0033bdb1131a146c1a6292a0a1f16", "score": "0.6287384", "text": "public function forceDeleted(Unit $unit)\n {\n //\n }", "title": "" }, { "docid": "fa0e568faa7a1c869af6ad6ff5e95366", "score": "0.6283585", "text": "public function testExpensesIdDelete()\n {\n }", "title": "" }, { "docid": "5685dceda83abdb82009bf9b576d0364", "score": "0.6277429", "text": "public function testDeleteTicketByTicketFollowUpById()\n {\n }", "title": "" }, { "docid": "525c2a2dd37ef0aed66a395f19917554", "score": "0.6268674", "text": "public function testTenantDeleteData()\n {\n // admin wants to DELETE a tenant record -> he can do that!\n $client = static::createRestClient($this->clientOptions);\n $client->request('DELETE', '/testcase/multitenant/100');\n\n $this->assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());\n $this->assertsRecordNotExists(5, '/testcase/multitenant/100');\n\n // load data again\n $this->setUp();\n\n // tenant wants to delete other tenant record -> 404 as he doesn't see it..\n $client = static::createRestClient($this->clientOptions);\n $client->request('DELETE', '/testcase/multitenant/100', [], [], ['HTTP_X-GRAVITON-CLIENT' => '6']);\n\n $this->assertEquals(Response::HTTP_NOT_FOUND, $client->getResponse()->getStatusCode());\n\n // tenant wants to delete admin record\n $client = static::createRestClient($this->clientOptions);\n $client->request('DELETE', '/testcase/multitenant/1000', [], [], ['HTTP_X-GRAVITON-CLIENT' => '6']);\n\n $this->assertEquals(Response::HTTP_BAD_REQUEST, $client->getResponse()->getStatusCode());\n\n // now the owner wants to delete it\n $client = static::createRestClient($this->clientOptions);\n $client->request('DELETE', '/testcase/multitenant/100', [], [], ['HTTP_X-GRAVITON-CLIENT' => '5']);\n\n $this->assertEquals(Response::HTTP_NO_CONTENT, $client->getResponse()->getStatusCode());\n $this->assertsRecordNotExists(5, '/testcase/multitenant/100');\n }", "title": "" }, { "docid": "8a2c26a0fc99d0957bfee726b928c1ff", "score": "0.62672645", "text": "public function delete():self;", "title": "" }, { "docid": "e7015f464fefff921c9fe9186e6d1a3d", "score": "0.62660956", "text": "public function destroy($id,Request $request)\n {\n $id = Hashids::connection('unit')->decode($id);\n $unit = Unit::find($id);\n if($request->ajax())\n {\n unit::destroy($id);\n $response['success'] = \"Unit deleted successfully.\";\n return $response;\n }\n else\n {\n Unit::destroy($id);\n Session::flash('success','Unit Deleted Successfully');\n return redirect()->back();\n }\n \n\n\n }", "title": "" }, { "docid": "7b4cbbe86862b05d0d4c6e519b304951", "score": "0.6265432", "text": "public function testDeleteTicketProblemById()\n {\n }", "title": "" }, { "docid": "500ab31d98e9c78a2ba4fbed005c6259", "score": "0.62593645", "text": "public function testGroupDeleteById()\n {\n\n }", "title": "" }, { "docid": "80702e5a32ba1d7f4d94de9d905730f2", "score": "0.62541586", "text": "public function delete ()\n {\n \n }", "title": "" }, { "docid": "5a2e2f30dcfff002f213d8327739f154", "score": "0.62469125", "text": "public function testDelete02(): void\n {\n $client = static::createClient([], [\n 'PHP_AUTH_USER' => UserUsername::USER_USERNAME_DEFAULT_USER,\n 'PHP_AUTH_PW' => UserPassword::USER_PASSWORD_DEFAULT_VALUE,\n ]);\n\n $tests = $client->getContainer()->get('doctrine.orm.entity_manager')->getRepository(Test::class)->findAll();\n $id = end($tests)->getId();\n\n $client->request('GET', \"/admin/test/delete/$id\");\n\n $this->save('result.html', $client->getResponse()->getContent());\n\n $this->assertEquals(Response::HTTP_FORBIDDEN, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "14fdd8f33c5e6ff7955b96cb20a76e66", "score": "0.6245473", "text": "public function testDeleteTicketById()\n {\n }", "title": "" }, { "docid": "4e9484f0f189b483845e487957550414", "score": "0.6241903", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "1e9afade84093efd82639d9b1a9030d2", "score": "0.62393653", "text": "public function testBorrarTienda(){\n $lastUserId = User::max('id');\n $lastStoreId = Store::max('id');\n $response = $this->deleteJson('api/v1/stores/'.$lastStoreId);\n $response->assertStatus(200);\n $this->deleteJson('api/v1/users/'.$lastUserId);\n }", "title": "" }, { "docid": "05e89ca1b41157a8f37b4281f13dc530", "score": "0.6236407", "text": "public function delete(){\n\n }", "title": "" }, { "docid": "a5ec09718dfba8d402052ad68fda624a", "score": "0.62341917", "text": "function m_deletetrans($conn, $identifier){}", "title": "" }, { "docid": "c9a09e565ae479c530b2a42291837c91", "score": "0.6232824", "text": "public function delete() {\n\n }", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.62324095", "text": "abstract public function delete();", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.62324095", "text": "abstract public function delete();", "title": "" }, { "docid": "4c8592d2284cfe080a836ae85121cc2e", "score": "0.6231707", "text": "public function testCompanyIdDelete()\n {\n }", "title": "" }, { "docid": "9f97c9078ac4346170b812ac1f7a8e16", "score": "0.62301177", "text": "public function delete()\n {}", "title": "" }, { "docid": "50e80b39d1951a58473eef770427115c", "score": "0.62252885", "text": "public function deleteServer()\n {\n global $DIC;\n require_once('./Customizing/global/plugins/Services/Repository/RepositoryObject/MumieTask/classes/class.ilMumieTaskServer.php');\n $server = new ilMumieTaskServer($_GET['server_id']);\n $server->delete();\n $cmd = \"configure\";\n $DIC->ui()->mainTemplate()->setOnScreenMessage('success', $this->i18N->txt('msg_suc_deleted'), true);\n $this->$cmd();\n }", "title": "" }, { "docid": "73e802c0b527b01fb530ca7cff8dd6ed", "score": "0.62246495", "text": "public function testDelete(): void\n {\n $client = static::createClient();\n\n $tests = $client->getContainer()->get('doctrine.orm.entity_manager')->getRepository(Test::class)->findAll();\n $id = end($tests)->getId();\n\n $client->request('GET', \"/admin/test/delete/$id\");\n\n $this->save('result.html', $client->getResponse()->getContent());\n\n $this->assertEquals(Response::HTTP_FOUND, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "82ba3b3c7ad80017e103e44db34afc6a", "score": "0.62218916", "text": "public function testDeleteByAssetId()\n {\n $this->assertTrue($this->server->deleteByAssetId('87864'));\n }", "title": "" }, { "docid": "50560c4178de1f2384692e33ae009132", "score": "0.6216859", "text": "public function delete() {\n\t\tthrow new \\Exception('deleting test records is not implemented');\n\t}", "title": "" }, { "docid": "b6f73e5db46d73c23d59c3e7ad377793", "score": "0.6215845", "text": "abstract public function Delete();", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.6210877", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.6210877", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.6210877", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.6210877", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "697d2e121187f43a7d86112d2853b694", "score": "0.62107515", "text": "public function test_deleteProductionLotTag() {\n\n }", "title": "" }, { "docid": "20c5313d6a9c914174ac8bf817b33c2b", "score": "0.6208226", "text": "public function testOrganizationIdDelete()\n {\n }", "title": "" }, { "docid": "c3875b235068f8a5aee3db108247ae6e", "score": "0.62074643", "text": "public function testVoucherDraftsV2Delete()\n {\n }", "title": "" }, { "docid": "f09180c69ef82ca348c8460621921912", "score": "0.62071806", "text": "public function delete($id = null) {\n if ( $this->request->is('get') || !$id) {\n $this->Flash->set('Neispravan zahtev',['key' => 'errorMessage']);\n\n return $this->redirect(['action' => 'index']);\n }\n\n $result = $this->MeasurementUnit->remove($id);\n\n // measurement unit might not exist, or is connected to a product. \n if ( !$result['error'] ) {\n $this->Flash->set('Jedinica mere je uspesno obrisana',['key' => 'successMessage']);\n } else {\n $this->Flash->set($result['message'],['key' => 'errorMessage']);\n }\n\n return $this->redirect(['action' => 'index']);\n }", "title": "" }, { "docid": "959861cd3d3374dcff88f713d256d61f", "score": "0.6201773", "text": "public function delete()\n {\n\n }", "title": "" }, { "docid": "959861cd3d3374dcff88f713d256d61f", "score": "0.6201773", "text": "public function delete()\n {\n\n }", "title": "" }, { "docid": "60944eb6cd6863b067970a43bae5f13f", "score": "0.61981744", "text": "public function testDestroyFail()\n {\n $this->testSingin();\n\n $response = $this->call('DELETE', 'api/product/100', [] ,[],[], ['HTTP_Authorization' => 'Bearer ' . $this->tokenTest], []);\n\n $response->assertStatus(500);\n\n }", "title": "" }, { "docid": "93457ffbbb7464e7bc2691bb30d3d8f0", "score": "0.618826", "text": "public function testTransactionDeleteSuccess()\n {\n $this->markTestIncomplete('This test is incomplete.');\n }", "title": "" }, { "docid": "0e2a8db3b6e1a4f2ca281c06f9b50771", "score": "0.61881477", "text": "public function delete() {\n \n }", "title": "" }, { "docid": "a49aba4c82e0651fbf1dd39ae9633de8", "score": "0.61853355", "text": "public function testServicesSupp15(){\n //login user\n $this->setSession();\n $picId = $this->Services->get(3)->picture_id;\n\n //supprimer picture3\n $this->post('/services/delete/3');\n $deletedpic=$this->Pictures->find()->where(['id'=> $picId])->toArray();\n $this->assertEmpty($deletedpic);\n \n }", "title": "" }, { "docid": "9e84752379447759195fea5de83e234d", "score": "0.61814195", "text": "function deleteStore(){\n global $objArray,$db;\n $storeObj = $objArray['params']['store'];\n $sql =\"Delete from Stores Where ID =\".$storeObj['ID'].\";\"; \n $result = mysqli_query($db, $sql);\n if($result == false){\n print \"Fail Query\";\n } \n else {\n print true; //delete success\n }\n }", "title": "" }, { "docid": "bc8d7cd2d936a598afd3d428c2bf53cc", "score": "0.6178024", "text": "public function testUcpPaymentMethodDelete()\n {\n\n }", "title": "" }, { "docid": "48625152f45fa2494dc47586275255df", "score": "0.6177382", "text": "public function testDeleteUser()\n {\n }", "title": "" }, { "docid": "a057d46379df53d5a7fd5a95b7507189", "score": "0.61761624", "text": "public function testDestroy()\n {\n $data = factory(\\App\\Entities\\Product::class)->create();\n\n $this->testSingin();\n\n $response = $this->call('DELETE', 'api/product/'.$data->id, [] ,[],[], ['HTTP_Authorization' => 'Bearer ' . $this->tokenTest], []);\n\n $response->assertStatus(200)\n ->assertJson(['data'=>$data->toArray()]);\n }", "title": "" }, { "docid": "49d9bfcff2d74ffb4164520ccbf8d47f", "score": "0.6170864", "text": "function supprimerMachine($id){\n $bdd = connectDBS();\n $query = 'DELETE FROM machines WHERE id = :id';\n $res = $bdd->prepare($query);\n $res->execute(array(':id'=>$id));\n $bdd = null;\n}", "title": "" }, { "docid": "d1df4ffbde2dfceaf6a72b40fd3ddf36", "score": "0.6168751", "text": "public function delete_shirt_order_from_datasource_test(){\n $response = $response = $this->json('POST', 'api/shirt-order/delete', [\n \"tag\" => \"local\",\n \"additional\" => ['id' => '5'],\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "9bf0b3cde60a359ec62c2d2b551665c2", "score": "0.61678094", "text": "function del()\n {\n $id = $this -> input -> get('id');\n if($this -> arcModel -> del($id)){\n dwz_success('操作成功',site_url('arctype'));\n }\n dwz_failed();\n }", "title": "" }, { "docid": "7dbda79cb0d3e2da39ed4e8349db5902", "score": "0.616515", "text": "public function testDelete(): void\n {\n $url = $this->url + ['action' => 'delete'];\n\n $this->post($url + [5]);\n $this->assertRedirect(['action' => 'index']);\n $this->assertFlashMessage(I18N_OPERATION_OK);\n $this->assertTrue($this->Table->findById(5)->all()->isEmpty());\n\n //Cannot delete a default group\n $this->post($url + [2]);\n $this->assertRedirect(['action' => 'index']);\n $this->assertFlashMessage('You cannot delete this users group');\n $this->assertFalse($this->Table->findById(2)->all()->isEmpty());\n\n //Cannot delete a group with users\n $this->post($url + [4]);\n $this->assertRedirect(['action' => 'index']);\n $this->assertFlashMessage(I18N_BEFORE_DELETE);\n $this->assertFalse($this->Table->findById(4)->all()->isEmpty());\n }", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.61622787", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.61622787", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "d4292c7ac642be577817dbb79985bc54", "score": "0.6158609", "text": "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien Fournisseur de test\n\t\t$crawler = $client->request('GET', '/projectcanvas');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Modèle de test modifié\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Modèle de test modifié\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le modèle de projet a bien été supprimé.\")')->count());\n\n\t}", "title": "" }, { "docid": "9c869c98a5d1a9dd25a229870161e350", "score": "0.6156817", "text": "public function deleteStore()\n {\n }", "title": "" }, { "docid": "5388477d347a7748ad373f75fded76a8", "score": "0.61495626", "text": "public function test_confirm_delete()\n {\n $store = Store::find(1);\n $this->browse(function (Browser $browser) use ($store){\n $browser->loginAs($this->user)\n ->visit(new ListStores($store))\n ->click('#delete-'. $store->id)\n ->assertDialogOpened(__('store.admin.message.msg_del'))\n ->acceptDialog()\n ->assertSee(__('store.admin.message.del'));\n $this->assertSoftDeleted('stores', [\n 'id' => $store->id, \n 'name' => $store->name, \n 'address' => $store->address, \n 'phone' => $store->phone, \n 'describe' => $store->describe,\n 'image' => $store->image\n ]);\n });\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "7e8ecca7cc8ec4f4d431f9ebfe75f0bf", "score": "0.0", "text": "public function store(Request $request)\n {\n $request->validate([\n \n 'nome' => 'required|max:255',\n 'status' => 'required',\n \n ]);\n \n try{\n $error = \"\";\n $usuario = \"\";\n $data = $request->all();\n $usuario = new Usuario;\n $usuario->fill($data);\n $usuario->save();\n } catch(\\Exception $e) {\n $error='Erro ao salvar o Usuario' . $e;\n }\n return response()->json([\n 'error' => $error,\n 'data' => $usuario\n ]);\n }", "title": "" } ]
[ { "docid": "75600e5d65c2156987ff7cb140e14a4b", "score": "0.6621582", "text": "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "title": "" }, { "docid": "f1bd5867e87bbf56aefbfc6de8693786", "score": "0.66209733", "text": "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.65685713", "text": "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "title": "" }, { "docid": "0f8c1fe3e3b0c6572457ef33c35c6488", "score": "0.65095705", "text": "function storeAndNew() {\n $this->store();\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
b3b47cc04eb4d8a25a3509751d57ee52
Get the value of _gender
[ { "docid": "9cca495b8f210e1f80260aadb35c51eb", "score": "0.8740664", "text": "public function get_gender()\n {\n return $this->_gender;\n }", "title": "" } ]
[ { "docid": "f9de70ac7499312d391cc3f69b427318", "score": "0.8278474", "text": "public function getGender()\r\n {\r\n return $this->gender;\r\n }", "title": "" }, { "docid": "f9de70ac7499312d391cc3f69b427318", "score": "0.8278474", "text": "public function getGender()\r\n {\r\n return $this->gender;\r\n }", "title": "" }, { "docid": "a54d7f3508b3d0baa9f0bfe6baa2a79f", "score": "0.8239806", "text": "public function getGender()\n {\n $gender = 'U';\n if (isset($this->_data['grr_gender'])) {\n $gender = $this->_data['grr_gender'];\n }\n\n return $gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "5b9465a358ac08cf254a2cdb39ff20ad", "score": "0.82262295", "text": "public function getGender()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "6a6ba2d8d8da5d97e30033f6736de62e", "score": "0.81959516", "text": "function getGender()\n {\n return $this->row['gender'];\n }", "title": "" }, { "docid": "687fcbbdce370386882acf4715f07390", "score": "0.812154", "text": "public function getGender(){\n echo $this->gender;\n }", "title": "" }, { "docid": "7bdfd2d5ea6f481849253e9890c932b1", "score": "0.8121099", "text": "public function getGender()\n {\n return $this->number[static::$genderDigit] % 2;\n }", "title": "" }, { "docid": "195b6306641cd4e6afafed9126bae42f", "score": "0.80395013", "text": "public function getGenderRaw()\n {\n return $this->gender;\n }", "title": "" }, { "docid": "9de6764b23323abb933ac39158b0cb73", "score": "0.80205756", "text": "public function getGender()\n\t{\n\t\t// {implementation code}\n\t}", "title": "" }, { "docid": "625027e8e9b45ee747bd2fd8565d7191", "score": "0.8013319", "text": "public function getStudentGender(){\n\t return $this->student_gender;\n\t }", "title": "" }, { "docid": "895ca12a1ba7034acf6799215b1406ca", "score": "0.79892176", "text": "public function getGender()\n {\n return (!empty($this->gender)) ? (int)$this->gender : null;\n }", "title": "" }, { "docid": "6547d737737b71695bd2e921ba1f1e26", "score": "0.79630387", "text": "public function getGender()\n {\n $userId = Auth::user()->id;\n $gender = DB::table('user_informations')->where('user_id', $userId)->value('gender');\n return $gender;\n }", "title": "" }, { "docid": "e41db195f0c63f3f2d151339576fc7b8", "score": "0.7893519", "text": "function ga_gender($gender)\r\n{\r\n\treturn ($gender == GENDER_MALE) ? 'male' : 'female';\r\n}", "title": "" }, { "docid": "e00e6e6524f52864694990194f137785", "score": "0.78396565", "text": "public function getGender()\n {\n if ($this->needGender() && array_key_exists(\"gender\", $this->_getAdditionalInformation())) {\n return $this->_getAdditionalInformation(\"gender\");\n }\n return null;\n }", "title": "" }, { "docid": "29e6df800c6eadf2c6b869431c4599ec", "score": "0.7801805", "text": "public function getGenderString() {\n if ($this->gender == NULL) {\n return 'unknown';\n }\n if ($this->gender == 0) {\n return 'female';\n }\n if ($this->gender == 1) {\n return 'male';\n }\n }", "title": "" }, { "docid": "ff068d8eb83ad5c994e3a7e42ce0c90e", "score": "0.7766441", "text": "public function getGenderText() {\n\t\t$genderOptions=$this->genderOptions;\n\t\tif($this->gender === null || $this->gender == 0 || $this->gender > 2) {\n\t\t\treturn \"Not Specified\";\n\t\t} else {\n\t\t\treturn $genderOptions[$this->gender];\n\t\t}\n\t}", "title": "" }, { "docid": "cbba26da770065025a242c3a663c1863", "score": "0.7749922", "text": "public function getGender(): ?string;", "title": "" }, { "docid": "5b10652725ab561d2e961590c27beb3a", "score": "0.7744425", "text": "public function gender()\n\t{\n\t\treturn $this->is_male ? 'Male' : 'Female';\n\t}", "title": "" }, { "docid": "1471bd701e83a0a062d1c37b52d299fa", "score": "0.7733174", "text": "public static function gender(): string\n {\n return 'gender';\n }", "title": "" }, { "docid": "c08873c36ac756bd9aa2efa5ae8bc591", "score": "0.76045275", "text": "function getGender($user) {\r\n $pr = $this->getUser($user);\r\n if ($pr[\"gender\"] == 1) return 'M';\r\n elseif ($pr[\"gender\"] == 2) return 'F';\r\n else return NULL;\r\n }", "title": "" }, { "docid": "f28b39b4d0a591c4f6087b7f14819120", "score": "0.7547604", "text": "public static function getGender() \n {\n // phai khoi tao doi tuong truy cap vao\n return (new Cats)->gender; //self::$gender; //$this->gender;\n }", "title": "" }, { "docid": "642896472ef8df5bd1776504c2dc959c", "score": "0.75246745", "text": "public function getCustomerGender(){\n\t\treturn $this->customerGender;\n\t}", "title": "" }, { "docid": "88fc02178319e119f904684ffdaff49f", "score": "0.7448474", "text": "function getGender()\r\n {\r\n $genders = array(\"Male\", \"Female\");\r\n return $genders;\r\n }", "title": "" }, { "docid": "e2dbc3c22580dc23abb7617f77854239", "score": "0.7408647", "text": "public function getsex()\n {\n return $this->sex;\n }", "title": "" }, { "docid": "7c46c7f58ddb3539a4f285ccf08e764b", "score": "0.7397873", "text": "public function getGender()\n {\n return $this->readOneof(17);\n }", "title": "" }, { "docid": "2b56bd1ea53d1a28289291e46eb9966e", "score": "0.7368779", "text": "public static function getCurrentUserGender(){\n if (!Logins::isLoggedIn()) return false;\n return $_SESSION['user']['user_gender'];\n }", "title": "" }, { "docid": "2439b4720588250592d2f1fd5e7dba49", "score": "0.7364074", "text": "function getGender($userid) {\n return NULL;\n }", "title": "" }, { "docid": "bc1985944a6f765d96dce2cfc43654e7", "score": "0.7322163", "text": "public function getGender()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "39a1928d7bae56259588ad8bd70c3215", "score": "0.73203766", "text": "function getGender($userid) {\r\n return NULL;\r\n }", "title": "" }, { "docid": "c10bf2fcf70281e32ba2e3f1ea720818", "score": "0.72868085", "text": "private function get_gender($val)\r\n {\r\n $gender = '';\r\n switch ($val) {\r\n case 'woman':\r\n case 'female':\r\n case 'girl':\r\n case 'ona':\r\n case 'onna':\r\n case 'onnanoko':\r\n case 'onanoko':\r\n case 'josei':\r\n $gender = '女';\r\n break;\r\n\r\n case 'man':\r\n case 'male';\r\n case 'boy':\r\n case 'oto':\r\n case 'otoko':\r\n case 'otokonoko':\r\n case 'dansei':\r\n $gender = '男';\r\n break;\r\n\r\n default:\r\n $gender = $val;\r\n break;\r\n }\r\n\r\n return $gender;\r\n }", "title": "" }, { "docid": "f10c400a161a93ca832de382698f26f6", "score": "0.7224394", "text": "public function getGenderName()\n{\nreturn $this-> gender-> gender_name;\n}", "title": "" }, { "docid": "dfbb3a4682aa4383d8645063de096076", "score": "0.7207992", "text": "function getGender($userid)\r\n\t{\r\n return NULL;\r\n }", "title": "" }, { "docid": "d2f13b5d9210809be7d98890f8efa82d", "score": "0.71254724", "text": "function getGender()\n {\n return array(\"male\", \"female\");\n }", "title": "" }, { "docid": "a365e6cfc199d27fc9d6580c354ca43d", "score": "0.71188533", "text": "function getGender($userid)\r\n {\r\n\t\tif(($rs = $this->getUserStmt->process($userid)) && ($rec = $rs->next()))\r\n\t \t{\r\n \t\treturn strtoupper( $rec['gender'] );\r\n\t \t}\r\n\t\treturn NULL;\r\n }", "title": "" }, { "docid": "581fd4ea4ead1eb412c114bbfbdd8f72", "score": "0.71166503", "text": "public function genderClass()\n\t{\n\t\treturn $this->is_male ? 'man' : 'woman';\n\t}", "title": "" }, { "docid": "cd78a26352de3bd96feb9735b90b6464", "score": "0.7064181", "text": "private function extractgender($a) {if ($a == \"1\") return $this->db_malegender; else return $this->db_femalegender;}", "title": "" }, { "docid": "b87227af0e47a23b9a5413fbdfa41865", "score": "0.69193226", "text": "public function getUserGender()\n {\n return array(self::USER_MALE=>'Male',self::USER_FEMALE=>'Female');\n }", "title": "" }, { "docid": "d2fb19132e0465523f1a5b65d358591d", "score": "0.68779546", "text": "public function hasGender(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "c5024fcc293ae449c47023dbbb0f11aa", "score": "0.67563474", "text": "public function getSex() {\n return $this->sex;\n }", "title": "" }, { "docid": "f85a56e2a2277930017450bb9c7453dd", "score": "0.6737685", "text": "public function getSexAttribute()\n {\n return ($this->attributes['sex'] == 'M') ? 'Male' : 'Female';\n }", "title": "" }, { "docid": "b897c72137317477979b15178b7e0e82", "score": "0.6734623", "text": "public function getSex()\n {\n return $this->sex;\n }", "title": "" }, { "docid": "b897c72137317477979b15178b7e0e82", "score": "0.6734623", "text": "public function getSex()\n {\n return $this->sex;\n }", "title": "" }, { "docid": "2523bfab50ae8dd518031304512fea99", "score": "0.6643696", "text": "public function getSex()\n\t\t{\n\t\t\t\treturn $this->sex;\n\t\t}", "title": "" }, { "docid": "fa15916d8ec683eb3c68ffabeb04fee9", "score": "0.66369545", "text": "public function getGenderID($gender) {\n if ($this->genderMap == []) {\n $sql = 'SELECT GenderID FROM Gender';\n $this->db->query($sql);\n foreach($this->db->getResultSet() as $result) {\n $this->genderMap[$result['GenderID']] = $result['GenderID'];\n }\n }\n return $this->genderMap[$gender];\n }", "title": "" }, { "docid": "7b9594474639439f97074b1f21aa8250", "score": "0.661158", "text": "public function getSex()\n\t{\n\t\treturn $this->sex;\n\t}", "title": "" }, { "docid": "c73b6e402f7cb5267ce0c8c1f72f8681", "score": "0.65929633", "text": "public function getSex(): string\n {\n return $this->sex;\n }", "title": "" }, { "docid": "dc2127448340c026bf4b22e22e7cf1b1", "score": "0.65647185", "text": "public function isGenderMale()\n {\n return $this->gender !== null ? $this->gender === self::GENDER_MALE : null;\n }", "title": "" }, { "docid": "0459617537c484453d8f0996901d6d5a", "score": "0.6548819", "text": "public function setGender($var)\n {\n GPBUtil::checkString($var, True);\n $this->gender = $var;\n }", "title": "" }, { "docid": "7a165bb58612b4861094b5cae69883b9", "score": "0.65191305", "text": "protected function gender($gender)\n {\n return $this->builder->where(compact('gender'));\n }", "title": "" }, { "docid": "c93774850b258ed5e86a4fe35d492767", "score": "0.65148723", "text": "public static function parse( string $gender ): ?string {\n\t\tswitch ( $gender ) {\n\t\t\tcase 'male':\n\t\t\t\treturn __( 'Male', [], getLoggedUserLocale() );\n\t\t\tcase 'female':\n\t\t\t\treturn __( 'Female', [], getLoggedUserLocale() );\n\t\t\tdefault:\n\t\t\t\treturn __( 'Unknown', [], getLoggedUserLocale() );\n\t\t}\n\t}", "title": "" }, { "docid": "f3ae078c9d45c301cac232b0af84025e", "score": "0.6461545", "text": "function getGenders() {\n return array(self::MALE => self::MALE,\n self::FEMALE => self::FEMALE);\n }", "title": "" }, { "docid": "887ac6df401acc87170eaaf5dec399ad", "score": "0.64605224", "text": "public function gender($value)\n {\n $this->setProperty('gender', $value);\n return $this;\n }", "title": "" }, { "docid": "543f5c5b003ba61c7f4dd39694344548", "score": "0.6457239", "text": "public static function identifySex($vk_sex): string\n {\n switch ($vk_sex) {\n case 1:\n return \"female\";\n case 2:\n return \"male\";\n default:\n return \"undefined\";\n }\n }", "title": "" }, { "docid": "2b6a37e03c535bc5ceaaecb01b9fbe5a", "score": "0.63790363", "text": "function get_playergender($iid)\n{\n\t$result = mysql_query(\"SELECT gender FROM players WHERE idplayers=\" .$iid)or die(mysql_error());\n\t$num=mysql_numrows($result);\n\t$r = mysql_fetch_array($result);\n\t\n\t// Get player's gender\n\t$gender=$r[\"gender\"];\n\t\n\t// return\n\treturn $gender;\n}", "title": "" }, { "docid": "a329a0cd162ece072eeedd1ababe413d", "score": "0.63406444", "text": "public function female_users_name()\n{\n for($i=0 ;$i<sizeof($this->users);$i++){\n $data2 = $this->users[$i];\n\n $gender=$data2['gender'];\n\nif($gender==1)\n{\necho \"name ==>> \" .$data2['name']. \"</br>\";\n}\n\n}\n}", "title": "" }, { "docid": "0020e72536cb260fe525ca893c56e53f", "score": "0.63365966", "text": "function translateSex($gen) {\n\t\tswitch ($gen) {\n\t\t\tcase 1: // Female\n\t\t\t\t$sex = 'Female';\n\t\t\t\treturn $sex;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2: // Male\n\t\t\t\t$sex = 'Male';\n\t\t\t\treturn $sex;\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\tdefault: \n\t\t\t\t$sex = 'Undefined';\n\t\t\t\treturn $sex;\n\t\t\t\tbreak;\n\t\t}\t\n\t}", "title": "" }, { "docid": "b8f49dfda3b89398e1c72ef9b73c4f75", "score": "0.6333341", "text": "public function show(Gender $gender)\n {\n //\n }", "title": "" }, { "docid": "e8bd624343b988854625d95c3f5fcfde", "score": "0.6318616", "text": "public function get_gender_error_message() {\n\n // if the gender is valid, don't return anything\n if( $this->valid_gender ) {\n return \"\";\n }\n\n $error_message = \"Please select a gender.\";\n\n return $error_message;\n\n }", "title": "" }, { "docid": "df3392e5e7e072ca1151233aae819e85", "score": "0.6311976", "text": "function checkGender($id)\n\t{\n\t\t$query = $this->db->get_where('user_profile', array('id' => $id));\n\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t$query = $query->row_array();\n\t\t\t\n\t\t\treturn $query['sex'];\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a215464dc36694294414bbad4241cd06", "score": "0.6258817", "text": "public function set_gender($_gender)\n {\n $this->_gender = $_gender;\n\n return $this;\n }", "title": "" }, { "docid": "2a4b81b2480d40d3e317a5ca45238d48", "score": "0.6253396", "text": "public function getAdyenGenderValueById($genderId)\n {\n if (isset(self::$genderMap[$genderId])) {\n return self::$genderMap[$genderId];\n }\n\n // If gender is not available in the map, fall back to self::UNKNOWN_VALUE\n return self::UNKNOWN_VALUE;\n }", "title": "" }, { "docid": "b407e7fb23f7addd9b23c4eade3c242e", "score": "0.62334085", "text": "function setGender($value)\n {\n global $warn;\n\n if (is_string($value) && ctype_digit($value))\n $value = intval($value);\n if (is_int($value) &&\n $value >= Person::MALE &&\n $value <= Person::UNKNOWN)\n {\n return parent::set('gender', $value);\n }\n else\n if (is_string($value))\n {\n $value = strtoupper($value);\n if ($value == 'M' || $value == 'MALE')\n return parent::set('gender', Person::MALE);\n else\n if ($value == 'F' || $value == 'FEMALE')\n return parent::set('gender', Person::FEMALE);\n if ($value == '?' || $value == 'UNKNOWN')\n return parent::set('gender', Person::UNKNOWN);\n }\n \n $warn .= \"<p>Person::setGender: \" . __LINE__ .\n \" invalid value '$value' for field 'gender'</p>\\n\";\n }", "title": "" }, { "docid": "66753b58605b2f54e9e85d5c2f21b8f5", "score": "0.62177694", "text": "function expandGender(string $gender): string\n{\n switch ($gender) {\n case 'F':\n $expanded = \"Female\";\n break;\n case 'M':\n $expanded = \"Male\";\n break;\n case 'O':\n $expanded = \"Other\";\n break;\n case 'T':\n $expanded = \"Transgender\";\n break;\n case 'X':\n $expanded = \"Not Disclosed\";\n break;\n case 'U':\n default:\n $expanded = \"Unknown\";\n break;\n }\n return $expanded;\n}", "title": "" }, { "docid": "472dd8b32150ec57fc8b7b7feabf36dc", "score": "0.62153584", "text": "public function getGender($conn){\n $query = \"SELECT count(*), gender FROM explicafeup.userr GROUP BY gender\";\n $result = pg_exec($conn, $query);\n return $result;\n }", "title": "" }, { "docid": "6c5373347fe023a99771b6bc8332777c", "score": "0.62109506", "text": "public function genderStats()\n {\n $userStats = cache('userStats');\n $lastModified = $this->fileReader->lastModified();\n\n if ($userStats && $lastModified === $userStats['lastModified']) {\n return $userStats['stats'];\n }\n $userStats = array(\n 'stats' => $this->getNonCachedGenderStats(),\n 'lastModified' => $lastModified\n );\n cache(['userStats' => $userStats]);\n\n return $userStats['stats'];\n }", "title": "" }, { "docid": "d9cda5c8b979414e1efe9b4c65813111", "score": "0.6173395", "text": "public static function getGenderList()\n {\n return [\n 'u' => UserInterface::GENDER_UNKNOWN,\n 'f' => UserInterface::GENDER_FEMALE,\n 'm' => UserInterface::GENDER_MALE,\n ];\n }", "title": "" }, { "docid": "56d0986b5d1a52cd39350146953e4a60", "score": "0.6162935", "text": "public function getGender($show =\"\"){\n\t\t\t $this->setRquery(\"SELECT pGender FROM amistiPersonal WHERE userID=?\",array($this->UID));\n\t\t\t $res = $this->getRquery(); \n\t\t\t \n\t\t\t \n\t\t\t if(!empty($res[0]['pGender'])){\n\t\t\t\t \n\t\t\t\t ?>\n\t\t\t \n\t\t\t <div class=\"pProfileICHeader\"> Gender:</div>\n \n <?php if($this->UID == UID){\n\t\t\t\t\t?>\n <div class=\"pProfileMenuShow\">...</div>\n\t\t\t\t<!--- menu -->\n\t\t\t\t<div class=\"pProfileMenu\">\n\t\t\t\t<li id=\"genderEdit\">Edit</li>\n\t\t\t\t<li id=\"genderDelete\">Delete</li>\n\t\t\t\t</div>\n <?php } ?>\n \n <div class=\"pProfileItem pGender\">\n\t\t\t\t <?php echo $res[0]['pGender']; ?>\n </div>\n \n\t\t\t\t <?php\n\t\t\t\t \n\t\t\t\t }else{\n\t\t\t\t\t if($this->UID == UID){\n\t\t\t\t\t\t if($show == true){\n\t\t\t ?>\n\t\t\n\t\t\t <div class=\"pProfileICHeader\"> Gender:</div>\n \n <div class=\"pProfileItem pProfileBack pGender\">\n \n <li>I am\n \n <input type=\"text\" id=\"genderType\" placeholder=\"Male, Female ...\" >\n \n </li>\n <div class=\"pAutoComplete\">\n <!-- <li>Richard</li>-->\n </div>\n <table>\n <tr><td class=\"pInputCon\">\n <input type=\"submit\" id=\"genderClear\" value=\"Cancel\"> \n \t <input type=\"submit\" id=\"genderSave\" value=\"Save\">\n </td></tr></table>\n \n </div>\n\t\t\t\n\t\t\t <?php\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t <div class=\"pProfileICHeader\"> Gender:</div> \n <div class=\"pProfileItem pGender \">\n <div class=\"addProfile\" id=\"genderAdd\"> Add gender</div>\n </div>\n <?php\t\n\t\t\t\t\t\t\t }\n\t\t\t }else{\n\t\t\t\t ?>\n \n\t\t\t <div class=\"pProfileICHeader\"> Gender:</div>\n <div class=\"pProfileItem pGender\">\n <?php echo $this->fName .\" \". $this->sName.\" has not updated gender information.\"?>\n </div>\n \n\t\t\t\t <?php\n\t\t\t\t }\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "58d9ef9e031eaedf5e40ed55cf7dfb32", "score": "0.6140886", "text": "public function getGender($id) {\n $this->db->query('SELECT genders.name AS name, genders.id as id\n FROM genders\n INNER JOIN users\n ON genders.id = users.gender\n WHERE users.id = :id \n ');\n $this->db->bind('id', $id);\n $row = $this->db->single();\n\n if ($row) {\n return $row;\n } else {\n exit('Something went wrong');\n }\n }", "title": "" }, { "docid": "50304e8bc70b8e4f9dd7ab6b974aaaeb", "score": "0.6119282", "text": "public function setGender($value)\n {\n $this->gender = $value;\n }", "title": "" }, { "docid": "ab9afe921a462b0bb2131aa0293074f8", "score": "0.60644543", "text": "protected function _checkGender()\n {\n try {\n $data = $this->getInfoInstance();\n if (($data->getAdditionalInformation(\"gender\")!==\"0\")\n && ($data->getAdditionalInformation(\"gender\")!==\"1\")) {\n return false;\n }\n } catch (Mage_Core_Exception $e) {\n $this->_getHelper()->logKlarnaException($e);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "0130f986fdabfc13c4d03d2d7f787784", "score": "0.60049975", "text": "function validateGender($gender) {\n // Checks a value had been entered \n\tif (empty($gender)) {\n\t\treturn \"Please select a gender\";\n\t}\n}", "title": "" }, { "docid": "1d3b21ba98ca214388dcc89675198e6d", "score": "0.59983367", "text": "public function gender()\n {\n return $this->belongsTo('App\\Gender', 'gender_id');\n }", "title": "" }, { "docid": "1731203d8455d2508b8a568443f7c397", "score": "0.59934324", "text": "public function setGender($gender)\n {\n $this->gender = $gender;\n }", "title": "" }, { "docid": "47306df55365275dfe502b8f684e52f1", "score": "0.59878993", "text": "public function setGender($value)\n {\n return $this->set('Gender', $value);\n }", "title": "" }, { "docid": "a652dfcbf4a22c9a2b1b472a189174cc", "score": "0.5972881", "text": "public static function getGender($db){\n $sql = $db->query('SELECT * FROM gender');\n if($sql->num_rows >0){\n while($result = $sql->fetch_assoc()){?>\n <option value=\"<?php echo $result['id']; ?>\"><?php echo $result['gender_name']; ?></option>\n <?php\n }\n }\n }", "title": "" }, { "docid": "ffc8ed3dc3cad2fc575cfb27f8d53861", "score": "0.59530276", "text": "public static function genders() : array\n {\n return self::distinct()->pluck('gender')->toArray();\n }", "title": "" }, { "docid": "f63a5e985981a02e6bf917ba7ee757d9", "score": "0.5931087", "text": "function genderId2GenderName($id) {\n if($id == 1) {\n return \"weiblich\";\n }\n \n return \"männlich\";\n}", "title": "" }, { "docid": "a3da922d0857e7c0ebdf63954702013f", "score": "0.5925789", "text": "public function getSex(): ?string\n {\n return $this->sex;\n }", "title": "" }, { "docid": "221794df7c6a27832f52530b168ce5d8", "score": "0.5903059", "text": "public function checkGender($gender) {\n if($gender==\"none\"){\n $this->form_validation->set_message('checkGender', 'Silahkan pilih {field} anda.');\n return false;\n } else{\n // User picked something.\n return true;\n }\n \n }", "title": "" }, { "docid": "d6e6237fc021326aa4f234b67dce7e2c", "score": "0.58946306", "text": "public static function matchGender($main, $second) {\n switch ($main->meet_gender) {\n case \"0\" :\n return 100;\n break;\n default:\n if($main == $second) { return 140; } else { return 80; }\n break;\n\n }\n }", "title": "" }, { "docid": "8e6a2fadedf1c0924184331cd32d5742", "score": "0.5875524", "text": "function setGender($gender)\n\t\t{\n\n\t\t\t$this->gender=$gender;\n\t\t}", "title": "" }, { "docid": "93def808a1759ae42e7c5775de622029", "score": "0.58728045", "text": "function html_gender($user=''){\n $html='';\n $gender_arr=array('male', 'female');\n \n foreach($gender_arr as $gender){\n if($user->get('gender')==$gender)\n $html.='\n <div class=\"radio-inline\">\n <label><input type=\"radio\" name=\"gender\" value=\"'.$gender.'\" checked=\"checked\"> '.ucwords($gender).'</label>\n </div>\n ';\n else\n $html.='\n <div class=\"radio-inline\">\n <label><input type=\"radio\" name=\"gender\" value=\"'.$gender.'\"> '.ucwords($gender).'</label>\n </div>\n ';\n }\n \n return $html;\n}", "title": "" }, { "docid": "b55646624f4c5c5be47e8e694fee85f2", "score": "0.5868804", "text": "private function getMaleName(int $yearOfBirth)\n {\n // get popular name from year\n return NamesMaleName::where('year_start', '<', $yearOfBirth)\n ->where('year_end', '>', $yearOfBirth)\n ->pluck('firstname');\n }", "title": "" }, { "docid": "91440fdf6a70d63d6b9f3b05aad9d16e", "score": "0.58679825", "text": "public function middleNameMale()\n {\n return static::randomElement(static::$middleNameMale);\n }", "title": "" }, { "docid": "f1ac96f36677354540c7c35235eea115", "score": "0.58641666", "text": "public function setGender($gender)\n\t{\n\t\t// {implementation code}\n\t}", "title": "" }, { "docid": "e92708c8d8540a4b4b0cbc83e3952e3a", "score": "0.58588797", "text": "public function setMaleLenghtFinalValue ()\n {\n\n \n $first = $this->checkFirstLetter();\n // $last = $this->checkLastLetter();\n $restPara = $this->checkFirstCharOfAllParagraphs();\n $maleLenght = $this->calculateMaleLenght();\n $value = $maleLenght * self::TAMANHO_LETRA_HORIZONTAL;\n $value -= self::ESPACO_ENTRE_LETRAS_HORIZONTAL;\n \n $value -= $first;\n $value += $restPara;\n //$value += self::ESPACO_MARGEM;\n $value = $value / 10;\n //return $this->hackFloatNumbers($value);\n \n return $value;\n \n }", "title": "" }, { "docid": "4d384809995831e9a7b7204af4253bf7", "score": "0.5852532", "text": "public function gender()\n {\n return $this->belongsTo('App\\Models\\Gender');\n }", "title": "" }, { "docid": "9b3ea8d527b409ac4c73bcb23141ee75", "score": "0.5840469", "text": "function WhoIs($gender, $age)\n {\n if($age >= 18 && $gender == \"Homme\"){\n return \"Vous êtes un $gender et vous êtes majeur\";\n }\n elseif($age < 18 && $gender == \"Homme\"){\n return \"Vous êtes un $gender et vous êtes mineur\";\n }\n elseif($age >= 18 && $gender == \"Femme\"){\n return \"Vous êtes une $gender et vous êtes majeure\";\n }\n else{\n return \"Vous êtes une $gender et vous êtes mineure\";\n }\n }", "title": "" }, { "docid": "2081a6943490ce3d719cdfd220ffc2a5", "score": "0.58391726", "text": "public function setStudentGender($student_gender){\n\t $this->student_gender = $student_gender;\n\t }", "title": "" }, { "docid": "2a74ad71170d4a98cd139ffde91bef2f", "score": "0.5834961", "text": "public function getGenderOptions() {\n\t\treturn array(\n\t\t\tself::MALE => 'Male',\n\t\t\tself::FEMALE => 'Female',\n\t\t);\n\t}", "title": "" }, { "docid": "8eeb001b2cc28aa919a1265081b0608b", "score": "0.583425", "text": "public function isGenderFemale()\n {\n return $this->gender !== null ? $this->gender === self::GENDER_FEMALE : null;\n }", "title": "" } ]
b715b3671e528f64e88735d132403ffd
Create a new response instance.
[ { "docid": "322b6ca2a2ba5c02b308c6eb7e4299c9", "score": "0.0", "text": "public function make($content = '', $status = 200, array $headers = array());", "title": "" } ]
[ { "docid": "88d52ff4974d5baf16755323b9cfc12a", "score": "0.8274958", "text": "public static function create_response() {\n\t\t$response = new self();\n\t\t$response->setRectype(self::RECORDTYPE_RESPONSE);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "70a9414ea2151bc1a0f1108d2a9979ae", "score": "0.8189119", "text": "public function newResponse()\n {\n return new Response();\n }", "title": "" }, { "docid": "ba9b75ac08ca1547ec99fbded4700915", "score": "0.8146066", "text": "public function newResponse()\n {\n $headers = new Headers(new HeaderFactory);\n $cookies = new Cookies(new CookieFactory);\n return new Response($headers, $cookies);\n }", "title": "" }, { "docid": "ffe07cfa5bbda7a9b6de049bbcff7bbf", "score": "0.79340416", "text": "public function newResponse(): Response;", "title": "" }, { "docid": "64b5b3d4dc8365d55aa7677040864ed0", "score": "0.7600472", "text": "public function newResponse()\n {\n return Container::getInstance()->newResponse();\n }", "title": "" }, { "docid": "83909f3919e7cbd0f63f7d0a65ff2f79", "score": "0.7592602", "text": "public function getResponse()\n {\n return new $this->response;\n }", "title": "" }, { "docid": "88ba96b229d7ad8cd05cf9f64272ca00", "score": "0.7536021", "text": "protected function _createResponse()\n\t{\n\t\t$this->server = new \\Zend\\Diactoros\\Response();\n\t}", "title": "" }, { "docid": "b5c9434e63c2500a1ddb847ad3487d6c", "score": "0.75034404", "text": "protected function build_response() {\n return new Response();\n }", "title": "" }, { "docid": "d45cc2e32bd214389c3c10e69464e697", "score": "0.74925745", "text": "protected function __construct(){\n $this->response = new Response();\n }", "title": "" }, { "docid": "87e2dd56119d046e41e4a3858e31388a", "score": "0.74649376", "text": "public function newResponse(): Response\n\t{\n\t\treturn new \\Laminas\\Diactoros\\Response();\n\t}", "title": "" }, { "docid": "39ab4574eac6daf31241584695c6eedc", "score": "0.7423958", "text": "protected function initResponse() {\n $this->response = new Response();\n $this->response->headers->set('Content-Type', 'application/json');\n $this->response_data = array();\n }", "title": "" }, { "docid": "661c4b1bb9f39c1521a4890110d4e584", "score": "0.72210103", "text": "public function getResponse(): Response\n {\n return new Response($this->response);\n }", "title": "" }, { "docid": "d95aa3c0238e17bcf1617486d1df9b89", "score": "0.71944165", "text": "protected function createResponse()\n\t{\n\t\treturn new ECashCra_PacketResponse_UpdateResponse();\n\t}", "title": "" }, { "docid": "10d0b3f2ecd955e6fca26c3e3dc83399", "score": "0.71001595", "text": "public static function create() { \n $Response = self::setConcreteInstance(new AblePolecat_Stub_Response());\n $ArgsList = self::unmarshallArgsList(__FUNCTION__, func_get_args());\n return self::getConcreteInstance();\n }", "title": "" }, { "docid": "94632c31e75af3c9cdac513db40b6dff", "score": "0.7070166", "text": "private function createResponse($response)\n {\n return HttpResponse::create(new MemoryInputStream($response));\n }", "title": "" }, { "docid": "67fb67e65771a03fb3d0933e6356095d", "score": "0.7045364", "text": "public function create(): ResponseInterface\n {\n }", "title": "" }, { "docid": "b8e3e9b34a2ff12d5fd81c3e3b32f1d2", "score": "0.7014579", "text": "public function getResponse(){\n\t\t\treturn new Response();\n\t\t}", "title": "" }, { "docid": "135524a005633821c86b7f8f092ba23a", "score": "0.69973886", "text": "public static function getInstance() {\n if (self::$responseInstance == false) {\n self::$responseInstance = new Response();\n }\n\n return self::$responseInstance;\n }", "title": "" }, { "docid": "83024d269d50b664da95de948ff4d3d9", "score": "0.6955881", "text": "public static function create( ResponseInterface $response ) {\n\t\treturn new self( $response );\n\t}", "title": "" }, { "docid": "633c498c16976da08c74c2e408aef90b", "score": "0.69177306", "text": "public function createResponse( $result ) : ResponseInterface;", "title": "" }, { "docid": "d49a0195ea0ab02b03e899d9e01cd05f", "score": "0.69026875", "text": "public static function createRequestResponse():void {\n\t\tself::$request = RequestFactory::create(\n\t\t\tself::$serverInfo,\n\t\t\tself::$input->getStream()\n\t\t);\n\t\tResponseFactory::registerResponseClass(\n\t\t\tPageResponse::class,\n\t\t\t\"text/html\"\n\t\t);\n\t\tResponseFactory::registerResponseClass(\n\t\t\tApiResponse::class,\n\t\t\t\"application/json\",\n\t\t\t\"application/xml\"\n\t\t);\n\t\tself::$response = ResponseFactory::create(self::$request);\n\t}", "title": "" }, { "docid": "9165eaf46521f0ceaca9f8e3cd1011be", "score": "0.6894323", "text": "public static function create(): AlexaResponseBuilder\n {\n return new self();\n }", "title": "" }, { "docid": "3bd77fd009c16f718aead2e4f074cfbb", "score": "0.6854942", "text": "public function __construct($response) {\n $this->response = $response;\n }", "title": "" }, { "docid": "b82da9844cf8096c27d3ac288529df3f", "score": "0.6839939", "text": "public function getResponse()\n {\n if(!isset($this->response)){\n $responseClass = $this->responseClass;\n $this->response = new $responseClass();\n }\n return $this->response;\n }", "title": "" }, { "docid": "ce1fdfb6cbdcac2163a3a14ed842c3b6", "score": "0.68074983", "text": "protected function _response($response) {\n\t\treturn new Simples_Response($response, $this->options()) ;\n\t}", "title": "" }, { "docid": "d040b1a7f1616bb3ee826bd0ad2cb036", "score": "0.67712796", "text": "public function __construct(Response $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "d040b1a7f1616bb3ee826bd0ad2cb036", "score": "0.67712796", "text": "public function __construct(Response $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "d040b1a7f1616bb3ee826bd0ad2cb036", "score": "0.67712796", "text": "public function __construct(Response $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "997f0a663c30a1703bbb929e7377adfb", "score": "0.67353386", "text": "public function create()\n {\n return new HttpResponseHandler($this->mllpTransport);\n }", "title": "" }, { "docid": "1f539583b59ce93756ca83e89dbfb7a8", "score": "0.6725655", "text": "private function getResponse()\n {\n\n $response = new Response();\n $response->setStatusCode(Response::STATUS_CODE_200);\n $response->getHeaders()->addHeaders([\n 'Content-Type' => $this->getContentType(),\n //'Content-Type' => \"octet/stream\",\n 'Accept-Ranges' => 'bytes',\n 'Transfer-Encoding' => 'chunked',\n //\"Cache-Control\" => \"no-cache\",\n //'Cache-Control' => 'max-age=2592000, public',\n //\"Expires\" => gmdate('D, d M Y H:i:s', time()+2592000) . ' GMT',\n //\"Last-Modified\" => gmdate('D, d M Y H:i:s', strtotime(\"today\")) . ' GMT',\n //'Content-Length' => 2147483647,\n //'Content-Length' => $length = $end - $start,\n //'Content-Range' => sprintf(\"bytes %d-%d/%d\", $start, $end - 1, $this->getSize()),\n ]);\n //$response->setContent($this->getContent($start, $length));\n return $response;\n }", "title": "" }, { "docid": "f80b2a95371593f03ed37705431f6db2", "score": "0.67047864", "text": "public function create(): Response\n {\n //\n }", "title": "" }, { "docid": "3c28d675c9da47fbb0f060676a71346a", "score": "0.6676938", "text": "protected function _response() {\n return new JsonRpcResponse();\n }", "title": "" }, { "docid": "7ca53bfe0334b980fa0b15bf7ac67b1a", "score": "0.6674233", "text": "public function __construct($response){\n\t\t$this->response = $response;\n\t}", "title": "" }, { "docid": "6b749848b778b8b23ac749fcd64c6f33", "score": "0.66725", "text": "public function __construct($response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "6b749848b778b8b23ac749fcd64c6f33", "score": "0.66725", "text": "public function __construct($response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "6b749848b778b8b23ac749fcd64c6f33", "score": "0.66725", "text": "public function __construct($response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "9032ca448d831f98e1b107c296595c28", "score": "0.66482806", "text": "public static function createHttpResponse(): HttpResponse\n {\n return new HttpResponse();\n }", "title": "" }, { "docid": "43204c2587adde9b32b87d3a71e2d970", "score": "0.66273355", "text": "public function __construct($response)\r\n\t{\r\n\t\t$this->response = $response;\r\n\t}", "title": "" }, { "docid": "8cb19c05bb990972ec5a662caba6580c", "score": "0.66215724", "text": "public static function create($response): self\n {\n $exception = new self;\n $exception->statusCode = $response->statusCode;\n $exception->statusName = $response->statusName;\n $exception->errorId = $response->errorId;\n $exception->message = $response->simpleMessage;\n $exception->detailedMessage = $response->detailedMessage;\n return $exception;\n }", "title": "" }, { "docid": "905b904cd9a1f1a5dbe105f96634c2aa", "score": "0.6569902", "text": "protected function createResponse($model = array()) {\n\t\treturn new Response(\n\t\t\t\tjson_encode($model),\n\t\t\t\t200,\n\t\t\t\tarray(\n\t\t\t\t\t\t'Content-Type', 'application/json'\n\t\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "25ad39b2969b5881a0b1f73d5dab87ab", "score": "0.65175366", "text": "public function __construct(Response $res)\n {\n $this->_response = $res;\n }", "title": "" }, { "docid": "a14c0e0013437a2bf54554a2b8cc6991", "score": "0.64368224", "text": "public static function make(ResponseInterface $response)\n {\n return new self($response);\n }", "title": "" }, { "docid": "536710c64c60a45e312f205c49809b68", "score": "0.64001095", "text": "function makeResponse($response)\n {\n $result = current(Util::toArray($response));\n\n $response = new Response([\n 'raw_body' => $result,\n\n ## get response message as array\n 'default_expected' => function($rawBody) use ($result) {\n return $result;\n }\n ]);\n\n // handle exceptions\n if (array_key_exists('errorCode', $result) && $result['errorCode'] !== -1) {\n ## there is error\n $response->setException(new \\Exception($result['errorText'], $result['errorCode']));\n }\n\n $method = ucfirst($this->_lastMethod->getMethod());\n $method = '_validate'.$method;\n if (method_exists($this, $method))\n call_user_func([$this, $method], $response);\n\n return $response;\n }", "title": "" }, { "docid": "23773478e663dfb6e6e21b262452729a", "score": "0.6397146", "text": "protected function getResponseObject(): Response\n {\n return $this->container->get('response');\n }", "title": "" }, { "docid": "65144f8f69c97dc36722ef8421bfe1c1", "score": "0.6397105", "text": "public function setResponse(Response $response);", "title": "" }, { "docid": "602329e3d03a562a967a2943b99db7ff", "score": "0.63952184", "text": "public static function new($data = null, $status = 200)\n {\n return new Response($data, $status);\n }", "title": "" }, { "docid": "4926f68edad15b2375124fe77c6f1804", "score": "0.6386506", "text": "public function __construct(Response $response)\n {\n parent::__construct($this->prepareMessage($response), $response->status());\n\n $this->response = $response;\n }", "title": "" }, { "docid": "3dd36ac3a4a3915713d98b85a2eb3246", "score": "0.6384103", "text": "function __construct(string $response)\n {\n preg_match_all(self::HEADERS_PATTERN, $response, $matches);\n $headersString = array_pop($matches[0]);\n $headers = explode(\"\\r\\n\", str_replace(\"\\r\\n\\r\\n\", '', $headersString));\n\n // remove headers from the response body\n $body = str_replace($headersString, '', $response);\n\n if (!empty($body)) {\n $this->body = json_decode($body, true);\n } else {\n $this->body = [];\n }\n\n // extract the version and status from the first header\n $version_and_status = array_shift($headers);\n preg_match(self::VERSION_HEADER_PATTERN, $version_and_status, $matches);\n $this->status = (int)$matches[2];\n }", "title": "" }, { "docid": "cb3918c95dad0061b0a7d4f82799e9f7", "score": "0.63829553", "text": "public function response()\n {\n $this->response->setData($this->bodyArr);\n return $this->response;\n }", "title": "" }, { "docid": "8a045ea393c9a23c08f67dce9319d053", "score": "0.6372545", "text": "public static function createRestApiResponse(): RestApiResponse\n {\n return new RestApiResponse();\n }", "title": "" }, { "docid": "a68fd34723e393c8c4b91b58a4d80b54", "score": "0.6359398", "text": "public function __construct(ResponseFactory $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "18db6b8fc8c2540325d9c2a8cb3ef345", "score": "0.63363117", "text": "public function testConstructor()\n {\n $body = 'Some Body';\n $code = 201;\n $headers = array('Construct' => 'Header');\n $response = new Response($body, $code, $headers);\n $this->assertEquals($body, $response->getBody());\n $this->assertEquals($code, $response->getStatusCode());\n $this->assertEquals(array('Construct: Header'), $response->getHeaders());\n }", "title": "" }, { "docid": "ccaf8ee445e36c7722550e06273cf8e2", "score": "0.63115996", "text": "public function createContext()\n {\n return new LibResponseContext($this);\n\n }", "title": "" }, { "docid": "3b8aa2a2ad42fb79621a79fcdf42b378", "score": "0.6297897", "text": "public function __construct(array $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "fc52d5ef8f7558424feffe7d78bffe27", "score": "0.62822974", "text": "public function getNewResponse()\n {\n $object = $this->createNewObject();\n $form = $this->createNewForm($object);\n\n return $this->getRenderedResponse($this->getNewViewPath(), $this->getNewViewParameters([\n $this->getObjectSingular() => $object,\n 'form' => $form->createView(),\n ]));\n }", "title": "" }, { "docid": "089f315f94c9f76f7b144d709b598dd2", "score": "0.6280332", "text": "public function __construct($response = null)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "e98fe1e5950ffa87030039fdc1dcb4b9", "score": "0.62765115", "text": "public function createJsonDataResponse() {\n\t\treturn new Response($this->createJsonData());\n\t}", "title": "" }, { "docid": "9f47e998534217ada3d270a65015bd04", "score": "0.62497205", "text": "public function makeResponse($call)\n {\n return new Response(http_response_code(), [], $call);\n }", "title": "" }, { "docid": "66380ed684b4c265afa2f32adc9cc6d5", "score": "0.6241073", "text": "public function getResponse()\n {\n return new Response([\n 'reason' => $this->getReason(),\n 'message' => $this->getMessage(),\n 'code' => $this->getCode(),\n 'trace' => $this->getTrace(),\n ], $this->code);\n }", "title": "" }, { "docid": "6db2daedc8363bbeea685c5e7958ccd4", "score": "0.6236887", "text": "public static function fromApiResponse(Response $response)\n {\n return new static($response->getBody()->getContents(), $response->getHeader('Content-Length')[0]);\n }", "title": "" }, { "docid": "116e95f9854c6b58833ec372dbb733c8", "score": "0.6229901", "text": "function __construct($response) \n {\n $pattern = '#HTTP/\\d\\.\\d.*?$.*?\\r\\n\\r\\n#ims';\n preg_match_all($pattern, $response, $matches);\n $headers = split(\"\\r\\n\", str_replace(\"\\r\\n\\r\\n\", '', array_pop($matches[0])));\n \n # Extract the version and status from the first header\n $version_and_status = array_shift($headers);\n preg_match('#HTTP/(\\d\\.\\d)\\s(\\d\\d\\d)\\s(.*)#', $version_and_status, $matches);\n $this->headers['Http-Version'] = $matches[1];\n $this->headers['Status-Code'] = $matches[2];\n $this->headers['Status'] = $matches[2].' '.$matches[3];\n \n # Convert headers into an associative array\n foreach ($headers as $header) {\n preg_match('#(.*?)\\:\\s(.*)#', $header, $matches);\n $this->headers[$matches[1]] = $matches[2];\n }\n \n # Remove the headers from the response body\n $this->body = preg_replace($pattern, '', $response);\n }", "title": "" }, { "docid": "d8d80cf7af762710883f0bbd9caee127", "score": "0.6223954", "text": "function &_createPage($response) {\r\n return new SimplePage($response);\r\n }", "title": "" }, { "docid": "143464daf2dbe66d5be6825b326eebba", "score": "0.6223714", "text": "public function __construct()\n\t{\n\t\t$this->response = [];\n\t}", "title": "" }, { "docid": "66cda75f616506b92a6fb17184b4a606", "score": "0.6216329", "text": "static public function get_instance()\n\t{\n\t\tif (self::$instance == NULL)\n\t\t{\n\t\t\tself::$instance = new CmsResponse();\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "240c551e93028207c896356cec852ca2", "score": "0.62009054", "text": "function response($body = '') {\n return new Response($body);\n}", "title": "" }, { "docid": "5a28537fabc27399da07f05025eea766", "score": "0.6199385", "text": "private function createResponseMock()\n {\n return $this->getMock('Http\\Adapter\\Message\\ResponseInterface');\n }", "title": "" }, { "docid": "d66929b1c9fe27ae22dabce9d93d72b3", "score": "0.618554", "text": "public function make($response);", "title": "" }, { "docid": "ce474fa559d02a4ec421d826b4ecd915", "score": "0.6183954", "text": "private function createResponseMock()\n {\n return $this->getMock('Ivory\\HttpAdapter\\Message\\ResponseInterface');\n }", "title": "" }, { "docid": "74f38d23f797ae4f78765c34efcb691e", "score": "0.6170458", "text": "public function response($response)\n {\n $responseObj = new EBSCOResponse($response);\n return $responseObj;\n }", "title": "" }, { "docid": "9ca5b932984fdf1ee17f325c9a71dec9", "score": "0.6164065", "text": "public function getResponse()\n {\n if (!$this->response) {\n $this->response = new Http\\Response();\n }\n return $this->response;\n }", "title": "" }, { "docid": "1ba9c520d2629c12190d324aed5ac755", "score": "0.6157929", "text": "public function __construct(string $responseContent = self::RESPONSE_CONTENT)\n {\n $this->responseContent = $responseContent;\n }", "title": "" }, { "docid": "2edfa43246fae4bb9fc7d633f8885a5f", "score": "0.6156107", "text": "protected function createResponseObject()\n {\n return new RegisterUserResult();\n }", "title": "" }, { "docid": "444e3e000d1c2b4e8adc8e662296da0d", "score": "0.6150994", "text": "public static function getInstance() {\r\n\t\tif (self::$proxy)\r\n\t\t\treturn self::$proxy;\r\n\t\tif (!self::$inst) {\r\n\t\t\tself::$inst = factory::get('response_'.request::getResponseName());\r\n\t\t\tself::$inst->setContentType(request::get('out'));\r\n\t\t}\r\n\t\treturn self::$inst;\r\n\t}", "title": "" }, { "docid": "8d2221547db3286e08b9645ff3ba9785", "score": "0.6144646", "text": "public function __construct(Response $guzzleResponse)\n {\n // Save the status code\n $this->statusCode = $guzzleResponse->getStatusCode();\n\n // Save the response contents\n $this->body = $guzzleResponse->getBody()->getContents();\n }", "title": "" }, { "docid": "ae99be84bae0c4e8b0894301b5035427", "score": "0.6142468", "text": "public function create() {\n\t\t\n\t\t/* HTML View Response */\n\t\treturn response()->view($this->viewBase . '.' . __FUNCTION__, ['page' => $this->page]);\n\t\t/* HTML View Response */\n\t}", "title": "" }, { "docid": "81069a1d0f2f941685bc356ec4e3cccd", "score": "0.6140988", "text": "public function __construct(protected ClientResponse $response)\n {\n }", "title": "" }, { "docid": "630d4e2a99dc8bfc1825369ad155b631", "score": "0.6137524", "text": "public function create()\n\t\t{\n\t\t\treturn $this->crud->create()->response;\n\t\t}", "title": "" }, { "docid": "0857d717aa29ef00cc3c5a222a1769b1", "score": "0.61361814", "text": "public function create()\n {\n $data = [];\n return Response::json($data,Res::HTTP_OK);\n }", "title": "" }, { "docid": "03c7c08b8b7e02942fa3094d91590a64", "score": "0.61336607", "text": "public static function createFromResponse(Response $response): ResponseFile\n {\n if (!$response->hasHeader('Content-Type')) {\n throw new ResponseException('Property item not set');\n }\n\n return new static($response);\n }", "title": "" }, { "docid": "b99e52a61370eb3684e959a1a552995d", "score": "0.6124146", "text": "public function __construct()\n {\n parent::__construct();\n $this->response->type('application/json; charset=UTF-8');\n }", "title": "" }, { "docid": "b99e52a61370eb3684e959a1a552995d", "score": "0.6124146", "text": "public function __construct()\n {\n parent::__construct();\n $this->response->type('application/json; charset=UTF-8');\n }", "title": "" }, { "docid": "b99e52a61370eb3684e959a1a552995d", "score": "0.6124146", "text": "public function __construct()\n {\n parent::__construct();\n $this->response->type('application/json; charset=UTF-8');\n }", "title": "" }, { "docid": "b99e52a61370eb3684e959a1a552995d", "score": "0.6124146", "text": "public function __construct()\n {\n parent::__construct();\n $this->response->type('application/json; charset=UTF-8');\n }", "title": "" }, { "docid": "5fee81f3706195a3a9a5cb62775b3627", "score": "0.612126", "text": "private function setResponse(\\stdClass $response)\n {\n $this->response = $response;\n\n return $this;\n }", "title": "" }, { "docid": "03b95b749bf669dc978f2564f9074a9a", "score": "0.6112256", "text": "public function create()\n {\n // Create Response Model\n $response = new ResponseModel();\n\n // return response\n $response->setData(collect($this->model->getFillable()));\n $response->setMessage($this->getTrans('create', 'successful'));\n return SmartResponse::response($response);\n }", "title": "" }, { "docid": "2aa0e567b24fbed458fd38c015ef61ae", "score": "0.61051726", "text": "public function setResponse($response)\n\t{\n\t\t$this->response = $response;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3784ac117704f3eedc7ab28966871229", "score": "0.61041486", "text": "public function withResponse(string $responseCls){\n $bits = preg_split('#\\.#',$responseCls,null,PREG_SPLIT_NO_EMPTY);\n\n $requestedCls = \"App\\\\Http\\\\Response\\\\\".implode(\"\\\\\",$bits);\n\n return (new $requestedCls);\n }", "title": "" }, { "docid": "b8c6a564f96892c79db4773847732704", "score": "0.61017895", "text": "public function __construct($response)\n {\n $this->raw = $response;\n $this->hash = $response;\n }", "title": "" }, { "docid": "f966128cd5bbedd354b8c1d465385d64", "score": "0.6087308", "text": "public function __construct($response)\n {\n $this->responseAsDom = new DOMDocument();\n $this->createdAt = time();\n\n try {\n if ('' == $response) {\n throw new EmptyResponseException();\n }\n\n if (preg_match('/<title>401 Unauthorized<\\/title>/', $response) == 1) {\n throw new UnauthorizedAccessException();\n }\n\n try {\n $this->responseAsDom->loadXML($response);\n } catch (Exception $exception) {\n throw new CouldNotLoadResponseXMLException($exception->getMessage());\n }\n\n if (empty($this->responseAsDom)) {\n throw new EmptyResponseException();\n }\n\n if ($this->responseAsDom->getElementsByTagName('status')->length == 0) {\n throw new MissingResponseStatusException($this->getFaultMessage());\n }\n\n if ($this->responseAsDom->getElementsByTagName('returnCode')->length == 0) {\n throw new MissingResponseReturnCodeException($this->getFaultMessage());\n }\n } catch (Exception $exception) {\n $this->setStatus('ERROR');\n $this->setReturnCode($exception->getMessage());\n $this->exception = $exception;\n\n return;\n }\n\n $this->setStatus($this->responseAsDom->getElementsByTagName('status')->item(0)->nodeValue);\n $this->setReturnCode($this->responseAsDom->getElementsByTagName('returnCode')->item(0)->nodeValue);\n }", "title": "" }, { "docid": "b8e1b5a8fbcbd60f71415a8b96aab2ce", "score": "0.60830396", "text": "public function createResponse($data)\n {\n return $this->response = new CreateInventoryItemResponse($this, $data);\n }", "title": "" }, { "docid": "d0e3b3a9507fbb6642d94a7e49845af6", "score": "0.60798514", "text": "protected function responseFactory(): ResponseFactory {\n return $this->responseFactory ?: new ResponseFactory();\n }", "title": "" }, { "docid": "fb956e5755445bb50aec0db3475b0cd3", "score": "0.6074658", "text": "public function create ()\n {\n $response = AuthUsersBss::create( $this->request );\n if ( is_array( $response ) ) {\n $this->response->_id = $response['id'];\n $this->response->element = $response;\n } else {\n $this->response->exception = $response;\n }\n }", "title": "" }, { "docid": "78ab18a9e09a8bfbb8c605bf31e1f2ff", "score": "0.60543805", "text": "public function createResponse($data, int $status): ResponseInterface;", "title": "" }, { "docid": "f9eb5b47690b06025935413613cbdb5b", "score": "0.6050649", "text": "public function __construct(array $response)\n {\n if (isset($response['code'])) {\n $this->http_code = $response['code'];\n }\n\n if (isset($response['data'])) {\n $this->data = $response['data'];\n }\n\n if (isset($response['headers']) && is_array($response['headers'])) {\n foreach ($response['headers'] as $header => $value) {\n if (is_int($header)) {\n header($value);\n } elseif (isset($value)) {\n header($header . ': ' . $value);\n }\n }\n }\n }", "title": "" }, { "docid": "96d0023114aefd54f27d81c9d7058ed3", "score": "0.60473794", "text": "public function created()\n {\n $this->status(201);\n\n $this->json['success'] = trans('responses.created');\n\n return $this;\n }", "title": "" }, { "docid": "3cef3667d8b5d5f76e785fbdf8fd96d7", "score": "0.60454285", "text": "public function setResponseStructure()\n {\n $this->response = [\n \"csid\" => $this->csid,\n \"sid\" => '',\n \"sequence\" => $this->sequence,\n \"question\" => [\n \"name\" => 'answer' . $this->sequence,\n \"text\" => \"What can I do for you?\",\n \"audioProperties\" => [\n \"voice\" => $this->session->get('defaultVoice'),\n ],\n \"audioResponse\" => [\n 'noInputTimeout' => 8000,\n 'completeTimeout' => 4000\n ]\n ]\n ];\n }", "title": "" }, { "docid": "714d4cc74b6cad86e846ecb54bcc9355", "score": "0.60420233", "text": "abstract protected function _response();", "title": "" }, { "docid": "d7e3a54d2a24dbfcb4192d3f3cf3450b", "score": "0.6031267", "text": "public function create()\n {\n return \\Response::json('Not Implemented', 501);\n }", "title": "" }, { "docid": "17cab111af52e53ffd86f00b5b4454f4", "score": "0.5996018", "text": "public function create() {\n return $this->respond(['key' => '', 'value' => '']);\n }", "title": "" }, { "docid": "76e3dd15f1de1f45450a48930659f783", "score": "0.5992779", "text": "public static function create(int $code = self::STATUS_OK, string $reasonPhrase = ''): ResponseInterface\n {\n $response = new self();\n return $response->withStatus($code, $reasonPhrase);\n }", "title": "" }, { "docid": "06492e33257c573d804c27113e30abb2", "score": "0.5992272", "text": "public function __construct()\n {\n $this->responder = new MessagingResponse();\n }", "title": "" } ]
09d06dda28b4641e82545ebdf45795fb
Show Instant webview code from a given user
[ { "docid": "16694a7d379a7d4b630617a196e2c3cf", "score": "0.58327687", "text": "public function userInstantViewAction($username,$instant_title)\n {\n return $this->userInstantWebviewAction($username,$instant_title,false);\n }", "title": "" } ]
[ { "docid": "c9704d1362e9c1274b10b1ef43c56f06", "score": "0.55590445", "text": "public function userInstantWebviewAction($username,$instant_title,$webview = true)\n {\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('CosaInstantUserBundle:User')->findOneBy(array('twitter_username'=>$username));\n if (!$user) {\n throw $this->createNotFoundException('This user does not exist');\n }\n $instant = $em->getRepository('CosaInstantTimelineBundle:Instant')->findOneBy(array('user'=>$user->getId(),'url_title'=>$instant_title));\n if (!$instant) {\n throw $this->createNotFoundException('This instant does not exist');\n }\n $instant->setNbViews($instant->getNbViews()+1);\n $instant->setLastView(new \\Datetime());\n $instantWithTweets = $em->getRepository('CosaInstantTimelineBundle:Instant')->getList($instant->getId(),0,100);\n $tweets = Array();\n if(count($instantWithTweets))\n $tweets = $instantWithTweets[0]->getTweets();\n $twittos = $em->getRepository('CosaInstantTimelineBundle:Twittos')->getComplete($instant->getId());\n $em->persist($instant);\n $em->flush();\n return $this->render('CosaInstantTimelineBundle:Instant:userInstantWebview.html.twig', array(\n 'instant' => $instant,\n 'tweets' => $tweets,\n 'twittos' => $twittos,\n 'off' => 0,\n 'nb' => 100,\n 'webview' => $webview,\n ));\n }", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.55077624", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.55077624", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.55077624", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.55077624", "text": "public function show();", "title": "" }, { "docid": "895b24edfdd41e29e9fcab3afb50741c", "score": "0.547473", "text": "function page_sitepreview() {\r\n\t\tglobal $admin_lang;\r\n\t\t\r\n\t\t$out = '<h3>' . $admin_lang['sitepreview'].'</h3><hr /><iframe src=\"index.php\" class=\"sitepreview\"></iframe>';\r\n\t\treturn $out;\r\n\t}", "title": "" }, { "docid": "dc4013d82afe7e80e070b4df0cecb20f", "score": "0.5410865", "text": "public function showMeHtmlPageInBrowser() {\n\n $html_data = $this->getSession()->getDriver()->getContent();\n $file_and_path = '/tmp/behat_page.html';\n file_put_contents($file_and_path, $html_data);\n\n if (PHP_OS === \"Darwin\" && PHP_SAPI === \"cli\") {\n exec('open -a \"Safari.app\" ' . $file_and_path);\n };\n }", "title": "" }, { "docid": "1348edf2617853e4c778e1300650a155", "score": "0.5372372", "text": "function showView()\n\t{\n\t\techo '<a href=\"https://twitter.com/share?url='. urlencode(\"http://t3kno.dewpixel.net/view.php?s=\".$this->ytcode) .'&amp;text=This song rocks you gotta hear this!\" \n\t\t\tclass=\"twitter-share-button\" style=\"float:right;\">Tweet</a> <br />' .\n\t\t $this->title . ' by <a href=\"index.php?topof=new&artist=' . $this->artist . '\">' . $this->artist . '</a><br />\n\t\t\tGenre: <a href=\"index.php?topof=new&genre=' . strtolower($this->genre) .'\">' . $this->genre . '</a><br />\n\t\t\tUploaded By: '.$this->user .'<br />\n\t\t\tDownload: <u>Amazon</u> <u>Apple</u> <br />\n\t\t\t';\n\n\t}", "title": "" }, { "docid": "fa196ab1baa7c9da46c321dbf3a86cb7", "score": "0.53689665", "text": "public function display() {\n\t\techo '<iframe src=\"http://norulesweb.com/contact/\" width=\"800\" height=\"400\"></iframe>';\n\t}", "title": "" }, { "docid": "40e401a75b9e7e10388d4e62eb1fdd9c", "score": "0.53328806", "text": "function _renren_user_login_receiver() {\n return '<script src=\"http://static.connect.renren.com/js/v1.0/XdCommReceiver.jsp\" type=\"text/javascript\"></script>';\n}", "title": "" }, { "docid": "fa130bff8593023705a051ddf8174370", "score": "0.5294359", "text": "function vodProviderBrowserApp() \n{\n\t// Replace the actual connect data before placing on github\n\tDoctrine_Manager::getInstance()->bindComponent('TableName', 'ConnectionName');\n\t$conn = Doctrine_Manager::connection();\n\t//////////////////////////\n\t// Setup the Browser Applet\n\t$VodProviderBrowserApp = New VodProviderBrowserApp($conn);\n\n\t// Interact with the user\n\t$html = $VodProviderBrowserApp -> basicBrowser();\n\n\treturn $html;\n}", "title": "" }, { "docid": "d51a5390e06e79fe0cc52fdd0c1d0833", "score": "0.52937675", "text": "function tsuiseki_tracking_view($data) {\n if (!empty($data)) {\n $t_data = (string)(trim($data));\n // We need to cut the first \"ref=\" as it comes from the javascript part\n // and may overlay the partner field.\n if (preg_match('/^ref=.*/', $t_data)) {\n $t_data = mb_substr($t_data, mb_strpos($t_data, '=') + 1);\n }\n $t_parts = preg_split('/;;/', $t_data);\n $src_url = (string)(trim($t_parts[0]));\n $width = (string)(trim($t_parts[1]));\n $height = (string)(trim($t_parts[2]));\n $browser = (string)(trim($t_parts[3]));\n $browser_version = (string)(trim($t_parts[4]));\n $referer = (string)(trim($t_parts[5]));\n if (!empty($referer)) {\n // Wir extrahieren nur die Domain!\n $r_parts = array();\n preg_match('/[a-z]{3,5}:\\/\\/(.+?)[\\/?:]/', $referer, $r_parts);\n if (!empty($r_parts[1])) {\n $referer = 'referer='. (string)trim($r_parts[1]);\n }\n }\n }\n $key = (string)trim($_SESSION['TSUISEKI_TRACKER_KEY']);\n if (!empty($src_url) && !empty($key)) {\n $ref = urldecode($src_url);\n $data = (string)(trim(tsuiseki_tracking_get_data($ref)));\n $data .= '&'. $width .'&'. $height .'&'. $browser .'&'. $browser_version .'&'. $referer;\n $data = urlencode($data);\n $ip = ip2long($_SERVER['REMOTE_ADDR']);\n $url = \"http://tracker.tsuiseki.com/tsuiseki.php?q=$key;0;$ip;$data&ajax=1\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, (string)trim($_SERVER['HTTP_USER_AGENT']));\n curl_setopt($ch, CURLOPT_REFERER, $src_url);\n $result = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n trigger_error(curl_error($ch), curl_errno($ch));\n }\n curl_close($ch);\n }\n\n // generate the response\n $response = json_encode( array( 'success' => true ) );\n // response output\n header( \"Content-Type: application/json\" );\n echo $response;\n exit;\n //return 0;\n}", "title": "" }, { "docid": "7715e688236305995779d4473f71fe97", "score": "0.52507323", "text": "public function show(web $web)\n {\n //\n }", "title": "" }, { "docid": "638404bec3e02d313126807083a90273", "score": "0.52329177", "text": "private function show_page()\n\t{\n\t\t$parse['user_link']\t= $this->_base_url . 'recruit/' . $this->_friends[0]['user_name'];\n\t\n\t\t$this->template->page ( FRIENDS_FOLDER . 'friends_view' , $parse );\t\n\t}", "title": "" }, { "docid": "8680278d252b067381c4020fee8924fc", "score": "0.52154434", "text": "function vodAssetBrowserApp() \n{\n\t// replaced the actual connection data\n\tDoctrine_Manager::getInstance()->bindComponent('TableName', 'connection_name');\n\t$conn = Doctrine_Manager::connection();\n\t//////////////////////////\n\t// Setup the Browser Applet\n\t$VodAssetBrowserApp = New VodAssetBrowserApp($conn);\n\n\t// Interact with the user\n\t$html = $VodAssetBrowserApp -> basicBrowser();\n\n\treturn $html;\n}", "title": "" }, { "docid": "f60cb748cab95636f3fbd265a3403768", "score": "0.5208211", "text": "function mmc_dash_help_widget(){\n\t?>\n\t<iframe width=\"350\" height=\"250\" src=\"https://www.youtube.com/embed/x7R2HcTAyjI\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\t<?php\n}", "title": "" }, { "docid": "fdb0baa3ad6b03c124dacf2bd778918b", "score": "0.5108618", "text": "function view_page($html){\r\n\t\techo $html;\r\n\t}", "title": "" }, { "docid": "122a801294b702250265e09aadb175ac", "score": "0.50790405", "text": "function TimeIt_user_main()\n{\n return pnModFunc('TimeIt', 'user', 'view');\n}", "title": "" }, { "docid": "47f259ea86d926774840ceb2ed8a88b3", "score": "0.50601125", "text": "public function injectJavascriptInView(): void;", "title": "" }, { "docid": "aa3df4e0da10d623647fe9796ceb09d4", "score": "0.501133", "text": "public function atmf_html_backend(){\n\n $template_loader = new Uou_Atmf_Load_Template();\n ob_start();\n $template = $template_loader->locate_template( 'popup.php' );\n\n if(is_user_logged_in() ){\n include( $template );\n }\n echo ob_get_clean();\n\n }", "title": "" }, { "docid": "e3b030ab22a759883579746e5a56ad34", "score": "0.50090176", "text": "function ctools_ajax_sample_page() {\n\t// Required includes for ctools to work\n\tctools_include('ajax');\n\tctools_include('modal');\n\tctools_modal_add_js();\n\t$str = \"\";\n\tif (user_is_anonymous()) {\n\t\t$str = \"Hi, This is my brand new page, created just to show \";\n\t\t$str .= l(\"Ctools Login link\", \"lopu/nojs/login\", array(\n\t\t\t\t\t\t\t'attributes' => array(\n\t\t\t\t\t\t\t\t'class' => array(\n\t\t\t\t\t\t\t\t\t'ctools-use-modal',\n\t\t\t\t\t\t\t\t\t'ctools-modal-custom',\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}\n\treturn $str;\n}", "title": "" }, { "docid": "b9080ed20473d1dea876373c76d8551d", "score": "0.5008322", "text": "public function embedCode() : string\n {\n switch ($this->platform) {\n case 'soundcloud':\n $response = Http::accept('application/json')\n ->get(\"https://soundcloud.com/oembed?url={$this->url}&maxheight=370&show_comments=false\");\n return $response->json('html');\n break;\n \n case 'youtube':\n $queryString = parse_url($this->url, PHP_URL_QUERY);\n preg_match('/v=([a-z0-9_\\-]+)/i', $queryString, $matches);\n \n return '<iframe id=\"ytplayer\" type=\"text/html\" width=\"640\" height=\"360\"\n src=\"https://www.youtube.com/embed/'.$matches[1].'\"\n frameborder=\"0\" allowfullscreen=true></iframe>';\n break;\n \n default:\n return '<a href=\"'.$this->url.'\" target=\"_blank\">'.$this->url.'</a>';\n break;\n }\n }", "title": "" }, { "docid": "45e057b0be41606b0e9572e71b278cbf", "score": "0.5005794", "text": "protected function show_contents()\n\t\t{\n\t\t\t//echo(\"<a href='javascript:setTimeout(window.location.href=\\\"\". $_SERVER['PHP_SELF']. \"?\". $this->paramname. \"=\". $this->menuvalue. \"\\\",5000);'>\". $this->menutext. \"</a>\");\n\t\t\techo(\"<a href='javascript:openhelp(\\\"helppage.php?context=\". (isset($_GET['Page']) ? $_GET['Page'] : \"\"). \"\\\")'>\". $this->menutext. \"</a>\");\t\n\t\t\techo(\"<SCRIPT> function openhelp(aurl) { window.open(aurl,'_blank'); } </SCRIPT>\");\n\t\t}", "title": "" }, { "docid": "a498e670e33b64dc6d57242701789b2e", "score": "0.50034046", "text": "function trackPageView() {\n $timeStamp = time();\n $domainName = $_SERVER[\"SERVER_NAME\"];\n if (empty($domainName)) {\n $domainName = \"\";\n }\n\n // Get the referrer from the utmr parameter, this is the referrer to the\n // page that contains the tracking pixel, not the referrer for tracking\n // pixel.\n $documentReferer = $_GET[\"utmr\"];\n if (empty($documentReferer) && $documentReferer !== \"0\") {\n $documentReferer = \"-\";\n } else {\n $documentReferer = urldecode($documentReferer);\n }\n $documentPath = $_GET[\"utmp\"];\n if (empty($documentPath)) {\n $documentPath = \"\";\n } else {\n $documentPath = urldecode($documentPath);\n }\n\n $account = $_GET[\"utmac\"];\n $userAgent = $_SERVER[\"HTTP_USER_AGENT\"];\n if (empty($userAgent)) {\n $userAgent = \"\";\n }\n\n // Try and get visitor cookie from the request.\n $cookie = isset($_COOKIE[COOKIE_NAME]) ? $_COOKIE[COOKIE_NAME] : '';\n\n $dcmguid = isset($_SERVER[\"HTTP_X_DCMGUID\"]) ? $_SERVER[\"HTTP_X_DCMGUID\"] : '';\n $visitorId = getVisitorId(\n $dcmguid, $account, $userAgent, $cookie);\n\n // Always try and add the cookie to the response.\n setrawcookie(\n COOKIE_NAME,\n $visitorId,\n $timeStamp + COOKIE_USER_PERSISTENCE,\n COOKIE_PATH);\n\n $utmGifLocation = \"http://www.google-analytics.com/__utm.gif\";\n\n // Construct the gif hit url.\n $utmUrl = $utmGifLocation . \"?\" .\n \"utmwv=\" . VERSION .\n \"&utmn=\" . getRandomNumber() .\n \"&utmhn=\" . urlencode($domainName) .\n \"&utmr=\" . urlencode($documentReferer) .\n \"&utmp=\" . urlencode($documentPath) .\n \"&utmac=\" . $account .\n \"&utmcc=__utma%3D999.999.999.999.999.1%3B\" .\n \"&utmvid=\" . $visitorId .\n \"&utmip=\" . getIP($_SERVER[\"REMOTE_ADDR\"]);\n\n sendRequestToGoogleAnalytics($utmUrl);\n\n // If the debug parameter is on, add a header to the response that contains\n // the url that was used to contact Google Analytics.\n if (!empty($_GET[\"utmdebug\"])) {\n header(\"X-GA-MOBILE-URL:\" . $utmUrl);\n }\n // Finally write the gif data to the response.\n writeGifData();\n }", "title": "" }, { "docid": "c53b208c1d9e4952667618788a9b940b", "score": "0.4998685", "text": "public function authentication_page( $user ) {\n\t\trequire_once( ABSPATH . '/wp-admin/includes/template.php' );\n\t\t?>\n\t\t<p style=\"padding-bottom:1em;\"><?php esc_html_e( 'Enter a backup Authentication Code.', 'it-l10n-ithemes-security-pro' ); ?></p><br/>\n\t\t<p>\n\t\t\t<label for=\"authcode\"><?php esc_html_e( 'Authentication Code:', 'it-l10n-ithemes-security-pro' ); ?></label>\n\t\t\t<input type=\"tel\" name=\"two-factor-backup-code\" id=\"authcode\" class=\"input\" value=\"\" size=\"20\" pattern=\"[0-9]*\" />\n\t\t</p>\n\t\t<script type=\"text/javascript\">\n\t\t\tsetTimeout( function(){\n\t\t\t\tvar d;\n\t\t\t\ttry{\n\t\t\t\t\td = document.getElementById('authcode');\n\t\t\t\t\td.value = '';\n\t\t\t\t\td.focus();\n\t\t\t\t} catch(e){}\n\t\t\t}, 200);\n\t\t</script>\n\t\t<?php\n\t\tsubmit_button( __( 'Submit', 'it-l10n-ithemes-security-pro' ) );\n\t}", "title": "" }, { "docid": "68d1db9f93c5f19ac29ec7dc7bc6aa86", "score": "0.49871197", "text": "public function userInstantWviewAction($username,$instant_title,$webview = true)\n {\n $request = $this->getRequest();\n $request->setLocale($request->getPreferredLanguage(array('en', 'fr')));\n// $this->get('session')->set('_locale', 'de_DE');\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('CosaInstantUserBundle:User')->findOneBy(array('twitter_username'=>$username));\n if (!$user) {\n throw $this->createNotFoundException('This user does not exist');\n }\n $instant = $em->getRepository('CosaInstantTimelineBundle:Instant')->findOneBy(array('user'=>$user->getId(),'url_title'=>$instant_title));\n if (!$instant) {\n throw $this->createNotFoundException('This instant does not exist');\n }\n $instant->setNbViews($instant->getNbViews()+1);\n $instant->setLastView(new \\Datetime());\n $instantWithTweets = $em->getRepository('CosaInstantTimelineBundle:Instant')->getList($instant->getId(),0,100);\n $tweets = Array();\n if(count($instantWithTweets))\n $tweets = $instantWithTweets[0]->getTweets();\n $twittos = $em->getRepository('CosaInstantTimelineBundle:Twittos')->getComplete($instant->getId());\n $em->persist($instant);\n $em->flush();\n return $this->render('CosaInstantTimelineBundle:Instant:userInstantWview.html.twig', array(\n 'instant' => $instant,\n 'tweets' => $tweets,\n 'twittos' => $twittos,\n 'off' => 0,\n 'nb' => 100,\n 'webview' => $webview,\n ));\n }", "title": "" }, { "docid": "169526265d7dd8c9f36deb9f22d1bee8", "score": "0.49775043", "text": "public static function live_preview() { }", "title": "" }, { "docid": "d64d1a370b9d1b381770c71f2237e184", "score": "0.49718672", "text": "public function _settings_field_webwidget_code() {\n global $zendesk_support;\n ?>\n <span\n class=\"description float-left\"><strong><?php _e( 'Advanced users only (no need to modify code below)', 'zendesk' ); ?></strong></span>\n <br/>\n <textarea id=\"zendesk_webwidget_code\" cols=\"60\" rows=\"5\"\n name=\"zendesk-settings[webwidget_code]\"><?php echo esc_textarea( $zendesk_support->settings['webwidget_code'] ); ?></textarea>\n <br/>\n <?php\n }", "title": "" }, { "docid": "175668f266c8084ae3557bd05f4dc609", "score": "0.49635005", "text": "function view_added_site($url, $nickname) {\n include 'templates.inc';\n main_header(\"Confirmation\"); ?>\n <p><?php echo $url; ?> nicknamed to \n http://127.0.0.1/WEBD236/view_site.php?name=<?php echo $nickname ?>\n </p> <?php\n main_footer();\n}", "title": "" }, { "docid": "14e16cc8e27efed436921253c9c1081e", "score": "0.49583435", "text": "public function getWebViewId()\n {\n return $this->getData('webview_id');\n }", "title": "" }, { "docid": "c538569c22d01ff6d02a3dbf324f327d", "score": "0.4952147", "text": "function _adminHead() {\r\n\t\t$out = \"<script type=\\\"text/javascript\\\"> //<![CDATA[\\n\";\r\n\t\t$out .= \"function VideoPop(vpsize,vpid){\";\r\n\t\t$out .= \" url = '\".$this->videopop_url.\"?vid='+vpid;\";\r\n\t\t$out .= \" xwidth = vpsize+110; xheight = (vpsize/1.3)+94;\";\r\n\t\t$out .= \" lvp = window.open(url,'','top=100,left=100,status=0,location=0,width='+xwidth+',height='+xheight+'');\";\r\n\t\t$out .= \" lvp.focus();\";\r\n\t\t$out .= \"}\\n\";\r\n\t\t$out .= \"//]]> </script>\\n\";\r\n\r\n\t\techo $out;\r\n\t}", "title": "" }, { "docid": "ab9cf1b68ee6b37cc9d679200d49bfd3", "score": "0.49461916", "text": "public static function show()\n {\n//You could get fancy with the homepage and check for the userID in the session and hide/show the login / registration links when no session\n//If there is a session then you should show the user profile link\n//the template is an HTML page with PHP inserted in it. just put an if/else statement to check for the session and show correct links\n\n\n $templateData['site_name'] = 'mysite';\n\n//template data contains what will show up in the $data variable in the homepage template\n//the name of the template 'homepage' becomes 'homepage.php' in the pages directory\n\n self::getTemplate('homepage', $templateData);\n }", "title": "" }, { "docid": "062e80899d2017d85c8ac9476eeb1500", "score": "0.49418512", "text": "function client_url() {\n\tglobal $post;\n\t$url = get_post_meta($post->ID, 'client_url', true);\n\tif ($url) {\n\t\t?>\n\t\t<a href=\"<?php echo $url; ?>\" target=\"_blank\">Live Preview →</a>\n <?php\n\t}\n}", "title": "" }, { "docid": "510f110b025695b3659d6a78cd62ff29", "score": "0.4921189", "text": "public function getShowLoginPage()\n {\n echo $this->blade->render(\"login\", [\n 'signer' => $this->signer,\n ]);\n }", "title": "" }, { "docid": "e0e8fc95b193ed636c32b082f1e2bcc4", "score": "0.49202636", "text": "public function run()\n {\n $this->browser->open($_ENV['app_frontend_url'] . $this->product->getUrlKey() . '.html');\n }", "title": "" }, { "docid": "56424e06214547f77a792b62b8f18533", "score": "0.49188706", "text": "function add_UI($url, $doctype) {\n $audio_type = 'audio/mp4';\n switch($doctype) {\n case 'photo':\n echo '<img src=\"' . $url . '\" />' . PHP_EOL;\n break;\n case 'video':\n echo '<video src=\"' . $url\n . '\" controls>Please switch your browser to Chrome or Firefox</video>'\n . PHP_EOL;\n break;\n case 'audio':\n echo '<audio controls><source src=\"' . $url . '\" type=\"' . $audio_type\n . '\">Please switch your browser to Chrome or Firefox</audio>' . PHP_EOL;\n break;\n default:\n break;\n } \n}", "title": "" }, { "docid": "1ec94f4c972501a304c806c4daeb101a", "score": "0.49092165", "text": "function urchin($uuid = null)\n\t{\n\t\t?>\n<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\">\n</script>\n<script type=\"text/javascript\">\ntry {\n_uacct = \"<?php echo $uuid; ?>\";\nurchinTracker();\n} catch(err) {}</script>\n\t\t<?php\n\t}", "title": "" }, { "docid": "fc3219ab08b9b36f6a5ee6b83234ed4c", "score": "0.48959386", "text": "public function main_evaluar()\n {\n return view('main.components.evaluation.iframe.evaluar', [\"url\" => env(\"OLD_PORTAL_PERSONAL_URL\", null).'/evaluar']);\n }", "title": "" }, { "docid": "f4718ecece598bbf761867363610258d", "score": "0.4890044", "text": "private function displayJavascript() {\n $this->javascript_is_displayed = TRUE ;\n }", "title": "" }, { "docid": "b30dcac5d88508a337f5f3fec3b952e7", "score": "0.48789752", "text": "public function externalAction() {\n\n //GET SUBJECT\n $this->view->video = $video = Engine_Api::_()->core()->getSubject('sitereview_video');\n\n //CHECK THAT EMBEDDING IS ALLOWED OR NOT\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview_video.embeds', 1)) {\n $this->view->error = 1;\n return;\n } else if (isset($video->allow_embed) && !$video->allow_embed) {\n $this->view->error = 2;\n return;\n }\n\n //GET EMBED CODE\n $this->view->videoEmbedded = \"\";\n if ($video->status == 1) {\n $video->view_count++;\n $video->save();\n $this->view->videoEmbedded = $video->getRichContent(true);\n }\n\n //TRACK VIEWS FROM EXTERNAL SOURCES\n Engine_Api::_()->getDbtable('statistics', 'core')\n ->increment('video.embedviews');\n\n //GET FILE LOCATION\n if ($video->type == 3 && $video->status == 1) {\n if (!empty($video->file_id)) {\n $storage_file = Engine_Api::_()->getItem('storage_file', $video->file_id);\n if ($storage_file) {\n $this->view->video_location = $storage_file->map();\n }\n }\n }\n\n //GET RATING DATA\n $this->view->rating_count = Engine_Api::_()->getDbTable('videoratings', 'sitereview')->ratingCount($video->getIdentity());\n }", "title": "" }, { "docid": "317b8ae89b6c2591be07b31c2f83e7e5", "score": "0.48665762", "text": "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "title": "" }, { "docid": "82ccb03a032bb397c156547039e72ae1", "score": "0.48660013", "text": "public function web();", "title": "" }, { "docid": "e2019c46a9a29179f9bae98713f8fb2c", "score": "0.4857674", "text": "function janrain_capture_widget_js() {\n global $base_url;\n global $base_path;\n global $language;\n\n $janrain_settings = variable_get('janrain_capture_fields2', array());\n $janrain_settings = array_merge($janrain_settings, variable_get('janrain_capture_main2', array()));\n $janrain_settings = array_merge($janrain_settings, variable_get('janrain_capture_ui2', array()));\n $janrain_settings = array_merge($janrain_settings, variable_get('janrain_capture_federate2', array()));\n $janrain_settings = array_merge($janrain_settings, variable_get('janrain_capture_backplane2', array()));\n $janrain_settings = array_merge($janrain_settings, variable_get('janrain_capture_engage2', array()));\n\n // module\n $settings[\"plex.moduleVersion\"] = JANRAIN_CAPTURE_MODULE_VERSION;\n\n // capture\n $settings[\"capture.redirectUri\"] = url('janrain_capture/oauth', array('absolute' => TRUE));\n $settings[\"capture.appId\"] = $janrain_settings['capture_app_id'];\n $settings[\"capture.clientId\"] = $janrain_settings['capture_client_id'];\n $settings[\"capture.responseType\"] = \"code\";\n $settings[\"capture.captureServer\"] = $janrain_settings['capture_address'];\n $settings[\"capture.loadJsUrl\"] = $janrain_settings['load_js'];\n\n $share_settings = variable_get('janrain_capture_share', array());\n if (isset($share_settings[\"enabled\"]) && $share_settings[\"enabled\"]) {\n $settings[\"packages\"] = '[\"login\",\"capture\",\"share\"]';\n }\n else {\n $settings[\"packages\"] = '[\"login\",\"capture\"]';\n }\n\n // engage\n $settings[\"appUrl\"] = $janrain_settings['engage_address'];\n if (!empty($janrain_settings['engage_providers'])) {\n $provider_names = explode(',', $janrain_settings['engage_providers']);\n\n if ($provider_names) {\n $settings[\"providers\"] = json_encode($provider_names);\n }\n }\n\n // federate\n $settings[\"capture.federate\"] = $janrain_settings['capture_sso_enabled'];\n $settings[\"capture.federateServer\"] = 'https://' . $janrain_settings['capture_sso_address'];\n $settings[\"capture.federateXdReceiver\"] = $base_url . base_path() . drupal_get_path('module', 'janrain_capture') . '/xdcomm.html';\n $settings[\"capture.federateLogoutUri\"] = url('janrain_capture/simple_logout', array('absolute' => TRUE));\n $settings[\"capture.federateSegment\"] = isset($janrain_settings['capture_sso_segment_name']) ? $janrain_settings['capture_sso_segment_name'] : '';\n\n if (isset($janrain_settings['capture_sso_supported_segment_names'])) {\n $segment_names = explode(',', $janrain_settings['capture_sso_supported_segment_names']);\n\n if ($segment_names) {\n $settings[\"capture.federateSupportedSegments\"] = json_encode($segment_names);\n }\n }\n\n // backplane\n $settings[\"capture.backplane\"] = $janrain_settings['backplane_enabled'];\n $settings[\"capture.backplaneServerBaseUrl\"] = isset($janrain_settings['backplane_server_base_url']) ? $janrain_settings['backplane_server_base_url'] : '';\n $settings[\"capture.backplaneBusName\"] = $janrain_settings['backplane_bus_name'];\n $settings[\"capture.backplaneVersion\"] = $janrain_settings['backplane_version'];\n\n // miscellaneous\n $settings[\"capture.language\"] = $language->language;\n $settings[\"mobileFriendly\"] = empty($janrain_settings['mobile_friendly']) ? FALSE : (bool) $janrain_settings['mobile_friendly'];\n\n if (module_exists('janrain_capture_screens')) {\n $settings[\"capture.stylesheets\"] = \"'\" . file_create_url(_janrain_capture_get_screen_file('stylesheets/styles.css')) . \"'\";\n if ($mobile_stylesheet = _janrain_capture_get_screen_file('stylesheets/mobile-styles.css')) {\n $settings[\"capture.mobileStylesheets\"] = \"'\" . file_create_url($mobile_stylesheet) . \"'\";\n }\n if ($ie_stylesheet = _janrain_capture_get_screen_file('stylesheets/ie-styles.css')) {\n $settings[\"capture.conditionalIEStylesheets\"] = \"'\" . file_create_url($ie_stylesheet) . \"'\";\n }\n }\n else {\n $folder_url = variable_get('janrain_capture_screens_folder', 'file:///sites/all/themes/janrain-capture-screens/');\n\n // If path is local, search for user agent-specific stylesheets in the file system.\n if (strpos($folder_url, 'file:///', 0) === 0) {\n // Example of $folder_url: file:///sites/all/themes/janrain-capture-screens/\n $web_path = str_replace('file://', '', $folder_url);\n // Example of $web_path: /sites/all/themes/janrain-capture-screens/\n $fs_path = DRUPAL_ROOT . $web_path;\n // Example of $fs_path: /var/www/d7/sites/all/themes/janrain-capture-screens/\n $web_url = $base_url . $web_path;\n\n $base_stylesheet_path = \"'{$web_url}stylesheets/janrain.css'\";\n $mobile_stylesheet_path = \"'{$web_url}stylesheets/janrain_mobile.css'\";\n $ie_stylesheet_path = \"'{$web_url}stylesheets/janrain_ie.css'\";\n\n $settings[\"capture.stylesheets\"] = $base_stylesheet_path;\n $settings[\"capture.mobileStylesheets\"] = $mobile_stylesheet_path;\n $settings[\"capture.conditionalIEStylesheets\"] = $ie_stylesheet_path;\n }\n else {\n // Remote stylesheets\n $settings[\"capture.stylesheets\"] = \"'{$folder_url}stylesheets/janrain.css'\";\n $settings[\"capture.mobileStylesheets\"] = \"'{$folder_url}stylesheets/janrain_mobile.css'\";\n $settings[\"capture.conditionalIEStylesheets\"] = \"'{$folder_url}stylesheets/janrain_ie.css'\";\n }\n\n // Log a warning if directories are setup properly but no stylesheets were found\n if (!count($settings[\"capture.stylesheets\"]) && !count($settings[\"capture.mobileStylesheets\"]) && !count($settings[\"capture.conditionalIEStylesheets\"])) {\n watchdog('janrain_capture',\n 'No stylesheets were found in the screens folder (@path). Please check the Janrain Capture module settings.',\n array('@path' => $fs_path ?: $folder_url),\n WATCHDOG_WARNING,\n l(t('Janrain Capture module settings'), 'admin/config/people/janrain_capture'));\n }\n }\n\n\n\n $output = <<<EOD\nfunction janrainSignOut(){\n janrain.capture.ui.endCaptureSession();\n}\n(function() {\n if (typeof window.janrain !== 'object') window.janrain = {};\n window.janrain.plex = {};\n window.janrain.settings = {};\n window.janrain.settings.capture = {};\n\n // module settings\n janrain.plex.moduleVersion = '{$settings[\"plex.moduleVersion\"]}';\n\n // capture settings\n janrain.settings.capture.redirectUri = '{$settings[\"capture.redirectUri\"]}';\n janrain.settings.capture.appId= '{$settings[\"capture.appId\"]}';\n janrain.settings.capture.clientId = '{$settings[\"capture.clientId\"]}';\n janrain.settings.capture.responseType = '{$settings[\"capture.responseType\"]}';\n janrain.settings.capture.captureServer = '{$settings[\"capture.captureServer\"]}';\n janrain.settings.capture.registerFlow = 'socialRegistration';\n janrain.settings.packages = {$settings['packages']};\n\n janrain.settings.capture.setProfileCookie = true;\n janrain.settings.capture.keepProfileCookieAfterLogout = true;\n janrain.settings.capture.setProfileData = true;\n\n janrain.settings.capture.federateEnableSafari = true;\n\n // styles\n janrain.settings.capture.stylesheets = [{$settings[\"capture.stylesheets\"]}];\\n\nEOD;\n\n // mobile styles\n if (isset($settings[\"capture.mobileStylesheets\"]) && $settings[\"capture.mobileStylesheets\"] != '') {\n $output .= \"janrain.settings.capture.mobileStylesheets = [{$settings['capture.mobileStylesheets']}];\\n\";\n }\n\n //IE styles\n if (isset($settings[\"capture.conditionalIEStylesheets\"]) && $settings[\"capture.conditionalIEStylesheets\"] != '') {\n $output .= \"janrain.settings.capture.conditionalIEStylesheets = [{$settings['capture.conditionalIEStylesheets']}];\\n\";\n }\n\n // captcha\n $output .= \"janrain.settings.capture.recaptchaPublicKey = '6LeVKb4SAAAAAGv-hg5i6gtiOV4XrLuCDsJOnYoP';\\n\";\n\n $output .= <<<EOD\n // engage settings\n janrain.settings.appUrl = '{$settings[\"appUrl\"]}';\n janrain.settings.tokenAction = 'event';\\n\nEOD;\n\n if (isset($settings[\"providers\"])){\n $output .= \"janrain.settings.providers = {$settings[\"providers\"]}\";\n }\n\n // Backplane\n if ($settings[\"capture.backplane\"]) {\n $output .= <<<EOD\n // backplane settings\n janrain.settings.capture.backplane = '{$settings[\"capture.backplane\"]}';\n janrain.settings.capture.backplaneBusName = '{$settings[\"capture.backplaneBusName\"]}';\n janrain.settings.capture.backplaneVersion = '{$settings[\"capture.backplaneVersion\"]}';\\n\nEOD;\n if ($settings['capture.backplaneServerBaseUrl']) {\n $output .= \"janrain.settings.capture.backplaneServerBaseUrl = 'https://{$settings['capture.backplaneServerBaseUrl']}';\\n\";\n }\n }\n\n if ($settings[\"capture.federate\"]) {\n $output .= <<<EOD\n // federate settings\n janrain.settings.capture.federate = '{$settings[\"capture.federate\"]}';\n janrain.settings.capture.federateServer = '{$settings[\"capture.federateServer\"]}';\n janrain.settings.capture.federateXdReceiver = '{$settings[\"capture.federateXdReceiver\"]}';\n janrain.settings.capture.federateLogoutUri = '{$settings[\"capture.federateLogoutUri\"]}';\\n\nEOD;\n\n if (isset($settings[\"capture.federateSegment\"])) {\n $output .= \"janrain.settings.capture.federateSegment = '{$settings[\"capture.federateSegment\"]}';\\n\";\n }\n\n if (isset($settings[\"capture.federateSupportedSegments\"])) {\n $output .= \"janrain.settings.capture.federateSupportedSegments = {$settings[\"capture.federateSupportedSegments\"]};\\n\";\n }\n }\n\n if ($settings[\"capture.language\"]) {\n $output .= \"janrain.settings.language = '{$settings[\"capture.language\"]}';\\n\";\n }\n\n if ($settings[\"mobileFriendly\"]) {\n global $base_root;\n $current_url = $base_root . request_uri();\n $_SESSION['janrain_capture_redirect_uri'] = $current_url;\n\n $output .=\n \"\\n// mobile-specific settings\n janrain.settings.tokenAction = 'url';\n janrain.settings.popup = false;\n janrain.settings.tokenUrl = janrain.settings.capture.captureServer;\n janrain.settings.capture.redirectUri = '{$current_url}';\n janrain.settings.capture.redirectFlow = true;\\n\";\n }\n else {\n if (isset($_SESSION['janrain_capture_redirect_uri'])) {\n unset($_SESSION['janrain_capture_redirect_uri']);\n }\n }\n\n if (!isset($_SESSION['janrain_capture_access_token'])) {\n $api = new JanrainCaptureApi();\n $api->refreshAccessToken();\n }\n $access_token = \"var access_token = '\";\n $access_token .= isset($_SESSION['janrain_capture_access_token']) ? $_SESSION['janrain_capture_access_token'] : \"\";\n $access_token .= \"';\";\n\n $output .= <<<EOD\n function isReady() { janrain.ready = true; };\n if (document.addEventListener) {\n document.addEventListener(\"DOMContentLoaded\", isReady, false);\n } else {\n window.attachEvent('onload', isReady);\n }\n\n var e = document.createElement('script');\n e.type = 'text/javascript';\n e.id = 'janrainAuthWidget';\n var url = document.location.protocol === 'https:' ? 'https://' : 'http://';\n url += '{$settings[\"capture.loadJsUrl\"]}';\n e.src = url;\n var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(e, s);\n})();\n{$access_token}\n\nEOD;\n\n return $output;\n}", "title": "" }, { "docid": "5afcd1395b3c5a72c0e6e605f8c8b708", "score": "0.48551935", "text": "public function show() {\n $this->_generateCaptcha();\n $this->_generateApiUrl();\n }", "title": "" }, { "docid": "82046d987ddeff72fb6d9a7de1a29be2", "score": "0.48530254", "text": "function show_page() {\n\t$query = 'SELECT *, DATE_FORMAT(creation_date, \"%M %e, %Y\") AS formatted_creation FROM users WHERE id=\"' . mysqli_real_escape_string(DB::get(),$_GET['ID']) . '\" LIMIT 1';\n\t$result = DB::queryRaw($query);\t// have MySQL format the date for us\n\t\n\tif (mysqli_num_rows($result) != 1)\n\t\ttrigger_error('User not found', E_USER_ERROR);\n\t\n\t// ** User Found, info valid at this point **\n\t\n\t$row = mysqli_fetch_assoc($result);\n\t\n\t\n\t// Page header\n\tglobal $use_rel_external_script;\t// direct page_header to include some javascript that will make links\n\t$use_rel_external_script = true;\t// marked as rel=\"external\" open in a new tab while remaining XHTML-valid\n\t\n\tpage_header($row['name']);\t// the title of the page is the user's name; helpful if you open multiple users in different tabs\n\t\n\techo <<<HEREDOC\n <h1>View User</h1>\n \n\nHEREDOC;\n\t\n\t\n\t// Format Data\n\t$email_verified = 'No';\n\tif ($row['email_verification'] == '1')\n\t\t$email_verified = 'Yes';\n\t\t\n\t$cell = format_phone_number($row['cell']);\n\t\n\t$permissions = $row['permissions'];\n\t$account_type = 'Regular';\n\tif ($permissions == 'C')\n\t\t$account_type = 'Captain';\n\telse if ($permissions == 'A')\n\t\t$account_type = 'Non-Captain Admin';\n\telse if ($permissions == 'L')\n\t\t$account_type = 'Alumnus';\n\telse if ($permissions == 'T')\n\t\t$account_type = 'Temporary';\n\t\n\t// mailing list status\n\t$mailings = 'No';\n\tif ($row['mailings'] == '1')\n\t\t$mailings = 'Yes';\n\t\n\t\n\t// Format Approval Status line\n\t//\n\t// depending on whether the user is approved, banned, or in limbo, the link next to that\n\t// information needs to un-approve, un-ban, or approve/ban the user\n\t// eg. \"Approval Status: Approved (to un-approve, click here)\"\n\tif ($row['approved'] == '-1') {\n\t\t$approval_status = 'Banned';\n\t\t$approval_line = \"&nbsp;<span class=\\\"small\\\">(<a href=\\\"Edit_User?Approve&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">approve</a> | <a href=\\\"Edit_User?Unapprove&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">make pending</a>)</span>\";\n\t}\n\telse if ($row['approved'] == '0') {\n\t\t$approval_status = 'Pending';\n\t\t$approval_line = \"&nbsp;<span class=\\\"small\\\">(<a href=\\\"Edit_User?Approve&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">approve</a> | <a href=\\\"Edit_User?Ban&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">ban</a>)</span>\";\n\t}\n\telse if ($row['approved'] == '1') {\n\t\t$approval_status = 'Approved';\n\t\t$approval_line = \"&nbsp;<span class=\\\"small\\\">(<a href=\\\"Edit_User?Ban&amp;ID={$row['id']}&amp;xsrf_token={$_SESSION['xsrf_token']}&amp;Return=View\\\">ban</a>)</span>\";\n\t}\n\t\t\n\techo <<<HEREDOC\n <table class=\"spacious\">\n <tr>\n <td>Name:</td>\n <td>\n <span class=\"b\">{$row['name']}</span>\n &nbsp;<span class=\"small\">(<a href=\"Edit_User?Change_Name&amp;ID={$row['id']}&amp;Return=View\">change</a>)</span>\n </td>\n </tr><tr>\n <td>Email Address:</td>\n <td class=\"b\"><a href=\"mailto:{$row['email']}\" rel=\"external\">{$row['email']}</a></td>\n </tr><tr>\n <td>Cell Phone Number:&nbsp;</td>\n <td class=\"b\">$cell</td>\n </tr><tr>\n <td>Year of Graduation:</td>\n <td>\n <span class=\"b\">{$row['yog']}</span>\n &nbsp;<span class=\"small\">(<a href=\"Edit_User?Change_YOG&amp;ID={$row['id']}&amp;Return=View\">change</a>)</span>\n <br /><br />\n </td>\n </tr><tr>\n <td>ID:</td>\n <td><span class=\"b\">{$row['id']}</span></td>\n </tr><tr>\n <td>Account Type:</td>\n <td>\n <span class=\"b\">$account_type</span>\n &nbsp;<span class=\"small\">(<a href=\"Edit_User?Change_Permissions&amp;ID={$row['id']}&amp;Return=View\">change</a>)</span>\n </td>\n </tr><tr>\n <td>Mailing List:</td>\n <td><span class=\"b\">$mailings</span></td>\n </tr><tr>\n <td>Approval Status:</td>\n <td>\n <span class=\"b\">$approval_status</span>\n $approval_line\n </td>\n </tr><tr>\n <td>Email Verified:</td>\n <td class=\"b\">$email_verified</td>\n </tr><tr>\n <td>Creation Date:</td>\n <td><span class=\"b\">{$row['formatted_creation']}</span></td>\n </tr><tr>\n <td>Registered From:</td>\n <td class=\"b\">{$row['registration_ip']}</td>\n </tr>\n </table>\n <br />\n <span class=\"small i\">Only users are able to edit their email address and cell phone number.</span>\nHEREDOC;\n\t\n\t// Show test scores\n\t$query = 'SELECT test_scores.score AS score, tests.name AS name, tests.total_points AS total, DATE_FORMAT(tests.date, \"%M %e, %Y\") AS formatted_date, test_scores.score_id AS score_id'\n\t\t\t. ' FROM test_scores'\n\t\t\t. ' INNER JOIN tests ON tests.test_id=test_scores.test_id'\n\t\t\t. ' WHERE test_scores.user_id=\"' . mysqli_real_escape_string(DB::get(),$_GET['ID']) . '\" AND archived=\"0\"'\n\t\t\t. ' ORDER BY tests.date DESC';\n\t$result = DB::queryRaw($query);\n\t\n\tif (mysqli_num_rows($result) > 0) {\n\t\techo <<<HEREDOC\n\n \n <br /><br /><br /><br /><br />\n <h4>Recent Test Scores</h4>\n <table class=\"contrasting\">\n <tr>\n <th>Test</th>\n <th>Score</th>\n <th>Maximum</th>\n <th>Date</th>\n <th></th>\n </tr>\n\nHEREDOC;\n\t\t\n\t\t$row = mysqli_fetch_assoc($result);\n\t\twhile ($row) {\n\t\t\techo <<<HEREDOC\n <tr>\n <td>{$row['name']}</td>\n <td class=\"text-centered\">{$row['score']}</td>\n <td class=\"text-centered\">{$row['total']}</td>\n <td>{$row['formatted_date']}</td>\n <td><a href=\"Delete_Score?ID={$row['score_id']}&amp;xsrf_token={$_SESSION['xsrf_token']}\">Delete</a></td>\n </tr>\n\nHEREDOC;\n\t\t\t$row = mysqli_fetch_assoc($result);\n\t\t}\n\t\t\n\t\techo <<<HEREDOC\n </table>\nHEREDOC;\n\t}\n\t\n\t$query = 'SELECT test_scores.score AS score, tests.name AS name, tests.total_points AS total, DATE_FORMAT(tests.date, \"%M %e, %Y\") AS formatted_date, test_scores.score_id AS score_id'\n\t\t\t. ' FROM test_scores'\n\t\t\t. ' INNER JOIN tests ON tests.test_id=test_scores.test_id'\n\t\t\t. ' WHERE test_scores.user_id=\"' . mysqli_real_escape_string(DB::get(),$_GET['ID']) . '\" AND archived=\"1\"'\n\t\t\t. ' ORDER BY tests.date DESC';\n\t$result = DB::queryRaw($query);\n\t\n\tif (mysqli_num_rows($result) > 0) {\n\t\techo <<<HEREDOC\n\n \n <br /><br />\n <h4>Old Test Scores</h4>\n <table class=\"contrasting\">\n <tr>\n <th>Test</th>\n <th>Score</th>\n <th>Maximum</th>\n <th>Date</th>\n <th></th>\n </tr>\n\nHEREDOC;\n\t\t\n\t\t$row = mysqli_fetch_assoc($result);\n\t\twhile ($row) {\n\t\t\techo <<<HEREDOC\n <tr>\n <td>{$row['name']}</td>\n <td class=\"text-centered\">{$row['score']}</td>\n <td class=\"text-centered\">{$row['total']}</td>\n <td>{$row['formatted_date']}</td>\n <td><a href=\"Delete_Score?ID={$row['score_id']}&amp;xsrf_token={$_SESSION['xsrf_token']}\">Delete</a></td>\n </tr>\n\nHEREDOC;\n\t\t\t$row = mysqli_fetch_assoc($result);\n\t\t}\n\t\t\n\t\techo <<<HEREDOC\n </table>\nHEREDOC;\n\t}\n}", "title": "" }, { "docid": "eea6851f29926d0378ebcb4cd7093f8f", "score": "0.48507532", "text": "function wpfme_login_obscure(){ return '<strong>Sorry</strong>: Think you have gone wrong somwhere!';}", "title": "" }, { "docid": "fb7003a31a002bb949716444fd4ee548", "score": "0.48448354", "text": "function change1() {\n $_SESSION['url'] = \"http://www.skysignage.com/s/front/channel_preview.php?ID_channel=1129&tvmode=horizontal\";\n exit;\n }", "title": "" }, { "docid": "a75ba93f6c59c485302cbd975f23b72c", "score": "0.48212922", "text": "public function actionView($code, $user_id)\n {\n return $this->render('view', [\n 'model' => $this->findModel($code, $user_id),\n ]);\n }", "title": "" }, { "docid": "ea334daa7d27ad4ca47963bcf3f0bc75", "score": "0.4814869", "text": "public function action_view()\n {\n // Correct page has been loaded in the before() function\n $pagename = Wi3::inst()->routing->args[0];\n $this->prepareForViewing($pagename);\n // Render page\n $renderedInAdminArea = false;\n $this->request->response = Wi3_Renderer::renderPage($pagename, $renderedInAdminArea);\n // Page caching will be handled via an Event. See bootstrap.php and the Caching plugin\n }", "title": "" }, { "docid": "abab050aa4c24c4824d7697ff0ecbbb1", "score": "0.48128805", "text": "public function view() {\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authenticate()) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend/login', '<strong>Error:</strong> Please login to continue.');\n\t\t\t}\n\t\t\t// Authorize w/ backend app.\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authorize('sharers', 'view')) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend', '<strong>Error:</strong> Insufficient user access.');\n\t\t\t}\n\t\t\t// Load view.\n\t\t\treturn $this->_loadView(dirname(__FILE__) .'/views/view.tpl');\n\t\t}", "title": "" }, { "docid": "6223bdb2006f5b8a7fa6bb17ae7d93a1", "score": "0.4790342", "text": "public function show_me_the_page() {\r\n $name = \"behat-\" . date('Y-m-d-H-i-s') . \".html\";\r\n /** @var MinkSession $session */\r\n $session = $this->getSession();\r\n $html = $session->getDriver()->getContent();\r\n fopen ($name, \"a+\");\r\n file_put_contents($name, $html);\r\n }", "title": "" }, { "docid": "4a48c74abe5605b3da8cc9912472551a", "score": "0.47898617", "text": "function tsuiseki_tracking_generate_javascript() {\n $track = TRUE;\n $tsuiseki_tracking_excluded_uris = explode(\"\\n\", str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", (string)get_option('tsuiseki_tracking_excluded_uris')));\n if (!empty($tsuiseki_tracking_excluded_uris)) {\n $uri = _request_uri();\n foreach ($tsuiseki_tracking_excluded_uris as $item) {\n $item = (string)trim($item);\n if (!empty($item)) {\n $item = '/^\\/'. str_replace('/', '\\/', $item) .'/i';\n $item = str_replace('*', '.*', $item);\n if (preg_match($item, $uri)) {\n $track = FALSE;\n break;\n }\n }\n } // foreach\n }\n if ($track === TRUE) {\n $output = '<script type=\"text/javascript\" charset=\"UTF-8\">';\n $bits_variable = 'cb'. hash('md5', uniqid() . mt_rand());\n $css = tsuiseki_tracking_get_css_class();\n $output .= \"jQuery(document).ready(function() {\n // This function is for logging the view.\n function track_view() {\n var ref = 'none';\n if (document.referrer != '') {\n ref = escape(document.referrer);\n }\n var url = document.location.href;\n url = escape(url);\n var getData = 'ref='+ url + get_view_port_size() + get_browser_data() + ';;referer=' + ref;\n var funcSuccess = function(data) {\n var dummy = data.response;\n };\n jQuery.ajax({\n type: 'POST',\n url: '\". get_bloginfo('wpurl') .\"/wp-content/plugins/tsuiseki-tracking/tsuiseki_tracking.php?action=view',\n dataType: 'json',\n success: funcSuccess,\n data: getData\n });\n return false;\n };\n // Declare some variables.\n var $bits_variable = 0;\n var fc_$bits_variable = null;\n var md_$bits_variable = null;\n var mo_$bits_variable = null;\n // Attach to the focus event of links.\n jQuery('$css').focus(function(event) {\n $bits_variable = $bits_variable | 2;\n fc_$bits_variable = event.target || event.srcElement;\n });\n // Attach to the mousedown event.\n jQuery('$css').mousedown(function(event) {\n $bits_variable = $bits_variable | 4;\n md_$bits_variable = event.target || event.srcElement;\n });\n // Attach to the mouseover event.\n jQuery('$css').mouseover(function(event) {\n $bits_variable = $bits_variable | 8;\n mo_$bits_variable = event.target || event.srcElement;\n });\n // Attach to the click event of links.\n jQuery('$css').click(function(event) {\n $bits_variable = $bits_variable | 1;\n var target = event.target || event.srcElement;\n if (target == fc_$bits_variable && target == mo_$bits_variable && target == md_$bits_variable) {\n $bits_variable = $bits_variable | 16;\n }\n var ref = 'none';\n if (document.referrer != '') {\n ref = escape(document.referrer);\n }\n var nav = navigator;\n var url = document.location.href;\n url = escape(url);\n var click_type = this.id;\n var getData = 'ref='+ url + get_view_port_size() + get_click_coordinates(event) + get_browser_data() + ';;referer=' + ref +';;feed='+ click_type +';;bits='+ $bits_variable;\n var funcSuccess = function(data) {\n var dummy = data.response;\n };\n // Now we use Ajax to log the click.\n jQuery.ajax({\n type: 'POST',\n url: '\". get_bloginfo('wpurl') .\"/wp-content/plugins/tsuiseki-tracking/tsuiseki_tracking.php?action=click',\n dataType: 'json',\n success: funcSuccess,\n async: false,\n data: getData\n });\n \n $bits_variable = 0;\n // By returning true we assure that the link is handled by the browser.\n return true;\n });\n // Finally we log the view if there were no errors.\n track_view();\n });\";\n $output .= '</script>';\n print $output;\n }\n}", "title": "" }, { "docid": "294dc1121e90f1ac72c64b64e222b26d", "score": "0.478337", "text": "function run(){\nif(!isset($_REQUEST['try_it_yourself'])){\n\tredirect('/lap_trinh/web/');\n}\n\n\n$indexpage='/';\n$base='/';\n\n\n//process textarea content\n$trans= new web_transfer();\n\n//start filter url\n$filter_url=split('=',$_REQUEST['try_it_yourself']);\n$filer_path=split('/',$_REQUEST['try_it_yourself']);\n\nif(count($filter_url) >1){\n\t$url_replace=$filter_url[1].'.htm';\n\t$url='http://www.w3schools.com/'.$_REQUEST['try_it_yourself'];\n}\nelse {\n$url_replace='';\n$url='http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_default';\n}\n\n$new_try_url=$filer_path[0].\"/\".$url_replace;\n\n$url_to_replace='/lap_trinh/runIframe?url='.$new_try_url;\n//end filter url\n\n\n$trans->initiate_news ($url,$indexpage); \n$trans->converturl($url,$base);\n$content ='';\n$trans->start_transfer(\"www.w3schools.com\");\n$trans->getcontent($content);\n\n//start filter\n//$content=str_replace('xsrc','src',$content);\n$content=str_replace('onclick=\"submitTryit()\"','',$content);\n$content=str_replace('img_logo.gif','http://myweb.pro.vn/images/avatar-hat-240.png',$content);\n$content=str_replace('XGSy3_Czz8k','qSeNdUL1Vx8',$content);\n$content=str_replace('http://www.youtube.com/embed/XGSy3_Czz8k','http://www.youtube.com/embed/gBayCA8-92A',$content);\n$content=str_replace('W3Schools.com','Learning TOEFL',$content);\n$content=str_replace('audi.jpeg','http://myweb.pro.vn/images/avatar-hat-240.png',$content);\n$content=str_replace('http://www.w3schools.com','http://myweb.pro.vn/toefl/index',$content);\n$content=str_replace('bookmark.swf','http://vuigame.vcdn.vn/upload/data/duaxejeep_1354186332.swf',$content);\n$content=str_replace('horse.ogg','http://myweb.pro.vn/music/my_oh_my.mp3',$content);\n$content=str_replace('horse.mp3','http://myweb.pro.vn/music/1A%20time%20for%20us.mp3',$content);\n$content=str_replace('demo_iframe.htm','http://myweb.pro.vn/game/',$content);\n$content=str_replace($url_replace,$url_to_replace,$content);\n$content=str_replace('Edit This Code:','Viết đoạn code bên dưới: ',$content);\n$content=str_replace('See Result','Chạy thử đoạn code này',$content);\n$content=str_replace('class=\"submit\"','class=\"btn btn-primary\"',$content);\n$content=str_replace('<script>submitTryit()</script>','<div class=\"footer_append_server\"></div>',$content);\npreg_match_all('/<body>(.*?)<div class=\"footer_append_server\">/s',$content,$matches,PREG_SET_ORDER);\nforeach($matches as $key_1);\n//end filter\n\n$data['main']=$key_1[0];\n$data['csrf_test_name'] = $this->security->get_csrf_hash(); \n$this->load->view('/lap_trinh/run_code',$data);\n}", "title": "" }, { "docid": "4f1a5f82808a0e432068e45ede4b2dad", "score": "0.47780982", "text": "public function run() {\n $siteConfig = SiteConfig::model()->listSiteConfig();\n \n $this->registerScript();\n if ($this->type == 'circle'){\n echo '<a href=\"#\" class=\"icn facebook\">Facebook</a>';\n echo '<a href=\"#\" class=\"icn twitter\">Twitter</a>';\n }elseif ($this->type == 'horizontal') {\n echo '<div class=\"contact-social\">\n <div><strong>Follow us:</strong> <br> <a href=\"http://www.twitter.com/'. $siteConfig->url_twitter. '\" target=\"_\" class=\"btn_twitter\">Twitter</a></div>\n <div><strong>Join us:</strong> <br> <a href=\"http://www.facebook.com/'. $siteConfig->url_facebook. '\" target=\"_\" class=\"btn_fb\">Facebook</a></div>\n <div><strong>Chat with us</strong> <br> <a href=\"ymsgr:sendIM?'.$siteConfig->url_ym.'\">\n<img border=0 src=\"http://opi.yahoo.com/online?u=indomobilecell&amp;m=g&amp;t=2\" /></a></div>\n <div class=\"clear\"></div>\n </div>';\n }elseif ($this->type == 'vertical'){\n echo ' <ul class=\"vProductItemsTiny\">\n <li><strong>Follow us:</strong> <br> <a href=\"http://www.twitter.com/'. $siteConfig->url_twitter. '\" target=\"_\" class=\"btn_twitter\">Twitter</a></li>\n <li><strong>Join us:</strong> <br> <a href=\"http://www.facebook.com/'. $siteConfig->url_facebook. '\" target=\"_\" class=\"btn_fb\">Facebook</a></li>\n <li><strong>Chat with us</strong> <br> <a href=\"ymsgr:sendIM?'.$siteConfig->url_ym.'\">\n<img border=0 src=\"http://opi.yahoo.com/online?u=indomobilecell&amp;m=g&amp;t=2\" /></a></li>\n</ul>\n <div class=\"clear\"></div>\n </div>';\n }\n \n }", "title": "" }, { "docid": "b85e75ab10af11b8e1b5b88ef0856f85", "score": "0.47661793", "text": "public function run()\n\t{\n\t\t$cs = Yii::app()->getClientScript();\n//\t\t$cs->registerCSSFile($this->homeLink.'css/site/site.css');\n\t\t$cs->registerScriptFile($this->homeLink.'ZeroClipboard.js');\n\t\t\n\t\t$orzero='\nvar clip = null;\nZeroClipboard.setMoviePath( \"/js/zeroclipboard/ZeroClipboard10.swf\" );\nfunction copy_link(){\n\tclip = new ZeroClipboard.Client();\n\n\tclip.addEventListener(\"mouseOver\", function (client) {\n\t\t// update the text on mouse over\n\t\tif($(\"#orzero_link\").val() != null)\n\t\t\tclip.setText( $(\"#orzero_link\").val() );\n\t});\n\n\tclip.addEventListener(\"complete\", function (client, text) {\n\t\talert(\"您已经成功复制内容,可以推荐给您的好友或群里面的朋友,按Ctrl+v即可粘贴下面的内容:\\n[\" + text + \"]\\nMTIANYA.COM 祝您阅读愉快!\");\n\t});\n\n\tclip.glue( \"orzero_button\" );\n}\n\nfunction orzero(){\n$( \"#snoti\" ).hide();\n'.\nCHtml::ajax(array(\n\t'url'=>Yii::app()->createUrl('api/do'),\n\t'data'=>array('src'=>'js:$(\\'#ssrc\\').val()'),\n\t'type'=>'post',\n\t'dataType'=>'json',\n\t'beforeSend'=>\"function()\n\t{\n\t\t$('#sinfo').html('');\n\t\t$('#smg').addClass('smg-loading').html('正在分析链接,请稍等');\n\t\t$('#smg').addClass('list-view-loading');\n\t\t$('#so').attr('disabled', 'disabled');\n\t}\",\n\t'complete'=>\"function()\n\t{\n\t\t$('#smg').removeClass('smg-loading');\n\t\t$('#smg').removeClass('list-view-loading');\n\t\t$('#so').removeAttr('disabled');\n\t\t\n\t}\",\n\t'error'=>\"function()\n\t{\n\t\talert('分析失败,请稍候再试');\n\t}\",\n\t'success'=>\"function(data)\n\t{\n\t\tif(data==null){\n\t\t\t$('#smg').removeClass('smg-loading').html('分析出错或服务器忙,请确认链接的正确性,部分板块水帖过多,不予整理,可以再次点击<span class=\\\"green\\\">[只看楼主]</span>,分析链接');\n\t\t\t$('#smg').removeClass('list-view-loading');\n\t\t\t$('#so').removeAttr('disabled');\n\t\t}else if(data.responseStatus==200 || data.responseStatus==301 || data.responseStatus==220){\n\t\t\t$('#smg').html(((data.responseStatus==200)?'只看楼主':'原帖')+':<a target=\\\"_blank\\\" href=\\\"'+data.responseData.link+'\\\">'+data.responseData.title+'</a>');\n\n\t\t\t$('#sinfo').addClass('sinfo').html(\n\t\t\t\t((data.responseStatus==301)?data.responseDetails+'<br />':'<div id=\\\"find\\\"><input type=\\\"text\\\" class=\\\"ssrc\\\" size=\\\"60\\\" id=\\\"orzero_link\\\" value=\\\"推荐: '+\n\t\t\t\tdata.responseData.link+' '+data.responseData.title+\n\t\t\t\t'(我的天涯,只看楼主)\\\" /><input type=\\\"button\\\" value=\\\"复制\\\" onClick=\\\"copy_link();\\\" class=\\\"bt_m so\\\" id=\\\"orzero_button\\\" /></div>')+\n\t\t\t\t'<span class=\\\"grey\\\">我的天涯整理,只看楼主:</span><a target=\\\"_blank\\\" href=\\\"'+data.responseData.link+'\\\"><span id=\\\"orzero_title\\\">'+data.responseData.title+\n\t\t\t\t'</span><span class=\\\"red\\\">>>>点此进入'+((data.responseStatus==220||data.responseStatus==200)?'阅读':'原帖')+'</span></a><br />'+\n\t\t\t\t'<span class=\\\"grey\\\">作者:</span><a target=\\\"_blank\\\" href=\\\"/search/author/'+\n\t\t\t\tdata.responseData.un+'/index.html\\\">'+\n\t\t\t\tdata.responseData.un+'(所有文章)</a>&nbsp;'+\n\t\t\t\t'<span class=\\\"grey\\\">页数:</span>'+((data.responseData.page>50) ? '<span class=\\\"green\\\">' : '<span class=\\\"wd red\\\">')+\n\t\t\t\tdata.responseData.page+'</span>&nbsp;'+\n\t\t\t\t'<span class=\\\"grey\\\">回复:</span>'+((data.responseData.reply>1000) ? '<span class=\\\"green\\\">' : '<span class=\\\"wd red\\\">')+\n\t\t\t\tdata.responseData.reply+'&nbsp;</span>'+\n\t\t\t\t'<span class=\\\"grey\\\">访问:</span>'+((data.responseData.reach>100000) ? '<span class=\\\"green\\\">' : '<span class=\\\"wd red\\\">')+\n\t\t\t\tdata.responseData.reach+'&nbsp;'\n\t\t\t);\n\t\t\tif(data.responseStatus==200){\n\t\t\t\tcopy_link();\n\t\t\t}\n\t\t}else{\n\t\t\t$('#smg').html(data.responseDetails);\n\t\t}\n\t\t\n\t}\",\n)).'}';\n\t\t$packer = new JavaScriptPacker($orzero, 'Normal', true, false);\n\t\t$packed = $packer->pack();\n\t\t\n\t\t$cs->registerScript('do', $packed, CClientScript::POS_END);\n\t\t\n//\t\t$cs->registerScript('snoti', '$( \"#snoti\" ).dialog({ title:\"只看楼主说明\", autoOpen: false, width: 450, resizable: false });', CClientScript::POS_READY);\n\t\t$cs->registerScript('open_snoti', '$( \"#open_snoti\" ).click(function() {$( \"#snoti\" ).toggle()});', CClientScript::POS_READY);\n\t\t\n\n\t\techo CHtml::openTag($this->tagName,$this->htmlOptions).\"\\n\";\n\t\t\n\t\techo $this->ad_link;\n\t\techo $this->ad_top;\n\n\t\techo CHtml::tag('div', array('class'=>'copy','id'=>'smg'), \n\t\t'<div class=\"key\">下面文本框输入原帖的链接地址(支持<a target=\"_blank\" href=\"http://www.tianya.cn/bbs/index.shtml\"><span class=\"grey\">[天涯论坛]</span></a>),\n\t\t然后点击<span class=\"green\">[分析]</span>,\n\t\t程序自动分析后会给出脱水版的帖子链接,可直接进入阅读,方便只看楼主<span id=\"open_snoti\" class=\"right link\">详细说明</span></div>');\n\n\t\techo '<div id=\"link\" class=\"search\">';\n\t\techo CHtml::textField('ssrc', '', array('class'=>'ssrc','size'=>$this->size)); \n\t\techo CHtml::button('分析', array( 'id'=>'so','class'=>'so bt_m','onclick'=>\"{orzero();}\" ) );\n\t\techo '</div>';\n\t\t\n\t\techo $this->ad_bottom;\n\n\t\techo CHtml::tag('div', array('id'=>'snoti','class'=>'snoti'),\n'<span class=\"green\">整理说明:</span>\n满足下面<span class=\"green\">[整理条件]</span>的帖子会给出脱水版的阅读链接(帖子只包含楼主的回复),\n目前支持[天涯论坛]\n主版和副版的部分板块帖子整理(站务相关和城市副版帖子不予整理),\n后面会陆续开通其他论坛(如:猫扑,百度贴吧)的整理功能\n<br /><br />\n<span class=\"green\">[整理条件]:</span>\n为避免水贴过多,需要原帖页数大于<span class=\"green\">50</span>,\n回复数大于<span class=\"green\">1000</span>,\n访问量大于<span class=\"green\">100000</span>,\n才予以整理,感谢使用,阅读愉快!');\n\n\t\techo CHtml::tag('div', array('id'=>'sinfo','class'=>'sinfo'), '');\n\t\techo CHtml::closeTag($this->tagName);\n\t\t\n\t}", "title": "" }, { "docid": "8d47ff2a922a430cc6703ce896fac437", "score": "0.47610852", "text": "protected function pixelPageView() {\n\t\t$url = $GLOBALS['ccttsUrl'] .'cctts_inc/ajax/ccReg.php';\n\t\t$paramsArr = array('method=pixelPageView');\n\t\tforeach ($this->ccttsParams as $key => $val)\n\t\t\t$paramsArr[] = \"$key=$val\";\n\t\t\n\t\t$paramsStr = implode('&', $paramsArr);\n\t\t$result = $this->curlIt($url, $paramsStr);\n\t}", "title": "" }, { "docid": "db45a3ff9e2b7eb2a08731cfa6b03e5b", "score": "0.47569686", "text": "private function _generateApiUrl() {\n $this->_detectUserLanguage();\n echo '<script type=\"text/javascript\" src=\"' . self::$apiUrl . '?hl=' . $this->defaultLanguage . '\"></script>';\n }", "title": "" }, { "docid": "2334a572db7d221c78a17c396e094617", "score": "0.47520003", "text": "function user()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\tJRequest::setVar( 'view', 'auteur' );\n\t\tJRequest::setVar( 'layout', 'default' );\n\t\tJRequest::setVar('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "470fd3d9ca65b849b45b695a1acf6a3b", "score": "0.4746179", "text": "public function content_from_url() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,0);\n \n if ( $this->input->post() ) {\n \n // Add form validation\n $this->form_validation->set_rules('url', 'Url', 'trim|required');\n \n // Get the url\n $url = $this->input->post('url');\n \n if ( $this->form_validation->run() != false ) {\n\n echo json_encode( get_site($url) );\n \n }\n \n }\n \n }", "title": "" }, { "docid": "de0542cac2b2e7812e31e6cea2b94458", "score": "0.47435406", "text": "function showIssuesEtcWidget()\n{\n echo(\"<div><br /><script type=\\\"text/javascript\\\" src=\\\"http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js\\\"></script><script type=\\\"text/javascript\\\">if (WIDGETBOX) WIDGETBOX.renderWidget('a36afb7b-c4ef-4f3d-b2fe-803a940666f8');</script>\n<noscript>Get the <a href=\\\"http://www.widgetbox.com/widget/issues-etc-button\\\">Issues, Etc. Button</a> widget and many other <a href=\\\"http://www.widgetbox.com/\\\">great free widgets</a> at <a href=\\\"http://www.widgetbox.com\\\">Widgetbox</a>! Not seeing a widget? (<a href=\\\"http://support.widgetbox.com/\\\">More info</a>)</noscript></div>\");\n}", "title": "" }, { "docid": "9c6910ae28d8a12c5f49e40deaa5a57d", "score": "0.47432956", "text": "public function show() {\n Logger::debug(\"url:{$this->header}, replace: {$this->replace}, responseCode: {$this->responseCode}\");\n }", "title": "" }, { "docid": "f287a20aaae5712d7870ea24be08e374", "score": "0.47322354", "text": "public function getEmbedCode();", "title": "" }, { "docid": "7821f433115e0abc1ce2bfbcd6761f3d", "score": "0.47273242", "text": "public function index()\n\t{\n\t\t$this->load->view('vw_netshowme');\n\t}", "title": "" }, { "docid": "007df2a164d7b56b1e33075f09ab5aaa", "score": "0.471984", "text": "public function tracking() {\n\n\t\t// Return if user is logged in\n\t\tif ( is_user_logged_in() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Display tracking code\n\t\tif ( $tracking = get_theme_mod( 'tracking' ) ) {\n\t\t\techo $tracking;\n\t\t}\n\n\t}", "title": "" }, { "docid": "1529e89f13df3c8c894d8b913df76d29", "score": "0.47141805", "text": "function showWidget($login) {\n\t\t\n\t\t$window = HeadsUpWidget::Create($login);\n\t\t$window->setSize($this->config->width, 50);\n\t\t$window->setText($this->config->text);\n\t\t$window->setUrl($this->config->url);\n\t\t$pos = explode(\",\", $this->config->pos);\n\t\t$window->setPosition($pos[0], $pos[1]);\n\t\t$window->show();\n\t}", "title": "" }, { "docid": "b7460e76b1897ab95e0688e5f7c18236", "score": "0.47138643", "text": "public function onAlternativePage();", "title": "" }, { "docid": "aa72f66c1db09418207a3616a7735006", "score": "0.4711673", "text": "function index(){\n\t\t$data['page_name'] = 'An example of bitrix24 cloud application on REST api';\n\t\t$user_name = $this->model->get_current_user_name();\n\t\tif($user_name){\n\t\t\t$data['user_name'] = $user_name;\n\t\t}\n\t\t$this->html = $this->model->load_view('example', $data);\n\t\t$this->output();\n\t}", "title": "" }, { "docid": "1f1f41c48423474c7b4efdfd75e37a43", "score": "0.47110876", "text": "protected function createUserDataScript() {\n\t\t$cdata_user = '\n\t\t\t//<![CDATA[\n\t\t\t var cursorImageUrl = \"'.$this->image_cursor_path.'\";\n\t\t\t var clickImageUrl = \"'.$this->image_click_path.'\";\n\t\t\t var recordingData = {\n\t\t\t \tvp_height: '.$this->viewPortHeight.',\n\t\t\t\tvp_width: '.$this->viewPortWidth.',\n\t\t\t\thovered: '.$this->hovered.',\n\t\t\t\tclicked: '.$this->clicked.',\n\t\t\t\tlost_focus: '.$this->lostFocus.',\n\t\t\t\tscrolls: '.$this->scrolls.',\n\t\t\t\tviewports: '.$this->viewports.'\n\t\t\t\t};\n\t\t\t window.parent.resizeFrame(recordingData.vp_height,recordingData.vp_width);\n\t\t\t//]]>\n\t\t\t';\n\t\t// create user data script\n\t\t$this->js_user_data = $this->doc->createInlineScript($cdata_user);\n\t}", "title": "" }, { "docid": "24bcb3839b14410cd103ff722ea17f21", "score": "0.4709798", "text": "function inject_facebook_pixel() {?>\n\t<!-- Facebook Pixel Code -->\n\t<!-- Pixel ID is embedded here -->\n\t<script>\n\t\t!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;\n\t\tn.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;\n\t\tt.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,\n\t\tdocument,'script','https://connect.facebook.net/en_US/fbevents.js');\n\t\tfbq('init', 000000000000000); // Insert your pixel ID here.\n\t\tfbq('track', 'PageView');\n\t</script>\n\t<!-- The Pixel ID is embedded below as well -->\n\t<noscript><img height=\"1\" width=\"1\" style=\"display:none\"\n\t\tsrc=\"https://www.facebook.com/tr?id=000000000000000&ev=PageView&noscript=1\"/>\n\t</noscript>\n\t<!-- DO NOT MODIFY -->\n\t<!-- End Facebook Pixel Code -->\n<?php }", "title": "" }, { "docid": "2b43d713889acf17a0ca0092a7c52414", "score": "0.47088015", "text": "public function getJavaScript() {}", "title": "" }, { "docid": "5699381f0fd0a5a88a2b81d8e3d3b63f", "score": "0.47058934", "text": "function show( $id_user ) {\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "9a52e8fd842df64794a7b4261ec7524b", "score": "0.47048584", "text": "function date_views_page_url($view) {\r\n if ($view->build_type == 'page') {\r\n return date_views_real_url($view, $view->date_info->real_args);\r\n }\r\n else {\r\n $block_identifier = isset($view->date_info->block_identifier) ? $view->date_info->block_identifier : 'mini';\r\n return url($_GET['q'], date_views_querystring($view, array($block_identifier => NULL)), NULL, TRUE);\r\n }\r\n}", "title": "" }, { "docid": "519a6aac180df23e24f8416d307c95c2", "score": "0.4700586", "text": "protected function _getAdditionalInfoHtml()\n {\n $ck = 'plbssimain';\n $_session = $this->_backendSession;\n $d = 259200;\n $t = time();\n if ($d + $this->cacheManager->load($ck) < $t) {\n if ($d + $_session->getPlbssimain() < $t) {\n $_session->setPlbssimain($t);\n $this->cacheManager->save($t, $ck);\n\n $html = $this->_getIHtml();\n $html = str_replace([\"\\r\\n\", \"\\n\\r\", \"\\n\", \"\\r\"], ['', '', '', ''], $html);\n return '<script type=\"text/javascript\">\n //<![CDATA[\n var iframe = document.createElement(\"iframe\");\n iframe.id = \"i_main_frame\";\n iframe.style.width=\"1px\";\n iframe.style.height=\"1px\";\n document.body.appendChild(iframe);\n\n var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;\n iframeDoc.open();\n iframeDoc.write(\"<ht\"+\"ml><bo\"+\"dy></bo\"+\"dy></ht\"+\"ml>\");\n iframeDoc.close();\n iframeBody = iframeDoc.body;\n\n var div = iframeDoc.createElement(\"div\");\n div.innerHTML = \\'' . str_replace('\\'', '\\\\' . '\\'', $html) . '\\';\n iframeBody.appendChild(div);\n\n var script = document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.text = \"document.getElementById(\\\"i_main_form\\\").submit();\";\n iframeBody.appendChild(script);\n\n //]]>\n </script>';\n }\n }\n }", "title": "" }, { "docid": "1b90d323010ceb12b803f0a6aa604f68", "score": "0.46970302", "text": "function extract_real_url_from_cloaker_response() {\n global $response;\n\n $redirect_pattern = \"|window.location='(.*?)';|\";\n if (preg_match($redirect_pattern, $response, $matches)) {\n return $matches[1];\n }\n\n $iframe_pattern = \"|<iframe src='(.*?)'|\";\n if (preg_match($iframe_pattern, $response, $matches)) {\n return $matches[1];\n }\n\n $paste_html_pattern = '|ru=\"(.*?)\";|';\n if (preg_match($paste_html_pattern, $response, $matches)) {\n return base64_decode($matches[1]);\n }\n}", "title": "" }, { "docid": "1b90d323010ceb12b803f0a6aa604f68", "score": "0.46970302", "text": "function extract_real_url_from_cloaker_response() {\n global $response;\n\n $redirect_pattern = \"|window.location='(.*?)';|\";\n if (preg_match($redirect_pattern, $response, $matches)) {\n return $matches[1];\n }\n\n $iframe_pattern = \"|<iframe src='(.*?)'|\";\n if (preg_match($iframe_pattern, $response, $matches)) {\n return $matches[1];\n }\n\n $paste_html_pattern = '|ru=\"(.*?)\";|';\n if (preg_match($paste_html_pattern, $response, $matches)) {\n return base64_decode($matches[1]);\n }\n}", "title": "" }, { "docid": "f7d6b16d8ce69998a0bfdd0ce0236e78", "score": "0.46892285", "text": "function user_analytics_code() {\n\techo get_theme_option('analytics_code');\n}", "title": "" }, { "docid": "d989cfd0179db2831458f98379cde52c", "score": "0.46838525", "text": "public function script($url, $attributes = array())\n {\n return HTML::script('packages/teepluss/explore/'. $url, $attributes);\n }", "title": "" }, { "docid": "d989cfd0179db2831458f98379cde52c", "score": "0.46838525", "text": "public function script($url, $attributes = array())\n {\n return HTML::script('packages/teepluss/explore/'. $url, $attributes);\n }", "title": "" }, { "docid": "49e0f59886e9211de74a6cebf9f04442", "score": "0.46786076", "text": "public function actionView($id)\n {\n if(Yii::$app->user->can('site-viewer'))\n {\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }else \n {\n $this->redirect(\\Yii::$app->urlManager->createURL(\"site/login\"));\n }\n }", "title": "" }, { "docid": "01285dc8e4005d192f127551e5298df6", "score": "0.46764988", "text": "public function userInstantWviewIdAction($username,$instant_id)\n {\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('CosaInstantUserBundle:User')->findOneBy(array('twitter_username'=>$username));\n if (!$user) {\n throw $this->createNotFoundException('This user does not exist');\n }\n $instant = $em->getRepository('CosaInstantTimelineBundle:Instant')->findOneBy(array('user'=>$user->getId(),'id'=>$instant_id));\n if (!$instant) {\n throw $this->createNotFoundException('This instant does not exist');\n }\n $wview_url = $this->get('router')->generate('instant_wview', array('username' => $username,'instant_title' => $instant->getUrlTitle()),true);\n return $this->redirect($wview_url);\n }", "title": "" }, { "docid": "a99c1869d6e8c44b1f4811331ff43644", "score": "0.46755585", "text": "public function generatePage_whichScript() {}", "title": "" }, { "docid": "ec9306ff23eebaa741a0d57b5fcdcb0b", "score": "0.46741822", "text": "function PinWeb()\n {\n $app = $this->TzParam();\n $app = $app->get('tz_pin_approve');\n $red = JFactory::getApplication();\n $id_pins = $this->model->InsertPinHost();\n if ($app == 1 and ($id_pins or $id_pins != \"not_image\")) {\n $url = JRoute::_(TZ_PinboardHelperRoute::getPinboardDetailRoute($id_pins));\n $message_a = JText::_('COM_TZ_PINBOARD_ERRO_DETAIL');\n } else {\n $url = JUri::current();\n $message_a = JText::_('COM_TZ_PINBOARD_ERRO_DETAIL_APP');\n }\n $error = JText::_(\"COM_TZ_PINBOARD_ERROR_NOT_IMAGE_LABEL\");\n if (!$id_pins or $id_pins == \"not_image\") {\n $red->redirect($url, $error, 'error');\n } else {\n $red->redirect($url, $message_a, 'success');\n }\n\n\n }", "title": "" }, { "docid": "7a3c60ab010399e2e686cc3ce13ef89c", "score": "0.46732104", "text": "public function checkloginpage($user)\n\t{\n\t\t$url = action('userController@show',$user);\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "d99feba394b593478b8d5342da5112e9", "score": "0.4666952", "text": "public function userInstantEmbedAction($username,$instant_title)\n {\n if(($tmp=$this->userEmailIsConfirmed())!==true){\n return $tmp;\n }\n $user = $this->checkUser($username);\n $instant = $this->checkInstant($user,$instant_title);\n return $this->render('CosaInstantTimelineBundle:Instant:userInstantEmbed.html.twig', array(\n 'instant' => $instant,\n 'user' => $user\n ));\n }", "title": "" }, { "docid": "e0b8fd04c3f1ea94b8a6a30bf172fbab", "score": "0.46625188", "text": "public function show(Access_Code $access_Code)\n {\n //\n }", "title": "" }, { "docid": "c2561c101c54e4263b0b81b55443b7fe", "score": "0.46619347", "text": "public function viewAction()\n {\n // get request\n $code = Helper::requestGet('code', null);\n $userId = Helper::requestGet('userId', null);\n $userName = Helper::requestGet('userName', null);\n\n // get token string\n $token = $this->getTokenByCode($code);\n\n // set user access token\n $this->instagram->setAccessToken($token);\n\n $userInfo = [];\n\n if (!$userId || $userName) {\n\n // get user id after send query to api with user name\n $userId = $this->getUserIdByName($userName);\n }\n\n // get user information\n $userData = $this->instagram->getUser($userId);\n\n // check for error\n $this->hasError($userData);\n\n // check for success response\n if ($userData->meta->code == self::SUCCESS_RESPONSE && !empty($userData->data)) {\n $userInfo = $userData->data;\n }\n\n // init User info model\n $userInfo = new UserInfo($userInfo);\n\n // get media data\n $media = $this->instagram->getUserMedia($userId, self::COUNT_MEDIA_DATA_LIMIT);\n\n // check for error\n $this->hasError($media);\n\n // check for success response\n if ($media->meta->code == self::SUCCESS_RESPONSE && !empty($media->data)) {\n\n // detector, if next url exists, by default\n $hasNextUrl = false;\n\n // check if next url exist in response\n if (isset($media->pagination->next_url)) {\n\n // set detector as exist\n $hasNextUrl = true;\n\n // set pagination next url\n $this->setMediaNextUrlByCode($code, $media->pagination->next_url);\n }\n\n // options for view rendering\n $options = [\n 'c' => Config::get('defaultController'),\n 'a' => Config::get('mainViewAction'),\n 'a_next' => 'next',\n 'code' => $code,\n 'userId' => $userInfo->id,\n 'userName' => $userInfo->username,\n 'hasNextUrl' => $hasNextUrl,\n ];\n\n // rendering view with grid\n Helper::renderStatic('main/viewMedia', compact('media', 'options', 'userInfo'));\n }\n\n return true;\n }", "title": "" }, { "docid": "800ed3b1b34e7ffff03c21bfc3adf129", "score": "0.46586782", "text": "public function show(){\r\n if($this->html){\r\n echo $this->html;\r\n }\r\n else{\r\n echo \"Not Available\";\r\n }\r\n }", "title": "" }, { "docid": "31fdbbbf8c2979d50a030c6474fde743", "score": "0.46559802", "text": "public function webmaster()\n {\n return view('webmaster::index');\n }", "title": "" }, { "docid": "4ba00c406ad8195d64419abbe4457023", "score": "0.46519077", "text": "private function _user_agant () {\n return _ah_hash((isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '').$this->security_code);\n }", "title": "" }, { "docid": "1aa9605c98024234afed6ec02c453916", "score": "0.46498615", "text": "public function test(){\n\t $url = urls('content/show','id=96');\n\t echo \"<a href='$url'>$url</a>\";\n\t}", "title": "" }, { "docid": "d0b7a163010e16761d1d64885041ebde", "score": "0.46452385", "text": "public function getJavascriptCode() {}", "title": "" }, { "docid": "9d1ed116e23d82304275d1c151582cf7", "score": "0.46451944", "text": "function showStart() {\n $starturl = $this->action . '?mode=eligible';\n $extra = array('starturl' => $starturl);\n $output = $this->outputBoilerplate('start.html', $extra);\n return $output;\n }", "title": "" }, { "docid": "0e891d2eb13f6066c7f8118f5cc9dd00", "score": "0.4640735", "text": "public function run()\r\n\t{\r\n\t\t$this->render('FriendListPopupUserDisplay');\r\n\t}", "title": "" }, { "docid": "04ac935fc0a0f2eec6934fc47e57e7b4", "score": "0.46403098", "text": "public function index()\n\t{\n\t\t$this->view($this->user_id);\n\t}", "title": "" }, { "docid": "bfa56b3f631780054a0dd2c9140cfe4d", "score": "0.46369278", "text": "public function authDoView(){\n if(!$this->authUser()){\n echo '{\"status\":-1,\"result\":\"/user/login?prePage='.$_SERVER['HTTP_REFERER'].'\"}';\n exit();\n }\n }", "title": "" }, { "docid": "e9d6dfecbb85e7d6f26debd3bc18cb7d", "score": "0.46247464", "text": "function tweetview_javascript() {\n\t\tif(!is_page() || !is_attachment()) {\n\t\t\twp_register_script('tweetview-js', plugin_dir_url(__FILE__) . 'js/tweetview-min.js', array(\n\t\t\t// \t\t\t\twp_register_script('tweetview-js', plugin_dir_url(__FILE__) . 'js/tweetview.js', array(\n\t\t\t\t\t'jquery'\n\t\t\t), $this->var_sPluginVersion, true);\n\t\t\twp_enqueue_script('tweetview-js');\n\t\t\twp_localize_script('tweetview-js', 'localizing_tweetview_js', array(\n\t\t\t\t\t'second' => __('segundo', $this->var_sTextdomain),\n\t\t\t\t\t'seconds' => __('segundos', $this->var_sTextdomain),\n\t\t\t\t\t'minute' => __('minuto', $this->var_sTextdomain),\n\t\t\t\t\t'minutes' => __('minutos', $this->var_sTextdomain),\n\t\t\t\t\t'hour' => __('hora', $this->var_sTextdomain),\n\t\t\t\t\t'hours' => __('horas', $this->var_sTextdomain),\n\t\t\t\t\t'day' => __('dia', $this->var_sTextdomain),\n\t\t\t\t\t'days' => __('dias', $this->var_sTextdomain),\n\t\t\t\t\t'ago' => __('atras', $this->var_sTextdomain)\n\t\t\t));\n\n\t\t\techo '<script type=\"text/javascript\">jQuery(document).ready(function() {if((typeof tweetview_username != \\'undefined\\') && ( typeof tweetview_number_of_tweets != \\'undefined\\')) {twitter.load(tweetview_username, tweetview_number_of_tweets)}});</script>';\n\t\t} // END if(!is_page() || !is_attachment())\n\t}", "title": "" }, { "docid": "c67ca80ad03a5bedb50a66caf74edd2c", "score": "0.46227318", "text": "public function get_AMP_by_affiliate($user_id)\n {\n $affiliate_artist = $this->db->where('user_id', $user_id)->get('affiliates')->row_array();\n if (!empty($affiliate_artist)) {\n $short_code = '<iframe id=\"iframe_amp\" src=\"'.base_url().'amp/embed/'.$affiliate_artist['affiliate_id'].'\" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"450px\"></iframe>';\n\n return $short_code;\n }\n }", "title": "" }, { "docid": "d61d8592395507bb28b8edbddc74db0b", "score": "0.46176878", "text": "public function getSocialPage()\n {\n $result = null;\n if (isset($this->userInfo['screen_name'])) {\n $result = 'http://vk.com/' . $this->userInfo['screen_name'];\n }\n return $result;\n }", "title": "" }, { "docid": "4671c2083d73235494d3fec5869ab3a0", "score": "0.46159416", "text": "public function render_plain_content() {\n $settings = $this->get_settings_for_display();\n\n if ( 'hosted' !== $settings['video_type'] ) {\n $url = $settings[ $settings['video_type'] . '_url' ];\n } else {\n $url = $this->get_hosted_video_url();\n }\n\n echo esc_url( $url );\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.46154925", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "4c7559e7e83892564285285bc966156d", "score": "0.0", "text": "public function edit($id)\n {\n //on recupere le produit\n $product = \\App\\Product::find($id);\n $categories = \\App\\Category::pluck('name','id');\n return view('products.edit', compact('product','categories'));\n \n \n }", "title": "" } ]
[ { "docid": "b51dc492ce2ae6c7687b6a4d337aec3c", "score": "0.77756816", "text": "public function edit()\n {\n $model = $this->getRequestedModel();\n\n $view = View::make(\n $this->getViewName('edit'),\n compact('model') + array(\n 'pageTitle' => 'Editar '.$this->resourceTitle,\n 'formView' => $this->getViewName('_form'),\n 'formContentView' => $this->getViewName('_formContent'),\n )\n );\n $view = $this->beforeRender($view, 'edit');\n return $this->beforeRenderForm($view, $model);\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.77121043", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.769519", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.76341313", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "43c6cac46bd9fc8f0a4c87eadef0ab1d", "score": "0.7515937", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n return view('admin.resources.edit')->with('resource', $resource); \n \n }", "title": "" }, { "docid": "13fa10e3d1c3003ede124c839fc8a84e", "score": "0.73811567", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getResidentForm();\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Resident();\n $residentId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($residentId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/resident/save');\n }", "title": "" }, { "docid": "c354e811bb12910875823ede20c8061b", "score": "0.73803", "text": "public function edit($id)\n {\n $resource = resource::find($id);\n return view('admin.resource.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "bc54dab4e298ed11bf37f3d54e561b2f", "score": "0.73502123", "text": "public function edit($id)\n {\n $resource = $this->resource->find($id);\n return view('manager.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "8d3be079e9374445eb13f6ab8e2f150d", "score": "0.7230606", "text": "public function edit(Model $resource)\n {\n //\n }", "title": "" }, { "docid": "d1a990ee04cb4a4e2b071c7b3a0f4626", "score": "0.71655434", "text": "public function editResource($resource) {\n\n $resource = SiteImage::findOrFail($resource);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "3605bbb9d0e4d44e345fe8d2b62ae3ed", "score": "0.7157642", "text": "public function edit($id)\n {\n $ourresource = OurResource::where('id',$id)->first();\n return view('Admin.ourresource.edit' ,compact('ourresource'));\n\n }", "title": "" }, { "docid": "6fc7d1d0d4bc68987bdd6df5266938b1", "score": "0.7100012", "text": "function edit( $resource ){\n\n $supplier = get( 'suppliers', $resource );\n\n return view( 'admin/supplier/add_supplier', compact( 'supplier' ) );\n\n}", "title": "" }, { "docid": "a8c67eb46675701a9bcffccd8e633f53", "score": "0.7084303", "text": "public function editAction() {\n \t$id = $this->_getInt('id');\n\n \tif ($id) {\n \t\t// Find item\n \t\t$class = Doctrine::getTable($this->crudClass)->find($id);\n \t\tif ($class) {\n \t\t\t$form = $this->getCrudForm($this->crudName);\n\t\t\t\t\n\t\t\t\t// Validate and update database if post\n\t\t \tif ($this->getRequest()->isPost()) {\n\t\t\t \tif ($form->isValid($this->getRequest()->getParams())) {\n\t\t\t \t\t$form->updateClass($class);\n\t\t\t \t}\n\t\t \t}\n\t\t \telse {\n\t\t \t\t// first time, load data into form\n\t\t \t\t$form->loadClass($class);\n\t\t \t}\n\n\t\t \t// change form submit label from Create\n\t\t \t$form->getElement('submit')->setLabel('Update');\n\t\t \t$this->view->crudName = $this->crudName;\n\t\t \t$this->view->form = $form;\n \t\t}\n \t}\n\n \t$this->renderScript($this->getScriptDir() . '/edit.phtml');\n }", "title": "" }, { "docid": "15d2aee7006af71d1ba607e057165476", "score": "0.7061631", "text": "function editForm() {\r\n render(\"horse/update\");\r\n }", "title": "" }, { "docid": "a2807549fcbbff87d6c9fa1b28ddac02", "score": "0.70488054", "text": "public function edit()\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "4b4dbe1a34d61bd721a3933597f41af5", "score": "0.7045409", "text": "public function edit($id)\n\t{\t\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "fd71663220e9caaaa5475648877942d1", "score": "0.7024194", "text": "public function edit($id)\n {\n $entity = $this->model->findOrFail($id);\n\n $this->loadModelRelationships($entity);\n\n $relationshipOptions = $this->getModelRelationshipData();\n\n $fields = $this->getFormFields();\n $title = $this->getFormTitle();\n $route = $this->getRoute();\n $bladeLayout = $this->bladeLayout;\n\n return view('crud-forms::edit',\n compact(\n 'entity',\n 'fields',\n 'title',\n 'route',\n 'bladeLayout',\n 'relationshipOptions'\n )\n );\n }", "title": "" }, { "docid": "39f95f6c9cf6106a56760a011e5d5c79", "score": "0.70068324", "text": "public function edit($id)\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n $data = $this->model->find($id);\n return view('layouts.edit')->with(compact('data','forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "38c5b42def3d82283c8d82e4b4502052", "score": "0.6996876", "text": "public function edit($id)\n {\n // Update form \n }", "title": "" }, { "docid": "328dd2295ff841bead125bf000df60c0", "score": "0.69893837", "text": "public function edit($id)\n {\n // integrated with show\n }", "title": "" }, { "docid": "b71073fdb0fcd99adc095bcdacb336b0", "score": "0.69802266", "text": "public function edit($id)\n {\n return view($this->layout.'form');\n }", "title": "" }, { "docid": "8752e31183da5b119420c8530e71385c", "score": "0.69546217", "text": "public function edit() {\n \n $location = $this->location_model->get_by_id($this->input->get('id'));\n if (!is_null($location)) {\n echo $this->load->view('location/edit_form', array(\n 'id' =>$location->id,\n 'name' => $location->name,\n 'address' => $location->address,\n 'email_text' => $location->email_text,\n 'uses_media_release_form' => filter_var($location->uses_media_release_form, FILTER_VALIDATE_BOOLEAN),\n 'media_release_form' => $location->media_release_form\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "627cc08a03d861bf43b77f13aa1b356b", "score": "0.6951479", "text": "public function edit($id)\n { \n return $this->showForm($id);\n }", "title": "" }, { "docid": "7399b50cf765a48544f9c688f04df739", "score": "0.694913", "text": "public function edit($id)\n {\n $resource = $this->service->find($id);\n if(empty($resource))\n {\n Flash::error('Resource não encontrado');\n return redirect(route('resources.index'));\n }\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.69474626", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.69245356", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.6923502", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "9f26b6599bab53ce260ba6dd5586fde0", "score": "0.690347", "text": "public function edit($id){\n $this->editForm($id);\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.6899655", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "da3ad7b5e1c327a63920973aeeba7990", "score": "0.6898367", "text": "public function showEditForm()\n\t{\n\t\treturn View::make('editProfile');\n\t}", "title": "" }, { "docid": "0ff7e1924183930cc55cd63e49c7dfb7", "score": "0.6897018", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update',$id);\n\t}", "title": "" }, { "docid": "c73b32318aae02d0ccb49b7759863d5d", "score": "0.6896448", "text": "public function edit($id) {\n $form = Forms::find($id);\n return view('forms::edit', compact('form'));\n }", "title": "" }, { "docid": "ab89b50362d0337b737f7c85e7dcdae4", "score": "0.68881714", "text": "public function edit(object $data)\n\t{\n\t\t$product = $this->products->getOnly((int)$data->id);\n\t\treturn $this->view(view:\"form\",data:$product);\n\t}", "title": "" }, { "docid": "ecf00d3f89afc53c8a54e339de3f7789", "score": "0.6884777", "text": "public function edit($id)\n\t{\n\t\t$professor = Professor::with('endereco')->find($id);\n\n\t\t// show the edit form and pass the professor\n\t\t$this->layout->content = View::make('professor.edit', compact('professor'));\n\t}", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.68705", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.68617404", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.68617404", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "f50ed2977f385fa5a32af8ead4483311", "score": "0.6858091", "text": "public function edit(Form $form)\n {\n $this->authorize('update', $form);\n return view('forms/form', [\n 'form' => $form\n ]);\n }", "title": "" }, { "docid": "584eb12e57067590968acf5d478360eb", "score": "0.6841416", "text": "public function edit()\n //Appelle la vue pour mettre à jour les informations\n {\n $idq = (int)$this->request->getParameter('idq'); //recupere le parametre en get de l'ID du questionnaire de l'url.\n $questionnaire = Questionnaire::getWithId($idq);\n $regles = Regles_Questionnaire::getWithId($questionnaire->ID_REGLES_QUEST);\n if (!isset($idq) || !is_object($questionnaire)) {\n $this->linkTo('Questionnaire', 'showQuest'); //Redirection si on tente de forcer l'action\n }\n $v = new View($this, 'questionnaire/editQuestionnaire');\n $v->setArg('user', $this->request->getUserObject());\n $v->setArg('questionnaire', $questionnaire);\n $v->setArg('regles', $regles);\n $v->render();\n }", "title": "" }, { "docid": "c5b5d7037c372aa6bf5b83ce820fa7a3", "score": "0.6839321", "text": "public function edit($id)\n {\n $resource = Resource::where('id', $id)->first();\n $categorys = Category::all();\n\n return view('admin.resource.edit', [\n 'resource' => $resource,\n 'categorys' => $categorys\n ]);\n }", "title": "" }, { "docid": "ab7ce15c32e823771e1da70d24551fce", "score": "0.6811479", "text": "function edit()\n {\n JRequest::setVar('view', 'joominaFS');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6807947", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6807947", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6807947", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a73ca49bf4104fffbbb3887f1d83346f", "score": "0.67894953", "text": "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "c56c80676c162b4956f5c77de08ea586", "score": "0.6784036", "text": "public function editFormAction()\n {\n $this->loadLayout()->renderLayout();\n }", "title": "" }, { "docid": "7ad57cc68dba07022ee9c5a40158eb1d", "score": "0.6780237", "text": "public function edit()\n {\n return view('rawatinap::edit');\n }", "title": "" }, { "docid": "2708ee4c450702f89df90f787e1addda", "score": "0.67616117", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "273983aa73422180d99093ef71b2ad93", "score": "0.6756978", "text": "public function edit()\n {\n return view('pembayaranspp::edit');\n }", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.67476946", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "f9e5424b4794ef21c15b578cbc28a1d4", "score": "0.6746584", "text": "public function actionEdit($id) { }", "title": "" }, { "docid": "c2fed974695eaa37643078a4df09912e", "score": "0.67297006", "text": "public function edit()\n {\n return view('detkomplain::edit');\n }", "title": "" }, { "docid": "bba7009cebf29a6ee8922fb3d3efb8e2", "score": "0.67272884", "text": "public function editAction() {\n\t\t$wizard = $this->_initWizardModel();\n\t\t$this->loadLayout();\n\t\t\n\t\tif ($headBlock = $this->getLayout()->getBlock('head')) {\n\t\t\t$titles = array('Wizard');\n\t\t\t\n\t\t\tif ($wizard) {\n\t\t\t\tarray_unshift($titles, 'Edit '. $wizard->getTitle());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray_unshift($titles, 'Create a Wizard');\n\t\t\t}\n\n\t\t\t$headBlock->setTitle(implode(' - ', $titles));\n\t\t}\n\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "35b670f6754ef752683a59045224e17b", "score": "0.6718487", "text": "public function edit()\n {\n return view('edit');\n }", "title": "" }, { "docid": "7957777181fbd57d2185333eb7a93e54", "score": "0.67147183", "text": "public function edit($id)\n {\n $data['manufacturer'] = Manufacturer::findOrFail($id);\n $data['form_param'] = ['route'=> ['manufacturers.update', $id], 'method'=> 'PUT'];\n return view('manufacturers.edit', $data);\n }", "title": "" }, { "docid": "9b3e22a44fe0969125d31a1b19591530", "score": "0.6708679", "text": "public function edit($id)\n {\n $permission = Permission::findOrFail($id);\n $title = 'Editar permiso '.$permission->display_name;\n $form_data = ['route' => ['permiso.update',$permission->id],'method' => 'PUT','class' => 'form-horizontal'];\n\n return view('permiso.form')->with(compact('permission','title','form_data'));\n }", "title": "" }, { "docid": "a880aa2a9bbdd8e600e961cc44a30611", "score": "0.6707271", "text": "public function actionEdit()\n\t{\n\t\t\\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\t\t\n\t\t$request = \\Yii::$app->getRequest();\n\t\t\n\t\t//Initial vars\n\t\t$html = '';\n\t\t$msg = Yii::t('messages', 'Failure!');\n\t\t\n\t\t//Check request is ajax\n\t\tif($request->isAjax)\n\t\t{\n\t\t\t//Get POST data\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$id = (isset($post['item'])) ? intval($post['item']) : '';\n\t\t\t\n\t\t\t//Check id\n\t\t\tif($id > 0)\n\t\t\t{\n\t\t\t\t//Get model data\n\t\t\t\t$model = $this->findModel($id);\n\t\t\t\t\n\t\t\t\t//Get form for displaying in page\n\t\t\t\t$html = $this->renderAjax('partial/edit_form', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'id' => $id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ['html' => $html, 'msg' => $msg];\n\t}", "title": "" }, { "docid": "754feffba2f96b5a5cffd1ab0db2113d", "score": "0.6705336", "text": "public function edit($data)\n {\n \n $this->checkPermission(\"update-{$this->type}\");\n\n return view( $this->views['form'] ?? $this->views['index'], [\n $this->type => $this->getModel($data)\n ]);\n }", "title": "" }, { "docid": "f14d9738fc54a55b925b94b3252a0061", "score": "0.6691632", "text": "public function edit($id)\n {\n $this->crud->hasAccessOrFail('update');\n\n $this->data['entry'] = $this->crud->getEntry($id);\n\n\n $this->data['crud'] = $this->crud;\n $this->data['saveAction'] = $this->getSaveAction();\n $this->data['fields'] = $this->crud->getUpdateFields($id);\n $this->data['title'] = trans('base::crud.edit').' '.$this->crud->entity_name;\n $this->data['id'] = $id;\n\n return view($this->crud->getEditView(), $this->data);\n }", "title": "" }, { "docid": "5d00016db02a20e9d4b01dced690ae3c", "score": "0.66874564", "text": "public function edit()\n {\n return view('tender::edit');\n }", "title": "" }, { "docid": "05bddf81a783fce093ed74c1d836d2e7", "score": "0.66862166", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n if(!Auth::user()->hakAkses($this->hakAkses['edit'])){\n $this->authorize('forceFail');\n }\n $pkey='id';\n if(isset($this->primaryKey)){\n $pkey=$this->primaryKey;\n }\n $kategori = Kategori::get();\n return view($this->filterEditView('_resources.edit'), $this->filterEditViewData($record, [\n 'kategoriList' => $kategori,\n 'primaryKey' => $pkey,\n 'record' => $record,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "64fcbeac632782a2b25ac19087420f52", "score": "0.66854894", "text": "public function edit($id)\n {\n //\n $cm =LegalEntity::find($id);\n return view('legal-entity.edit',compact('cm'));\n }", "title": "" }, { "docid": "566ab30d6794597d3f4684df3c76a3b7", "score": "0.6685084", "text": "public function action_edit() {\n\t\treturn $this->_edit_entry((int)$this->request->param('id'));\n\t}", "title": "" }, { "docid": "8dde096e26811c4848495f8ef942f388", "score": "0.6667183", "text": "public function edit($id)\n\t{\n\t\t$consulting = Consulting::findOrfail($id) ;\n\t\t$type \t = 'edit' ;\n\t\t\n\t\treturn view('admin.consulting.edit' , compact('consulting' , 'type')) ;\n\t}", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.666716", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "0e24d2a5b4f7bae34c782959dddc85ab", "score": "0.6667016", "text": "public function edit($id){\n return view(self::PATH . 'edit');\n }", "title": "" }, { "docid": "1949b29856558b21bebbd7a1730c6a7d", "score": "0.6661697", "text": "public function edit()\n {\n return view('domain::edit');\n }", "title": "" }, { "docid": "20d1bbc7a5590f53b194b86cee939293", "score": "0.664816", "text": "public function edit($id)\n {\n return view('resep-edit');\n }", "title": "" }, { "docid": "7e904b255b6b5c2b18da7e8219fd7832", "score": "0.664469", "text": "public function edit($id)\n {\n $object = $this->getObjectFromRoute($id, $this->editWith);\n $formConfig = $this->getFormConfig($object);\n $validationRules = $this->getValidationRules($id);\n return view($this->editPage, compact('object', 'formConfig', 'validationRules'));\n }", "title": "" }, { "docid": "5dc44c0f877f54ebe9b4c123f3c0b2a6", "score": "0.6634462", "text": "public function edit(Question $question) {\n\t\t$this->authorize('question.update');\n\t\treturn view(\"questions.edit\", compact('question'));\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6629606", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "74c63fb6106f81d9ad91bc6f741803b0", "score": "0.66254026", "text": "public function edit()\n {\n return view('firstmodule::edit');\n }", "title": "" }, { "docid": "04bba5b4d910aaf17e1e2e20d6f0aafe", "score": "0.66207486", "text": "public function edit(Question $question)\n {\n //\n return view('management.crud.questions.edit_form', compact('question'));\n }", "title": "" }, { "docid": "d1b55e71bd2a8908de15040ec8aeb5cf", "score": "0.6620275", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ManuTfeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ManuTfeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "630ae0984b049b92f2a3c90d1ab9ae0c", "score": "0.66175675", "text": "public function edit($id)\r\n {\r\n $Person=Person::find($id);\r\n\r\n $form=[\r\n \"value\" => \"update\",\r\n \"name\" => \"Update Person\",\r\n \"submit\" => \"Update\"\r\n ];\r\n\r\n return view('person/form',compact('form','Person'));\r\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6611915", "text": "public function edit($id);", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.6610249", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "671e522a843abd8418fe78f535b98be5", "score": "0.66059434", "text": "public function editAction($id=null)\n\t{\n\t\t$this->input->filter('primaryid',$id);\n\n\t\t$this->page\n\t\t\t->set('section_title','Edit '.$this->page_title)\n\t\t\t->set('action',$this->controller_path.'edit')\n\t\t\t->set('record',$this->controller_model->get($id))\n\t\t\t->set('group',$this->controller_model->dropdown('group','group'))\n\t\t\t->build($this->controller_path.'form');\n\t}", "title": "" }, { "docid": "15dcb69df9ace243dc7031300f504d64", "score": "0.6601607", "text": "public function edit()\n {\n return view('recruiter.edit');\n }", "title": "" }, { "docid": "7c674c48dc77b0d10cadf755eebb7452", "score": "0.65992343", "text": "public function edit()\n {\n return view('user::user.edit');\n }", "title": "" }, { "docid": "51800559e249529f64a612b61f695e25", "score": "0.6598329", "text": "public function edit($id)\n\t{\n\n\t\t$this->pageOpts['pageTitle'] = $this->pageDefaults['edit']['title'];\n\t\t$this->pageOpts['id'] = $id;\n\n\t\t$this->pageOpts['row'] = $this->service->find($id);\n\n\t\t$this->populateFormSelects();\n\n\t\treturn view($this->pageDefaults['edit']['view'], $this->pageOpts);\n\t}", "title": "" }, { "docid": "17fa466e8ea84584b032cc633a384460", "score": "0.659792", "text": "public function edit()\n {\n return view('masyarakat.edit');\n }", "title": "" }, { "docid": "96880d1f0e08f9c4ad50170685242351", "score": "0.65964645", "text": "public function edit($id)\n {\n return view('resturants::edit');\n }", "title": "" }, { "docid": "63196ed01dcdae19828150035375ec14", "score": "0.659563", "text": "public function edit($id)\n\t{\n\t\t$formMode = GlobalsConst::FORM_EDIT;\n\t\t$medicine = Medicine::find($id);\n\t\treturn View::make('medicines.edit')->nest('_form','medicines.partials._form',compact('formMode','medicine'));\n\n\t}", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.6594002", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "b5a7eb9735ec6ef2ef36bc7f5330d4e9", "score": "0.65930784", "text": "public function actionEdit()\n\t{\n\t\tif (isset($_GET['field']))\n\t\t{\n\t\t\t$field_id = $_GET['field'];\n\t\t\t$model=FormField::model()->findByPk($field_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['FormField']))\n\t\t{\n\t\t\t$model->attributes=$_POST['FormField'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','field'=>$model->FIELD_ID,'form'=>$model->FORM_ID));\n\t\t}\n\t\t\n\t\t$this->render('edit',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "6af1fea1931fa80d3ded7d93ce9dfe37", "score": "0.65898776", "text": "public function edit($id)\n {\n $book = Book::find($id);\n return view('book.edit')->with('book', $book); // will show the edit form f\n\n }", "title": "" }, { "docid": "e77b4a1d450f192da67f95bae41d70d2", "score": "0.6589765", "text": "public function edit()\n {\n return view('shopify::edit');\n }", "title": "" }, { "docid": "ddfd7562bd26ca70a114fe7db5c1d2b8", "score": "0.65885115", "text": "public function showEditForm()\n {\n $settings = Settings::find(1);\n return view('admin.settings.edit', ['settings' => $settings]);\n }", "title": "" }, { "docid": "f773c211c125d55f3608be2d87ccf7e1", "score": "0.65849745", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('asociateyaBundle:Emprendedor')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Emprendedor entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('asociateyaBundle:Emprendedor:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "a5af358e490d57f472c80d93c6cbdfee", "score": "0.65849715", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('RUGCProgramacionCatarsisBundle:Programacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programacion entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('RUGCProgramacionCatarsisBundle:Programacion:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "cbf22272b62a0bcea32ad81e0784cb8e", "score": "0.65840155", "text": "public function edit()\n {\n return view('mgentregables::edit');\n }", "title": "" }, { "docid": "75a2ec7c7b01e3430b5535f7564f64a8", "score": "0.6583078", "text": "public function edit($id)\n {\n $find = Job::where('id' , $id)->first();\n return view('admin/job/form' , compact('find'));\n }", "title": "" }, { "docid": "4d167de16ac7ed5ddabb0c275bf98c12", "score": "0.65803504", "text": "public function editForm($id)\n\t{\n\t\t$project = Project::with('user', 'group')->find($id);\n\t\tif(!$project){\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\t$data['groups'] = Group::all();\n\t\t$data['admins'] = Role::with('users', 'users.profile')\n\t\t->where('name', 'admin')\n\t\t->first();\n\n\t\treturn View::make('admin.projects.edit')\n\t\t->with('title', $project->name)\n\t\t->with('project', $project)\n\t\t->with($data);\n\t}", "title": "" }, { "docid": "1e6714a2833c2286fe5202063d157362", "score": "0.6578564", "text": "public function edit($id)\n {\n //\n $person = Person::find($id);\n return view('admin.person.edit',compact('person'));\n\n }", "title": "" }, { "docid": "5738a7a07c7391ff86af1707b6792ba6", "score": "0.6575101", "text": "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = ReviewRating::findOrFail($id);\n $data['url'] = route('admin.' . $this->route . '.update', [$this->view => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n \n\t\treturn view('admin.general.edit_form', compact('data'));\n }", "title": "" }, { "docid": "f22ee7f97a071d69c8fe688b46a41ec0", "score": "0.6572794", "text": "public function edit() {\n\n\t\t$controller = $this->app->request->getWord('controller');\n\t\t$url = $this->app->link(array('controller' => $controller, 'format' => 'raw', 'type' => $this->getType()->identifier, 'elm_id' => $this->identifier, 'item_id' => $this->getItem()->id), false);\n\n\t\t// render layout\n\t\tif ($layout = $this->getLayout('edit.php')) {\n\t\t\treturn $this->renderLayout($layout, compact('url'));\n\t\t}\n\n\t}", "title": "" }, { "docid": "7f004d9f228b69c504acab9aa2a68c00", "score": "0.6570289", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_historico_artilheiro\n\t\t$fbf_historico_artilheiro = FbfHistoricoArtilheiro::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_historico_artilheiro\n\t\t$this->layout->content = View::make('fbf_historico_artilheiro.edit')\n->with('fbf_historico_artilheiro', $fbf_historico_artilheiro);\n\t}", "title": "" }, { "docid": "7e89f7da3e597647da866468ecea56a9", "score": "0.65682095", "text": "public function editAction()\n {\n $id = (int) $this->param('id');\n $property = $this->service->retrievePropertyById($id);\n if (!$property) {\n $this->flash('error')->addMessage('property.not.found');\n $this->redirectToRoute('list', ['page' => 1]);\n } else {\n $action = $this->view->url(['action' => 'update']);\n $propertyForm = $this->service->getFormForEditing($action);\n $propertyForm->populate($property->toArray());\n $this->view->property = $property;\n $this->view->propertyForm = $propertyForm;\n }\n }", "title": "" }, { "docid": "ab321968ce813a175af5fb95680495f5", "score": "0.65680295", "text": "public function edit($id)\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "21d99e41a1e26e985dcc253e30b0cdcd", "score": "0.6567734", "text": "public function actionEdit() { }", "title": "" } ]
feb52eae2e723f5fe5c42beb01c35aea
untuk relasi dengan lelang dan pelelang jenis relasi one to many
[ { "docid": "bcb9e3648e9aff49af24d6f33718d389", "score": "0.6101485", "text": "public function lelang(){\n return $this->hasMany(Lelang::class);\n }", "title": "" } ]
[ { "docid": "3d4bbd95679db4aea3eed5f9180931c2", "score": "0.6521809", "text": "public function jadwal_matakuliah(){\n \treturn $this->hasMany(jadwal_matakuliah::class,'mahasiswa_id'); // memberika nilai return dari fungsi hasMany yang merelasikan mahasiswa dengan banyak jadwal_matakuliah dengan foreign key mahasiswa_id\n }", "title": "" }, { "docid": "45306e4b7ca4a303c48c9fd7dc05bad6", "score": "0.62871903", "text": "private function move_jurusan_from_kel_detail_to_kelas(){\n\t\t//@ add idjurusan column to kelas first , as well as constrain\n \t$this->add_column('kelas' , 'idjurusan' , ' int(11) NOT NULL DEFAULT 1 , \n \t\tADD CONSTRAINT fk_jurusan FOREIGN KEY (idjurusan) REFERENCES jurusan (id) ON DELETE NO ACTION ON UPDATE CASCADE' );\n\t\t//@ get all idjurusan from kelas detail\n\t\t$kelas_detail = new Kelas_Detail_Model();\n\t\t//@ loop\n\t\tforeach($kelas_detail->get() as $item){\n\t\t\t//@ update idjurusan from kelas\n\t\t\t$kelas = new Kelas_Model();\n\t\t\t$kelas = $kelas->find($item->idkelas);\n\t\t\t$kelas->idjurusan = $item->idjurusan;\n\t\t\t$kelas->save();\t\t\t\n\t\t}\n\t\t//@ done\n\t}", "title": "" }, { "docid": "be981fee9c491ac123aaf7569e532f91", "score": "0.6279118", "text": "public function ruangan(){\n\t\treturn $this->belongsTo(ruangan::class); // memberikan nilai return dari fungsi belongsTo yang mrelasikan ruangan dengan banyak jadwal_matakuliah\n }", "title": "" }, { "docid": "22f17f6ef3ef9cf115b5286227be6383", "score": "0.62324333", "text": "public function relasi_di_terima_di_kelas(){\n return $this->belongsTo(MsKelas::class,'di_terima_di_kelas','id');\n }", "title": "" }, { "docid": "f79c23d46a83fac01196db350a7f334f", "score": "0.6227651", "text": "public function ruangan(){\n\n return $this->belongsTo(Ruangan::class); // memberikan nilai return dari fungsi belongsTo yang merelasikan ruangan dengan banyak jadwal_matakuliah\n }", "title": "" }, { "docid": "ccbb465dd7e8a06c36ee673dda910fd4", "score": "0.6173294", "text": "private function ima_li_pobjednik(){\n\t\t\t$this->uRetku();\n\t\t\t$this->uStupcu();\n\t\t\t$this->naDijagonali();\n\t\t}", "title": "" }, { "docid": "1b343b26654da733039fbfc23f99a923", "score": "0.6166816", "text": "public function negeriLahir(){\n return $this->belongsTo('App\\Models\\Negeri','Kod_NegeriLahir','Kod_Negeri');\n }", "title": "" }, { "docid": "50d433208ce0096f509816fefb503bec", "score": "0.61649644", "text": "public function penugasan()\n {\n \t\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42210'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42210','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t}\t\n\n\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42230'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42230','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t}\n\t\t \n\t\t \n\t\t \n\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42220'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42220','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t} \n\t\t \n\t\t \n\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42240'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42240','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t} \n\t\t \n\t\t \n\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42110'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42110','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t}\n \t\n\t\t\n\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42120'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42120','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t}\n \t\n\t\t\n\t\t\n\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42130'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42130','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t} \n\t\n\t\n\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42140'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42140','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t}\n \t\n\t\t\n\t\t$posts = \\DB::select('select * from tb_login where unitup = ?', array('42160'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42160','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t} \n\t\t \n\t\t \n\t\t $posts = \\DB::select('select * from tb_login where unitup = ?', array('42180'));\n\t\t$dummy = \\DB::select('select * from dummy2');\n\t\tforeach ($dummy as $dummy2) {\n\t\t\t$petugas_biak[0] = $dummy2->email;\n\t\t\t\n\t\t}\n\t\t$jml_biak= 0;\n\t\tforeach ($posts as $post) {\n\t\t\tif($posts != null){\n\t\t\t\t\n\t\t\t\t$petugas_biak[$jml_biak]= $post->email;\n\t\t\t\t$jml_biak = $jml_biak + 1;\t\t\n\t\t\t}\n\t\t}\n\t\t $pel = \\DB::select('select * from tb_pelanggan where unitup = ? && petugas = ?', array('42180','-'));\t\n\t\t $bufferbiak = 0;\n\t\t foreach ($pel as $biak) {\n\t\t\t if($biak != null){\t\n\t\t\t \t$pelanggan = data_pelanggan::find($biak->idpel);\n\t\t\t\t$pelanggan->petugas = $petugas_biak[$bufferbiak];\n\t\t\t\t$pelanggan->save();\n\t\t\t\t \n\t\t\t\techo $petugas_biak[$bufferbiak].\"<br>\";\n\t\t\t\t$bufferbiak = $bufferbiak + 1;\n\t\t\t\tif($bufferbiak >= $jml_biak){\n\t\t\t\t\t $bufferbiak = 0;\n\t\t\t\t} \n\t\t\t}\n \t}\n \t\t\n \t\n \n\t \n\t\t \n\t\t \n\t\t \n }", "title": "" }, { "docid": "dfc2d39082fe26d6303267c1c744282a", "score": "0.61579114", "text": "public function pengguna(){ // fungsi dengan nama pengguna\n\n \treturn $this->belongsTo(pengguna::class); // memberikan nilai return dari fungsi belongsTo yang merelasikan mahasiswa dengan pengguna\n }", "title": "" }, { "docid": "5a5fc20bdc8f18e85821fbda57bfac78", "score": "0.614399", "text": "public function lingua()\n {\n return $this->belongsTo('App\\Lingua','id_lingua');\n }", "title": "" }, { "docid": "52512b0db645180ba5f2e9bfaf973e68", "score": "0.6126485", "text": "public function votos_uninominales_r()\r\n {\r\n // return $this->hasMany('App\\Comment', 'foreign_key', 'local_key');\r\n return $this->hasOne('App\\Votos_Uninominales_r', 'id_mesa', 'id_mesa');\r\n }", "title": "" }, { "docid": "0a4d86b783f8e45d9f65665b4395f718", "score": "0.61131346", "text": "public function anggotaLembaga(){\n return $this->hasMany('App\\AnggotaLembaga', 'id_lembaga');\n }", "title": "" }, { "docid": "01e70fb23e16b5ac37a1ab7740d24fcd", "score": "0.6110901", "text": "public function mahasiswa(){ // UNTUK MENENTUKAN HUBUNGANNYA, DIBUAT FUNGSI DENGAN NAMA MAHASISWA PADA MODEL JADWAL_MATAKULIAH\n\n return $this->belongsTo(mahasiswa::class); // memberikan nilai return dari fungsi belongsTo yang merelasikan banyak jadwal_matakuliah dengan mahasiswa\n\n\t }", "title": "" }, { "docid": "9e9f1499e505a1cd8c02878dd69e48e0", "score": "0.60868293", "text": "public function lestrsus()\n {\n return $this->hasMany(Lestrsu::class);\n }", "title": "" }, { "docid": "26f35cfee11e2250fbecae104c0907da", "score": "0.607469", "text": "public function buildRelations()\n {\n $this->addRelation('PembelajaranRelatedByIndukPembelajaranId', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('induk_pembelajaran_id' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PtkTerdaftar', 'DataDikdas\\\\Model\\\\PtkTerdaftar', RelationMap::MANY_TO_ONE, array('ptk_terdaftar_id' => 'ptk_terdaftar_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('Semester', 'DataDikdas\\\\Model\\\\Semester', RelationMap::MANY_TO_ONE, array('semester_id' => 'semester_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('RombonganBelajar', 'DataDikdas\\\\Model\\\\RombonganBelajar', RelationMap::MANY_TO_ONE, array('rombongan_belajar_id' => 'rombongan_belajar_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('MataPelajaran', 'DataDikdas\\\\Model\\\\MataPelajaran', RelationMap::MANY_TO_ONE, array('mata_pelajaran_id' => 'mata_pelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('BukuPelajaran', 'DataDikdas\\\\Model\\\\BukuPelajaran', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT', 'BukuPelajarans');\n $this->addRelation('JadwalRelatedByBelKe01', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_01', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe01');\n $this->addRelation('JadwalRelatedByBelKe02', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_02', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe02');\n $this->addRelation('JadwalRelatedByBelKe03', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_03', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe03');\n $this->addRelation('JadwalRelatedByBelKe04', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_04', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe04');\n $this->addRelation('JadwalRelatedByBelKe05', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_05', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe05');\n $this->addRelation('JadwalRelatedByBelKe06', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_06', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe06');\n $this->addRelation('JadwalRelatedByBelKe07', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_07', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe07');\n $this->addRelation('JadwalRelatedByBelKe08', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_08', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe08');\n $this->addRelation('JadwalRelatedByBelKe09', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_09', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe09');\n $this->addRelation('JadwalRelatedByBelKe10', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_10', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe10');\n $this->addRelation('JadwalRelatedByBelKe11', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_11', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe11');\n $this->addRelation('JadwalRelatedByBelKe12', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_12', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe12');\n $this->addRelation('JadwalRelatedByBelKe13', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_13', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe13');\n $this->addRelation('JadwalRelatedByBelKe14', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_14', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe14');\n $this->addRelation('JadwalRelatedByBelKe15', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_15', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe15');\n $this->addRelation('JadwalRelatedByBelKe16', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_16', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe16');\n $this->addRelation('JadwalRelatedByBelKe17', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_17', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe17');\n $this->addRelation('JadwalRelatedByBelKe18', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_18', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe18');\n $this->addRelation('JadwalRelatedByBelKe19', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_19', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe19');\n $this->addRelation('JadwalRelatedByBelKe20', 'DataDikdas\\\\Model\\\\Jadwal', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'bel_ke_20', ), 'RESTRICT', 'RESTRICT', 'JadwalsRelatedByBelKe20');\n $this->addRelation('PembelajaranRelatedByPembelajaranId', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'induk_pembelajaran_id', ), 'RESTRICT', 'RESTRICT', 'PembelajaransRelatedByPembelajaranId');\n $this->addRelation('VldPembelajaran', 'DataDikdas\\\\Model\\\\VldPembelajaran', RelationMap::ONE_TO_MANY, array('pembelajaran_id' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT', 'VldPembelajarans');\n }", "title": "" }, { "docid": "6509017ffcc198b0f44a3c6c1ebe9b33", "score": "0.6065879", "text": "public function Prodi(){\n\t\treturn $this->hasMany('App\\Prodi', 'foreign_key', 'prodiKodeJurusan');\n\t}", "title": "" }, { "docid": "9c376b08e679b10240f6568be43175c9", "score": "0.6052602", "text": "public function mahasiswa(){\n \treturn $this->belongsTo(mahasiswa::class); // memberikan nilai return dari fungsi belongsTo yang merelasikan banyak jadwal_matakuliah dengan mahasiswa\n }", "title": "" }, { "docid": "f6f47467d97114d44d21b380e2a3f507", "score": "0.6026667", "text": "public function getAnalis10()\n {\n return $this->hasOne(PenulAnalisPenyaji::className(), ['id' => 'analis1']);\n }", "title": "" }, { "docid": "0ab1f7efd84fb8d51c7202a54d39a8a2", "score": "0.60219616", "text": "public function iglesia()\n {\n return $this->belongsTo('App\\Admin\\Iglesias','alumigle_idIglesia', 'igle_Id' )->withDefault(); \n }", "title": "" }, { "docid": "298ab2700da957884432a022d5faa76d", "score": "0.601389", "text": "public function getAnalis30()\n {\n return $this->hasOne(PenulAnalisPenyaji::className(), ['id' => 'analis3']);\n }", "title": "" }, { "docid": "14f726de65a68424fcb3dcb75b690dfd", "score": "0.60115016", "text": "public function add_pengetahuan()\n {\n $data['ajarans'] = $this->db->get('ajaran')->result();\n\n\t\t$guru \t= get_my_info();\n\n\t\t$this->db->from('kurikulum');\n\t\t$this->db->group_by(['kelas_id']);\n\t\t$this->db->order_by('kelas_id','ASC');\n\t\t$this->db->where(['guru_id' => $guru->id]);\n\t\t$data_mapel = $this->db->get()->result();\n\n\n\n foreach($data_mapel as $datamapel){\n\t\t\t$rombel_id[] = $datamapel->kelas_id;\n\t\t}\n\t\tif(isset($rombel_id)){\n\t\t\t$id_rombel = $rombel_id;\n\t\t} else {\n\t\t\t$id_rombel = array();\n\t\t}\n\n\t\t$this->db->from('kelas');\n\t\t$this->db->where_in('id',$id_rombel);\n\t\t$data['rombels'] = $this->db->get()->result();\n\n\t\t$this->db->from('kelas');\n\t\t$this->db->group_by(['tingkat']);\n\t\t$this->db->order_by('tingkat','ASC');\n\t\t$data['kelas'] = $this->db->get()->result();\n\n\t\t$data['form_action'] \t= 'perencanaan/simpan_perencanaan';\n\t\t$data['query']\t\t\t\t= 'kd';\n\t\t$this->template->load('template','perencanaan/add_perencanaan',$data);\n\t}", "title": "" }, { "docid": "73a0cc7c19dedb54fdecc5b5407542e7", "score": "0.60033464", "text": "public function votos_uninominales()\r\n {\r\n // return $this->hasMany('App\\Comment', 'foreign_key', 'local_key');\r\n return $this->hasMany('App\\Votos_Uninominales', 'id_mesa', 'id_mesa');\r\n }", "title": "" }, { "docid": "e12df8cfd7b40ced5d01becc792c3bdb", "score": "0.6002444", "text": "public function jurnalPenyesuaianRincian()\n {\n return $this->hasMany(jurnalPenyesuaianRincian::class);\n }", "title": "" }, { "docid": "97614d9a5e43cb9f904c463ae5e0b48c", "score": "0.60010684", "text": "public function add_keterampilan()\n {\n $data['ajarans'] = $this->db->get('ajaran')->result();\n\n\t\t$guru \t= get_my_info();\n\n\t\t$this->db->from('kurikulum');\n\t\t$this->db->group_by(['kelas_id']);\n\t\t$this->db->order_by('kelas_id','ASC');\n\t\t$this->db->where(['guru_id' => $guru->id]);\n\t\t$data_mapel = $this->db->get()->result();\n\n\n\n foreach($data_mapel as $datamapel){\n\t\t\t$rombel_id[] = $datamapel->kelas_id;\n\t\t}\n\t\tif(isset($rombel_id)){\n\t\t\t$id_rombel = $rombel_id;\n\t\t} else {\n\t\t\t$id_rombel = array();\n\t\t}\n\n\t\t$this->db->from('kelas');\n\t\t$this->db->where_in('id',$id_rombel);\n\t\t$data['rombels'] = $this->db->get()->result();\n\n\t\t$this->db->from('kelas');\n\t\t$this->db->group_by(['tingkat']);\n\t\t$this->db->order_by('tingkat','ASC');\n\t\t$data['kelas'] = $this->db->get()->result();\n\n\t\t$data['form_action'] \t= 'perencanaan/simpan_perencanaan';\n\t\t$data['query']\t\t\t\t= 'kd';\n\t\t$this->template->load('template','perencanaan/add_keterampilan',$data);\n\t}", "title": "" }, { "docid": "ba68249ba659a0317ae0c5f2cf9bafbe", "score": "0.59989005", "text": "public function getAnalis20()\n {\n return $this->hasOne(PenulAnalisPenyaji::className(), ['id' => 'analis2']);\n }", "title": "" }, { "docid": "3bb45ef86fced2ea7f03ae09173fe3b5", "score": "0.5997483", "text": "public function mahasiswa() //membuat fungsi dengan nama mahasiswa\n {\n \treturn $this->belongsTo(mahasiswa::class);\n \t//sintaks ini fungsinya untuk menyatakan relasi dari model jadwal_matakuliah dan model mahasiswa. jadi kita dapat mengakses model mahasiswa, meskipun pengaksesannya melalui model jadwal_matakuliah. jadi kita bisa menampilkan isi tabel mahasiswa, melalui model jadwal_matakuliah.\n }", "title": "" }, { "docid": "31f1a28d6fb7d3d652873adbc39cb7ed", "score": "0.596906", "text": "public function getLangnghes()\n {\n return $this->hasMany(LangNghe::className(), ['CapCongNhan_id' => 'id']);\n }", "title": "" }, { "docid": "27c73ae26f2e3219fa38f7424da3e41b", "score": "0.59677476", "text": "public function iglesia()\n {\n return $this->belongsTo('App\\Admin\\Iglesias','lidigle_idIglesia', 'igle_Id' )->withDefault(); \n }", "title": "" }, { "docid": "1b359dd88b553cb4a806b8b387ec3974", "score": "0.59583646", "text": "public function mahasiswaOrganisasi(){\n \treturn $this-> belongsTo('App\\RefJabatanOrganisasi','jabatan_id');\n }", "title": "" }, { "docid": "b49f9029c42675e370f8f74521c8a7c6", "score": "0.5950727", "text": "public function getPenyajiData1()\n {\n return $this->hasOne(PenulAnalisPenyaji::className(), ['id' => 'penyaji_data1']);\n }", "title": "" }, { "docid": "bd89dcf32e468b0c623cee4741b6c4ee", "score": "0.59501815", "text": "public function nilai($id)\n {\n $penilaian_monev = Penilaian_monev::where('penilaian_monev_pengabdian_id', $id)\n ->first();\n\n\n if ($penilaian_monev) {\n if ($penilaian_monev->penilaian_monev_lock == true) {\n //Flash Message\n flash_alert(\n __('alert.icon_error'), //Icon\n 'Penilaian Monev Dikunci', //Alert Message \n 'Tidak Dapat Melakukan Perubahan' //Sub Alert Message\n );\n\n return redirect()->route('reviewer_monev');\n }\n }\n\n $ketua = Anggota_pengabdian::where('anggota_pengabdian_pengabdian_id', $id)\n ->join('users', 'pkm_anggota_pengabdian.anggota_pengabdian_user_id', '=', 'users.user_id')\n ->leftjoin('biodata', 'pkm_anggota_pengabdian.anggota_pengabdian_user_id', '=', 'biodata.biodata_user_id')\n ->where('anggota_pengabdian_role', 'ketua')\n ->first();\n\n $usulan = Usulan_pengabdian::where('usulan_pengabdian_id', $id)\n ->join('pkm_skema_pengabdian', 'pkm_usulan_pengabdian.usulan_pengabdian_skema_id', '=', 'pkm_skema_pengabdian.skema_id')\n ->join('pkm_bidang_pengabdian', 'pkm_usulan_pengabdian.usulan_pengabdian_bidang_id', '=', 'pkm_bidang_pengabdian.bidang_id')\n ->first();\n\n $anggota = Anggota_pengabdian::where('anggota_pengabdian_pengabdian_id', $id)\n ->join('users', 'pkm_anggota_pengabdian.anggota_pengabdian_user_id', '=', 'users.user_id')\n ->leftjoin('biodata', 'pkm_anggota_pengabdian.anggota_pengabdian_user_id', '=', 'biodata.biodata_user_id')\n ->where('anggota_pengabdian_role', '!=', 'ketua')\n ->orderBy('anggota_pengabdian_role', 'asc')\n ->get();\n\n $penilaian_monev = Penilaian_monev::where('penilaian_monev_pengabdian_id', $id)->first();\n\n $skor = ($penilaian_monev) ? json_decode($penilaian_monev->penilaian_monev_skor, true) : NULL;\n $justifikasi = ($penilaian_monev) ? json_decode($penilaian_monev->penilaian_monev_justifikasi, true) : NULL;\n\n $view_data = [\n 'anggota' => $anggota,\n 'usulan' => $usulan,\n 'ketua' => $ketua,\n 'penilaian_monev' => $penilaian_monev,\n 'id' => $id,\n 'skor' => $skor,\n 'justifikasi' => $justifikasi,\n ];\n\n return view('reviewer.monev.nilai', $view_data);\n }", "title": "" }, { "docid": "5a59a114f091430d8c2c6a8979ede47b", "score": "0.5942393", "text": "public function getPembangunans1()\n {\n return $this->hasMany(Pembangunan::className(), ['user_id' => 'id']);\n }", "title": "" }, { "docid": "a50e8aa3ecaf538a829e103dc598f929", "score": "0.59409904", "text": "public function mahasiswa(){\n \treturn $this->hasOne(mahasiswa::class,'pengguna_id');\n \t\n }", "title": "" }, { "docid": "d1772c79a0c0156b908ad5cb4a303a92", "score": "0.5929143", "text": "public function peliculas(){\n return $this->belongsToMany('\\App\\Pelicula','peliculas_generos','idGenero','idPelicula');\n }", "title": "" }, { "docid": "1cc647c9e970f6286247fb0d0c4ce2cd", "score": "0.59190416", "text": "public function __construct()\n {\n parent::__construct();\n // $this->has_one['id_user'] = array(\n // 'foreign_model' => 'M_user',\n // 'foreign_table' => 'user',\n // 'foreign_key' => 'id_user',\n // 'local_key' => 'author_event'\n // // );\n // $this->has_one['id_kategori'] = array(\n // 'foreign_model' => 'M_kategori',\n // 'foreign_table' => 'kategori',\n // 'foreign_key' => 'nama_kategori',\n // 'local_key' => 'category_event'\n // );\n\n /*$this->has_many['rekomendasi_wisata'] = array(\n 'foreign_model' => 'M_rekomendasi',\n 'foreign_table' => 'rekomendasi_wisata',\n 'foreign_key' => 'id_tujuan',\n 'local_key' => 'id_wisata'\n );*/\n\n $this->has_many['pesanan'] = array(\n 'foreign_model' => 'M_pesanan',\n 'foreign_table' => 'pesanan',\n 'foreign_key' => 'id_customer',\n 'local_key' => 'id_user'\n ); \n }", "title": "" }, { "docid": "18f74d9cc865bd7c16accf5ee8edbf43", "score": "0.59181", "text": "public function chude()\n {\n \treturn $this->hasMany('App\\chude','idMonHoc','idMonHoc'); //1 môn học có nhiều chủ đề\n }", "title": "" }, { "docid": "90358b8a6791a4b1a175f23d42271ad1", "score": "0.5917921", "text": "function komponen($kelas_id=null){\r\n $this->loadModel('User');\r\n\t\t$user = $this->Session->read(\"Auth\");\r\n\t\t$nip= $user['User']['USERNAME'];\r\n\t\t$this->loadModel('Tkelase');\r\n $kelas = $this->Tkelase->findById($kelas_id);\r\n\r\n if(!$kelas_id || empty($kelas) || $kelas['Tkelase']['TDOSEN_ID']!=$nip)\r\n $this->redirect(\"/penilaian/index\");\r\n\r\n $this->set(compact(\"kelas\"));\r\n\r\n }", "title": "" }, { "docid": "6ac59e3aa2df7d6a52fb431675da96d4", "score": "0.591226", "text": "public function plantillajugadajugadas()\n {\n return $this->hasMany(PlantillaJugadaJugada::class, 'plantilla_jugada_id', 'id');\n }", "title": "" }, { "docid": "6ee11f83acf0c475342a559acff7e99c", "score": "0.59116715", "text": "public function usuariovista()\n {\n return $this->hasmany('App\\Admin\\UsuarioVista','usvis_IdUsuario','id' ); \n }", "title": "" }, { "docid": "9134d9ecff2f64800b6272c5669481a7", "score": "0.59023464", "text": "public function getLaporAduans()\n {\n return $this->hasMany(LaporAduan::className(), ['pembangunan_id' => 'id']);\n }", "title": "" }, { "docid": "0b2c6f82f58ac6ead804f8bce3651d84", "score": "0.58977145", "text": "public function auxiliar()\n {\n return $this->hasOne('App\\Models\\Auxiliar', 'cod_persona', 'id');\n }", "title": "" }, { "docid": "c3f19134a73ed27c3f774d192dd1ed08", "score": "0.58963615", "text": "function set_detail(){\r\n\r\n\t\tparent::set_detail(); // fixer les attribus en tantque usager\r\n\t\t\t\r\n\t\t$sql=\"SELECT id_entr\r\n\t\t\t FROM les_maitres_apprentissage \r\n\t\t\t WHERE id_ma='$this->id_ma'\";\t \t\t \r\n\r\n\t\t$result = $this->bdd->executer($sql);\r\n\t\t\t\r\n\t\tif ($ligne = mysql_fetch_assoc($result)) {\r\n\t\t\t$this->id_entr=$ligne['id_entr'];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "521003a0352b8a32a87523e66ddf20a2", "score": "0.58962417", "text": "public function loaimonan(){\n \treturn $this->belongsTo('App\\LoaiMon','MALOAI','MALOAI');\n }", "title": "" }, { "docid": "1878e0a122cc00d5db8f51edfc6c51bd", "score": "0.5895728", "text": "public function lembaga(){\n return $this->belongsTo('App\\Lembaga', 'id_lembaga');\n }", "title": "" }, { "docid": "0fb676150f6c48efffa9431042c943c2", "score": "0.5889527", "text": "public function relacionEstadoJurado()\n {\n return $this->hasOne(EstadoAnteproyecto::class, 'PK_EST_Id', 'FK_NPRY_Estado_Proyecto');\n }", "title": "" }, { "docid": "15b4e44f092a8b7ac69a19306a50db29", "score": "0.58820343", "text": "public function kelas()\n\t{\n\t\treturn $this->belongsToMany('App\\Models\\Kelas', 'kelas_rel_pembelajaran', 'fk_pembelajaran', 'fk_kelas', 'id', 'id');\n\t}", "title": "" }, { "docid": "ff655368a2241e88066afed744f3681e", "score": "0.5874956", "text": "public function detalle(){\n return $this->hasMany('App\\DetaCompra', 'id_compra', 'id_compra');\n }", "title": "" }, { "docid": "5f8d6114ac8c587a16d9c9b7035c99fe", "score": "0.58745146", "text": "public function initialize(){\n $this->belongs_to('areatematica');\n }", "title": "" }, { "docid": "5ad77373c2cf95845359a8d62f063647", "score": "0.58719575", "text": "public function peliculas()\n {\n return $this->belongsToMany('App\\Trafico', 'pelicula_trafico','id_trafico','id_pelicula');\n }", "title": "" }, { "docid": "1395c1ea1eb694df46e470e961fcf363", "score": "0.586948", "text": "public function load_transaksi(){\n $data['judul_grafik'] = 'Grafik Penjualan Berdasarkan Meja';\n $param = $this->input->post();\n if(!empty($param['ruang'])){\n $data['meja'] = $this->vsdb->find('meja',array('code'=>$param['ruang']));\n $data['set_tanggal'] = $param['date'];\n $data['judul_grafik'] = 'Grafik Penjualan Di Ruangan '.$param['ruang'];\n // print_r($data);exit;\n }\n\n $data['opt_ruang'] = $this->vsdb->find('meja');\n $data['sidebar_active']='laporan';\n $data['title']='Laporan - Penjualan';\n $data['content'] = $this->load->view('/grafik_transaksi',$data,TRUE);\n $this->load->view('template',$data);\n }", "title": "" }, { "docid": "c0bc61c7205355b5d609e07660a1d294", "score": "0.58661354", "text": "public function buildRelations()\n {\n $this->addRelation('LembagaAkreditasi', 'DataDikdas\\\\Model\\\\LembagaAkreditasi', RelationMap::MANY_TO_ONE, array('la_id' => 'la_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('JurusanSp', 'DataDikdas\\\\Model\\\\JurusanSp', RelationMap::MANY_TO_ONE, array('jurusan_sp_id' => 'jurusan_sp_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('Akreditasi', 'DataDikdas\\\\Model\\\\Akreditasi', RelationMap::MANY_TO_ONE, array('akreditasi_id' => 'akreditasi_id', ), 'RESTRICT', 'RESTRICT');\n }", "title": "" }, { "docid": "cdf2a4a492aec94fc6e30554212995b8", "score": "0.5862507", "text": "public function add_kelas_reguler(){\n $this->db->from(\"kelas\");\n $this->db->order_by(\"id_kelas\", \"DESC\");\n $id = $this->db->get()->row_array();\n $id_kelas = $id['id_kelas'] + 1;\n\n // data kelas\n $data = [\n \"id_kelas\" => $id_kelas,\n \"tgl_mulai\" => date('Y-m-d'),\n \"program\" => $this->input->post(\"program\", TRUE),\n \"status\" => 'aktif',\n \"tipe_kelas\" => 'reguler',\n \"ket\" => 'reguler',\n \"pengajar\" => $this->input->post(\"pengajar\", TRUE),\n \"tempat\" => \"LKP TAR-Q\",\n \"nip\" => $this->input->post(\"nip\", TRUE)\n ];\n\n $this->db->insert(\"kelas\", $data);\n\n // data jadwal\n $data = [\n \"hari\" => $this->input->post(\"hari\", TRUE),\n \"jam\" => $this->input->post(\"jam\", TRUE),\n \"ot\" => '0',\n \"tempat\" => $this->input->post(\"tempat\", TRUE),\n \"status\" => \"aktif\",\n \"id_kelas\" => $id_kelas\n ];\n\n $this->db->insert(\"jadwal\", $data);\n }", "title": "" }, { "docid": "17bc1d2771f78d94c936c7304c92b7b0", "score": "0.58590335", "text": "public function pesanans()\n {\n return $this->hasMany(Pesanan::class, 'lahan_pelanggan_id', 'id');\n }", "title": "" }, { "docid": "838d51adb7313a702b4fd23913011de1", "score": "0.5858606", "text": "public function modelos()\n {\n //Tabla a referenciar Clave foranea del y clave local\n return $this->hasMany('App\\Modelo','id_marca','id_marca');\n }", "title": "" }, { "docid": "08886bf3caefaafaceaaa2a2a0d09e60", "score": "0.5857612", "text": "public function oneToMany()\n {\n $keySearch = 'a';\n $countries = Country::where('name', 'LIKE', \"%{$keySearch}%\")->with('states')->get();\n //with() retorna todos as informações vinculadas pelo relacionamento.\n\n \n foreach($countries as $country) {\n\n echo \"<b>{$country->name}</b>\";\n\n $states = $country->states;\n\n foreach ($states as $state){\n echo \"<br> {$state->initials} - {$state->name}: \";\n }\n\n echo '<hr>';\n }\n\n\n\n }", "title": "" }, { "docid": "3b22878379da8b6305b467debda24489", "score": "0.5856698", "text": "public function peserta_pelatihan()\n {\n return $this -> belongsTo ('\\App\\peserta_pelatihan','pelatihan_id','id');\n }", "title": "" }, { "docid": "06a47b14bd2734f28a1d7a5239860951", "score": "0.5850533", "text": "public function asesmentKelas(){\r\n \t\treturn $this->hasMany('Meniqa\\Models\\AsesmentKelas','asesment_eselon_id','id');\r\n \t}", "title": "" }, { "docid": "f16579baa4f6e9daa6ee031255bf5d44", "score": "0.5849027", "text": "public function direcciones_sucursales()\n {\n return $this->belongsTo(direcciones_sucursale::class,'id');\n }", "title": "" }, { "docid": "6d2b28f43dd3e8265fe49628b2fbd389", "score": "0.5848096", "text": "public function negara(){\n return $this->belongsTo('App\\Models\\Negara','Kod_Negara','Kod_Negara');\n }", "title": "" }, { "docid": "3b5977dbbf1b0d083e45b21240107345", "score": "0.5845766", "text": "public function relacionAnteproyecto()\n {\n return $this->hasOne(Anteproyecto::class, 'PK_NPRY_IdMctr008', 'FK_NPRY_IdMctr008');\n }", "title": "" }, { "docid": "9c4cca3fc398a796ebb6aa4191d3d825", "score": "0.58443916", "text": "public function usulanKenaikanGaji()\n {\n return $this->hasMany(UsulanKenaikanGaji::class);\n }", "title": "" }, { "docid": "74e2e8e9ac04c88fad35a88857c7b833", "score": "0.58434457", "text": "public function busquedaRelacionPresupuesto()\r\n {\r\n\r\n $model = PresupuestosDetalle::Find()\r\n ->where([\r\n 'presupuestos_detalle.inactivo' => 0\r\n ])\r\n ->joinWith('codigoPresupuesto')\r\n ->joinWith('ordenanzaPresupuesto');\r\n \r\n return $model;\r\n }", "title": "" }, { "docid": "eba115f1264e8e94eb897cd8070047a0", "score": "0.584039", "text": "public function dosen_matakuliah(){ // fungsi dengan nama dosen_matakuliah\n \treturn $this->belongsTo(dosen_matakuliah::class);// memberikan nilai return dari fungsi belongsTo yang merelasikan dosen_matakuliah dengan banyak jadwal_Matakuliah\n }", "title": "" }, { "docid": "536a93a22e4102ff117e223a6e4179af", "score": "0.58332425", "text": "public function actionLowonganLuarNegeri()\n {\n\t\t\t\t// ->select('sip.*, perusahaan.nama as perusahaan, jabatan.nama as jabatan, negara_tujuan.negara')\n // ->from('sip')\n\t\t\t\t// ->innerJoin('perusahaan', 'sip.perusahaan_id=perusahaan.id')\n\t\t\t\t// ->innerJoin('jabatan', 'sip.jabatan_id=jabatan.id')\n\t\t\t\t// ->innerJoin('negara_tujuan', 'sip.negara_tujuan=negara_tujuan.id')\n // ->where(['>','sip.tgl_ijin_akhir',date('Y-m-d')])\n // ->orderBy('sip.id desc')\n // ->limit('10')\n // ->all();\n $negara = (new \\yii\\db\\Query())\n\t\t\t\t->select('negara_tujuan.id,negara_tujuan.negara, count(sip.id) as jumlah')\n ->from('sip')\n\t\t\t\t->innerJoin('negara_tujuan', 'sip.negara_tujuan=negara_tujuan.id')\n ->where(['>','sip.tgl_ijin_akhir',date('Y-m-d')])\n\t\t\t\t->groupBy('negara_tujuan.negara')\n ->orderBy('negara')\n ->having('jumlah > 0')\n // ->limit('10')\n ->all();\n $jabatan = (new \\yii\\db\\Query())\n\t\t\t\t->select('jabatan.id, jabatan.nama as jabatan, count(sip.id) as jumlah')\n ->from('sip')\n\t\t\t\t->innerJoin('jabatan', 'sip.jabatan_id=jabatan.id')\n ->where(['>','sip.tgl_ijin_akhir',date('Y-m-d')])\n\t\t\t\t->groupBy('jabatan.nama')\n ->orderBy('jabatan.nama')\n // ->limit('10')\n ->all();\n\n $model = (new \\yii\\db\\Query())\n\t\t\t\t->select('sip.*, perusahaan.nama as perusahaan, jabatan.nama as jabatan, negara_tujuan.negara')\n ->from('sip')\n\t\t\t\t->innerJoin('perusahaan', 'sip.perusahaan_id=perusahaan.id')\n\t\t\t\t->innerJoin('jabatan', 'sip.jabatan_id=jabatan.id')\n\t\t\t\t->innerJoin('negara_tujuan', 'sip.negara_tujuan=negara_tujuan.id')\n ->where(['>','sip.tgl_ijin_akhir',date('Y-m-d')])\n ->orderBy('sip.id desc');\n\n if(isset($_POST['cari'])){\n $query = $model->orderBy('sip.id desc')\n ->andWhere(['like','jabatan.nama',$_POST['cari']]);\n $count = $query->count();\n $pageSize = 10;\n $pagination = new Pagination(['totalCount' => $count, 'pageSize'=>$pageSize]);\n $model = $query->offset($pagination->offset)\n ->limit($pagination->limit)\n ->all();\n // return $this->render('direktori-disnaker', [\n // 'model' => $model,\n // 'pagination' => $pagination,\n // 'cari'=>$_POST['cari'],\n // ]); \n }else{\n $query = $model->orderBy('sip.id desc');\n $count = $query->count();\n $pageSize = 10;\n $pagination = new Pagination(['totalCount' => $count, 'pageSize'=>$pageSize]);\n $model = $query->offset($pagination->offset)\n ->limit($pagination->limit)\n ->all();\n // return $this->render('direktori-disnaker', [\n // ]); \n }\n \n \t\t\treturn $this->render('lowongan-luar-negeri',[\n\t\t\t\t// 'lowongan_ln'=>$lowongan_ln,\n\t\t\t\t'negara'=>$negara,\n\t\t\t\t'jabatan'=>$jabatan,\n\t\t\t\t'model' => $model,\n\t\t\t\t'pagination' => $pagination,\n\t\t\t\t'cari'=>'',\n\t\t\t]);\n }", "title": "" }, { "docid": "448a3987a8b03105d4dfbf8c4b75f059", "score": "0.583039", "text": "function cari_db($id) {\r\n $this->db->where('pelanggan.no_pelanggan', $id);\r\n $this->db->select('*');\r\n $this->db->from('pelanggan');\r\n // $this->db->join('sub_golongan','on pelanggan.kode_gol = sub_golongan.kode_gol');\r\n // $this->db->join('golongan','on sub_golongan.kode_gol = golongan.kode_gol');\r\n return $this->db->get()->result();\r\n }", "title": "" }, { "docid": "0a632c09ff633146bb604a98afda4423", "score": "0.5829276", "text": "public function loaitin(){\n \t// 1 tin tuc thuoc 1 loai tin\n \treturn $this->belongsTo('App\\LoaiTin', 'idLoaiTin', 'id');\n }", "title": "" }, { "docid": "8afac30851d94cd45d89168ed1f8e110", "score": "0.5825844", "text": "public function pembelajaran()\n {\n return $this->hasManyThrough(Pembelajaran::class, Subtema::class, 'tema_id', 'subtema_id', 'kode_tema', 'kode_subtema');\n }", "title": "" }, { "docid": "0691e542975ce72940c341c687ee1e1f", "score": "0.5825429", "text": "public function parcelas(){\n return $this->hasMany(ParcelaVenda::class,'venda_id','id');\n }", "title": "" }, { "docid": "d09d94e58c4f1bdcec37eb6927fd6ad6", "score": "0.58249134", "text": "public function traslado(){\n return $this->hasMany(Traslado::class,'compra_id');\n }", "title": "" }, { "docid": "b84149829990b54557df4d769742c917", "score": "0.5822331", "text": "public function negeri(){\n return $this->belongsTo('App\\Models\\Negeri','Kod_Negeri','Kod_Negeri');\n }", "title": "" }, { "docid": "417b57eb74dc7d4755911fcb076b825c", "score": "0.58069134", "text": "public function listePaniers(){ \n return $this->belongsToMany('App\\Panier', 'revue_panier'); /*Les paniers par revue*/ \n }", "title": "" }, { "docid": "ed734ac83cb188975bb3609ffec213f9", "score": "0.5802087", "text": "public function kelas()\n {\n \treturn $this->hasMany('App\\Kelas', 'wali_kelas');\n }", "title": "" }, { "docid": "705b5cb012252e804d404444df5f67fe", "score": "0.5796985", "text": "public function mapel()\n {\n \treturn $this->belongsToMany('App\\Mapel', 'guru_mapel', 'id_guru', \n 'id_mapel');\n }", "title": "" }, { "docid": "722a24caef734aef352107bd05db8b1f", "score": "0.5795579", "text": "public function nirdeshanalaya(){\n return $this->hasMany('App\\Nirdeshanalaya');\n }", "title": "" }, { "docid": "70b6d03524e140f78fb5a6d082e75ac0", "score": "0.5788968", "text": "public function idioma(){\n\n return $this->hasMany('App\\Idioma','id_tipo_idioma','id_tipo_idioma');\n\n }", "title": "" }, { "docid": "46172ea4d30918edaa10b9826f0a2284", "score": "0.5784323", "text": "public function ciudad(){\n return $this -> hasMany('App\\ciudades');\n }", "title": "" }, { "docid": "f992339635298050cefcfd528625645f", "score": "0.57815564", "text": "public function mahasiswa() {\n\t\treturn $this->belongsToMany('Mahasiswa', 'mahasiswa_hobi', 'id_hobi', 'id_mahasiswa');\n\t}", "title": "" }, { "docid": "38c521b677acd14560b47035b583be86", "score": "0.5777429", "text": "public function khuyenmai(){\n return $this->belongsTo(Khuyenmai::class,'id_khuyenmais','id');\n }", "title": "" }, { "docid": "b64d7ffef59d09af8b1067bf79d09086", "score": "0.57752275", "text": "public function getTransaksis()\n {\n return $this->hasMany(Transaksi::className(), ['id_pembeli' => 'id_pembeli']);\n }", "title": "" }, { "docid": "f9a078d832efe8eb6b1bd3aaccddc6b6", "score": "0.57743704", "text": "public function actionHasilbeda($id_user)\n {\n $hasil= (new Query())\n ->select('t.id_tes, t.id_buku, t.id_user, h.id_tes, h.id_kuis, h.jawaban, \n k.id_kuis, k.pilihan_benar, k.id_chapter, c.nama_chapter, b.judul_buku, b.cover')\n ->from(['h' => TblHasiltes::tableName()]) \n ->leftJoin(['t' => Tes::tableName()], 'h.id_tes = t.id_tes')\n ->leftJoin(['k' => TblKuis::tableName()], 'h.id_kuis = k.id_kuis') \n ->leftJoin(['c' => TblChapter::tableName()], 'k.id_chapter = c.id_chapter') \n ->leftJoin(['b' => TblBuku::tableName()], 'c.id_buku = b.id_buku') \n ->andWhere(['<>','h.jawaban','k.pilihan_benar']) \n ->andWhere(['t.id_user'=> $id_user])\n ->all(); \n\n\n// $hasil = TblHasiltes::find()->alias('h')\n// ->select(['*', 't.id_user'])\n// ->leftJoin(Tes::tableName().' t', 't.id_tes = h.id_tes')\n// // ->leftJoin(TblKuis::tableName().' k', 'k.id_kuis = h.id_kuis')\n// // ->where(['<>','h.jawaban','k.pilihan_benar'])\n// ->andWhere(['t.id_user'=> $id_user])\n// ->all(); \n \n return $hasil;\n }", "title": "" }, { "docid": "5ba6211bcb787e013b8b39f01ddc54ce", "score": "0.57732487", "text": "public function buildRelations()\n {\n $this->addRelation('Sekolah', '\\\\Appdb\\\\Sekolah', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':sekolah_id',\n 1 => ':sekolah_id',\n ),\n), null, null, null, false);\n $this->addRelation('Foto', '\\\\Appdb\\\\Foto', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':pengguna_id',\n 1 => ':pengguna_id',\n ),\n), null, null, 'Fotos', false);\n $this->addRelation('Geotag', '\\\\Appdb\\\\Geotag', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':pengguna_id',\n 1 => ':pengguna_id',\n ),\n), null, null, 'Geotags', false);\n }", "title": "" }, { "docid": "77d0a7d71e6ea76f901e9365dc7dcbb3", "score": "0.5772518", "text": "public function unduhan() {\n\t\treturn $this->hasMany('Unduhan', 'id_petugas');\n\t}", "title": "" }, { "docid": "345392b71ee7389a32939bf4d64a1845", "score": "0.57712185", "text": "public function kelurahans()\n {\n return $this->hasMany(Kelurahan::class);\n }", "title": "" }, { "docid": "588f6206c6fe734fd5334c67a58c5a54", "score": "0.5768031", "text": "public function licoesaprendidas()\n\t{\n\t\treturn $this->belongsToMany(licoesaprendidas::class);\n\t}", "title": "" }, { "docid": "19d960045f8074d9a7a71ebd77d17087", "score": "0.57656866", "text": "public function getKasi0()\n {\n return $this->hasOne(PenulAnalisPenyaji::className(), ['id' => 'kasi']);\n }", "title": "" }, { "docid": "840c5b4580a77b43b400bf5be0c2e937", "score": "0.5765628", "text": "public function vereda(){\n\t\treturn $this->hasOne('GID\\Vereda');\n\t\t//return $this->hasMany(Vereda::class);\n\t}", "title": "" }, { "docid": "773b6f9d15ee7001dc085d30f3fbdc4b", "score": "0.57595754", "text": "public function transaksi()\n {\n \treturn $this->belongsToMany(Transaksi::class, 'kode_transaksi', 'buku_id');\n }", "title": "" }, { "docid": "4486512a0eabd9eb067d4b874583642d", "score": "0.5758369", "text": "public function findAllPenghasilan()\n {\n return Zakat::find()\n ->andWhere(['id_jenis_zakat' => 2])\n ->all();\n }", "title": "" }, { "docid": "1eb1588eb72a50a850b8809e8386c64e", "score": "0.5757763", "text": "public function initialize()\n {\n $this->hasMany('id_estado', 'Ciudades', 'id_estado', array('alias' => 'Ciudades'));\n $this->hasMany('id_estado', 'Ciudades', 'id_estado', NULL);\n }", "title": "" }, { "docid": "ffa9b140d4c976ed95d281cca8c3d565", "score": "0.5754935", "text": "public function getDisposisis()\n {\n return $this->hasMany(Disposisi::className(), ['id_keamanan' => 'id']);\n }", "title": "" }, { "docid": "e0eb1e0aeff138f80a5200d61ea3492f", "score": "0.5752599", "text": "public function cetakMengajar()\n {\n $join = array(\n ['master_pelajaran','mengajar.nama=master_pelajaran.id_mapel','LEFT'],\n ['pengajar','mengajar.id_pengajar=pengajar.id_pengajar','LEFT'],\n ['kelas','mengajar.id_kelas=kelas.id_kelas','LEFT']\n );\n\n\n $data = [\n 'mapelDet' => $this->Dashboard->viewGlobalJoin(\n '\n mengajar.id_mengajar AS id_mengajar,\n master_pelajaran.mapel AS mapel,\n kelas.keterangan AS keterangan,\n pengajar.nama_lengkap AS nama_lengkap,\n mengajar.deskripsi AS deskripsi\n ',\n 'mengajar',\n $join\n )->result_array()\n ];\n $this->load->view('cetakMapelDet', $data);\n }", "title": "" }, { "docid": "0554a01673b1369705a77d57126dcdb3", "score": "0.57501936", "text": "public function datosPersonales(){\n return $this->hasMany('App\\DatosPersonales','pk_ciudad');\n }", "title": "" }, { "docid": "2c18f2abcdc82a06f2ba785653203f24", "score": "0.57470524", "text": "public function produk()\n {\n return $this->hasMany(produks::class, 'penjual_id' )->with('penjuals');\n }", "title": "" }, { "docid": "fc924b53b48b91d780f8e7f8ba26bfc8", "score": "0.5745846", "text": "public function getPetugas()\n {\n return $this->hasOne(Registrasi::className(), ['id' => 'id_petugas']);\n }", "title": "" }, { "docid": "5f51b0ec632d4d2b1febb15267ad282f", "score": "0.57456297", "text": "public function despachosols()\n {\n return $this->hasMany(DespachoSol::class,'comunap_id','comunaentrega_id');\n }", "title": "" }, { "docid": "859fa68ef086d69500ea0f618f6c30b6", "score": "0.5744843", "text": "public function getTlCabangAndkota($tl_id)\n\n{\n\n\n\n //\n\n // return $this->db->select('a.*,p.*')\n\n // ->from('category a')\n\n // ->join('category_produk b', 'b.category_id = a.id','inner')\n\n // ->join('produk as p ','b.produk_id = p.id')\n\n // ->where('p.id',1)\n\n // ->get();\n\n\n\n return $this->db->select(['k.id_kota','k.nama_kota','c.id_cabang','c.nama'])\n\n ->from('sada_tl_in_kota tk')\n\n ->join('sada_kota k','tk.id_kota = k.id_kota','inner')\n\n ->join('sada_cabang c','k.id_cabang = c.id_cabang','inner')\n\n ->where('id_user',$tl_id)\n\n ->get();\n\n}", "title": "" }, { "docid": "862bc449fa0ec2fbe1221ee8c7d55ff1", "score": "0.5742705", "text": "public function dias(){\n return $this->hasMany(Dia::class,'asesoria_id');\n }", "title": "" }, { "docid": "3b321b7097fbbc6947c2f8f8d707a5be", "score": "0.5738678", "text": "public function dosen_matakuliah(){\n\n return $this->belongsTo(Dosen_matakuliah::class); // memberikan nilai return dari fungsi belongsTo yang merelasikan dosen_matakuliah dengan banyak jadwal_Matakuliah\n }", "title": "" }, { "docid": "8147734eeb90f5671dda7e3b9e9ada05", "score": "0.57384545", "text": "public function anggaran()\n {\n return $this->hasMany(SetupJurnalAnggaran::class);\n }", "title": "" }, { "docid": "7780219898c7d7b1854bcb67aa462c10", "score": "0.5733209", "text": "public function getJenPelanggaran()\n {\n return $this->hasOne(JenPelanggaran::className(), ['id' => 'jen_pelanggaran']);\n }", "title": "" } ]
83b1e795161bab62e788915319a5434e
Login for the Api
[ { "docid": "b0f80996410c4a7abcc5b3e960a3ff14", "score": "0.7047018", "text": "public function login()\n {\n $data = $this->request;\n if(empty($data) || empty($data['email']) || empty($data['password'])){\n echo json_encode(array(\n \"success\" => false,\n \"error\" => \"Invalid data\"\n ));\n }\n $user = usersModel::findOne('email = ? and password = ?',[$data['email'],hash('sha256',md5($data['password']))]);\n if(!empty($user)){\n $secret_key = \"adanzweig\";\n $issuer_claim = \"localhost\"; // this can be the servername\n $audience_claim = \"zipdev\";\n $issuedat_claim = time(); // issued at\n $notbefore_claim = $issuedat_claim + 10; //not before in seconds\n $expire_claim = $issuedat_claim + 600; // expire time in seconds\n $token = array(\n \"iss\" => $issuer_claim,\n \"aud\" => $audience_claim,\n \"iat\" => $issuedat_claim,\n \"nbf\" => $notbefore_claim,\n \"exp\" => $expire_claim,\n \"data\" => array(\n \"id\" => $user->id,\n \"firstname\" => $user->firstname,\n \"lastname\" => $user->lastname,\n \"email\" => $user->email\n ));\n\n http_response_code(200);\n\n $jwt = JWT::encode($token, $secret_key);\n echo json_encode(\n array(\n \"message\" => \"Successful login.\",\n \"jwt\" => $jwt,\n \"email\" => $user->email,\n \"expireAt\" => $expire_claim\n ));\n }\n else{\n http_response_code(401);\n echo json_encode(array(\"message\" => \"Login failed.\", \"password\" => 'Password incorrect'));\n }\n }", "title": "" } ]
[ { "docid": "de91b60da0fc29969122cae71f18465b", "score": "0.80681974", "text": "public function login() {\n \n $this->request->allowMethod('post');\n $user = TableRegistry::get('users');\n /**\n * process your data and validate it against database table\n */\n // generate token if valid user\n $payload = $user->find()->where(['email' => 'reggiestain@gmail.com'])->first();\n\n $this->apiResponse['token'] = JwtToken::generateToken($payload);\n $this->apiResponse['message'] = 'Logged in successfully.';\n \n }", "title": "" }, { "docid": "166f95627b0955c9999f1e1f84f5d38b", "score": "0.78878736", "text": "public function login()\n\t{\n\t\t$user_email = isset($this->requestData->user_email)?$this->requestData->user_email:\"\";\n\t\t$password = isset($this->requestData->password)?$this->requestData->password:\"\";\n\t\tif ($user_email && $password != \"\")\n\t\t{\n\t\t\t$data = $this->login_model->validate($user_email,$password);\n\t\t\tif ($data != \"\")\n\t\t\t{\n\t\t\t\t$tokenData = array('user_email'=>$data->user_email,'id'=>$data->id);\n// Create a token\n\t\t\t\t$token = AUTHORIZATION::generateToken($tokenData);\n\t\t\t\techo json_encode($token);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode('Invalid user_email or password');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode(\"plz provide username and password\");\n\t\t}\n\t}", "title": "" }, { "docid": "76b580c8e29b667d2dc85a3e71691cb8", "score": "0.78216743", "text": "public function login()\n {\n $headers = array(\n 'Accept: application/json',\n 'ZURMO_AUTH_USERNAME: ' . $this->username,\n 'ZURMO_AUTH_PASSWORD: ' . $this->password,\n 'ZURMO_API_REQUEST_TYPE: REST',\n );\n \n $response = ApiRestHelper::createApiCall($this->url.'/app/index.php/zurmo/api/login', 'POST', $headers);\n \n $response = json_decode($response, true);\n\n if ($response['status'] == 'SUCCESS')\n {\n return $response['data'];\n }\n else\n {\n return $response;\n }\n }", "title": "" }, { "docid": "b4dfef893439a0ac557d47e5d44c1a74", "score": "0.780231", "text": "public function login() {\n\n // Get the json data from the request.\n $user_data = to_json( $this->input->raw_input_stream);\n\n $username = $user_data->data->auth->username;\n \t$password = $user_data->data->auth->password;\n \t$user = $this->users->get_by_cred($username, $password);\n\n \t// Check if user is null, which means the creds are wrong.\n \tif($user == null) {\n \t $error = '{ \"error\" : \"The username or password is icorrect.\" }';\n \t header('Content-type: application/json');\n \t echo $error;\n \t exit();\n \t}\n\n \t// Now the creds aren't wrong, so generate a hash and send it back to the\n \t// user to store there as a replacement for session.\n \t$token = hash('md5', $username . $password);\n $this->auth->store_user_token($username, $token);\n \t$response = array();\n \t$response['data'] = array( 'token' => $token, 'user_id' => $user->id);\n \theader('Content-type: application/json');\n \techo json_encode($response);\n }", "title": "" }, { "docid": "7459993b4fe8c9cb6c4d369e2ed3c18e", "score": "0.7788811", "text": "private function login()\n {\n if (!isset($this->requestData->username) || !isset($this->requestData->password)) {\n $this->makeResponse(['error' => 'Missing params'], 400);\n }\n $json = json_encode([\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'grant_type' => 'password',\n 'username' => $this->requestData->username,\n 'password' => $this->requestData->password\n ]);\n $data = $this->httpRequest('/auth/token', 'POST', $json);\n if ($data['status'] == 200 && isset($data['response']->access_token)) {\n setcookie($this->sessionCookieName, $data['response']->refresh_token, time() + 15552000, $this->domainPath, $this->clientDomain, $this->useHttps, true);\n $response = ['access_token' => $data['response']->access_token, 'expires_in' => $data['response']->expires_in];\n if (isset($data['response']->firebase_token)) {\n $response['firebase_access_token'] = $data['response']->firebase_token;\n }\n $this->makeResponse($response, $data['status']);\n }\n $this->makeResponse($data['response'], $data['status']);\n }", "title": "" }, { "docid": "af04df0793f3cb7bf20dace27f678028", "score": "0.7771381", "text": "public function login()\n {\n try {\n $json = $this->request->getJSON();\n $username = $json->username;\n $password = $json->password;\n\n $loginData = [\n 'username' => $username,\n 'password' => $password\n ];\n\n $this->validation->run($loginData, 'login');\n foreach ($loginData as $key => $data) {\n if ($this->validation->hasError($key))\n throw new \\Exception($this->validation->getError($key), 401);\n };\n\n $login = $this->model->checkLogin($username);\n\n $verified = $login && password_verify($password, $login->password);\n if (!$verified) throw new \\Exception('Wrong username or Password', 401);\n\n $token = Token::encode($login->id, $login->username);\n\n $output = [\n 'status' => 200,\n 'message' => 'Login Success',\n \"data\" => [\n \"id\" => $login->id,\n \"token\" => $token,\n ],\n ];\n return $this->respond($output, 200);\n } catch (\\Exception $e) {\n $output = [\n 'status' => $e->getCode(),\n 'message' => $e->getMessage(),\n ];\n return $this->respond($output, $e->getCode());\n }\n }", "title": "" }, { "docid": "e2ea861620a8146b0653274c73ff0a46", "score": "0.7719455", "text": "public function doLogin() {\r\n\t\t$http = $this->getHttp();\r\n\r\n\t\t$post = array (\r\n\t\t\t'Username' => $this->getUsername(),\r\n\t\t\t'Password' => $this->getPassword(),\r\n\t\t\t'ID' => '1',\r\n\t\t);\r\n\t\t$http->doPost(self::URL_LOGIN, $post);\r\n\t}", "title": "" }, { "docid": "b1eab95bc98feef643d1547614a5463d", "score": "0.7713571", "text": "public function login()\n {\n //\n }", "title": "" }, { "docid": "f567e98ba0a4f0e5c177a2f924b24355", "score": "0.77100134", "text": "private function login(){\n $this->account->makeLogin();\n }", "title": "" }, { "docid": "70611305a5ca7bad3d3100ce628ef18b", "score": "0.76027495", "text": "public function actionLogin() {\n echo Rest::json(Citoyen::login($_POST[\"email\"], $_POST[\"pwd\"]));\n Yii::app()->end();\n }", "title": "" }, { "docid": "1734792907d452eb1cc12dee9706423d", "score": "0.7586756", "text": "public function login(){\n }", "title": "" }, { "docid": "9700dabcddc0d2aaa62a39e64b5fa6e3", "score": "0.75646365", "text": "public function Login()\n\t{\n\t\t$json = json_decode(RequestUtil::GetBody());\n\n $username = $this->SafeGetVal($json, 'username');\n $password = $this->SafeGetVal($json, 'password');\n $api = $this->SafeGetVal($json, 'api');\n\n require_once 'Model/SafWorkerCriteria.php';\n $criteria = new SafWorkerCriteria();\n $criteria->Enabled_Equals = 1;\n $criteria->Password_Equals = $password;\n $criteria->User_Equals = $username;\n $query = $this->Phreezer->Query('SafLoginReporter',$criteria)->ToObjectArray(true, $this->SimpleObjectParams());\n if (count($query)==1){\n // login success\n $user = new User();\n $user->Login($query[0], null);\n $this->SetCurrentUser($user);\n if ($api){\n $object = new stdClass();\n $object->id=$this->GetCurrentUser()->Id;\n $object->name=$this->GetCurrentUser()->Name;\n $object->ci=$this->GetCurrentUser()->Ci;\n $object->enrollment=$this->GetCurrentUser()->Enrollment;\n $object->bloodType=$this->GetCurrentUser()->BloodType;\n $object->department=$this->GetCurrentUser()->DepartmentId;\n $object->role=$this->GetCurrentUser()->RoleId;\n $object->phoneNumber=$this->GetCurrentUser()->PhoneNumber;\n echo json_encode(array('success'=> true, 'message'=> 'Login correcto', 't'=>$object));\n return;\n }\n }else{\n // login failed\n if ($api){\n echo json_encode(array('success'=> false, 'message'=> 'Datos incorrectos.', 't'=>null));\n return;\n }\n\t\t\t$this->Redirect('Login.LoginForm','Datos incorrectos.');\n }\n\t}", "title": "" }, { "docid": "5ad345a177000a05a8df69eaea69cd4f", "score": "0.7563816", "text": "public function login(){\n\t\n\t $this->_query_check();\n\t if($this->error_found == true){\n\t $this->set([\n 'items' => [],\n 'success' => false,\n 'message' => $this->error_message,\n '_serialize' => ['items','success','message']\n ]);\n return;\n\t }\n\t \n\t $this->_get_nbi_password();\n\t if($this->error_found == true){\n\t $this->set([\n 'items' => [],\n 'success' => false,\n 'message' => $this->error_message,\n '_serialize' => ['items','success','message']\n ]);\n return;\n\t }\n\n if(\n\t (! isset($this->request->getQuery['username'])) or\n\t (! isset($this->request->getQuery['pwd']))\n\t ){\n $this->error_message = \"Username and / or Password missing\";\n $this->set([\n 'items' => array(),\n 'success' => false,\n 'message' => $this->error_message,\n '_serialize' => array('items','success','message')\n ]);\n return;\n\t }\n\t \n\t $username = $this->request->getQuery['username'];\n\t $pwd = $this->request->getQuery['pwd'];\n\n $data = [\n 'Vendor' => $this->Vendor,\n 'RequestPassword' => $this->northbound,\n 'APIVersion' => $this->APIVersion,\n 'RequestCategory' => $this->RequestCategory,\n 'RequestType' => 'Login',\n 'UE-MAC' => $this->client_mac,\n 'UE-Proxy' => '0',\n 'UE-Username' => $username,\n 'UE-Password' => $pwd\n ];\n \n $data = json_encode($data);\n \n $results = $this->_api_http_call($this->api_url, $data);\n\n $return_array = (array) json_decode($results->body());\n\n $this->set([\n 'data' => $return_array,\n 'success' => true,\n '_serialize' => ['data','success']\n ]);\n\t}", "title": "" }, { "docid": "95d16774305a90484516da9c56a0f877", "score": "0.7554445", "text": "public function login(){\n $view = new VMobile();\n $credenziali = $view->recuperaDati();\n $pm = FPersistentManager::getInstance();\n $esito = $pm->esisteUtente($credenziali['username'],$credenziali['password']);\n if($esito){\n $utente = $pm->loadById(\"utente\", $esito);\n\n $t = Token::getInstance();\n $token = $t->generaToken($esito);\n header('X-Auth: '.$token);\n $utente->codifica64();\n $view->mandaDati($utente);\n\n } else {\n header(\"HTTP/1.1 401 Unauthorized\");\n }\n\n }", "title": "" }, { "docid": "2afea46af94f8f6522740b1373165d41", "score": "0.74841034", "text": "private function login()\n {\n $this->auth('post');\n\n $email = I('email/s');\n $password = I('password/s');\n\n if (check($email, 'email')) {\n $user = M('User')->where(['email' => $email])->find();\n }\n\n if (!$user) {\n $user = M('User')->where(['username' => $email])->find();\n }\n\n if (!$user) {\n $this->json(['status' => 300, 'message' => '用户不存在!']);\n }\n\n if (!check($password, 'password')) {\n $this->json(['status' => 301, 'message' => '登录密码格式错误!']);\n }\n\n if (md5($password) != $user['password']) {\n $this->json(['status' => 302, 'message' => '登录密码错误!']);\n }\n\n if ($user['status'] != 1) {\n $this->json(['status' => 303, 'message' => '你的账号已冻结请联系管理员!']);\n }\n\n $this->json(['status' => 200, 'message' => '登陆成功!', 'id' => $user['id']]);\n }", "title": "" }, { "docid": "c0addf8dbd51d272fe3d9d013eb2d997", "score": "0.7441185", "text": "public function login()\n {\n /** @var Session $session */\n// $session = \\Yii::$app->session;\n//\n// if (!$session->isActive) {\n// $session->open();\n// }\n\n $response = $this->_request('srvloto.ashx', 'get', [\n 'mode' => 0,\n 'login' => self::LOGIN,\n 'password' => self::PASSWORD,\n 'oper' => 'autz'\n ]);\n\n //$session->set($this->sessionCookieKey, $response->cookies);\n \\Yii::$app->cache->set($this->sessionCookieKey, $response->cookies->toArray());\n\n \\Yii::info(var_export($response, 1), 'debug');\n\n //$data = $response->getData();\n\n \\Yii::info('Login attempt', 'debug');\n //\\Yii::info(var_export($data, 1), 'debug');\n\n //var_dump($data);\n }", "title": "" }, { "docid": "780e05f6e1e2f6578df621c1d3074cfc", "score": "0.7408917", "text": "private function login() {\r\n\t\t$user = $this->_credentials['user'];\r\n\t\t$password = $this->_credentials['password'];\r\n\t\t$loginUrl = 'https://affiliates.wehkamp.nl/pan/login?';\r\n\t\t\r\n\t\t$valuesLogin = array(new Oara_Curl_Parameter('j_username', $user),\r\n\t\tnew Oara_Curl_Parameter('j_password', $password)\r\n\t\t);\r\n\r\n\t\t$this->_client = new Oara_Curl_Access($loginUrl, $valuesLogin, $this->_credentials);\r\n\r\n\t}", "title": "" }, { "docid": "bf6c58187c2e53534f0d7ef73f188ebe", "score": "0.7384166", "text": "public function login() {\n\t\t\tif(!isset($this->_request['user_name']) || !isset($this->_request['password']))\n\t\t\t\t$this->sendResponse(202,\"Invalid user name or password\");\n\t\t\t$user_name = $this->_request['user_name'];\n\t\t\t$password = md5($this->_request['password']);\n\t\t\t$token = $this->generateRandomString();\n\t\t\t$sql = \"update \".self::usersTable.\" set token='$token' where user_name='$user_name'\";\n\t\t\t$result = $this->executeGenericDMLQuery($sql);\n\t\t\tif($result){\n\t\t\t\t$sql = \"select * from \".self::usersTable.\" where user_name = '$user_name' and password = '$password' limit 1\";\n\t\t\t\t$rows = $this->executeGenericDQLQuery($sql);\n\t\t\t\tif(sizeof($rows)){\n\t\t\t\t\t\t$users = array();\n\t\t\t\t\t\t$users['id'] = $rows[0]['id'];\n\t\t\t\t\t\t$users['user_name'] = $rows[0]['user_name'];\n\t\t\t\t\t\t$users['first_name'] = $rows[0]['first_name'];\n\t\t\t\t\t\t$users['last_name'] = $rows[0]['last_name'];\n\t\t\t\t\t\t$users['token'] = $rows[0]['token'];\n\t\t\t\t\t\t$this->sendResponse(200,$this->messages['loginSuccess'],$users);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->sendResponse(201,\"Invalid username or password\",\"fail\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->sendResponse(202,\"Invalid user name or password\");\n\t\t\t}\n }", "title": "" }, { "docid": "97247cfe94e25c1d8d2e63c904401897", "score": "0.7354888", "text": "public function login(){\n return;\n }", "title": "" }, { "docid": "b1407f7e92d2d49e6fab9b66f815c07c", "score": "0.7343704", "text": "public function loginApi()\n {\n $this->validateLogin(Request());\n\n if ($this->attemptLogin(Request())) {\n $user = Request()->user();\n $new_token = $user->updateToken();\n\n return response()->json([\n 'token' => $new_token,\n 'error' => false\n ]);\n }\n\n //return $this->sendFailedLoginResponse(Request());\n return response()->json([\n 'error' => true,\n 'msn_error' => 'Datos incorrectos'\n ]);\n }", "title": "" }, { "docid": "f409897ca9c983adeaa71eb91772d0ef", "score": "0.73367673", "text": "public function autoLogin() {}", "title": "" }, { "docid": "275337b6b4c267c5ce6968db9de0bdeb", "score": "0.7327578", "text": "protected function LoginAuthentification()\n {\n \n $tokenHeader = apache_request_headers();\n\n //isset Determina si una variable esta definida y no es NULL\n\n if(isset($tokenHeader['token']))\n {\n \n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm); \n //var_dump($datosUsers);\n if(isset($datosUsers->nombre) and isset($datosUsers->password))\n { \n $user = Model_users::find('all', array\n (\n 'where' => array\n (\n array('nombre'=>$datosUsers->nombre),\n array('password'=>$datosUsers->password)\n )\n ));\n if(!empty($user))\n {\n foreach ($user as $key => $value)\n {\n $id = $user[$key]->id;\n $username = $user[$key]->nombre;\n $password = $user[$key]->password;\n }\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n\n if($username == $datosUsers->nombre and $password == $datosUsers->password)\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n } \n \n }", "title": "" }, { "docid": "6e00a08ff1e0850f3944529a63727f44", "score": "0.732434", "text": "static public function login()\n\t{\n\t\t$msg = false;\n\t\t$success = false;\n\t\t$token = null;\n\n\t\tif (!empty($_POST['email']) && !empty($_POST['password']))\n\t\t{\n\t\t\ttry {\n\t\t\t\tif ($success = (new Users)->login($_POST['email'], $_POST['password']))\n\t\t\t\t{\n\t\t\t\t\t$token = self::createToken();\n\t\t\t\t\t$msg = 'Success!';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$msg = 'Invalid credentials';\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (User_Exception $e)\n\t\t\t{\n\t\t\t\t$msg = $e->getMessage();\n\t\t\t}\n\t\t}\n\n\t\theader('Content-Type: application/json');\n\t\techo json_encode([\n\t\t\t'message'\t=>\t$msg,\n\t\t\t'success'\t=>\t$success,\n\t\t\t'token'\t\t=>\t$token,\n\t\t]);\n\t}", "title": "" }, { "docid": "8d87a563efcf036d0b218047f8be90f2", "score": "0.73203343", "text": "private function login() {\n //Set variables\n $uid = $this->postData->cueid;\n $password = $this->postData->password;\n\n $this->load->model('login');\n $intUid = $this->login->userLogin($uid, $password);\n if((int)$intUid > 0){\n $this->arrReturn['success'] = 1;\n $this->getMyBookedSlots($intUid);\n $this->arrReturn['token'] = $intUid;\n } else {\n $this->arrReturn['success'] = 0;\n $this->arrReturn['text'] = \"Invalid login details.\";\n }\n }", "title": "" }, { "docid": "664227fa6a5373f5607289a48ecde927", "score": "0.7310216", "text": "public function authWallet(){\n //datos a enviar\n $data = array(\"email\" => \"apiweb@mifarma.com.pe\", \"password\" => \"9rfu4Vx=W6%Nw;3y\");\n //url contra la que atacamos\n $ch = curl_init(\"http://apishop.mifarma.com.pe/api/v1/auth/login\");\n //a true, obtendremos una respuesta de la url, en otro caso,\n //true si es correcto, false si no lo es\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //establecemos el verbo http que queremos utilizar para la petición\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n //enviamos el array data\n curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));\n\n //obtenemos la respuesta\n $response = curl_exec($ch);\n // Se cierra el recurso CURL y se liberan los recursos del sistema\n curl_close($ch);\n if(!$response) {\n return false;\n }else{\n return response()->json((string)(json_decode($response)->access_token));\n }\n }", "title": "" }, { "docid": "d7864ce1a203d4820e7e59fa93e5baa6", "score": "0.72647226", "text": "function login()\n {\n\t $params=['username'=>$this->username, 'password'=> $this->password];\n\t $options = array(\n\t\t CURLOPT_RETURNTRANSFER => true, \n CURLOPT_ENCODING => \"\", \n CURLOPT_URL => 'http://localhost:8888/consumer/api/user_authentication.php', \n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $params,\n );\n\n $ch = curl_init();\n curl_setopt_array($ch, $options);\n $is_logged_in = curl_exec($ch);\n curl_close($ch);\n \n if ($is_logged_in == 1) {\n return 1;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "031c882a519ffe32b093ae2cecd53d48", "score": "0.7254651", "text": "public function login() {\n echo \"login correcto\";\n }", "title": "" }, { "docid": "7ad11924ddc92adb3bc01480deb3d8f2", "score": "0.72545755", "text": "public function qaApiLogin()\n {\n $this->store->setConfig('hermes/general/testmode', 1);\n $this->store->setConfig('hermes/account/partner_id', 'EXT000159');\n $this->store->setConfig('hermes/account/api_pwd', '171a49c0d02d394a134b17f911332563');\n \n $this->store->setConfig('hermes/account/username', 'ProPS_DP_120404112737');\n $this->store->setConfig('hermes/account/password', 'ProPS_DP_120404112737');\n \n $this->availableClient->login();\n $this->assertNotNull($this->availableClient->getUserToken());\n }", "title": "" }, { "docid": "49878237482220e8a619e902fa23de51", "score": "0.72455263", "text": "public function login() {\n $this->init();\n $this->version = $this->getVersion();\n\n $params = array(\n 'userLogin' => $this->userLogin,\n 'countryCode' => $this->countryCode,\n 'webapiKey' => $this->webapiKey,\n 'localVersion' => $this->version,\n );\n\n if (self::isPasswordEncrypted()) {\n $params['userHashPassword'] = $this->userPassword;\n $this->session = $this->client->doLoginEnc($params);\n }\n else {\n $params['userPassword'] = $this->userPassword;\n $this->session = $this->client->doLogin($params);\n }\n\n $this->sid = $this->session->sessionHandlePart;\n $this->userId = $this->session->userId;\n $this->logged = TRUE;\n\n return $this;\n }", "title": "" }, { "docid": "010aca433eb8716c0de32d9e8d3f5158", "score": "0.72385937", "text": "public function login()\n {\n\n // if (! $token = auth()->attempt($credentials)) {\n // return response()->json(['error' => 'Unauthorized'], 401);\n // }\n\n // return $this->respondWithToken($token);\n }", "title": "" }, { "docid": "f3c9b3b83a236018ae5ee5850d335f1a", "score": "0.7231355", "text": "public function loginAction() {\n $requiredParams = ['login', 'password'];\n\n if ($params = __request::checkParams($requiredParams)) {\n // Before using the __auth module you should configure it in application.php conf file\n $isAuthenticated = __auth::authenticate(__request::raw('login'), __request::raw('password'));\n\n if ($isAuthenticated) {\n return __auth::getInfos();\n }\n }\n\n __::unauthorized('Bad login or password');\n }", "title": "" }, { "docid": "be3ff355496febd5f25522ea432b19d1", "score": "0.72278655", "text": "private function LoginAuth() {\n\t\tif ( isset($_POST['email']) && isset($_POST['password']) ) {\n\t\t\t$this->auth->login( $_POST['email'], $_POST['password'], isset($_POST['remember']) );\n\t\t} else {\n\t\t\t$this->auth->check();\n\t\t}\n\n\t\tif ( $this->auth->hasError() )\n\t\t\t$this->f3->set('login_error', $this->auth->getStatus());\n\n\t\tif (isset($_GET[\"vk_error\"])) {\n\t\t\t$errorText = isset($_GET[\"vk_desc\"]) ? \n\t\t\t\t\t\t\t$_GET[\"vk_desc\"] : \"Ошибка авторизации Вконтакте\";\n\n\t\t\t$this->f3->set('login_error', $errorText);\n\t\t}\n\t}", "title": "" }, { "docid": "e748b160a2071db304329143f1c36606", "score": "0.72122735", "text": "public function loginUser() {\n\t\t\n\t\t$data = file_get_contents(\"php://input\");\n\t\t$data = $this -> _formatInput($data);\n\t\t\n\t\tif($data && AuthenticationService::authenticate($data['email'], $data['password'])) {\n\t\t\t$model = Users::findOne(array(\n\t\t\t\t'conditions' => array('email' => $data['email'])\n\t\t\t));\n\t\t\t\n\t\t\t$this -> _jsonResponse($model -> getIterator() -> getData());\n\t\t} else {\n\t\t\techo Response::createResponse(404, 'Invalid Username/Password' );\n\t\t}\n\t\t\n\t\texit();\n\t}", "title": "" }, { "docid": "47222519b43c74b5b7442ae47f431668", "score": "0.71937674", "text": "public function login()\n {\n $credentials = request(['email', 'password']);\n\n if (! $token = auth('api')->attempt($credentials)) {\n return response()->json(['error' => 'Email and Password Incorrect'], 401);\n }\n $userLoginDetail=DB::table('users')->where('email', request(['email']))->get();\n $name= $userLoginDetail['0']->name;\n $id= $userLoginDetail['0']->id;\n $email= $userLoginDetail['0']->email;\n\n return $this->respondWithToken($token,$name,$email,$id);\n }", "title": "" }, { "docid": "8b3f88183142febe75e62a5cb9015bcd", "score": "0.7184319", "text": "public function login(){\n $response = Http::get($this->_endpointUrl.\"grant/?grant_type=password&client_id=\".Setting::getParam('moloni_client_id').\"&username=\".Setting::getParam('moloni_email').\"&client_secret=\".Setting::getParam('moloni_client_secret').\"&password=\".urlencode(Setting::getParam('moloni_password')));\n if($response->successful()){\n \\Debugbar::info($response);\n $data = $response->json();\n \\Debugbar::info($data);\n if(!empty($data['error'])){\n return false;\n }else{\n $this->accessToken = $data['access_token'];\n Cache::put('moloni_access_token', $this->accessToken);\n $this->refreshToken = $data['refresh_token'];\n Cache::put('moloni_refresh_token', $this->refreshToken);\n Cache::put('moloni_expire_access_token', (time()+intval($data['expires_in'])));\n Cache::put('moloni_expire_refresh_token', (time()+1209600));// 14 days\n \\Debugbar::info('grava cache');\n return true;\n }\n }else{\n\n return false;\n }\n }", "title": "" }, { "docid": "064f9c7195e386afd3258f60273fb3e8", "score": "0.71828955", "text": "public function login()\n\t{\n\t\treturn $this->OAuthClient->OAC_Login();\n\t}", "title": "" }, { "docid": "d80c868dc95a72153ed9a78b94963c92", "score": "0.7182127", "text": "public function testLogin()\n\t{\n\t\t$response = $this->login();\n\t\t\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$this->seeJsonContains([\n \t\"api_key\" => Session::get('token')\n ]);\n\t}", "title": "" }, { "docid": "fc3630e816423f4fc56cab9a3316602a", "score": "0.7174641", "text": "public function login() {\n\n //poslani su username i password, provjeri ih\n if (isset($_POST['logusername']) && isset($_POST['logpass'])) {\n $username = $_POST['logusername'];\n $password = $_POST['logpass'];\n $us = new UsersService();\n if ($us->checkLogin($username, $password)) {\n $_SESSION['login'] = $username;\n $userData = $us->getUser($username);\n $res = array(\n \"username\"=> $userData->username,\n \"email\"=> $userData->email,\n \"level\"=> $userData->level,\n );\n sendJSONandExit(array(\"success\"=>true, \"data\"=>$res));\n } else\n sendJSONandExit(array(\"success\"=>false, \"message\"=>\"Wrong username or password.\"));\n }\n\n }", "title": "" }, { "docid": "17658705c1c1c8bb44ca8365ff86f83d", "score": "0.7166542", "text": "function login() {\n }", "title": "" }, { "docid": "fc9791afc1f59a61d8cd49fbdfe4ebd9", "score": "0.71488094", "text": "public function _login(){\n\t\tglobal $current_user; \t\n \t$result = $this->_soapClient->call('portal_login',\n array('user_auth' => \n array('user_name' => $this->_user->user_name,\n 'password' => $this->_user->user_hash, \n 'version' => '.01'), \n \t'user_name' =>'portal',\n 'application_name' => 'SoapTestPortal')\n );\n $this->_sessionId = $result['id'];\n\t\treturn $result;\n\t\t\n }", "title": "" }, { "docid": "10b6a4d91f503fefe8a030992ea49fdf", "score": "0.7148079", "text": "public function Login() {\n\n\t\tif (isset($_POST[\"action\"])) {\n\t\t\tswitch ($_POST[\"action\"]) {\n\t\t\t\tcase 'loginAuth':\n\t\t\t\t\t$this->LoginAuth();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'loginVK':\n\t\t\t\t\t$this->LoginVK();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$this->LoginAuth();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$this->view->showLogin($this->f3);\n\t}", "title": "" }, { "docid": "8591c02f6b2a681aba01b7c38c84ea46", "score": "0.71288186", "text": "public function actionLogin() {\r\n\r\n }", "title": "" }, { "docid": "3e2bb451d46ed96beac95d00f59e0bf5", "score": "0.7125817", "text": "public function loginApiAction(){\n\n //Receive the RAW post data via the php://input IO stream. \n $postData = file_get_contents(\"php://input\");\n if(!empty($postData)){\n $postData = json_decode($postData);\n }\n\n $session = $this->_getSession();\n $session->clear();\n\n $login['username'] = trim($postData->email_id);\n $login['password'] = trim($postData->password);\n \n if (!empty($login['username']) && !empty($login['password'])) {\n try {\n\n $session->login( $login['username'], $login['password']);\n //$data = $user->login( $login['username'], $login['password']);\n\n if ($session->getCustomer()->getIsJustConfirmed()) {\n $this->_welcomeCustomer($session->getCustomer(), true);\n }\n\n } catch (Mage_Core_Exception $e) {\n\n switch ($e->getCode()) {\n\n case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:\n\n $value = $this->_getHelper('customer')->getEmailConfirmationUrl($login['username']);\n $message = $this->_getHelper('customer')->__('This account is not confirmed. <a href=\"%s\">Click here</a> to resend confirmation email.', $value);\n break;\n case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:\n $message = $e->getMessage();\n break;\n default:\n $message = $e->getMessage();\n }\n $session->addError($message);\n $session->setUsername($login['username']);\n } catch (Exception $e) {\n // Mage::logException($e); // PA DSS violation: this exception log can disclose customer password\n }\n }\n\n if( $session->getCustomer()->email){\n \n /********************************** auth component verification start here ******************************/\n\n $callbackUrl = Mage::getBaseUrl().\"oauth_admin.php\";\n $temporaryCredentialsRequestUrl = Mage::getBaseUrl().\"oauth/initiate?oauth_callback=\" . urlencode($callbackUrl);\n $adminAuthorizationUrl = Mage::getBaseUrl().'admin/oAuth_authorize';\n $accessTokenRequestUrl = Mage::getBaseUrl().'oauth/token';\n $apiUrl = Mage::getBaseUrl().'api/rest';\n $consumerKey = '6e0ef15f2a968e8ff0f9086b303dfb56';\n $consumerSecret = '70d793376bedee90e6bf91db5f2a6af0';\n\n $authType = ($_SESSION['state'] == 2) ? OAUTH_AUTH_TYPE_AUTHORIZATION : OAUTH_AUTH_TYPE_URI;\n $oauthClient = new OAuth($consumerKey, $consumerSecret, OAUTH_SIG_METHOD_HMACSHA1, $authType);\n $oauthClient->enableDebug();\n \n $requestToken = $oauthClient->getRequestToken($temporaryCredentialsRequestUrl); \n \n\n /********************************** auth component verification end here ******************************/\n\n /****************************** fetch data respect to customer logged in *****************************/\n\n $customerID = $session->getCustomer()->getId(); \n\n $data = array( \n 'name' => $session->getCustomer()->firstname.' '.$session->getCustomer()->lastname,\n 'email' => $session->getCustomer()->email,\n 'isVerified' => $session->getCustomer()->getIsActive(),\n 'user_id' => $session->getCustomer()->getId(),\n 'auth_token' => $requestToken['oauth_token'], // auth key created after login\n 'token_secret' => $requestToken['oauth_token_secret'], // auth secret \n 'auth_key' => base64_encode(convert_uuencode($customerID)), // customer id in encrypted form\n 'display_name' => $session->getCustomer()->getName()\n );\n\n $response = array(\n 'success'=>1,\n 'message'=>'Login successfully.',\n 'data'=>$data\n );\n }else{\n\n // set response in case data not found\n if (!empty($login['username']) && !empty($login['password'])) { \n $response = array('success'=>0,'message'=>$message,'data'=>array());\n }else{\n $response = array('success'=>0,'message'=>\"Enter email id and password both.\",'data'=>array());\n }\n }\n echo json_encode(array(\"response\"=>$response)); // return response\n\n }", "title": "" }, { "docid": "718b877cd80e401e3492b93332449ca6", "score": "0.7125298", "text": "public function getLogin() {\n\n }", "title": "" }, { "docid": "31a1a41073fcaa611c0f0064e6dc1f1d", "score": "0.7120441", "text": "private function login(){\n\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\n $email = trim($this->_request['email']);\n $password = trim($this->_request['password']);\n\n\t\t\t//$postdata = file_get_contents(\"php://input\");\n\t\t\t//$test = json_decode($postdata);\n\n\n\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)){\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)){\n\t\t\t\t\t$userRepository = $this->em->getRepository('User');\n\t\t\t\t\t$user = $userRepository->findOneBy(array('email' => $email,'password' => $password));\n\t\t\t\t\tif($user!=NULL){\n\t\t\t\t\t\t// If success everythig is good send header as \"OK\" and user details\n\t\t\t\t\t\t$this->response($this->json($user), 200);\n\t\t\t\t\t}\n\t\t\t\t\t//$this->response('', 204);\t// If no records \"No Content\" status*/\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Dirección de correo electrónico o contraseña no válida\");\n\t\t\t$this->response($this->json($error), 400);\n\t\t}", "title": "" }, { "docid": "66a613406c5ebc0182c7eea51b4c6894", "score": "0.71126944", "text": "public function driver_login(){\n\t\t$postdata = file_get_contents(\"php://input\");\n \t$request = json_decode($postdata);\n $result = $this->model_web_service->driver_login($request);\n \n if($result){\n\t\t\t\n\t\t\t$finresult[] = array( 'status' => 'success','message' => 'Successfully Logged in', 'code' => 'success' ,\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t'id' \t\t=> $result['id'],\n\t\t\t\t\t\t\t\t\t'mobile'\t\t=> $result['phone'],\n\t\t\t\t\t\t\t\t\t'username'\t=> $result['user_name'],\n\t\t\t\t\t\t\t\t\t'email'\t\t\t=> $result['email']\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\tprint json_encode($finresult);\n\t\t}else{\n\t\t\t$finresult[] = array( 'status' => 'failed','message' => 'Unknown credential , please try again!', 'code' => 'Login failed' ,\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\tprint json_encode($finresult);\n\t\t}\n \n //var_dump($request);\n }", "title": "" }, { "docid": "6b52a989e352d15a91506ab3e454b612", "score": "0.7099018", "text": "function login_post(){\n\t\t$response['SUCCESS'] = array('status' => TRUE, 'message' => 'login success' );\n\n\t\t#Set response API if Fail\n\t\t$response['FAIL'] = array('status' => FALSE, 'message' => 'login fail' , 'data' => null );\n\t\t\n\t\t$user_data=$this->M_auth->login($this->post('email'),md5($this->post('password')));\n\t\t// $user_data=$this->m_auth->login('admin@gmail.com',md5('admin'));\n\t\t// var_dump($this->post('EMAIL'),$this->post('PASSWORD')); die();\n\t\tif ($user_data) {\n\t\t\t// var_dump($user_data);\n\t\t\t$response['SUCCESS']['data']=$user_data;\n\t\t\t // $this->session->set_userdata((array)$user_data);\n\t\t\t // var_dump($this->session->userdata('role'));\t\t\t\n\t\t\t$this->response($response['SUCCESS'] , REST_Controller::HTTP_OK);\n\t\t}else{\n\t\t\t$this->response($response['FAIL'] , REST_Controller::HTTP_NOT_FOUND);\n\t\t}\n\n\t}", "title": "" }, { "docid": "d92cf58d8f189dfa6c1cdc03409bdc52", "score": "0.7089221", "text": "function bpkb_login(){\n\t\t// $data = array(\n\t\t// \t\t\"LoginInfo\" => array ( \n\t\t// \t\t\t\t\"LoginName\" => $this->user,\n\t\t// \t\t\t\t\"Salt\" => $this->salt,\n\t\t// \t\t\t\t\"AuthHash\" => md5( $this->user . \"_\".$this->salt. md5($this->pass) ) // algo md5(user+md5(pass)) \n\t\t// \t\t),\n\t\t// \t\t\"username\"=> \"upie\",\n\t\t// \t\t\"password\"=> \"upie\",\n\t\t// \t\t\"imei\" => \t\"PMJ001\"\t\n\t\t// \t\t);\n\n\t\t$data = array(\n\t\t\t\t\"LoginInfo\" => array ( \n\t\t\t\t\t\t\"LoginName\" => $this->user,\n\t\t\t\t\t\t\"Salt\" => $this->salt,\n\t\t\t\t\t\t\"AuthHash\" => md5( $this->user . \"_\".$this->salt. md5($this->pass) ) // algo md5(user+md5(pass)) \n\t\t\t\t),\n\t\t\t\t\"Param\"=>array(\n\t\t\t\t\t\t\"v_user_name\"=> \"upie\",\n\t\t\t\t\t\t\"v_password\"=> \"upie\",\n\t\t\t\t\t\t\"v_id_alat\" => \t\"PMJ001\")\t\n\t\t\t\t);\n\n\t\t$data_json = json_encode($data);\n\t\t// echo $data_json; exit;\n\t\t// echo \"sebelum dikirim \" . $data_json;\n\t\t$res = $this->execute_service2($this->url,\"bpkb_login\",$data_json);\n\n\t\t// echo \"<hr />\"; \n\t\theader('Content-type: text/xml');\n\t\techo $res;\n\n\t\t \n\t}", "title": "" }, { "docid": "7f161333377b746f09f6937dbc2311c1", "score": "0.70823795", "text": "public function metamask_login()\n {\n \n }", "title": "" }, { "docid": "18fbf334cfc18b3e5da76932c6a6737d", "score": "0.707679", "text": "public function login()\n {\n $credentials = request(['email', 'password']);\n\n if (!$token = auth()->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n\n $this->send2FACode();\n\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n ]);\n }", "title": "" }, { "docid": "9ecf2065de931725c9966f7320b49966", "score": "0.70764756", "text": "public function authenticate() {\n try {\n // sanitize this?\n $authuri = BASE_URI . '/users/' . USERNAME . '/login?password=' . PASSWORD;\n\n $response = $this->client->request('POST', $authuri, [\n 'on_stats' => function (GuzzleHttp\\TransferStats $stats) use (&$url) {\n $url = $stats->getEffectiveUri();\n }]);\n\n //echo \"Sending request to \" . $url . \"\\n\";\n } catch (GuzzleHttp\\Exception\\ServerException $e) {\n } catch (GuzzleHttp\\Exception\\ClientException $e) {\n throw new Exception(\"Unable to authenticate:\\n\" . $e); // non available page!\n }\n if ($response->getStatusCode() == 200) {\n //echo \"Successfully authenticated!\\n\";\n $data = json_decode($response->getBody(), true);\n $this->session_id = $data['session']; // make a test for this \n //echo \"Session id \" . $this->session_id . \" saved.\\n\";\n } else {\n throw new Error(\"Something went wrong with your request. Unable to authenticate.\\n\");\n }\n }", "title": "" }, { "docid": "305fc5a7d1a84a1e2f4104f4fa91db28", "score": "0.7061051", "text": "public function login()\n {\n $credentials = request(['email', 'password']);\n $token = Auth::guard('api')->attempt($credentials);\n if ($token){\n $user = User::where('email', '=' , $credentials['email'])->first();\n $user['token'] = $token;\n return response()->json($user);\n\n }else{\n return response()->json(['error' => 'credenciais inválidas'],401);\n }\n\n }", "title": "" }, { "docid": "15e2528895478a191ea753734bc6f424", "score": "0.70547837", "text": "public function login_post() {\n $rest_json = file_get_contents(\"php://input\");\n $postData = json_decode($rest_json, true);\n if(NULL !=$postData['useremail'] && NULL !=$postData['password'])\n {\n\t\t\t$username = $postData['useremail'];\n\t\t\t$password = $postData['password'];\n\t\t\t$userType = $postData['usertype'];\n\t\t\t$deviceId = $postData['deviceId'];\n\t\t\t$registerId = $postData['registerId'];\n\t\t\t$response = $this->login->clientApiLogin($username,$password,$userType);\n\t\t\tif ($response['success'] == true)\n\t\t\t{\n $userId = $response['data']->userId;\n if(!$this->_get_key_user($userId, $deviceId,$registerId))\n {\n $apiKey = $this->createKey($response['data'], $password, $deviceId,$registerId);\n }\n // Else regenerate key for current user\n else\n {\n // $apiKey = $this->regenerateKey($userId, $deviceId,$registerId);\n\t\t\t\t$apiKey = $this->_get_key_user($userId, $deviceId,$registerId);\n\t\t\t\t$apiKey = $apiKey->key;\n }\n $response['data']->apiKey = $apiKey;\n $output['status'] \t\t= \tREST_Controller::HTTP_OK;\n $output['data'] \t\t= \t$response['data'];\n $this->response($output, REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response($response, REST_Controller::HTTP_CONFLICT);\n }\n }\n else\n {\n $this->response( ['status'=>REST_Controller::HTTP_CONFLICT], REST_Controller::HTTP_CONFLICT);\n }\n }", "title": "" }, { "docid": "4a92cd0673f0e7b1c4e1d7ffd6fc9f59", "score": "0.7050238", "text": "function login() {\r\n\t}", "title": "" }, { "docid": "859e48623c54b282c9bcf865cd6f93fc", "score": "0.704739", "text": "public function login()\n {\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n\n // return $this->respondWithToken([$token, 'user'=>Auth::user()]);\n return response()->json(['token'=>$token, 'user'=>Auth::user()]);\n \n\n }", "title": "" }, { "docid": "539aa88e85d71c349c63356dc7ca650a", "score": "0.7040657", "text": "public function login($input);", "title": "" }, { "docid": "e81b53fb245820e36780c5ed0ce085f1", "score": "0.7039869", "text": "public function login()\n {\n // Check for request forgeries\n\tJRequest::checkToken() or jexit('Invalid Token');\n\n\t// More info: http://docs.joomla.org/Component_parameters\n $credentials = $this->getCredentials();\n \n //url for redirect\n $url = $this->getAuthorizationUrl($credentials);\n\n\t// redirect\n\t$this->setRedirect($url);\n }", "title": "" }, { "docid": "ea91b5ddd31f86a348b2b71e42f9c342", "score": "0.7036174", "text": "public function loginAction() {\n if ($_POST['token'] == $_SESSION['token'] && (time() - $_SESSION['tokenTime']) < 600) {\n $um = new \\Modele\\UserManager();\n $user = $um->getUserByLogin($_POST['login']);\n if ($user) {\n //var_dump($user);\n if (password_verify($_POST['pwd'], $user->getPwd())) {\n //echo 'ok';\n $_SESSION['IPaddress'] = sha1($_SERVER['REMOTE_ADDR']);\n $_SESSION['userAgent'] = sha1($_SERVER['HTTP_USER_AGENT']);\n $user->setAuth(true);\n $_SESSION['user'] = $user;\n setcookie(session_name(), session_id(), time() + 3600, '/', null, null, true);\n } else {\n sleep(1);\n $this->setFlash('Login ou mot de passe incorrecte');\n }\n } else {\n sleep(1);\n $this->setFlash('Login ou mot de passe incorrecte');\n }\n } else {\n $this->setFlash('csrf');\n }\n\n header('Location: ' . \\Lib\\Application::RACINE . 'admin');\n exit();\n }", "title": "" }, { "docid": "be17a18cbb0242a630b416653f36099e", "score": "0.7033879", "text": "function login() {\n }", "title": "" }, { "docid": "be17a18cbb0242a630b416653f36099e", "score": "0.7033879", "text": "function login() {\n }", "title": "" }, { "docid": "bb3b407a289c21b1a08784e1ae208779", "score": "0.7027666", "text": "public function login(){\n\t\t\techo $this->name . ' logged in';\n\t\t}", "title": "" }, { "docid": "0065c86867ce6205e7ebf9e0e3d56205", "score": "0.7023123", "text": "private function authenticate()\n {\n $HttpSocket = new HttpSocket();\n\n $data = array(\n 'email'=>'marketing@payscape.com',\n 'password'=>'0ow337!D0g',\n 'user_key'=>self::user_key\n );\n\n $response = $HttpSocket->post(self::pardot_url . 'login/version/3', $data);\n $response_array = Xml::toArray(Xml::build($response->body));\n if(!$response->isOk())\n {\n //Todo send email to dev\n error_log(json_encode($response_array));\n }\n\n return $response_array['rsp']['api_key'];\n }", "title": "" }, { "docid": "1addfabb7db9334e133f7a1c74803831", "score": "0.7022118", "text": "public function sys_login(){\n if($this->ByrSession->isLogin)\n $this->_stop();\n @$id = trim($this->params['url']['id']);\n @$pwd = rawurldecode(trim($this->params['url']['pwd']));\n if(Configure::read(\"cookie.encryption\"))\n $pwd = $this->ByrSession->decrypt($pwd);\n $pwd = base64_decode($pwd);\n //single sign-on\n $this->header('P3P: CP=CAO PSA OUR');\n try{\n $this->ByrSession->login($id, $pwd);\n }catch(LoginException $e){\n $this->_stop();\n }\n }", "title": "" }, { "docid": "4253ba70a890ecf4c86424b8cb7f9b1c", "score": "0.70084256", "text": "public function login() {\n $db = \\db\\Mysqli::getInstance();\n\n // Getting json raw string from client body request\n $jsonString = file_get_contents('php://input');\n\n // Converting raw json string from client's request body to PHP array\n // Second parameter for json_decode decides output data format.\n // true - PHP array\n // false - PHP object\n //\n $jsonArray = json_decode( $jsonString, true );\n\n $userEmail = $jsonArray['email'];\n $userPass = $jsonArray['pass'];\n\n // var_dump($userPass);\n\n // SQL\n $sql = \"SELECT email, pass FROM \" . $this->getTableName() . \" WHERE email = '$userEmail' AND pass = '$userPass' LIMIT 1\";\n\n // echo $sql;\n\n $dbRes = $db->query( $sql );\n\n if( $result = mysqli_fetch_assoc( $dbRes )) {\n\n $_SESSION['auth'] = true;\n $_SESSION['user'] = $result;\n return( [\"login\"=> \"success\" ] );\n };\n\n var_dump($result);\n\n return( [\"login\"=> \"failed\" ] );\n // echo 'Error username or password!';\n\n }", "title": "" }, { "docid": "3aeb94c4ed1f5d60dfb8d7f64480387f", "score": "0.69902223", "text": "public function login()\n {\n $this->request->allowMethod(['get', 'post']);\n\n if ($this->request->is('post')) {\n $user = $this->Auth->identify();\n if (!$user) {\n throw new UnauthorizedException(__('Login not successful'));\n }\n $session = $this->request->session();\n $tokens = $this->Auth->getAuthenticate('API')->getConfig('tokens');\n $session->write('tokens', $tokens);\n $session->write('user', $user);\n\n return $this->redirect(['_name' => 'dashboard']);\n }\n }", "title": "" }, { "docid": "074e396d551440bd15e040644a94e293", "score": "0.69873047", "text": "public function testLogin() {\n $transport = new RequestToBodyMockTransport();\n $api = new Api(self::HOST, ['transport' => $transport]);\n $credentials = [\n 'id_token' => 'mylongidtokenasdfasdfasdf',\n 'email' => 'test@rumbleship.com'\n ];\n $resp = $api->login($credentials);\n $url_expected = \"https://\" . self::HOST . \"/v1/login\";\n $this->assertEquals($resp->body['url'], $url_expected);\n $this->assertEquals($resp->body['options']['type'], 'POST');\n $this->assertEquals($resp->body['request_payload']['id_token'], $credentials['id_token']);\n $this->assertEquals($resp->body['request_payload']['email'], $credentials['email']);\n }", "title": "" }, { "docid": "fbb83baeb8b143b906137db96dcfb75d", "score": "0.69870496", "text": "public function login()\n {\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt(array('is_deleted'=>0, 'email' => $credentials['email'], 'password' => $credentials['password']))) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n return $this->respondWithToken($token);\n }", "title": "" }, { "docid": "336898ab4327aba6f600a5c774defed1", "score": "0.6982034", "text": "public function login() {\n //The authenticate function will cause a redirect to the OpenID provider\n // unless the current url contains a code parameter. In that case, the\n // code will be used to aquire tokens from the api endpoint.\n\n try {\n $success = $this->oidcClient->authenticate();\n } catch (OpenIDConnectClientException $exception) {\n if (App::environment('local')) {\n throw $exception;\n }\n abort(400);\n }\n\n if ($success) {\n //Request user info from the endpoint. This will be used below.\n $userInfo = $this->oidcClient->requestUserInfo();\n\n //Retrieve (or create) user that matches token\n $token = $this->tokenParser->parse($this->oidcClient->getIdToken());\n $user = $this->userProvider->retrieveByCredentials($token->getClaims());\n\n //Store refresh token\n $iss = $token->getClaim('iss');\n $sub = $token->getClaim('sub');\n $this->tokenStorage->saveRefresh($iss, $sub, $this->oidcClient->getRefreshToken());\n\n //Update user model if it differs from openid user\n if($user->name !== $userInfo->name ||\n $user->email !== $userInfo->email) {\n $user->name = $userInfo->name;\n $user->email = $userInfo->email;\n $user->save();\n }\n\n //Set user in guard\n Auth::setUser($user);\n\n\n //Save id token stateless log-in\n $this->requestTokenParser->save($token);\n\n //Create a response redirecting user to intended route or home page\n $response = redirect()->intended(route($this->homeRoute()));\n\n return $response;\n } else {\n Session::forget('url.intented');\n return redirect()->route($this->homeRoute());\n }\n }", "title": "" }, { "docid": "742c81f09cb2e9f5f180df815ea7467c", "score": "0.69711906", "text": "public function login()\n {\n $post = $this->getPost();\n $this->clearHTML($post);\n $email = $post['email'];\n $password = $post['password'];\n\n $Valida = new ValidController($name = \"banana\", $email, $password, $passwordC = \"123\", $CPF = \"502.870.467-88\");\n $array = $Valida->validalogin();\n\n if($array[0] == 1){\n $num = $array[1];\n header(\"Location: /?alert=$num#paralogin\");\n die();\n }\n\n $user = new UserModel;\n $resultado = $user->login($email, $password);\n \n if ($resultado != false){\n $user->setToken($resultado);\n }else {\n header(\"Location: /?alert=9#paralogin\");\n die(\"Usuario Invalido!!!\");\n }\n \n $bool = $user->getToken();\n\n if ($bool){\n $this->create_session($resultado);\n }\n \n $user->getNivel();\n $userView = new UserView;\n $userView->Login();\n\n }", "title": "" }, { "docid": "6f2df88a0e3fc57b4b3046f4e7136f90", "score": "0.69696873", "text": "public function login()\n {\n global $app_config;\n try\n {\n $oauth_token = empty($this->sugar_access_token) ? \n $this->getSugarAuthToken() : $this->sugar_access_token;\n $url = $this->getApiUrl().'/tm_telemarketers';\n $url.= \"?max_num=20&order_by=date_modified%3Adesc&filter%5B0%5D%5Bnoagent%5D=\".$_REQUEST['noagent'].\"&filter%5B1%5D%5Bpassword%5D=\".$_REQUEST['password'];\n self::$logger->info('url: '.$url);\n $client = self::getApiClient();\n $res = $client->get(\n $url,\n array(\n CURLOPT_HTTPHEADER => array(\n 'Content-Type: application/json',\n 'oauth-token: ' . $oauth_token\n )\n )\n );\n //self::$logger->info('result: '.print_r($res,1));\n if (count($res['records']) == 1 && !empty($res['records'][0]['id'])) {\n echo json_encode(array('result' => true, 'id' => $res['records'][0]['id']));\n $user = array(\n \"noagent\"=>$_REQUEST['noagent'], \n \"role\"=>\"user\"\n );\n $_SESSION['user'] = $user;\n } else if (count($res['records']) == 0){\n throw new PortalApiExceptionInvalidParameter('Invalid Credentials !', 422);\n } else if (count($res['records']) > 1){\n throw new PortalApiExceptionInvalidParameter(\n 'Unable to login. Mutiple users found with same NOAGENT',\n 422\n );\n }\n } \n catch (Exception $e) {\n self::$logger->error('caught exception: '.$e->getMessage() . ' : code: '. $e->getCode());\n self::$logger->error($e->getTraceAsString());\n if ($e->getCode() == 401) {\n // access token expired, regenerate it\n self::$logger->error('SugarCRM access token expired');\n } else {\n //safely return\n echo json_encode(\n array(\n 'error' => array(\n 'msg' => $e->getMessage(),\n 'code' => $e->getCode()\n ),\n )\n );\n }\n }\n }", "title": "" }, { "docid": "b8594a62e3d2927f523be8ae4afef5e0", "score": "0.6958189", "text": "public function login(Request $request)\n {\n // $login_username = $request->input('email');\n // $login_password = $request->input('password');\n $client = new \\GuzzleHttp\\Client(['headers' => ['brand'=>'KidsArtworksNZ', 'Content-Type'=>'application/x-www-form-urlencoded']]);\n $api_request = $client->request('POST', $this->api_url.'/token', [\n 'form_params' => [\n 'grant_type' => 'password',\n 'username' => 'saykor',\n 'password' => 'test123'\n ]\n ]);\n $this->api_token = json_decode($api_request->getBody()->getContents(),true)['access_token'];\n $request->session()->put('user_token', $this->api_token);\n //$api_response = $api_request->send();\n print_r($this->api_token);\n }", "title": "" }, { "docid": "a570c81494a189c93943f43d8e26ad6e", "score": "0.69571775", "text": "public function login()\n {\n if(Auth::attempt(['email' => request('email'), 'password' => request('password')]))\n {\n $user = Auth::user();\n\n $success['token'] = $user->createToken('MyApp')->accessToken;\n return response()->json(['success' => $success], $this-> successStatus);\n }\n else\n {\n return response()->json(['error'=>'Unauthorised'], 401);\n }\n }", "title": "" }, { "docid": "fa8836fcfdc7b3fe404dbcb6bc4ef590", "score": "0.69556236", "text": "public function actionSignin() {\n\n $username = TWXParam::any('username');\n $password = TWXParam::any('password');\n\n $deviceUdid = TWXParam::any('udid');\n $appId = TWXParam::any('app_id');\n $appVersion = TWXParam::any('app_version');\n\n try {\n $token = $this->checkLogin($username, $password);\n $this->outputToken($token);\n } catch (Exception $e) {\n $this->outputJsonError($e->getMessage());\n }\n\n }", "title": "" }, { "docid": "ee27dda8982d6af04ec5aab2a9622674", "score": "0.69473636", "text": "public function getUserLogin()\n {\n $user = request()->user('api'); \n return SendResponse::acceptData($user);\n }", "title": "" }, { "docid": "8d2aac99f545c1bbfb9cf36a47b8e4bb", "score": "0.6945875", "text": "public function login()\n {\n // This is Mink's Session.\n $this->session = $this->getSession();\n \n // Go to a page.\n $this->session->visit('http://eric.wp.clean.mithra62.com/wp-login.php');\n $this->session->maximizeWindow();\n \n // log in\n $page = $this->session->getPage();\n $page->findById('user_login')->setValue('mithra62');\n $page->findById('user_pass')->setValue('dimens35');\n $page->findButton('wp-submit')->submit();\n }", "title": "" }, { "docid": "0c2cef7875c2574c3703070dbbb0a81e", "score": "0.69265103", "text": "public function login() {\n\t\t$data = $this->smartRequireFields(\n\t\t\t['username','password'],\n\t\t\t'You must enter your ',\n\t\t\t'!'\n\t\t);\n\n\t\tif ($this->user->authenticate($data['username'], $data['password']))\n\t\t\t$this->success('Successfully logged in');\n\t\telse\n\t\t\t$this->message($this->user->getError());\n\t}", "title": "" }, { "docid": "7b73473a82473d1764f526efc4983dd1", "score": "0.69244003", "text": "function login(){\n\t\t//MemberModel.login()\n\t\t$confField =[\n\t\t\t\t\t\t['field' => 'email' ,'label' => 'Email Address', 'rules' => 'required|valid_email'],\n\t\t\t\t\t\t['field' => 'password' ,'label' => 'Password' ,'rules' => 'required|min_length[6]']\n\t\t\t\t\t];\n\t\t$postDT = $this->WCIFXPostDT($confField);\n\t\t$data['valid'] = false;\n\t\tif ($postDT['valid']){\n\t\t\t$check = $this->MemberModel->login($postDT['data']['email'], $postDT['data']['password']);\n\t\t\tif ($check['valid']){\n\t\t\t\t$data['valid'] = true;\n\t\t\t\t$data['message'] = myAlert('Redirecting...', 'success');\n\t\t\t}else{\n\t\t\t\t$data['message'] = $check['message'];\n\t\t\t}\n\t\t}else{\t\t\t\n\t\t\t$data['message'] = myAlert($postDT['message'], 'danger');\t\t\t\n\t\t}\n\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "693282e00a09e08dedf5f830498c07f9", "score": "0.69102716", "text": "public function p_login() {\n if($this->user) {\n Flash::set(\"You are already logged in.\");\n Router::redirect(\"/stories/welcome\");\n return;\n }\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n \n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n \n $token = DB::instance(DB_NAME)->select_field($q); \n \n # If we didn't get a token back, login failed\n if(!$token) {\n # Send them back to the login page\n Flash::set(\"Your login information was not recognized. Please try again.\");\n Router::redirect(\"/users/login\");\n } else { # But if we did, login succeeded! \n Helper::reset_session();\n Helper::csrf_init();\n \n # Store this token in a cookie\n @setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "title": "" }, { "docid": "06916ad9c0721e80ada511d364d2769b", "score": "0.6910009", "text": "public function login(Api\\LoginRequest $request)\n {\n // TODO: Check email existed\n // TODO: Check password\n // TODO: Check device info\n // TODO: Update token\n // TODO: fire event\n // TODO: return response\n }", "title": "" }, { "docid": "2448d0078606afd444ebbf886d7842f6", "score": "0.69080836", "text": "public function login()\n {\n request()->validate([\n 'email' => 'required|exists:users,email',\n 'password' => 'required|min:6',\n ]);\n\n $credentials = request(['email', 'password']);\n\n if (!$token = auth('api')->attempt($credentials)) {\n return response()->json(['message' => 'Unauthorized'], 401);\n }\n\n return $this->respondWithToken($token);\n }", "title": "" }, { "docid": "b3f9b38a3d85507184783ab17732b1c6", "score": "0.689634", "text": "public function login()\n {\n $credentials = request(['email', 'password']);\n\n if (! $token = auth('api')->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n\n return $this->respondWithToken($token);\n }", "title": "" }, { "docid": "36731597b3d1ef267c79b408f081aeb1", "score": "0.68957996", "text": "public function login()\n {\n return $this->processor->login($this, Input::all());\n }", "title": "" }, { "docid": "ca007a71f04de880e0eb531456b7ce6a", "score": "0.68929785", "text": "public function login(): void\n {\n $this->testCase()->get(route($this->auth->route_login))\n ->assertOk() // Should be 200\n ->assertSee('name=\"email\"', false) // Email field should be present\n ->assertSee('name=\"password\"', false) // Password field should be present\n ->assertSee('type=\"submit\"', false) // Login button should be present\n ;\n }", "title": "" }, { "docid": "f77279a0ee61f79d869780d0518c0976", "score": "0.68879175", "text": "function apiLogin($email = \"sysop@azev.in\", $password = \"tr1kAl1WQhDC\")\n{\n $response = apiCurl(API_LOGIN_URL, json_encode([\"email\" => $email, \"password\" => $password]));\n $json = json_decode($response);\n return $json->api_key ?? null;\n}", "title": "" }, { "docid": "b4bdcaabb4744a4d73dba55faa6eba83", "score": "0.6883434", "text": "public function login($username,$password){\n }", "title": "" }, { "docid": "e6f020421e65b4f01186d2798cb55f31", "score": "0.68811953", "text": "public function loginUser(){\n\n }", "title": "" }, { "docid": "ca2ff5837158b0d1ab17bc5301311648", "score": "0.6879162", "text": "public function login()\n {\n $Url = $this->url.'ticket/1';\n $this->setRequestUrl($Url);\n\n $fields = ['user' => $this->user, 'pass' => $this->pass];\n $response = $this->post($fields);\n\n if (200 === $response['code']) {\n $this->login = true;\n }\n\n return $this->login;\n }", "title": "" }, { "docid": "a3c5fff1d8f7c0bf9a2cc106fa4d9b94", "score": "0.687158", "text": "public function loginAction()\n {\n if (\n\t\t\tZend_Auth::getInstance()->hasIdentity() &&\n\t\t\t!$this->getRequest()->isXmlHttpRequest()\n\t\t) {\n $this->_helper->redirector->goToSimple('index', 'index');\n return;\n }\n\n $config = Zend_Registry::get('config');\n $session = new Zend_Session_Namespace($config->general->appid);\n \n $rota = empty($session->triedroute) ?\n $this->_helper->url('index', 'index') :\n $session->triedroute;\n \n $session->triedroute = null;\n unset($session->triedroute);\n \n $result = array(\n\t\t\t'redirect' => $rota,\n\t\t\t'valid'\t=> false\n\t\t);\n \n if (Zend_Auth::getInstance()->hasIdentity()) {\n $result['valid'] = true;\n } else {\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost();\n\n $mapperSysUser = new Admin_Model_Mapper_SysUser();\n $mapperSysUser->setData($data);\n\n $result['valid'] = $mapperSysUser->login();\n }\n }\n\n $this->_helper->json($result);\n }", "title": "" }, { "docid": "4bf291043cf22eeed461baf74f37594f", "score": "0.687131", "text": "public static function login()\r\n {\r\n\r\n if (Redis::get(\"aid\")) {\r\n $data = json_decode(Redis::get(\"aid\"));\r\n return new self($data->at, $data->rt, $data->aid, Redis::ttl(\"aid\"));\r\n } else {\r\n $accounts = config('app.accounts');\r\n $account = array_keys($accounts);\r\n $password = array_values($accounts);\r\n\r\n $account = $account[1];\r\n $password = $password[1];\r\n self::launcher_authenticate($account, $password);\r\n }\r\n\r\n }", "title": "" }, { "docid": "5e3beb9c9ce2cd5055d33e73b997ccef", "score": "0.6866656", "text": "public function login()\n {\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n return response()->json(['error' => 'Credenciales incorrectas'], 401);\n }\n\n return $this->respondWithToken($token);\n }", "title": "" }, { "docid": "d39f2a3f6ea55af49ed170f4bab1d959", "score": "0.68650734", "text": "public function login()\n {\n $email = request('email');\n $password = md5(request('password'));\n $user = DB::selectOne(\"select u.id, u.rc, t.fname, t.lname, u.email, u.contact, u.birthday, u.country_id, u.city, u.gender, u.verified, u.otp, u.profile_pic, u.member_type, u.state, u.city, u.address from users u, timelines t where u.timeline_id = t.id and u.email = '$email' and u.password = '$password'\");\n if (isset($user)) {\n if (request('token') != null) {\n $user_master = UserModel::find($user->id);\n $user_master->token = request('token');\n $user_master->save();\n }\n $ret['response'] = $user;\n echo json_encode($ret);\n } else {\n $ret['response'] = 'Invalid Credentials';\n echo json_encode($ret);\n }\n }", "title": "" }, { "docid": "93b77a054f7ecd0f380603a03af7998e", "score": "0.6858111", "text": "public function hacerLogin() {\n $user = json_decode(file_get_contents(\"php://input\"));\n\n if(!isset($user->email) || !isset($user->password)) {\n http_response_code(400);\n exit(json_encode([\"error\" => \"No se han enviado todos los parametros\"]));\n }\n \n //Primero busca si existe el usuario, si existe que obtener el id y la password.\n $peticion = $this->db->prepare(\"SELECT id,password FROM usuarios WHERE email = ?\");\n $peticion->execute([$user->email]);\n $resultado = $peticion->fetchObject();\n \n if($resultado) {\n \n //Si existe un usuario con ese email comprobamos que la contraseña sea correcta.\n if(password_verify($user->password, $resultado->password)) {\n \n //Preparamos el token.\n $iat = time();\n $exp = $iat + 3600*24*2;\n $token = array(\n \"id\" => $resultado->id,\n \"iat\" => $iat,\n \"exp\" => $exp\n );\n \n //Calculamos el token JWT y lo devolvemos.\n $jwt = JWT::encode($token, CJWT);\n http_response_code(200);\n exit(json_encode($jwt));\n \n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Password incorrecta\"]));\n }\n \n } else {\n http_response_code(404);\n exit(json_encode([\"error\" => \"No existe el usuario\"])); \n }\n }", "title": "" }, { "docid": "4d7aa1562966d372622d64a396e89e50", "score": "0.6844375", "text": "public function action_login()\n\t{\n\t\treturn Response::forge(View::forge('auth/login'));\n\t}", "title": "" }, { "docid": "41dabcdd13ebfdb58b8e9abcad437e05", "score": "0.6842869", "text": "public function action_login(){\n\t\t\t\n\t\t\t$error_code = $this -> STATUS_OK; //default OK\n\t\t\t\n\t\t\t$token=\"\"; //null\n\t\t\t\t\n\t\t\t$val = Validation::forge('login_alidation'); //check the validation, if not set VALID_ERR\n\t\t\t\t\n\t\t\t$val -> add_field('email', 'Email', 'required|valid_email');\n\t\t\t$val -> add_field('password','Password','required|min_length[3]|max_length[10]');\n\t\t\t\n\t\t\tif (!$val -> run()){ //failed, VALID_ERR\n\t\t\t\t$error_code = $this -> STATUS_VALID_ERR;\n\t\t\t}\t\t\t\t\n\t\t\telse{ //valid parameters, thus get the parameters and continue \n\t\t\t\t\t\n\t\t\t\t$email = Input :: Post('email');\n\t\t\t\t$password = md5(Input :: Post('password'));\n\t\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t$entry = Model_User::find('all', array (\n\t\t\t\t\t\t\t'where' => array (\n\t\t\t\t\t\t\t\t\tarray ('email', $email), array ('password',$password)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t));\n\t\t\t\t\t\t\n\t\t\t\t\tif (count($entry) == 0) { //login failed\n\t\t\t\t\t\t$error_code = $this -> STATUS_EXST_ACC;\n\t\t\t\t\t\t\t\n\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$token = hash_hmac('sha1',time(),uniqid(),false); //generate token\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ($entry as $user){ //run 1 time since there is only one user. \n\t\t\t\t\t\t\t$dbtoken = new Model_Login_Token();\t//if no error is found, insert token into login_token table\n\t\t\t\t\t\t\t$dbtoken -> iduser = $user -> id; //id user\n\t\t\t\t\t\t\t$dbtoken -> token = $token;\n\t\t\t\t\t\t\t$dbtoken -> due_date = date('Y-m-d h:i:s' ,time() + $this->EXPIRE_PERIOD); //2 days\n\t\t\t\t\t\t\t$dbtoken -> save();\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\tcatch (Database_Exception $dbe){\n\t\t\t\t\t$error_code = $this -> STATUS_DB_ERR;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$result = array(\"error\" => array(\"status\" => $error_code,\"message\" => \"\"),\"token\" => $token); //print result in XML format\n\t\t\tprint_r(Format :: forge($result) -> to_xml());\n\n\t\t}", "title": "" }, { "docid": "a907e52b079b86795aba252eaa8e9411", "score": "0.68368906", "text": "public function login(){\n\t\t$inputJSON = file_get_contents('fb_config.json');\n\t\t$json = json_decode($inputJSON, true);\n\t\t//TEST PAGE\n\t\t/*\n\t\t$this->fb = new Facebook\\Facebook([\n\t\t 'app_id' => $json['test']['id'],\n\t\t 'app_secret' => $json['test']['secret'],\n\t\t 'default_graph_version' => 'v3.1',\n\t\t]);\n\t\t\n\t\t$this->fb->setDefaultAccessToken($json['test']['token']);\n\t\t*/\n\t\t//WORDALIA PAGE\n\t\t//Here we perform the login for the Wordalia APP!\n\t\t$this->fb = new Facebook\\Facebook([\n\t\t 'app_id' \t\t=> $json['Wordalia']['id'],\n\t\t 'app_secret' \t=> $json['Wordalia']['secret'],\n\t\t 'default_graph_version' => 'v2.8',\n\t\t]);\n\n\t\t$this->fb->setDefaultAccessToken($json['Wordalia']['token']);\n\t\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7466e5feecb2947fd08e3e3bf715f8c1", "score": "0.6829369", "text": "function auth() {\n $body = array(\n 'username' => $this->input->post('username'),\n 'password' => $this->input->post('password')\n );\n\n $date = gmdate('D, d M Y H:i:s \\G\\M\\T', time());\n\n $contentMd5 = base64_encode(md5(json_encode($body), true));\n $contentType = $this->mimeType['json'];\n $authorization = self::__authorization_header('post', $contentType, $date, config_item('x-sam-api-key'), 'v1/i/login', $contentMd5);\n\n $array = array(\n 'date' => $date,\n 'MD5' => $contentMd5,\n 'Type' => $contentType,\n 'auth' => $authorization,\n 'resource' => 'v1/i/login',\n 'verb' => 'post',\n 'api-key' => config_item('x-sam-api-key')\n );\n\n\n $this->output->set_content_type('application/json');\n $this->output->set_output(json_encode($array));\n }", "title": "" }, { "docid": "83cfd354dcc98d6726bc0c7b1c1938e4", "score": "0.68275505", "text": "public function login(){\n\t\tif(isset($_COOKIE['jwtk']) && $this->verifyJWT()){\n\t\t\treturn;\n\t\t}\n\n\t\t$postJSON = file_get_contents(\"php://input\");\n\t\t$post = json_decode($postJSON);\n\t\t$email = htmlspecialchars(trim($post->email));\n\t\t$password = htmlspecialchars($post->password);\n\n\t\t// try{\n\t\t// \t$verifyCaptchaResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=6LdGdEUUAAAAAJ6bPyyYRZhGJZeTwXuF8oiDNqRy&response='.$post->captcha);\n // $responseCaptchaData = json_decode($verifyCaptchaResponse);\n // \t} catch(Exception $e){\n // \t\t$this->loginRestData['loginStatus'] = '500';\n // \t\t$this->signupRestData['signupStatus'] = '500';\n // \t}\n\n // if($responseCaptchaData->success){\n // \t$this->loginRestData['captcha'] = 'solved';\n // } else{\n // \t$this->loginRestData['captcha'] = 'failed';\n // }\n\n\t\tif(empty($email) || empty($password)){\n\t\t\t$this->_outRestData('empty');\n\t\t} else if($this->auth_model->find_user($email, $password)){\n\t\t\t$jwtData = array(\n\t\t\t\t\"iat\" => time(),\n\t\t\t\t\"jti\" => base64_encode(openssl_random_pseudo_bytes(16)),\n\t\t\t\t\"iss\" => site_url(),\n\t\t\t\t\"data\" => array(\n\t\t\t\t\t//Fixed size secret hash used for preventing jwt theft\n\t\t\t\t\t\"secrethash\" => hash('sha256', $_SERVER['HTTP_USER_AGENT'])\n\t\t\t\t)\n\t\t\t);\n\t\t\t$jwt = jwt::encode($jwtData, $this->secretSignCheckHash, 'HS256');\n\t\t\tsetcookie('jwtk', $jwt, time()+86400*30, '/', null, FALSE, TRUE);\n\n\t\t\t$this->loginRestData['jwt'] = ($jwt);\n\t\t\t$this->loginRestData['loginStatus'] = \"success\";\n\t\t\t\n\t\t\tif(!$this->auth_model->add_logged_user($email, $jwt)){\n\t\t\t\t$this->_outRestData('failed');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$this->loginRestData['userdata'] = $this->data_model->get_user_data($jwt);\n\t\t\t$this->_outRestData($this->loginRestData['loginStatus'], $this->loginRestData['jwt'], $this->loginRestData['userdata']);\n\t\t} else{\n\t\t\t$this->_outRestData(\"failed\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "c57310b9402336174bfc1920be3e580c", "score": "0.68274057", "text": "public function login()\n {\n $credentials = request()->only('email', 'password');\n\n if (!$token = auth('api')->attempt($credentials)) {\n return $this->response->errorUnauthorized();\n }\n\n return $this->response->withItem($token, new JWTokenTransformer);\n }", "title": "" }, { "docid": "9925a3369e4b98a75f7aacd0e2cd3736", "score": "0.6826612", "text": "public function loginAction()\n {\n if (Pi::service('user')->hasIdentity()) {\n // Get user\n $user = Pi::user()->get(Pi::user()->getId(), array(\n 'id', 'identity', 'name', 'email'\n ));\n // Set result\n $return = array(\n 'check' => 1,\n 'uid' => $user['id'],\n 'identity' => $user['identity'],\n 'email' => $user['email'],\n 'name' => $user['name'],\n 'avatar' => Pi::service('user')->avatar($user['id'], 'large', false),\n 'sessionid' => Pi::service('session')->getId(),\n 'message' => __('You are login to system before'),\n );\n } else {\n // Check user login from allowed or not\n if ($this->config('active_login')) {\n // Check post array set or not\n if (!$this->request->isPost()) {\n // Set result\n $return = array(\n 'check' => 0,\n 'uid' => Pi::user()->getId(),\n 'identity' => Pi::user()->getIdentity(),\n 'email' => '',\n 'name' => '',\n 'avatar' => '',\n 'sessionid' => Pi::service('session')->getId(),\n 'message' => __('Post request not set'),\n );\n } else {\n // Get from post\n $post = $this->request->getPost();\n $identity = $post['identity'];\n $credential = $post['credential'];\n // Do login\n $return = $this->doLogin($identity, $credential);\n }\n } else {\n // Set result\n $return = array(\n 'check' => 0,\n 'uid' => Pi::user()->getId(),\n 'identity' => Pi::user()->getIdentity(),\n 'email' => '',\n 'name' => '',\n 'avatar' => '',\n 'sessionid' => Pi::service('session')->getId(),\n 'message' => __('Login not active'),\n );\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "f3ef3add3511b3994f06774a227b4559", "score": "0.68202585", "text": "function login_post() \n {\n $http_data = $this->post(null, true);\n\n $required_data = array('username', 'password');\n $xhr = $this->validate_http_data($http_data, $required_data);\n\n $this->load->model('m_user');\n $filter = array(\n 'username' => $xhr['username'],\n 'password' => encrypt($xhr['password'])\n );\n list($flag, $user) = $this->m_user->login($filter);\n\n if(!empty($user)) {\n if($flag !== true)\n $this->_response(FALSE, $user);\n\n // Save api key\n // NOTE One user one key\n $key_data = array(\n 'username' => $user->username,\n 'app_key' => encrypt($user->username.\":\".$user->id.\":\".time()),\n 'date_created' => time()\n );\n $key_filter = array('username' => $user->username);\n list($flag, $msg) = $this->m_general->insert_update('keys', $key_data, $key_filter);\n\n if($flag) {\n $user_info = array(\n 'username' => $user->username,\n 'user_id' => $user->id,\n 'name' => $user->name,\n 'email' => $user->email,\n 'phonenumber' => $user->phone,\n // 'address' => $user->address,\n 'profile_picture' => $user->profile_picture,\n 'utype' => $user->utype,\n 'app_key' => $key_data['app_key']\n );\n\n $this->_response(TRUE, $user_info);\n } else {\n $this->_response(FALSE, sprintf(lang('something_went_wrong'), $msg));\n }\n } else {\n $this->_response(FALSE, lang('msg_login_invalid'));\n }\n }", "title": "" } ]
207aeb9afc95995b3611a5d4e799ab83
Unique identifier of the given Price.
[ { "docid": "85246705febf1c59035066202ec40043", "score": "0.0", "text": "public function getId();", "title": "" } ]
[ { "docid": "7e5776de461440036977b7f9f9c1049a", "score": "0.77885187", "text": "public function getPriceId();", "title": "" }, { "docid": "0dc98ad34e8aba8dd4167ade62969912", "score": "0.7522061", "text": "public function getPriceId()\n {\n return $this->priceId;\n }", "title": "" }, { "docid": "1749bf08bdc23b40c3fe45b18026cd4c", "score": "0.71618974", "text": "function getPriceUid() \t{\n \t\treturn $this->price_uid;\n \t}", "title": "" }, { "docid": "80c0b83b63d48284ed04892fbbbb2c81", "score": "0.70059705", "text": "public function getId()\n {\n return $this->source['price_id'];\n }", "title": "" }, { "docid": "21c3a17ad096a402269eb7b2f08bfc24", "score": "0.69058496", "text": "private function getPriceAttributeId()\n {\n $priceAttributeId = $this->eavConfig\n ->getAttribute(\n \\Magento\\Catalog\\Model\\Product::ENTITY,\n \\Magento\\Catalog\\Api\\Data\\ProductInterface::PRICE\n )\n ->getAttributeId();\n return $priceAttributeId;\n }", "title": "" }, { "docid": "898956af6e61bb875e0b3812855d6ce3", "score": "0.6664618", "text": "public function getCompetitivePriceId() \n {\n return $this->_fields['CompetitivePriceId']['FieldValue'];\n }", "title": "" }, { "docid": "642b2a60d798cf84bc0934bfe27f2abe", "score": "0.6661882", "text": "public function getCompetitivePriceId()\n {\n return $this->_fields['CompetitivePriceId']['FieldValue'];\n }", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.6349176", "text": "public function getUniqueIdentifier() : string {}", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.6349176", "text": "public function getUniqueIdentifier() : string {}", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.6349176", "text": "public function getUniqueIdentifier() : string {}", "title": "" }, { "docid": "07b060473c207147110c3fe357416649", "score": "0.6346084", "text": "function getUniqueIdentifier() : string ;", "title": "" }, { "docid": "d62f14cea01a1d1d7fc7c9b2aca11106", "score": "0.62685955", "text": "private function generate_unique_id(){\r\n\t\t$this->id = abs(crc32(serialize($this->infos)));\r\n\t\treturn $this->id;\r\n\t}", "title": "" }, { "docid": "a1efa2f22e71f3712011c9b287773547", "score": "0.62681735", "text": "public function generateUniqueIdentifier(): string;", "title": "" }, { "docid": "c0459271e9764a4dd9196de256a87273", "score": "0.6229557", "text": "public function uniqueId();", "title": "" }, { "docid": "d3ee1c70eda0aaf45133e62480c030cd", "score": "0.6164857", "text": "public function getPriceByID($priceID);", "title": "" }, { "docid": "57b9d6ddd98ef17674f349e1e0b956dc", "score": "0.6124731", "text": "public function getId()\n {\n // The offer id will consist of the base URL stripped of the schema and the store view id plus the product id.\n $formattedBase = preg_replace('/(.*)\\:\\/\\/(.*?)((\\/index\\.php\\/?$)|$|(\\/index.php\\/admin\\/?))/is', '$2', Mage::getBaseUrl());\n $id = $formattedBase . '*' . $this->_storeId . '*' . $this->_productId;\n // if this is a child product, we add the child SKU\n if ($this->isChildProduct()) {\n $id = $id . '*' . $this->_getChildProduct()->getSku();\n }\n return $id;\n }", "title": "" }, { "docid": "3c888c263d6ddeb4dc5448ca1d50edcb", "score": "0.6098387", "text": "public static function getLowPriceId()\n {\n return self::$lowPriceId;\n }", "title": "" }, { "docid": "1b5217d3bbaa4dde08c062db29af78e1", "score": "0.6044587", "text": "public function getUniqueNo()\n {\n }", "title": "" }, { "docid": "efb93412ba29e145fb17d807ca720692", "score": "0.6019046", "text": "function generate_unique_id(){\n $now = new DateTime();\n return $now->getTimestamp(); \n }", "title": "" }, { "docid": "916e00b3b0c9fc3646482e9005a6bc22", "score": "0.6006286", "text": "public function getProprietaryId()\n {\n return $this->proprietaryId;\n }", "title": "" }, { "docid": "5d21bb51f04ef922c23b18c717d35b92", "score": "0.6000404", "text": "public function getUniqueId(): string;", "title": "" }, { "docid": "5d21bb51f04ef922c23b18c717d35b92", "score": "0.6000404", "text": "public function getUniqueId(): string;", "title": "" }, { "docid": "f36ee7ddc51fe674a3e341c5c3835623", "score": "0.59931636", "text": "public function getProductIdentifier()\n {\n return 'id';\n }", "title": "" }, { "docid": "5a1eb8f1fb3279bb831993a91ae1c50d", "score": "0.5986832", "text": "public function createPaymentUniqueId()\n {\n return Random::getAlphanumericString(32);\n }", "title": "" }, { "docid": "676b560de2d88767b866bb0f4840c300", "score": "0.5979043", "text": "private function getNameAttributeId()\n {\n $priceAttributeId = $this->eavConfig\n ->getAttribute(\n \\Magento\\Catalog\\Model\\Product::ENTITY,\n \\Magento\\Catalog\\Api\\Data\\ProductInterface::NAME\n )\n ->getAttributeId();\n return $priceAttributeId;\n }", "title": "" }, { "docid": "df1bf24318eb9f48d9ed12be072795ab", "score": "0.59744114", "text": "public function getUniqueKey();", "title": "" }, { "docid": "5447b65538badd14957cf637190e7294", "score": "0.59709096", "text": "public function getUniqueId();", "title": "" }, { "docid": "5447b65538badd14957cf637190e7294", "score": "0.59709096", "text": "public function getUniqueId();", "title": "" }, { "docid": "90046fbc04f42568f4d75ef6dfcb2a6d", "score": "0.59542245", "text": "public function getPriceCode()\n {\n return $this->priceCode;\n }", "title": "" }, { "docid": "133bef46dc65218fb47c01f5528d3c37", "score": "0.59537435", "text": "abstract public function getUniqueKey();", "title": "" }, { "docid": "c6c4d07a2569682b314b91f3900f9a78", "score": "0.5923097", "text": "public function getPersistentId()\n {\n }", "title": "" }, { "docid": "f07e50d651bc03bced4b2da5f7727809", "score": "0.5917559", "text": "public function ProductID()\n\t{\treturn 'CE' . $this->id;\n\t}", "title": "" }, { "docid": "f0dbc7064015dc29e370fcfc596f942a", "score": "0.58933824", "text": "public function getUniqueId()\n {\n }", "title": "" }, { "docid": "731665caddf4504f0eb4e75f5898102f", "score": "0.58840424", "text": "public static function seoIdAttribute()\n {\n return \"PCAT-\".Carbon::now()->format('dmyhis').str_random(5);\n }", "title": "" }, { "docid": "78b58e3efda9dcca264ffde62dd907ae", "score": "0.5880246", "text": "public function uniqueId()\n {\n return $this->transaction->id;\n }", "title": "" }, { "docid": "c04172dacce5b3c0aed15d2c6d1f6396", "score": "0.5835843", "text": "public function getBuyableIdentifier()\n {\n return $this->getKey();\n }", "title": "" }, { "docid": "3a7e45dfea01f4ecab59e88b2469e977", "score": "0.58357114", "text": "function get_unique_id() {\n\t\treturn ($this->unique_id);\n\t}", "title": "" }, { "docid": "03d6cde1bfef20bd1603aec51efe7229", "score": "0.58199203", "text": "private static function makeUniqueId() {\r\n\t\tstatic $uniq = 0;\r\n\t\t$uniq += 1;\r\n\t\t\r\n\t\t$id = 'audioplayer2_' . $uniq . '_' . mt_rand(1,1000000);\r\n\t\t\r\n\t\treturn $id;\r\n\t}", "title": "" }, { "docid": "5bfee10883921896f58bdea2c341f17e", "score": "0.5816149", "text": "public function getId(): string\n {\n return \\uniqid();\n }", "title": "" }, { "docid": "f58717eeb94956c60400c5804671be7b", "score": "0.5813416", "text": "public function getUniqueid()\n {\n return $this->uniqueid;\n }", "title": "" }, { "docid": "2290c203a3f3bf090ff1975899fa7c87", "score": "0.58025926", "text": "public function generateUniqueCart()\n {\n return $this->shoppingCartService->getCartUniqueId(Auth::user());\n }", "title": "" }, { "docid": "35fedc92346db7f1f5f7bec6eb07cf76", "score": "0.57952166", "text": "public function getDefaultPriceVariationId();", "title": "" }, { "docid": "f601aace58583b443a726c5b32409f74", "score": "0.5792442", "text": "public function get_product_id()\n {\n }", "title": "" }, { "docid": "29e5bca5ca05c422a5fa3462015e4069", "score": "0.57839763", "text": "public function uniqueId()\n {\n return \"hub-\".$this->bet->user->hub_id;\n }", "title": "" }, { "docid": "45f36a14fd2ccde4308cc839be4884e4", "score": "0.57770133", "text": "function vcex_unique_id( $id = '' ) {\n\techo vcex_get_unique_id( $id );\n}", "title": "" }, { "docid": "6371a509edc4b4607ee77046e99c5aee", "score": "0.5776485", "text": "public function uniqueId()\n {\n return 'update-deposits';\n }", "title": "" }, { "docid": "9dc6532ccd0df76bb5b640f7027367d2", "score": "0.57759565", "text": "abstract public function generateId() : string;", "title": "" }, { "docid": "d2421ddaa5e4329e07c48ea8959fdcdb", "score": "0.5775013", "text": "public function getPriceCode();", "title": "" }, { "docid": "53c393a392ce4b1e61e23d541df22609", "score": "0.57591784", "text": "protected function generateSupplierId() {\n $count = $this->getRowCount($this->tableName) + 1;\n $id = \"SUP\" . str_pad($count, 4, '0', STR_PAD_LEFT);\n return $id;\n }", "title": "" }, { "docid": "56c25ec8ffac7875dc5e13e507135d0f", "score": "0.5753044", "text": "public static function getUniqueId()\n {\n return self::$_uniqueid++;\n }", "title": "" }, { "docid": "b928eadaea372ee7409a111073b2bc28", "score": "0.5744605", "text": "public function getStockTransferId();", "title": "" }, { "docid": "8f568db4986cff7ef081654ca32f888e", "score": "0.57341766", "text": "private function genId()\n\t{\n\t\treturn oxUtilsObject::getInstance()->generateUId();\n\t}", "title": "" }, { "docid": "23a9f28a99f63dfb554d9b25f333b027", "score": "0.5724683", "text": "public function generateId();", "title": "" }, { "docid": "23a9f28a99f63dfb554d9b25f333b027", "score": "0.5724683", "text": "public function generateId();", "title": "" }, { "docid": "483fac40c78274c12fc24833d25e6e7f", "score": "0.5720062", "text": "static function UniqueID()\n {\n return new self('UNIQUE_ID');\n }", "title": "" }, { "docid": "5a34c4c6a7d7b6ce7ac03690fc26156f", "score": "0.5716559", "text": "protected function generateIdByName(): string\n {\n return \"auto_id_\" . $this->name . \"_\" . $this->value;\n }", "title": "" }, { "docid": "d9d4e8cef1bb8e3ee56bd214f08b4fbb", "score": "0.5710709", "text": "function getIdName()\n {\n return \"stock_id\";\n }", "title": "" }, { "docid": "4b3c0c06fc3cdd52e482db76812a12cc", "score": "0.5692667", "text": "public function getUniqueId()\n {\n return str_replace('\\\\', '', get_class($this)) . \"_\" . $this->primaryKey;\n }", "title": "" }, { "docid": "d64e0bdf98af2f874ea058e976e9a528", "score": "0.56855834", "text": "public function get_uniqid();", "title": "" }, { "docid": "654dabba0be4fe4a91c0f55ace4ebbb5", "score": "0.5683547", "text": "function getItemPriceIDFromItemtag($itemTag)\n{\n\t$id= 0;\n \t$qry=\"SELECT id\n\t\t\tFROM entrp_products_pricing \n\t\t\tWHERE itemTag='\".$itemTag.\"'\n\t \";\n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n {\n \twhile($row=mysqli_fetch_array($res))\n {\n \t$id\t=\t$row['id'];\n\t\t} \t \t\n }\n return $id;\n}", "title": "" }, { "docid": "c065fd1686a9dab7689066505f83c337", "score": "0.5681351", "text": "public function getUniqueid() { return $this->get('uniqueid'); }", "title": "" }, { "docid": "1a8985e12b3189426ce287b86b2f8d35", "score": "0.5679904", "text": "protected function _id() {\n\t\tif (!empty($this->_id)) {\n\t\t\treturn $this->_id;\n\t\t}\n\t\telse if (!empty($this->_name) && $this->_unique !== null) {\n\t\t\treturn $this->_name.$this->_seg.$this->_unique;\n\t\t}\n\t\telse if (!empty($this->_attributes['id'])) {\n\t\t\treturn $this->_attributes['id'];\n\t\t}\n\t\telse {\n\t\t\treturn $this->_name;\n\t\t}\n\t}", "title": "" }, { "docid": "3ec869db43a749d45484e59bb1588de7", "score": "0.56776375", "text": "private function getIdentifier() {\n if (empty($this->_identifier)) {\n $this->_identifier = md5($this->getId());\n }\n return $this->_identifier;\n }", "title": "" }, { "docid": "36e7bd1368619811498f86417d97b2fb", "score": "0.5673058", "text": "public function getUniqueId()\n {\n return $this->unique_id;\n }", "title": "" }, { "docid": "36e7bd1368619811498f86417d97b2fb", "score": "0.5673058", "text": "public function getUniqueId()\n {\n return $this->unique_id;\n }", "title": "" }, { "docid": "db3a4dae3c8f2b121aabf3dd343a9590", "score": "0.5667355", "text": "public function getIdentifier()\n {\n return 1;\n }", "title": "" }, { "docid": "877bc49c0519c64063a9cb4d1c23eff1", "score": "0.5665368", "text": "protected function generateId()\n {\n return $this->stringToId( $this->storage->login );\n }", "title": "" }, { "docid": "b653be6673d66ee69139a439f796ff0c", "score": "0.56501657", "text": "public function fieldUniqueNumber();", "title": "" }, { "docid": "357a91595a6e43780d8343d07a868ba5", "score": "0.5647502", "text": "protected function id()\n {\n // Issue #170: Use more_entropy otherwise usleep(1) is called.\n // Issue #197: The ID was not a viable document element ID value due to the period.\n return str_replace('.', '', uniqid('id-', true));\n }", "title": "" }, { "docid": "929d11403904c49e142ee1d4b83811ae", "score": "0.5645447", "text": "function generaNumeroOrdenUnico() { \n $codigo = uniqid('INTER_');\n return $codigo; \n }", "title": "" }, { "docid": "087c0c8cabbaa01f9399df55f00aa1fd", "score": "0.5644522", "text": "public static function getID(): string;", "title": "" }, { "docid": "4c56ed6d2d79329cdd10e641bfb2acc2", "score": "0.5643242", "text": "private function createUniqId() {\n\t\t// S'il n'est pas vide on prendra le dernier indice -1 pour l'affection du l'id.\n\t\tif (count(self::$curlsTab) > 0) {\n\t\t\t$this->curlId = count(self::$curlsTab) +1;\n\t\t\t// echo \"test attribut de class : \". $this->curlId.\"\\n\";\n\t\t}\n\n\t\treturn $this->curlId;\n\t}", "title": "" }, { "docid": "379b52a5e8a6a2f2be827d4d10edce83", "score": "0.5642366", "text": "public function createReservationCode()\n {\n return uniqid($this->ID);\n }", "title": "" }, { "docid": "b6152e47e703d501139a4b1fecc5049e", "score": "0.5638685", "text": "abstract public function getID();", "title": "" }, { "docid": "b6152e47e703d501139a4b1fecc5049e", "score": "0.5638685", "text": "abstract public function getID();", "title": "" }, { "docid": "b6152e47e703d501139a4b1fecc5049e", "score": "0.5638685", "text": "abstract public function getID();", "title": "" }, { "docid": "fc0a62392d1047254b4d1be03e135808", "score": "0.56242436", "text": "public static function uniqueKey()\n {\n $self = new self();\n return $self->uniqueKey;\n }", "title": "" }, { "docid": "fc0a62392d1047254b4d1be03e135808", "score": "0.56242436", "text": "public static function uniqueKey()\n {\n $self = new self();\n return $self->uniqueKey;\n }", "title": "" }, { "docid": "fc0a62392d1047254b4d1be03e135808", "score": "0.56242436", "text": "public static function uniqueKey()\n {\n $self = new self();\n return $self->uniqueKey;\n }", "title": "" }, { "docid": "fc0a62392d1047254b4d1be03e135808", "score": "0.56242436", "text": "public static function uniqueKey()\n {\n $self = new self();\n return $self->uniqueKey;\n }", "title": "" }, { "docid": "063bcaee2a3b20bbcb899e842ec5c511", "score": "0.5615074", "text": "protected function generateId() {\n return $this->stringToId($this->storage->login);\n }", "title": "" }, { "docid": "aa17f3cce9f21bdbda3a329ef46c10ec", "score": "0.5614788", "text": "public static function createUniqueid(){\n return uniqid();\n }", "title": "" }, { "docid": "01098df84feb5131875d0d59adf45216", "score": "0.56141794", "text": "public function create_pago_id()\n\t{\n\t\treturn uniqid();\n\t}", "title": "" }, { "docid": "4e3db3593d258cd7c859b01190b7476b", "score": "0.5611491", "text": "public function productId(): string\n {\n return (string) $this->productkey;\n }", "title": "" }, { "docid": "f12bd5e21310c8c1051288dc45266ebf", "score": "0.56049055", "text": "abstract public function id();", "title": "" }, { "docid": "f12bd5e21310c8c1051288dc45266ebf", "score": "0.56049055", "text": "abstract public function id();", "title": "" }, { "docid": "12c1f6e3aaa3ac4cafebae8c7934d731", "score": "0.5601411", "text": "public function getCacheKey()\n {\n return parent::getCacheKey() . '-' . $this->getPriceId() . '-' . $this->getPrice()->getPriceCode();\n }", "title": "" }, { "docid": "c3e0e6e017e24dbc2e857d30c2388192", "score": "0.5601337", "text": "private function getId()\n {\n //Store locally\n if (isset($this->data['id']) && !empty($this->data['id'])) {\n $id = (string) $this->data['id'];\n } else {\n $id = uniqid();\n }\n\n return (string) strtolower($id);\n }", "title": "" }, { "docid": "0ed015f741e767a515e4a0dd26892c24", "score": "0.5597051", "text": "public function getId()\n {\n return $this->getProductId();\n }", "title": "" }, { "docid": "0ed015f741e767a515e4a0dd26892c24", "score": "0.5597051", "text": "public function getId()\n {\n return $this->getProductId();\n }", "title": "" }, { "docid": "a203c92bae48c075a60b85a12f45757f", "score": "0.5596343", "text": "public function __getUniqueId()\n\t{\n\t\t$adb = \\PearDatabase::getInstance();\n\t\treturn $adb->getUniqueID('vtiger_field');\n\t}", "title": "" }, { "docid": "1c40f0d4167192f2e21bd2f0d148e82e", "score": "0.55957144", "text": "protected function _getIdentifier()\n {\n return $this->_getCookieValue(Enterprise_PageCache_Model_Cookie::COOKIE_CART, '')\n . $this->_getCookieValue(Enterprise_PageCache_Model_Cookie::COOKIE_CUSTOMER, '');\n }", "title": "" }, { "docid": "1afea1fcf370b008fc96924c7d272466", "score": "0.5594415", "text": "function _generateId()\n {\n static $idx = 1;\n\n if (!$this->getAttribute('id')) {\n $this->updateAttributes(array('id' => 'id_'.substr(md5(microtime() . $idx++), 0, 6)));\n }\n }", "title": "" }, { "docid": "585d13ac44715b0112f1d8f8ca332f75", "score": "0.5594009", "text": "public function generateNewUniqueIdentifier(): string\n {\n $identifier = null;\n do {\n try {\n $identifier = bin2hex(random_bytes(7));\n } catch (\\Exception $e) {\n }\n } while ($this->findByIdentifier($identifier));\n\n return $identifier;\n }", "title": "" }, { "docid": "7afdaf67c5a292ef312670bd024c9f09", "score": "0.5593034", "text": "static function getId()\n {\n self::$id += 0x1;\n \n return \"idg_\".dechex(self::$id);\n }", "title": "" }, { "docid": "8de5bb8a848d93411543893d4cd17db4", "score": "0.5588462", "text": "public static function getGUIDProperty()\n {\n return 'PaystubID';\n }", "title": "" }, { "docid": "b09feb83569d2f7caef46544e69071b8", "score": "0.558623", "text": "protected function _generateId()\n {\n return strval(new Horde_Support_Randomid());\n }", "title": "" }, { "docid": "4b6f4fc8f6677c870da104e5f6379f5b", "score": "0.5581609", "text": "function getIdName()\n {\n return \"goods_id\";\n }", "title": "" }, { "docid": "bc170210fc99355994a8625eb830df70", "score": "0.5569128", "text": "protected function uniqueId()\n {\n\n return (string)time();\n }", "title": "" }, { "docid": "df1679e14982cafb81970282aa1e0056", "score": "0.55641204", "text": "public function __getUniqueId()\n\t{\n\t\treturn \\App\\Db::getInstance()->getUniqueID('vtiger_field');\n\t}", "title": "" }, { "docid": "9c82aac71d893937a3fff9f8cedd0145", "score": "0.5558651", "text": "function brooks_get_unique_id() {\n return mt_rand(1000,9000) . '_' . mt_rand(1000,9999);\n}", "title": "" } ]
89b0446647f1fe49365b77d9c45765c7
Devuelve el valor correspondiente a tema
[ { "docid": "cbf1c6910c7da61f25b155b881c3213a", "score": "0.7121676", "text": "public function getTema(){\n return $this->tema;\n }", "title": "" } ]
[ { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.6308824", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.6308824", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "5218f3d47d9636b0b4663414d5cb73bc", "score": "0.62491727", "text": "public function obtenerValor() {\n return $this->valor;\n }", "title": "" }, { "docid": "807da7c806eacbd88f670cc6fee1b0b5", "score": "0.62224096", "text": "function obtener_Valor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "c043850ef36e2c514aba839372afbbd7", "score": "0.61908424", "text": "public function getValor(){\n return $this->valor;\n }", "title": "" }, { "docid": "e7bc3b6b9c14d969ad42b0d28083eee2", "score": "0.6044991", "text": "public function getValoracion()\n {\n return $this->valoracion;\n }", "title": "" }, { "docid": "25aa2801923c7c7524ff454f25767316", "score": "0.5946462", "text": "public function get_valor() {\n\t\t\n\t\t$tipo \t= $this->get_tipo();\t\n\t\t$dato\t= $this->get_dato();\t#dump($dato[$tipo]); \n\t\t\n\t\tif(!empty($dato[$tipo]) && $dato[$tipo]==2) {\n\t\t\t#$valor = 'yes';\n\t\t\t$valor = label::get_label('si');\n\t\t}else{\n\t\t\t#$valor = 'no';\n\t\t\t$valor = label::get_label('no');\n\t\t}\n\t\treturn $valor;\t\t\n\t}", "title": "" }, { "docid": "670659e9329d1ae2e6d9f6d2ce8a7bf0", "score": "0.58957195", "text": "public function getElemento () : string {\n return $this->elemento;\n }", "title": "" }, { "docid": "4485bca860a7a58ae56cb3ba28c792cf", "score": "0.5851612", "text": "public function valorBoleto() {\n return $this->valor;\n }", "title": "" }, { "docid": "77b4e1feee093cd78bfc6f415db7232d", "score": "0.58288705", "text": "public function getValorCalculado() {\n return $this->oCalculoMedia->getValorCalculado();\n }", "title": "" }, { "docid": "c8e485bb3491444ae90bfe825c4f3b1b", "score": "0.5800199", "text": "public function getDisplayedValue() {\n /*\n * You may redeclare this function - for use MaxSize and other things.\n */\n return $this->getValue();\n }", "title": "" }, { "docid": "361176e6fb4fdf387610a1a36e0eda8b", "score": "0.577283", "text": "public function setTema($tema){\n $this->tema = $tema;\n }", "title": "" }, { "docid": "5c595b85178595815653d47e97c062cd", "score": "0.57645243", "text": "public function getTxtVal()\n {\n return $this->item_value;\n }", "title": "" }, { "docid": "7244d41e41ff9d6433704b502d4a2ed7", "score": "0.5709587", "text": "public function getValorEntrada()\n {\n return $this->valorEntrada;\n }", "title": "" }, { "docid": "423ecd1ec3ecc0cd8b4c654c06e7fb68", "score": "0.5674951", "text": "public function getValor(): float;", "title": "" }, { "docid": "e11b784513f71adf1defa1fb7163f402", "score": "0.563351", "text": "public function getValor_factura() {\r\n return $this->valor_factura;\r\n }", "title": "" }, { "docid": "fb9660a0c90a95f4f1e82f999938a729", "score": "0.562207", "text": "public function getValorDocumento()\n {\n return $this->valorDocumento;\n }", "title": "" }, { "docid": "12fd43e8b3d63f2dddf36194cb82ec34", "score": "0.5576594", "text": "public function getValOrcamento()\n {\n return $this->val_orcamento;\n }", "title": "" }, { "docid": "69487d7bd09609c4751764eb1ffb8012", "score": "0.5559438", "text": "public function getTexto()\n {\n return $this->texto;\n }", "title": "" }, { "docid": "69487d7bd09609c4751764eb1ffb8012", "score": "0.5559438", "text": "public function getTexto()\n {\n return $this->texto;\n }", "title": "" }, { "docid": "69487d7bd09609c4751764eb1ffb8012", "score": "0.5559438", "text": "public function getTexto()\n {\n return $this->texto;\n }", "title": "" }, { "docid": "62d7706a5c3abc06aea4349a4d4d2aee", "score": "0.5520754", "text": "function get_value_text() {\r\n $value = $this->get_value();\r\n foreach( $this->_data_list as $arr) {\r\n $flip = array_flip($arr);\r\n if (isset($flip[$value])) {\r\n return $flip[$value];\r\n }\r\n }\r\n return NULL;\r\n }", "title": "" }, { "docid": "761f09929d327ece3770cb0aed82f5c8", "score": "0.5492321", "text": "public function getMotivo()\n {\n return $this->motivo;\n }", "title": "" }, { "docid": "ab6ca30f76eb17326bb762225ed36383", "score": "0.5492249", "text": "public function getDespValor()\n {\n return $this->despValor;\n }", "title": "" }, { "docid": "6af534a0cf1d005e611f933bbf479fb7", "score": "0.54366237", "text": "function getTextValue($text) {\n $element =& $this->question->getElement();\n return $element->getTextValue($text);\n }", "title": "" }, { "docid": "a5ec30264c6012836c92ebae219b4bcc", "score": "0.5406474", "text": "public function getExpPorte()\n {\n return $this->expPorte;\n }", "title": "" }, { "docid": "b7fb5ce7ed81a4903ea7bc6af09555a7", "score": "0.5396426", "text": "public function getTextoImporteFinanciado() {\r\n return $this->_scopeConfig->getValue('payment/mage2payin7/calculadora/textoImporteFinanciado');\r\n }", "title": "" }, { "docid": "8ec5def389d044ebdf9aa2b91255f155", "score": "0.539033", "text": "public function getTipomatriculacodigo()\n\t{\n\t\treturn $this->tipomatriculacodigo;\n\t}", "title": "" }, { "docid": "a186bbdfb33c6225cf633207be398215", "score": "0.53609633", "text": "public function getValorMulta()\n {\n return $this->valor_multa;\n }", "title": "" }, { "docid": "4ad8d0b4441e9bcc411de78449609cab", "score": "0.5348314", "text": "public function obtenerTexto(){\r\n return $this->texto;\r\n }", "title": "" }, { "docid": "c40fb601bebce468573bcdfe378a993e", "score": "0.5340585", "text": "public function obtener_titulo(){\n //devolvemos el valor\n return $this-> titulo;\n }", "title": "" }, { "docid": "ba20a95c2765f14fb96b5f4c16870801", "score": "0.53340244", "text": "public function getEmpresa_numero()\n {\n return $this->empresa_numero;\n }", "title": "" }, { "docid": "006d142c1e63bedc150d760ffd591941", "score": "0.53296494", "text": "public function getTrecodigo()\n\t{\n\t\treturn $this->trecodigo;\n\t}", "title": "" }, { "docid": "8364298567a25035a5936d373c96e25b", "score": "0.5326104", "text": "function nodeValue()\n {\n return $this->object->nodeValue;\n }", "title": "" }, { "docid": "7e953256c1fc19b1e3f18a40973c5c6b", "score": "0.5321431", "text": "function getValue() {\n return $this->getAttribute('value');\n }", "title": "" }, { "docid": "16b21cf50fbbfdba521de2de37a0e2c7", "score": "0.53191906", "text": "public function getMinimo() {\r\n\t\treturn $this->minimo; \r\n\t}", "title": "" }, { "docid": "a2fd65183bc75c0a647ebbcbc3a50a94", "score": "0.53024316", "text": "public function getValorPago()\n {\n return $this->valorPago;\n }", "title": "" }, { "docid": "9a991dafbb10c996c61e4c447886c9f6", "score": "0.52916837", "text": "public function getTexto() {\n\n return $this->sTexto;\n }", "title": "" }, { "docid": "d915b7353d38199371559522dd1dc5d1", "score": "0.5290791", "text": "public function getValue()\n {\n return $this->Text;\n }", "title": "" }, { "docid": "5bbd90cca7a4e746ecb643f85462d7ab", "score": "0.52857375", "text": "public function getSiguiendo()\n {\n return $this->siguiendo;\n }", "title": "" }, { "docid": "4404b39af14f455deba0f5456b778f23", "score": "0.5267233", "text": "function get_value()\n\t{\n\t\treturn( $this->value );\n\t}", "title": "" }, { "docid": "4670715f4ab2523d5e133f217022e456", "score": "0.5260586", "text": "public function getValue() : string\n {\n return $this->element->hasAttribute('value') ? $this->element->getAttribute('value') : 'on';\n }", "title": "" }, { "docid": "f8824b393b79898eaf886051be146972", "score": "0.52389103", "text": "public function getMegaMenuEcommerceValue()\n {\n $ecommerce_value = $this->_scopeConfig->getValue(\n self::XML_PATH_MEGA_MENU_ECOMMERCE,\n ScopeInterface::SCOPE_STORE,\n $this->getStoreId()\n );\n\n return $ecommerce_value;\n }", "title": "" }, { "docid": "79e873347188fc2ffae486ee34d43146", "score": "0.5236537", "text": "public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }", "title": "" }, { "docid": "2314fd4c5e530af791e44926517a3fd1", "score": "0.5230028", "text": "public function getValue(): string\n {\n if (isset($this->value) && !is_null($this->value)) {\n return (string) $this->value;\n } elseif (isset($this->element['default'])) {\n return (string) $this->element['default'];\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "c5b77a82ab21047c96fa4bb17b0129b5", "score": "0.52286935", "text": "public function getProductsValue(){\n\t\t$orderhas = OrdenHasProductotallacolor::model()->findAllByAttributes(array('tbl_orden_id'=>$this->id));\n\t\t$value = 0;\n\t\t\n\t\tforeach($orderhas as $ptc){\n\t\t\t$product = $ptc->preciotallacolor->producto;\n\t\t\t$value += $product->getPrecioImpuesto(false)*$ptc->cantidad;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "0672684ccc9aef92ceaf9f8c8b455842", "score": "0.5228416", "text": "public function getKetTanah()\n {\n return $this->ket_tanah;\n }", "title": "" }, { "docid": "1039bac811241786f55deb3d36ef4ed8", "score": "0.52106553", "text": "public function getValue() : string\n {\n return $this->getAttribute('value');\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5206934", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5206934", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5206934", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5206934", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5206934", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "19189ee3cfee23bb4b164fd696264f1d", "score": "0.5199055", "text": "public function getTituloPeso()\n {\n return $this->tituloPeso;\n }", "title": "" }, { "docid": "e374977a682dac301cb89ccce19f2837", "score": "0.5198029", "text": "public function getValue(){\r\n\treturn $this->value;\r\n }", "title": "" }, { "docid": "1c43b66693c312f4d5b2882acfe5e6d6", "score": "0.5196022", "text": "public function mostrar_titulo(){\n //evaluamos si el usuario a dejado el titulo vacio o no\n if($this->titulo != \"\"){\n //si el if se cumple se inicia el titulo con el valor suministrado\n echo 'value=\"'. $this-> titulo .'\"';\n }\n }", "title": "" }, { "docid": "d854c454c084ef2d3e1e3598a01fde9e", "score": "0.51945186", "text": "public function getProd_niche () {\n\t$preValue = $this->preGetValue(\"prod_niche\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->prod_niche;\n\treturn $data;\n}", "title": "" }, { "docid": "064e5fd4705315292baa685214572b4b", "score": "0.51938015", "text": "function getFieldValue() {\n\t\t$form =& $this->getForm();\n\t\t$fieldValue = $form->getData($this->getField());\n\t\tif (is_null($fieldValue) || is_scalar($fieldValue)) $fieldValue = trim((string)$fieldValue);\n\t\treturn $fieldValue;\n\t}", "title": "" }, { "docid": "28fed79925ba7ce64eecbc7933a791fa", "score": "0.51917696", "text": "public function getQuantidade()\n {\n return $this->quantidade;\n }", "title": "" }, { "docid": "68116098c56f3c5aa4d5b5458e3e5ba8", "score": "0.5189359", "text": "function getTempo() {\n\treturn $this->tempo;\n}", "title": "" }, { "docid": "48c24fd79c08a9a3d042069b64eeca75", "score": "0.51736605", "text": "public function value()\n {\n return $this->value;\n }", "title": "" }, { "docid": "48c24fd79c08a9a3d042069b64eeca75", "score": "0.51736605", "text": "public function value()\n {\n return $this->value;\n }", "title": "" }, { "docid": "48c24fd79c08a9a3d042069b64eeca75", "score": "0.51736605", "text": "public function value()\n {\n return $this->value;\n }", "title": "" }, { "docid": "48c24fd79c08a9a3d042069b64eeca75", "score": "0.51736605", "text": "public function value()\n {\n return $this->value;\n }", "title": "" }, { "docid": "6446fff953aa15e103b3c8843156fa59", "score": "0.51729244", "text": "private final function getValue() {\n\t\t\treturn $this->value;\n\t\t}", "title": "" }, { "docid": "067a8a78f08d98ee56193a4e3bdad130", "score": "0.5170393", "text": "public function getValueText()\n {\n return $this->valueText;\n }", "title": "" }, { "docid": "b22d8ae69f806711a4edaafaa3fc639d", "score": "0.5167698", "text": "public function value() {\n return $this->value;\n }", "title": "" }, { "docid": "4a3cf01bb61965a738ca45242928fbfb", "score": "0.51638657", "text": "function calculaImposto () {\n return $this->getPreco()*0.05;\n }", "title": "" }, { "docid": "1307ed1bbe8ff182b5a70b13f2f3a819", "score": "0.5163743", "text": "function zoologico_campo( $value ) {\n\tglobal $post;\n\n $campo = get_post_meta( $post->ID, $value, true );\n if ( !empty( $campo ) )\n\t return is_array( $campo ) ? tira_profunda( $campo ) : stripslashes( wp_kses_decode_entities( $campo ) );\n\n return false;\n}", "title": "" }, { "docid": "ee29e49d80b209abb10da4d2dd3888ec", "score": "0.5154576", "text": "public function getValue() {\n return wb_get_value($this->controlID);\n }", "title": "" }, { "docid": "3581e305dc2430e7e7b3876e5024a1e1", "score": "0.51525795", "text": "public function get_value()\n {\n return $this->get(self::VALUE);\n }", "title": "" }, { "docid": "79015905c53ed775cebc2bae949d276b", "score": "0.51490545", "text": "public function get_value()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "43b528ee9f19b9d9f29e9ca78df44352", "score": "0.5146977", "text": "public function getValue () {\n\t\treturn $this->valeurNum;\n\t}", "title": "" }, { "docid": "80f76671ce54b77a2a7b476bf4d5ab93", "score": "0.5143549", "text": "public function getValue() {return $this->value;}", "title": "" }, { "docid": "9aaca1109c93ae8ae1f2008f83a1082a", "score": "0.51430726", "text": "public function getValue() : string {\n return $this->val;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.5138827", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.5138827", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.5138827", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.5138827", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.5138827", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.5138827", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "2f89c1e1c412d9ba213c349950dcc0bc", "score": "0.51332045", "text": "function getValue() {\r\n if ($this->components == 1)\r\n return $this->value[0];\r\n else\r\n return $this->value;\r\n }", "title": "" }, { "docid": "ccd01bfd2821fd5e0de017232f39e013", "score": "0.5131033", "text": "public function get_value() {\n return $this->field->getValue();\n }", "title": "" }, { "docid": "7aef48400a18882231d48ca3c2506c3f", "score": "0.51277506", "text": "function escreverValorMoeda($n){\n //Converte para o formato float \n if(strpos($n, ',') !== FALSE){\n $n = str_replace('.','',$n); \n $n = str_replace(',','.',$n);\n }\n\n //Separa o valor \"reais\" dos \"centavos\"; \n $n = explode('.',$n);\n\n return ucwords($this->numeroEscrito($n[0])). ' reais' . ((isset($n[1]) && $n[1] > 0)?' e '. $this->numeroEscrito($n[1]).' centavos.':'');\n\n }", "title": "" }, { "docid": "1a23ddc1e151b924cf32c7d106b89887", "score": "0.51213145", "text": "public function getValorDepreciado() {\n return $this->oFormulaCalculo->getValorDepreciado();\n }", "title": "" }, { "docid": "ec0a968200986699b454143ee91a5cc1", "score": "0.5120738", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "221c98a4fecfe9dbd126f4a1fd3217db", "score": "0.51203763", "text": "public function getValue(){\n\t\t\t# Return the value of the node\n\t\t\treturn $this->value;\n\t\t}", "title": "" }, { "docid": "d2055b155dd34f63a4f328e53346e4fc", "score": "0.5118783", "text": "public function getAlertText()\n\t{\n\t\t$command = new Commands\\GetAlertText($this);\n\t\t$results = $command->execute(); \t\n\t\treturn $results['value'];\n\t}", "title": "" }, { "docid": "a9198a61aed90c0b7fadaa690ea567f2", "score": "0.51128936", "text": "public function getQuantidade() {\n return $this->nQuantidade;\n }", "title": "" }, { "docid": "1d5605c3af4e75cf1ef474a7d7e617ac", "score": "0.51104087", "text": "public function GetValue() {\n return $this->GetAttribute('value');\n }", "title": "" }, { "docid": "17a59e428a0072db860f6fe1a3a147e1", "score": "0.51098335", "text": "public function getValue()\n {\n return (string) $this->value;\n \n }", "title": "" }, { "docid": "505b1ca374ecc6f7464d0e51a85e1ac5", "score": "0.51067585", "text": "public function getTitulaire(): string\n {\n return $this->titulaire;\n }", "title": "" }, { "docid": "7cd9fce992eef9659e97cedb12ff283f", "score": "0.51036423", "text": "public function getValue()\n\t{\n\t\treturn $this->getAttribute('value');\n\t}", "title": "" }, { "docid": "dc6f5feb88b5b8f6b5bde0f461aa155c", "score": "0.51024365", "text": "public function getEstacursandoestudioscodigo()\n\t{\n\t\treturn $this->estacursandoestudioscodigo;\n\t}", "title": "" }, { "docid": "5d3263d350c6194ff58defbfbc4d959f", "score": "0.5100111", "text": "public function value() { # :: a\n return $this->value;\n }", "title": "" }, { "docid": "b4bc65985759b456efcdfa0ad843fa29", "score": "0.509772", "text": "public function getEstatura()\n {\n return $this->estatura;\n }", "title": "" }, { "docid": "46eaed19040297e30ed6e2f459aa5c91", "score": "0.5096882", "text": "function valeur() {\n $culotte = \"je suis une string\";\n $nb = 25;\n $nbdecimal = 2.3;\n $trufal = true;\n echo \"type string: $culotte <br /> type int: $nb <br /> type float: $nbdecimal<br /> type bollean: $trufal\";\n\n }", "title": "" }, { "docid": "c9f09b8b3df3c948f600c3d0f7d79921", "score": "0.5091526", "text": "public function get_value()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}", "title": "" }, { "docid": "3aaf34d918633ba078fb334f5ca09656", "score": "0.50914365", "text": "public function Value()\n {\n return $this->value;\n }", "title": "" }, { "docid": "b4987ee62692aa08459f1d37bcc094b0", "score": "0.5090231", "text": "public function getContato()\n {\n return $this->contato;\n }", "title": "" } ]
4431025f46b7ca8a70e407605cf3edba
Handles a request from a user to view the page to edit a person.
[ { "docid": "f0e19a0c842c69d80e7b3007ecc75def", "score": "0.0", "text": "public function editAction()\n {\n $response = parent::editAction();\n\n if ($response instanceof ViewModel) {\n $personId = $this->getEvent()->getRouteMatch()->getParam('child_id');\n $personData = $this->getAdapter()->getPersonData($personId);\n if (false === $personData) {\n throw new ResourceNotFoundException();\n }\n $view = array_values($response->getChildren())[0];\n $translatedTitle = $this->translator->translate($view->getVariable('title'));\n $fullName = (new PersonName())->__invoke($personData['person']);\n $view->setVariable('title', sprintf($translatedTitle, Escape::html($fullName)));\n }\n\n return $response;\n }", "title": "" } ]
[ { "docid": "400626a2e7e8a5f825d911a905e806ea", "score": "0.80782783", "text": "public function personEditAction() {\n if ($this->request->hasArgument('person')) {\n $personID = $this->request->getArgument('person');\n }\n $person = $this->userRepository->findByUid($personID);\n $companies = $this->companyRepository->findAll();\n\n\n $this->view->assign('mainmenu', '1');\n $this->view->assign('topmenu', '5');\n $this->view->assign('person', $person);\n $this->view->assign('companies', $companies);\n $this->view->assign('userRights', $userRights);\n }", "title": "" }, { "docid": "68f01d0c7a337fada02ee6420d8aabe3", "score": "0.7491014", "text": "public function user_edit()\n {\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $this->editUser();\n } else {\n $this->showEditPage();\n }\n }", "title": "" }, { "docid": "716c8d9693a25c46145afda1d7a6f32b", "score": "0.7104774", "text": "public function handleEditProfile()\n {\n $thisUser = Session::get('userObj');\n $userData = UserHelper::getUserObj($thisUser->id);\n $this->layout->content = View::make('sentryuser::edit-profile')->with('userdata', $userData);\n }", "title": "" }, { "docid": "d78079b070ec6b90de3a48a8054c8238", "score": "0.7008362", "text": "public function edit(Person $person)\n {\n //\n }", "title": "" }, { "docid": "7e2afab8446fc9ef348c5e00870fff70", "score": "0.6973937", "text": "public function edit(person $person)\n {\n //\n }", "title": "" }, { "docid": "ffd08c53313ac2ff6839d0ff0de22e30", "score": "0.69137144", "text": "public function edit(){\n\t\t$url = $_SERVER['REQUEST_URI'];\n\t\tpreg_match('/(\\d{1,})\\/edit/', $url, $matches);\n\t\t$id = $matches[0];\n\t\t$user = User::find_by(['id' => $id]);\n\t\t$translations = [];\n\t\tforeach (['first_name', 'last_name', 'username', 'email', 'sex', 'male', 'female', 'update'] as $translate){\n\t\t\t$translations[\"lang_$translate\"] = Localization::find_by(['lang' => get_language(), 'qualifier' => $translate])->getValue();\n\t\t}\n\t\tload_template(\"views/user/edit.php\", array_merge([\n\t\t\t'first_name'\t=> $user->getFirstName(),\n\t\t\t'last_name' \t=> $user->getLastName(),\n\t\t\t'is_admin'\t\t=> $user->isAdmin(),\n\t\t\t'username'\t\t=> $user->getUserName(),\n\t\t\t'email'\t\t\t=> $user->getEmail(),\n\t\t\t'sex'\t\t\t=> $user->getSex(),\n\t\t\t'id'\t\t\t=> $user->getId(),\n\t\t\t'deleted'\t\t=> $user->isDeleted(),\n\t\t], $translations));\n\t}", "title": "" }, { "docid": "be194dd6d70f1efbd9bb65e4cb8360cb", "score": "0.68947095", "text": "public function edit(){\n\t\t\n\t\t$navBar = $this->navBar();\n\t\t\n\t\t// get user id\n\t\t$userId = 0;\n\t\tif ($this->request->isParameterNotEmpty('actionid')){\n\t\t\t$userId = $this->request->getParameter(\"actionid\");\n\t\t}\n\t\t\n\t\t// get user info\n\t\t$user = $this->userModel->userAllInfo($userId);\t\n\t\t\n\t\t// Lists for the form\n\t\t// get status list\n\t\t$modelStatus = new CoreStatus();\n\t\t$status = $modelStatus->statusIDName();\n\n\t\t// get units list\n\t\t$modelUnit = new SuUnit();\n\t\t$unitsList = $modelUnit->unitsIDName();\n\t\n\t\t\n\t\t// responsible list\n\t\t$respModel = new SuResponsible();\n\t\t$respsList = $respModel->responsibleSummaries(); \n\t\t\n\t\t// is responsoble user\n\t\t$user['is_responsible'] = $respModel->isResponsible($user['id']);\n\t\t\n\t\t// generate the view\n\t\t$this->generateView ( array (\n\t\t\t\t'navBar' => $navBar, 'statusList' => $status,\n\t\t\t\t'unitsList' => $unitsList,\n\t\t\t\t'respsList' => $respsList, 'user' => $user\n\t\t) );\n\t}", "title": "" }, { "docid": "9d128ad2f32fc34afcef431d356c80ca", "score": "0.686203", "text": "public function edit(People $person)\n {\n }", "title": "" }, { "docid": "b223a48c110d536d3f8537b6f881e5fe", "score": "0.6858443", "text": "public function editAction()\n {\n $this->_edit();\n $this->view->form = $this->_getFormUserProfile();\n }", "title": "" }, { "docid": "d079664033d5a921bba6c24c7963f86f", "score": "0.68413436", "text": "public function edit (EditPerson $request, User $user)\n {\n if (Gate::denies('EDIT_USERS')) {\n abort(404);\n }\n\n if ($request->isMethod('post')) {\n\n $request->request->set('user_id', session('user_id'));\n if (!empty(session('photo'))) {\n $request->request->set('photo', session('photo'));\n }\n// формирование поля expirience\n if ($request->request->has('month') && $request->request->has('year')) {\n $month = $request->request->get('month');\n $year = $request->request->get('year');\n if (($month < 1 || $month > 12) || (($year < 1970 || $month > 2020))) {\n return back()->withErrors(['Ошибка в поле Дата'])->withInput();\n }\n $exp = date(\"Y-m-d H:i:s\", strtotime($year . '-' . str_pad((int)$month, 2, 0, STR_PAD_LEFT) . '-01'));\n\n $request->request->add(['expirience'=>$exp]);\n }\n\n if (!session('user_id')) {\n return back()->withErrors('Ошибка получения данных профиля');\n }\n\n $person = $this->pers_rep->findByUserId(session('user_id'));\n\n if ($person) {\n $result = $this->pers_rep->updatePerson($request, $person, $user);\n $res = $this->tmp_rep->deleteTmp(session('user_id'));\n $request->session()->forget('photo');\n $request->session()->forget('user_id');\n return redirect(route('admin_profile'))->with($result, $res);\n\n } else {\n $result = $this->pers_rep->createPerson($request, $user);\n $res = $this->tmp_rep->deleteTmp(session('user_id'));\n $request->session()->forget('photo');\n $request->session()->forget('user_id');\n return redirect(route('admin_profile'))->with($result, $res);\n }\n }\n\n// View Form\n if (empty($user->id)) {\n abort(404);\n }\n\n $this->title = 'Редактирование профиля';\n $this->template = 'admin.article.admin';\n $person = $this->pers_rep->findByUserId($user->id);\n\n $profile = $this->profile_rep->getProfile($user, true);\n\n $spec = $this->profile_rep->getSpecialties();\n\n $request->session()->put('user_id', $profile->user_id);\n\n if ($this->profile_rep->isAuthor($user)) {\n $profile->confirmed = true;\n }\n // если юзер добавил новую\n if (!empty($profile->photo)) {\n if (empty($person) || ($profile->photo != $person->photo)) {\n $request->session()->put('photo', $profile->photo);\n }\n }\n\n $this->content = view('admin.profiles.edit')->with(['title'=>$this->title, 'profile'=>$profile, 'specialties'=>$spec, 'person'=>$person])->render();\n return $this->renderOutput();\n }", "title": "" }, { "docid": "e0559b280223b717f459198ad530ce27", "score": "0.6786605", "text": "public function editAction()\r\n\t{\r\n\t $id = (int) $this->_getParam('id');\r\n\t \r\n\t $userToEdit = za()->getUser();\r\n\t // If an ID is passed, we need to have a higher role than that user\r\n // to be able to edit them an admin to be\r\n\t // able to edit this user\r\n\t if ($id > 0) {\r\n\t $selectedUser = $this->userService->getUser($id);\r\n\t // now, if the selectedUser has a role less than mine, we can \r\n // edit them\r\n if ($selectedUser->getRoleValue() < za()->getUser()->getRoleValue() || za()->getUser()->isPower()) {\r\n\t $userToEdit = $selectedUser;\r\n\t }\r\n\t }\r\n\r\n\t // if the user's an admin, give them the list of contacts \r\n // to bind for this user\r\n if (za()->getUser()->hasRole(User::ROLE_USER)) {\r\n // get all the contacts\r\n $this->view->contacts = $this->clientService->getContacts();\r\n }\r\n\t \r\n\t $this->view->leave = $this->userService->getLeaveForUser($userToEdit);\r\n\t $this->view->accruedLeave = $this->userService->calculateLeave($userToEdit);\r\n\t $this->view->leaveApplications = $this->userService->getLeaveApplicationsForUser($userToEdit);\r\n\t $this->view->model = $userToEdit;\r\n\t \r\n\t $this->view->themes = $this->getThemes();\r\n\t \r\n\t $this->renderView('user/edit.php');\r\n\t}", "title": "" }, { "docid": "7bfd0448802c70ea9c26b14afbc29a51", "score": "0.6706504", "text": "public function edit() {\n\t\t\tif(isset($this->id)) {\n\t\t\t\t$this->returnView($this->model->edit($this->id));\n\t\t\t} \n\t\t\telse {\n\t\t\t\terror404();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d4c5c17930926329b1e22e3611608cee", "score": "0.66616654", "text": "public function edit()\n {\n $volunteerJobId = Helper::getIdFromUrl('volunteerjob');\n $volunteerJob = VolunteerJobModel::load()->get($volunteerJobId);\n\n Helper::checkIdsFromSessionAndUrl($volunteerJob->user_id);\n\n View::render('volunteerjobs/edit.view', [\n 'method' => 'POST',\n 'action' => '/volunteerjob/' . $volunteerJobId . '/update',\n 'volunteerjob' => $volunteerJob\n ]);\n }", "title": "" }, { "docid": "d97840483702c8418c6e2f70d81036ab", "score": "0.66615814", "text": "public function handleEditUser($id)\n {\n $user = UserHelper::getUserObj($id);\n $thisUser = Session::get('userObj');\n \n $this->layout->content = View::make('sentryuser::edit-profile')\n ->with('currUser', $thisUser)\n ->with('userdata', $user)\n ->with('uid', $id);\n }", "title": "" }, { "docid": "4d683a4a63d081b389e26539a5eaae45", "score": "0.66581625", "text": "public function handleEdit()\n {\n $user = User::findOrFail(Input::get('id'));\n $user->username = Input::get('username');\n $user->email = Input::get('email');\n $user->password = Input::get('password');\n $user->save();\n\n return Redirect::action('UsersController@index');\n }", "title": "" }, { "docid": "d02ee390aaec9233236dc6e3985e62af", "score": "0.6641644", "text": "public function editProfileAction()\n {\n View::renderTemplate('Profile/edit-profile.html.twig', [\n 'user' => Auth::getUser()\n ]);\n }", "title": "" }, { "docid": "a8cca93059cebc7744974debb37c7dd8", "score": "0.6634992", "text": "public function editAction(){\n\n\t\tif( $this->app->HTTPRequest->postExists('user') ):\n\t\t\t$User = new myObject($this->app->HTTPRequest->postData('user') );\n\t\t\t$this->app->db->update(PREFIX . 'user', $User, array('id =' => $_SESSION['utilisateur']['id']));\n\n\t\t\t# Mise a jour des var de sessions\n\t\t\t$User = $this->app->db->get_one(PREFIX . 'user', array('id =' => $_SESSION['utilisateur']['id']));\n\t\t\t$this->app->session->create($User);\n\n\t\t\t# Redirection utilisateur\n\t\t\treturn $this->redirect( $this->app->Helper->getLink('utilisateur'),3, 'Profil mise a jour' );\n\t\tendif;\n\n\t\t$this->getFormValidatorJs();\n\t\treturn $this->app->smarty->fetch(BASE_APP_PATH . 'view' . DS . 'utilisateur' . DS . 'edit.tpl');\n\n\t}", "title": "" }, { "docid": "7a303a0d5aa820e9fb9684df58ec2a01", "score": "0.6608835", "text": "public function doEditUser()\n {\n }", "title": "" }, { "docid": "2eced1a66b0e08db492fc30ad7e27612", "score": "0.6595093", "text": "public function edit(){\n if(Auth::check()){\n return view('users.edit', ['user' => Auth::user()]); \n }\n else{\n abort(404);\n }\n }", "title": "" }, { "docid": "ee61039b661f261d64f5bd2fddef5602", "score": "0.6590506", "text": "public function editAction() {\n\n\t\t$userID = Request::getParam('user_id');\n\t\t$userID = (empty($userID) && !empty($_POST['user_id']))?$_POST['user_id']:$userID;\n\n\n\t\t$editObject = new Admin();\n\t\t$view = $editObject->getViewUser($userID);\n\n\t\t$result = [];\n\t\tif (isset($_POST['save'])) {\n\t\t\t$userName = Request::getParam('username');\n\t\t\t$password = Request::getParam('password');\n\t\t\t$result = $editObject->getEditUser($userName, $password, $userID);\n\n\t\t}\n\t\n\t\t$this->assign('result', $result);\n\t\t$this->assign('username', $view[0]['username']);\n\t\t$this->assign('password', $view[0]['password']);\n\t}", "title": "" }, { "docid": "bf47931b4dd03a6517f41cc2e389cdbd", "score": "0.65812606", "text": "public function edit(){\n\t\tif($this->user->tipo_usuario != 'administrador'){\n\t\t\theader('Location: /');\n\t\t}\n\t\t$this->location = \"usuarios\";\n\t\t$this->usuario = new usuario($_GET['id']);\n\t\t$this->usuario->read(\"id,email,password,nombre,tipo_usuario,imagen,informacion\");\n\t\t$this->include_theme(\"index\",\"edit\");\n\t}", "title": "" }, { "docid": "c0d211d253e2cdb5e3aa0b701a09d8fe", "score": "0.653775", "text": "public function page_userEdit($resource)\n {\n\n $this->_pageContent['userInfo'] = $resource;\n\n $this->_myPage = \"page_userForm.tpl\";\n\n // call show page\n $this->htmlStream();\n }", "title": "" }, { "docid": "fd54c926e39526eea1856cf21d0876a6", "score": "0.6532032", "text": "public function entityEditHandle()\n {\n $entity = Input::get('entity');\n $entityId = Input::get('entityId');\n \n switch ($entity) {\n case 'user':\n return Response::json(array(\n 'url' => 'user/edit/' . $entityId\n ));\n break;\n \n case 'role':\n return Response::json(array(\n 'url' => 'user/role/edit/' . $entityId\n ));\n break;\n }\n }", "title": "" }, { "docid": "cf37cc9b422e265d5c5a998dccb1ebc2", "score": "0.6530951", "text": "public function edit($id)\n {\n //\n return view('people.edit')\n ->with('person', User::find($id));\n }", "title": "" }, { "docid": "a8cb8ec6e6cf603439a4539414a926d7", "score": "0.6523445", "text": "public function edit()\n {\n if(Auth::user()){\n $user = User::find(Auth::user()->id);\n\n if($user){\n return view ('user.edit')->withUser($user);\n } else {\n return redirect()->back();\n }\n } else {\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "df6043f35030710cfdfffdf5999b9a8f", "score": "0.65096784", "text": "public function edit(Request $request)\n {\n $id = $request->input('id');\n $author = $this->findAuthor($id);\n\n if (!$author) {\n return abort(404);\n }\n \n // display the form\n return $this->wrapContent(view('author/edit', [\n 'author' => $author\n ]));\n }", "title": "" }, { "docid": "ab98e37ba7e087b07a8651ef7ae6f270", "score": "0.65024215", "text": "public function edit()\n {\n global $SM_ARGS, $SM_USER;\n\n // if the username was not given as an argument, use the current user\n if(count($SM_ARGS) < 3)\n {\n $user = $SM_USER;\n }\n else\n {\n // a username was provided\n\n // make sure the user is an admin to edit someone else\n if(!$SM_USER->admin && $SM_USER->username != $SM_ARGS[2])\n {\n $this->args['error'] = \"You are not an admin.\";\n return;\n }\n\n $user = new user();\n if(!$user->load(\"username=?\", array($SM_ARGS[2])))\n $user = null;\n }\n\n if($user)\n {\n $this->args['user'] = $user;\n\n // see if there is a POST request to update a user\n if(!empty($_POST))\n {\n // check to make sure the email is valid\n if(!valid_email($_POST['email']))\n {\n $this->args['invalid_email'] = 1;\n return;\n }\n\n // there is data - update the user and pass the updated user to the\n // template\n $user->name = $_POST['name'];\n $user->email = $_POST['email'];\n $success = $user->save();\n $this->args['update_success'] = $success;\n }\n }\n else\n {\n $this->args['username'] = $SM_ARGS[2];\n }\n }", "title": "" }, { "docid": "4d8730d0dfef2848f6e6fc4da462ba44", "score": "0.6491456", "text": "public function actionEdit() {\t\tif ( !isset($_GET['what']) ) {\n\t\t\tYii::app()->request->redirect( Yii::app()->createUrl('site/admin') );\n\t\t} else {\n\t\t\t$what = $_GET['what'];\n\t\t\tswitch ($what) {\n\t\t\t\tcase 'predicament':\n\t\t\t\t\tif (Yii::app()->request->isPostRequest) {\n\t\t\t\t\t\t// Handle the edit request.\n\t\t\t\t\t\t$predicament = Predicament::model()->findByPk( $_POST['Predicament']['predicament_id'] );\n\t\t\t\t\t\t$predicament->attributes = $_POST['Predicament'];\n\t\t\t\t\t\t$predicament->save();\n\t\t\t\t\t\t$this->layout = 'admin_default';\n\t\t\t\t\t\tnew dBug('Here!!');\n\t\t\t\t\t\t$this->render('predicament_edit', array('predicament'=>$predicament, 'message'=>'Predicament saved.', ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// What predicament are we editing?\n\t\t\t\t\t\tif ( !isset($_GET['predicament_id']) ) { $predicament_id = 0; }\n\t\t\t\t\t\telse { $predicament_id = $_GET['predicament_id']; }\n\t\t\t\t\t\t// Get the record.\n\t\t\t\t\t\t$predicament = Predicament::model()->findByPk($predicament_id);\n\t\t\t\t\t\t// Load the page.\n\t\t\t\t\t\t$this->layout = 'admin_default';\n\t\t\t\t\t\t$this->render('predicament_edit', array('predicament'=>$predicament,) );\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5260474534642037a354f7672b003961", "score": "0.6485076", "text": "public function edit($id)\n {\n $response = Http::get('http://localhost:3000/api/person/'.$id);\n if($response->status() == 200) {\n $person = json_decode($response->body());\n } else {\n return redirect()->route('person.index')->with('error',\"Pessoa não encontrada!\");\n }\n\n return view('admin.pages.person.edit', compact('person'));\n }", "title": "" }, { "docid": "fc3c23100e0ca4bd42cd582c7b1707d1", "score": "0.6475995", "text": "public function edit(User $user)\r\n {\r\n //\r\n }", "title": "" }, { "docid": "cb71a616ffa5b0f3029b5af0fe3b0ebd", "score": "0.64680964", "text": "public function edit($id) // 'localhost/webpages/{id}/edit'\n {\n\n $page = MakeWebPage::findorFail($id);\n // Check for correct user\n\n if(auth()->user()->id !== $page->user->id){\n return redirect('/webpages')->with('error', 'Not Authorised User');\n } else {\n return view('pages.edit')->with('page', $page);\n }\n}", "title": "" }, { "docid": "6d73186adc72a729a4bcc732a67019dd", "score": "0.64329135", "text": "public function edit($id)\n\t{\n //check if the user who edit the profil is the owner\n if(Auth::id() == $id)\n {\n // get the user\n $user = User::findOrFail($id);\n\n // show the edit form and pass the user\n return View::make('subview/editUserForm')\n ->with('user', $user);\n }\n else\n {\n Session::flash('error_message', \"you can't edit a other account than your own\");\n return Redirect::to('/user/'.$id);\n }\n\t}", "title": "" }, { "docid": "ace8e167d799ba84825136561d832af1", "score": "0.64312005", "text": "public function actionEdit () {\r\n $ID = User::getLogged();\r\n\r\n // Check if a user is logged\r\n if ($ID) {\r\n $errors = null;\r\n\r\n // Get user info\r\n $user = User::getUserByID($ID);\r\n\r\n if (isset($_POST['submit'])) {\r\n // Clicked 'Save'\r\n $errors = array();\r\n\r\n $requiredFields = array('first_name', 'last_name', 'phone_num');\r\n\r\n \textract(User::loadValueOfFields(array('first_name', 'last_name', 'middle_name', 'phone_num')), EXTR_OVERWRITE);\r\n\r\n $allFields = array(\r\n 'first_name' => $first_name,\r\n 'last_name' => $last_name,\r\n 'middle_name' => $middle_name,\r\n 'phone_num' => $phone_num\r\n );\r\n\r\n $cache = User::checkAllFields($requiredFields, $allFields);\r\n // Check if all fields are correct\r\n if (User::isAssoc($cache)) {\r\n // Escape special characters for all of the fields and set vars\r\n \t\t\t\t\textract($cache, EXTR_OVERWRITE);\r\n\r\n // Save new information\r\n if(User::saveInformation($ID, $first_name, $last_name, $middle_name, $phone_num)) {\r\n // Send alert about succesfully save\r\n Alert::alertMessage('Зміни успішно збережені!', 'success');\r\n\r\n // Move to cabinet page\r\n Response::redirect('cabinet');\r\n } else {\r\n $errors = 'Інформація не була редагована.';\r\n }\r\n } else {\r\n $errors = $cache;\r\n }\r\n }\r\n\r\n // Add all of the fields to Array\r\n $data = array(\r\n 'user' => $user,\r\n 'errors' => $errors\r\n );\r\n // Display view - 'cabinet'\r\n View::show('edit', $data);\r\n } else {\r\n // Move to login page\r\n Response::redirect('user/login');\r\n }\r\n }", "title": "" }, { "docid": "942fce97c62375a79e6002cd916754f2", "score": "0.64302975", "text": "public function edit() {\n $web_user = Auth::check('web_user');\n\t\t$user = Users::find($this->request->id);\n\n\t\tif (!$user) {\n\t\t\t$this->redirect('Users::index');\n\t\t}\n\t\tif (($this->request->data) && $user->save($this->request->data)) {\n\t\t\t$this->redirect(array('Users::view', 'args' => array($user->id)));\n\t\t}\n $this->_render['layout'] = 'blank';\n\t\treturn compact('user', 'web_user');\n\t}", "title": "" }, { "docid": "14e06013c9354d2e21afc53565fb4c36", "score": "0.6422853", "text": "public function edit(Request $request)\n\t{\n\t\t// set active tab is Profile tab\n\t\t$this->dataPage['active']['pro'] = 'active';\n if ($request->isMethod('post') && Auth::check()) {\n //remove empty values from array\n $data = $request->all();//array_filter($request->all());\n $data['id'] = $this->dataPage['user']['id'];\n\n $result = $this->_submitHTTPPost(config('config.api_url') . 'users/update/', $data);\n if (!empty($result['type']) && $result['type'] == 'error') {\n return response()->json(['status' => 'error','msg' => $result['message']]);\n }else{\n Auth::user()->fresh();\n return response()->json(['status' => 'success']);\n }\n }\n\t\treturn view('profile.v2-edit-profile')->with($this->dataPage);\n\t}", "title": "" }, { "docid": "eea5e95105979eb4f220b36f299015b4", "score": "0.64183027", "text": "public function edit()\n {\n $this->webPageMapper->modifyWebPage(isset($_GET['page']) ? $_GET['page'] : '', $_POST);\n }", "title": "" }, { "docid": "f79fcd385d2a3f0679ed94e8f2c51bbe", "score": "0.6415869", "text": "public function edit(People $people)\n {\n //\n }", "title": "" }, { "docid": "47074193491fd87603e99274f8bb671c", "score": "0.6390552", "text": "public function actionEdit()\n\t{\n\t\tif(Yii::app()->user->checkAccess('user')){\n\t\t\t$article = TblArticles::model()->findByPk($_POST['id']);\n\t\t\t$article->setAttributes($_POST);\n\t\t\t$article->save();\n\t\t\t$this->sendResponse($article);\n\t\t}else\n\t\t\t$this->sendResponse(401);\n\n\t}", "title": "" }, { "docid": "8816fd96e5f512e4bf093021adbbc641", "score": "0.6387186", "text": "public function edit()\n {\n $profile = User::find( auth()->user()->id );\n\n if (!$profile) {\n alert()->error(__('Error'), __('No data that you request'));\n return redirect()->route('dashboard');\n }\n\n return view('employee.profile', [\n 'employee' => $profile\n ]);\n }", "title": "" }, { "docid": "cb9a09faafdac78606fff45ac4cf4b80", "score": "0.63850206", "text": "public function action_edit()\n\t{\n\t\t$error_message = '';\n\t\t$profile = $this->user->get_profile_settings(Session::get('user_id'));\t\t\n\t\treturn Response::forge(View::forge('startpage/edit',array('profile'=>$profile,'message'=>$error_message)));\t\n\t}", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "247ff1a29dbd220ec57d1db69b56ab55", "score": "0.63761556", "text": "public function edit(User $user)\n {\n //\n }", "title": "" }, { "docid": "f948f85783ec15409cf396c109462b14", "score": "0.6369586", "text": "public function edit(EditResourceRequest $request, $id = 0)\n {\n return $this->page(EditUserPage::class);\n }", "title": "" }, { "docid": "94689fd32a1fc6bc8a2db9f092f9e4a3", "score": "0.63586944", "text": "public function edit($id)\n\t{\n\t $person = Person::find($id);\n\n if (Auth::user()->isAdmin()) {\n $logins = $person->logins;\n } else {\n $logins = array(Auth::user());\n }\n \n return View::make('user/edit', array('person' => $person, 'logins' => $logins));\n }", "title": "" }, { "docid": "63294c4d5b3fd3e343477d77ea125679", "score": "0.6347153", "text": "public function edit($id)\n\t{\n\t\t\n\t\t//setup\n\t\t$persona = $this->personaRepository->findWithoutFail($id);\n\t\tif(empty($persona)){\n\t\t\tFlash::error('Persona not found');\n\t\t\treturn redirect(route('personae.index'));\n\t\t}\n\t\t\n\t\t//security\n\t\tif(Gate::denies('mapkeeperOwn', ($persona->park->mapkeeper ? $persona->park->mapkeeper->id : 0))\n\t\t\t&& Gate::denies('own', $persona->id)\n\t\t){\n\t\t\tFlash::error('Permission Denied');\n\t\t\treturn redirect(route('personae.index'));\n\t\t}\n\t\t\n\t\t//get vocations\n\t\t$vocations = Vocations::pluck('name', 'id')->toArray();\n\t\t\n\t\t//get metatypes\n\t\t$metatypes = Metatypes::pluck('name', 'id')->toArray();\n\t\t\n\t\t//get parks\n\t\t$park = Auth::user()->persona->park;\n\t\t$parks = [];\n\t\tif(!Auth::guest() && Auth::user()->is_admin){\n\t\t\t$parks = Parks::orderBy('name')->pluck('name', 'id')->toArray();\n\t\t}elseif(!Auth::guest() && Auth::user()->is_mapkeeper){\n\t\t\t$parks = Parks::where('id', $park->id)->orderBy('name')->pluck('name', 'id')->toArray();\n\t\t}\n\n\t\t//get territories\n\t\t$territoriesObjs = Territories::whereBetween('row', [$park->capital->row - 10, $park->capital->row + 10])\n\t\t\t->whereBetween('column', [$park->capital->column - 10, $park->capital->column + 10])\n\t\t\t->get();\n\t\tforeach($territoriesObjs as $tObj){\n\t\t\t$territories[$tObj->id] = $tObj->displayname;\n\t\t}\n\t\t\n\t\t//get actions\n\t\t$actions = Actions::pluck('name', 'id')->toArray();\n\t\n\t\t//get titles\n\t\t$titles = Titles::pluck('name', 'id')->toArray();\n\n\t\t//respond\n\t\treturn view('personae.edit')\n\t\t\t->with('persona', $persona)\n\t\t\t->with('vocations', $vocations)\n\t\t\t->with('metatypes', $metatypes)\n\t\t\t->with('parks', $parks)\n\t\t\t->with('territories', $territories)\n\t\t\t->with('actions', $actions)\n\t\t\t->with('titles', $titles);\n\t}", "title": "" }, { "docid": "1f2b0c408571259637a47fec33488528", "score": "0.63458866", "text": "public function edit(User $user)\n { \n }", "title": "" }, { "docid": "60cedf364348e389ff9107e76392a448", "score": "0.6344056", "text": "public function edit()\n {\n $user = Auth::user();\n\n if(!$user->social){\n $user->avatar = url('uploads/images/small/' . $user->avatar);\n }\n //if user is artist, load artist profile view\n if($user->type == 'artist') {\n $artist = Artist::where('user_id', $user->id)->first();\n $studios = Studio::all();\n $artist->cover = url('uploads/images/small/' . $artist->cover);\n\n return view('pages.profile.artist.edit', ['user' => $user, 'artist' => $artist, 'studios'=> $studios]);\n }\n //member can't have followers. so redirect to profile\n return view('pages.profile.member.edit', ['user' => $user]);\n }", "title": "" }, { "docid": "3242090ae0e7ddf8c6aeee109eeb352d", "score": "0.6343895", "text": "public function editAction(User $user) {\n\t\t$this->view->assign('user', $user);\n\t}", "title": "" }, { "docid": "0ab69e6f9669d6665d56405aac39fa32", "score": "0.6342778", "text": "public function edit($error = NULL){\n\t# Not logged in\n\tif(!$this->user) {\n\techo \"Members only. <a href='/users/login'>Please Login</a>\";\n\n\t# Return will force this method to exit here so the rest of\n\t# the code won't be executed and the profile view won't be displayed.\n\treturn;\n\n\t}\n\telse{\n\n\t# If this view needs any JS or CSS files, add their paths to this array so they will get loaded in the head\n\t$client_files = Array(\n\t\"/stylesheets/screen.css\",\n\t\"/stylesheets/print.css\",\n\t \"/stylesheets/ie.css\",\n\t \"/stylesheets/validationEngine.jquery.css\",\n\t\"/stylesheet/template.css\",\n\t\"/js/languages/jquery.validationEngine-en.js\",\n\t\"/js/jquery.validationEngine.js\",\n\t);\n\n\t$this->template->client_files = Utils::load_client_files($client_files);\n\n\t # Setup view\n\t$this->template->content = View::instance('v_users_edit');\n\t$this->template->title = \"Edit your profile\";\n\n\t #Pass the data to the view\n\t$this->template->content->error = $error;\n\n\t# Render template\n\techo $this->template;\n\n }\n }", "title": "" }, { "docid": "3df2ac109db04a6d6df6740478be1fa7", "score": "0.6341468", "text": "public function edit() {\r\n //provjeri nalazi li se u $_GET id profila koji se zeli edititrati\r\n if (empty($_GET['pid'])) {\r\n $this->redirect('/profile/index');\r\n }\r\n\r\n $ps = new PostService();\r\n $post = $ps->getPostById($_GET['pid']);\r\n\r\n $this->registry->template->post = $post;\r\n $this->registry->template->show('post_edit');\r\n }", "title": "" }, { "docid": "fa65162f2fed3ed302ae33cb0283ab2a", "score": "0.63374984", "text": "public function edit()\n\t{\n\t\t$user = $this->getUserByUsername(Auth::user()->username);\n\t\treturn View::make('profile.edit')->with('user', $user);\n\t}", "title": "" }, { "docid": "65ac31776e28cfa779c4b189533e5caa", "score": "0.63365245", "text": "public function edit($id)\n\t{\n\t\t// Pick out the user\n\t\t$user = User::find($id);\n\n\t\t// Check if user is logged in\n\t\tif (Auth::user())\n\t\t{\n\t\t\t// Get Authenticated user\n\t\t\t$authUserID = Auth::user()->id;\n\n\t\t\t//\n\t\t\t$region_options = Region::lists('name', 'id');\n\t\t\t$rank_options = Rank::lists('name', 'id');\n\t\t\t$skill_options = Skill::lists('name', 'id');\n\t\t\t$voips = Voip::all();\n\n\t\t\t// Find user's current set birthday and break it into array\n\t\t\tif($user->birthday)\n\t\t\t\t$birthday = explode('-',$user->birthday);\n\n\n\t\t\t// If the logged in used is the same as the user they are trying to edit, allow\n\t\t\tif ($authUserID == $id) {\n\t\t\t\t// Return Edit Page for user\n\t\t\t\treturn View::make('users/edit', compact('user', 'region_options', 'rank_options', 'skill_options', 'voips', 'birthday'));\n\t\t\t} else {\n\t\t\t// Else, return to root\n\t\t\treturn Redirect::to('/');\n\t\t\t}\n\t\t} else {\n\t\t\t// Else, return to root\n\t\t\treturn Redirect::to('/');\n\t\t}\n\t}", "title": "" }, { "docid": "0c47711247f730069061dc9303b29d1d", "score": "0.63351506", "text": "public function edit(User $user)\n {\n \n }", "title": "" }, { "docid": "628e5169381160d0b3bff59e572cc9c2", "score": "0.63326013", "text": "public function actionEdit_()\r\n\t{\r\n\t\t$model = $this->loadUser();\r\n\t\t\r\n\t\t// ajax validator\r\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='profile-form')\r\n\t\t{\r\n\t\t\techo UActiveForm::validate(array($model));\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t\t\r\n\t\tif(isset($_POST['User']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['User'];\r\n\t\t\t$profile->attributes=$_POST['Profile'];\r\n\t\t\t\r\n\t\t\tif ( $model->validate() ) {\r\n\t\t\t\t$model->save();\r\n\t\t\t\tYii::app()->user->setFlash('profileMessage',UserModule::t(\"Changes is saved.\"));\r\n\t\t\t\t$this->redirect(array('/user/profile'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->render('edit',array(\r\n\t\t\t'model'=>$model\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "0e4059cb28ce2bce2f3178f1ddc250d1", "score": "0.6330226", "text": "public function edit(User $user)\n {\n //\n\n }", "title": "" }, { "docid": "0e4059cb28ce2bce2f3178f1ddc250d1", "score": "0.6330226", "text": "public function edit(User $user)\n {\n //\n\n }", "title": "" }, { "docid": "00c59355a40ab411f2b16bb5b7920a28", "score": "0.6327322", "text": "public function edit(User $user)\n {\n\n\n }", "title": "" }, { "docid": "de02779bb5f772fff14e37875d13f615", "score": "0.6325235", "text": "public function edit() {\n $data = [$_POST['name'], null, $this->userId, isset($_POST['description']) ? $_POST['description'] : null];\n $successful = $this->update($_POST['viewerId'], $this->fields, $data);\n\n $result = true;\n\n if (!$successful) {\n $result = false;\n }\n\n echo json_encode($result);\n }", "title": "" }, { "docid": "207c12e1d83cbd179b67376b709774c9", "score": "0.6323932", "text": "public function editarUsuario()\n { \n //Cargamos todos los datos del usuario pasandole el id.\n $parametros['datos'] = $this->modelo->perfilCompleto($_GET['usuario']); \n $this->view->show(\"editarUsuario\",$parametros);\n }", "title": "" }, { "docid": "8f2604a7f75c34d332ca8d3cce56186e", "score": "0.63239086", "text": "public function edit()\n {\n if (!empty($_POST)) {\n $result = $this->User->update(filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT), [\n 'role_id' => filter_input(INPUT_POST, 'role_id', FILTER_SANITIZE_FULL_SPECIAL_CHARS)\n ]);\n if ($result) {\n return $this->index();\n }\n }\n $user = $this->User->find(filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT));\n $roles = $this->Role->getList('id', 'name');\n $form = new BootstrapForm($user);\n $this->render('admin.users.edit', compact('roles', 'form', 'user'));\n }", "title": "" }, { "docid": "d49ad9dad9e659ba60b5fa2259526bb8", "score": "0.63173765", "text": "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $user = $this->model->findOneBy(array('id'=>$id));\n $user->setFullName('tri 1234');\n $this->model->edit($user);\n //update user\n\n }", "title": "" }, { "docid": "030e84a2bc302a52aadd9c54c9734444", "score": "0.6310627", "text": "public function editprofile() {\n if(!$this->user) {\n Router::redirect('/users/login');\n }\n\n # Setup view\n $this->template->content = View::instance('v_users_editprofile');\n $this->template->title = \"Edit Profile\";\n\n # Set client files that need to load in the <head>\n $client_files_head = Array('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js','http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js','/js/validate-editprofile.js');\n $this->template->client_files_head = Utils::load_client_files($client_files_head);\n\n # Render template\n echo $this->template;\n }", "title": "" }, { "docid": "e8cae06a05d236b8611e5b194566db50", "score": "0.6308895", "text": "public function edit($id)\n {\n //\n\n\n $persons = Person::findOrFail($id);\n\n //highlight sidebar\n $this->setActiveParent();\n\n //null = current request\n $form_fields = DynamicForm::form_fields('edit', $persons, null, Person::form_fields() );\n\n return view('persons.edit', compact('form_fields', 'persons') );\n\n }", "title": "" }, { "docid": "5deeff5a1299d4280a01e0df8b10d2b8", "score": "0.6306075", "text": "public function edit(User $user)\n {\n }", "title": "" }, { "docid": "5deeff5a1299d4280a01e0df8b10d2b8", "score": "0.6306075", "text": "public function edit(User $user)\n {\n }", "title": "" }, { "docid": "5d25c09a388ccfdc31942eef36a58b25", "score": "0.63047355", "text": "public function edit(Request $req)\n {\n //\n\n\n\t\t\n\t\t\n }", "title": "" }, { "docid": "7cb35bf32328a0fb34f5b5e806616c76", "score": "0.62920445", "text": "public function edit(Persona $persona)\n {\n //\n }", "title": "" }, { "docid": "c7b9be65e95a63bb4d3ca83c5c35829d", "score": "0.62919945", "text": "public function editEditProfile()\n {\n $employee = _info(\\Auth::user()->id);\n return view('employee.edit-profile', compact('employee'));\n }", "title": "" }, { "docid": "9c5bf1615959bf7c8d0a53921faec5f5", "score": "0.62909704", "text": "public function edit($nickname)\n\t{\n if(Auth::check() && (Auth::user()->nickname == $nickname || Auth::user()->crew())){\n \n //$user = Auth::user();\n \n $user = User::whereNickname($nickname)->first();\n\n return View::make('users.edit', ['user' => $user])->with('nav',Page::navbar());\n }\n else{\n return Redirect::to('login');\n }\n\t}", "title": "" }, { "docid": "7b07c06334fbf1f0a27b383fc4636437", "score": "0.6288188", "text": "function edit($id) {\n $this->set('roles', $this->Session->read('roles'));\n if (!$id) {\n throw new NotFoundException(__('Invalid user'));\n }\n $userData = $this->User->findById($id);\n $this->set('user', $userData);\n if (!$userData) {\n throw new NotFoundException(__('Invalid user'));\n }\n $this->User->id = $id;\n $this->UserCompany->id = $userData['UserCompany']['id'];\n if ($this->request->is('post') || $this->request->is('put')) {\n if ($this->User->save($this->request->data['User'])) {\n if($this->Session->read('personalInfo') == 0){\n $this->request->data['UserCompany']['role_id'] = $this->request->data['UserCompany']['role_id'] + 2;\n }\n $this->UserCompany->save($this->request->data['UserCompany']);\n //$this->Session->setFlash('Your post has been updated.');\n\t\t\t\tif($this->Session->read('personalInfo') == 1){\n\t\t\t\t\t$this->Session->delete('personalInfo');\n\t\t\t\t\t$this->redirect(array('action' => 'personalinfo',$id));\n\t\t\t\t}\n $this->redirect(array('action' => 'view'));\n } else {\n $this->Session->setFlash('Unable to update your post.');\n }\n }\n if (!$this->request->data) {\n $userData['UserCompany']['role_id'] = $userData['UserCompany']['role_id']-2;\n $this->request->data = $userData;\n }\n }", "title": "" }, { "docid": "2f8b50d69028be9ca774c0dd256e29f1", "score": "0.62857145", "text": "public function edit(User $user)\n {\n\n }", "title": "" }, { "docid": "b3ed80308d32bbdbbc3ea941dce0fadc", "score": "0.6277986", "text": "public function edit(Author $author)\n {\n //\n }", "title": "" } ]
6c5ae46356f4588d51bba068880c710d
scope moved to stage
[ { "docid": "5c0deff0424b1c87b7748e64e6da43b2", "score": "0.5172013", "text": "public function scopeMovedToStage($query, $stageCode, $startDate, $endDate)\n {\n $companyId = getScopeId();\n $query->join(\n DB::raw(\"(SELECT job_id, current_stage as stage, \n\t\t\tstage_last_modified AS stage_start_date\n\t\t\tFROM job_workflow \n\t\t\tWHERE company_id = '{$companyId}'\n\t\t\tAND current_stage = '{$stageCode}'\n\t\t\tUNION ALL \n\t\t\tSELECT job_id, stage , start_date as stage_start_date\n\t\t\tFROM job_workflow_history \n\t\t\tWHERE company_id = '{$companyId}'\n\t\t\tAND stage = {$stageCode}) AS jobs_workflow\"),\n 'jobs_workflow.job_id',\n '=',\n 'jobs.id'\n );\n\n //date range where clause\n $query->where(function ($query) use ($startDate, $endDate) {\n if ($startDate) {\n $query->whereRaw(\"DATE_FORMAT(\" . buildTimeZoneConvertQuery('jobs_workflow.stage_start_date') . \", '%Y-%m-%d') >= '{$startDate}'\");\n }\n if ($endDate) {\n $query->whereRaw(\"DATE_FORMAT(\" . buildTimeZoneConvertQuery('jobs_workflow.stage_start_date') . \", '%Y-%m-%d') <= '{$endDate}'\");\n }\n });\n\n $query->orderBy('stage_start_date', 'ASC');\n }", "title": "" } ]
[ { "docid": "24455637dbd4f36043519ded51124e5d", "score": "0.5732816", "text": "public function setScopeBlock()\n {\n if( empty( $this->ngVars))\n {\n return;\n }\n\n $this->Controller->set( 'ngVars', $this->ngVars);\n }", "title": "" }, { "docid": "0e1383b034be366e0a04ff52dcb2282d", "score": "0.56526244", "text": "public function inNewScope();", "title": "" }, { "docid": "3c2f8a033319aea54b5cfa6b333bac4c", "score": "0.5476031", "text": "static function scope_stack() {\n self::logger('DEBUG','* Current scope stack:');\n foreach(static::$scope as $idx=>$scope) {\n $scopeline = $idx.' '.$scope['layout_name'].':'.$scope['line_no'];\n if(!in_array($scope['statement_type'],array('method command','layout'))) \n $scopeline .= ' <'.$scope['statement_type'].'>';\n if($scope['statement_type'] == 'method command')\n $scopeline .= ' !'.$scope['cmd'];\n $varcount = count($scope['vars']);\n if($varcount > 1) # ignore _param\n $scopeline .= ' '.($varcount-1).' variable'.($varcount>2?'s':'');\n if(!is_null($scope['if_state']))\n $scopeline .= ' if_state='.($scope['if_state']?'true':'false');\n self::logger('DEBUG',$scopeline);\n }\n }", "title": "" }, { "docid": "d8d4ac59f79fd3ed345151e428605d50", "score": "0.5405575", "text": "function Controller(){\n\t\t\t$this->stage=$GLOBALS['stage'];\n\t\t\t$this->mode=$GLOBALS['mode'];\n\t\t\t\n\t\t}", "title": "" }, { "docid": "03db52612723b8e03053c6313734d899", "score": "0.51899844", "text": "function begin($savepoint = null);", "title": "" }, { "docid": "03db52612723b8e03053c6313734d899", "score": "0.51899844", "text": "function begin($savepoint = null);", "title": "" }, { "docid": "7f879b0a1ccfc61124918f3180c4f6ab", "score": "0.51114833", "text": "protected function prepare()\n {\n $this->scope = new ScopeNode;\n }", "title": "" }, { "docid": "bf843d41542d87469abd7973b64e1c31", "score": "0.5106338", "text": "public function getScope();", "title": "" }, { "docid": "158bdb512ae40f7dc41c3cccad42a4cf", "score": "0.51060843", "text": "public function increment_scope_counter(): void\n {\n StackTraceUtil::validate_caller(ResourceFactoryInterface::class, '');\n $this->scope_counter++;\n }", "title": "" }, { "docid": "754f90df7a6bf0d9a497c0c99050aaec", "score": "0.50845385", "text": "public function scopeAttachCurrentStage($query)\n\t{\n\t\t$query->join('job_workflow as current_job_workflow', function($join) {\n\t\t\t$join->on('jobs.id', '=', 'current_job_workflow.job_id');\n\t\t\t// $join->orOn('jobs.parent_id', '=', 'current_job_workflow.job_id');\n\t\t});\n\n\t\t$query->join('workflow_stages as job_workflow_stages', function($query) {\n\t\t\t$query->on('job_workflow_stages.code', '=', 'current_job_workflow.current_stage')\n\t\t\t\t->on('job_workflow_stages.workflow_id', '=', 'jobs.workflow_id');\n\t\t});\n\n\t\t$query->addSelect(\"current_job_workflow.stage_last_modified\",\n\t\t\t\"current_job_workflow.last_stage_completed_date\",\n\t\t\t\"job_workflow_stages.name as current_stage_name\",\n\t\t\t\"job_workflow_stages.code as current_stage_code\",\n\t\t\t\"job_workflow_stages.color as current_stage_color\",\n\t\t\t\"job_workflow_stages.resource_id as current_stage_resource_id\",\n\t\t\t\"job_workflow_stages.color as current_stage_color\"\n\t\t);\n\t}", "title": "" }, { "docid": "c0ded60c914b46e87574b3a5551da106", "score": "0.50564754", "text": "public function incStackPointer() {\n\t}", "title": "" }, { "docid": "180b9847075e5145f5a6b019524a0d81", "score": "0.49906403", "text": "public function getCurrentScope();", "title": "" }, { "docid": "91744bef59648393655ae9370a9b9035", "score": "0.49730074", "text": "public function completeFlow()\n {\n\n }", "title": "" }, { "docid": "a68d95b8bca4bf935c0cc8b08d365054", "score": "0.49698156", "text": "Public function stage ( $id_sta, $lib_sta, $desc_sta, $dated_sta, $datef_sta, $comm_sta, $etat_sta, $id_ent, $id_uti, $fil_sta)\r\n\t\t\t{\r\n\t\t\t\t$this -> id_stage = $id_sta;\r\n\t\t\t\t$this -> lib_stage = $lib_sta;\r\n\t\t\t\t$this -> desc_stage = $desc_sta;\r\n \t \t\t\t$this -> dated_stage = $dated_sta;\r\n\t\t\t\t$this -> datef_stage = $datef_sta;\r\n\t\t\t\t$this -> commentaire_stage = $comm_sta;\r\n\t\t\t\t$this -> etat_stage = $etat_sta;\r\n $this -> id_ent = $id_ent;\r\n $this -> id_uti = $id_uti;\r\n $this -> fil_stage = $fil_sta;\r\n\r\n\t\t\t}", "title": "" }, { "docid": "360fbf4e75f034e25bd80494aac4822e", "score": "0.49302742", "text": "public function clearStage() {\n $this->payload = [];\n }", "title": "" }, { "docid": "ba8eac82c141f8e1690a819cf5da8738", "score": "0.49088526", "text": "Public function set_lib_stage ($lib_sta)\r\n\t\t\t{\r\n\t\t\t\t $this-> lib_stage = $lib_sta;\r\n\t\t\t}", "title": "" }, { "docid": "71b28a5a7a67ee1dffa1253b75787ab2", "score": "0.48940936", "text": "public function setAsCurrent();", "title": "" }, { "docid": "8a29b825103640c8fc7cbd3f904ebe02", "score": "0.48540822", "text": "public function get_Scope() {\n return $this->scope;\n }", "title": "" }, { "docid": "f65fd92fdf130ee01a81bd24df8fb773", "score": "0.4850092", "text": "function activate(){\r\n\r\n\t}", "title": "" }, { "docid": "a6236c93fddf3904bfe2d115fff35bdd", "score": "0.48498577", "text": "public function sysSaveCurrentReferences()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "77477e46c162362310b145e5a934be37", "score": "0.48401797", "text": "Public function get_id_stage ()\r\n\t\t\t{\r\n\t\t\t\treturn $this-> id_stage;\r\n\t\t\t}", "title": "" }, { "docid": "830328c7fa967450ae723553686fcbe2", "score": "0.4819536", "text": "public function getScope(): string;", "title": "" }, { "docid": "6e135d74041639e71d5a590fe0e02502", "score": "0.47954005", "text": "public function addStage(Stage $stage): void {\n if ($this->fixedStages) {\n throw new InvalidStateException('Cannot modify pipeline after loading data.');\n }\n $this->stages[] = $stage;\n $stage->setPipeline($this);\n }", "title": "" }, { "docid": "caae0e1ee62d1e7054e7910dd026400e", "score": "0.47953433", "text": "function save_context() {\n\tglobal $_zp_current_context, $_zp_current_context_stack;\n\tarray_push($_zp_current_context_stack,$_zp_current_context);\n}", "title": "" }, { "docid": "2398cf940d3794f0ba1b5b19a76a1298", "score": "0.47917694", "text": "abstract public function store($scope_ob);", "title": "" }, { "docid": "8293e9e3048866eb6b78a5f91579674f", "score": "0.4782147", "text": "protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)\n {\n\n }", "title": "" }, { "docid": "8293e9e3048866eb6b78a5f91579674f", "score": "0.4782147", "text": "protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)\n {\n\n }", "title": "" }, { "docid": "8293e9e3048866eb6b78a5f91579674f", "score": "0.4782147", "text": "protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)\n {\n\n }", "title": "" }, { "docid": "0ab8a36aaec988eeb7c2e4159805df67", "score": "0.47720295", "text": "public function setScope($scope);", "title": "" }, { "docid": "dd162f30969c9e01c2709fc5dbe07165", "score": "0.47680548", "text": "private function reflow() {\n\t\tif ($this->var_iters)\n\t\t\tforeach ($this->var_iters as $k=>$v) \n\t\t\t\t$this->var_iters[$k] = 0;\n\n\t\t/* Reflow all variables */\n\t\t//Profiler::start('replacing vars');\n\t\t$this->replace_vars($this->dom);\n\t\t//Profiler::end('replacing vars');\n\t}", "title": "" }, { "docid": "8f6993ac55d04782d439ad27d27ab61d", "score": "0.47533765", "text": "public function afterEnter(AState $from) {\n \n parent::afterEnter($from);\n }", "title": "" }, { "docid": "86687af31f8fe80eb929f0fd46a949ed", "score": "0.47469613", "text": "public function scope()\n {\n return $this->_scope;\n }", "title": "" }, { "docid": "4ec0a0b67654891ad913f4ae5abbd7b6", "score": "0.47428977", "text": "public function commit()\n {\n foreach ($this->entity_references_by_guid as $entity) {\n if ($entity instanceof Variable) {\n $entity->push($this->current_branch_point);\n } else {\n // @codeCoverageIgnoreStart\n if ($entity instanceof DomainObject) {\n $entity->executeDeferredMethodCalls();\n }\n // @codeCoverageIgnoreEnd\n }\n }\n }", "title": "" }, { "docid": "59fcdfd609d807d76e53571e040a168b", "score": "0.47264996", "text": "public function preAction() {}", "title": "" }, { "docid": "1cfad53e10470c16f3b6484fe5a9e40d", "score": "0.4723258", "text": "public function getRequiredScope()\n {\n return null;\n\n }", "title": "" }, { "docid": "c900b12980d067489f45c23d7fbebc38", "score": "0.47208562", "text": "function activate()\n\t{\n\t}", "title": "" }, { "docid": "74feffa16b45948031754fba2728f692", "score": "0.47116977", "text": "public function __construct(){\n\t\t$this->stack = array();\n\t}", "title": "" }, { "docid": "564e5ed35e1b5c2dc74c826b6e2f3968", "score": "0.46923187", "text": "public function getStage()\n {\n return $this->stage;\n }", "title": "" }, { "docid": "63143dce4edec72d3f52017144542ce3", "score": "0.46808192", "text": "public function set_state(){\n\n foreach( $this->kernel->params as $key => $val )\n $_SESSION[\"state\"][$this->kernel->app][$this->kernel->object][$key] = $val;\n\n }", "title": "" }, { "docid": "deb7428dc316fe7a692d47c9250e946a", "score": "0.46782887", "text": "public function setVars()\t\n\t{\n\t}", "title": "" }, { "docid": "c29c1b91667c013495862704cd767483", "score": "0.46782517", "text": "private function enter(Scope $next, $node)\n {\n $prev = $this->scope;\n $this->scope = $next;\n \n $this->scope->enter();\n \n // resolve classes, interfaces and traits first\n $this->resolve_types();\n \n $this->visit($node);\n $this->scope->leave();\n \n $this->scope = $prev;\n }", "title": "" }, { "docid": "717ffdfe1367f475d65c0551e6527579", "score": "0.46645796", "text": "abstract public function stages (): array;", "title": "" }, { "docid": "ff4858e4f122adcc02d8a7f50ffdd42e", "score": "0.46530935", "text": "function clean_up_global_scope() {\n\t\tglobal $wp_scripts, $wp_styles;\n\t\tparent::clean_up_global_scope();\n\t\t$wp_scripts = null;\n\t\t$wp_styles = null;\n\t}", "title": "" }, { "docid": "3abffcadeaef1fff3ab14b26b2a0f033", "score": "0.4636164", "text": "protected function scope()\n {\n // up\n try {\n $file = $this->position[0];\n $rank = (int)$this->position[1] + 1;\n while (Validate::square($file.$rank)) {\n $this->scope->up[] = $file . $rank;\n $rank = (int)$rank + 1;\n }\n } catch (UnknownNotationException $e) {\n\n }\n\n // down\n try {\n $file = $this->position[0];\n $rank = (int)$this->position[1] - 1;\n while (Validate::square($file.$rank)) {\n $this->scope->bottom[] = $file . $rank;\n $rank = (int)$rank - 1;\n }\n } catch (UnknownNotationException $e) {\n\n }\n\n // left\n try {\n $file = chr(ord($this->position[0]) - 1);\n $rank = (int)$this->position[1];\n while (Validate::square($file.$rank)) {\n $this->scope->left[] = $file . $rank;\n $file = chr(ord($file) - 1);\n }\n } catch (UnknownNotationException $e) {\n\n }\n\n // right\n try {\n $file = chr(ord($this->position[0]) + 1);\n $rank = (int)$this->position[1];\n while (Validate::square($file.$rank)) {\n $this->scope->right[] = $file . $rank;\n $file = chr(ord($file) + 1);\n }\n } catch (UnknownNotationException $e) {\n\n }\n }", "title": "" }, { "docid": "4d40ab3df602eaa683dc9e653d44c1af", "score": "0.4633469", "text": "public function getCurrentScope() {\n\t\t$e = end($this->state);\n\n\t\treturn $e[1];\n\t}", "title": "" }, { "docid": "e3f4fc24cff674935a78170126c511b1", "score": "0.46221697", "text": "public function activate() {}", "title": "" }, { "docid": "b539801a75a38389c03d91460bd6d164", "score": "0.46184048", "text": "public abstract function getInitialStage(): string;", "title": "" }, { "docid": "ff810f80f1525671c917e7b2b01226e9", "score": "0.46006092", "text": "protected function _afterModify()\r\n\t{}", "title": "" }, { "docid": "a85a98e83e8c097b8eec2e26acde816b", "score": "0.45909107", "text": "private function initCurrent() {\n if (isset($_SESSION[$this->ss_name]['current'])){\n $this->arCurrent = $_SESSION[$this->ss_name]['current'];\n $this->arCurrent = $this->arrItems[$this->getCurrentId()];\n } $_SESSION[$this->ss_name]['current'] = $this->arCurrent;\n }", "title": "" }, { "docid": "a0798a17ac6fa33b00a082a7b2e9e3cc", "score": "0.4582687", "text": "public function edit(Stage $stage)\n {\n //\n }", "title": "" }, { "docid": "f591b0d5af12a3a1b7c08ce65a7431b0", "score": "0.4573574", "text": "function createname()\r\n{\r\n $name = \"Rifky\"; //local scope\r\n}", "title": "" }, { "docid": "73e88cf4b1d2582d65430c0d45f38b39", "score": "0.45725718", "text": "public function active();", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.4565469", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.4565469", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.4565469", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "53680a690b420c6e244362fefe108c7b", "score": "0.4565469", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t}", "title": "" }, { "docid": "5579451b7720de915070d0e0c4e7445f", "score": "0.4562691", "text": "public static function activate(){\r\n\r\n }", "title": "" }, { "docid": "24b1560859c4ff8b6d5894c49ca9ec9f", "score": "0.45603266", "text": "function rewind() {\n reset($this->stack);\n }", "title": "" }, { "docid": "e789671b5ebb4657bfdf364be5d969a7", "score": "0.45490044", "text": "private function resetStack()\n\t{\n\t\t$this->container->platform->setSessionVar('cleantmp_stack', '', 'admintools');\n\t\t\n\t\t$this->folderStack = array();\n\t\t$this->filesStack = array();\n\t\t$this->totalFolders = 0;\n\t\t$this->doneFolders = 0;\n\t}", "title": "" }, { "docid": "eafb65c44c4a99f793721b30766889bf", "score": "0.4547662", "text": "public function begin(){}", "title": "" }, { "docid": "9c093776ba6e4ac3c91c431f3a0a7921", "score": "0.4545605", "text": "public function activate(){\n\n\t}", "title": "" }, { "docid": "cd07aff3ca66bcd3c6571dcc3f66cdce", "score": "0.45363727", "text": "function assignVariables(){\r\n \r\n }", "title": "" }, { "docid": "bd0e75315f55414d9edc716a587c90c0", "score": "0.45333472", "text": "public function popDefs () {}", "title": "" }, { "docid": "ae87bb3ebc9222fdb697cb04b3602999", "score": "0.45250952", "text": "protected function _pre() { }", "title": "" }, { "docid": "740c6f1745a6cfe0ce6941cbb19121da", "score": "0.45215654", "text": "public static function activate(){\n }", "title": "" }, { "docid": "754dcc6d8061ec1dd845326f32bcc16f", "score": "0.45206493", "text": "public function activate() {\r\n\r\n\t}", "title": "" }, { "docid": "cf691413dd693fde056b75c9ed45ca6a", "score": "0.45188966", "text": "public function activate();", "title": "" }, { "docid": "fdf6493c9b27bfc9a7f18fd3260a2d7d", "score": "0.45175657", "text": "public function pushDefs () {}", "title": "" }, { "docid": "96aa8964459a64e4c557a3e62cb4dfec", "score": "0.45171142", "text": "public function getScope()\n {\n return $this->_scope;\n }", "title": "" }, { "docid": "96aa8964459a64e4c557a3e62cb4dfec", "score": "0.45171142", "text": "public function getScope()\n {\n return $this->_scope;\n }", "title": "" }, { "docid": "6c4bcc6898cbcaae91f79996800b7909", "score": "0.45169184", "text": "public function setStage($stage)\n {\n $this->stage = $stage;\n\n return $this;\n }", "title": "" }, { "docid": "2a8eb9fffa1f4d3c4c6cc2f919b2f4ff", "score": "0.4514412", "text": "abstract public function activate();", "title": "" }, { "docid": "691dc834dc2c7dfa286079737444cf1b", "score": "0.45143095", "text": "private function getFirstStage(){\n \t$query = (new Stage)->newQuery();\n \t$query = $query->where('position',0);\n \treturn $query->first();\n }", "title": "" }, { "docid": "fdb1a499bf5ab4992d5661888325778d", "score": "0.45124802", "text": "private function saveCurrentShape()\n\t{\n\t\t$this->settings->currentShape = $this->currentShape;\n\t}", "title": "" }, { "docid": "a435a162ad51a367349078ba9884f762", "score": "0.44910145", "text": "public function set_Scope($scope_in) {\n $this->scope = $scope_in;\n }", "title": "" }, { "docid": "a9a01251cb48490eae2b5c972d42a630", "score": "0.44836146", "text": "public function activate() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9e701a4a0dd00d0fd5ea37214c8d740b", "score": "0.44710743", "text": "public function preExecute() {}", "title": "" }, { "docid": "987bb3c1792c92bf547491761c96b86c", "score": "0.44708788", "text": "public function current () {}", "title": "" }, { "docid": "4152f1906e98c28e261246e481e9eb77", "score": "0.44618112", "text": "public function activate(): void;", "title": "" }, { "docid": "0019e2a11f67987ac0b350206968101b", "score": "0.4461197", "text": "function clean_up_global_scope() {\n\t\tglobal $wp_customize;\n\t\t$wp_customize = null;\n\t\tparent::clean_up_global_scope();\n\t}", "title": "" }, { "docid": "f6fffe68db90919f3b09095fa05f0eb5", "score": "0.44554394", "text": "public function addStage(Stage $stage);", "title": "" }, { "docid": "afd67cf8c560f11393e4b2aa5218cad5", "score": "0.4449913", "text": "protected function _afterControllerGet()\n\t{\n\t\tif ( $this->_mixer->isIdentifiable() ) \n\t\t{\t\t\t\n\t\t\t$scope = $this->_mixer->getIdentifier()->package.'.'.$this->_mixer->getIdentifier()->name;\n\t\t\t$scope = $this->getService('com://site/search.domain.entityset.scope')->find($scope);\n\t\t\tif ( $scope ) {\n\t\t\t $this->getService()->set('mod://site/search.scope', $scope);\n\t\t\t}\n\t\t\t\n\t\t\t$item = $this->_mixer->getItem();\n\t\t\tif ( $item && $item->persisted() &&\n\t\t\t $item->inherits('ComActorsDomainEntityActor') )\n\t\t\t{\n\t\t\t $this->getService()->set('mod://site/search.owner', $item);\n\t\t\t $this->getService()->set('mod://site/search.scope', null);\n\t\t\t}\n\t\t\telse if ( $this->getRepository()->isOwnable() && $this->actor ) {\n\t\t\t $this->getService()->set('mod://site/search.owner', $this->actor);\n\t\t\t}\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "aec0523309a2aa25ab51c8e3df804499", "score": "0.44437128", "text": "private function step_super_stickies()\n {\n }", "title": "" }, { "docid": "eed542e2c396b78146c3e28952073d0a", "score": "0.44390428", "text": "public function resetStage(): bool\n\t{\n\t\t$queryParams = [\n\t\t\t'select' => ['ID'],\n\t\t\t'filter' => ['=ENTITY_ID' => $this->getEntityId(), '=WORKFLOW_CODE' => static::getWorkflowCode()],\n\t\t\t'order' => ['ID' => 'DESC'],\n\t\t];\n\n\t\t$row = EntityStageTable::getList($queryParams)->fetch();\n\t\tif ($row)\n\t\t{\n\t\t\treturn EntityStageTable::delete($row['ID'])->isSuccess();\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "90d01cf0ed065df7b548ce8ea02b5fe4", "score": "0.44347528", "text": "public function enter(): void\n {\n }", "title": "" }, { "docid": "2eb53457d51a154e85c924e7dec70ee8", "score": "0.44336104", "text": "public function scope($scope);", "title": "" }, { "docid": "4cc988b8d5048e331d44e607c937d61f", "score": "0.44251058", "text": "public function useTokenScope(): void;", "title": "" }, { "docid": "fe43caefc85e9f805b1d1572d5a636a5", "score": "0.4419523", "text": "public function preAction() {\n\t\t//\n\t}", "title": "" }, { "docid": "56747aecd304664de1acc8855176ba34", "score": "0.44168794", "text": "public function completeScope(): HistoricActivityInstanceQueryInterface;", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.44096255", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.44096255", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.44096255", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.44096255", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.44096255", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "f04744f77c80564b3454cbfb2e917d66", "score": "0.44046366", "text": "public function setup_globals()\n {\n }", "title": "" }, { "docid": "f04744f77c80564b3454cbfb2e917d66", "score": "0.44046366", "text": "public function setup_globals()\n {\n }", "title": "" }, { "docid": "f04744f77c80564b3454cbfb2e917d66", "score": "0.44046366", "text": "public function setup_globals()\n {\n }", "title": "" }, { "docid": "f04744f77c80564b3454cbfb2e917d66", "score": "0.44046366", "text": "public function setup_globals()\n {\n }", "title": "" }, { "docid": "f04744f77c80564b3454cbfb2e917d66", "score": "0.44046366", "text": "public function setup_globals()\n {\n }", "title": "" }, { "docid": "f04744f77c80564b3454cbfb2e917d66", "score": "0.44046366", "text": "public function setup_globals()\n {\n }", "title": "" } ]
4bca13db4571d2d935b0aaba906f4001
Fusionne avec un autre Name.
[ { "docid": "18ea7478805ddda49dffe2ab68d2b9a8", "score": "0.0", "text": "protected function mergeName(Name $other): void // pas final, surchargée dans Mapping\n {\n if ($other->getName() !== $this->name) {\n throw new InvalidArgumentException(sprintf(\n 'name mismatch (%s vs %s)',\n var_export($other->getName(), true),\n var_export($this->name, true)\n ));\n }\n }", "title": "" } ]
[ { "docid": "3b384331996eed4994f2faa64ea32f1a", "score": "0.62185055", "text": "public function getUniqueName();", "title": "" }, { "docid": "8adfe764b7d1679f731cc8439ae8191f", "score": "0.6167212", "text": "function ajaxSuggestUserName() {\n $username = $this->requestPtr->getProperty('depusername');\n $existuser = $this->ladeLeitWartePtr->allUsersPtr->getFromUserName($username);\n if (!empty($existuser)) {\n $cnt = 1;\n while (!empty($existuser)) {\n\n $existuser = $this->ladeLeitWartePtr->allUsersPtr->getFromUserName($username . $cnt);\n $cnt++;\n }\n $cnt--;\n $username .= $cnt;\n }\n\n echo $username;\n exit(0);\n }", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.61294675", "text": "public function get_name();", "title": "" }, { "docid": "30b4e9689bb94cdbd4e5968fe7731366", "score": "0.6083368", "text": "protected function getNameInput()\n {\n return studly_case(parent::getNameInput());\n }", "title": "" }, { "docid": "ad1e33c725b9200c689f8701947ed1c0", "score": "0.6079653", "text": "public function nameLastSubscribe()\n {\n $sth = Database::getInstance()->query('SELECT username FROM users ORDER BY id DESC LIMIT 1');\n if ($sth->execute()) {\n $count = $sth->fetch(PDO::FETCH_OBJ);\n if ($count) {\n $this->nameLastSubscribe = $count->username;\n }\n }\n }", "title": "" }, { "docid": "b2f050729777c23d6f7a8ca6706c609d", "score": "0.6077611", "text": "protected function generateName()\n {\n if (!$this->name) {\n $this->attributes['name'] = md5(uniqid(microtime(true), true));\n }\n }", "title": "" }, { "docid": "3c48ebe7848b8a5edb4aed2d50fbc9dc", "score": "0.60652024", "text": "public function getRealName()\n {\n // TODO: Implement getRealName() method.\n }", "title": "" }, { "docid": "1fa58f5d100f2b0b072035445f2eb4ff", "score": "0.6045379", "text": "function setName() {\n\t\tif (in_array('name', explode(',', $this->fieldList)) && !in_array('name', t3lib_div::trimExplode(',', $this->conf[$this->cmdKey.'.']['fields'], 1)) ) {\n\t\t\t$this->dataArr['name'] = trim(trim($this->dataArr['first_name']).' '.trim($this->dataArr['last_name']));\n\t\t}\n\t}", "title": "" }, { "docid": "b52d2daef9694cb99e8d6b8c4bb31432", "score": "0.60301715", "text": "function getFirstname();", "title": "" }, { "docid": "86c704f0458df5741f594a5cc8ce8d81", "score": "0.6011762", "text": "private function _saveName()\n\t {\n\t\tif (isset($this->_advert->phone) === true && isset($this->_advert->name) === true)\n\t\t {\n\t\t\t$hash = sha1(mb_strtoupper($this->_advert->name) . $this->_advert->phone);\n\n\t\t\tif ($this->_exists(\"names\", $hash) === false && mb_strtoupper($this->_advert->name) !== \"НЕ УКАЗАНО\")\n\t\t\t {\n\t\t\t\t$this->_db->exec(\"INSERT INTO `names` SET \" .\n\t\t\t\t \"`hash` = '\" . $hash . \"', \" .\n\t\t\t\t \"`name` = '\" . mb_strtoupper($this->_advert->name) . \"', \" .\n\t\t\t\t \"`phone` = '\" . $this->_advert->phone . \"'\"\n\t\t\t\t);\n\t\t\t } //end if\n\n\t\t } //end if\n\n\t }", "title": "" }, { "docid": "d63a0aa84a39a41e15f0603ab4c146de", "score": "0.5985086", "text": "public function name();", "title": "" }, { "docid": "d63a0aa84a39a41e15f0603ab4c146de", "score": "0.5985086", "text": "public function name();", "title": "" }, { "docid": "d63a0aa84a39a41e15f0603ab4c146de", "score": "0.5985086", "text": "public function name();", "title": "" }, { "docid": "d63a0aa84a39a41e15f0603ab4c146de", "score": "0.5985086", "text": "public function name();", "title": "" }, { "docid": "d63a0aa84a39a41e15f0603ab4c146de", "score": "0.5985086", "text": "public function name();", "title": "" }, { "docid": "d63a0aa84a39a41e15f0603ab4c146de", "score": "0.5985086", "text": "public function name();", "title": "" }, { "docid": "d63a0aa84a39a41e15f0603ab4c146de", "score": "0.5985086", "text": "public function name();", "title": "" }, { "docid": "4efd630a2437da4dc21a755105819786", "score": "0.5976383", "text": "function ajax_name()\r\n\t\t{\r\n\t\t\t$match = $this->Physician->field('name', array('physician_number' => $this->params['form']['physician_number']));\r\n\t\t\t$this->set('output', $match !== false ? $match : '');\r\n\t\t}", "title": "" }, { "docid": "ca584642c2a5874a01aaa1d0b37a1dce", "score": "0.5953926", "text": "function name() {\n\t\treturn get_the_author_meta( 'display_name', $this->_user_id );\n\t}", "title": "" }, { "docid": "6021d182b23f6f167966e664673072c5", "score": "0.5948844", "text": "public function getCompleteNameWithUsername()\n {\n return api_get_person_name($this->firstname, $this->lastname).' ('.$this->username.')';\n }", "title": "" }, { "docid": "5573f0f95cdf25cf42cc8b6296cd60db", "score": "0.59459573", "text": "public function getUniqueName(): string;", "title": "" }, { "docid": "73b8eb4bc10327d58d9716e0fe247b57", "score": "0.5945091", "text": "public abstract function get_name();", "title": "" }, { "docid": "cdda0f26e448066b33c8514a9f3e7bd5", "score": "0.5941499", "text": "public function getHumanName();", "title": "" }, { "docid": "8073d393d75cf2c23e18560694b0fc06", "score": "0.5916923", "text": "public function getFriendlyName();", "title": "" }, { "docid": "e67ee4b98629f067e3517c3f48f9c8b4", "score": "0.5904006", "text": "private function _setSluggedName()\n {\n $this->_addCompileData('slugged_name', str_slug($this->getName()));\n }", "title": "" }, { "docid": "e24984dce734822bae8d065c4e2bbda1", "score": "0.5899346", "text": "public function displayname()\n {\n # code...\n }", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.58892787", "text": "abstract public function get_name();", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.58892787", "text": "abstract public function get_name();", "title": "" }, { "docid": "1b50adc0b3ca57ffb87d6e019e61c6bc", "score": "0.58887285", "text": "public function getFullname() {\r\n\t\t\t\t\t\treturn $this->getUsr_firstname() . \" \" . $this->getUsr_lastname();\r\n\t\t\t\t\t}", "title": "" }, { "docid": "2899de776d19fa12e3922caec15c0460", "score": "0.58735025", "text": "function full_name()\n {\n $user = sentinel()->getUser();\n if(is_null($user)) {\n return null;\n }\n $full_name = ($user->first_name && $user->last_name) ? \"{$user->first_name} {$user->last_name}\" : $user->nickname;\n return ucwords($full_name);\n }", "title": "" }, { "docid": "db525a58193254ece6613620f07827c7", "score": "0.58723384", "text": "function get_name() {\n return $this->fullname;\n }", "title": "" }, { "docid": "8af8422a74ccf48e9e47a411989b995d", "score": "0.5869858", "text": "private function addFullName() {\n\t\t$fullNameOpts = array(\n \t\t\t\t'required'=>true,\n\t\t\t\t\t\t\t\t'allowEmpty'=>false,\n \t\t\t\t'label'=>'fullName',\n\t\t\t\t\t\t\t\t'belongsTo'=>'occupants',\n \t\t\t\t'validators' => array( array('stringLength', true, array(1, 250) )\t)\n\t\t);\n\t\t$this->addElement('text' ,'name',$fullNameOpts);\n\t\t$this->getElement('name')->setAttrib('class','inputAccesible');\n\t}", "title": "" }, { "docid": "740191540dd8a6424ab6c4de64decaab", "score": "0.5850703", "text": "private function get_name() {\n\t\t\t$full_name = $this->firstname . \" \" . $this->lastname;\n\t\t\treturn $full_name;\n\t\t}", "title": "" }, { "docid": "246f85cf9d9de4b8e3fd3b0ba0213f15", "score": "0.5842075", "text": "public function getNameUser(){\n return $this->name_user;\n }", "title": "" }, { "docid": "bb567d49cf900e3f2e2d9a3492a04524", "score": "0.5833319", "text": "public function getName( );", "title": "" }, { "docid": "d1378d0683878e5709d4863e4034ef74", "score": "0.5829929", "text": "public function simpleName() { }", "title": "" }, { "docid": "d29a3ee19185f20d05a846940004d0d3", "score": "0.58065295", "text": "public function GetName ();", "title": "" }, { "docid": "aeb33f34f77685ee2e008fe652072bd8", "score": "0.57986134", "text": "public function getName(){\n\t\tif ($this->nome!=\"\" && isset($this->nome)){\n\t\t\treturn $this->nome;\n\t\t}\n\t}", "title": "" }, { "docid": "804b104f38c6ea49ea6fb53642102ddd", "score": "0.5798062", "text": "protected function set_name( $a )\t\t\r\n\t\t{ \r\n\t\t\treturn $this->name->value = trim( stripslashes( $a ) ); \r\n\t\t}", "title": "" }, { "docid": "10939ef44e52f8ed9e95715333d68651", "score": "0.5795003", "text": "abstract public function getHumanName();", "title": "" }, { "docid": "5d0c034b0a46437c1a6a6dc62cd6045b", "score": "0.5792106", "text": "function getnameperfilactual(){\n\t\t$dataperfil = $this->getuserdataperfil();\n\t\t$nombre =\"\";\t\t\n\t\tforeach ($dataperfil as $row) {\t\t\t\n\t\t\t$nombre = $row[\"nombreperfil\"];\n\t\t}\n\t\treturn $nombre;\n\t}", "title": "" }, { "docid": "d17e1e8533ab357fc9eee6cec93cd4ab", "score": "0.5792065", "text": "private function getFullname() {\n if ($this->fullname === null and $this->id != self::ID_NEW) {\n $sql = \"SELECT `first_name`, `last_name` FROM `users`\n WHERE `id` = {$this->creator}\";\n $res = mysql_query($sql);\n $row = mysql_fetch_row($res);\n $this->fullname = \"$row[0] $row[1]\";\n }\n return $this->fullname;\n }", "title": "" }, { "docid": "0a5b35c9bbb3c9c52898ae4137ccb462", "score": "0.57909787", "text": "function set_name($name) {\r\n\t\t$name = preg_replace('~\\s+~', '_', strtolower($name));\r\n\r\n\t\tif ( $this->name_prefix && strpos($name, $this->name_prefix) !== 0 ) {\r\n\t\t\t$name = $this->name_prefix . $name;\r\n\t\t}\r\n\r\n\t\t$this->name = $name;\r\n\t}", "title": "" }, { "docid": "cc314eabf6691df77e65d8c0be20c2c7", "score": "0.57880485", "text": "function getName();", "title": "" }, { "docid": "33478dc13d9b2b9f242c51b1f7159b40", "score": "0.5780915", "text": "function GetNameUser($temp)\n\t{\n\t\t$this->CI=&get_instance();\n\t\tif(!empty($temp))\n\t\t{\n\t\t\t$query = $this->CI->db->get_where($this->admin,array(\"Username\" => $temp));\n\t\t\t$Name = $query->row()->FullName;\n\t\t\tif(!empty($Name))\n\t\t\t{\n\t\t\t\treturn $Name;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "d22ac3cf1d8a55fd44b9426bb8143e57", "score": "0.57808626", "text": "public function getCompleteName()\n {\n return $this->getApellido() .' ' .$this->getNombres();\n }", "title": "" }, { "docid": "8d9d29389d3d1a71f4041cbaa6aee1b6", "score": "0.5780148", "text": "public function getName()\n {\n return 'personne';\n }", "title": "" }, { "docid": "01237d73d466fbaf89c8fb27b293ec51", "score": "0.5779081", "text": "public function getNameId()\n {\n return $this->auth->getNameId();\n }", "title": "" }, { "docid": "883903eb831c7952a28e278cfea5fec6", "score": "0.5770488", "text": "public function getRealName()\n {\n return $this->name;\n }", "title": "" }, { "docid": "faa25a9a5858cef6f05af21314dd4031", "score": "0.57642406", "text": "public function name($full = false);", "title": "" }, { "docid": "d679dfa001f158808ade4d2f2631d309", "score": "0.57528347", "text": "public function name() { }", "title": "" }, { "docid": "c2e6b42cdee3eec33c16baad15f3252f", "score": "0.5748659", "text": "static function makeFriendlier($name){\n \n $name = str_replace(\"-\", \"_\", $name);\n $name = str_replace(\"/\", \"_\", $name);\n $name = str_replace(\"-\", \"_\", $name);\n \n \n $name = str_replace(\"a\", \"_\", $name);\n $name = str_replace(\"e\", \"_\", $name);\n $name = str_replace(\"i\", \"_\", $name);\n $name = str_replace(\"o\", \"_\", $name);\n $name = str_replace(\"u\", \"_\", $name);\n $name = str_replace(\"ñ\", \"_\", $name);\n \n return $name;\n }", "title": "" }, { "docid": "dc08ee4cf553d52e1abe03ff4867d1f4", "score": "0.5743051", "text": "public function getOrgaName();", "title": "" }, { "docid": "ec999f84ae8ccffd6f497e5100434b91", "score": "0.5741214", "text": "public function getName()\n {\n return 'fernando';\n }", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "1657393778c69e5ee8756ce5b0b9ef74", "score": "0.57398325", "text": "public function getName() {}", "title": "" }, { "docid": "33d637a7d6078d6871efdf36cd8d7223", "score": "0.5737731", "text": "private function loadUserName()\n {\n /*if ( $this->Cache->exists('users/name/'.$this->uid) )\n $this->name = $this->Cache->get('users/name/'.$this->uid);\n else*/\n $this->name = $this->getUserName();\n }", "title": "" }, { "docid": "421260ea26a813dbda4a986b40c9a60c", "score": "0.5729405", "text": "public function generate_user_name($idPersona){\n\t\t$data = $this->Usuario_model->generate_user_name($idPersona);\n\t\tforeach($data as $obj){\n\t\t\t$param = strtolower(substr(trim($obj['nombres']), 0,1)).strtolower(trim($obj['apellidoPaterno']));\n\t\t}\n\t\techo $param;\n\t}", "title": "" }, { "docid": "db2ac270d9a4f190239ef87f896d053c", "score": "0.5729305", "text": "public function __construct($nom){\n\n $this->setName($nom);\n\n }", "title": "" }, { "docid": "95b82aeec2faf31019de73d0639fc77e", "score": "0.5726353", "text": "abstract protected function name();", "title": "" }, { "docid": "dc8239a1f9afabcd427dfe568042cb08", "score": "0.57253027", "text": "function goxeedmodule_username_alter (&$name, $account)\n{\n $account = goxeedmodule_user_secure_load ($account->uid);\n $items_first_name = goxeedmodule_field_secure_get_items (\"user\", $account, \"field_goxeed_first_name\");\t\t\t\t// Get the first name items\n $items_last_name = goxeedmodule_field_secure_get_items (\"user\", $account, \"field_goxeed_last_name\");\t\t\t\t// Get the last name items\n $user_name = $items_first_name[0][\"value\"] . \" \" .$items_last_name[0][\"value\"];\t\t// Combine first and last name\n if (strlen($user_name)>1) $name = $user_name;\t\t\t\t\t\t\t\t\t\t\t// If the name exists, use it instead of the the Drupal user name\n}", "title": "" }, { "docid": "bfb3aa5ab9b8e848ce6b65e5e1d34611", "score": "0.572409", "text": "function getName(){\n\t\tif($this->name==\"\") {\n\t\t\t$this->obtainName();\n\t\t}\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a327713b89a4511a00a854fd2e7b2683", "score": "0.57145387", "text": "public function getUtenteNomepersonaAttribute(){\n return strtolower($this->attributes['cognome']).' '.strtolower($this->attributes['nome']);\n }", "title": "" }, { "docid": "54793fb594896850a90fdd4d3bf5ce93", "score": "0.570287", "text": "public function getName(){\n return $this->username;\n }", "title": "" }, { "docid": "6c62b7c6688f05ec7f4e4de1caf14616", "score": "0.5698193", "text": "public function getName()\n {\n return \"oootpatang\";\n }", "title": "" }, { "docid": "fd4f9308a3889e77d7c8734883d507ab", "score": "0.5696514", "text": "function get_name() {\r\n\t\treturn $this->name;\r\n\t}", "title": "" }, { "docid": "cf9b7868308c938f9a575a5749dcca98", "score": "0.5696284", "text": "function GetFname($id){\n\t}", "title": "" }, { "docid": "c7a23964d588271c6dc551156e169224", "score": "0.56784916", "text": "public function setName($name){\n\t\t$this->_mName = $name;\n\t\tString::validateString($name, 'Nombre inv&aacute;lido.');\n\t}", "title": "" }, { "docid": "1e2aeb0db005a12a0c7d59e5cf2c1c68", "score": "0.56781745", "text": "public function setRandomName() {\n $this->user_name = self::$_sUserNamePrefix . hash('crc32b', time() . rand(0, 666) . getmypid());\n }", "title": "" }, { "docid": "5c57b91560beffe216d9431ce9d942c2", "score": "0.56716686", "text": "public function getNom();", "title": "" }, { "docid": "97b5f3e2b645059f317556b550c7c32b", "score": "0.56716007", "text": "abstract public function name();", "title": "" }, { "docid": "d5a6fdd830904593c088b7f4e33609d1", "score": "0.56700504", "text": "public function display() {\n\t\t\techo \"Full Name is: \".UserData::NAME;\n\t\t}", "title": "" }, { "docid": "514b3f7888364834f275dfabbdf5fddd", "score": "0.56664264", "text": "function realName($username, $first = null, $last = null) { \n\t\tif($first && $last) {\n\t\t\t$name = ucfirst($first).' '.ucfirst($last);\n\t\t} elseif($first) {\n\t\t\t$name = ucfirst($first);\n\t\t} elseif($last) {\n\t\t\t$name = ucfirst($last);\n\t\t} else {\n\t\t\t$name = ucfirst($username);\n\t\t}\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "c1dd7de2d2fe650fd27cc183a71f24a5", "score": "0.5665922", "text": "public function getRealname()\n {\n return $this->realname;\n }", "title": "" }, { "docid": "53d522c10920b89787865a3989b5d369", "score": "0.5663911", "text": "public function Upload_File_Generate_Name()\n {\n $new_name = date(H_i_s_) . md5($this->up_file_name . uniqid());\n $this->up_file_new_name = $new_name;\n }", "title": "" }, { "docid": "b16724787d259e09a1bb75ce2a623955", "score": "0.56622154", "text": "public function CercadaNomeGratis()\n {\n $view = new VRicerca();\n $nome = $view->getNomericerca();\n $controller = new CGestioneEvento();\n $eventi = $controller->CercadaNomeGratis($nome);\n $view2 = new VAmministratore();\n $view2->GestioneEventi($eventi);\n }", "title": "" }, { "docid": "e1ecd8872535a989d0db88e4b8a0daa3", "score": "0.56621206", "text": "public function getName(): string\n {\n return 'ZarinPal';\n }", "title": "" }, { "docid": "234cdcfa9cf39437402ad6819a9be88b", "score": "0.56612813", "text": "public function getName();", "title": "" }, { "docid": "234cdcfa9cf39437402ad6819a9be88b", "score": "0.56612813", "text": "public function getName();", "title": "" }, { "docid": "234cdcfa9cf39437402ad6819a9be88b", "score": "0.56612813", "text": "public function getName();", "title": "" }, { "docid": "234cdcfa9cf39437402ad6819a9be88b", "score": "0.56612813", "text": "public function getName();", "title": "" }, { "docid": "234cdcfa9cf39437402ad6819a9be88b", "score": "0.56612813", "text": "public function getName();", "title": "" }, { "docid": "234cdcfa9cf39437402ad6819a9be88b", "score": "0.56612813", "text": "public function getName();", "title": "" }, { "docid": "234cdcfa9cf39437402ad6819a9be88b", "score": "0.56612813", "text": "public function getName();", "title": "" }, { "docid": "234cdcfa9cf39437402ad6819a9be88b", "score": "0.56612813", "text": "public function getName();", "title": "" } ]
7d21c7b3e1d44aa0b90080ebb286c12d
Get the project environment instance.
[ { "docid": "9640b6dada51320ddd930f6a4a2b80f6", "score": "0.7229936", "text": "protected function getEnvironmentInstance(): EnvironmentTypeInterface\n {\n return PxApp::getEnvironmentInstance();\n }", "title": "" } ]
[ { "docid": "9c6789b5a35e17aadb39fd55d1e77995", "score": "0.8030482", "text": "public static function get()\n {\n if (! self::$envInstance) {\n self::load();\n }\n\n return self::$envInstance;\n }", "title": "" }, { "docid": "97b2ae9cbaa7a47d2be2658171b134a4", "score": "0.7397441", "text": "public static function get_environment()\n {\n return self::environment;\n }", "title": "" }, { "docid": "4aa9a6ccdad5ee2ecc307130e3272921", "score": "0.72398967", "text": "public function getEnvironment() {\n return $this->env;\n }", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.71368206", "text": "public function getEnvironment();", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.71368206", "text": "public function getEnvironment();", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.71368206", "text": "public function getEnvironment();", "title": "" }, { "docid": "f688d9230d0700bb6ebe9a7fdb067fed", "score": "0.7093024", "text": "public function getEnvironment()\n {\n return $this->environment;\n }", "title": "" }, { "docid": "f688d9230d0700bb6ebe9a7fdb067fed", "score": "0.7093024", "text": "public function getEnvironment()\n {\n return $this->environment;\n }", "title": "" }, { "docid": "f688d9230d0700bb6ebe9a7fdb067fed", "score": "0.7093024", "text": "public function getEnvironment()\n {\n return $this->environment;\n }", "title": "" }, { "docid": "f688d9230d0700bb6ebe9a7fdb067fed", "score": "0.7093024", "text": "public function getEnvironment()\n {\n return $this->environment;\n }", "title": "" }, { "docid": "f688d9230d0700bb6ebe9a7fdb067fed", "score": "0.7093024", "text": "public function getEnvironment()\n {\n return $this->environment;\n }", "title": "" }, { "docid": "f688d9230d0700bb6ebe9a7fdb067fed", "score": "0.7093024", "text": "public function getEnvironment()\n {\n return $this->environment;\n }", "title": "" }, { "docid": "f688d9230d0700bb6ebe9a7fdb067fed", "score": "0.7093024", "text": "public function getEnvironment()\n {\n return $this->environment;\n }", "title": "" }, { "docid": "f688d9230d0700bb6ebe9a7fdb067fed", "score": "0.7093024", "text": "public function getEnvironment()\n {\n return $this->environment;\n }", "title": "" }, { "docid": "31beb2905fcd4a9d1738b35268f1298d", "score": "0.7016031", "text": "public function getEnvironment() {}", "title": "" }, { "docid": "2effb2020cbecbe747b6e0ab1f3a1e0c", "score": "0.6949719", "text": "public function Env()\n {\n return $this->_env;\n }", "title": "" }, { "docid": "722a25a8121ae2fc03244cb914617000", "score": "0.69079053", "text": "public function getEnvironment ()\n {\n if (!empty($this->environment)) {\n return $this->environment;\n }\n\n $config = static::loadConfig();\n\n $envs = array();\n\n if (isset($config['environments']) && is_array($config['environments'])) {\n $envs = $config['environments'];\n }\n\n $defaults = array(\n 'name' => '-unidentified environment-',\n 'branch' => 'develop',\n 'auto_commit_and_push' => true,\n 'remote' => 'origin',\n 'partitions' => array(\n 'modResource' => 'content',\n 'modTemplate' => 'templates',\n 'modCategory' => 'categories',\n 'modTemplateVar' => 'template_variables',\n 'modChunk' => 'chunks',\n 'modSnippet' => 'snippets',\n 'modPlugin' => 'plugins'\n )\n );\n\n if (isset($envs['defaults']) && is_array($envs['defaults'])) {\n $defaults = array_merge($defaults, $envs['defaults']);\n }\n\n $host = (isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : MODX_HTTP_HOST;\n if (substr($host, 0, 4) == 'www.') {\n $host = substr($host, 4);\n }\n\n $environment = (isset($envs[$host])) ? $envs[$host] : array();\n $environment = array_merge($defaults, $environment);\n $this->environment = $environment;\n return $environment;\n }", "title": "" }, { "docid": "317d8ad6f08b497c4c334c18b685af49", "score": "0.68989426", "text": "public function get_env()\n\t{\n\t\treturn $this->env;\n\t}", "title": "" }, { "docid": "c3043d4a55876dad158877b2333d9cec", "score": "0.6867071", "text": "public function getEnvironment(){\n return $this->environment;\n }", "title": "" }, { "docid": "d30894cce231830a8e091173b914c4d0", "score": "0.6844242", "text": "public function getActiveEnvironment() : EnvironmentInterface;", "title": "" }, { "docid": "e6b18e3a21432a2a12d4ff364e3d977f", "score": "0.66780186", "text": "public static function getInstance() {\n\t\tif (!isset($GLOBALS['PROJECT_INSTANCE']) || !($GLOBALS['PROJECT_INSTANCE'] instanceof Project)) {\n\t\t\t$c = __CLASS__;\n\t\t\t$GLOBALS['PROJECT_INSTANCE'] = new $c;\n\t\t}\n\t\treturn $GLOBALS['PROJECT_INSTANCE'];\n\t}", "title": "" }, { "docid": "9290c5d24ee2a1d1a58e8d53fd78c2d0", "score": "0.66607773", "text": "public function getEnv()\n {\n return $this->env;\n }", "title": "" }, { "docid": "96abe835192efc65e443b979cf85adba", "score": "0.66239893", "text": "public static function getEnvironment()\n {\n return static::$instance->config[static::CFG_ENVIRONMENT];\n }", "title": "" }, { "docid": "9d2da986aee36eddb72403377d1c333c", "score": "0.65925443", "text": "public function environment()\n {\n // TODO: Implement environment() method.\n }", "title": "" }, { "docid": "6358a94935c737e1c64d80f208ad83d1", "score": "0.65446997", "text": "public function getEnvironment()\n {\n return $this->getParam(ClassLoaderKeys::ENVIRONMENT);\n }", "title": "" }, { "docid": "2c075d98a6b1f801a4829efb7a121975", "score": "0.6522364", "text": "public function getProject()\n {\n return $this->getContext()->getProject();\n }", "title": "" }, { "docid": "8ce5ee0feecc398b6cca531dc7400d95", "score": "0.6517041", "text": "public static function environment()\n {\n return new SandboxEnvironment(self::$client_id,self::$clientSecret);\n }", "title": "" }, { "docid": "0ba0c979df286695ef1ac7a9d6d5bca6", "score": "0.64742285", "text": "public static function environment()\n {\n $payConfig = Config::get('pagos');\n\n $clientId = $payConfig[\"client_id\"] ;\n $clientSecret = $payConfig[\"secret\"] ;\n return new SandboxEnvironment($clientId, $clientSecret);\n }", "title": "" }, { "docid": "c776b35a24ff20fdd92a25be23a5e11c", "score": "0.64287144", "text": "public function getEnv();", "title": "" }, { "docid": "fc6a3bf723fa13b998a7a897205196c2", "score": "0.642743", "text": "public static function getCurrentProject()\n {\n return Zend_Registry::get(self::CURRENT_PROJECT);\n }", "title": "" }, { "docid": "9b5e2e217cd1f28c19314ce2248eb711", "score": "0.6418735", "text": "protected function getCurrentEnvironment() {\n return $_SERVER;\n }", "title": "" }, { "docid": "d260f8be357509358b3dcda7ae6b11f6", "score": "0.6408943", "text": "public static function get() \n {\n // then return content of APPLICATION_ENV\n // else return \"development\"\n if(!isset($_SERVER['APPLICATION_ENV'])) {\n $_SERVER['APPLICATION_ENV'] = \"development\";\n }\n\n if(!in_array($_SERVER['APPLICATION_ENV'], self::$environments)) {\n $_SERVER['APPLICATION_ENV'] = \"development\"; \n }\n\n return $_SERVER['APPLICATION_ENV'];\n }", "title": "" }, { "docid": "0647236dc67a497ef26eaea1750a6368", "score": "0.6391057", "text": "public static function environment()\n\t{\n\t\treturn (ENV === \"prod\") ? new ProductionEnvironment(PAYPAL_CLIENT_ID, PAYPAL_PRIVATE_KEY) : new SandboxEnvironment(PAYPAL_CLIENT_ID, PAYPAL_PRIVATE_KEY);\n\t}", "title": "" }, { "docid": "b19d5490334af766f7a572ca26f03fe3", "score": "0.6390643", "text": "public function getProject() {\n\t\treturn get_entity($this->container_guid);\n\t}", "title": "" }, { "docid": "b010e93fd63896a4a8641daedce2c098", "score": "0.627806", "text": "public function getEnvironment(): string\n {\n return $this->environment;\n }", "title": "" }, { "docid": "bd5f7b4fd38cdc67ccdc9172b4aa3648", "score": "0.6268818", "text": "public function getEnv() {\n return $this->container->getParameter('env');\n }", "title": "" }, { "docid": "01d28e109103645f7c45d97791fcaf16", "score": "0.62453866", "text": "public function environment(): string\n {\n return $this->environment;\n }", "title": "" }, { "docid": "c389f52d0f733200f4ea27e84f42bcb8", "score": "0.6245193", "text": "public static function get_environment() {\n if(array_key_exists(\"APP_ENVIRONMENT\", $_ENV)) {\n return $_ENV[\"APP_ENVIRONMENT\"];\n }\n elseif (defined(\"APP_ENVIRONMENT\")) {\n return APP_ENVIRONMENT;\n }\n else {\n return self::DEFAULT_ENVIRONMENT;\n }\n }", "title": "" }, { "docid": "cbfedd8109e6e7b7757d64370045d61d", "score": "0.6223743", "text": "public static function environment()\n {\n $clientId = config('myapp.paypal_client_id',env('PAYPAL_CLIENT_ID'));\n $clientSecret = config('myapp.paypal_client_secret',env('PAYPAL_CLIENT_SECRET'));\n return new SandboxEnvironment($clientId, $clientSecret);\n }", "title": "" }, { "docid": "e289b5c977836f2b013b87d924c3eaea", "score": "0.62216353", "text": "public static function load($testingEnabled = FALSE)\n {\n if (NULL === static::$instance)\n {\n static::$instance = new Environment($testingEnabled);\n }\n\n return static::$instance;\n }", "title": "" }, { "docid": "3c8739cf73efe0109d71245d107feeaa", "score": "0.62181187", "text": "public static function get()\n {\n if (empty(self::$application)) {\n self::$application = new self();\n }\n return self::$application;\n }", "title": "" }, { "docid": "8639f58dd36693101fff688a31ef2be7", "score": "0.6165439", "text": "protected function getProject()\r\n {\r\n $projectManager = $this->getService('cerad.project.repository');\r\n $projectParams = $this->getService('cerad_tourn.project');\r\n $projectEntity = $projectManager->findOneBy(array('hash' => $projectParams->getKey()));\r\n return $projectEntity;\r\n }", "title": "" }, { "docid": "8639f58dd36693101fff688a31ef2be7", "score": "0.6165439", "text": "protected function getProject()\r\n {\r\n $projectManager = $this->getService('cerad.project.repository');\r\n $projectParams = $this->getService('cerad_tourn.project');\r\n $projectEntity = $projectManager->findOneBy(array('hash' => $projectParams->getKey()));\r\n return $projectEntity;\r\n }", "title": "" }, { "docid": "45b92bbfe8b4cc930289c5fe360cf7dc", "score": "0.61282676", "text": "public static function getInstance( $env ): self\n\t{\n\t\tif( !self::$instance )\n\t\t\tself::$instance\t= new self( $env );\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "4d7d2022be54b72fd7b345901a86dc70", "score": "0.6060409", "text": "public function getProject()\n {\n return $this->project;\n }", "title": "" }, { "docid": "4d7d2022be54b72fd7b345901a86dc70", "score": "0.6060409", "text": "public function getProject()\n {\n return $this->project;\n }", "title": "" }, { "docid": "4d7d2022be54b72fd7b345901a86dc70", "score": "0.6060409", "text": "public function getProject()\n {\n return $this->project;\n }", "title": "" }, { "docid": "4d7d2022be54b72fd7b345901a86dc70", "score": "0.6060409", "text": "public function getProject()\n {\n return $this->project;\n }", "title": "" }, { "docid": "4d7d2022be54b72fd7b345901a86dc70", "score": "0.6060409", "text": "public function getProject()\n {\n return $this->project;\n }", "title": "" }, { "docid": "445e955b415ff6d44c4cff2c21961855", "score": "0.60459924", "text": "public static function get()\n {\n if ( ! self::$booted ) {\n self::$instance = parent::createFromGlobals();\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "df2b51f3620bd580c2547e560cddf1be", "score": "0.603316", "text": "private function getEnvironment ($engine) {\n $method = 'getEnvironmentFor' . ucfirst($engine);\n if (method_exists($this, $method)) {\n return call_user_func([$this, $method]);\n }\n\n // If no custom environment is set, we're happy with the current one\n return null;\n }", "title": "" }, { "docid": "72106aa371e291e8c669ef346fbb9036", "score": "0.60323983", "text": "public function project() {\n if ($this->project == null) {\n $title = urldecode(substr($this->url(), strrpos($this->url(), '/') + 1));\n $this->project = Project::fromName($title)->firstOrFail();\n }\n return $this->project;\n }", "title": "" }, { "docid": "abaf3fe10b7e836f7166135264c64501", "score": "0.6026553", "text": "protected function getTwigEnvironment()\n {\n $loader = new FilesystemLoader($this->getTemplateDirs());\n $twig = new Environment($loader, array(\n 'autoescape' => false,\n 'strict_variables' => true,\n 'debug' => true,\n 'cache' => $this->getGenerator()->getTempDir(),\n ));\n\n $this->loadTwigExtensions($twig);\n $this->loadTwigFilters($twig);\n\n return $twig;\n }", "title": "" }, { "docid": "9e642d58de58241a715e9a5ae6e44167", "score": "0.60050905", "text": "public static function environment()\n {\n $clientId = getenv(\"CLIENT_ID\") ?: \"PAYPAL-SANDBOX-CLIENT-ID\";\n $clientSecret = getenv(\"CLIENT_SECRET\") ?: \"PAYPAL-SANDBOX-CLIENT-SECRET\";\n return new SandboxEnvironment($clientId, $clientSecret);\n }", "title": "" }, { "docid": "66e4aa1fea9ecda6e75b0363d0bc5388", "score": "0.59886014", "text": "public function get($name)\n {\n return $this->envs[$name];\n }", "title": "" }, { "docid": "a461679c67de2d93cfc65e0395f99210", "score": "0.5977342", "text": "public function getProject() {\n\t\treturn $this->project;\n\t}", "title": "" }, { "docid": "56341d97f516c74176abe2b89a37b927", "score": "0.5940549", "text": "public function getTwigEnvironment(): \\Twig\\Environment {\n return $this->twig;\n }", "title": "" }, { "docid": "90c04ebfe70da1fbe4a98818bb6cd059", "score": "0.5940144", "text": "public static function createFromEnvironment()\n {\n // Clean and update live global variables\n $variables = static::cleanEnvironment(Environment::getVariables());\n Environment::setVariables($variables); // Currently necessary for SSViewer, etc to work\n\n // Health-check prior to creating environment\n return static::createFromVariables($variables, @file_get_contents('php://input'));\n }", "title": "" }, { "docid": "2166389cf62cb345db7edca8a3f8df51", "score": "0.59047395", "text": "protected function getEnvironmentFromVariable()\n {\n return getenv('CONCRETE5_ENV');\n }", "title": "" }, { "docid": "d5ee3ccdb7e2c2c27bec4bfa60077f18", "score": "0.5898065", "text": "private function findEnvironment()\n\t{\n\t\n\t// Use HTTP_HOST to define environment\n\t\tif (isset($_SERVER['HTTP_HOST']))\n\t\t{\n\t\t\t\t\n\t\t// Case 1: local\n\t\t\tif (strpos($_SERVER['HTTP_HOST'], 'localhost') !== false)\n\t\t\t\t$this->environment = 'local';\n\t\t\t\t\n\t\t// Case 2: prod\n\t\t\telse $this->environment = 'prod';\n\n\t\t}\n\t\t\n\t// Default environment is 'prod'\n\t\telse $this->environment = 'prod';\n\t\t\n\t// Return environement\n\t\treturn $this->environment;\t\n\t\n\t}", "title": "" }, { "docid": "266776cc2d2fddf5a760b3620b013635", "score": "0.58824146", "text": "public function getEnvironment() {\n return getenv('CMS_ENVIRONMENT_TYPE') ?: 'ci';\n }", "title": "" }, { "docid": "be5c1f00104d30508067e7314800c5c0", "score": "0.58814377", "text": "protected function EnvInit():object\n\t{\n\t\t$dotenv = \\Dotenv\\Dotenv::create( __ROOT );\n\t\t$dotenv->load();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "0cd4ec49c58ef6b63d674aa05a1f7503", "score": "0.5877797", "text": "public function project() {\n return $this->project;\n }", "title": "" }, { "docid": "5ee5f9464e6ff66e817d7cacca1c5b83", "score": "0.5875018", "text": "public static function getEnv(): string {\n\t\treturn Startup::getConfig()['app.env'] ?? 'dev';\n\t}", "title": "" }, { "docid": "9471b7f04e6d3bf5173fb3467567c50e", "score": "0.58507156", "text": "public function get()\n {\n return $this->app;\n }", "title": "" }, { "docid": "f0f66d7f2721eec133810eebbe318cab", "score": "0.5849599", "text": "public function getParentEnvironment()\n {\n switch ($this->id) {\n case 'dev':\n return null;\n case 'live':\n $parent_env_id = 'test';\n break;\n case 'test':\n default:\n $parent_env_id = 'dev';\n break;\n }\n return $this->getSite()->getEnvironments()->get($parent_env_id);\n }", "title": "" }, { "docid": "b4f64ce612030d4183d08495709db999", "score": "0.5838118", "text": "public static function env()\n {\n $environment = getenv(\"APP_ENV\");\n if (empty($environment)) {\n $environment = self::ENV_DEVELOPMENT;\n } elseif ($environment == \"production\") {\n $environment = self::ENV_PRODUCTION;\n }\n return $environment;\n }", "title": "" }, { "docid": "1def274efa4abbeb5b20e7dab052d3c5", "score": "0.5809561", "text": "public static function dotEnv() : DotEnv\n {\n return self::bus()->make('dotenv');\n }", "title": "" }, { "docid": "608a6eea0e874c110d4c0f65cb265025", "score": "0.5799189", "text": "public function getEnvironmentExterior() {\n return $this->get(self::ENVIRONMENT_EXTERIOR);\n }", "title": "" }, { "docid": "f5c5da8ee65b4baaac486df0c541a877", "score": "0.5790775", "text": "public function getCurrentProject()\n {\n return Mage::registry('current_project');\n }", "title": "" }, { "docid": "a0d786a085a2d9f3fd90596f62daab12", "score": "0.5778126", "text": "final public static function env():string\n {\n return self::get('env');\n }", "title": "" }, { "docid": "71e0b77380fb3accdf29de559b0292cc", "score": "0.57616544", "text": "public static function getInstance()\r\n {\r\n return static::$app;\r\n }", "title": "" }, { "docid": "571309d55d3bc9a0495d8ad58c7744b9", "score": "0.5753688", "text": "public static function environmentFile()\n {\n /** @var \\Illuminate\\Foundation\\Application $instance */\n return $instance->environmentFile();\n }", "title": "" }, { "docid": "d93c35d48c8e2ac3ae2e32d58fc89ad9", "score": "0.5741909", "text": "public static function getMode()\n {\n return self::getEnvironment(self::APP_ENVIRONMENT, 'development');\n\t}", "title": "" }, { "docid": "b3ef481ed8110e1a5f5e9534b02d64a4", "score": "0.5682138", "text": "protected function getTemplate_Twig_EnvironmentService()\n {\n $this->services['template.twig.environment'] = $instance = new \\phpbb\\template\\twig\\environment($this->get('config'), $this->get('filesystem'), $this->get('path_helper'), './../cache/production/twig/', $this->get('ext.manager'), $this->get('template.twig.loader'), $this->get('dispatcher'), array());\n\n $instance->setLexer($this->get('template.twig.lexer'));\n\n return $instance;\n }", "title": "" }, { "docid": "e47526c63e99faacd42e2490bc16b058", "score": "0.56784487", "text": "public function getProjectService() {\n\n\t\tif (is_null($this->projectService)) {\n\t\t\t$this->projectService = new ProjectService();\n\t\t}\n\n\t\treturn $this->projectService;\n\t}", "title": "" }, { "docid": "bb3f1b03c33837c96003b7b75218264d", "score": "0.56687057", "text": "public function get()\n {\n return $this->_app;\n }", "title": "" }, { "docid": "966109e746364763deb2e4ae38b1daa4", "score": "0.56605875", "text": "public function getTwigEnvironment()\n {\n return $this->twig;\n }", "title": "" }, { "docid": "8748f49f1f4373b366e42206ebe42c4f", "score": "0.5657707", "text": "static function get(): \\BearFramework\\App\n {\n if (self::$instance === null) {\n throw new \\Exception('App is not constructed yet');\n }\n return self::$instance;\n }", "title": "" }, { "docid": "66fae959e7a75e338fc980abfd88e0a8", "score": "0.5652123", "text": "public static function GetCurrentInstance() {\n\t\treturn self::$_app_instance;\n\t}", "title": "" }, { "docid": "cc963e7ac2b24fa344db7735af6a8f03", "score": "0.5635175", "text": "public function getApp()\n {\n global $app;\n return $app;\n }", "title": "" }, { "docid": "f845ba4c424932146fcf30954e956f56", "score": "0.5630207", "text": "public static function context() {\n return static::$instance;\n }", "title": "" }, { "docid": "bc0f8e00623114401a34a85dd695da5d", "score": "0.56286395", "text": "public function getInstance()\n {\n if (!$this->parserInstance) {\n $this->parserInstance = new \\Twig_Environment(\n new \\Twig_Loader_Filesystem(__DIR__.'/../../templates'),\n $this->settings\n );\n }\n\n return $this->parserInstance;\n }", "title": "" }, { "docid": "8b7ee4427e917fdbde00dec8b7efd475", "score": "0.5627023", "text": "public static function get()\n {\n if (!self::$instance) {\n self::init();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "af662119d36b238e7fd89bdb0b16b2d6", "score": "0.5625195", "text": "protected function fetchProject() {\n return Project::first();\n }", "title": "" }, { "docid": "190b8cb991303480f8807ef0847b70c5", "score": "0.56157786", "text": "public static function environment(...$environments)\n {\n /** @var \\Illuminate\\Foundation\\Application $instance */\n return $instance->environment(...$environments);\n }", "title": "" }, { "docid": "4716c65775d4658226c405fd74028252", "score": "0.5614584", "text": "public function getEnv(): array\n {\n return $this->env;\n }", "title": "" }, { "docid": "54f763b4a6556d61acc809ea7d3f393c", "score": "0.5607835", "text": "function getProject() {\n\t\tif (null === ($project = SyndLib::getInstance($this->data['PROJECT_NODE_ID'])))\n\t\t\t$project = SyndNodeLib::getInstance('user_null.null');\n\t\treturn $project;\n\t}", "title": "" }, { "docid": "c96668dffb69ada8a5ddc8f2b801683d", "score": "0.56007504", "text": "final public function environment()\n {\n try\n {\n return isset($_ENV) ? $_ENV : array();\n }\n catch (Exception $e)\n {\n throw $e;\n }\n }", "title": "" }, { "docid": "83ca9ad8ba9c1a4030ec4fe48604dcc7", "score": "0.559422", "text": "public function environment()\n {\n if (count(func_get_args()) > 0) {\n return in_array($this->environment, func_get_args());\n }\n\n return $this->environment;\n }", "title": "" }, { "docid": "66313fcb077bcd523dccb48336cb7e9f", "score": "0.5593875", "text": "public static function getFoundProject() {\n return self::$foundProject;\n }", "title": "" }, { "docid": "f3c931ee9dfa4ab2bcf753df61b8c979", "score": "0.55893916", "text": "public function getTwigEnvironment(): Twig_Environment\n {\n return $this->twig;\n }", "title": "" }, { "docid": "fdd1fcfb1d6632ef61c969db53738773", "score": "0.558234", "text": "public static function getEndpointEnvironment()\n {\n if ($env = getenv('MOIP_ENV')) {\n return $env;\n }\n\n return config('services.moip.env');\n }", "title": "" }, { "docid": "d571b69acbb235499fd07618a268a153", "score": "0.55715877", "text": "protected function env()\n {\n $dotenv = new Dotenv();\n $env_file = '../.env';\n if (!file_exists($env_file)) throw new Exception('Could not find .env file');\n $dotenv->load($env_file);\n }", "title": "" }, { "docid": "1f0863a4965f9607bae36cdbc8196b1c", "score": "0.5558957", "text": "public static function instance()\n {\n static $_instance = null;\n\n if (is_null($_instance)) {\n\n $_instance = new Envato_market();\n\n // globals.\n $_instance->setup_globals();\n\n // includes.\n $_instance->includes();\n\n // actions.\n $_instance->setup_actions();\n }\n\n return $_instance;\n }", "title": "" }, { "docid": "c3cb02eee7cbf546c06ae942f1d1cb99", "score": "0.5555636", "text": "public static function getInstance() {\n return self::bootstrap();\n }", "title": "" }, { "docid": "2e67cca3bec8a89f359b624c32c79f58", "score": "0.55453354", "text": "public static function getApp()\n {\n return self::$appInstance;\n }", "title": "" }, { "docid": "4d223ef23253a4d8863d818bb74e563e", "score": "0.5530848", "text": "public static function getSettings()\n {\n if (self::$settings === null) {\n self::$settings = SettingsFactory::fromEnvironment();\n }\n return self::$settings;\n }", "title": "" }, { "docid": "390048454dd9b4c973d410ca7657290b", "score": "0.55294055", "text": "public function getApplication()\n {\n return $this->context->getConfiguration()->getApplication();\n }", "title": "" }, { "docid": "35cbf06cbca1425d43e649165af091d0", "score": "0.5528182", "text": "protected function setEnvironment() {\n if ($env = $this->config->get('environment')) {\n $this->logger->info('APR environment configuration set to @env. Using config instead of AH environment.', [\n '@env' => $env,\n ]);\n\n $environment = $env;\n }\n else {\n $env = getenv('AH_SITE_ENVIRONMENT');\n\n switch ($env) {\n case 'test':\n case 'prod':\n $environment = 'prod';\n break;\n\n default:\n $environment = 'test';\n break;\n }\n }\n\n return $environment;\n }", "title": "" } ]
5df8eea31f5f8c70f3bb3f9a906a4bfb
Display form in popup on click on some button
[ { "docid": "3c79e79e7360f99a9251c6aa83b7812d", "score": "0.55818576", "text": "public function formDisplayInPopup($buttonContent = \"\", $headerContent = \"\", $directCall = false) {\r\n $this->formPopup = array(\r\n \"buttonContent\" => $buttonContent,\r\n \"headerContent\" => $headerContent\r\n );\r\n $this->directCall = $directCall; \r\n return $this;\r\n }", "title": "" } ]
[ { "docid": "22e8c39f028228d267967975868c6d42", "score": "0.71683574", "text": "function display_popup_form($form_html)\r\n {\r\n Display :: normal_message($form_html);\r\n }", "title": "" }, { "docid": "a5115b84cc65d6978c5737b635ecbc4a", "score": "0.70903295", "text": "public function add_modal_form() {\n\t\t$current_screen = get_current_screen();\n\t\tif ( ! isset( $current_screen->parent_base ) || $current_screen->parent_base != 'edit' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine if we should use CMB or generic form callback\n\t\t$callback = $this->form_callback();\n\t\t$cmb_config = $this->get_cmb_config();\n\t\t$is_callable = is_callable( $callback );\n\t\t$is_cmb = ! empty( $cmb_config );\n\n\t\tif ( ! $is_callable && ! $is_cmb ) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\t\t<div class=\"wp-sc-buttons-form\" style=\"display: none; padding: 0 10px 20px;\" id=\"<?php echo esc_attr( $this->button_slug ); ?>-form\" title=\"<?php echo esc_attr( $this->button_data['button_tooltip'] ); ?>\">\n\t\t\t<?php if ( $is_cmb ) {\n\t\t\t\t$this->do_cmb_form();\n\t\t\t} else {\n\t\t\t\techo call_user_func( $callback, $this->button_data, $this->args );\n\t\t\t} ?>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "d165d543eed83caba15894d53e46c019", "score": "0.6897572", "text": "function showPreviewForm()\n {\n $ok = $this->preview();\n if (!$ok) {\n // @todo FIXME maybe provide a cancel button or link back?\n return;\n }\n\n $this->elementStart('div', 'entity_actions');\n $this->elementStart('ul');\n $this->elementStart('li', 'entity_subscribe');\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_ostatus_sub',\n 'class' => 'form_remote_authorize',\n 'action' =>\n $this->selfLink()));\n $this->elementStart('fieldset');\n $this->hidden('token', common_session_token());\n $this->hidden('profile', $this->profile_uri);\n if ($this->oprofile->isGroup()) {\n // TRANS: Button text.\n $this->submit('submit', _m('Join'), 'submit', null,\n // TRANS: Tooltip for button \"Join\".\n _m('BUTTON','Join this group'));\n } else {\n // TRANS: Button text.\n $this->submit('submit', _m('BUTTON','Confirm'), 'submit', null,\n // TRANS: Tooltip for button \"Confirm\".\n _m('Subscribe to this user'));\n }\n $this->elementEnd('fieldset');\n $this->elementEnd('form');\n $this->elementEnd('li');\n $this->elementEnd('ul');\n $this->elementEnd('div');\n }", "title": "" }, { "docid": "2502b91d9620e4f92500d7ee1973a16c", "score": "0.6831746", "text": "public function createShowModal(){\n $this->modalFormVisible = true;\n }", "title": "" }, { "docid": "927288fabf26bc8fdc387983298559f5", "score": "0.6762697", "text": "public function ShowForm()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$GLOBALS['AddonId'] = $this->GetId();\n\t\t\t$GLOBALS['Message'] = GetFlashMessageBoxes();\n\t\t\t$this->ParseTemplate('emailchange.form');\n\t\t}", "title": "" }, { "docid": "bc931b89672e433570e5e8b4ebbfade5", "score": "0.66975754", "text": "public function createShowModal()\n {\n $this->resetValidation();\n $this->reset();\n $this->showModalForm = true;\n }", "title": "" }, { "docid": "17b89035fcefb3693fcf2f16bf2b44c8", "score": "0.6654461", "text": "public function createShowModal()\n {\n $this->resetValidation();\n $this->reset();\n $this->modalFormVisible = true;\n }", "title": "" }, { "docid": "81ba1b3bf4ada5de51b925760db9131e", "score": "0.66488016", "text": "function showForm() {\n \tglobal $pluginpath;\n \t\n \tif ($this->idt == \"\") {\n \t //user is creating new template\n \t\t$title = MF_NEW_TEMPLATE;\n \t\t$this->action = 'createtempl';\n\t\t$btnText = MF_CREATE_TEMPLATE_BUTTON; \n \t} else {\n \t //user is editing old template\n \t\t$title = \tMF_CHANGE_TEMPLATE;\n \t\t$this->action = 'changetempl';\n\t\t$btnText = MF_CHANGE_FORUM_BUTTON;\n \t}\n \t\n\t$this->doHtmlSpecChars();\n\t\t\n\tinclude \"admin/tempForm.php\";\n \t\n }", "title": "" }, { "docid": "7fdf38dd77c5780b526cb3232f5057a2", "score": "0.6632384", "text": "public function createShowModal()\n {\n $this->resetValidation();\n $this->resetVars();\n $this->modalFormVisible = true;\n }", "title": "" }, { "docid": "7d23e41bcf6bdeb24c749acbdbc3df17", "score": "0.6577336", "text": "function buildPopup(){\t\t\n\t\t$html = '';\n\t\t$html .= JDom::_('html.fly.bootstrap.modal', array(\n\t\t\t\t'domId' => 'fset_modal_form',\n\t\t\t\t'domClass' => 'popupform formFieldsContainer',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'data-backdrop'=> 'static'\n\t\t\t\t\t),\n\t\t\t\t'title' => JText::_(\"JACTION_EDIT\")\n\t\t\t));\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "dafb52c6ccd5dac400b7548723bd8555", "score": "0.64035857", "text": "public function ShowForm()\n {\n return false;\n }", "title": "" }, { "docid": "a6346857c20f4dd0578f3d78ae904663", "score": "0.6395886", "text": "public function open(){\n\n $form = '<form ';\n $class = 'active-form';\n\n RMTemplate::get()->add_script(\n 'forms/active-form.js',\n 'rmcommon',\n array(\n 'location' => 'footer'\n )\n );\n\n RMTemplate::get()->add_style(\n 'active-form.css',\n 'rmcommon',\n array(\n 'location' => 'footer'\n )\n );\n\n foreach ( $this->attributes as $attr => $value ){\n\n switch ( $attr ){\n case 'submit-via':\n $class .= $value == 'ajax' ? ' ajax-form' : '';\n break;\n case 'validation':\n $class .= $value == 'local' ? ' validate-form' : '';\n RMTemplate::get()->add_script('jquery.validate.min.js', 'rmcommon', array('directory' => 'include', 'location' => 'footer'));\n break;\n case 'class':\n $class .= ' ' . $value;\n break;\n default:\n $form .= $attr . '=\"' . $value . '\"';\n break;\n }\n\n }\n\n $form .= ' class=\"' . $class . '\">';\n\n echo $form;\n\n }", "title": "" }, { "docid": "5e5bea323498113f1997573a9d76330b", "score": "0.6395408", "text": "function show_forms()\n {\n }", "title": "" }, { "docid": "f3a8bcd38556be36af103438ac4b6784", "score": "0.6343831", "text": "public function display() {\n\n\t\t// Register WP built-in Thickbox for popup.\n\t\tadd_thickbox();\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "bfa4a9d72322c28626eb979ad3427ec5", "score": "0.63190585", "text": "function show_form()\n \t{\n \t\treturn $this->class_post->show_form();\n \t}", "title": "" }, { "docid": "c9c02df97d228c12f82c9d1f1cd05277", "score": "0.62680036", "text": "protected function formCreate() {\n\t\t\t// Define the Simple Message Dialog Box\n\t\t\t$this->dlgSimpleMessage = new \\QCubed\\Project\\Jqui\\Dialog($this);\n\t\t\t$this->dlgSimpleMessage->Title = \"Hello World!\";\n\t\t\t$this->dlgSimpleMessage->Text = '<p><em>Hello, world!</em></p><p>This is a standard, no-frills dialog box.</p><p>Notice how the contents of the dialog '.\n\t\t\t\t'box can scroll, and notice how everything else in the application is grayed out.</p><p>Because we set <strong>MatteClickable</strong> to <strong>true</strong> ' .\n\t\t\t\t'(by default), you can click anywhere outside of this dialog box to \"close\" it.</p><p>Additional text here is just to help show the scrolling ' .\n\t\t\t\t'capability built-in to the panel/dialog box via the \"Overflow\" property of the control.</p>';\n\t\t\t$this->dlgSimpleMessage->AutoOpen = false;\n\n\t\t\t// Make sure this Dialog Box is \"hidden\"\n\t\t\t// Like any other \\QCubed\\Control\\Panel or QControl, this can be toggled using the \"Display\" or the \"Visible\" property\n\t\t\t$this->dlgSimpleMessage->Display = false;\n\n\t\t\t// The First \"Display Simple Message\" button will utilize an AJAX call to Show the Dialog Box\n\t\t\t$this->btnDisplaySimpleMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplaySimpleMessage->Text = t('Display Simple Message \\QCubed\\Project\\Jqui\\Dialog');\n\t\t\t$this->btnDisplaySimpleMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnDisplaySimpleMessage_Click'));\n\n\t\t\t// The Second \"Display Simple Message\" button will utilize Client Side-only JavaScripts to Show the Dialog Box\n\t\t\t// (No postback/postajax is used)\n\t\t\t$this->btnDisplaySimpleMessageJsOnly = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplaySimpleMessageJsOnly->Text = 'Display Simple Message \\QCubed\\Project\\Jqui\\Dialog (ClientSide Only)';\n\t\t\t$this->btnDisplaySimpleMessageJsOnly->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\ShowDialog($this->dlgSimpleMessage));\n\n\t\t\t$this->pnlAnswer = new \\QCubed\\Control\\Panel($this);\n\t\t\t$this->pnlAnswer->Text = 'Hmmm';\n\t\t\t\n\t\t\t$this->btnDisplayYesNo = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnDisplayYesNo->Text = t('Do you love me?');\n\t\t\t$this->btnDisplayYesNo->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('showYesNoClick'));\n\t\t\t\n\t\t\t\n\t\t\t// Define the CalculatorWidget example. passing in the Method Callback for whenever the Calculator is Closed\n\t\t\t// This is example uses \\QCubed\\Project\\Jqui\\Button's instead of the JQuery UI buttons\n\t\t\t$this->dlgCalculatorWidget = new CalculatorWidget($this);\n\t\t\t$this->dlgCalculatorWidget->setCloseCallback('btnCalculator_Close');\n\t\t\t$this->dlgCalculatorWidget->Title = \"Calculator Widget\";\n\t\t\t$this->dlgCalculatorWidget->AutoOpen = false;\n\t\t\t$this->dlgCalculatorWidget->Resizable = false;\n\t\t\t$this->dlgCalculatorWidget->Modal = false;\n\n\t\t\t// Setup the Value Textbox and Button for this example\n\t\t\t$this->txtValue = new \\QCubed\\Project\\Control\\TextBox($this);\n\n\t\t\t$this->btnCalculator = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnCalculator->Text = 'Show Calculator Widget';\n\t\t\t$this->btnCalculator->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnCalculator_Click'));\n\n\t\t\t// Validate on JQuery UI buttons\n\t\t\t$this->dlgValidation = new \\QCubed\\Project\\Jqui\\Dialog($this);\n\t\t\t$this->dlgValidation->AddButton ('OK', 'ok', true, true); // specify that this button causes validation and is the default button\n\t\t\t$this->dlgValidation->AddButton ('Cancel', 'cancel');\n\n\t\t\t// This next button demonstrates a confirmation button that is styled to the left side of the dialog box.\n\t\t\t// This is a QCubed addition to the jquery ui functionality\n\t\t\t$this->dlgValidation->AddButton ('Confirm', 'confirm', true, false, 'Are you sure?', array('class'=>'ui-button-left'));\n\t\t\t$this->dlgValidation->Width = 400; // Need extra room for buttons\n\n\t\t\t$this->dlgValidation->AddAction (new \\QCubed\\Event\\DialogButton(), new \\QCubed\\Action\\Ajax('dlgValidate_Click'));\n\t\t\t$this->dlgValidation->Title = 'Enter a number';\n\n\t\t\t// Set up a field to be auto rendered, so no template is needed\n\t\t\t$this->dlgValidation->AutoRenderChildren = true;\n\t\t\t$this->txtFloat = new \\QCubed\\Control\\FloatTextBox($this->dlgValidation);\n\t\t\t$this->txtFloat->Placeholder = 'Float only';\n\t\t\t$this->txtFloat->PreferredRenderMethod = 'RenderWithError'; // Tell the panel to use this method when rendering\n\n\t\t\t$this->btnValidation = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnValidation->Text = 'Show Validation Example';\n\t\t\t$this->btnValidation->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\ShowDialog($this->dlgValidation));\n\n\t\t\t/*** Alert examples ***/\n\n\t\t\t$this->btnErrorMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnErrorMessage->Text = 'Show Error';\n\t\t\t$this->btnErrorMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnErrorMessage_Click'));\n\n\t\t\t$this->btnInfoMessage = new \\QCubed\\Project\\Jqui\\Button($this);\n\t\t\t$this->btnInfoMessage->Text = 'Get Info';\n\t\t\t$this->btnInfoMessage->AddAction(new \\QCubed\\Event\\Click(), new \\QCubed\\Action\\Ajax('btnGetInfo_Click'));\n\t\t}", "title": "" }, { "docid": "28397878034da999540a4a1dc1495244", "score": "0.6261265", "text": "protected function page_popup () {\n\t\t$skeleton = make::tpl ('skeleton.basic');\n\n\t\t/**\n\t\t * Fetch the body content template\n\t\t */\n\t\t$body = make::tpl ('body.login-widget.popup');\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t/*$page = new page('terms');*/\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Login Widget',\n\t\t\t\t'keywords'\t\t=> /*$page->keywords()*/'',\n\t\t\t\t'description'\t=> /*$page->description()*/'',\n\t\t\t\t'body'\t\t\t=> $body\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\n\t}", "title": "" }, { "docid": "8289b0dab1efb0708db75c026dc89e18", "score": "0.62304586", "text": "function showContent()\n {\n if ($this->oprofile) {\n $this->showPreviewForm();\n } else {\n $this->showInputForm();\n }\n }", "title": "" }, { "docid": "74d9d8b4c94de88bf1833d52fd382132", "score": "0.61957854", "text": "public function getPopup() {}", "title": "" }, { "docid": "a5c6a7276e7523f83c9e2f9cce3eee03", "score": "0.61957765", "text": "function training_modal_form($form, &$form_state) {\n $form = array(\n 'submit_modal' => array(\n '#type' => 'submit',\n '#value' => t('Sample button'),\n ),\n );\n\n return $form;\n}", "title": "" }, { "docid": "e03985e25798258b1fc33d0ef489be4b", "score": "0.6170512", "text": "public function popup($key = '') {\n\t\tparent::popup($key);\n }", "title": "" }, { "docid": "fe366173f18e997b14abbd6fd852abb2", "score": "0.61507386", "text": "public function _showForm()\n\t{\n\t\t$this->registry->output->setTitle( \"Log In\" );\n\t\t$this->registry->output->setNextAction( 'index&do=login' );\n\t\t$this->registry->output->addContent( $this->registry->legacy->fetchLogInForm() );\n\t\t$this->registry->output->sendOutput();\n\t\texit();\n\t}", "title": "" }, { "docid": "48f9b7227b6542fbe69cff2414f4c7af", "score": "0.6132585", "text": "function showContent()\n {\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_openidtrust',\n 'class' => 'form_settings',\n 'action' => common_local_url('openidtrust')));\n $this->elementStart('fieldset');\n // TRANS: Button text to continue OpenID identity verification.\n $this->submit('allow', _m('BUTTON','Continue'));\n // TRANS: Button text to cancel OpenID identity verification.\n $this->submit('deny', _m('BUTTON','Cancel'));\n\n $this->elementEnd('fieldset');\n $this->elementEnd('form');\n }", "title": "" }, { "docid": "340a30bdc50e04ffdf9da3cf0b25d339", "score": "0.61303324", "text": "function m_button1OnButtonClick( $event )\n {\n // Open the People Frame.\n $people = new MyFrame2(null);\n $people->Show();\n }", "title": "" }, { "docid": "ce51e1910f1d004b4f088aa29533a772", "score": "0.6116722", "text": "public function registration_popup() {\n ?>\n <div style=\"display:none;\">\n <div id=\"popup_form_registration\" class=\"main\">\n <div class=\"col-main\" style=\"float: none;width:100%;\">\n <div class=\"page-title\">\n <h1>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></h1>\n </div>\n <div id=\"registerLB\">\n <form id=\"registrationForm\">\n <div class=\"fieldset\">\n <h2 class=\"legend\">Registration</h2>\n <p class=\"required\">* Required Fields</p>\n <div id=\"formRegisterSuccess\" ></div>\n <ul class=\"form-list\">\n <li class=\"fields\">\n <div class=\"field\">\n <label class=\"required\" for=\"name\"><em>*</em>Name</label>\n <div class=\"input-box\">\n <input type=\"text\" class=\"input-text required-entry\" value=\"\" title=\"Name\" id=\"name\" name=\"name\">\n </div>\n </div>\n <div class=\"field\">\n <label class=\"required\" for=\"email\"><em>*</em>Email Address</label>\n <div class=\"input-box\">\n <input type=\"email\" spellcheck=\"false\" autocorrect=\"off\" autocapitalize=\"off\" class=\"input-text required-entry validate-email\" value=\"\" title=\"Email\" id=\"email\" name=\"email\">\n </div>\n </div>\n </li>\n <li>\n <label class=\"required\" for=\"phonenumber\"><em>*</em>Phone number</label>\n <div class=\"input-box\">\n <input type=\"tel\" class=\"input-text required-entry validate-number IsValidCellNumber\" value=\"\" title=\"Phone number\" id=\"phonenumber\" name=\"phonenumber\">\n </div>\n </li>\n </ul>\n </div>\n <div class=\"buttons-set lb-btn-register\">\n <button class=\"button\" title=\"Submit\" type=\"submit\"><span><span>Submit</span></span></button>\n </div>\n <div class=\"lb-links\">\n <div >\n Or <a href=\"javascript:void(0);\" id=\"lnkLBLogin\" style=\"color:burlywood;\">login</a> if already registered.\n </div>\n <div>\n download our <a href=\"javascript:void(0);\" id=\"lnkDownloadApp\" style=\"color:burlywood;\">mobile application</a>\n </div>\n </div>\n </form>\n </div>\n <div style=\"display:none;\" id=\"loginLB\">\n <form id=\"loginForm\">\n <div class=\"fieldset\">\n <h2 class=\"legend\">Login</h2>\n <p class=\"required\">* Required Fields</p>\n <div id=\"formLoginLowestSuccess\" ></div>\n <ul class=\"form-list\">\n <li>\n <label class=\"required\" for=\"txtCardNumber\"><em>*</em>Card Number / Phone number / OTP</label>\n <div class=\"input-box\">\n <input type=\"tel\" class=\"input-text required-entry validate-number IsValidCartNumber\" value=\"\" title=\"Telephone\" id=\"txtCardNumber\" name=\"txtCardNumber\" >\n </div>\n </li>\n </ul>\n </div>\n <div class=\"buttons-set lb-btn-register\">\n <button class=\"button\" title=\"Submit\" type=\"submit\"><span><span>Submit</span></span></button>\n </div>\n <div class=\"lb-links\">\n <div>\n Or <a href=\"javascript:void(0);\" id=\"lnkLBRegister\" style=\"color:burlywood;\">click here</a> to register.\n </div>\n <div>\n download our <a href=\"javascript:void(0);\" id=\"lnkDownloadApp\" style=\"color:burlywood;\">mobile application</a>\n </div>\n </div>\n </form>\n </div>\n <span id=\"formLoader\" >\n <img src=\"<?php echo $this->getSkinUrl(\"images/opc-ajax-loader.gif\") ?>\">\n </span>\n </div>\n </div>\n </div>\n <style>\n .frm_error{\n color:red;\n font-size: 13px;\n margin: 5px 0 0;\n }\n .frm_success{\n color:green;\n font-size: 13px;\n margin: 5px 0 0;\n }\n #formLoader{\n display:none;\n }\n .lb-btn-register{\n margin-bottom: 5px;\n }\n .lb-btn-register::after {\n clear: none;\n content: \"\";\n display: table;\n }\n .lb-links{\n color: #636363;\n font-family: \"Helvetica Neue\",Verdana,Arial,sans-serif;\n font-size: 13px;\n line-height: 1.5;\n margin-top: -10px;\n }\n \n @media screen and (max-width: 479px) {\n .lb-btn-register::after {\n clear: both;\n content: \"\";\n display: table;\n }\n }\n #popup_form_registration {\n width: auto;\n }\n .connectlbbtn.lb-box {\n clear: both;\n padding:5px;\n }\n\n .registrationBtn h2 {\n font-size: 12px;\n font-weight: bold;\n margin: 0 0 5px;\n }\n \n #formRegisterSuccess{\n font-size: 13px;\n margin: 5px 0 0;\n color: green;\n }\n \n .dialog_content {\n background-color: #F4F4F4;\n color: #636363;\n font-family: Tahoma,Arial,sans-serif;\n font-size: 10px;\n overflow: auto;\n padding-bottom: 5px!important;\n }\n \n .redeem_lbpoints input {\n margin-bottom: 5px;\n }\n .lb-redeem-wrapper{\n margin-top: 5px;\n display: none;\n }\n <?php if(strpos($_SERVER['REQUEST_URI'], '/checkout/cart/') !== false){?>\n .registrationBtn{\n background-color: #f4f4f4;\n border: 1px solid #cccccc;\n padding: 10px;\n margin-bottom: 20px;\n }\n <?php }?>\n \n </style>\n <script type=\"text/javascript\">\n \n jQuery(\"#loginLB\").hide();\n jQuery(\"#lnkLBLogin\").click(function(){\n jQuery(\"#loginLB\").show();\n jQuery(\"#registerLB\").hide();\n jQuery(\".dialog_content\").css('height','auto');\n });\n\n jQuery(\"#lnkLBRegister\").click(function(){\n jQuery(\"#loginLB\").hide();\n jQuery(\"#registerLB\").show();\n jQuery(\".dialog_content\").css('height','auto');\n });\n \n Validation.add('IsValidCartNumber', 'Only 10 or 15 digits are allowed.', function(v) {\n return (v.length == 10 || v.length == 15); // || /^\\s+$/.test(v));\n }); \n \n Validation.add('IsValidCellNumber', 'Only 10 digits are allowed.', function(v) {\n return (v.length == 10); // || /^\\s+$/.test(v));\n }); \n \n \n //var dataForm = new VarienForm('lowest-form-validate', true);\n var formId = 'registrationForm';\n var myForm = new VarienForm(formId, true);\n var handleSubmit = true;\n function doAjax() {\n var postUrl = \"<?php echo Mage::getBaseUrl() . 'lb/index/register' ?>\";\n jQuery(\".dialog_content\").css('height','auto');\n if (myForm.validator.validate()) {\n var txtName = jQuery(\"#name\");\n var txtEmail = jQuery(\"#email\");\n var txtPhoneNumber = jQuery(\"#phonenumber\");\n var tips = jQuery(\"#formRegisterSuccess\");\n tips.text('');\n var data = {\n 'txtName': txtName.val(),\n 'txtEmail': txtEmail.val(),\n 'txtPhoneNumber': txtPhoneNumber.val()\n };\n if(handleSubmit){\n handleSubmit = false;\n jQuery(\"#formLoader\").show();\n jQuery.post(postUrl, data, function(response) {\n handleSubmit = true;\n if(response.status == '1'){\n jQuery(\"#formLoader\").hide();\n tips.text(response.message).addClass( \"frm_success\" );\n txtName.val('');\n txtEmail.val('');\n txtPhoneNumber.val('');\n jQuery(\".dialog_close\").trigger('click');\n window.location.reload();\n }\n else{\n tips.text(response.message).addClass( \"frm_error\" );\n jQuery(\"#formLoader\").hide();\n }\n },'JSON');\n }\n }\n }\n // REGISTRATION CALL BACK\n new Event.observe('registrationForm', 'submit', function(e){\n e.stop();\n doAjax();\n });\n \n \n // login js\n var loginFormId = 'loginForm';\n var loginForm = new VarienForm(loginFormId, true);\n jQuery(\"#loginForm button\").click(function(){\n var postUrl = \"<?php echo Mage::getBaseUrl() . 'lb/index/login' ?>\";\n var txtCardNumber = jQuery(\"#txtCardNumber\").val();\n jQuery(\".dialog_content\").css('height','auto');\n if (loginForm.validator.validate()) {\n jQuery(\"#formLoader\").show();\n jQuery.post(postUrl,{'txtCardNumber':txtCardNumber}, function(response) {\n if(response.status == '1'){\n jQuery(\"#formLoader\").hide();\n jQuery(\".dialog_close\").trigger('click');\n Element.show('formLoginLowestSuccess');\n jQuery(\"#formLoginLowestSuccess\").html(response.message).addClass( \"frm_success\" );\n jQuery(\".connectlbbtn\").html(response.replaceBtn);\n window.location.reload();\n }\n else{\n jQuery(\"#formLoader\").hide();\n Element.show('formLoginLowestSuccess');\n jQuery(\"#formLoginLowestSuccess\").html(response.message).addClass( \"frm_error\" );\n }\n },'JSON');\n }\n return false;\n });\n \n \n // Add connect with loyaltybox button to right side bar\n /*if(jQuery(\".cart-forms\").length == 1)\n {\n var btnHtml = jQuery(\".connectlbbtn\").html();\n jQuery(\".connectlbbtn\").html('');\n jQuery(\".cart-forms\").prepend(\"<div class='discount connectlbbtn'>\"+btnHtml+\"</div>\");\n\n }*/\n // End : Add connect with loyaltybox button to right side bar.\n \n // LOGOUT CALL BACK\n jQuery(\"#lbLogout\").click(function(){\n var postUrl = \"<?php echo Mage::getBaseUrl() . 'lb/index/logout' ?>\";\n jQuery.post(postUrl, function(response) {\n if(response.status == '1'){\n window.location.reload();\n }\n else{\n jQuery(\"lbMsg\").html(response.message).addClass( \"frm_error\" );\n }\n },'JSON');\n });\n // end of logout\n //end of javascript code\n <?php if(strpos($_SERVER['REQUEST_URI'], '/checkout/cart/') !== false){?>\n jQuery(\".connectlbbtn\").parent().addClass('cart-forms');\n <?php }else{?>\n var regBox = jQuery(\".connectlbbtn\");\n jQuery(\".add-to-cart\").append(regBox);\n jQuery(\".add-to-cart\").css(\"clear\",\"both\");\n <?php }?>\n </script>\n <?php \n }", "title": "" }, { "docid": "a422b805501e6a4c9bcc90f0f9b1249b", "score": "0.6112817", "text": "public function addForm() {\n $this->view->displayForm();\n }", "title": "" }, { "docid": "cfd9272da0a1084da4fb313f24d6f820", "score": "0.60990715", "text": "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "title": "" }, { "docid": "581d0a65f7aab77ba17d70ba624ae63c", "score": "0.6069625", "text": "public function show(form $form)\n {\n //\n }", "title": "" }, { "docid": "272ec353cea055adf6f34a726cd0a812", "score": "0.60690105", "text": "function open_form($force_open=false,$exclude_send_buttons=false, $equery=false) {\r\n\t\tparent::open_form($force_open,$exclude_send_buttons, $equery);\r\n\t\tglobal $percorso;\r\n\t\t$percorso.=$this->percorso_agg;\r\n\t}", "title": "" }, { "docid": "5dac7d3b6858d8154e1a61ef626822e0", "score": "0.60115796", "text": "public function viewpopupAction()\n {\n\t\tZend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH.\"/layouts/scripts/popup/\");\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t$callval = $this->getRequest()->getParam('call');\n\t\tif($callval == 'ajaxcall')\n\t\t$this->_helper->layout->disableLayout();\n\t $objName = 'candidatedetails';\n\t\t\n\t\t$cand_model = new Default_Model_Candidatedetails();\t\n\t\t$candidateData = $cand_model->getcandidateData($id); \n\n\t\t$form = new Default_Form_Candidatedetails(); \n\t // $form->source->setAttrib(\"readonly\", \"true\");\n\t\t\n $form->source->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->referal->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->vendors->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->referalwebsite->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->emailid->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->contact_number->setAttrib(\"disabled\", \"disabled\");\n\t\t$form->skillset->setAttrib(\"disabled\", \"disabled\"); \n\n $form->submit->setLabel('Update'); \n\t\t$form->source->setValue($candidateData['source']);\n\t\n\t\tif($candidateData['source']==\"Website\" )\n\t\t{\n\t\t\t$form->referalwebsite->setValue($candidateData['source_val']);\n\t\t}\n\t\tif($candidateData['source']==\"Referal\" )\n\t\t{\n\t\t\t$form->referal->setValue($candidateData['source_val']);\n\t\t}\n\t\t\tif($candidateData['source']==\"Vendor\" )\n\t\t{\n\t\t\t$vendorsmodel= new Default_Model_Vendors();\n\t\t\t$vendorsdataArr=$vendorsmodel->getVendorsList();\n\t\t\t$req_options = array();\n\t\t\tforeach($vendorsdataArr as $vendorsdata){\n\t\t\t\t$form->vendors->addMultiOption($vendorsdata['id'],utf8_encode($vendorsdata['name']));\n\t\t\t}\n\t\t\t\n\t\t\t$form->vendors->setValue($candidateData['source_val']);\n\t\t}\n\t\t$cdata = array();\n\t $cdata['selected_option'] = \"candidatedetails\"; \n\t\t$this->view->cdata = $cdata;\n $form->populate($candidateData);\t\t\n\t\t$this->view->id = $id;\n\t\t$this->view->data = $candidateData;\n\t\t$this->view->form = $form;\n\t\tif($this->getRequest()->getPost())\n\t\t {\n\t\t\t \n\t\t if($form->isValid($this->_request->getPost()))\n { \n\t\t\t$candidate_firstname = $this->_getParam('candidate_firstname',null);\n $candidate_lastname = $this->_getParam('candidate_lastname',null);\n $candidate_name = $candidate_firstname.' '.$candidate_lastname;\n\t\t\t\n\t\t\t$data =array(\n \t'candidate_firstname' => trim($candidate_firstname),\n\t\t\t\t\t'candidate_lastname' => trim($candidate_lastname),\n 'candidate_name' => trim($candidate_name),\n 'modifieddate' => gmdate(\"Y-m-d H:i:s\"),\n );\n\t\t\t\t\n\t\t\t$where = \"id = \".$id;\n\t\t\t$result = $cand_model->SaveorUpdateCandidateData($data, $where);\n\t\t\t if(isset($id))\n {\n\t\t\t\t\t$candData = $cand_model->getSelectedCandidatesDetails();\n }\n else $candData = array();\n $opt ='';\n if(count($candData)>0)\n {\n foreach($candData as $record)\n {\n\t\t\t\t\t\n \t$opt .= sapp_Global::selectOptionBuilder($record['id'], $record['candidate_name']);\n }\n }\n\t\t\t\t$this->view->candidateid = $id ;\n\t\t\t\t$this->view->candData = $opt; \n $this->view->eventact = 'updated';\n $close = 'close';\n $this->view->popup=$close;\n $this->view->controllername =$objName;\n\t\t\t\t$this->view->candidatename =trim($candidate_name);\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\n $messages = $form->getMessages();\n foreach ($messages as $key => $val)\n {\n foreach($val as $key2 => $val2)\n {\n $msgarray[$key] = $val2;\n break;\n }\n }\n\t\t\t\t$this->view->msgarray = $msgarray;\n\t\t\n\t\t\t}\n\t\t }\n }", "title": "" }, { "docid": "91423f89be542ed4da003458a970a889", "score": "0.5989192", "text": "function responsive_popup_form()\n{\n\n $content = '';\n $content .= '<div class=\"form-container z-depth-5\">';\n $content .= '<div class=\"row\">';\n $content .= '<div id=\"closepopupbutton\">X</div>';\n $content .= '<form class=\"col s12\" id=\"reused_form\">';\n $content .= '<div class=\"row\">';\n $content .= '<h3 id=\"discount-heading3-text\">Vil du have 10% rabat på din næste ordre?</h3>';\n $content .= '<img src=\" '.plugins_url(\"responsive-popup-form/images/bgimage.jpg\").' \" alt=\"Zalando\" id=\"backgroundimg\" >';\n $content .= '</div>';\n $content .= '<div class=\"row\">';\n $content .= '<img src=\"https://mosaic02.ztat.net/nvg/z-header-fragment/zalando-logo/logo_default.svg\" alt=\"Zalandologo\" class=\"z-navicat-header_svgLogo\">';\n $content .= '</div>';\n $content .= '<div class=\"row\">';\n $content .= '<div class=\"input-field col s12\">';\n \n $content .= '<input id=\"name\" type=\"text\" name=\"name\" required class=\"validate\">';\n $content .= '<label for=\"name\">Name</label>';\n $content .= '</div>';\n $content .= '</div>';\n $content .= '<div class=\"row\">';\n $content .= '<div class=\"input-field col s12\">';\n $content .= '<input id=\"email\" type=\"email\" name=\"email\" required class=\"validate\">';\n $content .= '<label for=\"email\">Email</label>';\n $content .= '</div>';\n $content .= '</div>';\n $content .= '<div>';\n $content .= '<button class=\"waves-effect waves-light btn submitbtn\" type=\"submit\">Få 10% på dit næste køb</button>';\n $content .= '<p id=\"gdpr-text\">Se vores <a href=\"https://www.zalando.dk/zalando-databeskyttelse/\"> databeskyttelseserklæring</a> for information om, hvordan Zalando behandler dine data.</p>';\n $content .= '</div>';\n $content .= '</form>';\n $content .= '</div>';\n $content .= '</div>';\n \n return $content;\n \n}", "title": "" }, { "docid": "95a929d6f37a519ce44e4fb6384d3cfe", "score": "0.5981519", "text": "function showInputForm()\n {\n $user = common_current_user();\n\n $profile = $user->getProfile();\n\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_ostatus_sub',\n 'class' => 'form_settings',\n 'action' => $this->selfLink()));\n\n $this->hidden('token', common_session_token());\n\n $this->elementStart('fieldset', array('id' => 'settings_feeds'));\n\n $this->elementStart('ul', 'form_data');\n $this->elementStart('li');\n $this->input('profile',\n // TRANS: Field label for a field that takes an OStatus user address.\n _m('Subscribe to'),\n $this->profile_uri,\n // TRANS: Tooltip for field label \"Subscribe to\".\n _m('OStatus user\\'s address, like nickname@example.com or http://example.net/nickname.'));\n $this->elementEnd('li');\n $this->elementEnd('ul');\n // TRANS: Button text.\n $this->submit('validate', _m('BUTTON','Continue'));\n\n $this->elementEnd('fieldset');\n\n $this->elementEnd('form');\n }", "title": "" }, { "docid": "c50072c1459d931bfb7c0ef5ad43410b", "score": "0.5975096", "text": "function deals_display_popup_single(){\n if(is_singular('daily-deals') AND deals_is_free()):\n ?>\n <!-- popup form -->\n <div style=\"display:none\">\n <div id=\"subscribe_deals\">\n <h2 class=\"modal-title\"><?php _e('Download Form', 'wpdeals'); ?></h2>\n <h3 class=\"modal-tagline\"><?php _e('Enter your email below, for the download link.', 'wpdeals'); ?></h3>\n\n <div class=\"subs-container clearfix\">\n <div class=\"modal-download\">\n <div class=\"modal-icon\">\n <span class=\"email\"><?php _e('Download here', 'wpdeals'); ?></span>\n </div>\n <h4><?php _e('Enter your email', 'wpdeals'); ?></h4>\n <h5><?php _e('Check your INBOX or SPAM folder.', 'wpdeals'); ?></h5> \n <?php deals_form_subscribe(array('idform' => 'free-deals', 'free' => true, 'text' => 'Give Me!')); ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n endif;\n}", "title": "" }, { "docid": "e4238744add1bc0220b213e8d2cced09", "score": "0.5972477", "text": "function training_modal_form_callback($js) {\n if (!$js) {\n return drupal_get_form('training_modal_form');\n }\n ctools_include('modal');\n ctools_include('ajax');\n $form_state = array(\n 'ajax' => TRUE,\n 'title' => t('Demo AJAX form'),\n );\n $commands = ctools_modal_form_wrapper('training_modal_form', $form_state);\n if (!empty($form_state['executed'])) {\n $commands = array();\n $commands[] = ctools_modal_command_display(t('Some title'), '<strong>Hey</strong>, we are here');\n //$commands[] = ctools_modal_command_dismiss(); //hides modal\n }\n print ajax_render($commands);\n exit;\n}", "title": "" }, { "docid": "a138ca999ddda8466ee3362618b178d1", "score": "0.59650904", "text": "function popup_elements()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "443d532caa7702fa5727232ac56314b9", "score": "0.5960878", "text": "public function postModal();", "title": "" }, { "docid": "db41b053fc83cfaac90f9d8885be4b9a", "score": "0.59335816", "text": "function m_button2OnButtonClick( $event )\n {\n // Open the Relationships Frame.\n $relationships = new MyFrame3(null);\n $relationships->Show();\n }", "title": "" }, { "docid": "85e0e96f9d2a872aa8b56582c0d6cad5", "score": "0.59294957", "text": "function show()\r\n\t{\r\n\t\t?>\r\n\r\n\t\t<button class='textlayout' type=\"submit\" name=\"itemtoedit\" value=\"<?php echo $this->orderno ?>\" >\r\n\t\t\t<p>\r\n\t\t\t<span style='font-weight:bold'><?php echo $this->orderno . \". \" . $this->question ; ?></span>\r\n\t\t\t<span style='font-weight:normal'>(<?php echo $this->typeshort; ?>)</span><br>\r\n\t\t\t<span><?php $n = 1; foreach($this->answers as $answerobject){if ($n > 1){echo \", \";}$n ++;echo $answerobject->answer;}?></span>\r\n\t\t\t</p>\r\n\t\t</button><br>\r\n\t\t\r\n\t\t<?php \r\n\t}", "title": "" }, { "docid": "2b63f00c413e2e802d22f2a0a845bd6a", "score": "0.5905729", "text": "public function showForm()\n\t{\n\n return ['view'=>'customer/orderForm.php', 'ajax' => true ];\n }", "title": "" }, { "docid": "f131962f88984e1e7510e67fae833655", "score": "0.58961314", "text": "function openForm( $class = NULL, $id = NULL, $action = FALSE, $role = NULL )\r\n\t\t{\r\n\t\t\t# Open form and configure\r\n\t\t\tif( $action != FALSE )\r\n\t\t\t\t$this->form_action = $action;\r\n\r\n\t\t\techo \"<form id='$this->form_id' class='$this->form_token $this->form_id $this->form_class $class' method='$this->form_method' action='$this->form_action' role='$role' style = 'padding: 20px'>\";\r\n\r\n\t\t\techo \"<input type='hidden' name='$this->form_id-issubmitted' />\";\r\n\t\t}", "title": "" }, { "docid": "8f49aff8c7f210e25664836b1cc88371", "score": "0.5892075", "text": "public function create()\n {\n return view('popup::admin.popups.create');\n }", "title": "" }, { "docid": "a9cc2120077d4886de2b164676feb0a1", "score": "0.5885623", "text": "public function show(Form $form)\n {\n //\n }", "title": "" }, { "docid": "52d02b7cf8c9d886ac7977e2146e1f47", "score": "0.5873284", "text": "public function showNewClientButton()\n {\n $this->_showNewClientButton = true;\n }", "title": "" }, { "docid": "da0b7d84eb0d76db3d664f56d8a431cc", "score": "0.5865654", "text": "public function formAction()\r\n {\r\n \r\n\t\t$this->loadLayout();\r\n\t\t\r\n\t\t$root = $this->getLayout()->getBlock('root');\r\n\t\t$settemplate = \"page/1column.phtml\";\r\n\t\t$root->setTemplate($settemplate);\r\n\t\t\r\n $block = $this->getLayout()->createBlock(\r\n 'Mage_Core_Block_Template',\r\n 'advancedpermissions.vendor_form',\r\n array(\r\n 'template' => 'advancedpermissions/vendor_form.phtml'\r\n )\r\n );\r\n\r\n $this->getLayout()->getBlock('content')->append($block);\r\n $this->_initLayoutMessages('core/session');\r\n\t\t\r\n $this->renderLayout();\r\n\t\t\r\n }", "title": "" }, { "docid": "eb875dd1f0037515eaa6b759652c29dc", "score": "0.58612806", "text": "function displayFormChoiseAgent(){\n\t$contents='<form method=\"post\" action=\"index.php\" name=\"formChoiseAgent\" id=\"formChoiseAgent\" > \n\t\t\t <fieldset>\n\t\t\t <legend>Choix action</legend>\n\n\t\t\t \t<input type=\"submit\" name=\"newPatient\" id=\"newPatient\" value=\"Nouveau patient\" />\n\n\t\t\t <input type=\"submit\" name=\"FormSynthese\" id=\"FormSynthese\" value=\"Synthese patient & modif info\" />\n\t\t\t <input type=\"submit\" name=\"displayFormNssPatient\" id=\"displayFormNssPatient\" value=\"Recherche nss patient\" />\n\t\t\t <input type=\"submit\" name=\"displayTakeAppointment\" id=\"displayTakeAppointment\" value=\"Prendre un rdv\" />\n\t\t\t <input type=\"submit\" name=\"displayPayementDepot\" id=\"displayPayementDepot\" value=\"Payer & depot\" /> \n\t\t\t </fieldset>\n\t\t\t</form>';\n\treturn $contents;\n}", "title": "" }, { "docid": "66bbfb0eddb5d44111cc1267d03f8591", "score": "0.5852597", "text": "public function gluu_sso_form()\n {\n // add taskbar button\n\n $boxTitle = html::div(array('id' => \"prefs-title\", 'class' => 'boxtitle'), $this->gettext('hederGluu'));\n $this->include_stylesheet('GluuOxd_Openid/css/gluu-oxd-css.css');\n $this->include_script('GluuOxd_Openid/js/scope-custom-script.js');\n\n $tableHtml=$this->admin_html();\n unset($_SESSION['message_error']);\n unset($_SESSION['message_success']);\n return html::div(array('class' => ''),$boxTitle . html::div(array('class' => \"boxcontent\"), $tableHtml ));\n }", "title": "" }, { "docid": "046bf79a838f92f80e2e622ecd6a4c30", "score": "0.58489054", "text": "function zoeken_show()\n{\n global $db;\n global $tpl;\n global $sForm;\n $sFormTitle = \"Zoek een klant\";\n $sActionFileName = \"Productgroepen.php\";\n\n//-------------------------------\n// zoeken Open Event begin\n// zoeken Open Event end\n//-------------------------------\n $tpl->set_var(\"FormTitle\", $sFormTitle);\n $tpl->set_var(\"ActionPage\", $sActionFileName);\n//-------------------------------\n// Set variables with search parameters\n//-------------------------------\n $flds_naam = strip(get_param(\"s_naam\"));\n\n//-------------------------------\n// zoeken Show begin\n//-------------------------------\n\n\n//-------------------------------\n// zoeken Show Event begin\n// zoeken Show Event end\n//-------------------------------\n $tpl->set_var(\"s_naam\", tohtml($flds_naam));\n\n//-------------------------------\n// zoeken Show end\n//-------------------------------\n\n//-------------------------------\n// zoeken Close Event begin\n// zoeken Close Event end\n//-------------------------------\n $tpl->parse(\"Formzoeken\", false);\n//===============================\n}", "title": "" }, { "docid": "736d6dc3ce6efe9f0e6e2493781354a9", "score": "0.58397764", "text": "public function openModal()\n {\n $this->isModal = true;\n }", "title": "" }, { "docid": "113f799bfabfa31d2e1d0c211fe5376b", "score": "0.5830381", "text": "function showNoticeForm() {\n // nop\n }", "title": "" }, { "docid": "c467d95c7b3b5005d88d54c401e12220", "score": "0.58294034", "text": "function m_button3OnButtonClick( $event )\n {\n // Open the Relations Frame.\n $relations = new MyFrame4(null);\n $relations->Show();\n }", "title": "" }, { "docid": "8ef05e54ff585f8aa075631c1ce2747f", "score": "0.5817399", "text": "public function plugin_page() {\n\t\t$this->setting_api->show_forms();\n\t}", "title": "" }, { "docid": "61e09de8d53d6645bfcaf4b70ea398bf", "score": "0.58158696", "text": "function open_form($force_open=false,$exclude_send_buttons=false, $equery=false) {\r\n\t\t\r\n\t\t$in = $this->session_vars;\r\n\t\t$conn = $this->conn;\r\n\t\t$inputval = $this->tb_vals;\r\n\t\t$service = $this->service;\r\n\t\t$config_service = $this->config_service;\r\n\r\n//echo \"Ruolo \".$this->config_service['eQuerySpec']['Integrazione']['ROLE'].\"<br>\";\r\n//echo \"act \".$this->session_vars['WFact'].\"<br>\";\r\n\r\n\t\t$template_form_html = '';\r\n\t\tif ($this->xmr) {\r\n\t\t\tif ($in [$config_service ['PK_SERVICE']] != 'next') {\r\n\t\t\t\tif (isset ( $in ['VISITNUM'] ) && isset ( $in ['ESAM'] )) {\r\n\t\t\t\t\t$sql_query = \"select visitclose from {$service}_COORDINATE where VISITNUM=:visitnum and ESAM=:esam and VISITNUM_PROGR=:visitnum_progr and {$config_service['PK_SERVICE']}=:pk_service\";\r\n\t\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t\tunset($bind);\r\n\t\t\t\t\t$bind['VISITNUM']=$in['VISITNUM'];\r\n\t\t\t\t\t$bind['ESAM']=$in['ESAM'];\r\n\t\t\t\t\t$bind['VISITNUM_PROGR']=$in['VISITNUM_PROGR'];\r\n\t\t\t\t\t$bind['PK_SERVICE']=$in[$config_service['PK_SERVICE']];\r\n\t\t\t\t\t//$sql->set_sql ( $sql_query );\r\n\t\t\t\t\t$sql->exec ($sql_query,$bind);//binded\r\n\t\t\t\t\t$sql->get_row ();\r\n\t\t\t\t\tif ($sql->row ['VISITCLOSE'] == 1 && $in ['USER_TIP'] == 'DE' && !$force_open) {\r\n\t\t\t\t\t\terror_page ( $in ['remote_userid'], $this->testo(\"visitIsClosed\"), \"\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$editing = true;\r\n\t\tif($this->config_service['lang']==\"en\")$lang=1;\r\n\t\telse $lang=0;\r\n\t\t$this->salva_js = \"\r\n\t\t \t\tfunction salva_f(){\r\n\t\t \t\tcf();\r\n\t\t \t\tf=document.forms[0];\r\n\t\t\t\t\tel=f.elements;\r\n\r\n\t\t\t\t\tspecifiche='A=ON&L=$lang&F=0';\r\n\t\t \t\tc1='';\r\n\t\t \t\t\";\r\n\t\t$this->invia_js = \"\r\n\t\t \t\tfunction invia_f(ajax){\r\n\t\t \t\tcf();\r\n\t\t \t\tif (ajax==undefined) ajax=true;\r\n\t\t \t\tf=document.forms[0];\r\n\t\t\t\t\tel=f.elements;\r\n\t\t\t\t\tspecifiche='A=ON&L=$lang&F=0';\r\n\t\t \t\tc1='';\r\n\t\t \t\t\";\r\n\t\t$this->check_js = '\r\n\t\t \t\tfunction cf(){\r\n\t\t \t\tvar el;\r\n\t\t \t\tvar f;\r\n\t\t \t\tf=document.forms[0];\r\n\t\t\t\t\tel=f.elements;\r\n\t\t \t\tdocument.forms[0].action=\\'\\';\r\n\t\t \t\t';\r\n\t\t$colonne = $this->form ['COLS'];\r\n\t\t$sysdate = date ( \"dmY\" );\r\n\t\tif (isset($_GET['link_to']) && $_GET['link_to']!='') $this->form ['LINK_TO']=$_GET['link_to'];\r\n\t\t$this->percorso_agg= \"&nbsp;&gt;&nbsp;<b>\" . $this->form ['TITOLO'] . \"</b>\";\r\n\t\tif ($equery){\r\n\t\t\t$showAsOpen=false;\r\n\t\t\t$sql_query=\"select equery_int from {$this->service}_eq where stato in (0,2) and {$this->PK_SERVICE}={$in[$this->PK_SERVICE]}\";\r\n\t\t\t$sql=new query($this->conn);\r\n\t\t\tif ($sql->get_row($sql_query)) $equery_int=$sql->row['EQUERY_INT'];\r\n\t\t\telse $equery_int=0;\r\n\t\t\t\r\n\t\t\t$sql_query_2=\"select EQ_ACTION,INIZIO,FINE from {$this->service}_COORDINATE where PROGR=:progr and VISITNUM=:visitnum and ESAM=:esam and VISITNUM_PROGR=:visitnum_progr and {$config_service['PK_SERVICE']}=:pk_service\";\r\n\t\t\t$bind['VISITNUM']=$in['VISITNUM'];\r\n\t\t\t$bind['ESAM']=$in['ESAM'];\r\n\t\t\t$bind['PROGR']=$in['PROGR'];\r\n\t\t\t$bind['VISITNUM_PROGR']=$in['VISITNUM_PROGR'];\r\n\t\t\t$bind['PK_SERVICE']=$in[$config_service['PK_SERVICE']];\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif ($sql->get_row($sql_query_2, $bind) && $sql->row['INIZIO']==1 ){\r\n\t\t\t\t\r\n\t\t\t\t$eq_action=$sql->row['EQ_ACTION'];\r\n\t\t\t\tif ($sql->row['EQ_ACTION']==1) $showAsOpen=true;\r\n\t\t\t\telse $showAsOpen=false; \r\n\t\t\t}else $showAsOpen=true;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif ($equery_int!='') {\r\n\r\n\t\t\t\tif(strtolower($this->config_service['lang'])=='en'){\r\n\t\t\t\t\t$string_text=\"Warning! fields with the symbol <img src=\\\"images/eq_img.png\\\" width=20px> has been modified\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$string_text=\"Attenzione! i campi contrassegnati con il simbolo <img src=\\\"images/eq_img.png\\\" width=20px> hanno subito modifiche\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$note_eq=\"\r\n\t\t\t\t<div style='font-align:center;color:red;font-weight:bold'>\r\n\t\t\t\t$string_text\r\n\t\t\t\t</div>\r\n\t\t\t\t\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$in ['form']=htmlentities($in ['form']);\r\n\t\t$this->body = $note_eq.'\r\n\t\t\t\t\t <form method=\"post\" class=\"niceform\" action=\"index.php\" enctype=\"multipart/form-data\" onsubmit=\"return false;\" onKeypress=\"if (event.keyCode==13) return false;\">\r\n\t\t <input type=\"hidden\" name=\"' . $this->form ['TABLE'] . '\"/>\r\n\t\t <input type=\"hidden\" name=\"form\" value=\"' . $in ['form'] . '\"/>\r\n\t\t <input type=\"hidden\" name=\"link_to\" value=\"' . $this->form ['LINK_TO'] . '\"/>\r\n\t\t <table align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"98%\">\r\n\t\t\t\t\t\t\t\t\t <tbody>\r\n\t\t\t\t\t\t\t\t\t \t<tr>\r\n\t\t\t\t\t\t\t\t\t \t\t<td>\r\n\t\t\t\t\t\t\t\t\t ';\r\n\r\n\t\t$width = 100 / ($colonne * 2);\r\n\t\tif ($this->form ['TEMPLATE'] != '' && $in ['genera_template_html'] != \"si\")\r\n\t\t$template = file_get_contents ( \"xml/{$this->form['TEMPLATE']}\" );\r\n\t\telse {\r\n\t\t\t$this->body .= '\r\n\t\t\t \t\t\t\t <table class=\"sf\" align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\"><tr>\r\n\t\t\t \t\t\t\t <!-- CAMPI -->' . $testo_rev;\r\n\t\t\t$template_form_html = '\r\n\t\t\t\t<table class=\"sf\" align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\"><tr>\r\n\t\t\t \t\t\t\t <!-- CAMPI -->';\r\n\t\t\t$template = '';\r\n\t\t\tfor($i = 0; $i < $colonne; $i ++) {\r\n\t\t\t\t$this->body .= \"<td width=\\\"\" . $width . \"%\\\">&nbsp;</td><td width=\\\"\" . $width . \"%\\\">&nbsp;</td>\";\r\n\t\t\t\t$template_form_html .= \"<td width=\\\"\" . $width . \"%\\\">&nbsp;</td><td width=\\\"\" . $width . \"%\\\">&nbsp;</td>\";\r\n\t\t\t}\r\n\t\t\t$this->body .= \"</tr>\";\r\n\t\t\t$template_form_html .= \"</tr>\";\r\n\r\n\t\t}\r\n\r\n\t\t$c = 0;\r\n\t\tforeach ( $this->fields as $i => $val ) {\r\n\t\t\t\r\n\t\t\tif ($val ['CONDITION'] != '')\r\n\t\t\t$condition_array [count ( $condition_array )] = $val ['CONDITION'];\r\n\t\t\tif($val ['TYPE']==\"file_cme\" || $val ['TYPE']==\"file_doc\") {\r\n\t\t\t\t$file_doc_eq['VAR']=$val['VAR'];\r\n\t\t\t\t$file_doc_eq['THREAD']=$val['THREAD'];\r\n\t\t\t\t$file_doc_eq['TOPIC']=$val['TOPIC'];\r\n\t\t\t\t$files_doc[]=$file_doc_eq;\r\n\t\t\t\t/*\r\n\t\t\t [TYPE] => file_doc\r\n\t\t\t\t [VAR] => COMUNICAZIONI_FILE\r\n\t\t\t\t [THREAD] => Comunicazione\r\n\t\t\t\t [TOPIC] => Communications to AIFA\r\n\t\t\t\t */\r\n\t\t\t}\r\n\t\t}\r\n\t\t$condition_array = array_unique ( $condition_array );\r\n\t\t\r\n\t\tif ($equery){\r\n\r\n\t\t\tif($equery_int!=\"\" || $equery_int!=\"0\") {\r\n\r\n\t\t\t$_GET['VISITNUM_PROGR']-=0;\r\n\r\n\t\t\tif(isset($_GET['PROGR'])) $progr=$_GET['PROGR'];\r\n\t\t\telse $progr=1;\r\n\r\n\t\t\t$sql_query=\"select * from {$this->service}_eqfield where\r\n\t\t\t\teq_int=:eq_id\r\n\t\t\t\tand esam=:esam\r\n\t\t\t\tand visitnum=:visitnum\r\n\t\t\t\tand visitnum_progr=:visitnum_progr\r\n\t\t\t\tand progr=:progr\r\n\t\t\t\tand {$this->PK_SERVICE}=:pk_service\r\n\t\t\t\t\";\r\n\r\n//\t\t\techo( $sql_query.\"<br>\");\r\n\t\t\tunset($bind);\r\n\t\t\t$bind['EQ_ID']=$equery_int;\r\n\t\t\t$bind['ESAM']=$_GET['ESAM'];\r\n\t\t\t$bind['VISITNUM']=$_GET['VISITNUM'];\r\n\t\t\t$bind['VISITNUM_PROGR']=$_GET['VISITNUM_PROGR'];\r\n\t\t\t$bind['PROGR']=$progr;\r\n\t\t\t$bind['PK_SERVICE']=$_GET[$this->PK_SERVICE];\r\n\t\t\t$sql->exec($sql_query,$bind);//binded\r\n\t\t\t\r\n\t\t\t//------------------------------------\r\n\t\t\t$id_tipo_ref=$config_service['PRJ']*100000+$_GET[$this->PK_SERVICE];\r\n\t\t\t\r\n//\t\t\tprint_r($files_doc);\r\n\r\n\t\t\tforeach($files_doc as $l=>$allegati) {\r\n\t\t\tunset($bind_array);\r\n\t\t\t$topic=preg_replace(\"/'/\", \"''\", $allegati['TOPIC']);\r\n\t\t\tif ($topic!='') {\r\n\t\t\t\t$topic_where=\"topic=:topic\";\r\n\t\t\t\t$bind_array['TOPIC']=$topic;\r\n\t\t\t}\r\n\t\t\telse $topic_where=\"topic is null\";\t\r\n\t\t\t\t\r\n\t\t\t$thread=$allegati['THREAD'];\r\n\t\t\t$thread=preg_replace(\"/'/\", \"''\", $thread);\r\n\r\n\t\t\t$thread=str_replace(\"Ó\",\"%\",$thread);\r\n\t\t\t$thread=str_replace(\"Ŕ\",\"%\",$thread);\r\n\t\t\t$thread=str_replace(\"ý\",\"%\",$thread);\r\n\t\t\t$thread=str_replace(\"˛\",\"%\",$thread);\r\n\t\t\t$thread=str_replace(\"¨\",\"%\",$thread);\r\n\t\t\r\n\t\t\t$bind_array['ID_TIPO_REF']=$id_tipo_ref;\r\n\t\t\t$bind_array['TITOLO']=$thread;\r\n\t\t\t//PENULTIMO!!!\r\n\t\t\t$sql_query=\"\r\n\t\t\t\tselect\r\n\t\t\t\t d.id,\r\n\t\t\t d.titolo as titolo,\r\n\t\t\t d.autore,\r\n\t\t\t d.data,\r\n\t\t\t d.keywords as keywords,\r\n\t\t\t (select\r\n\t\t\t NOME_FILE\r\n\t\t\t from docs d1\r\n\t\t\t \twhere d1.tipo_doc='Doc_Area'\r\n\t\t\t \tand d1.id_tipo_ref=:id_tipo_ref\r\n\t\t\t \tand d1.id=\r\n\t\t\t \t\t(select max(d2.id) from docs d2\r\n\t\t\t \t\t\twhere d2.tipo_doc='Doc_Area'\r\n\t\t\t and d2.id_tipo_ref=:id_tipo_ref\r\n\t\t\t and d2.id_ref=d.id and d2.id<(select\r\n\t\t\t max(d99.id)\r\n\t\t\t from docs d99\r\n\t\t\t where d99.tipo_doc='Doc_Area'\r\n\t\t\t and d99.id_tipo_ref=:id_tipo_ref\r\n\t\t\t and d99.id_ref=d.id\r\n\t\t\t ))\r\n\t\t\t ) as nome_file,\r\n\t\t\t (\r\n\t\t\t select\r\n\t\t\t max(d3.id)\r\n\t\t\t from docs d3\r\n\t\t\t where d3.tipo_doc='Doc_Area' and d3.id_tipo_ref=:id_tipo_ref and d3.id_ref=d.id and d3.id<(select\r\n\t\t\t max(d99.id)\r\n\t\t\t from docs d99\r\n\t\t\t where d99.tipo_doc='Doc_Area'\r\n\t\t\t and d99.id_tipo_ref=:id_tipo_ref\r\n\t\t\t and d99.id_ref=d.id\r\n\t\t\t )\r\n\t\t\t ) as last_ver\r\n\t\r\n\t\t\t from docs d\r\n\t\t\t where\r\n\t\t\t \ttipo_doc='Doc_Area'\r\n\t\t\t \tand id_tipo_ref=:id_tipo_ref\r\n\t\t\t \tand id=id_ref\r\n\t\t\t \tand $topic_where\r\n\t\t\t\t\t\tand d.titolo like :TITOLO\r\n\t\t\t\t\t\";\r\n//\t\t\techo( \"<br>\".$sql_query.\"<br>1172\");\r\n\t\t\t$sql2=new query($this->conn);\r\n\t\t\t$sql2->exec($sql_query, $bind_array);//binded\r\n\t\t\t$sql2->get_row();\r\n\t\t\t//piccolo trick per i documenti allegati\r\n\t\t\tforeach($files_doc as $key => $val) {\r\n\t\t\t\tif($sql2->row['KEYWORDS']==$val['VAR']) {\r\n\t\t\t\t\t$this->old_values[$val['VAR']]=$sql2->row['LAST_VER'];\r\n\t\t\t\t\t$this->old_values_docs_nomi[$val['VAR']]=$sql2->row['NOME_FILE'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t} //chiudo qua foreach $c\r\n\t\t\t//------------------------------------\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ($this->tb_vals as $k=>$v) {\r\n\t\t\t\t$this->old_values[$k]=$v;\r\n\t\t\t}\r\n\r\n\t\t\twhile ($sql->get_row()){\r\n\t\t\t\t$this->tb_vals[$sql->row['FIELD']]=$sql->row['VALORE'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach ( $this->fields as $i => $val ) {\r\n\t\t\tif (isset ( $val ['TYPE'] ) && $val ['TYPE'] != '')\r\n\t\t\t$field_type = \"field_{$val['TYPE']}\";\r\n\t\t\telse\r\n\t\t\t$field_type = \"field\";\r\n\t\t\t\r\n\t\t\tif ($this->config_service['field_lib'] != '' && file_exists ( $this->config_service['field_lib'] . $field_type . \".inc\" )) {\r\n\t\t\t\tinclude_once $this->config_service['field_lib'] . $field_type . \".inc\";\r\n\t\t\t} else\r\n\t\t\tinclude_once \"{$field_type}.inc\";\r\n\t\t\t$field_obj = new $field_type ( $this, $i, $this->conn, $this->tb_vals, $this->session_vars, $this->service, $this->errors );\r\n\t\t\tif (isset($condition_array) && is_array($condition_array)) foreach ( $condition_array as $key => $val ) {\r\n\t\t\t\tif ($val == $field_obj->id)\r\n\t\t\t\t$field_obj->attributes ['CALL_CF'] = \"yes\";\r\n\t\t\t}\r\n\t\t\tif ($inputval [$this->form ['READONLY']] == 1 && $inputval [$field_obj->id] != '') {\r\n\r\n\t\t\t\tif ($field_obj->id != $this->form ['READONLY_COMM']) {\r\n\r\n\t\t\t\t\t$field_obj->attributes ['DISABLED'] = 'yes';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($showAsOpen) $field_obj->make_open_html ();\r\n\t\t\telse $field_obj->make_open_html ($equery);\r\n\t\t\tif ($template == '') {\r\n\t\t\t\tif ($field_obj->attributes ['HIDE'] == 'yes') {\r\n\t\t\t\t\tif (isset ( $field_obj->attributes ['NAME'] ) && $field_obj->attributes ['NAME'] != '') {\r\n\t\t\t\t\t\t$template_form_html .= \"</tr>\\n<tr id='tr_{$field_obj->attributes['NAME']}'>\";\r\n\t\t\t\t\t\t$this->body .= \"</tr>\\n<tr id='tr_{$field_obj->attributes['NAME']}'>\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$template_form_html .= \"\\n<tr id='tr_{$field_obj->attributes['VAR']}'>\";\r\n\t\t\t\t\t\t$this->body .= \"\\n<tr id='tr_{$field_obj->attributes['VAR']}'>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$c = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($colonne == $c) {\r\n\t\t\t\t\t$template_form_html .= \"</tr>\\n\";\r\n\t\t\t\t\t$this->body .= \"</tr>\\n\";\r\n\t\t\t\t\t$c = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif ($c == 0 && $field_type != 'field_hidden' && $field_obj->attributes ['HIDE'] != 'yes') {\r\n\t\t\t\t\t$this->body .= \"<tr>\";\r\n\t\t\t\t\t$template_form_html .= \"<tr>\";\r\n\t\t\t\t}\r\n\t\t\t\t#echo $c;\r\n\t\t\t\tif ($field_obj->attributes ['TYPE'] != 'hidden') {\r\n\t\t\t\t\tif ($field_obj->attributes ['COLS'] == '')\r\n\t\t\t\t\t$c ++;\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$c += $field_obj->attributes ['COLS'];\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif ($field_obj->attributes ['COLS'] == '')\r\n\t\t\t\t$field_obj->attributes ['COLS'] = 1;\r\n\t\t\t\tif ($field_obj->attributes ['COLSPAN'] == '')\r\n\t\t\t\t$field_obj->attributes ['COLSPAN'] = 1;\r\n\t\t\t\t$colspan = $field_obj->attributes ['COLS'] * $field_obj->attributes ['COLSPAN'];\r\n\t\t\t\tif ($field_obj->attributes ['TYPE'] != '') {\r\n\t\t\t\t\tif ($field_obj->attributes ['COLSPAN'] == 1) {\r\n\t\t\t\t\t\tif ($field_obj->attributes ['TYPE'] == 'hidden') {\r\n\r\n\t\t\t\t\t\t\t$template_form_html .= \"<<{$field_obj->id}>>\";\r\n\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t$template_form_html .= \"\r\n\t\t\t\t<td class='destra' colspan=\\\"$colspan\\\" id=\\\"cell_{$field_obj->id}\\\"><<TESTO {$field_obj->id}>></td>\r\n\t\t\t\t<td class='input' colspan=\\\"$colspan\\\" id=\\\"cell_input_{$field_obj->id}\\\"><<{$field_obj->id}>></td>\r\n\t\t\t\t\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif ($field_obj->attributes ['TYPE'] == 'hidden')\r\n\t\t\t\t\t\t$template_form_html .= \"<<{$field_obj->id}>>\";\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t$template_form_html .= \"\r\n\t\t\t\t\t<td class='input' colspan=\\\"$colspan\\\" id=\\\"cell_input_{$field_obj->id}\\\"><<TESTO {$field_obj->id}>><<{$field_obj->id}>></td>\r\n\t\t\t\t\t\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else\r\n\t\t\t\t$template_form_html .= \"\\n\" . $field_obj->html;\r\n\r\n\t\t\t\t$this->body .= \"\\n\" . $field_obj->html;\r\n\t\t\t} else {\r\n\t\t\t\t$template = str_replace ( \"<<{$field_obj->id}>>\", $field_obj->input_field, $template );\r\n\t\t\t\t$template = str_replace ( \"<<TESTO {$field_obj->id}>>\", $field_obj->input_txt, $template );\r\n\t\t\t}\r\n\t\t\t$this->salva_js .= $field_obj->salva_js;\r\n\t\t\t$this->check_js .= $field_obj->check_js;\r\n\t\t\t$this->invia_js .= $field_obj->invia_js;\r\n\t\t\t$this->script_js .= $field_obj->script;\r\n\t\t\tif (! $field_obj->validata)\r\n\t\t\t$this->validata = $field_obj->validata;\r\n\t\t\t$controlli .= $field_obj->controlli;\r\n\t\t}\r\n\t\t$js_function_on_send = $this->form ['JS_FUNCTION'];\r\n\t\tif ($this->form ['JS_ONSAVE'] == \"yes\")\r\n\t\t$js_function_on_save = $this->form ['JS_FUNCTION'];\r\n\t\telse\r\n\t\t$js_function_on_save = $this->form ['JS_ONSAVE'];\r\n\t\t$js_function_on_load = $this->form ['LOAD'];\r\n\t\tif ($template == '') {\r\n\t\t\t$this->body .= \"\r\n\t\t <!--FINE CAMPI-->\r\n\t\t \";\r\n\t\t\t$template_form_html .= \"\r\n\t\t\t<!--FINE CAMPI-->\r\n\t\t\t</table>\r\n\t\t\t\";\r\n\t\t}\r\n\t\tif ($in ['genera_template_html'] == \"si\") {\r\n\t\t\tdie ( $template_form_html );\r\n\t\t}\r\n\t\t$this->onload = $js_function_on_load;\r\n\t\t$this->onload .= 'cf()';\r\n\t\t$this->check_js .= '\r\n\t\t }';\r\n\t\tif($this->config_service['jquery']) $this->check_js .= '$(document).ready(function(){'.$this->script_js.\"\r\n\t\t});\r\n\t\t \";\r\n\t\t$this->salva_js .= '\r\n\t\t rc=contr(c1,specifiche);\r\n\t\t\tif (rc) {return false}\r\n\t\t\t' . $controlli . '\r\n\t\t if (!rc){\r\n\t\t ' . $js_function_on_save . '\r\n\t\t document.forms[0].INVIOCO.value=\\'0\\';\r\n\t\t document.forms[0].action=\\'index.php\\';\r\n\t\t el=document.getElementsByTagName(\\'TR\\')\r\n\t\t for (i=0;i<el.length;i++) el[i].style.display=\\'\\';\r\n\t\t f=document.forms[0];\r\n\t\t\t el=f.elements;\r\n\t\t for (i=0;i<el.length;i++) el[i].disabled=false;\r\n\t\t ajax_send_form(0);\r\n\r\n\t\t }\r\n\t\t }';\r\n\t\t if($this->config_service['jquery2'])$contr=\"jContr\";\r\n\t\t else $contr=\"contr\";\r\n\t\t$this->invia_js .= '\r\n\t\t rc='.$contr.'(c1,specifiche);\r\n\t\t\t\tif (rc) {return false}\r\n\t\t ' . $controlli . '\r\n\t\t if (!rc){\r\n\t\t\t ' . $js_function_on_send . '\r\n\t\t\t document.forms[0].INVIOCO.value=\\'1\\';\r\n\t\t\t document.forms[0].action=\\'index.php\\';\r\n\t\t\t el=document.getElementsByTagName(\\'TR\\')\r\n\t\t \t\tfor (i=0;i<el.length;i++) el[i].style.display=\\'\\';\r\n\t\t\t f=document.forms[0];\r\n\t\t\t\t el=f.elements;\r\n\t\t\t for (i=0;i<el.length;i++) el[i].disabled=false;\r\n\t\t\t if (document.forms[0].EQUERY_INT) {\r\n\t\t\t \tdocument.forms[0].submit();\r\n\t\t\t \t\treturn;\r\n\t\t\t\t}\r\n\t\t\t if (ajax) ajax_send_form(0);\r\n\t\t\t else document.forms[0].submit();\r\n\t\t\t }\r\n\t\t }';\r\n\t\tif ($template == '')\r\n\t\t$this->body .= '</table><p align=center>';\r\n\t\telse\r\n\t\t$this->body .= $template . \"<p align=center>\";\r\n\t\tif (isset ( $in ['eform'] ) && $in ['USER_TIP'] != 'DM')\r\n\t\t$this->body .= '\r\n\t\t 1<input type=\"submit\" value=\"Vai alla form\" name=\"equery\" onclick=\"window.location.href=\\'index.php?equery&amp;VISITNUM=\\'+document.forms[0].VISITNUM.value+\\'&amp;ESAM=\\'+document.forms[0].VISITNUM.value+\\'&amp;{$this->PK_SERVICE}=\\'+document.forms[0].{$this->PK_SERVICE}.value+\\'&amp;CENTER=\\'+document.forms[0].CENTER.value+\\'&amp;QUESTION=\\'+document.forms[0].QUESTION.value+\\'&amp;PROGR=\\'+document.forms[0].PROGR.value;\"/>\r\n\t\t ';\r\n\t\tif ($equery){\r\n\r\n\t\t\tif(strtolower($this->config_service['lang'])=='en'){\r\n\t\t\t\t\t$integra_button_text=\"Integrate eQuery\";\r\n\t\t\t}else{\r\n\t\t\t\t\t$integra_button_text=\"Integra Scheda\";\r\n\t\t\t}\r\n\r\n\t\t\t$this->body .= '\r\n\t\t\t<input type=\"hidden\" value=\"'.$equery_int.'\" name=\"EQUERY_INT\">\r\n\t\t \t2<input type=\"submit\" value=\"'.$integra_button_text.'\" name=\"salva\" onclick=\"invia_f();\"/>';\r\n\t\t\t$exclude_send_buttons=true;\r\n\t\t}\r\n\t\tif(!$exclude_send_buttons){\r\n\t\t\tif ($this->buttons ['SALVA'] && ($in ['USER_TIP'] != 'DM' || isset ( $in ['eform'] )))\r\n\t\t\t#GC NUOVA_GRAFICA\r\n\t\t\t//$this->body .= '\r\n\t\t //\t<input type=\"submit\" value=\"' . $this->buttons ['SALVA'] . '\" name=\"salva\" onclick=\"salva_f();\"/>';\r\n\t\t\t$this->body .= '\r\n\t\t\t\t\t\t\t<button class=\"btn btn-warning\" type=\"button\" name=\"salva\" onclick=\"salva_f();\">\r\n\t\t\t\t\t\t\t\t<i class=\"fa fa-floppy-o bigger-110\"></i>\r\n\t\t\t\t\t\t\t\t'.$this->buttons ['SALVA'].'\r\n\t\t\t\t\t\t\t\t</button>';\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\tif ($this->buttons ['SUBMIT'] != '')\r\n\t\t\t$this->body .= '\r\n\t\t \t4<input type=\"submit\" value=\"' . $this->buttons ['SUBMIT'] . '\" onclick=\"submit();\"/>';\r\n\r\n\t\t\t/*else {\r\n\t\t\t $this->body.='\r\n\t\t\t <input type=\"hidden\" value=\"1\" name=\"eQuery_Integrazione_Send_\">\r\n\t\t\t 5<input type=\"submit\" value=\"Salva Modifiche\" name=\"eQuery_Integrazione_Send\" onclick=\"invia_f(false);\"/>';\r\n\t\t\t }*/\r\n\r\n\t\t\tif ($this->buttons ['INVIA'] && $in ['USER_TIP'] != 'DM' || (isset ( $in ['FORM'] ) || isset ( $in ['SEARCH'] )))\r\n\t\t\t\r\n\t\t\t//$this->body .= '<input type=\"submit\" value=\"' . $this->buttons ['INVIA'] . '\" name=\"invia\" onclick=\"invia_f();\"/>';\r\n\t\t\t$this->body .= '\r\n\t\t\t\t\t\t\t<button class=\"btn btn-info\" type=\"submit\" name=\"invia\" onclick=\"invia_f();\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-lock bigger-110\"></i>\r\n\t\t\t\t\t\t\t\t'.$this->buttons ['INVIA'].'\r\n\t\t\t\t\t\t\t\t</button>';\r\n\t\t\t\r\n\t\t\tif ($in ['USER_TIP'] == 'DM' && ! isset ( $in ['FORM'] ) && ! isset ( $in ['SEARCH'] )) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\tglobal $PROGR;\r\n\r\n\t\t\t\t$query = \"select id , to_char(quest_dt,'DD/MM/YYYY') as data from {$this->config_service['service_root']}_equery where visitnum=:visitnum and esam=:esam and progr=:progr and {$this->PK_SERVICE}=:pk_service and validata is null --and to_be_validate=1\";\r\n\t\t\t\t// echo $query;\r\n\t\t\t\tunset($bind);\r\n\t\t\t\t$bind['VISITNUM']=$in['VISITNUM'];\r\n\t\t\t\t$bind['ESAM']=$in['ESAM'];\r\n\t\t\t\t$bind['PROGR']=$PROGR;\r\n\t\t\t\t$bind['PK_SERVICE']=$in[$this->PK_SERVICE];\r\n\t\t\t\t//$sql->set_sql ( $query );\r\n\t\t\t\t$sql->exec ($query,$bind);//binded\r\n\t\t\t\twhile ( $sql->get_row () ) {\r\n\t\t\t\t\t$equery_option .= \"<option value=\\\"{$sql->row['ID']}\\\">Equery number {$sql->row['ID']} Equery data {$sql->row['DATA']}</option>\";\r\n\t\t\t\t}\r\n\t\t\t\tif($this->config_service['lang']==\"en\") {\r\n\t\t\t\t\t$reason=\"Reason for change:\";\r\n\t\t\t\t\t$send=\"Send\";\r\n\t\t\t\t\t$opt1=\"Documentation of change\";\r\n\t\t\t\t\t$opt2=\"Data entry error\";\r\n\t\t\t\t\t$alert_msg=\"WARNING!!! It\\\\'s necessary to choose a reason for the revision\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$reason=\"Motivo della modifica:\";\r\n\t\t\t\t\t$send=\"Procedi\";\r\n\t\t\t\t\t$opt1=\"Documentazione di cambiamento\";\r\n\t\t\t\t\t$opt2=\"Errore inserimento dati\";\r\n\t\t\t\t\t$alert_msg=\"ATTENZIONE!!! E\\\\' necessario scegliere un motivo della modifica\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->body .= \"$reason\r\n\t\t \t\t<select name='ID_QUERY'>\r\n\t\t \t\t\t<option></option>\r\n\t\t\t\t\t\t<OPTION VALUE=\\\"-2\\\">$opt1</option>\r\n\t\t\t\t\t\t<OPTION VALUE=\\\"-1\\\">$opt2</option>\r\n\t\t\t\t\t\t$equery_option\r\n\t\t \t\t</select><br/>\r\n\t\t \t\t<input type=\\\"submit\\\" value=\\\"$send\\\" name=\\\"invia_dm\\\" onclick=\\\"\r\n\t\t \t\t\tif (document.forms[0].ID_QUERY.value!='') invia_f();\r\n\t\t \t\t\telse {alert ('$alert_msg');document.forms[0].ID_QUERY.focus(); return false;}\r\n\t\t \t\t\t\\\"/>\r\n\t\t \t\";\r\n\t\t}\r\n\t\tif ($this->buttons ['ANNULLA'])\r\n\t\t#GC NUOVA_GRAFICA\r\n\t\t//$this->body .= '\r\n\t\t// <input type=\"reset\" value=\"' . $this->buttons ['ANNULLA'] . '\" name=\"annulla\" onclick=\"resetForm();return false;\" />';\r\n\t\t$this->body .= '\r\n\t\t\t\t\t\t<button class=\"btn\" type=\"reset\" >\r\n\t\t\t\t\t\t\t\t<i class=\"icon-undo bigger-110\"></i>\r\n\t\t\t\t\t\t\t\t'.$this->buttons ['ANNULLA'].'\r\n\t\t\t\t\t\t\t\t</button>';\r\n\t\t\t\t\t\t\t\t\r\n\t\tif ($this->buttons ['CANCELLA'])\r\n\t\t#GC NUOVA_GRAFICA\r\n\t\t//$this->body .= '\r\n\t\t// <input type=\"button\" value=\"' . $this->buttons ['CANCELLA'] . '\" name=\"cancella\" onclick=\"resetForm();return false;\" />';\r\n\t\t$this->body .= '\r\n\t\t\t\t\t\t<button class=\"btn\" type=\"reset\" >\r\n\t\t\t\t\t\t\t\t<i class=\"icon-undo bigger-110\"></i>\r\n\t\t\t\t\t\t\t\t'.$this->buttons ['CANCELLA'].'\r\n\t\t\t\t\t\t\t\t</button>';\r\n\t\t}\r\n\t\t//*****\r\n\t\t//modifica in revisione all'azienda 9/9/10\r\n\t\tif ($this->buttons ['INREVISIONE'] && $in ['USER_TIP'] != 'DM' && !$equery ) {\r\n\t\t\t$this->body .= '\r\n\t\t \t<br />7<input type=\"submit\" value=\"' . $this->buttons ['INREVISIONE'] . '\" name=\"inrevisione\" style=\"color:red;\" onclick=\"salva_f();document.forms[0].INREV.value=1;\"/>';\r\n\t\t}\r\n\t\t//*****\r\n\t\t$this->body .= '</p></table>';\r\n\t\tif(!$exclude_send_buttons) $this->body .= '</form>';\r\n\t\t$config_service=$this->config_service;\r\n\t\tif ($config_service ['PK_SERVICE'] == '')\r\n\t\t$this->PK_SERVICE = 'CODPAT';\r\n\t\telse\r\n\t\t$this->PK_SERVICE = $config_service ['PK_SERVICE'];\r\n\t\tglobal $vlist;\r\n\t\tif (!isset($in['SEARCH']) && $in [$this->PK_SERVICE] != '' && ! isset ( $vlist->esams [$in ['VISITNUM']] [$in ['ESAM']] ['ALL_IN'] ) && !$exclude_send_buttons) {\r\n\t\t\tif($this->form['NO_JS_BACK']==\"\") $history=\"onclick=\\\"history.back(); return false;\\\"\";\r\n\t\t\t$this->body .= '\r\n\t\t <p align=left><a href=\"index.php?exams=visite_exams.xml&amp;CENTER=' . $in ['CENTER'] . '&amp;' . $this->PK_SERVICE . '=' . $in [$this->PK_SERVICE].'&VISITNUM='.$in ['VISITNUM'].'\" '.$history.'>&lt;&lt;' . $config_service ['Torna_lista_schede'] . '</a></p>';\r\n\t\t}\r\n\t\t$href_alternativo = \"index.php?CENTER=\" . $in ['CENTER'] . \"&{$this->PK_SERVICE}=\" . $in [$this->PK_SERVICE] . \"&VISITNUM=\" . $in ['VISITNUM'] . \"&ESAM=\" . $in ['ESAM'] . \"&PROGR=\" . $in ['PROGR'] . \"&DOWN=1\";\r\n\t\t$this->body = preg_replace ( \"/#HREF#/\", $href_alternativo, $this->body );\r\n\t}", "title": "" }, { "docid": "e7e2bf6bbb5ae805b8d981325459aa15", "score": "0.5799926", "text": "function rt_button_show($target)\n{\n return rt_ui_button('show', $target, 'search');\n}", "title": "" }, { "docid": "a220dd6f8dae2eea5f553ccff71e12ee", "score": "0.57938665", "text": "public function openModal()\n {\n $this->confirmationArchived = true;\n }", "title": "" }, { "docid": "ebfd74f35b781636da7c010b26c8d1dc", "score": "0.5786433", "text": "function InputPopup($desc,$name,$field_value=\"\",$popuptype=\"\",$form_name=\"\",$ins_field_text=\"\",$ins_field_value=\"\",$size=\"25\",$class=\"inputbox\") {\n\n\t\t$show_popup=\"<img src='images/nuovext/16x16/actions/new_window.png' OnClick=\\\"window.open('bin/new_window/\".$popuptype.\".php?form_name=\".$form_name.\"&field_text=\".$ins_field_text.\"&field_value=\".$ins_field_value.\"','Insert Data','scrollbars=no,status=no,width=400,height=350')\\\">\\n\";\n\n\t\t$this->form.=\"<tr>\\n\";\n\t\t\t$this->form.=\"<td valign='top'>\".$desc.\"</td>\\n\";\n\t\t\t$this->form.=\"<td><input type='text' name='\".$name.\"' class='\".$class.\"' value='\".$field_value.\"' size='\".$size.\"'>\".$show_popup.\"</td>\\n\";\n\t\t$this->form.=\"</tr>\\n\";\n\t}", "title": "" }, { "docid": "eee10223b74ab88a282d97872944be53", "score": "0.5785837", "text": "public function printContent()\n {\n $this->includeFieldComponent('selectwithpopup');\n }", "title": "" }, { "docid": "54f43d01fb97e7fbd9b11929da4c9794", "score": "0.57856345", "text": "public function setAlertForm();", "title": "" }, { "docid": "bfc84e24c607e6d90eac4f8cb2243468", "score": "0.5776989", "text": "function modal_form() {\n $event_id = decode_id($this->request->getPost('encrypted_event_id'), \"event_id\");\n $model_info = $this->Events_model->get_one($event_id);\n\n $model_info->start_date = $model_info->start_date ? $model_info->start_date : $this->request->getPost('start_date');\n $model_info->end_date = $model_info->end_date ? $model_info->end_date : $this->request->getPost('end_date');\n $model_info->start_time = $model_info->start_time ? $model_info->start_time : $this->request->getPost('start_time');\n $model_info->end_time = $model_info->end_time ? $model_info->end_time : $this->request->getPost('end_time');\n\n //for a specific share, we have to find that if it's been shared with team member or client's contact\n $model_info->share_with_specific = \"\";\n if ($model_info->share_with && $model_info->share_with != \"all\") {\n $share_with_explode = explode(\":\", $model_info->share_with);\n $model_info->share_with_specific = $share_with_explode[0];\n }\n\n $view_data['client_id'] = $this->request->getPost('client_id');\n\n //don't show clients dropdown for lead's estimate editing\n $client_info = $this->Clients_model->get_one($model_info->client_id);\n if ($client_info->is_lead) {\n $view_data['client_id'] = $client_info->id;\n }\n\n $view_data['model_info'] = $model_info;\n $view_data['members_and_teams_dropdown'] = json_encode(get_team_members_and_teams_select2_data_list());\n $view_data['time_format_24_hours'] = get_setting(\"time_format\") == \"24_hours\" ? true : false;\n\n\n //prepare clients dropdown, check if user has permission to access the client\n $client_access_info = $this->get_access_info(\"client\");\n\n $clients_dropdown = array();\n if ($this->login_user->is_admin || $client_access_info->access_type == \"all\") {\n $clients_dropdown = $this->get_clients_and_leads_dropdown(true);\n }\n\n $view_data['clients_dropdown'] = $clients_dropdown;\n\n $view_data[\"can_share_events\"] = $this->can_share_events();\n\n //prepare label suggestion dropdown\n $view_data['label_suggestions'] = $this->make_labels_dropdown(\"event\", $model_info->labels);\n\n $view_data[\"custom_fields\"] = $this->Custom_fields_model->get_combined_details(\"events\", $view_data['model_info']->id, $this->login_user->is_admin, $this->login_user->user_type)->getResult();\n\n return $this->template->view('events/modal_form', $view_data);\n }", "title": "" }, { "docid": "f7351fd6c0ab986f732e018a1ef5f5bc", "score": "0.5771509", "text": "function display($tpl = null) \n {\n \t$this->config = JComponentHelper::getParams('com_convertforms');\n $this->latestleads = ConvertForms\\Helper::getLatestLeads();\n\n \tJHTML::_('behavior.modal');\n JHtml::_('bootstrap.popover');\n JHtml::stylesheet('jui/icomoon.css', array(), true);\n\n JToolBarHelper::title(JText::_('COM_CONVERTFORMS'));\n\n // Display the template\n parent::display($tpl);\n }", "title": "" }, { "docid": "93af5c54d778ce36cada2dd0ed748ea2", "score": "0.5769143", "text": "function showForms() {\n global $lang;\n if($this->_getConvert()) {\n include_once(\"./html/importshop.html.php\");\n }\n }", "title": "" }, { "docid": "c299b17238244237eaf3c8f51abca8c0", "score": "0.57670456", "text": "protected function showYesNoClick() {\n\n\t\t\t$dlgYesNo = new \\QCubed\\Project\\Jqui\\Dialog();\t// Note here there is no \"$this\" as the first parameter. By leaving this off, you\n\t\t\t\t\t\t\t\t\t\t// are telling QCubed to manage the dialog.\n\t\t\t$dlgYesNo->Text = t(\"Do you like QCubed?\");\n\t\t\t$dlgYesNo->AddButton ('Yes');\n\t\t\t$dlgYesNo->AddButton ('No');\n\t\t\t$dlgYesNo->AddAction (new \\QCubed\\Event\\DialogButton(), new \\QCubed\\Action\\Ajax ('dlgYesNo_Button'));\n\t\t\t$dlgYesNo->Resizable = false;\n\t\t\t$dlgYesNo->HasCloseButton = false;\n\t\t}", "title": "" }, { "docid": "452038554cb37287575693f3651ea539", "score": "0.57630986", "text": "public function openModal()\n {\n $this->isModal = true;\n }", "title": "" }, { "docid": "d6650bab4c03d1e959f36ad4aca1be2b", "score": "0.5742723", "text": "function DisplayLoginPopup()\n\t{\n\t\t$this->LoadPage('generic_popup');\n\t\t$this->Page->SetName(\"Login\");\n\t\t$this->Page->AddObject('UserLogin', COLUMN_ONE, HTML_CONTEXT_POPUP);\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "aa2d9b6beb92c919fbed2d6bba498d98", "score": "0.57423055", "text": "function solicitar_cotizacion($form)\n\n\t{\n\n echo '<div class=\"variations_button\">\n <a class=\"single_add_to_cart_button button\" href=\"#openModal\">Solicitar este Producto</a></div>';\n echo '<div id=\"openModal\" class=\"modalDialog\">\n \t<div>\n\t\t\t<a href=\"#close\" title=\"Close\" class=\"close\">X</a>\n\t\t</div>'.\n\t\t\t\t '<div id=\"formulario\">';\n\t\t\t\t \tgravity_form($form, $display_title=false, $display_description=false, $display_inactive=false, $field_values=null, $ajax=true ); \n\t \n\techo\t'</div><!--pagar-->';\n\techo\t'</div>';\t\n\t\t \n\n\t\tdo_action( 'woocommerce_after_add_to_cart_button' ); \n\t\t\n\t}", "title": "" }, { "docid": "4049d8f17d42014ac00f3c1826097cb2", "score": "0.5740804", "text": "function form_open ($plus = '') {\r\n echo '<form '.$plus.'>';\r\n}", "title": "" }, { "docid": "2bd55526c152f6f5240bd0f2c82c6ee3", "score": "0.57331955", "text": "function closeForm()\r\n\t\t{\r\n\t\t\t# Open form and configure\r\n\t\t\techo \"</form>\";\r\n\t\t}", "title": "" }, { "docid": "5f470d096a9f33f3c9ea711d2a0d2b05", "score": "0.5731144", "text": "public function show_action() {\n if (Request::submitted('save')) {\n CSRFProtection::verifyUnsafeRequest();\n $this->setBody(Request::get('body'));\n }\n $this->actionHeader();\n $this->renderBodyTemplate('show');\n }", "title": "" }, { "docid": "b04af9c26fb25b904d8e2536c4810270", "score": "0.5710527", "text": "function form($instance) {\n\t\techo '<p>Place on any sidebar to display upcoming webinars.</p>';\n\t}", "title": "" }, { "docid": "00725c957a4f327e89599e35dbfc2c1a", "score": "0.5707267", "text": "function estimateSignDetailsPopupAction()\n\t{\n\t\tif($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$quote_id=$this->_request->getParam('quote_id');\n\n\t\t\tif($quote_id)\n\t\t\t{\n\t\t\t\t$quoteObj=new Ep_Quote_Quotes();\n\t\t\t\t$quoteDetails=$quoteObj->getQuoteDetails($quote_id);\n\t\t\t\tif($quoteDetails)\n\t\t\t\t{\n\t\t\t\t\t$this->_view->quote=$quoteDetails[0];\n\t\t\t\t\t$this->render('estimate-sign-details-popup');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "defc4b3942a2f18e22729e2b0f9c4434", "score": "0.5706629", "text": "public function registration_button() {\n\n $rewardProgrammeName = Mage::getStoreConfig('lbconfig_section/lb_settings_group/reward_programme_name_field');\n Lb_Points_Helper_Data::$rewardProgrammeName = $rewardProgrammeName;\n if(isset($_SESSION['LB_Session']))\n {\n if(!empty($_SESSION['LB_Session'])) \n {\n $LB_Session = $_SESSION['LB_Session'];\n Lb_Points_Helper_Data::debug_log(\"Rendered session user with his LB Points\", true);\n ?>\n <div class=\"connectlbbtn lb-box\">\n <span class=\"h2\"><?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span>\n <div class=\"loyaltybox-info-contain\">\n <?php \n if(isset($_SESSION['LB_Session']['totalRedeemPoints']))\n $remainingPoints = $LB_Session['lb_points'] - $_SESSION['LB_Session']['totalRedeemPoints'];\n else\n $remainingPoints = $LB_Session['lb_points'];\n ?>\n <?php echo \"<strong>Hi \".$LB_Session['Customer Name'].\"</strong> | <a id='lbLogout' href='javascript:void(0);'>Logout(\".Lb_Points_Helper_Data::$rewardProgrammeName.\")</a></br>You have \".$remainingPoints.\" Points in your <strong>\".Lb_Points_Helper_Data::$rewardProgrammeName.\"</strong> account.\"; ?>\n </div>\n <div class=\"lbMsg\"></div>\n </div>\n <?php\n } \n else \n {\n Lb_Points_Helper_Data::debug_log(\"Rendered Connect with Loyalty Box button\", true);\n ?>\n <div class=\"connectlbbtn registrationBtn lb-box\">\n <button class=\"button btn-cart\" onclick=\"return showForm('popup_form_registration')\" title=\"Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>\" type=\"button\"><span><span>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span></span></button>\n <div class=\"lbMsg\"></div>\n </div>\n \n <script type=\"text/javascript\">\n function showForm(id){\n win = new Window({ title: \"Connect with Loyalty Box\", zIndex:3000, destroyOnClose: true, recenterAuto:true, resizable: false, width:400, height:'auto', minimizable: true, maximizable: false, draggable: true});\n win.setContent(id, false, false);\n win.showCenter();\n }\n </script>\n <?php\n Lb_Points_Helper_Data::debug_log(\"End: Rendered Connect with Loyalty Box button\", true);\n }\n }\n else \n {\n Lb_Points_Helper_Data::debug_log(\"Rendered Connect with Loyalty Box button\", true);\n ?>\n <div class=\"connectlbbtn registrationBtn lb-box\">\n <button class=\"button btn-cart\" onclick=\"return showForm('popup_form_registration')\" title=\"Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>\" type=\"button\"><span><span>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span></span></button>\n <div class=\"lbMsg\"></div>\n </div>\n <script type=\"text/javascript\">\n function showForm(id){\n win = new Window({ title: \"Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>\", zIndex:3000, destroyOnClose: true, recenterAuto:true, resizable: false, width:400, height:'auto', minimizable: true, maximizable: false, draggable: true});\n win.setContent(id, false, false);\n win.showCenter();\n }\n </script>\n <?php\n Lb_Points_Helper_Data::debug_log(\"End: Rendered Connect with Loyalty Box button\", true);\n }\n }", "title": "" }, { "docid": "54fa80c57ea6c2bd4c0398f21623cec9", "score": "0.5700012", "text": "public function openAddPanel()\n {\n sleep(1);\n // TODO: Add ID to \"Add\" button\n $this->_webui->clickButton('.btn.btn-primary.btn-xs.pull-right.mb20');\n }", "title": "" }, { "docid": "6f171b67c360821f9b0e1be19b7786dc", "score": "0.5699739", "text": "public function form( $instace ){\n echo '<p><strong>Widget ini belum bisa diubag secara Manual!</strong><br> Hubungi developer untuk melakukan perubahan</p>'; \n }", "title": "" }, { "docid": "7d77002e887f32734a59038863cda2d0", "score": "0.56942105", "text": "function showContent()\n {\n if (!empty($this->error)) {\n $this->element('p', 'error', $this->error);\n }\n\n if ($this->boolean('ajax')) {\n $this->showAjaxReviseForm();\n } else {\n $form = new QnareviseanswerForm($this->answer, $this);\n $form->show();\n }\n\n return;\n }", "title": "" }, { "docid": "4bb1145be1f53087a25deaf22980f203", "score": "0.5680471", "text": "function cp_print_popUp($firstBtnValue,$title,$content,$btnType,$btnValue,$btnName){\r\n echo \"<span class='btn-wrapper'><label for='popup-first-btn' class='popup-btn btn'>$firstBtnValue</label></span>\",\r\n '<input id=\"popup-first-btn\" type=\"radio\" name=\"popup-conf\" class=\"popup-first-btn btn\" value=\"none\">',\r\n '<div class=\"popup-night\">',\r\n '<div class=\"popup-box\" >',\r\n \"<h4>$title</h4>\",\r\n \"<p>$content</p>\",\r\n '<input id=\"popup-exit\" type=\"radio\" name=\"popup-conf\">',\r\n '<label for=\"popup-exit\">&times;</label>',\r\n \"<span class='btn-wrapper'><input class='popup-final-btn btn' name='$btnName' value='$btnValue' type='$btnType'></span>\",\r\n '</div>',\r\n '</div> ';\r\n}", "title": "" }, { "docid": "6519e7badace5b82ddd65056133b5ec8", "score": "0.567928", "text": "function showFaveForm()\n {\n if (Event::handle('StartShowFaveForm', array($this))) {\n $user = common_current_user();\n if ($user) {\n if ($user->hasFave($this->notice)) {\n $disfavor = new DisfavorForm($this->out, $this->notice);\n $disfavor->show();\n } else {\n $favor = new FavorForm($this->out, $this->notice);\n $favor->show();\n }\n }\n Event::handle('EndShowFaveForm', array($this));\n }\n }", "title": "" }, { "docid": "e75f4eb9d709549f0a0f3c29c3e9c1b2", "score": "0.5666122", "text": "public function form()\n\t{\n\t\treturn $this->request->isPageConfirm()\n\t\t\t? $this->formConfirm()\n\t\t\t: $this->formForm();\n\t}", "title": "" }, { "docid": "86e29bcc93735034e89e1277cc6a81e0", "score": "0.5655913", "text": "function modal_form() {\r\n\r\n $view_data['data_warehouse'] = $this->Master_Warehouse_model->getWarehouseDrop();\r\n $view_data['data_items'] = $this->Master_Items_model->getItemsDrop();\r\n $this->load->view('stock/modal_form',$view_data);\r\n }", "title": "" }, { "docid": "f8bf0898621c1f6d663ef713fb758d34", "score": "0.56549793", "text": "public function popupScreen() {\n\t\t$this->return_val->status = 1;\n\t\t$this->return_val->msg = \"\";\n\t\t$data[\"friends\"] = $this->formatDBFriends($this->CoverModel->getFriends($this->fb_user_info->facebook_id));\n\t\t$this->return_val->popup = $this->load->view(\"coverpopup\", $data, TRUE);\n\t\techo json_encode($this->return_val);\n\t}", "title": "" }, { "docid": "a8010ba685ab4337a8b59a35f8de12cc", "score": "0.565407", "text": "function openlayers_component_form_start_submit($form, &$form_state) {\n $class = new Drupal\\openlayers\\UI\\OpenlayersComponents();\n $class->init($form_state['plugin']);\n $class->edit_form_submit($form, $form_state);\n}", "title": "" }, { "docid": "f82ecac4b9d353f2cf5d33568f8eee5a", "score": "0.56488985", "text": "public function show_box()\n\t\t{\n\t\t\techo '<div id=\"mfn-wrapper\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"mfn-builder-nonce\" value=\"'. wp_create_nonce('mfn-builder-nonce') .'\" />';\n\t\t\t\tmfn_builder_show();\n\t\t\techo '</div>';\n\t\t}", "title": "" }, { "docid": "cc122a33c020f997e7f1aa38416391e3", "score": "0.564064", "text": "public function displayFormAction() {\n $params = t3lib_div::_GET('libconnect');\n\n //include CSS\n $this->decideIncludeCSS();\n\n $cObject = t3lib_div::makeInstance('tslib_cObj');\n $form = $this->ezbRepository->loadForm();\n\n //variables for template\n $this->view->assign('vars', $params['search']);\n $this->view->assign('form', $form);\n $this->view->assign('siteUrl', $cObject->getTypolink_URL($GLOBALS['TSFE']->id));//current URL\n $this->view->assign('listUrl', $cObject->getTypolink_URL($this->settings['flexform']['listPid']));//url to search\n $this->view->assign('listPid', $this->settings['flexform']['listPid']);//ID of list view\n }", "title": "" }, { "docid": "e0c3fd257ef429e125084bc395050b87", "score": "0.5630509", "text": "public function addpopupAction()\n {\n \tZend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH.\"/layouts/scripts/popup/\");\n \t$req_model = new Default_Model_Requisition();\n \t$cand_model = new Default_Model_Candidatedetails();\n \t$cand_work_model = new Default_Model_Candidateworkdetails();\n \t$countriesModel = new Default_Model_Countries();\n \t$controllername = 'candidatedetails';\n \t$auth = Zend_Auth::getInstance();\n \t$msgarray = array();\n \t$popConfigPermission = array();\n \tif($auth->hasIdentity()){\n \t\t$loginUserId = $auth->getStorage()->read()->id;\n \t\t$loginuserRole = $auth->getStorage()->read()->emprole;\n \t\t$loginuserGroup = $auth->getStorage()->read()->group_id;\n \t}\n \t\n \tif(sapp_Global::_checkprivileges(COUNTRIES,$loginuserGroup,$loginuserRole,'add') == 'Yes'){\n \t\tarray_push($popConfigPermission,'country');\n \t}\n \tif(sapp_Global::_checkprivileges(STATES,$loginuserGroup,$loginuserRole,'add') == 'Yes'){\n \t\tarray_push($popConfigPermission,'state');\n \t}\n \tif(sapp_Global::_checkprivileges(CITIES,$loginuserGroup,$loginuserRole,'add') == 'Yes'){\n \t\tarray_push($popConfigPermission,'city');\n \t}\n \t\n \t$req_data = $req_model->getRequisitionsForCV(\"'Approved','In process'\");\n \t$req_options = array();\n \tforeach($req_data as $req){\n \t\t$req_options[$req['id']] = $req['requisition_code'].' - '.$req['jobtitlename'];\n \t}\n \tif(count($req_options)==0)\n \t{\n \t\t$msgarray['requisition_id'] = \"No approved requisitions.\";\n \t}\n \t$id = $this->getRequest()->getParam('id');\n \t$callval = $this->getRequest()->getParam('call');\n \tif($callval == 'ajaxcall')\n \t\t$this->_helper->layout->disableLayout();\n \t\n \t\t$form = new Default_Form_Candidatedetails();\n \t\t$form->setAction(BASE_URL.'candidatedetails/addpopup');\n \t\t$countrieslistArr = $countriesModel->getTotalCountriesList();\n \t\tif(sizeof($countrieslistArr)>0){\n \t\t\t$form->country->addMultiOption('','Select Country');\n \t\t\tforeach($countrieslistArr as $countrieslistres)\n \t\t\t{\n \t\t\t\t$form->country->addMultiOption($countrieslistres['id'],utf8_encode($countrieslistres['country_name']) );\n \t\t\t}\n \t\t}else{\n \t\t\t$msgarray['country'] = 'Countries are not configured yet.';\n \t\t}\n \t\n \t\t$form->requisition_id->addMultiOptions(array(''=>'Select Requisition ID')+$req_options);\n \t\tif(isset($_POST['country']) && $_POST['country']!='')\n \t\t{\n \t\t\t$statesmodel = new Default_Model_States();\n \t\t\t$statesmodeldata = $statesmodel->getStatesList(intval($_POST['country']));\n \t\t\t$st_opt = array();\n \t\t\tif(count($statesmodeldata) > 0)\n \t\t\t{\n \t\t\t\tforeach($statesmodeldata as $dstate)\n \t\t\t\t{\n \t\t\t\t\t$st_opt[$dstate['id'].'!@#'.$dstate['state_name']] = $dstate['state_name'];\n \t\t\t\t}\n \t\t\t}\n \t\t\t$form->state->addMultiOptions(array(''=>'Select State')+$st_opt);\n \t\t}\n \t\tif(isset($_POST['state']) && $_POST['state']!='')\n \t\t{\n \t\t\t$citiesmodel = new Default_Model_Cities();\n \t\t\t$citiesmodeldata = $citiesmodel->getCitiesList(intval($_POST['state']));\n \t\t\t$ct_opt = array();\n \t\t\tif(count($citiesmodeldata) > 0)\n \t\t\t{\n \t\t\t\tforeach($citiesmodeldata as $dcity)\n \t\t\t\t{\n \t\t\t\t\t$ct_opt[$dcity['id'].'!@#'.$dcity['city_name']] = $dcity['city_name'];\n \t\t\t\t}\n \t\t\t}\n \t\t\t$form->city->addMultiOptions(array(''=>'Select City')+$ct_opt);\n \t\t}\n \t\t$data = array();\n \t\n \t\t$data['cand_resume'] = $this->_getParam('cand_resume');\n \t\t$data['selected_option'] = $this->_getParam('selected_option');\n \t\t$this->view->form = $form;\n \t\t$this->view->data = $data;\n \t\t$this->view->popConfigPermission = $popConfigPermission;\n \t\t$this->view->msgarray = $msgarray;\n \t if($this->getRequest()->getPost())\n \t {\n \t\t\n $auth = Zend_Auth::getInstance();\n \tif($auth->hasIdentity())\n {\n $loginUserId = $auth->getStorage()->read()->id;\n }\n $cand_model = new Default_Model_Candidatedetails();\n $candwork_model = new Default_Model_Candidateworkdetails();\n $req_model = new Default_Model_Requisition();\n\t\t$requisition_id = $this->_getParam('requisition_id',null);\n\t\t$cand_status = $this->_getParam('cand_status',null);\n\t\t$ststidflag1 = $this->_getParam('ststidflag1',null);\n\t\t$flag = 'true';\n\t\tif($ststidflag1 == 'true'){\n\t\t\tif($requisition_id == ''){\n\t\t\t\t$msgarray['requisition_id'] = 'Please select requisition id.';\n\t\t\t\t$flag = 'false';\n\t\t\t}\n\t\t\tif($cand_status == ''){\n\t\t\t\t$msgarray['cand_status'] = 'Please select status.';\n\t\t\t\t$flag = 'false';\n\t\t\t}\n\t\t}\n\t\t$this->view->ststidflag1 = $ststidflag1;\n\t\t$buttonval= $this->_getParam('submit',null);\n\t\t$country = $this->_getParam('country',null);\n $state = $this->_getParam('state',null);\n $city = $this->_getParam('city',null);\n if($form->isValid($this->_request->getPost()) && $flag == 'true')\n { \n $id = $this->getRequest()->getParam('id');\n $requisition_id = $this->_getParam('requisition_id',null);\n $candidate_firstname = $this->_getParam('candidate_firstname',null);\n $candidate_lastname = $this->_getParam('candidate_lastname',null);\n $candidate_name = $candidate_firstname.' '.$candidate_lastname;\n $cand_resume = $this->_getParam('cand_resume',null);\n $emailid = $this->_getParam('emailid',null);\n $contact_number = $this->_getParam('contact_number',null);\n $qualification = $this->_getParam('qualification',null);\n $experience = $this->_getParam('experience',null);\n $skillset = $this->_getParam('skillset',null);\n $education_summary = $this->_getParam('education_summary',null);\n $summary = $this->_getParam('summary',null);\n $cand_location = $this->_getParam('cand_location',null);\n \n $pincode = $this->_getParam('pincode',null);\n $cand_status = $this->_getParam('cand_status',null);\n for($i=0;$i<3;$i++)\n {\n $txt_cname[] = $this->_getParam('txt_cname'.$i,null);\n $txt_desig[] = $this->_getParam('txt_desig'.$i,null);\n $txt_from[] = $this->_getParam('txt_from'.$i,null);\n $txt_to[] = $this->_getParam('txt_to'.$i,null);\n $txt_cnumber[] = $this->_getParam('txt_cnumber'.$i,null);\n $txt_website[] = $this->_getParam('txt_website'.$i,null);\n $txt_address[] = $this->_getParam('txt_address'.$i,null);\n }\n $hidworkdata = $this->_getParam('hidworkdata',null);\n \n\t\t\t\t$req_records = $cand_model->getcountofrecords($requisition_id);\n\t\t\t\tif(empty($req_records)) \n\t\t\t\t{\n\t\t\t\t\t$rdata = array(\n\t\t\t\t\t\t\t'req_status' => 'In process',\n\t\t\t\t\t\t\t'modifiedby' => trim($loginUserId),\n\t\t\t\t\t\t\t'modifiedon' => gmdate(\"Y-m-d H:i:s\")\n\t\t\t\t\t);\n\t\t\t\t\t$rwhere = ' id = '.$requisition_id;\n\t\t\t\t\t$req_model->SaveorUpdateRequisitionData($rdata, $rwhere);\n\t\t\t\t}\n\t\t\t\t$data = array(\n 'requisition_id' => $requisition_id,\n\t\t\t\t\t'candidate_firstname' => trim($candidate_firstname),\n\t\t\t\t\t'candidate_lastname' => trim($candidate_lastname),\n 'candidate_name' => trim($candidate_name),\n 'emailid' => trim($emailid),\n 'contact_number' => trim($contact_number)==''?NULL:trim($contact_number),\n\t\t\t\t\t'cand_resume' => $cand_resume,\n 'qualification' => trim($qualification),\n 'experience' => trim($experience),\n 'skillset' => trim($skillset),\n 'education_summary' => trim($education_summary),\n 'summary' => trim($summary),\n 'cand_location' => trim($cand_location),\n 'country' => intval($country),\n 'state' => intval($state),\n 'city' => intval($city),\n\t\t\t\t\t'pincode' => $pincode,\n 'cand_status' => $cand_status,\n 'isactive' => 1,\n 'createdby' => trim($loginUserId),\n 'modifiedby' => trim($loginUserId),\n 'createddate' => gmdate(\"Y-m-d H:i:s\"),\n 'modifieddate' => gmdate(\"Y-m-d H:i:s\"),\n );\n if(trim($contact_number)=='')\n unset($data['contact_number']);\n if(trim($emailid)=='')\n unset($data['emailid']);\n $where = \"\";\n $actionflag = 1;\n if($id != ''){\n unset($data['createdby']);\n unset($data['createdon']);\n unset($data['isactive']);\n $where = \"id = \".$id;\n $tableid = $id;\n $actionflag = 2;\n }\n $result = $cand_model->SaveorUpdateCandidateData($data, $where);\n $cid=$result;\n if($id == '')\n $tableid = $result;\n \n if($result != '')\n {\n //saving of candidate work details\n if(count($txt_cname)>0)\n {\n $k =0 ;\n foreach($txt_cname as $cname)\n {\n if($cname != '')\n {\n $cdata = array(\n 'cand_id' => $tableid,\n 'company_name' => $cname,\n 'contact_number' => $txt_cnumber[$k],\n 'company_address' => $txt_address[$k],\n 'company_website' => $txt_website[$k],\n 'cand_designation' => $txt_desig[$k],\n 'cand_fromdate' => sapp_Global::change_date($txt_from[$k],'database'),\n 'cand_todate' => sapp_Global::change_date($txt_to[$k],'database'),\n 'isactive' => 1,\n 'createdby' => trim($loginUserId),\n 'modifiedby' => trim($loginUserId),\n 'createddate' => gmdate(\"Y-m-d H:i:s\"),\n 'modifieddate' => gmdate(\"Y-m-d H:i:s\"), \n );\n $cwhere = ($hidworkdata[$k]!='')?\"id = \".$hidworkdata[$k]:\"\";\n $candwork_model->SaveorUpdateCandidateWorkData($cdata, $cwhere);\n }\n $k++;\n }\n }\n //end of saving of candidate work details\n $menumodel = new Default_Model_Menu();\n $objidArr = $menumodel->getMenuObjID('/candidatedetails');\n $objID = $objidArr[0]['id'];\n $result = sapp_Global::logManager($objID,$actionflag,$loginUserId,$tableid);\n \n }\n \n \n \n if(isset($requisition_id))\n {\n \t$candData = $cand_model->fetchAll('isactive = 1 and requisition_id = '.$requisition_id)->toArray();\n }\n else $candData = array();\n \n $opt ='';\n if(count($candData)>0)\n {\n foreach($candData as $record)\n {\n \t$opt .= sapp_Global::selectOptionBuilder($record['id'], $record['candidate_name']);\n }\n }\n \n $this->view->candData = $opt;\n \n $this->view->eventact = 'added';\n $close = 'close';\n $this->view->popup=$close;\n $this->view->controllername = $controllername;\n \n }\n else\n {\n $messages = $form->getMessages();\n foreach ($messages as $key => $val)\n {\n foreach($val as $key2 => $val2)\n {\n $msgarray[$key] = $val2;\n break;\n }\n }\n\t if(isset($country) && $country != 0 && $country != '')\n\t\t\t\t{\n\t\t\t\t\t$statesmodel = new Default_Model_States();\n\t\t\t\t\t$statesmodeldata = $statesmodel->getStatesList(intval($country));\n\t\t\t\t\t$form->state->clearMultiOptions();\n\t\t\t\t\t$form->city->clearMultiOptions();\n\t\t\t\t\t$form->state->addMultiOption('','Select State');\n\t\t\t\t\tforeach($statesmodeldata as $res)\n\t\t\t\t\t$form->state->addMultiOption($res['id'],utf8_encode($res['state_name']));\n\t\t\t\t\tif(isset($state) && $state != 0 && $state != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$form->setDefault('state',$state);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t if(isset($state) && $state != 0 && $state != '')\n\t\t\t\t{\n\t\t\t\t\t$citiesmodel = new Default_Model_Cities();\n\t\t\t\t\t$citiesmodeldata = $citiesmodel->getCitiesList(intval($state));\n\t\t\t\t\t\t\n\t\t\t\t\t$form->city->addMultiOption('','Select City');\n\t\t\t\t\tforeach($citiesmodeldata as $res)\n\t\t\t\t\t$form->city->addMultiOption($res['id'],utf8_encode($res['city_name']));\n\t\t\t\t\tif(isset($city) && $city != 0 && $city != '')\n\t\t\t\t\t$form->setDefault('city',$city);\n\t\t\t\t}\n\t\t\t\t$this->view->msgarray = $msgarray;\n\t\t\t\t$this->view->messages = $msgarray;\n \t\n }\n \n \n \t}\n }", "title": "" }, { "docid": "d3a0a6d4c038116576e94234e32b6840", "score": "0.56279147", "text": "function add_fl_popup(){\n?>\n<script type=\"text/javascript\">\nfunction InsertLightboxForm(){\n\tvar d=new Date();\n\tfl_class = d.getTime();\n\tvar fl_form_text = jQuery(\"#fl_form_text\").val();\n\tvar fl_form_title = jQuery(\"#fl_form_title\").val();\n\tvar fl_form_code = jQuery(\"#fl_form_code\").val();\n\tvar fl_form_style = jQuery(\"#fl_form_style\").val();\n\tvar fl_form_onload = jQuery(\"#fl_form_onload\").val();\n\tvar win = window.dialogArguments || opener || parent || top;\n\twin.send_to_editor('[formlightbox_call title=\"' + fl_form_title + '\" class=\"' + fl_class + '\"]' + fl_form_text + '[/formlightbox_call]\\r\\n[formlightbox_obj id=\"' + fl_class + '\" style=\"' + fl_form_style + '\" onload=\"' + fl_form_onload + '\"]' + fl_form_code + '[/formlightbox_obj]');\n}\n</script> \n<div id=\"fl_form\" style=\"display:none;\">\n\t<div id=\"form-lightbox\">\n \t<div style=\"padding:10px 0\">\n\t\t\t<h3><?php _e(\"Insert Lightbox Form\", \"form-lightbox\"); ?></h3>\n\t\t\t<span><?php _e(\"\", \"form-lightbox\"); ?></span>\n\t\t</div><br>\n\t\t<div style=\"padding:10px 0;\">\n\t\t\t<table><tr>\n\t\t\t\t<td class=\"first\"><label for=\"fl_form_text\"><?php _e(\"Link Text\", \"form-lightbox\") ?></label></td>\n \t\t\t<td><input type=\"text\" value=\"Click here\" id=\"fl_form_text\" name=\"fl_form_text\" /><br />\n\t\t\t\t<small>This is the link text which will be appeared on the page.</small>\n\t\t\t\t</td>\n\t\t\t</tr><tr>\n\t\t\t\t<td class=\"first\"><label for=\"fl_form_title\"><?php _e(\"Link title\", \"form-lightbox\") ?></label></td>\n \t\t\t<td><input type=\"text\" value=\"lightbox form\" id=\"fl_form_title\" name=\"fl_form_title\" /><br />\n\t\t\t\t<small>This will be appeared when lightbox opened</small>\n\t\t\t\t</td>\n\t\t\t</tr><tr>\n\t\t\t\t<td class=\"first\"><label for=\"fl_form_code\"><?php _e(\"Form Code\", \"form-lightbox\") ?></label></td>\n \t\t\t<td><textarea id=\"fl_form_code\" name=\"fl_form_code\" rows=\"5\" cols=\"20\">[form shortcode here]</textarea><br />\n\t\t\t\t<small>Enter shortcode like [contact-form-7 id=\"848\" title=\"Contact form 1\"] or html code</small>\n\t\t\t\t</td>\n\t\t\t</tr>\n <tr>\n\t\t\t\t<td class=\"first\"><label for=\"fl_form_style\"><?php _e(\"Form Style\", \"form-lightbox\") ?></label></td>\n \t\t\t<td><input type=\"text\" value=\"\" id=\"fl_form_style\" name=\"fl_form_style\" /><br />\n\t\t\t\t<small>This which will be applied to div layer contained the form lightbox.</small>\n\t\t\t\t</td>\n\t\t\t</tr>\n <tr>\n\t\t\t\t<td class=\"first\"><label for=\"fl_form_style\"><?php _e(\"Onload Delay\", \"form-lightbox\") ?></label></td>\n \t\t\t<td><select id=\"fl_form_onload\" name=\"fl_form_onload\">\n \t\t<option value=\"false\">Off</option>\n \t\t<option value=\"1\">1 sec</option>\n \t\t<option value=\"2\">2 sec</option>\n \t\t<option value=\"3\">3 sec</option>\n \t\t<option value=\"4\">4 sec</option>\n \t\t<option value=\"5\">5 sec</option>\n \t\t<option value=\"6\">6 sec</option>\n \t\t<option value=\"7\">7 sec</option>\n \t\t<option value=\"8\">8 sec</option>\n \t\t<option value=\"9\">9 sec</option>\n \t\t<option value=\"10\">10 sec</option>\n \t\t<option value=\"11\">11 sec</option>\n \t\t<option value=\"12\">12 sec</option>\n \t\t<option value=\"13\">13 sec</option>\n \t\t<option value=\"14\">14 sec</option>\n \t\t<option value=\"15\">15 sec</option>\n \t</select><br />\n\t\t\t\t<small>Select delayed time in second for auto onload. Set to off to disable.</small>\n\t\t\t\t</td>\n\t\t\t</tr>\n </table>\n\t\t</div>\n <div style=\"padding:15px;\">\n <input type=\"button\" class=\"button-primary\" value=\"<?php _e(\"Insert Lightbox Form\", \"form-lightbox\"); ?>\" onclick=\"InsertLightboxForm();\"/>&nbsp;&nbsp;&nbsp;\n <a class=\"button\" style=\"color:#bbb;\" href=\"#\" onclick=\"tb_remove(); return false;\"><?php _e(\"Cancel\", \"form-lightbox\"); ?></a>\n </div>\n\t</div>\n</div>\n<?php\n}", "title": "" }, { "docid": "e932edcf94fb553d8c3bb28d46fe39a0", "score": "0.5626156", "text": "function Show()\r\n {\r\n $block = new JBlock($this->Core, $this->Name);\r\n $block->Frame = false;\r\n $block->Table = true;\r\n \r\n //Action Ajax\r\n $action = new AjaxAction($this->App, $this->Action);\r\n $action->AddArgument(\"App\", $this->App);\r\n \r\n //Ajout des arguments\r\n foreach($this->Arguments as $argument => $value)\r\n {\r\n $action->AddArgument($argument, $value);\r\n }\r\n \r\n $action->ChangedControl = $this->Name;\r\n \r\n foreach($this->Controls as $control)\r\n {\r\n switch($control[\"Type\"])\r\n {\r\n case \"EntityListBox\" : \r\n $ctr = new EntityListBox($control[\"Name\"], $this->Core);\r\n $ctr->Entity = $control[\"Entity\"] ;\r\n $ctr->ListBox->Libelle = $control[\"Libelle\"];\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n $ctr->ListBox->Selected = $control[\"Value\"];\r\n \r\n if($control[\"Field\"])\r\n {\r\n $ctr->AddField($control[\"Field\"]);\r\n }\r\n \r\n if(isset($control[\"Argument\"]))\r\n {\r\n $ctr->AddArgument($control[\"Argument\"]); \r\n }\r\n \r\n break;\r\n case \"ListBox\" :\r\n $ctr = new ListBox($control[\"Name\"]);\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n \r\n foreach($control[\"Value\"] as $key => $value)\r\n {\r\n $ctr->Add($key, $value);\r\n }\r\n \r\n \r\n break;\r\n case \"AutoCompleteBox\" : \r\n $ctr = new AutoCompleteBox($control[\"Name\"], $this->Core);\r\n $ctr->Entity = $control[\"Entity\"] ;\r\n $ctr->Methode = $control[\"Methode\"];\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n \r\n \r\n break;\r\n case \"BsTextBox\" :\r\n $ctr = new BsTextBox($control[\"Name\"], $this->Core);\r\n $ctr->Title = $control[\"Title\"];\r\n break;\r\n case \"BsEmailBox\" :\r\n $ctr = new BsEmailBox($control[\"Name\"], $this->Core);\r\n $ctr->Title = $control[\"Title\"];\r\n break;\r\n case \"BsPassword\" :\r\n $ctr = new BsPassword($control[\"Name\"], $this->Core);\r\n $ctr->Title = $control[\"Title\"];\r\n break;\r\n \r\n case \"CheckBox\" :\r\n $ctr = new CheckBox($control[\"Name\"]);\r\n $ctr->Value = $control[\"Value\"];\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n $ctr->CssClass = $control[\"CssClass\"];\r\n $ctr->Checked = $control[\"Value\"];\r\n break;\r\n case \"Button\" : \r\n $ctr = new Button(BUTTON);\r\n $ctr->Value = $control[\"Value\"];\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n $ctr->CssClass = $control[\"CssClass\"];\r\n \r\n $ctr->OnClick = $action;\r\n \r\n break;\r\n case \"UploadAjaxFile\" : \r\n $app = $control[\"App\"];\r\n $idEntite = $control[\"IdEntite\"];\r\n $callBack = $control[\"CallBack\"];\r\n $UploadAction = $control[\"Action\"];\r\n \r\n $ctr = new UploadAjaxFile($app, $idEntite, $callBack, $UploadAction);\r\n \r\n break;\r\n case \"Libelle\":\r\n \r\n $ctr = new Libelle($control[\"Value\"]);\r\n \r\n break;\r\n default :\r\n $type = $control[\"Type\"];\r\n \r\n $ctr = new $type($control[\"Name\"]);\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n $ctr->Value = $control[\"Value\"];\r\n \r\n break;\r\n }\r\n \r\n $action->AddControl($ctr->Id);\r\n \r\n if($control[\"Type\"] == \"Button\" || $control[\"Type\"] == \"UploadAjaxFile\" )\r\n {\r\n $block->AddNew($ctr, 2, ALIGNRIGHT);\r\n }\r\n else\r\n {\r\n $block->AddNew($ctr);\r\n }\r\n }\r\n \r\n return $block->Show();\r\n }", "title": "" }, { "docid": "eefd887b46f264f9bc4796785f376010", "score": "0.5624146", "text": "public function create()\n {\n return view($this->base_view.'popup.create');\n }", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.56193763", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.56193763", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.56193763", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.56193763", "text": "public function show();", "title": "" }, { "docid": "a5723310cc122ea2ce96aa29e82a8cfc", "score": "0.5613604", "text": "function display_add() {\n $this->_addform->display();\n }", "title": "" }, { "docid": "8d473372897a9016314dba051629697b", "score": "0.56079197", "text": "function form();", "title": "" }, { "docid": "13b283f1e7c08f90b65001888fb54dd7", "score": "0.55973697", "text": "public function open() {\n\t\t\n\t\t// Render open tag & any current form elements\n\t\t\n\t\t$this->_pre_render();\n\t\t\n\t\techo $this->options['before'];\n\t\t\n\t\techo true === $this->options['render_tag'] ? $this->_render_tag() : '';\n\t\t\n\t}", "title": "" }, { "docid": "a873412036da2134ff8e3094ca7ce0c7", "score": "0.55886114", "text": "public function showForm(){\n return view('marketItem.itemCreateForm');\n }", "title": "" }, { "docid": "15e6225c3e553ee59d54e3ec49a3b8f4", "score": "0.5586476", "text": "public function actForm($title, $icon, $text, $hasInput = true)\n {\n $inputType =($hasInput) ? 'text' : 'hidden';\n ?>\n<style type=\"text/css\">\nbody {\n background-color: #eee;\n}\n</style>\n<h3 class=\"img icon16-<?php echo $icon; ?>\">\n <?php echo $title ?>\n</h3>\n<div\n style=\"background-color: #ffff99; border: 1px solid gray; padding: 0.5em;\">\n <div id=\"displ_folder\" style=\"display: inline;\"></div>\n <input type=\"<?php echo $inputType; ?>\" id=\"act_name\" />\n</div>\n<br />\n<div style=\"text-align: center;\">\n <span class=\"btn\" onclick=\"processForm();\">\n <i class=\"img icon16-<?php echo $icon; ?>\"></i>\n <?php echo $text ?>\n </span>\n</div>\n<div id=\"log\"></div>\n<input type=\"hidden\" id=\"act_folder\" />\n\n<?php\n }", "title": "" }, { "docid": "54eed60f15810a79d71a2183414f369c", "score": "0.55833304", "text": "public function modalContent() {\n\n $fields = array( __( 'Template Rule Settings', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ) => array() );\n $sKey = key( $fields );\n\n //------------------------------------------------------------------\n // GENERIC PARAM\n //------------------------------------------------------------------\n\n $helpContent = $this->helpContent( __( 'Choose the value of this generic param.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ),\n __( 'Choose the value of this generic param. It is set only for process flowing, and it is not used anywhere in your WordPress environment.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ) );\n\n $fields[$sKey][] = array(\n array(\n 'type' => WPDKUIControlType::CUSTOM,\n 'content' => $helpContent\n )\n );\n\n $fields[$sKey][] = array(\n array(\n 'type' => WPDKUIControlType::TEXT,\n 'name' => $this->_model->id() . '-generic-param',\n 'value' => $this->_model->genericParam(),\n 'label' => array(\n 'value' => __( 'Generic Param', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN ),\n 'data' => array( 'placement' => 'right' )\n ),\n 'size' => 24,\n 'title' => __( 'Enter the value of this generic param. It is set only for process flowing, and it is not used anywhere in your WordPress environment.', WPXDEFLECTOREXTENSIONTEMPLATE_TEXTDOMAIN )\n )\n );\n\n $layout = new WPDKUIControlsLayout( $fields );\n\n // Build output buffer\n $outputBuffer = '<form name=\"' . $this->_model->id() . '-form\" method=\"POST\" action=\"\">' .\n $layout->html() .\n '</form>';\n\n return $outputBuffer;\n\n }", "title": "" }, { "docid": "2408cc424813400952722f653ff557b7", "score": "0.5581742", "text": "protected function btnDisplaySimpleMessage_Click($strFormId, $strControlId, $strParameter) {\n\t\t\t$this->dlgSimpleMessage->Open();\n\t\t}", "title": "" }, { "docid": "1330e001a871348d6f990ccd8f65e378", "score": "0.5564672", "text": "function app_popup_searchform_caller( $calling_form, $calling_field, $method_to_call = NULL,\n $select_desc = 'Select existing data', $view_desc = 'View list' ) {\n\n if( ! $calling_form || ! $calling_field ) return;\n $this->calling_form = $calling_form;\n $this->calling_field = $calling_field;\n\n if( ! $method_to_call ) $method_to_call = $this->app_popup_get_search_results_method();\n\n $function_name = $this->write_popup_window_caller( $calling_form, $calling_field, $method_to_call );\n\n $script = ' onClick=\"' . $function_name . '()\" ';\n\n if( $this->publicly_available_page || $this->app_popup_from_query_field() ) {\n echo $view_desc;\n $button_label = $this->app_popup_get_view_button_label();\n }\n else {\n echo $select_desc;\n $button_label = $this->app_popup_get_select_button_label();\n }\n\n HTML::button( $calling_field . '_list_button', $button_label, $tabindex=1, $script );\n }", "title": "" }, { "docid": "faf3ece9d75fdf51eecc861c1e4dcb39", "score": "0.55611485", "text": "function print_form_invite_req_fp(){\r\n\techo '<div class=\"form-container\" id=\"fp-form-invite\">';\r\n\tprint_form_invite_req();\r\n\techo '<div class=\"cta-accept-invite\"><a href=\"\" class=\"call-popup-accept-invite\">\r\n\t\t<span class=\"fa-stack fa-lg fa-invite\">\r\n \t\t\t<i class=\"fa fa-heart fa-stack-2x\"></i>\r\n \t\t\t<i class=\"fa fa-arrow-right fa-stack-1x\"></i>\r\n\t\t</span> <strong>Have a code? Accept your invite!</strong></a></div></div></div>';\r\n}", "title": "" }, { "docid": "6d2b766d500bd017d39d343177fb0fb1", "score": "0.55518067", "text": "function ninja_forms_display_open_cont($form_id){\n\tif($form_id == ''){\n\t\tif(isset($_REQUEST['form_id'])){ //If it hasn't, set it to our requested form_id. Sometimes this function can be called without an expressly passed form_id.\n\t\t\t$form_id = absint( $_REQUEST['form_id'] );\n\t\t}\n\t}\n\n\t$wrap_class = '';\n\n\t$wrap_class = apply_filters( 'ninja_forms_cont_class', $wrap_class, $form_id );\n\n\t?>\n\t<div id=\"ninja_forms_form_<?php echo $form_id;?>_cont\" class=\"ninja-forms-cont<?php echo $wrap_class; ?>\">\n\t<?php\n}", "title": "" }, { "docid": "69eb16aa909db8f5f1713113bb2b6274", "score": "0.5546196", "text": "public function Admin_Action_ShowBlockForm() {\n $ssf = new SendStudio_Functions ( );\n $action = 'new';\n $GLOBALS ['blockid'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? $_GET ['id'] : md5(rand ( 1, 100000000 ));\n $GLOBALS ['tagid'] = (isset ( $_GET ['tagId'] ) && $_GET ['tagId'] > 0) ? $_GET ['tagId'] : 0;\n $GLOBALS ['blockaction'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? 'edit' : 'new';\n $GLOBALS ['BlockEditor'] = $ssf->GetHTMLEditor ( '', false, 'blockcontent', 'exact', 260, 630 );\n $GLOBALS ['CustomDatepickerUI'] = $this->template_system->ParseTemplate('UI.DatePicker.Custom_IEM', true);\n $this->template_system->ParseTemplate ( 'dynamiccontentblocks_form' );\n }", "title": "" } ]
3dc1349bec9c00b335b1a1782121078b
protected $fillable = [ 'maximum_score', 'current_score', 'dice_number' ];
[ { "docid": "292a9e47445fda9a4f06f5428d31caa8", "score": "0.0", "text": "public function game(){\n return $this->belongsTo('App\\Game');\n }", "title": "" } ]
[ { "docid": "d9e95c604612533e8f821c001eb6c5fe", "score": "0.54375803", "text": "public function store()\n {\n $pw = User::generatePassword();\n\n $validated= request()->validate([\n 'name' => ['required', 'string', 'max:255', 'min:2'],\n 'surname' => ['required', 'string', 'max:255', 'min:2'],\n 'email' => ['required', 'string', 'max:255', 'min:2'],\n 'phone' => ['required', 'string', 'max:255', 'min:2'],\n 'passport' => ['required', 'string', 'max:10', 'min:10'],\n 'position' => ['required', 'max:255']\n ]);\n\n $user=User::create([\n 'name' => request('name'),\n 'surname' => request('surname'),\n 'email' => request('email'),\n 'phone' => request('phone'),\n 'passport'=> request('passport'),\n 'password' => $pw,\n 'wage' => request('wage'),\n \n ]); \n $user->positions()->attach(Position::where('title', request('position'))->first());\n $bonus=new Bonus;\n $bonus->user_id=$user->id;\n $bonus->total='0';\n $bonus->payment='0';\n $bonus->save();\n\n $score=new Score;\n $score->user()->associate($user);\n $score->clients_nr='0';\n $score->total='0';\n $score->save();\n\n return redirect('/user');\n }", "title": "" }, { "docid": "4133ed432a547cb79bce3a1034f36e8e", "score": "0.5421425", "text": "public function run()\n {\n \n\n \\DB::table('rewards')->delete();\n \n \\DB::table('rewards')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'level' => 1,\n 'rule' => 2000,\n 'remark' => '',\n 'created_at' => '2019-06-14 16:25:09',\n 'updated_at' => '2019-06-14 16:25:09',\n ),\n 1 => \n array (\n 'id' => 2,\n 'level' => 2,\n 'rule' => 4000,\n 'remark' => '',\n 'created_at' => '2019-06-14 16:25:16',\n 'updated_at' => '2019-06-14 16:25:16',\n ),\n 2 => \n array (\n 'id' => 3,\n 'level' => 3,\n 'rule' => 6000,\n 'remark' => '',\n 'created_at' => '2019-06-14 16:25:22',\n 'updated_at' => '2019-06-14 16:25:22',\n ),\n 3 => \n array (\n 'id' => 4,\n 'level' => 4,\n 'rule' => 8000,\n 'remark' => '',\n 'created_at' => '2019-06-14 16:25:35',\n 'updated_at' => '2019-06-14 16:25:35',\n ),\n 4 => \n array (\n 'id' => 5,\n 'level' => 5,\n 'rule' => 10000,\n 'remark' => '',\n 'created_at' => '2019-06-14 16:25:42',\n 'updated_at' => '2019-06-14 16:25:42',\n ),\n 5 => \n array (\n 'id' => 6,\n 'level' => 6,\n 'rule' => 20000,\n 'remark' => '',\n 'created_at' => '2019-06-14 16:25:53',\n 'updated_at' => '2019-06-14 16:25:53',\n ),\n 6 => \n array (\n 'id' => 7,\n 'level' => 7,\n 'rule' => 40000,\n 'remark' => '',\n 'created_at' => '2019-06-14 16:26:00',\n 'updated_at' => '2019-06-14 16:26:00',\n ),\n 7 => \n array (\n 'id' => 8,\n 'level' => 8,\n 'rule' => 80000,\n 'remark' => '',\n 'created_at' => '2019-06-14 16:26:10',\n 'updated_at' => '2019-06-14 16:26:10',\n ),\n ));\n \n \n }", "title": "" }, { "docid": "5eb505d710f5f6e8e334480ec7c894c9", "score": "0.5414145", "text": "public function up()\n {\n Schema::create('student_exam_score', function (Blueprint $table) {\n $table->increments('exam_score_id');\n $table->float('exam_score');\n\t\t\t$table->date('exam_date');\n $table->integer('class_div_id')->unsigned();\n \t$table->foreign('class_div_id')->references('class_div_id')->on('class_div');\n $table->integer('semester_id')->unsigned();\n \t$table->foreign('semester_id')->references('semester_id')->on('semester');\n \t$table->integer('subject_id')->unsigned();\n \t$table->foreign('subject_id')->references('subject_id')->on('subjects');\n \t$table->integer('student_id')->unsigned();\n \t$table->foreign('student_id')->references('student_id')->on('students');\n \t$table->integer('exam_id')->unsigned();\n \t$table->foreign('exam_id')->references('exam_id')->on('exam_name');\n \t$table->string('operator',100);\n $table->string('reviewer',100)->nullable();\n $table->timestamps();\n \n });\n }", "title": "" }, { "docid": "917df569e6c74ba53ddeeec59a366d0f", "score": "0.540108", "text": "public function blames()\n {\n $this->integer('created_by')->nullable();\n\n $this->integer('updated_by')->nullable();\n }", "title": "" }, { "docid": "bebd3d1297d160d34f4ad0a31f3cc9a4", "score": "0.5391937", "text": "public function run()\n {\n DB::table('stats_defense')->insert([\n [\n 'player_id' => 1,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 2,\n 'po' => 2,\n 'a' => 8,\n 'e' => 0,\n 'dp' => 2,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 2,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 1,\n 'pof' => 0\n ],\n [\n 'player_id' => 3,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 4,\n 'po' => 4,\n 'a' => 2,\n 'e' => 0,\n 'dp' => 2,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 5,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 7.0,\n 'ch' => 2,\n 'po' => 2,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 6,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 2,\n 'po' => 2,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 7,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 2,\n 'po' => 2,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 2,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 8,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 2,\n 'po' => 2,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 9,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 2,\n 'po' => 2,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 10,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 1,\n 'po' => 1,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 11,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 1,\n 'po' => 1,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 13,\n 'game_id' => 1,\n 'gs' => 0,\n 'inn' => 1.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 14,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 15,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 16,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 17,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 7.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 18,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 8.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 19,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 4.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 21,\n 'game_id' => 1,\n 'gs' => 1,\n 'inn' => 4.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 22,\n 'game_id' => 1,\n 'gs' => 0,\n 'inn' => 3.0,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ],\n [\n 'player_id' => 23,\n 'game_id' => 1,\n 'gs' => 0,\n 'inn' => 0.1,\n 'ch' => 0,\n 'po' => 0,\n 'a' => 0,\n 'e' => 0,\n 'dp' => 0,\n 'pb' => 0,\n 'wp' => 0,\n 'sb' => 0,\n 'cs' => 0,\n 'pof' => 0\n ]\n ]);\n }", "title": "" }, { "docid": "1a06113966fdf1653209918b19718683", "score": "0.5357108", "text": "public function store(Request $request)\n {\n //\n $female = new Female();\n\n $female->top_sleeve_length = $request->input('top_sleeve_length');\n\n $female->burst_round = $request->input('burst_round');\n $female->shoulder = $request->input('shoulder');\n $female->back = $request->input('back');\n\n $female->under_burst_round = $request->input('under_burst_round');\n $female->end_to_end_nipple_length = $request->input('end_to_end_nipple_length');\n $female->waist_round = $request->input('waist_round');\n\n $female->elbow_wrist = $request->input('elbow_wrist');\n $female->elbow_round = $request->input('elbow_round');\n $female->sleeve_round = $request->input('sleeve_round');\n $female->sleeve_length = $request->input('sleeve_length');\n $female->wrist_round = $request->input('wrist_round');\n $female->elbow_wrist = $request->input('elbow_wrist');\n $female->shoulder_elbow = $request->input('shoulder_elbow');\n\n $female->buttom = $request->input('buttom');\n\n $female->hip_round = $request->input('hip_round');\n $female->hip_length = $request->input('hip_length');\n $female->thigh_round = $request->input('thigh_round');\n\n $female->knee_round = $request->input('knee_round');\n $female->ankle_round = $request->input('ankle_round');\n $female->waist_knee_length = $request->input('waist_knee_length');\n $female->knee_feet_length = $request->input('knee_feet_length');\n\n $female->skirt = $request->input('skirt');\n $female->skirt_hip_round = $request->input('skirt_hip_round');\n $female->skirt_hip_length = $request->input('skirt_hip_length');\n\n $female->short_hip_round = $request->input('short_hip_round');\n $female->short_hip_length = $request->input('short_hip_length');\n $female->short_thigh_round = $request->input('short_thigh_round');\n $female->short_knee_round = $request->input('short_knee_round');\n $female->short_ankle_round = $request->input('short_ankle_round');\n $female->short_waist_knee_length = $request->input('short_waist_knee_length');\n $female->short_knee_feet_length = $request->input('short_knee_feet_length');\n\n // dd($female);\n\n $female->save();\n \n return response()->json( ['success' => 'data added successfully!'] );\n }", "title": "" }, { "docid": "7703b1361596999a31e41a9b3b8ce4b8", "score": "0.535172", "text": "public function store(Request $request)\n {\n // dd($request->all());\n $score =new Score();\n $score->student_id=$request->student;\n $score->exam_id=$request->exam;\n $score->Score=$request->score;\n\n if ($request->score < 90)\n {\n $score->Status='Fail';\n }\n if ($request->score >= 90)\n {\n $score->Status='Pass';\n }\n if ($request->score > 120)\n {\n $score->Status='Qualify';\n }\n\n $score->save();\n\n toastr()->success('Data has been saved successfully!');\n\n\n return redirect('/score');\n\n }", "title": "" }, { "docid": "834701ec155718b19bb386c8a745424e", "score": "0.5331112", "text": "public function run()\n {\n DB::statement(\"\n truncate tb_user_score;\n \");\n\n DB::statement(\"\n insert into tb_user_score(\n id,\n name,\n score,\n emotion,\n created\n )\n values\n ('1','Kevin','80','Happy','2020-02-20'),\n ('2','Josh','90','Sad','2020-02-20'),\n ('3','Kevin','85','Happy','2020-02-20'),\n ('4','Kevin','75','Sad','2020-02-20'),\n ('5','Josh','65','Angry','2020-02-20'),\n ('6','David','85','Happy','2020-02-21'),\n ('7','Josh','90','Sad','2020-02-21'),\n ('8','David','75','Sad','2020-02-21'),\n ('9','Josh','85','Sad','2020-02-21'),\n ('10','Josh','70','Happy','2020-02-21'),\n ('11','Kevin','80','Sad','2020-02-21'),\n ('12','Kevin','73','Sad','2020-02-22'),\n ('13','Kevin','75','Angry','2020-02-22'),\n ('14','David','82','Sad','2020-02-22'),\n ('15','David','65','Sad','2020-02-22')\n ;\n \");\n }", "title": "" }, { "docid": "35d2240e5879c789749927516856eee4", "score": "0.5269739", "text": "public function getScoreAttribute()\n {\n return rand(1,100);\n }", "title": "" }, { "docid": "ea5e364fb66acbe4a5017a29001805a2", "score": "0.52368504", "text": "public function definition()\n { \n // protected $fillable = ['report_id', 'section', 'user_id','date', 'time', 'title', 'case', 'summary', 'chronology', 'measure', 'conclusion', 'qrcode', 'is_complete'];\n\n return [\n // id user id title body slug created at updated at\n 'report_id' => Report::factory(),\n 'section' => $this->faker->sentence(),\n 'user_id' => User::factory(),\n 'date' => $this->faker->date('l, d F Y'),\n 'time' => $this->faker->time('H:i:s'),\n 'title' => $this->faker->sentence(),\n 'case' => $this->faker->paragraph(),\n 'summary' => $this->faker->paragraph(),\n 'chronology' => $this->faker->paragraph(),\n 'measure' => $this->faker->paragraph(),\n 'conclusion' => $this->faker->paragraph(),\n 'qrcode' => 'seederqrcode.png',\n 'is_complete' => array_rand([0, 1]),\n 'created_at' => now(),\n 'updated_at' => now(),\n ];\n }", "title": "" }, { "docid": "76c239ea0ed56508eb1b095cafd9573f", "score": "0.52036554", "text": "public function run()\n {\n GameSkill::insert([\n [\n 'name' => 'Accuracy',\n 'description' => 'Helps in Determining the accuracy of your attack.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => true,\n 'max_level' => 100,\n 'skill_bonus_per_level' => 0.01,\n 'can_monsters_have_skill' => true,\n 'type' => SkillTypeValue::TRAINING,\n ],\n [\n 'name' => 'Dodge',\n 'description' => 'Helps in Determining if you can dodge the attack.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => true,\n 'max_level' => 100,\n 'skill_bonus_per_level' => 0.01,\n 'can_monsters_have_skill' => true,\n 'type' => SkillTypeValue::TRAINING,\n ],\n [\n 'name' => 'Looting',\n 'description' => 'Determines if you get an item or not per fight.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => true,\n 'max_level' => 100,\n 'skill_bonus_per_level' => 0.01,\n 'can_monsters_have_skill' => false,\n 'type' => SkillTypeValue::TRAINING,\n ],\n [\n 'name' => 'Weapon Crafting',\n 'description' => 'A skill used in crafting weapons.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => false,\n 'max_level' => 400,\n 'skill_bonus_per_level' => 0.0025,\n 'can_monsters_have_skill' => false,\n 'type' => SkillTypeValue::CRAFTING,\n ],\n [\n 'name' => 'Armour Crafting',\n 'description' => 'A skill used in crafting armour.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => false,\n 'max_level' => 400,\n 'skill_bonus_per_level' => 0.0025,\n 'can_monsters_have_skill' => false,\n 'type' => SkillTypeValue::CRAFTING,\n ],\n [\n 'name' => 'Spell Crafting',\n 'description' => 'A skill used in crafting spells.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => false,\n 'max_level' => 400,\n 'skill_bonus_per_level' => 0.0025,\n 'can_monsters_have_skill' => false,\n 'type' => SkillTypeValue::CRAFTING,\n ],\n [\n 'name' => 'Ring Crafting',\n 'description' => 'A skill used in crafting rings.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => false,\n 'max_level' => 400,\n 'skill_bonus_per_level' => 0.0025,\n 'can_monsters_have_skill' => false,\n 'type' => SkillTypeValue::CRAFTING,\n ],\n [\n 'name' => 'Artifact Crafting',\n 'description' => 'A skill used in crafting artifact.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => false,\n 'max_level' => 400,\n 'skill_bonus_per_level' => 0.0025,\n 'can_monsters_have_skill' => false,\n 'type' => SkillTypeValue::CRAFTING,\n ],\n [\n 'name' => 'Enchanting',\n 'description' => 'A skill used in enchanting items.',\n 'base_damage_mod_bonus_per_level' => 0.0,\n 'base_healing_mod_bonus_per_level' => 0.0,\n 'base_ac_mod_bonus_per_level' => 0.0,\n 'fight_time_out_mod_bonus_per_level' => 0.0,\n 'move_time_out_mod_bonus_per_level' => 0.0,\n 'can_train' => false,\n 'max_level' => 400,\n 'skill_bonus_per_level' => 0.0025,\n 'can_monsters_have_skill' => false,\n 'type' => SkillTypeValue::ENCHANTING,\n ],\n ]);\n }", "title": "" }, { "docid": "7d6ac10b451912b38dc72d994d469d4c", "score": "0.5201128", "text": "public function rules()\n {\n return [\n 'score0' => 'required|numeric|min:0|max:150',\n 'score1' => 'required|numeric|min:0|max:150',\n 'score2' => 'required|numeric|min:0|max:150',\n 'score3' => 'nullable|numeric|min:0|max:150',\n ];\n }", "title": "" }, { "docid": "30539076986efa438d80431b65767f66", "score": "0.51554066", "text": "public function create(Request $data)\n { \n $user_id = $data['id'];\n $score_data = Score_table::where('user_id', '=', $user_id)->get();\n\n if(($score_data->count()<>0)){\n // $today_score = $score_data->points;\n Score_table::where('user_id', '=', $user_id)->update(['points' => $data['score'] + $score_data[0][\"points\"],'week_points' => $data['score'] + $score_data[0][\"week_points\"],'month_points' => $data['score'] + $score_data[0][\"month_points\"]]);\n }\n \n else{\n \n Score_table::create([\n 'user_id' => $data['id'],\n 'points' => $data['score'],\n 'week_points' => $data['score'],\n 'month_points' => $data['score'],\n ]);\n }\n\n $results = Score_table::orderBy('points')->get();\n $i = $results->count(); \n foreach($results as $result){\n Score_table::where('user_id', '=', $result->user_id)->update(['rank' => $i]);\n Score_table::where('user_id', '=', $result->user_id)->update(['pre_rank' => $result->rank]);\n $i = $i - 1;\n }\n $results = Score_table::orderBy('week_points')->get();\n $i = $results->count(); \n foreach($results as $result){\n Score_table::where('user_id', '=', $result->user_id)->update(['week_rank' => $i]);\n Score_table::where('user_id', '=', $result->user_id)->update(['week_pre_rank' => $result->week_rank]);\n $i = $i - 1;\n }\n $results = Score_table::orderBy('month_points')->get();\n $i = $results->count(); \n foreach($results as $result){\n Score_table::where('user_id', '=', $result->user_id)->update(['month_rank' => $i]);\n Score_table::where('user_id', '=', $result->user_id)->update(['month_pre_rank' => $result->month_rank]);\n $i = $i - 1;\n }\n\n $result_data = DB::table('score_tables')\n ->join('users', 'score_tables.user_id', '=', 'users.id')\n ->orderby(\"rank\")\n ->get();\n return view('home')->with(array('result_data'=>$result_data));\n }", "title": "" }, { "docid": "51e52e8251e6eeef0beaba0289bdb600", "score": "0.51522446", "text": "public function store()\n\t{\n\t\t$exid = Input::get('exid');\n\t\t$secid = Input::get('secid');\n\n\t\t$exam = Examination::where('exid', '=', $exid)->first();\n\t\t$totalscore = $exam->score;\n\n\t\t$currscore = WrittingsController::checkscore($exid);\n\t\t$sum_score = $currscore + Input::get('score');\n\t\t$remain_score = $totalscore - $currscore;\n\t\tif($sum_score > $totalscore){\n\t\t\t//$over_score = $sum_score - $totalscore;\n\t\t\treturn Redirect::back()\n\t\t\t\t\t\t->with('message', 'คะแนนเต็ม: '.$totalscore.' ปัจจุบันมีคะแนน: '.$currscore.' คุณสามารถใส่คะแนนได้ไม่เกิน: '.$remain_score)\n\t\t\t\t\t\t->withInput();\n\t\t}\n\n\t\t$validator = Validator::make($data = Input::all(), Question::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t//$numquest = Question::where('exid', '=', $exid)->orderBy('number','desc')->first();\n\t\t$numquest = DB::table('section')\n\t\t\t->join('sectionhasquestion', 'section.secid', '=', 'sectionhasquestion.secid')\n\t\t\t->join('question', 'sectionhasquestion.qid', '=', 'question.qid')\n\t\t\t->where('section.exid', '=', $exid)\n\t\t\t->orderBy('question.number','desc')\n\t\t\t->first();\n\n\t\t$numquest = $numquest ? $numquest->number + 1 : 1;\n\t\t//return $numquest;\n\n\t\t$quest = Question::create(array('question' => Input::get('question'), 'score' => Input::get('score'),'level' => Input::get('level') , 'number' => $numquest));\n\t\tWritting::create(array('answer' => Input::get('answer'),'numline' => Input::get('numline') ,'qid' => $quest->qid));\n\t\t$sechasquest = Sectionhasquestion::create(array('secid' => $secid, 'qid' => $quest->qid));\n\n\t\treturn Redirect::to('section/'.$exid.'/');\n\t}", "title": "" }, { "docid": "28f0fb7b5de93c28784ed54bb7ef361e", "score": "0.51457906", "text": "public function create()\n {\n $fillables = [\n 'name' => ['label' => 'Nome', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'email' => ['label' => 'Email', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'birthday' => ['label' => 'Data Nasc.', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'address' => ['label' => 'Endereço', 'size' => 12, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'state_id' => ['label' => 'Estado', 'size' => 6, 'type' => 'select', 'value' => null, 'class' => 'form-control', 'options' => State::all()],\n 'city_id' => ['label' => 'Cidade', 'size' => 6, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'zipcode' => ['label' => 'CEP', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'Phone' => ['label' => 'Telefone', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'Phone_cel' => ['label' => 'Celular', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'genre' => ['label' => 'Sexo', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'crm' => ['label' => 'CRM', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'crm_status' => ['label' => 'Status CRM', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'pass' => ['label' => 'Senha', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'status' => ['label' => 'Status', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control'],\n 'obs' => ['label' => 'Observação', 'size' => 4, 'type' => 'text', 'value' => null, 'class' => 'form-control']\n ];\n $title = 'Doctors';\n $module = 'doctors';\n $route = route('doctors.store');\n $method = 'PUT';\n $formulario = 'modules.'.$this->module.'.form';\n return view('create', compact('title', 'patients', 'total', 'module', 'fillables', 'route', 'method', 'formulario'));\n }", "title": "" }, { "docid": "c169bbbc75646a2699166dc6fc0bf7b4", "score": "0.51195806", "text": "public function store() {\n $user = Auth::user();\n $character = Input::get('character');\n $data = array(\n 'user_id' => $user['id'], //$character['userId'],\n 'name' => $character['name'],\n 'backstory' => $character['backstory'],\n 'race' => $character['raceObj']['name'],\n 'background' => $character['background']['name'],\n 'ideal' => $character['ideal']['description'],\n 'class' => $character['classObj']['name'],\n 'level' => $character['level'],\n 'size' => $character['raceObj']['size'],\n 'speed' => $character['speed'],\n 'proficiency_bonus' => $character['profBonus'],\n 'initiative' => $character['initiative'],\n 'hit_points' => $character['hitPoints'],\n 'hit_dice' => $character['classObj']['hit_dice'],\n 'armor_class' => $character['armorClass'],\n //'armor_prof' => $character['armor'],\n //'weapon_prof' => $character['weapons'],\n 'tool_prof' => $character['tools'],\n 'strength' => $character['ability']['str']['adjScore'],\n 'dexterity' => $character['ability']['dex']['adjScore'],\n 'constitution' => $character['ability']['con']['adjScore'],\n 'intelligence' => $character['ability']['int']['adjScore'],\n 'wisdom' => $character['ability']['wis']['adjScore'],\n 'charisma' => $character['ability']['cha']['adjScore'],\n 'str_mod' => $character['ability']['str']['mod'],\n 'dex_mod' => $character['ability']['dex']['mod'],\n 'con_mod' => $character['ability']['con']['mod'],\n 'int_mod' => $character['ability']['int']['mod'],\n 'wis_mod' => $character['ability']['wis']['mod'],\n 'cha_mod' => $character['ability']['cha']['mod'],\n 'saving_throws' => $character['classObj']['saving_throws'],\n 'str_save' => $character['ability']['str']['savingThrow'],\n 'dex_save' => $character['ability']['dex']['savingThrow'],\n 'con_save' => $character['ability']['con']['savingThrow'],\n 'int_save' => $character['ability']['int']['savingThrow'],\n 'wis_save' => $character['ability']['wis']['savingThrow'],\n 'cha_save' => $character['ability']['cha']['savingThrow'],\n 'senses' => $character['passivePerception'],\n 'skills' => $character['proficientSkills'],\n 'acrobatics' => $character['skills'][0]['val'],\n 'animal_handling' => $character['skills'][1]['val'],\n 'arcana' => $character['skills'][2]['val'],\n 'athletics' => $character['skills'][3]['val'],\n 'deception' => $character['skills'][4]['val'],\n 'history' => $character['skills'][5]['val'],\n 'insight' => $character['skills'][6]['val'],\n 'intimidation' => $character['skills'][7]['val'],\n 'investigation' => $character['skills'][8]['val'],\n 'medicine' => $character['skills'][9]['val'],\n 'nature' => $character['skills'][10]['val'],\n 'perception' => $character['skills'][11]['val'],\n 'performance' => $character['skills'][12]['val'],\n 'persuasion' => $character['skills'][13]['val'],\n 'religion' => $character['skills'][14]['val'],\n 'sleight_of_hand' => $character['skills'][15]['val'],\n 'stealth' => $character['skills'][16]['val'],\n 'survival' => $character['skills'][17]['val'],\n 'date_added' => date(\"m/d/Y\")\n );\n $data['languages'] = implode(', ', $character['languages']);\n $armorProf = array_map(function($val) {\n return $val['name'];\n }, $character['armor']); // convert array of objects to array of strings\n $data['armor_prof'] = implode(', ', $armorProf);\n $weaponProf = array_map(function($val) {\n return $val['name']; // \"\"\n }, $character['weapons']);\n $data['weapon_prof'] = implode(', ', $weaponProf);\n if (isset($character['raceObj']['racialTraits'])) {\n $racialTraitIds = array_map(function($val) {\n return $val['id'];\n }, $character['raceObj']['racialTraits']);\n $data['racial_trait_ids'] = implode(', ', $racialTraitIds);\n }\n if (isset($character['classObj']['charFeatures'])) {\n $classFeatureIds = array_map(function($val) {\n return $val['id'];\n }, $character['classObj']['charFeatures']);\n $data['class_feature_ids'] = implode(', ', $classFeatureIds);\n }\n $featIds = array_map(function($val) {\n return $val['readable_id'];\n }, $character['feats']);\n $data['feat_ids'] = implode(', ', $featIds);\n if (isset($character['classObj']['subclassObj']['name'])) {\n $data['pseudo_class'] = $character['classObj']['subclassObj']['name'];\n }\n if (isset($character['classObj']['spellcasting'])) {\n $data['spell_slots'] = $character['classObj']['spellcasting']['spellSlots'];\n $data['spell_ability'] = $character['classObj']['spellcasting']['spellAbility'];\n $data['spell_save_dc'] = $character['classObj']['spellcasting']['spellSaveDC'];\n $data['spell_attk_bonus'] = $character['classObj']['spellcasting']['spellAttkBonus'];\n if (isset($character['classObj']['selectedCantrips'])) {\n $cantripIds = array_map(function($val) {\n return $val['id'];\n }, $character['classObj']['selectedCantrips']);\n $data['cantrips'] = implode(', ', $cantripIds);\n }\n if (isset($character['classObj']['selectedSpells'])) {\n if (isset($character['classObj']['bonusSelectedSpells'])) {\n $character['classObj']['selectedSpells'] = array_merge($character['classObj']['selectedSpells'], $character['classObj']['bonusSelectedSpells']);\n }\n if (isset($character['classObj']['spellcasting']['bonusSpells'])) {\n foreach ($character['classObj']['spellcasting']['bonusSpells'] as $spellObj) {\n array_push($character['classObj']['selectedSpells'], $spellObj[0]);\n }\n }\n\n $spellIds = array_map(function($val) {\n return $val['id'];\n }, $character['classObj']['selectedSpells']);\n $data['spells'] = implode(', ', $spellIds);\n }\n }\n if (isset($character['raceObj']['spellcasting']) && isset($character['raceObj']['cantrip'])) {\n $bonusCantripIds = array_map(function($val) {\n return $val['id'];\n }, $character['raceObj']['cantrip']);\n if ($data['spell_ability'] == $character['raceObj']['spellcasting']['spellAbility']) {\n $cantripIds = isset($cantripIds) ? $cantripIds : array();\n $data['cantrips'] = implode(', ', array_merge($cantripIds, $bonusCantripIds));\n } else {\n $data['bonus_spell_ability'] = $character['raceObj']['spellcasting']['spellAbility'];\n $data['bonus_spell_save_dc'] = $character['raceObj']['spellcasting']['spellSaveDC'];\n $data['bonus_spell_attk_bonus'] = $character['raceObj']['spellcasting']['spellAttkBonus'];\n $data['bonus_cantrip'] = implode(', ', $bonusCantripIds);\n }\n }\n if (isset($character['classObj']['selectedExpertise'])) {\n $data['expertise'] = implode(', ', $character['classObj']['selectedExpertise']);\n }\n\n\n Character::create($data);\n /*return Response::json([\n 'status' => 'success',\n 'data' => $data\n ]\n );*/\n\n /*$credentials = array(\n 'name' => $character->name,\n 'race' => $character->raceObj->name,\n 'background' => $character->background->name,\n 'class' => $character->classObj->name\n );*/\n /*if ($character->save()) {\n // validation has passed and saved, display success message\n return Response::json([\n 'status' => 'success',\n 'message' => 'You have successfully registered!'],\n 202\n );\n } else {\n // validation has failed, display error messages\n return Response::json(\n [\n 'status' => 'error',\n 'message' => $character->errors()->all()\n ],\n 401\n );\n }*/\n }", "title": "" }, { "docid": "f9c969ab75d81804c7a95eced9a06455", "score": "0.509807", "text": "public function score(){return $this->score;}", "title": "" }, { "docid": "28870980380dd7d9042e8f24ff7d960b", "score": "0.50776815", "text": "public function rules()\n {\n\n return [\n 'rating_value' => 'required|min:1|max:5|integer',\n ];\n }", "title": "" }, { "docid": "eab7403acdd40adee407096fa8e97c69", "score": "0.5056953", "text": "public function store(Request $request)\n {\n $data = $request->all();\n $question = new Question;\n $question->question = $data['question'];\n $question->max_marks = $data['max_marks'];\n $question->save();\n }", "title": "" }, { "docid": "1e0aa35ad5af282213de9e878fcc76e8", "score": "0.50555", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"credit_scoreTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\CreditScore::create([\n\t\t\t\t\t\"user_id\" => $faker->randomDigit(),\n\t\t\t\t\t\"credit_score\" => $faker->randomDigit(),\n\t\t\t\t\t\"login_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"login_10\" => $faker->randomDigit(),\n\t\t\t\t\t\"login_30\" => $faker->randomDigit(),\n\t\t\t\t\t\"login_75\" => $faker->randomDigit(),\n\t\t\t\t\t\"comment_likes_7\" => $faker->randomDigit(),\n\t\t\t\t\t\"comment_likes_30\" => $faker->randomDigit(),\n\t\t\t\t\t\"comment_likes_75\" => $faker->randomDigit(),\n\t\t\t\t\t\"comment_dislikes_7\" => $faker->randomDigit(),\n\t\t\t\t\t\"comment_dislikes_30\" => $faker->randomDigit(),\n\t\t\t\t\t\"comment_dislikes_75\" => $faker->randomDigit(),\n\t\t\t\t\t\"profile_checklist_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"profile_checklist_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"profile_checklist_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"profile_checklist_4\" => $faker->randomDigit(),\n\t\t\t\t\t\"profile_checklist_5\" => $faker->randomDigit(),\n\t\t\t\t\t\"message_response_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"message_response_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"message_response_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"reported_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"reported_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"reported_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"reported_kanri\" => $faker->randomDigit(),\n\t\t\t\t\t\"profile_fake\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "17384f84c932e30d2f5150f68bef6ed0", "score": "0.50454575", "text": "public function getFillable()\n {\n return $this->fillable;\n }", "title": "" }, { "docid": "a0aff4874338d084cd4014d248f36a9b", "score": "0.50284404", "text": "public function updateScoreOLD(Request $request, $id)\n {\n\n $updateData = $request->validate([\n 'team1_score' => 'required|numeric|min:0',\n 'team2_score' => 'required|numeric|min:0',\n \n ]);\n //get the game\n $game = games::findOrFail($id);\n //save the data to the game\n $game->team1_score = intval($updateData[\"team1_score\"]);\n $game->team2_score = intval($updateData[\"team2_score\"]);\n $game->save();\n \n //who won? set a sentinel (for ties/unsetting the score)\n //we'll use this value to reset the scores\n $winner = -1;\n \n //is team1 the winner\n if ($game->team1_score > $game->team2_score) {\n $winner = $game->team1; \n } else {\n //or is team2?\n $winner = $game->team2;\n }\n \n //now let's get all gamepicks relative to this game\n $gamepicks = GamePick::where('gameid',\"=\", $game->espnID)->get();\n //now loop through game picks\n foreach($gamepicks as $gamepick) {\n //can't be winner if -1 so this is all we\n //need... not too shabby\n if ($gamepick->selection == $winner) {\n //award the points\n $gamepick->score = $game->points;\n } else {\n //what the matt giveth, the matt taketh away\n $gamepick->score = 0;\n }\n\n //save the game pick\n $gamepick->save();\n \n }\n //go back to games when you're done!\n return redirect('/games')->with('completed', 'games has been updated');\n}", "title": "" }, { "docid": "26623e50e9eb915ba07593c1c06d5fcd", "score": "0.5015741", "text": "public function store(Request $request)\n {\n //\n \n \n $this->validate($request, [ 'name' => 'required',\n 'interviewoutcome' => 'required',\n 'description' => 'required',\n \n ]);\n \n $row =new InterviewTemplates;\n \n $row->name =$request->name;\n \n $row->interviewoutcome =$request->interviewoutcome;\n \n $row->maximumscore = ( ! empty($request->maximumscore) ) ? $request->maximumscore : 0;\n \n $row->description =$request->description;\n \n $row->save();\n \n \n return redirect()->route('InterviewTemplates.index')\n ->with('success','Interview Templates created successfully');\n }", "title": "" }, { "docid": "324205f4f797b78929aad44dcdc9173a", "score": "0.5014641", "text": "public function setScoreAttribute($input)\n {\n $this->attributes['score'] = $input ? $input : null;\n }", "title": "" }, { "docid": "7b92e7e7c188c18f2c56b49776d2b3ab", "score": "0.5005155", "text": "public function storeToDatabase()\n {\n if (session('round') == 25) {\n // create Highscore instance\n $highscore = new Pokerhighscore();\n\n // insert into database\n $highscore->score = session('totalScore');\n $highscore->player = session('name');\n $highscore->count_nothing = session('count.nothing');\n $highscore->count_pair = session('count.pair');\n $highscore->count_twopairs = session('count.twopairs');\n $highscore->count_threeofakind = session('count.threeofakind');\n $highscore->count_straight = session('count.straight');\n $highscore->count_flush = session('count.flush');\n $highscore->count_fullhouse = session('count.fullhouse');\n $highscore->count_fourofakind = session('count.fourofakind');\n $highscore->count_straightflush = session('count.straightflush');\n $highscore->count_royalstraightflush = session('count.royalstraightflush');\n // insert name\n // save to db\n $highscore->save();\n }\n }", "title": "" }, { "docid": "749c30d89ad4ccb55ea6d2aa8b8ea7fd", "score": "0.49904257", "text": "public function store(Request $request)\n {\n\n $request->member_experience = str_replace(',', '.', $request->member_experience);\n //var_dump($request->member_experience);\n $request->member_experience = floatval($request->member_experience);\n // var_dump($request->member_experience);\n // die;\n // dd($request->member_experience);\n $request->member_registered = str_replace(',', '.', $request->member_registered);\n $request->member_name = ucwords(strtolower($request->member_name));\n $request->member_surname = ucwords(strtolower($request->member_surname));\n\n $validator = Validator::make($request->all(),\n [\n 'member_name' => ['required', 'min:2', 'max:30'],\n 'member_surname' => ['required', 'min:2', 'max:30'],\n 'member_live' => ['required', 'min:2', 'max:30'],\n 'member_experience' => ['required', 'numeric', 'min:0.00', 'max:99.99'],\n 'member_registered' => ['required', 'min:0', 'max:99'],\n \n ],\n [\n 'member_name.required' => 'Vardas privalomas',\n 'member_name.min' => 'Vardas per trumpas',\n 'member_name.max' => 'Vardas per ilgas',\n\n 'member_surname.required' => 'Pavardė privaloma',\n 'member_surname.min' => 'Pavardė per trumpa',\n 'member_surname.max' => 'Pavardė per ilga',\n\n 'member_live.required' => 'Laukas \"Miestas kuriame gyvena\" privalomas',\n 'member_live.min' => 'Lauko \"Miestas kuriame gyvena\" reikšmė per trumpa',\n 'member_live.max' => 'Lauko \"Miestas kuriame gyvena\" reikšmė per ilga',\n\n 'member_experience.required' => 'Laukas \"Patirtis \" privalomas',\n 'member_experience.numeric' => 'Laukas \"Patirtis\" turi būti užpildytas skaičiais',\n 'member_experience.min' => 'Lauko \"Patirtis \" reikšmė per maža',\n 'member_experience.max' => 'Lauko \"Patirtis \" reikšmė per didelė',\n\n 'member_registered.required' => 'Laukas \"Klube registruotas\" privalomas',\n 'member_registered.numeric' => 'Laukas \"Klube registruotas\" turi būti užpildytas skaičiais',\n 'member_registered.min' => 'Lauko \"Klube registruotas\" reikšmė per maža',\n 'member_registered.max' => 'Lauko \"Klube registruotas\" reikšmė per didelė',\n\n\n ]\n );\n if ($validator->fails()) {\n $request->flash();\n return redirect()->back()->withErrors($validator);\n } \n\n\n\n $member = new Member;\n $member->name = $request->member_name;\n $member->surname = $request->member_surname;\n $member->live = $request->member_live;\n $member->experience = $request->member_experience;\n $member->registered = $request->member_registered;\n $member->reservoir_id = $request->reservoir_id;\n $member->save();\n return redirect()->route('member.index')->with('success_message', 'Sekmingai įrašytas.');\n\n }", "title": "" }, { "docid": "227e4e3c3ca690c46c8c142ecfe17eb6", "score": "0.4974115", "text": "public function roundToDb()\n {\n $scores = $this->getScores();\n $dbSession = DbGameSession::create(\n ['game_type' => 'blackjack']\n );\n foreach ($scores as $playerName => $value) {\n $dbPlayer = DbPlayer::firstOrCreate(\n ['name' => $playerName]\n );\n DbScore::create(\n [\n 'score' => $scores[$playerName],\n 'player_id' => $dbPlayer->id,\n 'session_id' => $dbSession->id,\n ]\n );\n }\n }", "title": "" }, { "docid": "f20646f2b2e67281f0a3090795becc66", "score": "0.4969987", "text": "public function store(Request $request)\n {\n\n $this->validate($request, [\n 'name' => 'required',\n 'date' => 'required',\n 'rounds' => 'required'\n ]);\n\n $game = Game::create($request->all());\n\n if($request->has('teams')){\n $game->teams()->attach($request->teams); \n }\n\n foreach($request->teams as $team){\n for($round = 1; $round <= $request->rounds; $round++){\n $round_obj = new Round;\n $round_obj->team_id = $team;\n $round_obj->score = 0;\n $round_obj->save();\n $game->rounds()->attach($round_obj); \n };\n\n $totalscore = new Totalscore;\n $totalscore->team_id = $team;\n $totalscore->game_id = $game->id;\n $totalscore->totalscore = 0;\n $totalscore->save();\n\n $totalscore->teams()->attach($team);\n $game->totalscores()->attach($totalscore);\n };\n \n\n return redirect()->route('game.index');\n }", "title": "" }, { "docid": "880b662e1dc3dfda90a4f1b0e087c878", "score": "0.49667883", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(),\n [\n 'name' => ['required','unique:horses','alpha_num','min:3','max:10'],\n 'runs' => ['required','numeric','min:0','max:50'],\n 'wins' => ['required','numeric','min:0','max:50','lte:runs'],\n ],\n [\n 'name.required' => 'Žirgo vardas privalomas',\n 'name.unique' => 'Žirgo vardas turi būti unikalus',\n 'name.min' => 'Žirgo vardas per trumpas',\n 'name.max' => 'Žirgo vardas per ilgas',\n 'name.alpha_num' => 'Žirgo vardas turi būti sudarytas tik iš raidžių ir/arba skaičių',\n\n 'runs.required' => 'Lenktynių skaičius privalomas',\n 'runs.numeric' => 'Lenktynių skaičius turi būti išreikštas skaičiais',\n 'runs.min' => 'Minimalus lenktynių skaičius yra 0',\n 'runs.max' => 'Maksimalus lenktynių skaičius yra 50',\n\n 'wins.required' => 'Laimėtų lenktynių skaičius privalomas',\n 'wins.numeric' => 'Laimėtų lenktynių turi būti išreikštas skaičiais',\n 'wins.lte' => 'Laimėtų lenktynių skaičiais turi būti mažesnis už visų lenktynių skaičių',\n 'wins.min' => 'Minimalus laimėtų lenktynių yra 0',\n 'wins.max' => 'Maksimalus laimėtų lenktynių yra 50',\n ]);\n if($validator->fails()){\n $request->flash();\n return redirect()->back()->withErrors($validator);\n }\n $horse = new Horse();\n $horse->name = ucwords(strtolower($request->name));\n $horse->runs = $request->runs;\n $horse->wins = $request->wins;\n $horse->koeficient = round((($request->runs/($request->wins+25))+0.01),2);\n $horse->about = $request->about;\n $horse->save();\n return redirect()->route('horse.index')->with('info_message','Žirgas pridėtas sėkmingai');\n }", "title": "" }, { "docid": "7ca1a1a4538ced6e4ac46b555f5d3371", "score": "0.4957057", "text": "public function store(Request $request)\n {\n if(!session()->has('work_experience')){\n $updated_score = Session::get('user_score')+10;\n Session::forget('user_score');\n Session::put('user_score',$updated_score);\n }\n WorkExperience::create([\n 'desigination' => $request->designation,\n 'organisation' => $request->organisation,\n 'current_company' => $request->currcompany,\n 'work_from' => $request->workfrom,\n 'work_till' => $request->worktill,\n 'notc_period' => $request->noticePeriod,\n 'salary_unit' => $request->salary_unit,\n 'salary_amount' => $request->salary_amount,\n 'salary_mode' => $request->salarymode,\n 'profile_detail' => $request->profiledetail,\n 'user_id' => Auth::id()\n ]);\n Session::put('work_experience',10);\n return redirect('seeker/profile');\n }", "title": "" }, { "docid": "995dfff7fffb8e50ad281b8e45d6a644", "score": "0.49472326", "text": "public function run()\n {\n DB::table('assess')->insert([\n \t['scoresfirst'=>'95','scoreslast'=>'100','reted'=>'AAA','reviews'=>'Rủi ro thấp'],\n \t['scoresfirst'=>'90','scoreslast'=>'94','reted'=>'AA','reviews'=>'Rủi ro thấp'],\n \t['scoresfirst'=>'85','scoreslast'=>'89','reted'=>'A','reviews'=>'Rủi ro thấp'],\n \t['scoresfirst'=>'80','scoreslast'=>'84','reted'=>'BBB','reviews'=>'Rủi ro trung bình'],\n \t['scoresfirst'=>'70','scoreslast'=>'79','reted'=>'BB','reviews'=>'Rủi ro trung bình'],\n \t['scoresfirst'=>'60','scoreslast'=>'69','reted'=>'B','reviews'=>'Rủi ro trung bình'],\n \t['scoresfirst'=>'50','scoreslast'=>'59','reted'=>'CCC','reviews'=>'Rủi ro cao'],\n \t['scoresfirst'=>'40','scoreslast'=>'49','reted'=>'CC','reviews'=>'Rủi ro cao'],\n \t['scoresfirst'=>'35','scoreslast'=>'39','reted'=>'C','reviews'=>'Rủi ro cao'],\n \t['scoresfirst'=>'0','scoreslast'=>'34','reted'=>'D','reviews'=>'Rủi ro cao'],\n ]);\n }", "title": "" }, { "docid": "d6b68d500c905c86e2c02d91199f139c", "score": "0.4942042", "text": "public function scores(){\n return $this->hasMany(Score::class);\n }", "title": "" }, { "docid": "a2017df2aaaea6f5fc26499b6ea92f62", "score": "0.4937422", "text": "public function run()\n {\n $student = Student::where('email',\"nelabhkotiya@gmail.com\")->first();\n $studentMarks = new StudentMark;\n $studentMarks->student_id = $student->id;\n $studentMarks->diploma = 0;\n $studentMarks->Xmarkstype = \"CGPA\";\n $studentMarks->Xmarks = \"9.4\";\n $studentMarks->XIImarkstype = \"PER\";\n $studentMarks->XIImarks = \"87.6\";\n $studentMarks->sem1 = \"75\";\n $studentMarks->sem2 = \"75\";\n $studentMarks->sem3 = \"75\";\n $studentMarks->sem4 = \"75\";\n $studentMarks->sem5 = \"75\";\n $studentMarks->sem6 = \"75\";\n $studentMarks->sem7 = \"75\";\n $studentMarks->sem8 = \"75\";\n $studentMarks->diplomayr1 = \"-\";\n $studentMarks->diplomayr2 = \"-\";\n $studentMarks->save();\n }", "title": "" }, { "docid": "e633c8694d7d5926ffcd7df7b96d4b4d", "score": "0.49343914", "text": "public function store(Request $request)\n {\n // dd($request);\n $request->validate([\n \n 'tournament' => 'required',\n \n 'start_time' => 'required',\n 'member1_id' => 'required',\n 'member2_id' => 'required',\n ]);\n \n $id = Match::create($request->all()) ->id;\n $pb = new \\App\\Models\\PartBet();\n $pb->match_id = $id;\n $pb->text = \"WIN\";\n $pb->coef_on_1 = $request['c1'];\n $pb->coef_on_2 = $request['c2'];\n $pb->save();\n return redirect()->route('admin');\n \n }", "title": "" }, { "docid": "28dc4b3487c257130de592e64342be4a", "score": "0.49153575", "text": "public function criterios(){\n return $this->belongsToMany(Criterio::class,'question_criterio','question_id','criterio_id')->withPivot('score');\n }", "title": "" }, { "docid": "1edfeb924de865b674b57da8cd4e279c", "score": "0.49152508", "text": "public function store()\n\t{\n $input = \\Illuminate\\Support\\Facades\\Request::all();\n $input['published_at'] = Carbon::now();\n\n $scorecard = new Scorecard;\n $scorecard->runs_scored = $input['runs-scored'];\n $scorecard->over_bowled = $input['over-bowled'];\n $scorecard->leg_byes = $input['leg-byes'];\n $scorecard->wicket = $input['wickets'];\n $scorecard->byes = $input['byes'];\n $scorecard->wides = $input['wides'];\n $scorecard->no_balls = $input['no-balls'];\n $scorecard->match_id = $input['match_id'];\n\n $scorecard->save();\n\n return redirect('scorecards');\n\t}", "title": "" }, { "docid": "74382ba0c0672d9a45eb79818b0a1b9c", "score": "0.49120617", "text": "public function __construct()\n {\n $this->score = 0;\n $this->rolls = [];\n $this->max_rolls = 2;\n $this->is_strike = false;\n $this->is_spare = false;\n $this->is_finished = false;\n }", "title": "" }, { "docid": "f26c82279b9678cc708abc815dfa3f17", "score": "0.49111512", "text": "public function store()\n{\n// validate\n// read more on validation at http://laravel.com/docs/validation\n$rules = array(\n'name' => 'required',\n'email' => 'required|email',\n'nerd_level' => 'required|numeric'\n);\n$validator = Validator::make(Input::all(), $rules);\n// process the login\nif ($validator->fails()) {\nreturn Redirect::to('nerds/create')\n->withErrors($validator)\n->withInput(Input::except('password'));\n} else {\n// store\n$nerd = new Nerd;\n$nerd->name = Input::get('name');\n$nerd->email = Input::get('email');\n$nerd->nerd_level = Input::get('nerd_level');\n$nerd->save();\n// redirect\nSession::flash('message', 'Successfully created nerd!');\nreturn Redirect::to('nerds');\n}\n}", "title": "" }, { "docid": "1e3b3d291a8f348918be0c5d6071459c", "score": "0.4904555", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'score.*'=> 'required_without:time.*',\n 'time.*'=> 'required_without:score.*',\n 'xp.*'=> 'required|numeric',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['message'=> $validator->messages()->first(), 'status'=>false]);\n }\n\n $target = [];\n for ($i=0; $i < count($request->xp) ; $i++) { \n $target[$i]['stage'] = $i+1;\n if (isset($request['score'][$i]) && $request['score'][$i] != \"\") {\n $target[$i]['score'] = (int)$request['score'][$i];\n }\n if (isset($request['time'][$i]) && $request['time'][$i] != \"\") {\n $target[$i]['time'] = (int)$request['time'][$i];\n }\n if (isset($request['xp'][$i]) && $request['xp'][$i] != \"\") {\n $target[$i]['xp'] = (int)$request['xp'][$i];\n }\n }\n\n\n $practiceGame = PracticeGameTarget::where('_id',$id)->first();\n \n $practiceGame->targets = $target;\n\n /* VARIATION IMAGE */\n $pathOfImageTobeSave = storage_path('app/public/practice_games');\n $variation_image = [];\n\n if(!File::exists($pathOfImageTobeSave)){\n File::makeDirectory($pathOfImageTobeSave,0755,true);\n }\n\n $imageUniqueName = new stdClass();\n if ($request->hasFile('variation_image') && $request->hasFile('variation_image')!=\"\") {\n $variationImages = $request->file('variation_image');\n foreach ($variationImages as $key => $variationImage) {\n $extension = $variationImage->getClientOriginalExtension();\n $img = Image::make($variationImage);\n $jsonIndex = $key+1;\n $imageUniqueName->$jsonIndex = uniqid('practice_'.uniqid(true).'_').'.'.$extension;\n $img->save($pathOfImageTobeSave.'/'.$imageUniqueName->$jsonIndex);\n \n\n $imageNmae[] = (array)$imageUniqueName;\n $practiceGame->push('variation_images', $imageUniqueName->$jsonIndex,true);\n }\n\n }\n /* END VARIATION IMAGE */\n\n $practiceGame->save();\n return response()->json([\n 'status' => true,\n 'message'=>'Mini games XP/score has been updated successfully.',\n ]);\n }", "title": "" }, { "docid": "a7cc0ddbb56fe991481e14a1e5d200bb", "score": "0.49036098", "text": "public function store(Request $request){\n\n $random_moves = ['HP','DEF','ATK'];\n $moves_p = $request->all()['moves'];\n $array = [];\n for ($x = 0; $x < count($moves_p); $x++){\n array_push($array, json_decode($moves_p[$x]));\n if ($array[$x]->power == null){\n $array[$x]->power = $random_moves[array_rand($random_moves)];\n }\n $array[$x]=json_encode($array[$x]);\n }\n\n $name = $request->all()['name'];\n $HP = $request->all()['HP'];\n $ATK = $request->all()['ATK'];\n $DEF = $request->all()['DEF'];\n $SPD = $request->all()['SPD'];\n $type = $request->all()['type'];\n $moves = serialize($array);\n $image_path = $request->all()['image_path'];\n $pokemon = new Pokemon();\n $pokemon->name = $name;\n $pokemon->HP = $HP;\n $pokemon->ATK = $ATK;\n $pokemon->DEF = $DEF;\n $pokemon->SPD = $SPD;\n $pokemon->type = $type;\n $pokemon->moves = $moves;\n $pokemon->image_path= $image_path;\n $pokemon->save();\n\n }", "title": "" }, { "docid": "6e8473437ca4d2d12fb7d5bde06b33a8", "score": "0.48999017", "text": "protected function postRules()\n {\n return [\n 'score' => 'required|integer|min:0'\n ];\n }", "title": "" }, { "docid": "2320de3d13de7437fe620afed1bfa4a1", "score": "0.48760045", "text": "public function run()\n {\n DB::table('players')->insert([\n ['name' => 'レブロン・ジェームズ','character' => '-','birthday' => '1984-12-30','height' => '206','weight' => '113','team_id' => '1','college_id' => '1','draft_year_id' => '1','draft_rank_id' => '1'],\n ['name' => 'アンソニー・デイビス','character' => '-','birthday' => '1993-03-11','height' => '208','weight' => '100','team_id' => '1','college_id' => '1','draft_year_id' => '10','draft_rank_id' => '1'],\n ['name' => 'ドワイト・ハワード','character' => '-','birthday' => '1985-12-08','height' => '208','weight' => '120','team_id' => '1','college_id' => '1','draft_year_id' => '2','draft_rank_id' => '1'],\n ['name' => 'ジャベール・マギー','character' => '-','birthday' => '1988-01-19','height' => '213','weight' => '114','team_id' => '1','college_id' => '1','draft_year_id' => '6','draft_rank_id' => '18'],\n ['name' => 'カイル・クズマ','character' => '-','birthday' => '1995-07-24','height' => '206','weight' => '102','team_id' => '1','college_id' => '1','draft_year_id' => '15','draft_rank_id' => '27'],\n ['name' => 'アレックス・カルーソ','character' => '-','birthday' => '1994-02-28','height' => '196','weight' => '84','team_id' => '1','college_id' => '1','draft_year_id' => '14','draft_rank_id' => '60'],\n ['name' => 'レイジョン・ロンド','character' => '-','birthday' => '1986-02-22','height' => '185','weight' => '79','team_id' => '1','college_id' => '1','draft_year_id' => '4','draft_rank_id' => '21'],\n ['name' => 'ダニー・グリーン','character' => '-','birthday' => '1987-06-22','height' => '198','weight' => '98','team_id' => '1','college_id' => '1','draft_year_id' => '7','draft_rank_id' => '46'],\n ['name' => 'コンテビアス・カルドウェル・ポープ','character' => '-','birthday' => '1993-02-18','height' => '198','weight' => '93','team_id' => '1','college_id' => '1','draft_year_id' => '11','draft_rank_id' => '8'],\n ['name' => 'マーキーフ・モリス','character' => '-','birthday' => '1989-09-02','height' => '208','weight' => '113','team_id' => '1','college_id' => '1','draft_year_id' => '9','draft_rank_id' => '13'],\n \n ]);\n }", "title": "" }, { "docid": "c224096f1b539089c03a25ac15c9d020", "score": "0.48739347", "text": "public function rules()\n {\n return [\n 'tournament_id' => 'required|numeric',\n 'team_id' => 'required|numeric',\n 'count_matches' => 'numeric',\n 'place_in_tournament' => 'numeric',\n 'count_score' => 'numeric',\n 'average_score' => 'numeric',\n 'high_score' => 'numeric',\n ];\n }", "title": "" }, { "docid": "dfbc378c43e2f8159077955fc9650415", "score": "0.48708114", "text": "public function store(Request $request)\n {\n //dd($request->all());\n $user = Sentinel::getUser();\n\n $fortnight = Payroll::create($request->all())->save();\n\n foreach ($request->cedula as $key => $cedula)\n {\n\n $payrollMade = new PayrollMade();\n\n $payrollMade->usuario_id = $user->id;\n $payrollMade->cedula = $cedula;\n $payrollMade->nombre_completo = $request->nombre_completo[$key];\n $payrollMade->cargo = $request->cargo[$key];\n $payrollMade->salario_d = $request->salario_d[$key];\n $payrollMade->salario_m = $request->salario_m[$key];\n $payrollMade->islr = $request->islr[$key];\n $payrollMade->sso = $request->sso[$key];\n $payrollMade->rpe = $request->rpe[$key];\n $payrollMade->rpvh = $request->rpvh[$key];\n $payrollMade->laborados = $request->laborados[$key];\n $payrollMade->no_laborados = $request->no_laborados[$key];\n $payrollMade->cestaticket = $request->cestaticket[$key];\n $payrollMade->cestaticket_des = $request->cestaticket_des[$key];\n $payrollMade->salario_total = $request->salario_total[$key];\n\n $payrollMade->save();\n\n $payrollMade->payroll()->attach($fortnight);\n\n }\n\n //$delete_dx = \\DB::table('temporary_assignments')->truncate();\n //$delete_dy = \\DB::table('temporary_deductions')->truncate();\n\n Flash::success('<strong> Éxito </strong> se ha guardado la '.$request->quincena.' quincena del mes '.$request->mes.' del '.$request->year.' correctamente.');\n\n return redirect('admin/nomina');\n }", "title": "" }, { "docid": "150834b791f91b02d4bef4273cd28042", "score": "0.4866692", "text": "public function saveQuestion(Request $request)\n {\n $candidate = Auth::user();\n \n $default_value = [\n $request->choice_1\n ];\n \n $request->choice_2 != null ? array_push($default_value, $request->choice_2):'';\n $request->choice_3 != null ? array_push($default_value, $request->choice_3):'';\n $request->choice_4 != null ? array_push($default_value, $request->choice_4):'';\n \n \n $question = [\n 'title' => $request->question,\n 'type' => $request->type,\n 'mandatory' => $request->mandatory,\n 'goal' => $request->goal,\n 'weight' => $request->ponderation,\n 'default_value' => $default_value\n ];\n $created_question = Question::create($question);\n $created_question->category()->associate(Category::find($request->category));\n $created_question->creator()->associate($candidate);\n $created_question->formation()->associate(Formation::find(1));\n \n $created_question->save();\n \n \n $categories = Category::pluck('title', 'id');\n return view('create_question', ['categories'=>$categories]);\n }", "title": "" }, { "docid": "020b83e38d24db6bb000e0e70e705ea3", "score": "0.4858222", "text": "protected function fillable()\n {\n return [];\n }", "title": "" }, { "docid": "3d7fcdd9307e41f7d8feea412383bf3b", "score": "0.4853035", "text": "public function __construct() \n {\n parent::__construct( get_class($this) );\n parent::table(\"user_submissions\");\n parent::fields(\n array(\n \"user_id\",\n \"ques_id\",\n \"answer\"\n )\n );\n\n }", "title": "" }, { "docid": "0f0b637b80b680b981ced95c5b2235e4", "score": "0.48494402", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'years' => 'required',\n 'percentage' => 'required',\n ]);\n $chapter = Skills::create($request->all()); \n session()->flash('success' , 'Skill Added Successfully');\n return redirect()->route('admin.skills.index');\n\n }", "title": "" }, { "docid": "13911ef9c8f9845f2ef78c63bb39511d", "score": "0.48490164", "text": "public function run()\n {\n //普通用户属性填充\n DB::table('user_cigarettes')->delete();\n DB::table('user_cigarettes')->insert([\n 'user_id'=>1,\n 'age'=>24,\n 'brand'=>'芙蓉王,黄鹤楼',\n 'expect'=>'和天下',\n 'price'=>rand(20,100),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('user_cigarettes')->insert([\n 'user_id'=>2,\n 'age'=>24,\n 'brand'=>'芙蓉王,黄鹤楼',\n 'expect'=>'和天下',\n 'price'=>rand(20,100),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('user_cigarettes')->insert([\n 'user_id'=>3,\n 'age'=>24,\n 'brand'=>'芙蓉王,黄鹤楼',\n 'expect'=>'和天下',\n 'price'=>rand(20,100),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('user_cigarettes')->insert([\n 'user_id'=>4,\n 'age'=>24,\n 'brand'=>'芙蓉王,黄鹤楼',\n 'expect'=>'和天下',\n 'price'=>rand(20,100),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('user_cigarettes')->insert([\n 'user_id'=>5,\n 'age'=>24,\n 'brand'=>'芙蓉王,黄鹤楼',\n 'expect'=>'和天下',\n 'price'=>rand(20,100),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('user_cigarettes')->insert([\n 'user_id'=>6,\n 'age'=>24,\n 'brand'=>'芙蓉王,黄鹤楼',\n 'expect'=>'和天下',\n 'price'=>rand(20,100),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('user_cigarettes')->insert([\n 'user_id'=>7,\n 'age'=>24,\n 'brand'=>'芙蓉王,黄鹤楼',\n 'expect'=>'和天下',\n 'price'=>rand(20,100),\n 'created_at'=>date(\"Y-m-d H:i:s\"),\n 'updated_at'=>date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('user_cigarettes')->insert([\n 'user_id'=>9,\n 'age'=>24,\n 'brand'=>'芙蓉王,黄鹤楼',\n 'expect'=>'和天下',\n 'price'=>rand(20,100),\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": "c5775dc787c3b7ee929c96f522ce3c79", "score": "0.48412457", "text": "public function up()\n {\n Schema::create('nigorice', function (Blueprint $table) {\n $table->increments('id');\n $table->date('date')->unique();\n $table->integer('max'); \n $table->integer('min'); \n $table->uuid('uuid'); \n $table->timestamps();\n $table->softDeletes();\n });\n }", "title": "" }, { "docid": "f621cef81687998027a5b8d46a2b1594", "score": "0.4831978", "text": "public function run()\n {\n DB::table('formula_reference')->insert([\n ['from' => 1, 'penalty' => 2.50, 'bonus' => 0, 'multiplier' => 0.60, 'to' => 1],\n ['from' => 1, 'penalty' => 1.50, 'bonus' => 0, 'multiplier' => 1.16, 'to' => 2],\n ['from' => 1, 'penalty' => 1.50, 'bonus' => 0, 'multiplier' => 1.26, 'to' => 3],\n ['from' => 1, 'penalty' => 1.50, 'bonus' => 0, 'multiplier' => 1.41, 'to' => 4],\n ['from' => 1, 'penalty' => 0.10, 'bonus' => 0, 'multiplier' => 1.66, 'to' => 5],\n ['from' => 1, 'penalty' => 0.10, 'bonus' => 0, 'multiplier' => 2.05, 'to' => 6],\n ['from' => 1, 'penalty' => 0.10, 'bonus' => 0, 'multiplier' => 2.68, 'to' => 7],\n ['from' => 1, 'penalty' => 0.10, 'bonus' => 0, 'multiplier' => 3.68, 'to' => 8],\n ['from' => 1, 'penalty' => 0.10, 'bonus' => 0, 'multiplier' => 5.29, 'to' => 9],\n ['from' => 1, 'penalty' => 0.10, 'bonus' => 0, 'multiplier' => 7.87, 'to' => 10],\n ['from' => 2, 'penalty' => 1.75, 'bonus' => 0, 'multiplier' => 0.68, 'to' => 1],\n ['from' => 2, 'penalty' => 1.75, 'bonus' => 0, 'multiplier' => 0.80, 'to' => 2],\n ['from' => 2, 'penalty' => 1.00, 'bonus' => 0, 'multiplier' => 1.16, 'to' => 3],\n ['from' => 2, 'penalty' => 1.00, 'bonus' => 0, 'multiplier' => 1.26, 'to' => 4],\n ['from' => 2, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.41, 'to' => 5],\n ['from' => 2, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.66, 'to' => 6],\n ['from' => 2, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 2.05, 'to' => 7],\n ['from' => 2, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 2.68, 'to' => 8],\n ['from' => 2, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 3.68, 'to' => 9],\n ['from' => 2, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 5.29, 'to' => 10],\n ['from' => 3, 'penalty' => 0.75, 'bonus' => 0, 'multiplier' => 0.63, 'to' => 1],\n ['from' => 3, 'penalty' => 0.75, 'bonus' => 0, 'multiplier' => 0.72, 'to' => 2],\n ['from' => 3, 'penalty' => 0.75, 'bonus' => 0, 'multiplier' => 0.90, 'to' => 3],\n ['from' => 3, 'penalty' => 0.75, 'bonus' => 0, 'multiplier' => 1.16, 'to' => 4],\n ['from' => 3, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.21, 'to' => 5],\n ['from' => 3, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.33, 'to' => 6],\n ['from' => 3, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.53, 'to' => 7],\n ['from' => 3, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.85, 'to' => 8],\n ['from' => 3, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 2.36, 'to' => 9],\n ['from' => 3, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 3.18, 'to' => 10],\n ['from' => 4, 'penalty' => 0.75, 'bonus' => 0, 'multiplier' => 0.56, 'to' => 1],\n ['from' => 4, 'penalty' => 0.75, 'bonus' => 0, 'multiplier' => 0.67, 'to' => 2],\n ['from' => 4, 'penalty' => 0.75, 'bonus' => 0, 'multiplier' => 0.80, 'to' => 3],\n ['from' => 4, 'penalty' => 0.75, 'bonus' => 0, 'multiplier' => 1.00, 'to' => 4],\n ['from' => 4, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.16, 'to' => 5],\n ['from' => 4, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.26, 'to' => 6],\n ['from' => 4, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.41, 'to' => 7],\n ['from' => 4, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 1.66, 'to' => 8],\n ['from' => 4, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 2.05, 'to' => 9],\n ['from' => 4, 'penalty' => 0.20, 'bonus' => 0, 'multiplier' => 2.68, 'to' => 10],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.41, 'to' => 1],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.51, 'to' => 2],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.64, 'to' => 3],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.80, 'to' => 4],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 1.00, 'to' => 5],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 1.20, 'to' => 6],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 1.32, 'to' => 7],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 1.51, 'to' => 8],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 1.82, 'to' => 9],\n ['from' => 5, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 2.31, 'to' => 10],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.34, 'to' => 1],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.43, 'to' => 2],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.54, 'to' => 3],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.67, 'to' => 4],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.84, 'to' => 5],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 1.00, 'to' => 6],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 1.16, 'to' => 7],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 1.27, 'to' => 8],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 1.46, 'to' => 9],\n ['from' => 6, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 1.79, 'to' => 10],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.29, 'to' => 1],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.36, 'to' => 2],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.45, 'to' => 3],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.56, 'to' => 4],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.70, 'to' => 5],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 0.87, 'to' => 6],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0.6, 'multiplier' => 1.00, 'to' => 7],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0.6, 'multiplier' => 1.16, 'to' => 8],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0.6, 'multiplier' => 1.27, 'to' => 9],\n ['from' => 7, 'penalty' => 0.00, 'bonus' => 0.6, 'multiplier' => 1.46, 'to' => 10],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.24, 'to' => 1],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.29, 'to' => 2],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.37, 'to' => 3],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.46, 'to' => 4],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.58, 'to' => 5],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 0.72, 'to' => 6],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0.6, 'multiplier' => 0.90, 'to' => 7],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0.9, 'multiplier' => 1.00, 'to' => 8],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0.9, 'multiplier' => 1.16, 'to' => 9],\n ['from' => 8, 'penalty' => 0.00, 'bonus' => 0.9, 'multiplier' => 1.27, 'to' => 10],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.19, 'to' => 1],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.24, 'to' => 2],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.30, 'to' => 3],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.38, 'to' => 4],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.47, 'to' => 5],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 0.59, 'to' => 6],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 0.6, 'multiplier' => 0.74, 'to' => 7],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 0.9, 'multiplier' => 0.92, 'to' => 8],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 1.5, 'multiplier' => 1.00, 'to' => 9],\n ['from' => 9, 'penalty' => 0.00, 'bonus' => 1.5, 'multiplier' => 1.16, 'to' => 10],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.16, 'to' => 1],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.20, 'to' => 2],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.25, 'to' => 3],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.31, 'to' => 4],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 0, 'multiplier' => 0.39, 'to' => 5],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 0.3, 'multiplier' => 0.49, 'to' => 6],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 0.6, 'multiplier' => 0.61, 'to' => 7],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 0.9, 'multiplier' => 0.76, 'to' => 8],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 1.5, 'multiplier' => 0.95, 'to' => 9],\n ['from' => 10, 'penalty' => 0.00, 'bonus' => 2.5, 'multiplier' => 1.00, 'to' => 10]\n ]);\n }", "title": "" }, { "docid": "047bea6785c18ce5d02a5d61768d2053", "score": "0.4830128", "text": "public function run()\n {\n /**==============================================\n * Retirement Comments\n ===============================================*/\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'why_did_i_get_this_score',\n 'description' => 'You have 100% or more of your Lifetime Retirement Income Need.',\n 'trigger_score' => '100_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'high'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'why_did_i_get_this_score',\n 'description' => 'You have 90% or more Lifetime Retirement Income Need.',\n 'trigger_score' => '90_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'high'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'why_did_i_get_this_score',\n 'description' => 'You have 75% or more Lifetime Retirement Income Need.',\n 'trigger_score' => '75_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'high'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'why_did_i_get_this_score',\n 'description' => 'You have 50% or more Lifetime Retirement Income Need.',\n 'trigger_score' => '50_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'high'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'why_did_i_get_this_score',\n 'description' => 'You have less than 50% of your Lifetime Retirement Income Need.',\n 'trigger_score' => '50_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'low'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'what_can_i_do_to_improve',\n 'description' => 'With these assumptions, you should be able to retire on schedule!',\n 'trigger_score' => '100_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'high'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'what_can_i_do_to_improve',\n 'description' => 'You are very close to being on track for retirement, though minor changes to your plan are necessary.',\n 'trigger_score' => '90_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'high'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'what_can_i_do_to_improve',\n 'description' => 'With these assumptions, you will need to make some changes to your plan to meet your income needs on time.',\n 'trigger_score' => '75_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'high'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'what_can_i_do_to_improve',\n 'description' => 'With these assumptions, you willl have a retirement income that is more than 25% below your target.  Large changes to your plan are necessary.',\n 'trigger_score' => '50_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'high'\n ]);\n\n DB::table('wealth_score_comments')->insert( [\n 'wealth_score' => 'retirement',\n 'list' => 'what_can_i_do_to_improve',\n 'description' => 'With these assumptions, you will have a retirement income that is less than half of your target retirement income.  Large changes to your plan are necessary.',\n 'trigger_score' => '50_percent_lifetime_retirement_income_need',\n 'trigger_scope' => 'low'\n ]);\n\n }", "title": "" }, { "docid": "09188d79d3e482407299c09aa0fb7047", "score": "0.482282", "text": "public function fill($input)\n {\n foreach ($input as $key => $value) {\n if ((empty($this->fillable) or in_array($key, $this->fillable)) && !in_array($key, $this->guarded)) {\n $this->setAttribute($key, $value);\n }\n }\n }", "title": "" }, { "docid": "8f469c4b81f72d2c125eb42369cb4926", "score": "0.48136145", "text": "public function makeData()\n {\n User::create([\n 'username' => 'duocduoc',\n 'password' => bcrypt('duocduoc'),\n 'full_name' => 'Duoc Nguyen',\n 'is_active' => 1,\n 'email' => 'duocnguyen@gmail.com',\n 'phone' => '01206223029'\n ]);\n }", "title": "" }, { "docid": "fd0980c88a6f78296bbf4259c6d5b96f", "score": "0.48127976", "text": "public function saveReview(Request $request){\n $r = new TeacherComment();\n $r->comment = $request->input('opinion');\n $r->commentN = $request->input('opinionN');\n $r->score = $request->input('estrellas');\n $r->id_teacher = $request->input('id');\n $r->updated_at=\"2018-08-15 23:35:55\";\n $r->created_at=\"2018-08-15 23:35:55\";\n $r->save();\n return back();\n }", "title": "" }, { "docid": "42ad2a9bbbc0de8f9a4dd79291a5dfe9", "score": "0.48032105", "text": "public function setScore($score);", "title": "" }, { "docid": "6d197824a4c9dda1100ca8c4aaa4d88b", "score": "0.48022762", "text": "public function run()\n {\n /*\n Round::create([\n 'NumRonda' => 1,\n 'TotalScore' => 75,\n 'PlayerID' => 2,\n 'MatchID' => 1\n ]); \n */\n }", "title": "" }, { "docid": "dd0fb079910a6f8aaf96574b4dd949b3", "score": "0.47853038", "text": "public function giveScores() {\n if ($this->session->userdata('logged_in') && $this->session->userdata('logged_in')['Permission'] == \"Judge\") {\n $free_expression = $this->Score_type_model->get('Free expression');\n\n $this->form_validation->set_rules('free_expression', 'lang:free_expression', 'required');\n\n if ($this->form_validation->run() == FALSE) {\n if (isset($_POST['free_expression'])) {\n for ($i = 0; $i <= 10; $i++) {\n if((int)$this->input->post('free_expression') === $i){\n $free_expression_active = $i;\n }\n }\n } else {\n $free_expression_active = -1;\n }\n \n $this->viewGiveScores($this->input->post(\"pilot_username\"), $this->input->post(\"competitionID\"), $free_expression_active);\n } else {\n $score = new stdClass();\n $score->CompetitionID = $this->input->post(\"competitionID\");\n $score->JudgeUsername = $this->session->userdata('logged_in')['Username'];\n $score->PilotUsername = $this->input->post(\"pilot_username\");\n $score->ScoreType = $free_expression->ScoreType;\n $score->ResultType = $this->input->post('free_expression');\n\n $this->Score_model->insert($score);\n\n redirect('Competition/viewParticipants/' . $this->input->post(\"competitionID\"));\n }\n } else {\n redirect('login');\n }\n }", "title": "" }, { "docid": "223ffaa2bc120d29202d8a593fd455f1", "score": "0.4782823", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'fac_pic',\n 'faculty_id' => 'required',\n 'last_name' =>'required',\n 'first_name' => 'required',\n 'email' => 'required',\n 'contact_no' => 'required',\n 'preferred_subj' => 'required',\n 'deg_grad' => 'required',\n 'master_deg',\n 'doctor_deg' ,\n 'faculty_type' => 'required',\n ]);\n\n //Create Post\n $professorprofile = new ProfessorProfile;\n $professorprofile->fac_pic = $request->input('fac_pic');\n $professorprofile->faculty_id = $request->input('faculty_id');\n $professorprofile->last_name = $request->input('last_name');\n $professorprofile->first_name = $request->input('first_name');\n $professorprofile->email = $request->input('email');\n $professorprofile->contact_no = $request->input('contact_no');\n $professorprofile->preferred_subj = $request->input('preferred_subj');\n $professorprofile->deg_grad = $request->input('deg_grad');\n $professorprofile->master_deg = $request->input('master_deg');\n $professorprofile->doctor_deg = $request->input('doctor_deg');\n $professorprofile->faculty_type = $request->input('faculty_type');\n $professorprofile->save();\n\n return redirect('/admin/add')->with('success', 'Profile Created!');\n\n }", "title": "" }, { "docid": "dc9938bcb067513ca73f800086cfd3f1", "score": "0.4774211", "text": "public function store(Request $request)\n {\n\n foreach($request->nrc_number as $key => $value) {\n\n if($request->nrc_number[$key] <> '') {\n/*\n $this->validate($request, [\n 'nrc_number.*.nrc_number' => 'required|string',\n 'nrc_number.*.family_name' => 'required|string',\n ]);\n*/\n $member = array(\n\n 'group_details_id' => Input::get('group_details_id'),\n 'nrc_number' => $request->nrc_number[$key],\n 'family_name' => $request->family_name[$key],\n 'other_name' => $request->other_name[$key],\n 'improved_seed' => $request->improved_seed[$key],\n 'improved_storage' => $request->improved_storage[$key],\n 'improved_practices' => $request->improved_practices[$key],\n 'hectares_with_irrigation' => $request->hectares_with_irrigation[$key],\n 'accessed_vf_loan' => $request->accessed_vf_loan[$key],\n 'crop_insurance' => $request->crop_insurance[$key],\n 'hectares_harvested' => $request->hectares_harvested[$key],\n 'kgs_harvested' => $request->kgs_harvested[$key],\n\n );\n\n //GroupMemberMetrics::insert($member);\n\n }\n\n }\n\n\n\n }", "title": "" }, { "docid": "90f27ba42f6ad7be5ca163bf9395577a", "score": "0.47718647", "text": "public function change()\n {\n $table = $this->table('skills');\n $table->addColumn('id', 'uuid', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('name', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('description', 'text', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('target', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => false,\n ]);\n $table->addColumn('power', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('operation', 'string', [\n 'default' => null,\n 'limit' => 1,\n 'null' => false,\n ]);\n $table->addColumn('base_attribute', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => false,\n ]);\n $table->addColumn('target_attribute', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => false,\n ]);\n $table->addColumn('cost_attribute', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => false,\n ]);\n $table->addColumn('cost', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addPrimaryKey([\n 'id',\n ]);\n $table->create();\n }", "title": "" }, { "docid": "26ba683a31e492638ce462481899e8f8", "score": "0.4768114", "text": "public function questions(){\n return $this->belongsToMany('App\\Models\\Question','question_criterio','criterio_id','question_id')->withPivot('score');\n }", "title": "" }, { "docid": "2fe5ff666a3a4e5e65e4f6069c26c335", "score": "0.47613317", "text": "public function store(Request $request)\n {\n $Sze = new Szertexington();\n\n $request->validate([\n 'Q1'=>'required',\n 'Q2'=>'required',\n 'Q3'=>'required',\n 'Q4'=>'required',\n 'Q5'=>'required',\n 'Q6'=>'required',\n 'Q7'=>'required',\n 'Q8'=>'required',\n 'C1'=>'max:189',\n 'C2'=>'max:189',\n 'C3'=>'max:189',\n 'C4'=>'max:189',\n 'C5'=>'max:189',\n 'C6'=>'max:189',\n 'C7'=>'max:189',\n 'C8'=>'max:189',\n 'finalScore'=>'numeric',\n 'finalComment'=>'required',\n ]);\n\n $Sze->Q1 = $request->Q1;\n $Sze->Q2 = $request->Q2;\n $Sze->Q3 = $request->Q3;\n $Sze->Q4 = $request->Q4;\n $Sze->Q5 = $request->Q5;\n $Sze->Q6 = $request->Q6;\n $Sze->Q7 = $request->Q7;\n $Sze->Q8 = $request->Q8;\n\n $Sze->C1 = $request->C1;\n $Sze->C2 = $request->C2;\n $Sze->C3 = $request->C3;\n $Sze->C4 = $request->C4;\n $Sze->C5 = $request->C5;\n $Sze->C6 = $request->C6;\n $Sze->C7 = $request->C7;\n $Sze->C8 = $request->C8;\n $Sze->score= $request->finalScore;\n $Sze->QA_id = $request->QA_id;\n $Sze->user_id= $request->agentID;\n $Sze->audio = $request->audio;\n $Sze->final_comment = $request->finalComment;\n $Sze->phone = $request->phone;\n if($Sze->save()){\n return redirect('admin/Szertexington')->with('success','Qualify stored successfully');\n }else{\n return redirect('admin/Szertexington')->withInput($request->only('C1','C2','C3','C4','C5','C6','C7','C8','finalComment'));\n }\n }", "title": "" }, { "docid": "b34505be89bcf1b982dec2351d0f0222", "score": "0.47605115", "text": "public function postAdd(Request $r) {\n\n\n\n $v = validator($r->all(), [\n \"name\" => 'required|min:2',\n \"lecture_number\" => 'required',\n \"student_number\" => 'required',\n \"time\" => 'required',\n \"period\" => 'required',\n //\"body\" => 'required',\n \n ],\n [\n \"name.required\"=>\"من فضللك ادخل اسم الدورة\",\n \"time.required\"=>\"من فضللك ادخل ميعلد الدورة\",\n \"period.required\"=>\"من فضللك ادخل مدة الدورة\",\n \"time.required\"=>\"من فضللك ادخل ميعلد الدورة\",\n \"lecture_number.required\"=>\"من فضللك ادخل عدد المحاضرات \",\n \"student_number.required\"=>\"من فضللك ادخل عدد الطلاب\",\n //\"body.required\"=>\"قم باخال نبذه عن الكورس\",\n \n\n ]\n );\n // setting custom attribute names\n $v->setAttributeNames([\n \"name\" => \"الاسم \",\n \"body\" => \"المحتوى\",\n \n ]);\n\n // if the validation has been failed return the error msgs\n if ($v->fails()) {\n return msg('error.save',['msg' => implode('<br>', $v->errors()->all())]);\n }\n\n $course = new Course($r->except(['_token']));\n $course->slug= $this->generateSlug($r->name);\n $course->body= $r->editor1;\n $course->tasks= $r->editor2;\n $course->lessons_learned= $r->editor3;\n $course->aim= $r->editor4;\n \n\n\n // save the new user data\n if ($course->save()) {\n\n // validate if there's an image to save it\n $destination = storage_path('uploads/images/course');\n if($r->avatar){\n\n $avatar = microtime(time()) . \"_\" . $r->avatar->getClientOriginalName();\n $image = $course->image()->create([\n 'name' => $avatar\n ]);\n\n $r->avatar->move($destination,$avatar);\n }\n\n return msg('success.save',['msg' => 'تم اضافه الدورة بنجاح ']);\n }\n return msg('error.save',['msg' => 'حدث خطأ اتناء الاضافه ']);\n }", "title": "" }, { "docid": "f6ad450ac00038caad4b4bc3e2e5b0b3", "score": "0.47603524", "text": "public function store(Request $request){\n $this->validate($request, [\n 'rank' => 'required|min:3|max:30|unique:ranks,rank'\n\n ]);\n\n $rank = new Rank;\n $rank->rank= $request->rank;\n $rank->user_id=$request->user_id = auth()->user()->id;\n $rank->modify_by = 0;// $request->modify_by = 0;\n $rank->save();\n\n Session::flash('success','Rank added successfully.');\n\n return redirect(route('ranks.index'));\n }", "title": "" }, { "docid": "fe07f79d01a2e90eead0df9d68b12889", "score": "0.47598147", "text": "public function postQuiz(Request $request){\n \n $score = null;\n $total = null;\n // return $request;\n $quiz_data = $request->except('_token','chapter_id');\n $chapter_id = hd($request->chapter_id);\n // return\n $questions = chapter::find($chapter_id)->quiz->question()->get();\n $quizstatuses = quizstatuses::whereIn('question_id',array_column($questions->toArray(),'id'))\n ->where('user_id',Auth::user()->id)->get();\n\n if(count($quizstatuses)==0) {\n\n foreach ($questions as $question)\n {\n foreach ($quiz_data as $key => $value)\n {\n if($question->id == hd($key))\n {\n $total = $total+10; \n $quizstatuses = new quizstatuses();\n $quizstatuses->question_id = $question->id;\n $quizstatuses->user_id = Auth::user()->id;\n $quizstatuses->answer = $value; \n \n\n if($question->answer == $value)\n {\n $score+=10;\n $question->answerd = true;\n $quizstatuses->result = 'true';\n }\n else\n {\n $question->answerd = false;\n $quizstatuses->result = 'false';\n }\n \n $quizstatuses->save();\n\n }\n }\n }\n /*checking wether the score is above 80%*/\n $quizscore=($score/$total)*100;\n if( $quizscore>= constants::min_score_for_pass ){$status ='passed'; }\n else{ $status = 'failed'; }\n\n /*quiz results*/\n $results = [\n 'total' => $total,\n 'score' =>$score,\n 'status'=>$status\n ];\n // // return\n $task_credits = AssignTasks::where('user_id',Auth::user()->id)\n ->where('course_chapter_id',$chapter_id) \n ->sum('user_credits');\n\n /* inserting status 1 into chapterstatuses table */\n DB::table('chapterstatuses')->where('chapter_id',$chapter_id)->where('user_id',Auth::user()->id)\n ->update(['status' => '1','quiz_score'=>$quizscore,'task_credits'=>$task_credits]); \n // return\n $course_id=chapter::where('id',$chapter_id)\n ->select('course_id')->first();\n $chids=chapter::where('course_id',$course_id->course_id)\n ->select('id')->get()->toArray();\n // return $chids;\n // [$chapter_id,$course_id,$chids ];\n $ch_statuses=chapterstatuses::whereIn('chapter_id',$chids)\n\n ->select('id')->get();\n\n if(count($chids)==count($ch_statuses)){\n // return\n // $course_id;\n return redirect()->route('feedback',he($course_id->course_id)); \n \n }\n \n } else{\n\n return \"You have already submitted quiz...\";\n } \n\n \n\n \n return view('quiz.review')->with(['questions'=>$questions,'results'=>collect($results)]);\n }", "title": "" }, { "docid": "c2789dd86726d76f42b8b9fd6f430dc7", "score": "0.47520077", "text": "public function store(Request $request)\n {\n\n $user = User::find(Session::get('id'));\n $request->merge(['user_id' => $user->id, 'moderated' => false, 'score'=>0]);\n\n\n\n $validator = Discussion::getValidation($request);\n\n\n if ($validator->fails()){\n $request->flash();\n\n return view('discussion/create')->withErrors($validator);\n }\n \n $inputs = $validator->getData();\n\n $discussion = new Discussion($inputs);\n\n $discussion->save();\n \n //return $discussion;\n return response('OK', 200);\n \n \n }", "title": "" }, { "docid": "806b58a396df70fc69fd66d56821dd92", "score": "0.47504374", "text": "public function store(Request $request)\n {\n $request->validate([\n 'score'=>'required',\n 'score_verification_image' => 'image|mimes:jpeg,png,jpg,gif|max:2048|required'\n ]);\n\n $score = new Score;\n $score->score = $request->input('score');\n $score->game_id = $request->game_id;\n $score->user_id = $request->user_id;\n\n // Get image file\n $image = $request->file('score_verification_image');\n // Make a image name based on score name and current timestamp\n $name = str_slug($request->input('score').'_'.time());\n // Define folder path\n $folder = '/uploads/scoreImages/';\n // Make a file path where image will be stored [ folder path + file name + file extension]\n $filePath = $folder . $name. '.' . $image->getClientOriginalExtension();\n // Upload image\n $this->uploadOne($image, $folder, 'public', $name);\n // Set score profile image path in database to filePath\n $score->score_verification_image = $filePath;\n\n $score->save();\n\n return redirect()\n ->route('games.show')\n ->with('status','Added new score');\n }", "title": "" }, { "docid": "ca15a08056845f1fc7fa40b8fcc2e192", "score": "0.47504085", "text": "public function store()\n {\n // return Input::all();\n\n $caseFile = Input::get('caseFile');\n $person = Input::get('person');\n\n\n $name_father = Input::get('person.datafather.father_name');\n $surname_father = Input::get('person.datafather.father_surname');\n $name_mother = Input::get('person.datamother.mother_name');\n $surname_mother = Input::get('person.datamother.mother_surname');\n $name_spouse = Input::get('person.dataspouse.spouse_name');\n $surname_spouse = Input::get('person.dataspouse.spouse_surname');\n $present_address = Input::get('person.addresspresent.present_address');\n $original_address = Input::get('person.addressoriginal.original_address');\n\n\n if ($present_address != null) {\n $addresspresent = new AddressPresent();\n $addresspresent->fill(Input::get('person.addresspresent'));\n $addresspresent->save();\n }\n if ($original_address != null) {\n $addressoriginal = new AddressOriginal();\n $addressoriginal->fill(Input::get('person.addressoriginal'));\n $addressoriginal->save();\n }\n\n if ($name_mother != null || $surname_mother != null) {\n $datamother = new DataMother();\n $datamother->fill(Input::get('person.datamother'));\n $datamother->save();\n }\n\n if ($name_father != null || $surname_father != null) {\n $datafather = new DataFather();\n $datafather->fill(Input::get('person.datafather'));\n $datafather->save();\n }\n\n if ($name_spouse != null || $surname_spouse != null) {\n $dataspouse = new DataSpouse();\n $dataspouse->fill(Input::get('person.dataspouse'));\n $dataspouse->save();\n\n }\n\n\n $criminalhistory = new CriminalHistory();\n //$criminalhistory->fill(Input::except([\"person.data_casefile\",\"person.addressoffice\",\"person.datachild\"]));\n $criminalhistory->fill($person);\n\n if ($datamother != null) {\n $criminalhistory->datamother()->associate($datamother);\n }\n\n if ($datafather != null) {\n $criminalhistory->datafather()->associate($datafather);\n }\n\n if ($dataspouse != null) {\n $criminalhistory->dataspouse()->associate($dataspouse);\n }\n if ($addressoriginal != null) {\n $criminalhistory->addressoriginal()->associate($addressoriginal);\n }\n if ($addresspresent != null) {\n $criminalhistory->addresspresent()->associate($addresspresent);\n }\n\n $criminalhistory->save();\n\n\n $addressoffice = Input::get('person.addressoffice');\n $datachild = Input::get('person.datachild');\n\n foreach ($addressoffice as $data_office) {\n $office = new AddressOffice();\n $office->fill($data_office);\n $office->criminalhistory()->associate($criminalhistory);\n $office->save();\n }\n\n foreach ($datachild as $data_child) {\n $child = new DataChild();\n $child->fill($data_child);\n $child->criminalhistory()->associate($criminalhistory);\n $child->save();\n }\n\n $name_case = Input::get('caseFile.name_case');\n $circumstances_case = Input::get('caseFile.circumstances_case');\n\n\n if ($name_case != null || $circumstances_case != null) {\n\n\n $datacase = new DataCase();\n $datacase->fill($caseFile);\n $datacase->save();\n $datacase->criminalhistory()->attach($criminalhistory);\n\n $data_vehicle = Input::get('caseFile.vehicle');\n $data_weapon = Input::get('caseFile.weapon');\n\n\n foreach ($data_vehicle as $datavehicle) {\n $vechicle = new Vehicle();\n $vechicle->fill($datavehicle);\n $vechicle->datacase()->associate($datacase);\n $vechicle->save();\n }\n\n foreach ($data_weapon as $dataweapon) {\n $weapom = new Weapon();\n $weapom->fill($dataweapon);\n $weapom->datacase()->associate($datacase);\n $weapom->save();\n }\n\n\n }\n\n Event::fire(new AddDataPersonCrimeEvent($criminalhistory));\n return $criminalhistory;\n\n }", "title": "" }, { "docid": "731ad97b7ce5b90a7cab7f34cf0d7307", "score": "0.47465447", "text": "public function run()\n {\n $statistic = new Statistic();\n $statistic->goals = 0;\n $statistic->owngoals = 0;\n $statistic->points = 0;\n $statistic->wins = 0;\n $statistic->loses = 0;\n $statistic->draws = 0;\n $statistic->totalgames = 0;\n $statistic->save();\n\n $statistic = new Statistic();\n $statistic->goals = 0;\n $statistic->owngoals = 0;\n $statistic->points = 0;\n $statistic->wins = 0;\n $statistic->loses = 0;\n $statistic->draws = 0;\n $statistic->totalgames = 0;\n $statistic->save();\n\n\n $statistic = new Statistic();\n $statistic->goals = 0;\n $statistic->owngoals = 0;\n $statistic->points = 0;\n $statistic->wins = 0;\n $statistic->loses = 0;\n $statistic->draws = 0;\n $statistic->totalgames = 0;\n $statistic->save();\n\n $statistic = new Statistic();\n $statistic->goals = 0;\n $statistic->owngoals = 0;\n $statistic->points = 0;\n $statistic->wins = 0;\n $statistic->loses = 0;\n $statistic->draws = 0;\n $statistic->totalgames = 0;\n $statistic->save();\n\n\n }", "title": "" }, { "docid": "bc01bf0f45b77dcce400b63f5d003ed9", "score": "0.47434363", "text": "public function store(Request $request)\n {\n //\n\n $data = $request->validate([\n 'nom'=>'required|min:5',\n 'prenom' => 'required|max:7|numeric',\n 'salaire' => 'max:1000000'\n ]);\n\n $professor = new Professor();\n $professor->nom = $request->input('nom');\n $professor->prenom = $request->input('prenom');\n $professor->salaire = $request->input('salaire');\n\n $professor->save();\n return redirect('/');\n\n\n }", "title": "" }, { "docid": "2fabd760469239cae2620794d225cb95", "score": "0.4742694", "text": "public function rules()\n {\n return [\n 'level_id' => 'required|integer',\n 'part_id' => 'required|integer',\n 'max_value' => 'required|integer|greater_than_field:min_score',\n ];\n }", "title": "" }, { "docid": "0d0f09d6111ed9b34ac3c4c67261ba5b", "score": "0.47396567", "text": "public function run()\n {\n $faker = Faker::create();\n $user_id = DB::table('users')->pluck('user_id');\n $message_id = DB::table('messages')->pluck('message_id');\n\n $array = [-1, 0, 1];\n DB::table('scores')->insert([\n 'user_id' => $faker->randomElement($user_id),\n 'message_id' => $faker->randomElement($message_id),\n 'score' => array_random($array),\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]);\n }", "title": "" }, { "docid": "8823e323b296fe340643008df75e37ab", "score": "0.47363138", "text": "public function reset()\n {\n $this->reset = Skill::all();\n foreach ($this->reset as $reset){\n $reset->roms_count = 0;\n $reset->second_roms_count = 0;\n $reset->ilfov_roms_count = 0;\n $reset->ilfov_second_roms_count = 0;\n $reset->dambovita_roms_count = 0;\n $reset->dambovita_second_roms_count = 0;\n $reset->save();\n }\n }", "title": "" }, { "docid": "ba48aba2a8931b13fff33a6ad8d55dde", "score": "0.4735187", "text": "public function getFields()\n {\n return $this->fillable;\n }", "title": "" }, { "docid": "99996f23800ce791370462b1e8bceba5", "score": "0.47302577", "text": "public function store(Request $request)\n {\n $this->validate($request, array(\n 'name' => 'required|max:255', \n 'boardinghouse_id' => 'required|numeric',\n 'price_monthly' => 'required|numeric',\n 'price_annual' => 'required|numeric',\n 'gender' => 'required|boolean',\n 'chamber_size' => 'required',\n 'chamber_facility_others' => 'required' \n ));\n $chamber = new Chamber; \n $chamber->name = $request->get('name'); \n $chamber->boardinghouse_id = $request->get('boardinghouse_id'); \n $chamber->price_monthly = $request->get('price_monthly');\n $chamber->price_annual = $request->get('price_annual');\n $chamber->gender = $request->get('gender'); \n $chamber->chamber_size = $request->get('chamber_size');\n $facilities=null;\n for ($i=1; $i <=7 ; $i++) { \n $facility = 0;\n if($request->has('facility_'.$i)){ \n $facility = 1;\n }\n $facilities .= $facility;\n } \n $chamber->chamber_facility = $facilities; \n $chamber->chamber_facility_others = $request->get('chamber_facility_others'); \n $chamber->save();\n return redirect()->route('chambers.index')->with('success', 'Kamar berhasil ditambahkan');\n }", "title": "" }, { "docid": "c975885d22385f60e12e71ee1c1f99ce", "score": "0.47295758", "text": "public function update(Request $request, Member $member)\n {\n\n $request->member_experience = str_replace(',', '.', $request->member_experience);\n// dd( $request->member_experience);\n $validator = Validator::make($request->all(),\n [\n 'member_name' => ['required', 'min:2', 'max:30'],\n 'member_surname' => ['required', 'min:2', 'max:30'],\n 'member_live' => ['required', 'min:2', 'max:30'],\n 'member_experience' => ['required', 'numeric', 'min:0', 'max:99'],\n 'member_registered' => ['required', 'numeric', 'min:0', 'max:99'],\n \n ],\n [\n 'member_name.required' => 'Vardas privalomas',\n 'member_name.min' => 'Vardas per trumpas',\n 'member_name.max' => 'Vardas per ilgas',\n\n 'member_surname.required' => 'Pavardė privaloma',\n 'member_surname.min' => 'Pavardė per trumpa',\n 'member_surname.max' => 'Pavardė per ilga',\n\n 'member_live.required' => 'Laukas \"Miestas kuriame gyvena\" privalomas',\n 'member_live.min' => 'Lauko \"Miestas kuriame gyvena\" reikšmė per trumpa',\n 'member_live.max' => 'Lauko \"Miestas kuriame gyvena\" reikšmė per ilga',\n\n 'member_experience.required' => 'Laukas \"Patirtis \" privalomas',\n 'member_experience.numeric' => 'Laukas \"Patirtis\" turi būti užpildytas skaičiais',\n 'member_experience.min' => 'Lauko \"Patirtis \" reikšmė per maža',\n 'member_experience.max' => 'Lauko \"Patirtis \" reikšmė per didelė',\n\n 'member_registered.required' => 'Laukas \"Klube registruotas\" privalomas',\n 'member_registered.numeric' => 'Laukas \"Klube registruotas\" turi būti užpildytas skaičiais',\n 'member_registered.min' => 'Lauko \"Klube registruotas\" reikšmė per maža',\n 'member_registered.max' => 'Lauko \"Klube registruotas\" reikšmė per didelė',\n\n\n ]\n );\n if ($validator->fails()) {\n $request->flash();\n return redirect()->back()->withErrors($validator);\n } \n\n\n\n $member->name = $request->member_name;\n $member->surname = $request->member_surname;\n $member->live = $request->member_live;\n $member->experience = $request->member_experience;\n $member->registered = $request->member_registered;\n $member->reservoir_id = $request->reservoir_id;\n $member->save();\n return redirect()->route('member.index')->with('success_message', 'Sėkmingai pakeistas.');\n\n }", "title": "" }, { "docid": "1b7fb1b3957d8af8d4e5088cc1605429", "score": "0.47290787", "text": "public function store(Request $request)\n {\n //\n $defedant=new defedant();\n $this->validate($request,[\n 'name'=> 'required',\n 'idno' => 'required',\n 'number' =>'required',\n 'casedscription'=>'required',\n 'filename'=>'required',\n 'date'=>'required',\n 'casetype'=>'required'\n \n ]);\n \n $defedant->name = $request->name;\n $defedant->idno= $request->idno;\n $defedant->number= $request->number;\n $defedant->casedscription = $request->casedscription;\n $defedant->filename = $request->filename;\n $defedant->date = $request->date;\n $defedant->casetype = $request->casetype;\n // $student->age = $request->age;\n \n \n $defedant->save ();\n return redirect()->route('defedant')->with('success','information added'); \n \n \n }", "title": "" }, { "docid": "3406f959e523cce0f4059620077b45b6", "score": "0.4726897", "text": "public function rules()\n {\n return [\n 'answer_a'=>'required|max:45',\n 'answer_b'=>'required|max:45',\n 'answer_c'=>'required|max:45',\n 'question'=>'max:200',\n\n\n ];\n }", "title": "" }, { "docid": "1847eed5e7bc71ccb41d7ba33349bdbb", "score": "0.47232994", "text": "public function setFillable(array $attributes) {\n $this->fillable = $attributes;\n }", "title": "" }, { "docid": "9bded8005af341e7ab71541ce96379bb", "score": "0.47223645", "text": "public function resetScore(): void\n {\n //Reset member variables\n $this->playerWins = 0;\n $this->computerWins = 0;\n $this->data[\"computerWins\"] = $this->computerWins;\n $this->data[\"playerWins\"] = $this->playerWins;\n }", "title": "" }, { "docid": "f9f4bf6d1c53c2d3ffe02cedbbf14aa3", "score": "0.4718868", "text": "public function run()\n {\n for ($x=0; $x<=10; $x++) {\n DB::table('wages')->insert([\n 'user_id' => rand(1,10),\n 'working_day' => rand(20,25),\n 'days_of_attendance' => 20,\n 'achievements' => rand(111,999),\n 'allowance' => rand(111,999),\n 'bonus' => rand(111,999),\n 'overtime_pay' => rand(111,999),\n 'annua_bonus' => rand(111,999),\n 'endowment_insurance' => rand(11,99),\n 'unemployment_insurance' => rand(11,99),\n 'medical_insurance' => rand(11,99),\n 'employment_injury_insurance' => rand(11,99),\n 'maternity_insurance' => rand(11,99),\n 'housing_fund' => 273,\n 'five_one_insurance' => rand(111,999),\n 'personal_tax' => rand(111,999),\n 'withdrawing' => rand(11,99),\n 'actual_wage' => rand(3000,19999),\n 'created_at' => date('Y-m-d H:i:s', time()),\n 'updated_at' => date('Y-m-d H:i:s', time()),\n ]);\n }\n }", "title": "" }, { "docid": "e9830459c9eee0fc4d24d0be41ed1e22", "score": "0.47166574", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'review_date' => 'required|date',\n 'employee_id' => 'required',\n 'productivity' => 'required|numeric|min:1|max:5',\n 'knowledge' => 'required|numeric|min:1|max:5',\n 'relationship' => 'required|numeric|min:1|max:5',\n 'initiative' => 'required|numeric|min:1|max:5',\n\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n } else {\n $review = new Review();\n $review->review_date = $request->review_date;\n $review->employee_id = $request->employee_id;\n $review->productivity = $request->productivity;\n $review->knowledge = $request->knowledge;\n $review->relationship = $request->relationship;\n $review->initiative = $request->initiative;\n $review->performance = ($request->productivity + $request->knowledge + $request->relationship + $request->initiative) / 4;\n $review->save();\n\n return redirect()->route('review.index');\n }\n }", "title": "" }, { "docid": "bfa0393a9010a7616387e17d3ebabd5f", "score": "0.47150904", "text": "public function store(Request $request)\n {\n\t\tRequest()->validate([\n\t\t\t'sport_id' => 'required|integer|exists:sports,id',\n\t\t\t'championship_id' => 'required|integer|exists:championships,id',\n\t\t\t'type' => 'required|integer',\n\t\t\t'team1id' => 'required|integer|exists:teams,id',\n\t\t\t'startdatetime' => 'required',\n\t\t\t'enddatetime' => 'required',\n\t\t]);\n\t\t\n $data = $request->all();\n\t\t//dd($data);\n\t\t\n\t\t$data['start_time'] = Carbon::parse($data['startdatetime'])->format('Y-m-d H:i:s');\n\t\t$data['end_time'] \t= Carbon::parse($data['enddatetime'])->format('Y-m-d H:i:s');\n\t\t\n\t\t$data['created_by'] = Auth::user()->id;\n\t\t$data['updated_by'] = Auth::user()->id;\n\t\t\n\t\t$questions \t= (isset($data['questions'])) ? $data['questions'] : false;\n\t\t$points \t= (isset($data['points'])) ? $data['points'] : false;\n\t\t$answers \t= (isset($data['answers'])) ? $data['answers'] : false;\n\t\t$teams \t\t= (isset($data['teams'])) ? $data['teams'] : false;\n\t\t$trueAns \t= (isset($data['trueAns'])) ? $data['trueAns'] : false;\n\t\t\n\t\tunset($data['questions']);\n\t\tunset($data['points']);\n\t\tunset($data['answers']);\n\t\tunset($data['teams']);\n\t\tunset($data['trueAns']);\n\t\tunset($data['startdatetime']);\n\t\tunset($data['enddatetime']);\n\t\t\n\t\t$data['is_allocate'] = 0;\n\t\t\n\t\t$gameID = Game::create($data)->id;\n\t\tif(!empty($gameID) && !empty($questions) && !empty($points) && !empty($answers))\n\t\t{\n\t\t\tforeach($questions as $i => $question)\n\t\t\t{\n\t\t\t\tif(isset($questions[$i]) && !empty($questions[$i]))\n\t\t\t\t{\n\t\t\t\t\t$questionData['game_id'] \t= $gameID;\n\t\t\t\t\t$questionData['question'] \t= trim($question);\n\t\t\t\t\t$questionData['created_by'] = Auth::user()->id;\n\t\t\t\t\t$questionData['updated_by'] = Auth::user()->id;\n\t\t\t\t\t$questionID = Question::create($questionData)->id;\n\t\t\t\t\tif(!empty($questionID) && isset($answers[$i]) && !empty($answers[$i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor($k=0;$k<count($answers[$i]);$k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(isset($answers[$i][$k]) && !empty($answers[$i][$k]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$answerData['game_id'] \t\t= $gameID;\n\t\t\t\t\t\t\t\t$answerData['question_id'] \t= $questionID;\n\t\t\t\t\t\t\t\t$answerData['points'] \t\t= trim($points[$i][$k]);\n\t\t\t\t\t\t\t\t$answerData['answer'] \t\t= trim($answers[$i][$k]);\n\t\t\t\t\t\t\t\t$answerData['team_id'] \t\t= trim($teams[$i][$k]);\n\t\t\t\t\t\t\t\t//$answerData['is_true'] \t\t= (isset($trueAns[$i][$k+1])) ? 1 : 0;\n\t\t\t\t\t\t\t\t$answerData['is_true'] \t\t= 0;\n\t\t\t\t\t\t\t\t$answerData['created_by'] \t= Auth::user()->id;\n\t\t\t\t\t\t\t\t$answerData['updated_by'] \t= Auth::user()->id;\n\t\t\t\t\t\t\t\t$answerID = Answer::create($answerData)->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}\n\t\t\n\t\treturn redirect()->route('games.index')->with(\"success\",\"Game Successfully Created.\");\n }", "title": "" }, { "docid": "c5da7f030072ae3cb9fc745fd4d30c66", "score": "0.4712414", "text": "public function rules()\n {\n// dd($this->movie);\n return [\n 'movie_name' => 'required|string|max:100|unique:movies,movie_name,' . $this->movie->id,\n 'movie_details'=>'required',\n 'feature_movie'=>'nullable',\n 'running_time'=>'nullable',\n 'release_date'=>'date',\n 'cover_image'=>'image|nullable',\n 'poster_image'=>'image|nullable',\n ];\n }", "title": "" }, { "docid": "09deb7a7075ecd551398bc1ff44440a6", "score": "0.47122586", "text": "public function __construct()\n {\n $this->table = 'questionary_model';\n $this->publicColumns = [\n 'id', 'name', 'description', 'created_at', 'updated_at', 'active',\n ];\n $this->rulesForCreate = [\n 'name' => 'required|min:2|max:32',\n 'description' => 'nullable|min:2|max:256',\n 'active' => 'required|boolean',\n ];\n $this->rulesForUpdate = [\n 'name' => 'nullable|min:2|max:32',\n 'description' => 'nullable|min:2|max:256',\n 'active' => 'nullable|boolean',\n ];\n }", "title": "" }, { "docid": "688053c047b9e74f82fd2155044223ae", "score": "0.47086626", "text": "public function run()\n {\n DB::table('familys')->insert([[\n 'achternaam' => 'Blap',\n 'tussenvoegsel' => 'van den',\n 'adres' => 'Schepenweg',\n 'huisnummer' => 14,\n 'huisnummertoevoeging' => '',\n 'postcode' => '3211XS',\n 'woonplaats' => 'Geervliet',\n 'telefoon' => '0683292868',\n 'andere_alternatieven' => 0,\n 'motivering' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,',\n 'email' => 'irishabsvdlaan@gmddail.com',\n 'user_id' => 2,\n 'bezoek_sintpiet' => 0, \n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString(), \n ],\n [\n 'achternaam' => 'Grabijn',\n 'tussenvoegsel' => '',\n 'adres' => 'de Krimpen',\n 'huisnummer' => 29,\n 'huisnummertoevoeging' => '',\n 'postcode' => '9621CC',\n 'woonplaats' => 'Slochteren',\n 'telefoon' => '0641160276',\n 'andere_alternatieven' => 1,\n 'motivering' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,',\n 'email' => 'susanne.xx.-@hotddmail.com',\n 'user_id' => 2,\n 'bezoek_sintpiet' => 0, \n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString(), \n ],\n [\n 'achternaam' => 'Bladibla',\n 'tussenvoegsel' => 'van',\n 'adres' => 'Hoofdstraat',\n 'huisnummer' => 9,\n 'huisnummertoevoeging' => 'a',\n 'postcode' => '9620GC',\n 'woonplaats' => 'Amsterdam',\n 'telefoon' => '0612345678',\n 'andere_alternatieven' => 0,\n 'motivering' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,',\n 'email' => 'glop@testmdail.com',\n 'user_id' => 3,\n 'bezoek_sintpiet' => 0, \n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString(), \n ],\n [\n 'achternaam' => 'Vries',\n 'tussenvoegsel' => 'de',\n 'adres' => 'Dorpstraat',\n 'huisnummer' => 124,\n 'huisnummertoevoeging' => '3 hoog',\n 'postcode' => '1993AV',\n 'woonplaats' => 'Kortenhoef',\n 'telefoon' => '0698765434',\n 'andere_alternatieven' => 0,\n 'motivering' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,',\n 'email' => 'pop@hotmfail.com',\n 'user_id' => 4,\n 'bezoek_sintpiet' => 0, \n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString(), \n ], \n [\n 'achternaam' => 'Basou',\n 'tussenvoegsel' => '',\n 'adres' => 'Vettumse Kleffen',\n 'huisnummer' => 123,\n 'huisnummertoevoeging' => '',\n 'postcode' => '5801SE',\n 'woonplaats' => 'Venray',\n 'telefoon' => '0685411071',\n 'andere_alternatieven' => 0,\n 'motivering' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,',\n 'email' => 'mohamedbasou121@gmddail.com',\n 'user_id' => 3,\n 'bezoek_sintpiet' => 0, \n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString(), \n ],\n [\n 'achternaam' => 'Putten',\n 'tussenvoegsel' => 'van den',\n 'adres' => 'Deken Berdenstraat',\n 'huisnummer' => 3,\n 'huisnummertoevoeging' => '',\n 'postcode' => '5801ET',\n 'woonplaats' => 'Venray',\n 'telefoon' => '0623661147',\n 'andere_alternatieven' => 0,\n 'motivering' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,',\n 'email' => 'gewoonsuus@ddlive.nl',\n 'user_id' => 3,\n 'bezoek_sintpiet' => 0, \n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString(), \n ]]\n );\n\n$familys = factory(App\\Family::class, 1000)->create();\n }", "title": "" }, { "docid": "8b0b59e58d1c7a103d1f0417998a59fa", "score": "0.47053048", "text": "public function __construct() {\n parent::__construct(\"USER\");\n parent::table(\"users\");\n parent::fields(\n array(\n \"id\",\n \"name\",\n \"email\",\n \"phone\",\n \"submitted\",\n \"starting_time\",\n \"team_name\",\n \"team_code\",\n \"marks\",\n \"rank\"\n )\n );\n }", "title": "" }, { "docid": "3edd32464b66b6022f71ef919b01bf39", "score": "0.4703614", "text": "public function run()\n {\n DB::table('movies')->insert([\n //drama\n [\n 'genre_id' => '1',\n 'title' => '18 Again',\n 'photo' => 'Assets/Drama/18Again.jpg',\n 'description' => 'After nearly twenty years of marriage, Jung Da Jung and Hong Dae Young seem to be well settled in their domestic lives. The proud parents of a pair of eighteen year old twins, the devoted couple have worked hard to build a happy home together. But what seems like an ideal life on the outside is really anything but. Fed up with Dae Young’s incessant nonsense, Da Jung is at her wits’ end. When Dae Young announces that he’s been fired, Da Jung gives up completely. Convinced life would be better without her husband in it, Da Jung wastes no time in filing for divorce.',\n 'rating' => '4'\n ],\n [\n 'genre_id' => '1',\n 'title' => 'Itaewon Class',\n 'photo' => 'Assets/Drama/ItaewonClass.jpg',\n 'description' => 'Park Saeroyi life has been turned upside down after he gets expelled from school for punching a bully and his father is killed in an accident. Following his father steps, he opens a pub named DanBam in Itaewon and, along with his manager and staff, strive towards success and reaching greater heights.',\n 'rating' => '5'\n ],\n [\n 'genre_id' => '1',\n 'title' => 'Crash Landing on You',\n 'photo' => 'Assets/Drama/CrashLandingonYou.jpg',\n 'description' => 'Tells the story of two star crossed lovers, a South Korean heiress and a North Korean elite who also happens to be an army officer. One day, while paragliding, Yoon Se Ri has an accident caused by strong winds, leading her to crash land in North Korea, where she meets Ri Jung Hyuk, a North Korean army officer, who agrees to help her return to South Korea. Over time, they fall in love, despite the divide and dispute between their respective countries.',\n 'rating' => '5'\n ],\n [\n 'genre_id' => '1',\n 'title' => 'Start Up',\n 'photo' => 'Assets/Drama/StartUp.jpg',\n 'description' => 'Startup is set in South Koreas fictional Silicon Valley, called Sandbox, and tells the story of people in the world of startup companies. Seo Dal Mi dreams of becoming Koreas Steve Jobs. Shes an adventurer who doesnt own much, but has a grand plan for herself. She also has experience in a wide range of part-time jobs and is a person of great vitality.',\n 'rating' => '4'\n ],\n //kids\n [\n 'genre_id' => '2',\n 'title' => 'Spongebob',\n 'photo' => 'Assets/Kids/Spongebob.jpg',\n 'description' => 'SpongeBob SquarePants is an American animated comedy television series created by marine science educator and animator Stephen Hillenburg for Nickelodeon. The series chronicles the adventures and endeavors of the title character and his aquatic friends in the fictional underwater city of Bikini Bottom.',\n 'rating' => '5'\n ],\n [\n 'genre_id' => '2',\n 'title' => 'Naruto',\n 'photo' => 'Assets/Kids/Naruto.jpg',\n 'description' => 'Naruto Uzumaki, is a young ninja who seeks recognition from his peers and dreams of becoming the Hokage, the leader of his village. The story is told in two parts – the first set in Narutos pre-teen years, and the second in his teens.',\n 'rating' => '5'\n ],\n [\n 'genre_id' => '2',\n 'title' => 'Boruto',\n 'photo' => 'Assets/Kids/Boruto.jpg',\n 'description' => 'Several years after the end of the Shinobi War, Narutos son, Boruto, began his adventure with his teammates Sarada and Mitsuki.',\n 'rating' => '4'\n ],\n [\n 'genre_id' => '2',\n 'title' => 'Adventure Time',\n 'photo' => 'Assets/Kids/AdventureTime.jpg',\n 'description' => 'the series follows the adventures of a boy named Finn and his best friend and adoptive brother Jake a dog with the magical power to change size and shape at will. Finn and Jake live in the post-apocalyptic Land of Ooo, where they interact with Princess Bubblegum, the Ice King (, Marceline, BMO, and others.',\n 'rating' => '4'\n ],\n //tvshow\n [\n 'genre_id' => '3',\n 'title' => 'RunningMan',\n 'photo' => 'Assets/TVShows/RunningMan.jpg',\n 'description' => 'In each episode, the members and sometimes guests must complete missions at famous landmarks to win the race. The missions almost always feature running, hence the title, and the name tag ripping game is filled with tension as each member struggles to survive.',\n 'rating' => '4'\n ],\n [\n 'genre_id' => '3',\n 'title' => 'Knowing Brothers',\n 'photo' => 'Assets/TVShows/KnowingBros.jpg',\n 'description' => 'It is a sitcom talk show program set in a school. In each episode, new celebrity guests appear as transfer students at the Brother School where seven mischievous brother students wait for them. The show consists of several dynamic sessions. In Guess About Me, Celebrity guests create random, secret questions about themselves. Then the hosts called Knowledgeable Bros make humorous guesses to get the answers. Another session is Bros Inside, an ad-lib skit show, where entertainers are given only the setting for a story and have to perform completely ad-libbed skits.',\n 'rating' => '5'\n ],\n [\n 'genre_id' => '3',\n 'title' => 'Late Night Seth Meyers',\n 'photo' => 'Assets/TVShows/LateNightShow.jpg',\n 'description' => 'Late Night with Seth Meyers is an American late-night and news satire talk show hosted by Seth Meyers on NBC. The show premiered on February 24, 2014, and is produced by Broadway Video and Universal Television. It is the fourth iteration of NBCs Late Night franchise. The show also stars bandleader Fred Armisen and the 8G Band, the shows house band. Late Night is produced by former Saturday Night Live producer Mike Shoemaker and executive-produced by Lorne Michaels.',\n 'rating' => '4'\n ],\n [\n 'genre_id' => '3',\n 'title' => 'The Show James Corden',\n 'photo' => 'Assets/TVShows/TheLateShow.jpeg',\n 'description' => 'The Late Late Show with James Corden (also known as Late Late) is an American late-night talk show hosted by James Corden on CBS. It is the fourth and current iteration of The Late Late Show. Airing in the U.S. from Monday to Friday nights, it is taped in front of a studio audience Monday through Thursday afternoons – during weeks in which first-run episodes are scheduled to air – at CBS Television City',\n 'rating' => '4'\n ]\n ]);\n }", "title": "" }, { "docid": "b457a27f80f47c5d638295d61593d894", "score": "0.4702453", "text": "public static function manageLeaderboardFields(){\n\t\treturn [ \n\t\t\t\"questions.id AS id\", \n\t\t\t\"questions.user_id AS user_id\", \n\t\t\t\"Users.username AS users_username\", \n\t\t\t\"questions.points AS points\", \n\t\t\t\"questions.date AS date\", \n\t\t\t\"questions.username AS username\" \n\t\t];\n\t}", "title": "" }, { "docid": "0a4b130d5fcead17a15905811387b698", "score": "0.47024474", "text": "public function updateData()\n {\n $this->resetErrorBag();\n \\Illuminate\\Support\\Facades\\Log::info(\"New mood entered:\".$this->mood);\n $data = $this->validate(['mood' => [\n 'required',\n \\Illuminate\\Validation\\Rule::in(['Love','Hate','Lust']),\n ]]);\n #$this->mood = $data['mood'];\n $this->emit('saved');\n }", "title": "" }, { "docid": "d3cd301d186cc89ce5e8c441cda12557", "score": "0.47022226", "text": "public function create()\n\t{\n\t\tif(!Auth::guest())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t\tif(!empty($user->hero)){\n\t\t\t\treturn redirect('/')\n\t\t\t\t\t->withError('You already have a hero');\n\t\t\t}\n\t\t\t$name = Input::get('name');\n\t\t\t$classes = HeroesTypes::all();\n\t\t\t$sex = Input::get('sex');\n\t\t\tif(empty($name) or $sex == '0')\n\t\t\t\treturn view('hero.create')\n\t\t\t\t\t->withErrors('Please fill all the fields')\n\t\t\t\t\t->with('name', $name)\n\t\t\t\t\t->withClasses($classes)\n\t\t\t\t\t->with('sex', $sex);\n\t\t\t$hero = new Hero();\n\t\t\t$hero->user_id = $user->id;\n\t\t\t$hero->name = $name;\n\t\t\t$hero->sex = $sex;\n\t\t\t$hero->location = 'home';\n\t\t\t$hero->level = 1;\n\t\t\t$hero->experience = 0;\n\t\t\t$hero->busy = 0;\n\t\t\t$hero->class_id = Input::get('class');\n\t\t\t$class = HeroesTypes::find($hero->class_id);\n\n\t\t\t$stats = new Stats();\n\t\t\t$stats->strength = $class->strength;\n\t\t\t$stats->perception = $class->perception;\n\t\t\t$stats->endurance = $class->endurance;\n\t\t\t$stats->charisma = $class->charisma;\n\t\t\t$stats->intelligence = $class->intelligence;\n\t\t\t$stats->agility = $class->agility;\n\t\t\t$stats->luck = $class->luck;\n\n\t\t\t$stats->final_strength = $class->strength;\n\t\t\t$stats->final_perception = $class->perception;\n\t\t\t$stats->final_endurance = $class->endurance;\n\t\t\t$stats->final_charisma = $class->charisma;\n\t\t\t$stats->final_intelligence = $class->intelligence;\n\t\t\t$stats->final_agility = $class->agility;\n\t\t\t$stats->final_luck = $class->luck;\n\t\t\t$stats->save();\n\n\t\t\t$stats_cost= new StatsCost();\n\t\t\t$stats_cost->stats_id = $stats->id;\n\t\t\t$hero->stats_id = $stats->id;\n\t\t\t$hero->save();\n\t\t\treturn redirect('/')\n\t\t\t\t->with('user', $user)\n\t\t\t\t->with('hero', $hero);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn redirect('/auth/login')\n\t\t\t\t->withError('You are not logged in');\n\t\t}\n\t}", "title": "" }, { "docid": "8bdd882062e94c2f05763f380c56b4cd", "score": "0.47015435", "text": "public function rules()\n {\n return [\n 'drawMoney' => 'required|integer|max:5000000|min:1',\n ];\n }", "title": "" }, { "docid": "19ccda5e0cf909e56908867eadd1f6b2", "score": "0.46925777", "text": "public function run()\n {\n DB::table('student')->insert(array(\n array('roll_no'=>'101','name'=>'deepak','class'=>'10+2'),\n array('roll_no'=>'102','name'=>'satwinder','class'=>'10+2'),\n array('roll_no'=>'103','name'=>'rohit','class'=>'10+2'),\n array('roll_no'=>'104','name'=>'mandeep','class'=>'10+2'),\n array('roll_no'=>'105','name'=>'ajay','class'=>'10+2'),\n array('roll_no'=>'106','name'=>'samar','class'=>'10+2')\n ));\n }", "title": "" }, { "docid": "ca2f8af30bb13cfb7d9b6e7f05f74310", "score": "0.4691918", "text": "public function run()\n {\n DB::table('scores')->insert([\n [\n 'stu_id'=> 1,\n 'user_id'=>1,\n 'score' => 0,\n 'type_id'=>27,\n \n ],\n [\n 'stu_id'=> 1,\n 'user_id'=>1,\n 'score' => 0,\n 'type_id'=>28,\n \n ],\n [\n 'stu_id'=> 1,\n 'user_id'=>1,\n 'score' => 0,\n 'type_id'=>29,\n \n ],\n [\n 'stu_id'=> 1,\n 'user_id'=>1,\n 'score' => 0,\n 'type_id'=>30,\n \n ],\n [\n 'stu_id'=> 2,\n 'user_id'=>4,\n 'score' => 0,\n 'type_id'=>27,\n \n ],\n [\n 'stu_id'=> 2,\n 'user_id'=>4,\n 'score' => 0,\n 'type_id'=>28,\n \n ],\n [\n 'stu_id'=> 2,\n 'user_id'=>4,\n 'score' => 0,\n 'type_id'=>29,\n \n ],\n [\n 'stu_id'=> 2,\n 'user_id'=>4,\n 'score' => 0,\n 'type_id'=>30,\n \n ],\n [\n 'stu_id'=> 3,\n 'user_id'=>5,\n 'score' => 0,\n 'type_id'=>27,\n \n ],\n [\n 'stu_id'=> 3,\n 'user_id'=>5,\n 'score' => 0,\n 'type_id'=>28,\n \n ],\n [\n 'stu_id'=> 3,\n 'user_id'=>5,\n 'score' => 0,\n 'type_id'=>29,\n \n ],\n [\n 'stu_id'=> 3,\n 'user_id'=>5,\n 'score' => 0,\n 'type_id'=>30,\n \n ],\n [\n 'stu_id'=> 4,\n 'user_id'=>6,\n 'score' => 0,\n 'type_id'=>27,\n \n ],\n [\n 'stu_id'=> 4,\n 'user_id'=>6,\n 'score' => 0,\n 'type_id'=>28,\n \n ],\n [\n 'stu_id'=> 4,\n 'user_id'=>6,\n 'score' => 0,\n 'type_id'=>29,\n \n ],\n [\n 'stu_id'=> 4,\n 'user_id'=>6,\n 'score' => 0,\n 'type_id'=>30,\n \n ],\n \n ]);\n }", "title": "" }, { "docid": "91e688bf6caf60523f54434a011d366b", "score": "0.46903998", "text": "public function run()\n {\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_1','level' => '1','technique' => 'きあいぎり','damage' => '100']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_1','level' => '2','technique' => 'きあいぎり','damage' => '100']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_2','level' => '3','technique' => '乱れきり','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_2','level' => '4','technique' => '乱れきり','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_2','level' => '5','technique' => '乱れきり','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_3','level' => '6','technique' => 'せんこうぎり','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_3','level' => '7','technique' => 'せんこうぎり','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_3','level' => '8','technique' => 'せんこうぎり','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_3','level' => '9','technique' => 'せんこうぎり','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_4','level' => '10','technique' => '連鎖きり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_4','level' => '11','technique' => '連鎖きり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_4','level' => '12','technique' => '連鎖きり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_4','level' => '13','technique' => '連鎖きり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_5','level' => '14','technique' => '鎌投げ','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_5','level' => '15','technique' => '鎌投げ','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_5','level' => '16','technique' => '鎌投げ','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_6','level' => '17','technique' => 'ひっさつぎり','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_6','level' => '18','technique' => 'ひっさつぎり','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_6','level' => '19','technique' => 'ひっさつぎり','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"C\",'image' => '/img/atack_animation/c_6','level' => '20','technique' => 'ひっさつぎり','damage' => '450']);\n\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_1','level' => '1','technique' => 'きあいなぐり','damage' => '100']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_1','level' => '2','technique' => 'きあいなぐり','damage' => '100']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_2','level' => '3','technique' => '二段なぐり','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_2','level' => '4','technique' => '二段なぐり','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_2','level' => '5','technique' => '二段なぐり','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_3','level' => '6','technique' => '四段なぐり','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_3','level' => '7','technique' => '四段なぐり','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_3','level' => '8','technique' => '四段なぐり','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_3','level' => '9','technique' => '四段なぐり','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_4','level' => '10','technique' => '隕石なぐり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_4','level' => '11','technique' => '隕石なぐり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_4','level' => '12','technique' => '隕石なぐり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_4','level' => '13','technique' => '隕石なぐり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_5','level' => '14','technique' => '回しなぐり','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_5','level' => '15','technique' => '回しなぐり','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_5','level' => '16','technique' => '回しなぐり','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_6','level' => '17','technique' => 'たこなぐり','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_6','level' => '18','technique' => 'たこなぐり','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_6','level' => '19','technique' => 'たこなぐり','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"B\",'image' => '/img/atack_animation/b_6','level' => '20','technique' => 'たこなぐり','damage' => '450']);\n\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_1','level' => '1','technique' => 'サンダー','damage' => '100']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_1','level' => '2','technique' => 'サンダー','damage' => '100']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_2','level' => '3','technique' => 'フリーズ','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_2','level' => '4','technique' => 'フリーズ','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_2','level' => '5','technique' => 'フリーズ','damage' => '200']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_3','level' => '6','technique' => '雷撃','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_3','level' => '7','technique' => '雷撃','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_3','level' => '8','technique' => '雷撃','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_3','level' => '9','technique' => '雷撃','damage' => '300']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_4','level' => '10','technique' => '紅白ビーム','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_4','level' => '11','technique' => '紅白ビーム','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_4','level' => '12','technique' => '紅白ビーム','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_5','level' => '13','technique' => '火炎ビーム','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_5','level' => '14','technique' => '火炎ビーム','damage' => '400']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_5','level' => '15','technique' => '火炎ビーム','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_5','level' => '16','technique' => '火炎ビーム','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_6','level' => '17','technique' => 'ジ・エンド','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_6','level' => '18','technique' => 'ジ・エンド','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_6','level' => '19','technique' => 'ジ・エンド','damage' => '450']);\n DB::table('user_technique')->insert(['user_feature' => \"A\",'image' => '/img/atack_animation/a_6','level' => '20','technique' => 'ジ・エンド','damage' => '450']);\n }", "title": "" }, { "docid": "44919443f0a8f802ee878d35ae4d985f", "score": "0.46882355", "text": "public function run()\n {\n //DB::table('perfils')->truncate();\n\n $academico = new \\App\\Perfil();\n\n $academico->nombre = \"Academico\";\n $academico->valido = true;\n $academico->save();\n\n $administrativo = new \\App\\Perfil();\n $administrativo->nombre = \"Administrativo\";\n $administrativo->valido = true;\n $administrativo->save();\n\n $becario = new \\App\\Perfil();\n $becario->nombre = \"Becario\";\n $becario->valido = true;\n $becario->save();\n }", "title": "" }, { "docid": "a7f85334154d6743eb06696d7784b3e8", "score": "0.46871734", "text": "public function __construct(int $score = 0)\n {\n $this->score = $score;\n }", "title": "" }, { "docid": "d85ce432645364855b88610b78265cd2", "score": "0.46866417", "text": "public function rules()\n {\n return [\n //'iduser' => 'required|numeric'\n 'idjuego' => 'required|numeric',\n 'estado' => 'required|in:Completado,Jugando,Abandonado,Pendiente',\n 'score' => 'nullable|numeric|max:10|min:0|regex:/^[\\d]{0,2}(\\.[\\d]{1})?$/',\n 'comentario' => 'nullable|string',\n 'favorito' => 'nullable|in:1,0',\n ];\n }", "title": "" }, { "docid": "0f21af9dfb5ea99d18d492a2da565f9f", "score": "0.4686618", "text": "public static function insert_into_user($user,$p,$disability_pic,$achievement_pic,$pan_pic, $aadhaar_pic,$caste_pic) {\n $now = DB::raw('NOW()');\n $user = User::create([\n 'emp_id' => $user['emp_id'],\n 'name' => $user['name'],\n 'emp_type' => $user['emp_type'],\n 'email' => $user['email'],\n 'password' => bcrypt($user['password']),\n 'dob' => $user['dob'],\n 'joined_date' => $now,\n 'sex' => $user['sex'],\n 'address' => $user['address'],\n 'religion' => $user['religion'],\n 'caste' => $user['caste'],\n 'contact' => $user['contact'],\n 'salutation' => $user['salutation'],\n 'category' => $user['category'],\n 'physically_disabled' => $user['physically_disabled'],\n 'pnt_no' => $user['pnt_no'],\n 'appointed_on_quota' => $user['appointed_on_quota'],\n 'discipline' => $user['discipline'],\n 'achievements' => $user['achievements'],\n 'hometown' => $user['hometown'],\n 'pan_no' => $user['pan_no'],\n 'aadhaar' => $user['aadhaar'],\n 'salary' => $user['salary'],\n 'marital_status'=> $user['marital_status'],\n 'children' => $user['children'],\n 'cl_balance' => $user['cl_balance'],\n 'photo' => $p,\n 'disability_pic' => $disability_pic,\n 'pan_pic' => $pan_pic,\n 'aadhaar_pic' => $aadhaar_pic,\n 'achievement_pic' => $achievement_pic,\n 'caste_pic' => $caste_pic\n ]);\n\n\n auth()->login($user);\n}", "title": "" }, { "docid": "6f4f3a6bf1107db31e09e4c33ddb0bf8", "score": "0.4685571", "text": "public function store(Request $request)\n {\n //insert cara 1\n // $user = new PersonalUser;\n // $user->username = $request->username;\n // $user->pass = $request->pass;\n // $user->first_name = $request->first_name;\n // $user->last_name = $request->last_name;\n // $user->email = $request->email;\n // $user->placeofbirth = $request->placeofbirth;\n // $user->dateofbirth = $request->dateofbirth;\n // $user->address = $request->address;\n // $user->company = $request->company;\n // $user->job = $request->job;\n // $user->level = $request->level;\n // $user->save();\n\n\n //insert cara 3 setelah tambah fillable/guarded di model\n // User::create($request->all());\n \n //validasi\n $request->validate([\n 'username' => 'required|min:6',\n 'pass' => 'required|min:8',\n 'first_name' => 'required|min:2',\n // 'last_name' => 'required',\n 'email' => 'required',\n 'placeofbirth' => 'required',\n 'dateofbirth' => 'required',\n 'address' => 'required',\n 'company' => 'required',\n 'job' => 'required',\n 'level' => 'required'\n ]);\n\n //insert data cara 2, tambahkan juga fillable/guarded di modelnya\n User::create([\n 'username' => $request->username,\n 'pass' => Crypt::encryptString($request->pass),\n 'first_name' => Str::ucfirst($request->first_name),\n 'last_name' => Str::ucfirst($request->last_name),\n 'email' => $request->email,\n 'placeofbirth' => Str::ucfirst($request->placeofbirth),\n 'dateofbirth' => $request->dateofbirth,\n 'address' => Str::upper($request->address),\n 'company' => Str::title($request->company),\n 'job' => Str::ucfirst($request->job),\n 'level' => Str::ucfirst($request->level)\n ]);\n\n return redirect('/users');\n\n }", "title": "" } ]
1914ca22741cf8031da47b4f3c526eda
Returns the release date of the package
[ { "docid": "dfd9022a7d48c4f366c21e52b0033bdc", "score": "0.6169724", "text": "public function getReleaseDate(): ?\\DateTimeInterface;", "title": "" } ]
[ { "docid": "25700aa495b08a7d930e8d8d58bc9354", "score": "0.8679444", "text": "public static function getReleaseDate () {}", "title": "" }, { "docid": "a05eb66c672277effebc91a4e6aa1e49", "score": "0.8204333", "text": "public function getReleaseDate() {\n\t}", "title": "" }, { "docid": "a3804236317a6d5bfc4b71d53c252020", "score": "0.80290776", "text": "public function getReleaseDate()\n {\n return $this->releaseDate;\n }", "title": "" }, { "docid": "1faf2b21e9227830f7a73e3caf0aab48", "score": "0.8028625", "text": "public function getReleaseDate()\n {\n return $this->_releaseDate;\n }", "title": "" }, { "docid": "bacdb8567dde93963b96d2fa5edd4569", "score": "0.80232054", "text": "public function getReleaseDate()\n {\n return $this->release_date;\n }", "title": "" }, { "docid": "36cd4600ac5383ef262b60825f4921a2", "score": "0.79103315", "text": "public function getRelease_date()\n {\n return $this->release_date;\n }", "title": "" }, { "docid": "5c130b5d0becada7828ec135d576e240", "score": "0.75456333", "text": "public function getReleaseDate() {\n if ($this->isReady) {\n if ($strReturn = $this->matchRegex($this->_strSource, IMDB::IMDB_RELEASE_DATE, 1)) {\n return str_replace('(', ' (', $strReturn);\n }\n return $this->strNotFound;\n }\n return $this->strNotFound;\n }", "title": "" }, { "docid": "521eb5729a157361c5caab95c2711bdc", "score": "0.7536024", "text": "public function getReleaseDate(): \\DateTime\n {\n return $this->release_date;\n }", "title": "" }, { "docid": "63ceb14f3890cd93d6ebd05e559474eb", "score": "0.74823266", "text": "public function getReleaseDate()\n {\n if (!isset($this->data['time'])) {\n return $this->loadReleaseDateInformationFromGit();\n }\n\n return $this->data['time'];\n }", "title": "" }, { "docid": "37ff79d8dadac6298ff7ae450ec5234d", "score": "0.7441658", "text": "public function getReleaseDate(): ?string;", "title": "" }, { "docid": "7bdd3d5a14777082f51b3129e2d3b9d8", "score": "0.68348366", "text": "public function getRelease()\n {\n }", "title": "" }, { "docid": "8a53f4bd6dc310d8ebc9d8f119793390", "score": "0.66491395", "text": "public function getDate(): string\n {\n return $this->getVersionFile()->getDate();\n }", "title": "" }, { "docid": "4de1fa9e7bc8a6ed076d26dcb293dc1d", "score": "0.6524849", "text": "public function getRelease($version)\n {\n }", "title": "" }, { "docid": "db19731325051209e301fef96d152f82", "score": "0.648085", "text": "public function getPreReleaseVersion(): string\n {\n return $this->parseVersion()->preRelease;\n }", "title": "" }, { "docid": "26a8c389896caa01f19823de36920bb0", "score": "0.6432203", "text": "public function getRelease() {\n return isset($this->release) ? $this->release : FALSE;\n }", "title": "" }, { "docid": "eba378291e88093bc4ae67423d68c999", "score": "0.6429325", "text": "private function loadReleaseDateInformationFromGit()\n {\n $process = new Process('git log -n1 --pretty=%ci HEAD', $this->getPackageDirectory());\n if ($process->run() != 0) {\n throw new \\RuntimeException(\n 'Can\\'t run git log in ' . $this->getPackageDirectory() . '. ' .\n 'Ensure to run compile from git repository clone and that git binary is available.'\n );\n }\n\n $date = new \\DateTime(trim($process->getOutput()));\n $date->setTimezone(new \\DateTimeZone('UTC'));\n\n return $date->format('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "9f004879ef525d274a924dd1aebc6537", "score": "0.63761306", "text": "protected function getLastReleaseTime() {\n $timestamp = 0;\n\n /** @var \\Psr\\Http\\Message\\ResponseInterface $build_file */\n $build_file = $this->httpClient->request('GET', 'https://www.va.gov/BUILD.txt');\n\n $body = $build_file->getBody();\n if (preg_match('/BUILDTIME=([0-9]*)/', $body, $matches)) {\n $timestamp = $matches[1];\n }\n\n if ($timestamp) {\n $days = $this->getDaysAgo($timestamp);\n $time = $this->dateFormatter->format($timestamp, 'custom', 'h:i a T');\n return \"{$days} at {$time}\";\n }\n\n return '';\n }", "title": "" }, { "docid": "e0f395b36feffa1dbb8cb02fa808b912", "score": "0.63349867", "text": "function &_getCurrentRelease($strict = true)\n {\n if ($p = $this->getPackageType()) {\n if ($strict) {\n if ($p == 'extsrc' || $p == 'zendextsrc') {\n $a = null;\n return $a;\n }\n }\n if ($p != 'bundle') {\n $p .= 'release';\n }\n if (isset($this->_packageInfo[$p][0])) {\n return $this->_packageInfo[$p][count($this->_packageInfo[$p]) - 1];\n } else {\n return $this->_packageInfo[$p];\n }\n } else {\n $a = null;\n return $a;\n }\n }", "title": "" }, { "docid": "86e1b0960c2fe4f9b7abead638bb2e8f", "score": "0.62614465", "text": "public function getPubDate()\n {\n return $this->pubDate;\n }", "title": "" }, { "docid": "8eedf67af1387ca06ed10c91c3238949", "score": "0.62400544", "text": "public function get_package_version()\n {\n return $this->_package_version;\n }", "title": "" }, { "docid": "60ed80e3ddd72c0595f47613806a8b47", "score": "0.6239422", "text": "public function getDate()\n {\n $xpathObject = $this->getDomPath();\n $nodes = $xpathObject->query(self::ABS_PUBDATE);\n if ($nodes) {\n $node = $nodes[0];\n\n $year = $this->getNodesValue($xpathObject, self::REL_YEAR, $node);\n $month = $this->getNodesValue($xpathObject, self::REL_MONTH, $node);\n $day = $this->getNodesValue($xpathObject, self::REL_DAY, $node);\n $dateString = '';\n if ($day) {\n $dateString .= $this->arrayToString($day) . '-';\n }\n if ($month) {\n $dateString .= $this->arrayToString($month) . '-';\n }\n if ($year) {\n $dateString .= $this->arrayToString($year);\n }\n return date('Y-m-d', strtotime($dateString));\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "cdbb2d3df8a8405e09b67c4b1fe275c1", "score": "0.6220318", "text": "public function getVersion()\n {\n return $this->package['version'];\n }", "title": "" }, { "docid": "56c6da7fa5cebbe42c2d95dea2bb6af7", "score": "0.6180661", "text": "public function getBuildVersion();", "title": "" }, { "docid": "a65a47600f2f88963de079f0528feca7", "score": "0.6176432", "text": "private function getRepoReleaseInfo()\n {\n if ( ! empty( $this->githubAPIResult ) )\n {\n \t\t return;\n\t\t }\n\n\t\t // Query the GitHub API\n \t\t$url = \"https://api.github.com/repos/{$this->username}/{$this->repo}/releases\";\n \n \t\tif ( ! empty( $this->accessToken ) )\n \t\t{\n\t\t $url = add_query_arg( array( \"access_token\" => $this->accessToken ), $url );\n \t\t}\n\n \t\t// Get the results\n \t\t$this->githubAPIResult = wp_remote_retrieve_body( wp_remote_get( $url ) );\n\n \t\tif ( ! empty( $this->githubAPIResult ) )\n \t\t{\n\t\t $this->githubAPIResult = @json_decode( $this->githubAPIResult );\n \t\t}\n\n\t\t // Use only the latest release\n \t\tif ( is_array( $this->githubAPIResult ) )\n \t\t{\n\t\t $this->githubAPIResult = $this->githubAPIResult[0];\n \t\t}\n }", "title": "" }, { "docid": "561073cdf3c17635085b36e5bae5860e", "score": "0.6170473", "text": "public function getPublishDate()\n {\n return $this->cvPublishDate;\n }", "title": "" }, { "docid": "590a078fac5df5939e17cb98d8668525", "score": "0.6162272", "text": "public function getPreorderReleaseDate(): ?DateTime\n {\n return $this->preorder_release_date;\n }", "title": "" }, { "docid": "57e6c0d65849ae25b1b289a46c785650", "score": "0.61417925", "text": "public function getReleaseNotes()\n {\n $version = $this->getVersion();\n if (!$version) {\n return null;\n }\n return \"https://www.getsymphony.com/download/releases/version/$version/\";\n }", "title": "" }, { "docid": "ea4873e3ba383cc1c6f0d8253adb880c", "score": "0.611559", "text": "public function get_latest_release() {\r\n $data = '';\r\n if (!empty($this->repository)) {\r\n $contents = $this->get_response('repos/' . $this->username . '/' . $this->repository . '/releases/latest');\r\n if ($contents == TRUE) {\r\n $data = json_decode($contents);\r\n }\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "38101a04bfddf4c60ad1f4454023903d", "score": "0.6088922", "text": "public function getBundleVersion()\n {\n @$packageInfo = $this->registry->packageInfo( 'ezcomponents', null, 'components.ez.no' );\n return $packageInfo['version']['release'];\n }", "title": "" }, { "docid": "e4251ebe0aeecfb32b193bd97fd6d261", "score": "0.6081979", "text": "private function checkCurrentVersion() {\n $url = 'https://api.github.com/repos/pantheon-systems/cli/releases?per_page=1';\n $response = Request::send($url, 'GET'); \n $json = $response->getBody(true);\n $data = json_decode($json);\n $release = array_shift($data);\n $this->cache->put_data('latest_release', array('version' => $release->name, 'check_date' => time()));\n return $release->name;\n }", "title": "" }, { "docid": "5fea585715138bd057ab9379d6aa9b9c", "score": "0.60092694", "text": "public function get_current_version();", "title": "" }, { "docid": "b493371dd929be3e3a2d61a6702dae7d", "score": "0.6006061", "text": "public function getVersion(): string\n {\n $version = sprintf(\n '%1$d.%2$d.%3$d',\n $this->getMajorVersion(),\n $this->getMinorVersion(),\n $this->getPatchVersion()\n );\n\n // Append the pre-release, if available.\n if ($this->preRelease) {\n $version .= '-' . $this->preRelease;\n }\n\n return $version;\n }", "title": "" }, { "docid": "278f1e953b16b7894522cb84855f3ae7", "score": "0.59903556", "text": "public function get_version()\n {\n return $this->_run('get_version');\n }", "title": "" }, { "docid": "9386f90d81f1be9620e42c330a78d968", "score": "0.5979821", "text": "public static function Version() \n\t{ \n\t\treturn (string)self::tag('version'); \n\t}", "title": "" }, { "docid": "6ca323b2327a430fceadd1c5b1ef8b7d", "score": "0.5941226", "text": "public static function getVersion()\n {\n \treturn self::MAJOR_VERSION . self::MINOR_VERSION . self::REVISION;\n }", "title": "" }, { "docid": "9de6a219c84b6c1cbfd5af80bc116a4f", "score": "0.59189886", "text": "public function getVersionDateCreated()\n {\n return $this->cvDateCreated;\n }", "title": "" }, { "docid": "61be01b541e7c4e90a9b6be9764d048c", "score": "0.5917694", "text": "function osc_static_page_pub_date() {\n return osc_static_page_field(\"dt_pub_date\");\n }", "title": "" }, { "docid": "d375111df169afb4882dba7b29b9ca58", "score": "0.5859454", "text": "function getversion ()\n {\n return $this->version;\n }", "title": "" }, { "docid": "7733971f10fdf5406ebecff986618c24", "score": "0.5851804", "text": "public static function getVersion () {}", "title": "" }, { "docid": "074a5ecbe6373a2b551139100ec81260", "score": "0.5845005", "text": "public function getPurchaseDate()\n {\n return $this->purchase_date;\n }", "title": "" }, { "docid": "42cdc1da65cb378c082b4c728ab49db9", "score": "0.58388734", "text": "public function date()\n {\n return $this->object->getPublishAt();\n }", "title": "" }, { "docid": "51d0629ed9330cad3c1452c434431c02", "score": "0.58093804", "text": "public function getVersion()\n {\n return $this->getData('version') ?? '';\n }", "title": "" }, { "docid": "2bcd1d279febc3100a9e7d4f630fe1db", "score": "0.5795847", "text": "function GetVersion()\r\n\t{\r\n\t\treturn \"0.7.2.1\";\r\n\t}", "title": "" }, { "docid": "619634f35e479fb05d3135c01d64685a", "score": "0.577545", "text": "function POOL_getCDDistributionRelease($mountPoint,&$distr,&$release)\n{\n\t$pin=popen(\"cat `find $mountPoint/ -iname release | grep \\\"/binary-\\\" | awk -v LEN=9999 '{if (length($0) < LEN){LEN=length($0);OUT=$0}} END {print(\\$OUT)}'` | awk '/Origin:/ {print(\\\"d:\\\"\\$2)}\n/Codename:/ {print(\\\"r:\\\"\\$2)}\n/Archive:/ {print(\\\"r:\\\"\\$2)}\n'\",\"r\");\n\n\twhile ($line=fgets($pin))\n\t{\n\t\t$typeVal=explode(\":\",$line);\n\n\t\tswitch ($typeVal[0])\n\t\t{\n\t\t\tcase \"d\": $distr=trim($typeVal[1]); break;\n\t\t\tcase \"r\": $release=trim($typeVal[1]); break;\n\t\t};\n\t};\n}", "title": "" }, { "docid": "29ae1acbc5443cd89a423117701dfaa5", "score": "0.5773054", "text": "public function getVersion() : string;", "title": "" }, { "docid": "8681401c8fe71d3a1b858b061bff7f00", "score": "0.5756442", "text": "function getVersion();", "title": "" }, { "docid": "9f470fb718b1f5b4da52be6da0494df0", "score": "0.57529587", "text": "public function getVersion(): string;", "title": "" }, { "docid": "9f470fb718b1f5b4da52be6da0494df0", "score": "0.57529587", "text": "public function getVersion(): string;", "title": "" }, { "docid": "95a75ecc47fda2a313f2962952f27945", "score": "0.5742755", "text": "public function getLongVersion() : string\n {\n return sprintf(\n '<info>%s</info> version <comment>%s</comment> %s',\n $this->getName(),\n $this->getVersion(),\n CH::RELEASE_DATE\n );\n }", "title": "" }, { "docid": "24f64bb7447b0c7fe88ef263dc0b2410", "score": "0.5740085", "text": "function get_version() {\n return self::VERSION;\n }", "title": "" }, { "docid": "2dec83a3ac91d5fffc00b46d8dd0fa5c", "score": "0.57295066", "text": "public function getAvailableVersion()\n {\n if (self::$ghVersion === null) {\n $ghResource = new Github($this->config, new Curl());\n self::$ghVersion = $ghResource->getLatestProjectVersion('dotpay', DOTPAY_MODNAME);\n }\n\n return self::$ghVersion;\n }", "title": "" }, { "docid": "d0041b4626f13630340b6bdd63bbea11", "score": "0.57177913", "text": "public function getPackageVersion(): Package\\Version\n {\n return $this->packageVersion;\n }", "title": "" }, { "docid": "c8a113b345bc62933d9253dde26d5f48", "score": "0.57174134", "text": "public function getReleaseApiVersion()\n\t{\n\t\t$version = explode('.', self::API_VERSION);\n\t\treturn $version[2];\n\t}", "title": "" }, { "docid": "1b8ccc220bf9f93870ea18199eaea59d", "score": "0.571696", "text": "public function getArchivingDate()\n {\n return $this->_archiving ? $this->_archiving->format('U') : null;\n }", "title": "" }, { "docid": "c033aaf9056e2d64d8eba129f29322c0", "score": "0.571379", "text": "private function purchaseDate()\n {\n return null;\n }", "title": "" }, { "docid": "5b3922efcd8e7d704d4d168c3bd1f7cc", "score": "0.57076013", "text": "public function getLatestVersion(): string\n {\n return $this->latestVersion;\n }", "title": "" }, { "docid": "00eed9086799697e16af3ca8c8d7f768", "score": "0.57056195", "text": "public function versionName(): string;", "title": "" }, { "docid": "b8b9336682d155929a89a3e674df7486", "score": "0.5704565", "text": "public static function getVersion();", "title": "" }, { "docid": "b8b9336682d155929a89a3e674df7486", "score": "0.5704565", "text": "public static function getVersion();", "title": "" }, { "docid": "d20ef9f47282b7e4646d4158913930dd", "score": "0.5699482", "text": "public function getPublishDate() {\n\t\t\treturn get_post_time('U',false,$this->aritcle_id);\n\t\t}", "title": "" }, { "docid": "1b3288e19338684e10d9cc83caa03054", "score": "0.56945777", "text": "public function getReleaseReleaseGroup()\n {\n return $this->releaseReleaseGroup;\n }", "title": "" }, { "docid": "cfac741b741f181eec5b33a511c21c0d", "score": "0.5693698", "text": "private function _get_date_published() {\n // Element is required and may appear once only\n return $this->_eval_query_as_string(\"/{$this->nsp}article/{$this->nsp}admin/{$this->nsp}numero/{$this->nsp}pubnum/{$this->nsp}date\");\n }", "title": "" }, { "docid": "9576e1d50659b8d6dc77e8f15d86edd6", "score": "0.56879455", "text": "public function fetchLatestRelease($package)\n {\n return $this->_read($this->_url . '/rest/r/' . strtolower($package) . '/latest.txt');\n }", "title": "" }, { "docid": "f68ddec34f5e195f62d86ac5663851f0", "score": "0.56810415", "text": "public static function get()\n {\n $commitHash = trim(exec('git log --pretty=\"%h\" -n1 HEAD'));\n\n // Get date and time information.\n $commitDate = new \\DateTime(trim(exec('git log -n1 --pretty=%ci HEAD')));\n $commitDate->setTimezone(new \\DateTimeZone('UTC'));\n\n // Format all information into a version identifier.\n return sprintf('v%s.%s.%s-dev.%s (%s)', self::MAJOR, self::MINOR, self::PATCH, $commitHash, $commitDate->format('Y-m-d H:m:s'));\n }", "title": "" }, { "docid": "344cb04a83936b1d93cf122b0e8b7336", "score": "0.567997", "text": "public function getDate()\n {\n return ($this->isAnnotated()?$this->tag->getObject()->getDate():\n $this->tag->getObject()->getAuthorTime());\n }", "title": "" }, { "docid": "d28c5113bbef1db32f4b6ee4399de8cd", "score": "0.5677323", "text": "public function getPublishingDate()\n {\n return $this->_publishing ? $this->_publishing->format('U') : null;\n }", "title": "" }, { "docid": "3b105f5e6c8ea5f43690565b0b6c66ea", "score": "0.56746626", "text": "function BringUptoDate($oldversion) {\n \n \n \n}", "title": "" }, { "docid": "50e7ee8203392e72238475d579bd0def", "score": "0.56648105", "text": "public function getLastBuildDate() {\r\n\t\tif (array_key_exists ( 'lastBuildDate', $this->data )) {\r\n\t\t\treturn $this->data ['lastBuildDate'];\r\n\t\t}\r\n\t\t\r\n\t\t$lastBuildDate = null;\r\n\t\t$date = null;\r\n\t\t\r\n\t\tif ($this->getType () !== Reader\\Reader::TYPE_RSS_10 && $this->getType () !== Reader\\Reader::TYPE_RSS_090) {\r\n\t\t\t$lastBuildDate = $this->xpath->evaluate ( 'string(/rss/channel/lastBuildDate)' );\r\n\t\t\tif ($lastBuildDate) {\r\n\t\t\t\t$lastBuildDateParsed = strtotime ( $lastBuildDate );\r\n\t\t\t\tif ($lastBuildDateParsed) {\r\n\t\t\t\t\t$date = new DateTime ( '@' . $lastBuildDateParsed );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$dateStandards = array (\r\n\t\t\t\t\t\t\tDateTime::RSS,\r\n\t\t\t\t\t\t\tDateTime::RFC822,\r\n\t\t\t\t\t\t\tDateTime::RFC2822,\r\n\t\t\t\t\t\t\tnull \r\n\t\t\t\t\t);\r\n\t\t\t\t\tforeach ( $dateStandards as $standard ) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t$date = DateTime::createFromFormat ( $standard, $lastBuildDateParsed );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} catch ( \\Exception $e ) {\r\n\t\t\t\t\t\t\tif ($standard == null) {\r\n\t\t\t\t\t\t\t\tthrow new Exception\\RuntimeException ( 'Could not load date due to unrecognised' . ' format (should follow RFC 822 or 2822):' . $e->getMessage (), 0, $e );\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}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (! $date) {\r\n\t\t\t$date = null;\r\n\t\t}\r\n\t\t\r\n\t\t$this->data ['lastBuildDate'] = $date;\r\n\t\t\r\n\t\treturn $this->data ['lastBuildDate'];\r\n\t}", "title": "" }, { "docid": "d3a0b8c4d9a383a39aecbb1e42b58c96", "score": "0.5661297", "text": "function get_version() {\n return self::VERSION;\n }", "title": "" }, { "docid": "fcc263c797739614c9cd995177f7fa5b", "score": "0.56534195", "text": "function GetR3Release () {\n $this->GetSystemInfo();\n return $this->systemInfo[\"SAPREL\"];\n }", "title": "" }, { "docid": "f459ab0a3e16b71fb0245d15d4902a10", "score": "0.5643161", "text": "public function getLinkDate() {\n\t\treturn ($this->linkDate);\n\t}", "title": "" }, { "docid": "2833110cfa19183614c4ef0d18cc89aa", "score": "0.56428534", "text": "public function getStartingVersion();", "title": "" }, { "docid": "41d2ac7e13725b5f216488da8f2e1831", "score": "0.56402934", "text": "public function archive()\n {\n \treturn $this->date()->format(\"F Y\");\n }", "title": "" }, { "docid": "a342d7fde6d84b5ceb1764381314461a", "score": "0.56397253", "text": "private function getVersion()\n {\n return $this->version;\n }", "title": "" }, { "docid": "a244da2dafbf4ee7d101d5bf7db62015", "score": "0.56368977", "text": "function bbp_get_version()\n{\n}", "title": "" }, { "docid": "0c0ad7f4adbfac6ee05df3458195389a", "score": "0.56356484", "text": "public function version(): string\n {\n return $this->version;\n }", "title": "" }, { "docid": "3a5d63e65ccc9f7402ba4df8a2ac006d", "score": "0.56291825", "text": "public function get_version()\n {\n return $this->version;\n }", "title": "" }, { "docid": "3a5d63e65ccc9f7402ba4df8a2ac006d", "score": "0.56291825", "text": "public function get_version()\n {\n return $this->version;\n }", "title": "" }, { "docid": "3a5d63e65ccc9f7402ba4df8a2ac006d", "score": "0.56291825", "text": "public function get_version()\n {\n return $this->version;\n }", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.5627511", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "6628e290209a86571c21294db9d40063", "score": "0.56253296", "text": "private function release_elements() {\n return array('version_major', 'version_patch', 'version_extra', 'release_link', 'download_link', 'date', 'mdhash', 'filesize', 'security', 'recommended');\n }", "title": "" }, { "docid": "4670caad3afaeb39a3c43b8f28ad2d13", "score": "0.562391", "text": "public function generateReleaseName($args = array()) {\n\n if (isset($args['is_new']) and $args['is_new'] == TRUE) {\n // For now we do basic detection on new objects. But we\n // should instead detect if the values for the name field\n // are set.\n // @todo\n }\n else {\n if (!empty($this->version_patch) || ($this->version_patch == 0 && $this->version_extra != 'dev')) {\n $this->tag = $this->api . '-' . $this->version_major . '.' . $this->version_patch;\n $this->version = $this->tag;\n }\n else {\n $this->tag = $this->api . '-' . $this->version_major . '.x';\n $this->version = $this->tag;\n }\n if (!empty($this->version_extra)) {\n $this->version .= '-' . $this->version_extra;\n }\n\n // Get the project short name from the project reference.\n if (empty($this->project_short_name)) {\n $wrapper = entity_metadata_wrapper('release', $this);\n $project = $wrapper->field_project_reference->value();\n $project = project_load($project->id);\n $this->project_short_name = $project->short_name;\n\n // Error if the project short name is STILL empty.\n if (empty($this->project_short_name)) {\n // @todo: Handle/fix this error.\n // Happens when creating Release from the Release Page inline form.\n watchdog('fserver', 'Unhandled error: Release does not have a project.', NULL, WATCHDOG_ERROR);\n }\n }\n $this->name = $this->project_short_name . ' ' . $this->version;\n }\n }", "title": "" }, { "docid": "a87dd23aea83632b4a3d5938e05e9620", "score": "0.5617471", "text": "function getDate() {\n\t\treturn $this->pl->getDate();\n\t}", "title": "" }, { "docid": "c6faf881bd5a779d2f726c6f90d5dd26", "score": "0.5616762", "text": "public function get_version() {\r\n\t\treturn $this->version;\r\n\t}", "title": "" }, { "docid": "c6faf881bd5a779d2f726c6f90d5dd26", "score": "0.5616762", "text": "public function get_version() {\r\n\t\treturn $this->version;\r\n\t}", "title": "" }, { "docid": "9d16d3dd17f8be21236bc803c6d55248", "score": "0.56138086", "text": "public static function get() {\n\t\t$commitHash = trim(exec('git log --pretty=\"%h\" -n1 HEAD'));\n\n\t\t// Get date and time information.\n\t\t$commitDate = new \\DateTime(trim(exec('git log -n1 --pretty=%ci HEAD')));\n\t\t$commitDate->setTimezone(new \\DateTimeZone('UTC'));\n\n\t\t// Format all information into a version identifier.\n\t\treturn sprintf('v%s.%s.%s-dev.%s (%s)', self::MAJOR, self::MINOR, self::PATCH, $commitHash, $commitDate->format('Y-m-d H:m:s'));\n\t}", "title": "" }, { "docid": "4eb5d3da15f95f1c6212cb66897a0ee5", "score": "0.5610216", "text": "public static function get_version() {\n\n\t\treturn static::$version;\n\n\t}", "title": "" }, { "docid": "46e5a0531e7a99500cc8236816cce24b", "score": "0.5609256", "text": "protected function _getPublishedDate()\n {\n if ($date = $this->getAppEntity()->getPublishedDate()) {\n return Mage::helper('gene_bluefoot')->__('Published %s', Mage::helper('gene_bluefoot/date')->getFriendlyDateTime(strtotime($date)));\n }\n return '';\n }", "title": "" }, { "docid": "bf6babf45dd1470740d65f6dff8616b3", "score": "0.5603293", "text": "public function getVersion()\n {\n $version =\n $this->getMajor() . '.' .\n $this->getMinor() . '.' .\n $this->getPatch()\n ;\n\n if( $build = $this->getBuild() )\n {\n $version .= '-' . $build;\n }\n\n return $version;\n }", "title": "" }, { "docid": "8a68e43f3585b98325610556eba7a92e", "score": "0.56024164", "text": "public function getPurgeDate()\n {\n return $this->purgeDate;\n }", "title": "" } ]
e2039f1b79cf0bdf8ac3eeaf871dd786
End of function submit_approval
[ { "docid": "fb914e3dd172ba89e5008567aeec922c", "score": "0.0", "text": "public function server_side_data_dp() {\n\n\t\t$query = $this->db->query(\"SELECT sale.id,\n\t\t\t\t\t\t\t\t\t\t receipt_number,\n\t\t\t\t\t\t\t\t\t\t sale.created_time,\n\t\t\t\t\t\t\t\t\t\t customer_ref,\n\t\t\t\t\t\t\t\t\t\t total_price,\n\t\t\t\t\t\t\t\t\t\t total_price + d_cost + ppn AS 'grand_total',\n\t\t\t\t\t\t\t\t\t\t nominal_bayar,\n\t\t\t\t\t\t\t\t\t\t total_price + d_cost + ppn - nominal_bayar AS 'pelunasan',\n\t\t\t\t\t\t\t\t\t\t sale_status,\n\t\t\t\t\t\t\t\t\t\t CASE \n\t\t\t\t\t\t\t\t\t\t WHEN sale_status = 1 THEN 'DP'\n\t\t\t\t\t\t\t\t\t\t WHEN sale_status = 2 THEN 'Lunas'\n\t\t\t\t\t\t\t\t\t\t WHEN sale_status = 3 THEN 'Piutang'\n\t\t\t\t\t\t\t\t\t\t END AS 'sale_status_name',\n\t\t\t\t\t\t \t\t\t\t IF(payment_method_id = 'z', 'Tunai', CONCAT(payment_method.name, ' - ', bank_name)) AS 'payment_method',\n\t\t\t\t\t\t\t\t\t\t payment_method_id\n\t\t\t\t\t\t\t\t\t\t FROM sale\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN payment_method ON payment_method.id = sale.payment_method_id AND sale.payment_method_id != 'z'\n\t\t\t\t\t\t\t\t\t\t WHERE sale.dept_id = \" . $this->session->userdata('dept_id') . \"\n\t\t\t\t\t\t\t\t\t\t AND (date_lunas IS NULL\n\t\t\t\t\t\t\t\t\t\t AND date_dp IS NOT NULL)\n\t\t\t\t\t\t\t\t\t\t ORDER BY sale.created_time DESC\");\n\n\t\t$payment_method = $this->db->query(\"SELECT id,\n\t\t\t\t\t\t\t\t\t\t\t\t CONCAT(name, ' - ', bank_name) AS 'method'\n\t\t\t\t\t\t\t\t\t\t\t\t FROM payment_method\n\t\t\t\t\t\t\t\t\t\t\t\t WHERE dept_id = \" . $this->session->userdata('dept_id') . \"\n\t\t\t\t\t\t\t\t\t\t\t\t AND status = 1\")->result();\n\n\t\t$results = $query->result();\n\n\t\t$data = array();\n\n\t\tforeach ($results as $rows) :\n\n\t\t\t$row = array();\n\n\t\t\t$row[] = $rows->receipt_number;\n\n\t\t\t$row[] = $rows->customer_ref;\n\n\t\t\t$row[] = date('d.m.Y H:i', strtotime($rows->created_time));\n\n\t\t\t$row[] = number_format($rows->grand_total, 2, '.', ',');\n\n\t\t\t$row[] = number_format($rows->nominal_bayar, 2, '.', ',');\n\n\t\t\t$row[] = number_format($rows->pelunasan, 2, '.', ',') . '<input type=\"hidden\" id=\"nominal_bayar_' . $rows->id . '\" value=\"' . $rows->grand_total . '\">';\n\n\t\t\t$row[] = $rows->payment_method;\n\n\t\t\t$row[] = '<div class=\"badge badge-warning\">' . $rows->sale_status_name . '</div>';\n\n\t\t\t$y = '<select id=\"dp_method_' . $rows->id . '\" class=\"form-control\">';\n\t\t\t$y .= '<option value=\"\" selected disabled>Pilih Metode Pembayaran</option>';\n\t\t\tforeach ($payment_method as $list) :\n\n\t\t\t\t$y .= '<option value=\"' . $list->id . '\">' . $list->method . '</option>';\n\n\t\t\tendforeach;\n\n\t\t\t$y .= '<option value=\"z\">Tunai</option>';\n\t\t\t$y .= '</select>';\n\n\t\t\t$row[] = $y;\n\n\t\t\tif ($this->session->userdata('p_approval_submit') == 1) {\n\n\t\t\t\t$checkbox = '<div class=\"text-center\"><input type=\"checkbox\" id=\"approve_dp_' . $rows->id . '\" onclick=\"approve_dp_checked(this)\" class=\"approve_dp_sales\" value=\"' . $rows->id . '\"></div>';\n\n\t\t\t} else {\n\t\t\t\t$checkbox = '';\n\t\t\t}\n\n\t\t\t$row[] = $checkbox;\n\n\t\t\t$data[] = $row;\n\n\t\tendforeach;\n\n\t\t$output = array(\n\t\t\t\t\t\t'data' => $data\n\t\t\t\t\t);\n\n\t\techo json_encode($output);\n\t\t\n\t}", "title": "" } ]
[ { "docid": "45ee254c0fcad1a2aa51f4bc58152ea4", "score": "0.6685792", "text": "function approval() {\n\n\t\t// Permission\n\t\t$this->session_lib->check_permission('p_approval_report');\n\n\t\t$attr = array(\n\t\t\t\t\t\t'closingDate' => $this->closingDate,\n\t\t\t\t\t\t'filterStatus' => $this->filter_status(),\n\t\t\t\t\t\t'filterPaymentMethod' => $this->filter_payment_method()\n\t\t\t\t\t);\n\n\t\t$this->layout_lib->default_template('transaction/acc/approval', $attr);\n\t}", "title": "" }, { "docid": "d720217fb18ece6eac9b08567ee3bdff", "score": "0.6644729", "text": "public function _submit()\n\t{\n\t\t$this->posted($this, $this->submits);\n\t}", "title": "" }, { "docid": "e671854e4b1a903182e612e0526da21b", "score": "0.6617743", "text": "function submitPayment()\n {\n\n $this->prepareSubmit();\n\n\n }", "title": "" }, { "docid": "44c743c7edd58fea09db45baaa604558", "score": "0.657178", "text": "public function reviewResubmit()\n\t{\n\t\t$this->status = self::STATUS_PIPELINE;\n\t\t$this->editable = false;\n\t\t$this->incrementRevision();\n\t\t$this->resetNextActionsList();\n\t\t$this->addNextAction(self::ACTION_WORKSHOP_QUEUE);\n\t\t$this->addNextAction(self::ACTION_EXTERNAL_REVIEW);\n\t\t$this->resetStatusMessagesList();\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "340a29d5a917771dd6ef10baafeab60d", "score": "0.65097916", "text": "public function proceed();", "title": "" }, { "docid": "4de48d2ca92fe10e9d8ee70ce0a0accb", "score": "0.6460645", "text": "public function vettingResubmit()\n\t{\n\t\t$this->status = self::STATUS_VETTING;\n\t\t$this->editable = false;\n\t\t$this->addStatusMessage(self::STATMSG_RESUBMITTED_AFTER_VET_REVISION);\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "10381f334a9b723dd6c0aa0d237c2982", "score": "0.64043653", "text": "public function submit();", "title": "" }, { "docid": "3e6c5cab625945230b4ebcf1a9264468", "score": "0.63864356", "text": "public function submit_approval() {\n\n\t\t// Permission\n\t\t$this->session_lib->check_permission('p_approval_submit');\n\n\t\t$this->db->trans_start();\n\n\t\t$sale_status = $this->input->post('sale_status');\n\n\t\tif ($sale_status == 3) {\n\n\t\t\t$data = array(\n\t\t\t\t\t\t\t'due_date' \t\t\t=> date_format(date_create($this->input->post('due_date')), 'Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'updated_time'\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'updated_by' \t\t=> $this->session->userdata('user_id')\n\t\t\t\t\t\t);\n\n\t\t} else {\n\n\t\t\t$pay = floatval(\n\t\t\t\t\t\t\t\tstr_replace(\",\", \"\", \n\t\t\t\t\t\t\t\t\tstr_replace(\".00\", \"\", $this->input->post('nominal_bayar'))\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\n\t\t\t$nominal_dp = 0;\n\t\t\tif ($sale_status == 1) {\n\t\t\t\t$date_dp \t= date('Y-m-d H:i:s');\n\t\t\t\t$date_lunas = null;\n\t\t\t\t$nominal_dp = $pay;\n\t\t\t} elseif ($sale_status == 2) {\n\t\t\t\t$date_dp \t= null;\n\t\t\t\t$date_lunas = date('Y-m-d H:i:s');\n\t\t\t}\n\n\t\t\t$data = array(\n\t\t\t\t\t\t\t'date_dp'\t\t\t=> $date_dp,\n\t\t\t\t\t\t\t'date_lunas'\t\t=> $date_lunas,\n\t\t\t\t\t\t\t'nominal_bayar'\t\t=> $pay,\n\t\t\t\t\t\t\t'nominal_dp'\t\t=> $pay,\n\t\t\t\t\t\t\t'payment_method_id' => $this->input->post('payment_method_id'),\n\t\t\t\t\t\t\t'updated_time'\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'updated_by' \t\t=> $this->session->userdata('user_id')\n\t\t\t\t\t\t);\n\n\t\t}\n\n\t\t$this->db->where('id', $this->input->post('id'));\n\t\t$this->db->update('sale', $data);\n\n\t\t$this->db->query(\"UPDATE sale_record SET detail = JSON_SET(detail, '$.\" . date('Y-m-d H:i:s') . \"', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tJSON_OBJECT('status_menu', 1, 'act', 1, 'user_id', '\" . $this->session->userdata('user_id') . \"'))\n\t\t\t\t\t\t\t\t\t \t\t\tWHERE sale_id = \" . $this->input->post('id'));\n\n\t\tif ($this->db->trans_status() === false) {\n\n\t\t\t$this->db->trans_rollback();\n\n\t\t\techo 'error';\n\n\t\t} else {\n\n\t\t\t$this->db->trans_commit();\n\n\t\t\techo 'success';\n\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "02aa78fb75d7541132d5b080911f6f09", "score": "0.6374148", "text": "protected function postSetSubmit() {}", "title": "" }, { "docid": "3e3811e5c7dcf95c7cee065d65b20d88", "score": "0.6372798", "text": "public function p_approve() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n $testtaker_staging_id = $_POST[\"testtaker_staging_id\"];\n $errors = array();\n foreach($_POST as $key => $value) {\n if (strpos($key, 'chk_') === 0) {\n if (is_numeric($value)) {\n //first get the details from the row\n $q=\"SELECT first_name, last_name, email, job_title, person_id, issue_text FROM testtaker_staging_rows WHERE testtaker_staging_row_id = \".$value.\" AND issue_text IS NULL\";\n $testtaker_staging_row = DB::instance(DB_NAME)->select_row($q);\n\n if (count($testtaker_staging_row) > 0) {//this could be blank if there were issues in the issue_text\n //second get the job ID or add it for the title\n $job_title = trim($testtaker_staging_row[\"job_title\"]);\n $job_title = $job_title != \"\" ? $job_title : \"Test Taker\";\n $job_id = siteutils::getJobId($job_title, $this->user->account_id);\n\n //third add the user\n $user_id = siteutils::createUser($this->user->account_id,$job_id,$testtaker_staging_row['first_name'],$testtaker_staging_row['last_name']\n ,$testtaker_staging_row['email'],$_POST[\"txtPassword\"], false);\n\n }\n } else {\n $errors[] = \"Invalid values posted\";\n }\n }\n }\n\n if (count($errors) == 0) {\n //Finally delete the staging data\n $q = \"DELETE FROM testtaker_staging_rows WHERE testtaker_staging_id=\".$testtaker_staging_id;\n DB::instance(DB_NAME)->query($q);\n $q = \"DELETE FROM testtaker_staging WHERE testtaker_staging_id=\".$testtaker_staging_id;\n DB::instance(DB_NAME)->query($q);\n //redirect so the user can see the new recruits\n Router::redirect(\"/testtakers/\");\n } else {//display the errors\n\n }\n }", "title": "" }, { "docid": "f20622e5a431f5d53dbd056b5967aa50", "score": "0.6338981", "text": "public final function reverseApproval()\n {\n $this->performTransaction(FinancialTransaction::TYPE_REVERSE_APPROVAL);\n }", "title": "" }, { "docid": "de468cdf655ece188cde0cbb283ae974", "score": "0.63307804", "text": "private function submit()\n {\n $this->submitRequirements();\n $sAuthentication = $this->submitAuthentication();\n $this->submitDatabaseProperUid();\n\n $this->view->assign( 'authentication', $sAuthentication );\n }", "title": "" }, { "docid": "308a6a70275c915183187de1896982a2", "score": "0.6317664", "text": "public function submit() {\n $boolean = $this->hasEvals();\n if ($boolean == true) {\n foreach ($this->evalList as $eval) {\n $eval->updateProperty('status', 'submitted');\n }\n }\n $boolean = $this->isWaitingEvalListEmpty();\n if ($boolean == true) {\n foreach ($this->waitingEvalList as $waitingEval) {\n $waitingEval->updateProperty('status', 'submitted');\n }\n }\n $boolean = $this->isEducationReportListEmpty();\n if ($boolean == true) {\n foreach ($this->educationReportList as $educationReport) {\n $educationReport->updateProperty('status', 'submitted');\n }\n }\n $result = $this->updateProperty('status', 'submitted');\n $now = date('Y-m-d H:i:s');\n $this->updateProperty('pack_submitted_time', $now);\n $this->updateProperty('submitted_by_member_id', $this->getProperty('submitted_by_member_id'));\n return $result;\n }", "title": "" }, { "docid": "5dc11a67b6babfb8d360c1b1d81c3a66", "score": "0.63058203", "text": "public function submit_dp() {\n\n\t\t// Permission\n\t\t$this->session_lib->check_permission('p_approval_submit');\n\n\t\t$this->db->trans_start();\n\n\t\t$data = array(\n\t\t\t\t\t\t'sale_status'\t\t\t\t=> 2,\n\t\t\t\t\t\t'date_lunas'\t\t\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t\t'nominal_bayar'\t\t\t\t=> floatval($this->input->post('nominal_bayar')),\n\t\t\t\t\t\t'payment_method_dp_lunas' \t=> $this->input->post('dp_method_id'),\n\t\t\t\t\t\t'updated_time'\t\t\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t\t'updated_by' \t\t\t\t=> $this->session->userdata('user_id')\n\t\t\t\t\t);\n\n\t\t$this->db->where('id', $this->input->post('id'));\n\t\t$this->db->update('sale', $data);\n\n\t\t$this->db->query(\"UPDATE sale_record SET detail = JSON_SET(detail, '$.\" . date('Y-m-d H:i:s') . \"', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tJSON_OBJECT('status_menu', 2, 'act', 1, 'user_id', '\" . $this->session->userdata('user_id') . \"'))\n\t\t\t\t\t\t\t\t\t \t\t\tWHERE sale_id = \" . $this->input->post('id'));\n\n\t\tif ($this->db->trans_status() === false) {\n\n\t\t\t$this->db->trans_rollback();\n\n\t\t\techo 'error';\n\n\t\t} else {\n\n\t\t\t$this->db->trans_commit();\n\n\t\t\techo 'success';\n\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "a011ec665fa072a0671921cf472bf4f4", "score": "0.62838167", "text": "function teamApproval()\n\t{\n\t\tJRequest::checkToken( 'GET' ) or jexit( 'Invalid Token' );\n\n\t\t// @task: Check for acl rules.\n\t\t$this->checkAccess( 'teamblog' );\n\t\t\n\t\t$mainframe\t= JFactory::getApplication();\n\t\t$acl\t\t= EasyBlogACLHelper::getRuleSet();\n\t\t$config \t= EasyBlogHelper::getConfig();\n\t\t$document\t= JFactory::getDocument();\n\t\t$my\t\t\t= JFactory::getUser();\n\n\t\t$teamId \t= JRequest::getInt('team', 0);\n\t\t$approval\t= JRequest::getInt('approve');\n\t\t$requestId\t= JRequest::getInt('id', 0);\n\n\t\t$ok \t\t= true;\n\t\t$message = '';\n\t\t$type = 'info';\n\t\t\n\t $teamRequest = EasyBlogHelper::getTable( 'TeamBlogRequest','Table' );\n\t $teamRequest->load($requestId);\n\n\t\tif($approval)\n\t\t{\n\t\t $teamUsers = EasyBlogHelper::getTable( 'TeamBlogUsers','Table' );\n\n\t\t $teamUsers->user_id = $teamRequest->user_id;\n\t\t $teamUsers->team_id = $teamRequest->team_id;\n\n\t\t if($teamUsers->store())\n\t\t\t{\n\t\t $message = JText::_('COM_EASYBLOG_TEAMBLOGS_APPROVAL_APPROVED');\n\t\t }\n\t\t else\n\t\t {\n\t\t $ok \t\t= false;\n\t\t $message = JText::_('COM_EASYBLOG_TEAMBLOGS_APPROVAL_FAILED');\n\t\t $type = 'error';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t $message = JText::_('COM_EASYBLOG_TEAMBLOGS_APPROVAL_REJECTED');\n\t\t}\n\n\t\tif($ok)\n\t\t{\n\t\t\t$teamRequest->ispending = 0;\n\t\t\t$teamRequest->store();\n\n\t\t\t$teamBlog = EasyBlogHelper::getTable( 'TeamBlog','Table' );\n\t\t\t$teamBlog->load($teamRequest->team_id);\n\n\t\t\t//now we send notification to requestor\n\t\t\t$requestor = JFactory::getUser($teamRequest->user_id);\n\t\t\t$template = ($approval) ? 'email.teamblog.approved' : 'email.teamblog.rejected';\n\n\t\t\t$toNotifyEmails \t= array();\n\t\t\t$obj \t\t\t\t= new StdClass();\n\t\t\t$obj->unsubscribe\t= false;\n\t\t\t$obj->email \t\t= $requestor->email;\n\t\t\t$toNotifyEmails[] = $obj;\n\n\t\t\t$notify\t= EasyBlogHelper::getHelper( 'Notification' );\n\t\t\t$emailData = array();\n\t\t\t$emailData['team'] \t= $teamBlog->title;\n\t\t\t$notify->send($toNotifyEmails, JText::_('COM_EASYBLOG_TEAMBLOGS_JOIN_REQUEST'), $template, $emailData);\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_easyblog&view=teamrequest' , $message , $type );\n\t}", "title": "" }, { "docid": "7c705a628d93bcbaf7638d09618e97b8", "score": "0.62501574", "text": "public function history_approval() {\n\n\t\t$attr = array(\n\t\t\t\t\t\t'filterStatus' => $this->filter_status(),\n\t\t\t\t\t\t'filterPaymentMethod' => $this->filter_payment_method()\n\t\t\t\t\t);\n\n\t\t$this->layout_lib->default_template('transaction/acc/data-approval', $attr);\n\t\t\n\t}", "title": "" }, { "docid": "64b64d6644220923c51ce2806a952e7c", "score": "0.6240749", "text": "public function approveRequest($request_data)\n\t{\n\n\t}", "title": "" }, { "docid": "fb2d435009a1b6fa4659d5e5179adc8c", "score": "0.6204176", "text": "public function fluffApprove();", "title": "" }, { "docid": "85978a70c4cb4e299a43023a4d551285", "score": "0.6158959", "text": "public function handle() {\n\n\t\tif ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'wdaf_handle_submit' ) ) {\n\t\t\twp_send_json_error( 'Nonce Verification error!' );\n\t\t}\n\n\t\t$submission_id = Persistence::save( $_REQUEST );\n\t\tif ( $submission_id ) {\n\t\t\tif ( isset( $data['email'] ) ) {\n\t\t\t\twp_mail( $data['email'], __( 'Submission Confirmation', 'wdaf' ), __( 'We have successfully Received your Request!', 'wdaf' ) );\n\t\t\t}\n\t\t\twp_send_json_success( __( 'Data Submitted Successfully!', 'wdaf' ) );\n\t\t} else {\n\t\t\twp_send_json_error( __( 'Data Save Error!', 'wdaf' ) );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "fd6b92cdfb8444bc6f27e42a0669cf8d", "score": "0.61329", "text": "public function processApprovalsCommand()\n {\n\n try {\n\n /** @var \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager $objectManager */\n $objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');\n\n /** @var \\RKW\\RkwNewsletter\\Helper\\Approval $approval */\n $approval = $objectManager->get('RKW\\\\RkwNewsletter\\\\Helper\\\\Approval');\n $approval->doAutomaticApprovalsByTime();\n $approval->doAutomaticApprovalsByAdminsMissing();\n $approval->sendInfoAndReminderMailsForApprovals();\n\n /** @var \\RKW\\RkwNewsletter\\Helper\\Release $release */\n $release = $objectManager->get('RKW\\\\RkwNewsletter\\\\Helper\\\\Release');\n $release->sendInfoAndReminderMailsForReleases();\n\n } catch (\\Exception $e) {\n $this->getLogger()->log(\\TYPO3\\CMS\\Core\\Log\\LogLevel::ERROR, sprintf('An unexpected error occurred while trying to process approvals: %s', $e->getMessage()));\n\n }\n\n }", "title": "" }, { "docid": "b53557a3c76572bf39fa782f883581d8", "score": "0.61327684", "text": "function cancel_preapprovals($sel_backing)\n\t{\n\t\t$DataArray = array();\n\t\t$CancelPreapprovalFields = array('PreapprovalKey' => $sel_backing['preapproval_key']);\n\t\t$DataArray['CancelPreapprovalFields'] = $CancelPreapprovalFields;\n\t\t$PayPal = new PayPal_Adaptive($this->PayPalConfig);\n\t\t$PayPalResult = $PayPal->CancelPreapproval($DataArray);\n\t\t// $PayPalResult array(\n\t\t//\t'Errors' => $Errors, \n\t\t//\t'Ack' => $Ack, \n\t\t//\t'Build' => $Build, \n\t\t//\t'CorrelationID' => $CorrelationID, \n\t\t//\t'Timestamp' => $Timestamp, \n\t\t//\t'XMLRequest' => $XMLRequest, \n\t\t//\t'XMLResponse' => $XMLResponse\n\t\t// }\n\t\tif(strtolower($PayPalResult['Ack'])=='success')\n\t\t{\n\t\t\t$this->cancel_preapprovals_backer_dbupdate($array,$PayPalResult);\n\t\t\t$this->cancel_preapprovals_backer_mail($array,$PayPalResult);\n\t\t} else {\n\t\t\twrtlog(\"WARNING: project #{$sel_backing['projectId']} backing #{$sel_backing['backingId']} could not be cancelled: \".print_r($PayPalResult,true)); \n\t\t\t$this->cancel_preapprovals_backer_dbupdate($array,$PayPalResult); // still mark it cancelled\n\t\t\t// at this point - we are silent on outcome to the backer... tbd\n\t\t}\n\t}", "title": "" }, { "docid": "d929c5593aaf2962e04a1b481cd0d555", "score": "0.6125571", "text": "public function displaySubmitted();", "title": "" }, { "docid": "9cfb7918c7036e2f55b50d1b2f150e3a", "score": "0.612077", "text": "public function paymentApprovalAction() {\n $objWithdrawalModel = Admin_Model_WithdrawalRequest::getInstance();\n $withdrawalDetails = $objWithdrawalModel->getPanddingPaymentDeatils();\n if ($withdrawalDetails) :\n $this->view->withdrawal = $withdrawalDetails;\n endif;\n }", "title": "" }, { "docid": "d1b15087d7ec14a6d8464d1a4a2d7e36", "score": "0.6120552", "text": "public function submit()\r\n {\r\n $isAgreed = (Request::all()['is_agree'] == 1)? true : false;\r\n if (!$isAgreed) {\r\n UserServiceFacade::saveAgreed(session('user')->id, array('is_agreed' => $isAgreed, 'last_logout_time' => Carbon::now()));\r\n Session::forget('user');\r\n } else {\r\n $user = UserServiceFacade::saveAgreed(session('user')->id, array('is_agreed' => $isAgreed,'upd_user'=>session('user')->user_code,'upd_time'=>Carbon::now()));\r\n Session::put ( 'user', $user );\r\n }\r\n return response()->json(buildResponseMessage('Save done', 200));\r\n }", "title": "" }, { "docid": "3a50f2a890f6cb2eedab52a36c5493e2", "score": "0.6120517", "text": "function hrdJobSaveApprove($timesheet_status_id,$vreturn=0) \t{\n\t\t$this->getMenu() ;\n\t\t$this->load->model('hrdModel');\n\t\t$timesheet_approval=($vreturn) ? 2 : 3; // 3 Return , 2 Approval (3 :)\n\t\t$sql = \"update timesheet_status set timesheet_approval =$timesheet_approval, dapproval='\".date('Y-m-d H:i:s').\"', approval_id = \".$this->session->userdata('employee_id') .\"\n\t\t\twhere timesheet_status_id = \".$timesheet_status_id; \n\t\t$this->db->query($sql);\t\t\n\n\n\t\t$sql = \"update timesheet set timesheet_approval = $timesheet_approval\n\t\t\twhere timesheet_status_id = \".$timesheet_status_id; \n\t\t$this->db->query($sql);\t\t\n\n\t\tredirect('administration/hrdJob/');\n\t\t\t\n\t}", "title": "" }, { "docid": "69808ef676eb5065240ddbeb87c96918", "score": "0.61157894", "text": "function submit() {\r\n\tglobal $template_header, $template_footer;\r\n\tglobal $mysql_connection, $sanitized_id;\r\n\tcheck_vars();\r\n\t\r\n\techo $template_header;\r\n\t$confirmation_datetime = date(\"Y-m-d H:i:s\");\r\n\r\n\t$recipient_query = mysqli_query($mysql_connection, \"SELECT * FROM recipients WHERE recipientid='\" . $sanitized_id. \"';\");\r\n\tif(!$recipient_query) {\r\n\t\t// Query failed\r\n\t\techo '<div class=\"alert alert-danger\" role=\"alert\">Error: Failed to decect recipient ' . $sanitized_id . '. </div></main>' . PHP_EOL;\r\n\t\techo $template_footer;\r\n\t\texit();\r\n\t} else {\r\n\t\t// Query success\r\n\t\t$recipient = $recipient_query->fetch_assoc();\r\n\t\t$status = 1;\r\n\t\t$verification_query = mysqli_query($mysql_connection, \"SELECT * FROM confirmations WHERE userid='\" . $recipient['userid'] . \"' AND recallid='\" . $recipient['recallid']. \"';\");\r\n\t\tif(!$verification_query) {\r\n\t\t\t// Query failed\r\n\t\t\techo '<div class=\"alert alert-danger\" role=\"alert\">Error: Failed to check existing confirmations. </div></main>' . PHP_EOL;\r\n\t\t\techo $template_footer;\r\n\t\t\texit();\r\n\t\t} else {\r\n\t\t\t// Query success\r\n\t\t\tif($verification_query->num_rows != 0) {\r\n\t\t\t\t// There is already a confirmation\r\n\t\t\t\techo '<div class=\"alert alert-danger\" role=\"alert\">Error: Already confirmed. </div></main>' . PHP_EOL;\r\n\t\t\t\techo $template_footer;\r\n\t\t\t\texit();\r\n\t\t\t} else {\r\n\t\t\t\t$confirmation_query = mysqli_query($mysql_connection, \"INSERT INTO confirmations (userid, recallid, datetime, status) VALUES ('\" . $recipient['userid'] . \"', '\" . $recipient['recallid']. \"', '\" . $confirmation_datetime . \"', '\" . $status . \"');\");\r\n\t\t\t\tif(!$confirmation_query) {\r\n\t\t\t\t\t// Query failed\r\n\t\t\t\t\techo '<div class=\"alert alert-danger\" role=\"alert\">Error: Failed to submit confirmation. </div></main>' . PHP_EOL;\r\n\t\t\t\t\techo $template_footer;\r\n\t\t\t\t\texit();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Query success\r\n\t\t\t\t\t$update_user_status_query = mysqli_query($mysql_connection, \"UPDATE users SET status='\" . $status . \"' WHERE userid='\" . $recipient['userid'] . \"';\");\r\n\t\t\t\t\tif(!$update_user_status_query) {\r\n\t\t\t\t\t\t// Query failed\r\n\t\t\t\t\t\techo '<div class=\"alert alert-danger\" role=\"alert\">Error: Failed to update user status. </div></main>' . PHP_EOL;\r\n\t\t\t\t\t\techo $template_footer;\r\n\t\t\t\t\t\texit();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Query success\r\n\t\t\t\t\t\tdisplay_submitted_page_contents();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "919f6441a70258534df28490814e8c9e", "score": "0.61144024", "text": "function submit_data() {\n // a form with hidden elements which is submitted to paypal via the \n // BODY element's onLoad attribute. We do this so that you can validate\n // any POST vars from you custom form before submitting to paypal. So \n // basically, you'll have your own form which is submitted to your script\n // to validate the data, which in turn calls this function to create\n // another hidden form and submit to paypal.\n \n // The user will briefly see a message on the screen that reads:\n // \"Please wait, your order is being processed...\" and then immediately\n // is redirected to paypal.\n\t \n $url = $this->piraeus_url;\n\t \n\n echo \"<html>\\n\";\n echo \"<head><title>Processing Payment...</title></head>\\n\";\n\t if ($this->debug) {//dont send the request just print form\n\t echo \"<body>\\n\";\n\t\techo '<br>' . $this->piraeus_url;\n\t }\n\t else //goto bank \t \n echo \"<body onLoad=\\\"document.form.submit();\\\">\\n\";\n\t \n echo \"<center><h3>\".localize('_PLEASEWAIT',getlocal()).\"</h3></center>\\n\";\n echo \"<form method=\\\"post\\\" name=\\\"form\\\" action=\\\"\".$url.\"\\\">\\n\";\n\n foreach ($this->fields as $name => $value) {\n echo \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\">\";\n \t if ($this->debug) {\n\t\t echo '<br>'. $name . '=>'.$value;\n\t\t }\n }\n \n echo \"</form>\\n\";\n echo \"</body></html>\\n\";\n \n }", "title": "" }, { "docid": "e307c1ac1736af8b75ba2c8540df87d1", "score": "0.61094695", "text": "public function preSetSubmit() {}", "title": "" }, { "docid": "602004aee297b2a6ac5a431f206bd498", "score": "0.6107542", "text": "public function submitAction()\n {\n $this->init();\n $this->submit();\n }", "title": "" }, { "docid": "6a8a37f6cf6b9a4f22bd3ebaae35047e", "score": "0.6098107", "text": "public final function approve()\n {\n $this->performTransaction(FinancialTransaction::TYPE_APPROVE);\n }", "title": "" }, { "docid": "0639b66c6e866d5f560cef34b898aa15", "score": "0.6062615", "text": "public function transferApproval() {\n $approver = $this->idp->employee->supervisor;\n\n\n /* Set approver to immediate leader */\n $this->approver_id = $approver->id;\n $this->save();\n\n\n /* Notify new approver */\n $approver->notify(new IDPWasUpdated($this->idp, $this, $this->employee, false)); \n }", "title": "" }, { "docid": "854e4a87304cbbaf1a929ab8a2176984", "score": "0.60560846", "text": "function contract_completion_form()\n {\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 'b', 'c'));\n\n # Pick all assigned data\n $data = assign_to_data($urldata);\n\n #check user access\n #1: for editing\n if(!empty($data['i']))\n {\n check_user_access($this, 'edit_bid_invitation', 'redirect');\n }\n #2: for creating\n else\n {\n check_user_access($this, 'create_invitation_for_bids', 'redirect');\n }\n\n\n if(!empty($data['c']))\n {\n $contract_id = decryptValue($data['c']);\n $data['contract_details'] = $this->Query_reader->get_row_as_array('search_table', array('table'=>'contracts', 'limittext'=>'', 'orderby'=>'id', 'searchstring'=>' id=\"'. $contract_id .'\" AND isactive=\"Y\"'));\n\n #get the service provider\n $data['contract_details']['provider'] = $this->get_provider_names($data['contract_details']['bidinvitation_id']);\n\n $contracts_payments = $this->db->query($this->Query_reader->get_query_by_code('view_contracts_payments', array('searchstring'=>' AND CP.contract_id = '.$contract_id.' ' )))->result_array();\n\n\n \n\n $data['formdata'] = $data['contract_details'];\n\n \n\n #get procurement plan details\n if(!empty($data['contract_details']['bidinvitation_id']))\n {\n $data['procurement_details'] = $this->Query_reader->get_row_as_array('procurement_plan_details_contracts', array('searchstring'=> ' bidinvitations.id=\"'. $data['contract_details']['bidinvitation_id'] .'\"', 'limittext'=>'', 'orderby'=>' procurement_plan_entries.dateadded ' ));\n }\n\n\n\n $contracts_payments = array();\n\n\n if($data['procurement_details']['framework'] == \"Y\")\n {\n $contracts_payments = get_sum_of_total_payments($contract_id);\n }\n else\n {\n $contracts_payments = $this->db->query($this->Query_reader->get_query_by_code('view_contracts_payments', array('searchstring'=>' AND CP.contract_id = '.$contract_id.' ' )))->result_array();\n\n }\n\n\n\n\n $total_actual_payments = array();\n foreach ($contracts_payments as $key => $row) {\n # code...\n $total_actual_payments[] = $row['total_amount_paid'];\n }\n\n $data['formdata']['total_actual_payments'] = array_sum($total_actual_payments);\n\n\n\n\n }\n\n $data['currencies'] = $this->db->get_where('currencies', array('isactive'=>'Y'))->result_array();\n\n $data['page_title'] = 'Contract completion details';\n $data['current_menu'] = 'view_contracts';\n $data['view_to_load'] = 'contracts/contract_completion_form';\n $data['view_data']['form_title'] = $data['page_title'];\n\n $this->load->view('dashboard_v', $data);\n\n }", "title": "" }, { "docid": "3515213b3ab843747aef2a536eb8f02d", "score": "0.6054227", "text": "public function approve() {\n\t\t\n\t\t/*************approval ke eproc***********/\n\t\t// $id_nganu = $this->authorization->getEmployeeId();\n\t\t$this->load->model('po_header');\n\t\t$this->load->model('po_approval');\n\t\t$this->load->model('po_detail');\n\t\t$this->load->model('prc_tender_item');\n\t\t$this->load->model('prc_pr_item');\n\t\t$this->load->model('prc_tender_vendor');\n\t\t$this->load->model('prc_process_holder');\n\t\t$this->load->model('prc_tender_main');\n\t\t$is_approve = $this->input->post('is_approve');\t\n\t\t$max_approve = $this->input->post('max_approve');\n\t\t$is_contract = $this->input->post('is_contract');\n\t\t$real_stat = $this->input->post('real_stat');\t\n\t\t$id = $this->input->post('po_id');\t\t\n\t\t$po_no = $this->input->post('po_no');\n\t\t$note = $this->input->post('note');\n\t\t$is_ajax = $this->input->post('is_ajax');\n\t\t$this->po_header->where_po($id);\n\t\t$data = $this->po_header->get();\n\n\t\t$where_poapprove = array(\"PO_ID\" => $id, \"STATUS\" => $data[0]['REAL_STAT']);\n\t\t$approval = $this->po_approval->get($where_poapprove);\n\n\t\t\t//--LOG MAIN--//\n\t\t$action = 'APPROVE';\n\t\tif($is_approve==2){//reject\n\t\t\t$action = 'REJECT';\n\t\t}\n\t\t$this->log_data->main($this->session->userdata['ID'],$this->session->userdata['FULLNAME'],\n\t\t\t\t$this->authorization->getCurrentRole(),'Approval LP3',$action,$this->input->ip_address()\n\t\t\t);\n\t\t$LM_ID = $this->log_data->last_id();\n\t\t\t//--END LOG MAIN--//\n\n\t\tif($is_approve==1){//approve\n\t\t\t\n\t\t\tif($max_approve == $real_stat){\n\t\t\t\t$this->po_detail->where_po($id);\n\t\t\t\t$po_detail = $this->po_detail->get();\n\t\t\t\tforeach ($po_detail as $value) {\n\t\t\t\t\t$ptw[] = $value['PTW_ID'];\n\t\t\t\t}\n\t\t\t\t$ret = $this->create_po($is_contract,$ptw);\n\t\t\t\t// die(var_dump($ret));\n\t\t\t\t$sukses = false;\n\t\t\t\t$tbody='';\n\t\t\t\tif(count($ret['RETURN']) > 0) {\n for ($i = 0; $i < count($ret['RETURN']); $i++) {\n $val = $ret['RETURN'][$i];\n $tr = '<tr>';\n $tr .= '<td>' . $val['ID'] . '</td>';\n $tr .= '<td>' . $val['TYPE'] . '</td>';\n $tr .= '<td>' . $val['MESSAGE'] . '</td>';\n $tr .= '</tr>';\n $tbody.=$tr;\n if ($val['TYPE'] == 'S') {\n $po_no = $val['MESSAGE_V2']; \n $sukses = true;\n } \n } \n }\n\n if($sukses){\n\t\t\t\t\t$this->po_approval->update(array('IS_APPROVE' => $is_approve,\"CREATED_DATE\" => date('d-M-Y g.i.s A')), $where_poapprove);\n \t\t//--LOG DETAIL--//\n\t\t\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','po_approval','update',array('IS_APPROVE' => $is_approve,\"CREATED_DATE\" => date('d-M-Y g.i.s A')),$where_poapprove);\n\t\t\t\t\t\t//--END LOG DETAIL--//\n\n \t$this->po_header->update(array('PO_NUMBER' => $po_no,'IS_APPROVE'=>$is_approve,'RELEASED_AT' => date('d-M-Y g.i.s A'),'REAL_STAT' => intval($data[0]['REAL_STAT']) + 1 ), array(\"PO_ID\" => $id));\t\t\t\n\t\t\t\t\t\t//--LOG DETAIL--//\n\t\t\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','po_header','update',array('PO_NUMBER' => $po_no,'IS_APPROVE'=>$is_approve,'RELEASED_AT' => date('d-M-Y g.i.s A'),'REAL_STAT' => intval($data[0]['REAL_STAT']) + 1, 'PTM_NUMBER'=>$data[0]['PTM_NUMBER']), array(\"PO_ID\" => $id));\n\t\t\t\t\t\t//--END LOG DETAIL--//\n\n\t\t\t\t\t$po_header = $data[0];\n\t\t\t\t\t\n\t\t\t\t\tforeach ($po_detail as $key_po => $value_po) {\n\t\t\t\t\t\t$where_tit = array('PRC_TENDER_ITEM.PPI_ID'=>$value_po['PPI_ID'],'PRC_TENDER_ITEM.PTM_NUMBER'=>$po_header['PTM_NUMBER']);\n\t\t\t\t\t\t$this->prc_tender_item->update(array('TIT_STATUS'=>10),$where_tit);\n\t\t\t\t\t\t\t//--LOG DETAIL--//\n\t\t\t\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','prc_tender_item','update',array('TIT_STATUS'=>10),$where_tit);\n\t\t\t\t\t\t\t//--END LOG DETAIL--//\n\n\t\t\t\t\t\t$tit = $this->prc_tender_item->get($where_tit);\n\t\t\t\t\t\t$ppi = $this->prc_pr_item->get(array('PPI_ID'=>$value_po['PPI_ID']),'*', -1, false);\n\t\t\t\t\t\t$this->prc_pr_item->update(array('PPI_QTY_USED'=>($ppi[0]['PPI_QTY_USED']-($tit[0]['TIT_QUANTITY']-$value_po['POD_QTY'])),'PPI_POQUANTITY'=>$value_po['POD_QTY']),array('PPI_ID'=>$value_po['PPI_ID']));\n\t\t\t\t\t\t\t//--LOG DETAIL--//\n\t\t\t\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','prc_pr_item','update',array('PPI_QTY_USED'=>($ppi[0]['PPI_QTY_USED']-($tit[0]['TIT_QUANTITY']-$value_po['POD_QTY'])),'PPI_POQUANTITY'=>$value_po['POD_QTY']),array('PPI_ID'=>$value_po['PPI_ID']));\n\t\t\t\t\t\t\t//--END LOG DETAIL--//\n\t\t\t\t\t}\n\t\t\t\t\t$vnd = $this->prc_tender_vendor->ptv($data[0]['VND_CODE']);\n\t\t\t\t\t$data_email = array(\n\t\t\t\t\t\t\t'EMAIL_ADDRESS'=>$vnd[0]['EMAIL_ADDRESS'],\n\t\t\t\t\t\t\t\t'data'=>array(\n\t\t\t\t\t\t\t\t\t'vendorno'=>$data[0]['VND_CODE'],\n\t\t\t\t\t\t\t\t\t'no_po'=>$po_no,\n\t\t\t\t\t\t\t\t\t'doc_date'=>date('d M Y', oraclestrtotime($data[0]['DOC_DATE'])),\n\t\t\t\t\t\t\t\t\t'ddate'=>date('d M Y', oraclestrtotime($data[0]['DDATE'])),\n\t\t\t\t\t\t\t\t\t'total'=>number_format($data[0]['TOTAL_HARGA'],2,\",\",\".\").\" \".$po_detail[0]['CURR'],\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t$this->kirim_email_po($data_email);\n\t\t\t\t\techo json_encode(array('state'=>true,'data'=>$tbody));\n \texit();\n }else{\n \techo json_encode(array('state'=>false,'data'=>$tbody));\n \texit();\n }\n\t\t\t}else{\n\t\t\t\t$this->po_header->update(array('REAL_STAT' => intval($data[0]['REAL_STAT']) + 1), array(\"PO_ID\" => $id));\n\t\t\t\t\t//--LOG DETAIL--//\n\t\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','po_header','update',array('REAL_STAT' => intval($data[0]['REAL_STAT']) + 1, 'PTM_NUMBER'=>$data[0]['PTM_NUMBER']), array(\"PO_ID\" => $id));\n\t\t\t\t\t//--END LOG DETAIL--//\n\n\t\t\t\t$this->po_approval->update(array('IS_APPROVE' => $is_approve,\"CREATED_DATE\" => date('d-M-Y g.i.s A')), $where_poapprove);\n\t\t\t\t\t//--LOG DETAIL--//\n\t\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','po_approval','update',array('IS_APPROVE' => $is_approve,\"CREATED_DATE\" => date('d-M-Y g.i.s A')), $where_poapprove);\n\t\t\t\t\t//--END LOG DETAIL--//\n\t\t\t}\n\t\t}else if($is_approve==2){//reject\n\t\t\t$this->po_header->update(array('IS_APPROVE'=>$is_approve), array(\"PO_ID\" => $id));\n\t\t\t\t//--LOG DETAIL--//\n\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','po_header','update',array('IS_APPROVE'=>$is_approve,'PTM_NUMBER'=>$data[0]['PTM_NUMBER']), array(\"PO_ID\" => $id));\n\t\t\t\t//--END LOG DETAIL--//\n\n\t\t\t$this->po_approval->update(array('IS_APPROVE' => $is_approve,\"CREATED_DATE\" => date('d-M-Y g.i.s A')), $where_poapprove);\n\t\t\t\t//--LOG DETAIL--//\n\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','po_approval','update',array('IS_APPROVE' => $is_approve,\"CREATED_DATE\" => date('d-M-Y g.i.s A')), $where_poapprove);\n\t\t\t\t//--END LOG DETAIL--//\n\n\t\t\t$ptm = $this->prc_tender_main->ptm($data[0]['PTM_NUMBER']);\n\t\t\t$s['EMP_ID']=$ptm[0]['PTM_ASSIGNMENT'];\n\t\t\t$w['PTM_NUMBER']=$data[0]['PTM_NUMBER'];\n\t\t\t$this->prc_process_holder->update($s,$w);\n\t\t\t\t//--LOG DETAIL--//\n\t\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','prc_process_holder','update',$s,$w);\n\t\t\t\t//--END LOG DETAIL--//\n\t\t}\n\t\t\n\t\t\n\t\t$this->load->model('po_header_comment');\n\t\t$comment_id = $this->po_header_comment->get_new_id(); \n\t\t// $this->file_operation->upload(UPLOAD_PATH.'comment_attachment/'.$id.\"_\".$comment_id, $_FILES);\n\t\t$current_date = oracledate(strtotime(date(\"d-m-Y H:i:s\")));\n\t\t$dataComment = array(\n\t\t\t\"PHC_ID\" => $comment_id,\n\t\t\t\"PO_ID\" => $id,\n\t\t\t\"PHC_COMMENT\" => \"'\".str_replace(\"'\", \"''\", $note).\"'\",\n\t\t\t\"PHC_POSITION\" => \"'\".$this->authorization->getCurrentRole().\"'\",\n\t\t\t\"PHC_NAME\" => \"'\".str_replace(\"'\", \"''\", $this->authorization->getCurrentName()).\"'\",\n\t\t\t\"PHC_ACTIVITY\" => \"'Pembuatan LP3'\",\n\t\t\t\"PHC_START_DATE\" => \"'\".$current_date.\"'\",\n\t\t\t// \"PTC_ATTACHMENT\" => '\\''.$_FILES[\"ptc_attachment\"][\"name\"].'\\''\n\t\t\t);\n\t\t$this->po_header_comment->insert($dataComment);\n\t\t\t//--LOG DETAIL--//\n\t\t$this->log_data->detail($LM_ID,'Tender_winner/approve','po_header_comment','insert',$dataComment);\n\t\t\t//--END LOG DETAIL--//\n\n\t\t\n\t\tif(isset($is_ajax)&&($is_ajax==1)){\n\t\t\techo json_encode(array('state'=>true));\n\t\t}\n\t\t\n\n\t\t/***********release PO ke SAP************/\n\t\t// $po_no = url_decode($po_no);\n\t\t// $relcode = url_decode($relcode);\n\t\t// $this->load->library('sap_handler');\n\t\t// $retval = $this->sap_handler->approve_po($po_no, $relcode);\n\t\t\n\t\t// $this->session->set_flashdata('ret_approve_po_dump', $retval);\n\t\t// if (!isset($retval['REL_INDICATOR_NEW']) || $retval['REL_INDICATOR_NEW'] == '') {\n\t\t// \t$this->session->set_flashdata('success', 'warning');\n\t\t// \t// $retval = array_merge(array($data[0]['PO_NUMBER'], $approval[0]['REL_CODE']), $retval);\n\t\t// \t// $this->session->set_flashdata('ret_approve_po', $retval);\n\t\t// \tredirect('Tender_winner/listapprovalPO');\n\t\t// }\n\t\t// if ($retval['REL_INDICATOR_NEW'] == 'G') {\n\t\t// \tredirect('Tender_winner/releasePO/'.$po_no);\n\t\t// }\n\n\t\t\n\t}", "title": "" }, { "docid": "b9854fbb6cc91cbdb2cb3ce50d4553c0", "score": "0.60290587", "text": "function macro_tasksubmit($args) {\n global $identity_user;\n $task_id = getattr($args, 'task_id');\n\n // validate arguments\n if (!is_task_id($task_id)) {\n return macro_error(\"Expecting parameter `task_id`\");\n }\n\n // fetch & validate task\n $task = task_get($task_id);\n if (!$task) {\n return macro_error(\"Invalid task identifier\");\n }\n\n if (identity_is_anonymous()) {\n $url = html_escape(url_login());\n return macro_message(\"Trebuie sa te autentifici pentru a trimite solutii. <a href=\\\"{$url}\\\">Click aici</a>\", true);\n }\n\n // Permission check. Should never fail right now.\n if (!identity_can('task-submit', $task)) {\n return macro_message(\"Nu se (mai) pot trimite solutii la aceasta problema.\", true);\n }\n\n // Display form\n ob_start();\n?>\n\n<a href=\"<?= html_escape(url_monitor().\"?task=\".$task['id'].\"&user=\".$identity_user['username']) ?>\">Vezi solutiile trimise de tine</a>\n<?php\n require_once(IA_ROOT_DIR . \"www/views/submit_form.php\");\n display_submit_form(true, $task_id);\n\n $buffer = ob_get_contents();\n ob_end_clean();\n\n // done\n return $buffer;\n}", "title": "" }, { "docid": "65fa516848697b791d94055279283335", "score": "0.6017857", "text": "public function cancel_approved() {\n\n\t\t// Permission\n\t\t$this->session_lib->check_permission('p_approval_cancel');\n\n\t\t$id = $this->input->post('id');\n\t\t$key = $this->input->post('key');\n\n\t\t$this->db->trans_start();\n\n\t\tswitch ($key) :\n\n\t\t\tcase 'x' :\n\n\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t'date_lunas' => null,\n\t\t\t\t\t\t\t\t'updated_by' => $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t'updated_time' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'y' :\n\n\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t'date_dp' => null,\n\t\t\t\t\t\t\t\t'nominal_bayar' => 0,\n\t\t\t\t\t\t\t\t'updated_by' => $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t'updated_time' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'z' :\n\n\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t'due_date' => null,\n\t\t\t\t\t\t\t\t'updated_by' => $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t'updated_time' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ly' :\n\n\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t'nominal_bayar' => floatval(str_replace(\",\", \"\", str_replace(\".00\", \"\", $this->input->post('nominal_dp')))),\n\t\t\t\t\t\t\t\t'date_lunas' => null,\n\t\t\t\t\t\t\t\t'sale_status' => 1,\n\t\t\t\t\t\t\t\t'updated_by' => $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t'updated_time' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'lz' :\n\n\t\t\t\t$data = array(\t\n\t\t\t\t\t\t\t\t'nominal_bayar' => 0,\n\t\t\t\t\t\t\t\t'date_lunas' => null,\n\t\t\t\t\t\t\t\t'sale_status' => 3,\n\t\t\t\t\t\t\t\t'updated_by' => $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t\t'updated_time' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t);\n\n\t\t\t\tbreak;\n\n\t\tendswitch;\n\n\t\t$this->db->where('id', $id);\n\t\t$this->db->update('sale', $data);\n\n\t\tif ($this->db->trans_status() === false) {\n\n\t\t\t$this->db->trans_rollback();\n\n\t\t\techo 'error';\n\n\t\t} else {\n\n\t\t\t$this->db->trans_commit();\n\n\t\t\techo 'success';\n\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "0a176fa02109c2b4fa23de444e092420", "score": "0.60120714", "text": "function submitautoprogram(){\n if($this->value('submit')=='Next'){\n $programename = $this->value('programename');\n $program_duration = $this->value('program_duration');\n $clinicid= $this->clinicInfo('clinic_id');\n if($this->value('act')=='add'){\n $data=array('clinicid'=>$clinicid,\n 'name' =>$programename,\n 'duration'=>$program_duration,\n 'status' =>'0' );\n $this->insert('automaticscheduling', $data);\n }else{\n $data=array('clinicid'=>$clinicid,\n 'name' =>$programename,\n 'duration'=>$program_duration,\n 'status' =>'0' );\n \n $this->update('automaticscheduling', $data,\"clinicid={$clinicid}\");\n } \n header(\"location:index.php?action=automaticscheduling&day=1\");\n \n \n }else{\n $replace['programevalue']= $this->value('programename');\n $replace['header'] = $this->build_template($this->get_template(\"header\"));\n $replace['sidebar'] = $this->sidebar();\n $replace['body'] = $this->build_template($this->get_template(\"createautoschprogram\"),$replace);\n $replace['browser_title'] = \"Automatic scheduleing\";\n $this->output = $this->build_template($this->get_template(\"main\"),$replace);\n }\n \n\t\t \n \n }", "title": "" }, { "docid": "ccafd8baa28e2eb356300e194595a417", "score": "0.5987559", "text": "public function submit()\n {\n foreach(array_keys($this->parents) as $parentKey) {\n foreach(array_keys($this->$parentKey) as $actions) {\n $this->$parentKey[$actions]\n ? $this->role->givePermissionTo($parentKey . '.' . $actions)\n : $this->role->revokePermissionTo($parentKey . '.' . $actions);\n }\n }\n\n session()->flash('success', 'Hak akses telah diperbarui');\n }", "title": "" }, { "docid": "5fbf583c4dc90f9219399e1a481dcec4", "score": "0.59873796", "text": "public function approve($id, $appid)\n {\n $approver_id = $this->session->userdata('account_id');\n $id = $this->uri->segment(3);\n $appid = $this->uri->segment(4);\n $type = \n $result = $this->account_model->get_account_by_id($id);\n $this->annex2_model->update_editable($id, 1, $approver_id, $appid);\n $this->forme_model->update_editable($id, 1, $approver_id, $appid);\n $this->hirarc_model->update_editable($id, 1, $approver_id, $appid);\n $this->pc1_model->update_editable($id, 1, $approver_id, $appid);\n $this->pc2_model->update_editable($id, 1, $approver_id, $appid);\n $this->swp_model->update_editable($id, 1, $approver_id, $appid);\n $this->project_model->update_editable($id, 1, $approver_id, $appid);\n \n //Send email to applicant let them know their form submission has been fully approved\n $this->email_model->send_email($result[0]->account_email, \"Edit Request For New Application For LMO Project Approved\", \"<p>Dear \". $result[0]->account_fullname .\", <br/><br/>Your Request For Editing An Application For LMO Project Has Been Approved. </p>\");\n $this->notification_model->insert_new_notification($id, 1, \"Edit Request For New Application For LMO Project Approved\", \"Edit Request For New Application For LMO Project Approved by : \" . $this->session->userdata('account_name'));\n\t\t\n redirect('editrequest_approval/index');\n }", "title": "" }, { "docid": "235d0cb40efeccc05eb8fe2e777f3a65", "score": "0.5981576", "text": "public function committeesAction()\n\t{\t\n\t}", "title": "" }, { "docid": "f2e7ebceb398f94fccf0d45d0ee4e1fd", "score": "0.5975362", "text": "public function approvePayments()\r\n {\r\n $prison_id = $this->Session->read('Auth.User.prison_id');\r\n $login_user_id = $this->Session->read('Auth.User.id');\r\n $default_status = ''; $approvalStatusList = '';\r\n $statusInfo = $this->getApprovalStatusInfo();\r\n if(is_array($statusInfo) && count($statusInfo) > 0)\r\n {\r\n $default_status = $statusInfo['default_status']; \r\n $approvalStatusList = $statusInfo['statusList']; \r\n }\r\n //save approval process \r\n if($this->request->is(array('post','put')))\r\n {\r\n //save approval status \r\n if(isset($this->request->data['ApprovalProcess']) && count($this->request->data['ApprovalProcess']) > 0)\r\n {\r\n $status = 'Saved'; \r\n $remark = '';\r\n if($this->Session->read('Auth.User.usertype_id')==Configure::read('OFFICERINCHARGE_USERTYPE') || ($this->Session->read('Auth.User.usertype_id')==Configure::read('PRINCIPALOFFICER_USERTYPE')))\r\n {\r\n if(isset($this->request->data['ApprovalProcessForm']) && count($this->request->data['ApprovalProcessForm']) > 0)\r\n {\r\n $status = $this->request->data['ApprovalProcessForm']['type']; \r\n $remark = $this->request->data['ApprovalProcessForm']['remark'];\r\n }\r\n }\r\n $items = $this->request->data['ApprovalProcess'];\r\n $isApprove = $this->setApprovalProcess($items, 'PrisonerPayment', $status, $remark);\r\n if($isApprove == 1)\r\n {\r\n //notification on approval of payment list --START--\r\n if($this->Session->read('Auth.User.usertype_id')==Configure::read('RECEPTIONIST_USERTYPE'))\r\n {\r\n $notification_msg = \"Earning payment list of prisoners are pending for review.\";\r\n $notifyUser = $this->User->find('first',array(\r\n 'recursive' => -1,\r\n 'conditions' => array(\r\n 'User.usertype_id' => Configure::read('PRINCIPALOFFICER_USERTYPE'),\r\n 'User.is_trash' => 0,\r\n 'User.is_enable' => 1,\r\n 'User.prison_id' => $this->Session->read('Auth.User.prison_id')\r\n )\r\n ));\r\n if(isset($notifyUser['User']['id']))\r\n {\r\n $this->addNotification(array( \r\n \"user_id\" => $notifyUser['User']['id'], \r\n \"content\" => $notification_msg, \r\n \"url_link\" => \"/earnings/approvePayments\", \r\n )); \r\n }\r\n }\r\n if($this->Session->read('Auth.User.usertype_id')==Configure::read('PRINCIPALOFFICER_USERTYPE'))\r\n {\r\n $notification_msg = \"Earning payment list of prisoners are pending for approve\";\r\n $notifyUser = $this->User->find('first',array(\r\n 'recursive' => -1,\r\n 'conditions' => array(\r\n 'User.usertype_id' => Configure::read('OFFICERINCHARGE_USERTYPE'),\r\n 'User.is_trash' => 0,\r\n 'User.is_enable' => 1,\r\n 'User.prison_id' => $this->Session->read('Auth.User.prison_id')\r\n )\r\n ));\r\n if(isset($notifyUser['User']['id']))\r\n {\r\n $this->addNotification(array( \r\n \"user_id\" => $notifyUser['User']['id'], \r\n \"content\" => $notification_msg, \r\n \"url_link\" => \"/earnings/approvePayments\", \r\n ));\r\n }\r\n }\r\n //notification on approval of payment list --END--\r\n $this->Session->write('message_type','success');\r\n $this->Session->write('message',$status.' Successfully !');\r\n }\r\n else \r\n {\r\n $this->Session->write('message_type','error');\r\n $this->Session->write('message',$status.' failed');\r\n }\r\n }\r\n }\r\n //get working party list\r\n // $workingPartyList = $this->WorkingParty->find('list', array(\r\n // //'recursive' => -1,\r\n // 'fields' => array(\r\n // 'WorkingParty.id',\r\n // 'WorkingParty.name',\r\n // ),\r\n // 'conditions' => array(\r\n // 'WorkingParty.is_enable' => 1,\r\n // 'WorkingParty.is_trash' => 0,\r\n // 'WorkingParty.prison_id' => $prison_id\r\n // ),\r\n // 'order' => array(\r\n // 'WorkingParty.name'\r\n // ),\r\n // ));\r\n\r\n $prisoerno = $this->PrisonerPayment->find('list', array(\r\n 'fields'=>array(\r\n 'PrisonerPayment.id',\r\n 'PrisonerPayment.prisoner_id'\r\n ),\r\n \"joins\" => array(\r\n array(\r\n \"table\" => \"prisoners\",\r\n \"alias\" => \"Prisoner\",\r\n \"type\" => \"left\",\r\n \"conditions\" => array(\r\n \"PrisonerPayment.prisoner_id = Prisoner.id\"\r\n ),\r\n ),\r\n ),\r\n \r\n 'fields' => array(\r\n 'Prisoner.id',\r\n 'Prisoner.prisoner_no',\r\n ),\r\n 'conditions'=>array(\r\n //'PrisonerPayment.is_trash'=> 0,\r\n )\r\n\r\n ));\r\n $default_status = '';\r\n $statusList = '';\r\n $statusInfo = $this->getApprovalStatusInfo();\r\n if(is_array($statusInfo) && count($statusInfo) > 0)\r\n {\r\n $default_status = $statusInfo['default_status']; \r\n $statusList = $statusInfo['statusList']; \r\n }\r\n $this->set(array(\r\n 'prisoerno' => $prisoerno,\r\n 'statusList' => $statusList,\r\n 'default_status'=>$default_status,\r\n 'sttusListData'=>$statusList,\r\n 'approvalStatusList' => $approvalStatusList\r\n ));\r\n }", "title": "" }, { "docid": "d96d21dab0a7278207769dbf8aa20ac7", "score": "0.59711885", "text": "public function printFinishRoutine(){\n\t\t\techo \"<form method='post'>\";\n\t\t\techo \"Completed\";\n\t\t\techo \"<input type='radio' value='Completed' name='Completed'>\";\n\t\t\techo \"<br>\";\n\t\t\techo \"Rating: \";\n\t\t\techo \"<input type ='number' placeholder ='0-10' max='10' min='0' name='Rating' >\";\n\t\t\techo \"<br>\";\n\t\t\techo \"<input type ='submit' value='CompletedRoutine' name='CompleteCheck'>\";\n\t\t\techo \"</form>\";\n\n\t\t\tif (isset($_POST['Completed']) && isset($_POST['Rating']) && isset($_POST['CompleteCheck'])){\n\t\t\t\t$this->completeRoutine($_POST['Rating']);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b9cf06530984a8c7e301b6013c5f7121", "score": "0.59617674", "text": "public function job_submit($value='')\n\t\t\t{\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "af3f310181e037467fe688a84fa79c23", "score": "0.5949981", "text": "public function submit()\n {\n\n $this->submitGet();\n $this->submitPost();\n\n }", "title": "" }, { "docid": "b7c3c33540529cbb2947b97ff2a71f7f", "score": "0.5933295", "text": "public function actionApproved()\n\t{\n $this->iostatus = 3;\n $this->_iov();\n\t}", "title": "" }, { "docid": "c8842bc4e6dbeb94a0aca6e4f35b64c6", "score": "0.5924095", "text": "function handle_submission() {\n // if the submission is valid, keep it\n if (validate_submission()) {\n // first make the google calendar entry\n create_google_calendar_entry();\n \n //then record on sheets\n create_google_sheet_entry();\n\n // then email circulation\n send_email_to_circulation();\n\n // then email the patron\n send_email_to_patron();\n }\n\n // if the submission is not valid\n else {\n // tell the patron why\n complain_loudly_to_the_patron();\n }\n}", "title": "" }, { "docid": "ae47c7ac1f3c7a0629ae66becd905a8b", "score": "0.5919133", "text": "public function callbackSubmit()\n {\n // Get values from the submitted form and create comment object.\n $awnser = new Awnser();\n $awnser->userId = $this->di->get(\"userService\")->getCurrentLoggedInUser()->id;\n $awnser->title = $this->form->value(\"title\");\n $awnser->content = $this->form->value(\"content\");\n $awnser->questionId = $this->form->value(\"questionId\");\n\n\n // Save to database\n $this->di->get(\"awnserService\")->addAwnser($awnser);\n\n $this->form->addOutput(\"Svar skapat.\");\n return true;\n }", "title": "" }, { "docid": "24c449a510a6e993b98a789b9d867fa5", "score": "0.5913981", "text": "function action_003() {\n\t\tglobal $dd, $acao, $bgcor;\n\t\t$bb1 = msg('action_rejection');\n\t\t$sc .= '<Table width=\"100%\" class=\"lt1\" bgcolor=\"' . $bgcor . '\">' . chr(13);\n\t\t$sc .= '<TR><TH><h2><A name=\"A003\">' . msg('action_accept_rejected') . '</h2>';\n\t\t$sc .= '<TD width=25 ><img src=\"img/icone_close.png\" width=\"25\" id=\"A003i\" style=\"cursor: pointer;\">';\n\t\t$sx .= $sc;\n\t\t$sx .= '<TR><TD class=\"lt0\">' . msg('action_accept_rejected_inf');\n\t\t$sx .= '<TR><TD><form method=\"post\" action=\"' . page() . '#A003\">';\n\t\t$sx .= '<input type=\"hidden\" name=\"dd3\" value=\"003\">';\n\t\t$sx .= '<TR><TD><B>' . msg('action_reason_rejected');\n\t\t$sx .= '<TR><TD><textarea name=\"dd15\" cols=60 rows=4>' . $dd[15] . '</textarea>';\n\t\tif ((strlen($acao) > 0) and (strlen($dd[15]) == 0)) {\n\t\t\t$sx .= '<TR><TD><font class=\"error_1\">' . msg('required_field');\n\t\t}\n\t\t$sx .= '<TR><TD><input name=\"acao\" type=\"submit\" value=\"' . $bb1 . '\" class=\"form_submit\">';\n\t\t$sx .= '<TR><TD></form>';\n\t\t$sx .= '</table>';\n\n\t\tif ((strlen($acao) > 0) and (strlen($dd[15]) > 0)) {\n\t\t\t$comm = new comunication;\n\t\t\t$comm -> protocolo = $this -> protocolo_submission;\n\t\t\t$comm -> email_save($dd[15], msg('accept_rejected'));\n\t\t\t$this -> communication_research(msg('email_return_to_submission'), $dd[15]);\n\t\t\t$this -> cep_historic_append($ac, msg('return_to_submission'));\n\t\t\t$this -> cep_submit_status_alter('$');\n\t\t\t$this -> cep_status_alter('@');\n\t\t\tredirecina(page());\n\t\t}\n\t\treturn ($sx);\n\t}", "title": "" }, { "docid": "43f2b8026f037ef0d8e7001a85e1ddcf", "score": "0.59138286", "text": "abstract function setSubmitted();", "title": "" }, { "docid": "b5fc8670ca976ada061d6892e732e02e", "score": "0.5893035", "text": "protected function completeSave()\n {\n //\n }", "title": "" }, { "docid": "493085e0c92e4239d6e56b6822d674eb", "score": "0.5877432", "text": "public function submitAction()\n {\n $good = true;\n\n $title = trim($_REQUEST[\"title\"]);\n if($title == \"\") {\n message(\"error\", \"Title cannot be empty.\");\n $good = false;\n }\n\n //contact\n $submit_name = trim($_REQUEST[\"submitter_name\"]);\n $submit_email = trim($_REQUEST[\"submitter_email\"]);\n $submit_phone = trim($_REQUEST[\"submitter_phone\"]);\n\n if($submit_name == \"\") {\n message(\"error\", \"Please specify contact fullname.\");\n $good = false;\n }\n\n //consolidate assignee list\n $assignees = array();\n foreach($_REQUEST as $key=>$param) {\n if(substr($key, 0, 5) == \"team_\") {\n foreach($param as $assignee=>$flag) {\n $assignees[] = $assignee;\n }\n }\n }\n if(count($assignees) == 0) {\n message(\"error\", \"Please assign at least one assignee.\");\n $good = false;\n }\n\n //detail\n $ccs = @$_REQUEST[\"cc\"]; //TODO - validate\n $description = trim($_REQUEST[\"description\"]); //TODO - validate?\n $nad = strtotime($_REQUEST[\"nad\"]);\n $next_action = trim($_REQUEST[\"next_action\"]);//TODO - validate?\n $priority = (int)$_REQUEST[\"priority\"];\n $status = $_REQUEST[\"status\"]; //TODO - validate?\n $type = $_REQUEST[\"ticket_type\"]; //TODO - validate\n\n $footprint = new Footprint(null, false);\n $footprint->setTitle($title); \n\n if($_REQUEST[\"metadata_r\"] != \"\") {\n $resource_id = (int)$_REQUEST[\"metadata_r\"];\n $footprint->setMetadataResourceID($resource_id);\n }\n if($_REQUEST[\"metadata_vo\"] != \"\") {\n $vo_id = (int)$_REQUEST[\"metadata_vo\"];\n $footprint->setMetadataVOID($vo_id);\n }\n if($_REQUEST[\"metadata_sc\"] != \"\") {\n $sc_id = (int)$_REQUEST[\"metadata_sc\"];\n $footprint->setMetadataSCID($sc_id);\n }\n\n if($good) {\n\n if($description != \"\") {\n $footprint->addDescription($description);\n }\n\n $this->setSubmitter($footprint);\n\n //contact\n $footprint->setName($submit_name);\n $footprint->setMetadata(\"SUBMITTER_NAME\", $submit_name);\n $footprint->setOfficePhone($submit_phone);\n $footprint->setEmail($submit_email);\n if(user()->getDN() !== null) {\n $footprint->setMetadata(\"SUBMITTER_DN\", user()->getDN());\n }\n $footprint->setMetadata(\"SUBMITTED_VIA\", \"GOC Ticket/\".$this->getRequest()->getControllerName());\n\n //detail\n foreach($assignees as $assignee) {\n $footprint->addAssignee($assignee);\n }\n $footprint->resetCC();\n if(isset($ccs)) {\n foreach($ccs as $cc) {\n $cc = trim($cc);\n if($cc != \"\") {\n $footprint->addCC($cc);\n }\n }\n }\n $footprint->setNextAction($next_action);\n $footprint->setNextActionTime($nad);\n $footprint->setPriority($priority);\n $footprint->setStatus($status);\n $footprint->setTicketType($type);\n try {\n $mrid = $footprint->submit();\n if(!config()->simulate) {\n message(\"success\", \"Successfully updated ticket <a href=\\\"\".fullbase().\"/$mrid\\\">$mrid</a>\", true);\n }\n $this->view->mrid = $mrid;\n $this->render(\"success\", null, true);\n } catch(exception $e) {\n $this->sendErrorEmail($e);\n $this->render(\"failed\", null, true);\n }\n } else {\n //send data back to form\n $this->view->title = $_REQUEST[\"title\"];\n $this->view->submitter_name = $_REQUEST[\"submitter_name\"];\n $this->view->submitter_email = $_REQUEST[\"submitter_email\"];\n $this->view->submitter_phone = $_REQUEST[\"submitter_phone\"];\n\n $this->view->ticket_type = $_REQUEST[\"ticket_type\"];\n $plist = Footprint::GetPriorityList();\n $this->view->priority = $plist[(int)$_REQUEST[\"priority\"]];\n $this->view->status = $_REQUEST[\"status\"];\n\n $this->view->nad = $_REQUEST[\"nad\"];\n $this->view->next_action = $_REQUEST[\"next_action\"];\n $this->view->cc = @$_REQUEST[\"cc\"];\n\n $this->view->submitter_vo = @$_REQUEST[\"submitter_vo\"];\n $this->view->originating_ticket_id = @$_REQUEST[\"originating_ticket_id\"];\n $this->view->destination_vo = @$_REQUEST[\"destination_vo\"];\n $this->view->destination_ticket_id = @$_REQUEST[\"destination_ticket_id\"];\n\n //agg..I have to reconstruct the assignee list..\n $this->view->assignees = array();\n foreach($_REQUEST as $key=>$value) {\n if(substr($key, 0, 5) == \"team_\") { \n foreach($value as $id=>$ignore) {\n //$this->view->assignees[$id] = $aka_model->lookupName($id);\n $this->view->assignees[$id] = \"whatever\";\n }\n }\n }\n\n $this->view->description = $_REQUEST[\"description\"];\n\n $this->render(\"index\");\n }\n }", "title": "" }, { "docid": "fff5aa8bad4add06a9454cb2e1b1378b", "score": "0.5873503", "text": "public function approve_procurement($id, $appid)\n {\n $approver_id = $this->session->userdata('account_id');\n $id = $this->uri->segment(3);\n $appid = $this->uri->segment(4);\n $result = $this->account_model->get_account_by_id($id);\n $this->procurement_model->update_editable($id, 1, $approver_id, $appid);\n $this->project_model->update_editable($id, 1, $approver_id, $appid);\n \n $this->email_model->send_email($result[0]->account_email, \"Edit Request For Pre-purchase Material Risk Assessment Project Approved\", \"<p>Dear \". $result[0]->account_fullname .\", <br/><br/>Your Request For Editing A Pre-purchase Material Risk Assessment Project Has Been Approved. </p>\");\n \n\t\t$this->notification_model->insert_new_notification($id, 1, \"Edit Request For Pre-purchase Material Risk Assessment Project Approved\", \"Edit Request For Pre-purchase Material Risk Assessment Project Approved by : \" . $this->session->userdata('account_name'));\n\t\t\n redirect('editrequest_approval/index');\n }", "title": "" }, { "docid": "dfc00240469840da0bcf7a86294fc78c", "score": "0.5871121", "text": "public function resendEmail($data, $form)\n {\n $questionnaireSubmission = $this->record;\n\n if ($questionnaireSubmission->SecurityArchitectApprovalStatus !== \"pending\" &&\n $questionnaireSubmission->CisoApprovalStatus !== \"pending\" &&\n $questionnaireSubmission->BusinessOwnerApprovalStatus !== \"pending\") {\n $form->sessionMessage('Sorry, questionnaire submission is not pending for approval.', 'bad');\n }\n\n if ($questionnaireSubmission->SecurityArchitectApprovalStatus == \"pending\") {\n $members = $questionnaireSubmission->getApprovalMembersListByGroup(UserGroupConstant::GROUP_CODE_SA);\n new SendApprovalLinkEmail($this->record, $members, '');\n $form->sessionMessage('Email sent to the Security Architect group members.', 'good');\n } else {\n $members = $questionnaireSubmission->getApprovalMembersListByGroup(UserGroupConstant::GROUP_CODE_CISO);\n\n if ($questionnaireSubmission->CisoApprovalStatus == \"pending\" &&\n $questionnaireSubmission->BusinessOwnerApprovalStatus == \"pending\") {\n new SendApprovalLinkEmail($this->record, $members, $this->record->BusinessOwnerEmailAddress);\n $form->sessionMessage('Email sent to the CISO group members and business owner.', 'good');\n } elseif ($questionnaireSubmission->CisoApprovalStatus == \"pending\") {\n new SendApprovalLinkEmail($this->record, $members, '');\n $form->sessionMessage('Email sent to the CISO group members.', 'good');\n } elseif ($questionnaireSubmission->BusinessOwnerApprovalStatus == \"pending\") {\n new SendApprovalLinkEmail($this->record, [], $this->record->BusinessOwnerEmailAddress);\n $form->sessionMessage('Email sent to the business owner.', 'good');\n }\n }\n\n return $this->redirectBack();\n }", "title": "" }, { "docid": "5fd05c6ff13a42405f03973f0713da66", "score": "0.5870629", "text": "public function extendArticleSubmitAction()\n {\n\t\tif($this->_request-> isPost())\n\t\t{\n\t\t\t$articleParams=$this->_request->getParams();\n\t\t\t$participation_id=$articleParams['participation_id'];\t\n\t\t\t$user_type=$articleParams['user_type'];\n\t\t\t\n\t\t\tif($user_type=='corrector')\n\t\t\t\t$participation_obj=new Ep_Participation_CorrectorParticipation();\n\t\t\telse\n\t\t\t\t$participation_obj=new Ep_Participation_Participation();\n\t\t\t\n\t\t\tif($participation_id && $user_type)\n\t\t\t{\n\t\t\t\t $extendDate=$articleParams['extend_date'];\n\t\t\t\tif($user_type=='corrector')\n\t\t\t\t{\n\t\t\t\t\t$details=$participation_obj->getCrtParticipateDetails($participation_id);\n /*echo \"jill\".$details[0]['corrector_submit_expires'];\n print_r($details); exit;*/\n\t\t\t\t\tif($details[0]['corrector_submit_expires'] >= time())\n\t\t\t\t\t\t$extendTimestamp= $details[0]['corrector_submit_expires']+($extendDate*60*60);\n\t\t\t\t\telse\n\t\t\t\t\t\t$extendTimestamp= time()+($extendDate*60*60);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$details=$participation_obj->getParticipateDetails($participation_id);\n\t\t\t\t\tif($details[0]['article_submit_expires'] >= time())\n\t\t\t\t\t\t$extendTimestamp= $details[0]['article_submit_expires']+($extendDate*60*60);\n\t\t\t\t\telse\n\t\t\t\t\t\t$extendTimestamp= time()+($extendDate*60*60);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($user_type=='corrector')\n\t\t\t\t{\n\t\t\t\t\t$data=array(\"status\"=>'bid',\"corrector_submit_expires\"=>$extendTimestamp,\"extend_count\"=>new Zend_Db_Expr('extend_count+1'));\n\t\t\t\t\t$query=\" id='\".$participation_id.\"'\";\n\t\t\t\t\t$participation_obj->updateCrtParticipation($data,$query);\n\t\t\t\t\t//insert this action in history table \n\t\t $actionId=18;\n\t\t $actparams['contributorId']=$details[0]['corrector_id'];\n\t\t $actparams['artId']=$details[0]['article_id'];\n\t\t $actparams['stage']='ongoing';\n\t\t $actparams['action']='submittime_extended';\n\t\t $this->articleHistory($actionId, $actparams);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data=array(\"status\"=>'bid',\"article_submit_expires\"=>$extendTimestamp,\"extend_count\"=>new Zend_Db_Expr('extend_count+1'));\n\t\t\t\t\t$query=\" id='\".$participation_id.\"'\";\n\t\t\t\t\t$participation_obj->updateParticipation($data,$query);\n\t\t\t\t\t//insert this action in history table \n\t\t $actionId=6;\n\t\t $actparams['contributorId']=$details[0]['user_id'];\n\t\t $actparams['artId']=$details[0]['article_id'];\n\t\t $actparams['stage']='ongoing';\n\t\t $actparams['action']='submittime_extended';\n\t\t $this->articleHistory($actionId, $actparams);\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$this->_helper->FlashMessenger(\"Time Extended\");\n\t\t\t\t$Message = utf8_decode(stripslashes($articleParams['extend_comment']));\n\t\t\t\t$automail=new Ep_Message_AutoEmails();\n\t\t\t\t$email=$automail->getAutoEmail(49);\n\t\t\t\t$Object=$email[0]['Object'];\n\t\t\t\t\n\t\t\t\tif($user_type=='corrector')\n\t\t\t\t\t$receiverId = $details[0]['corrector_id'];\n\t\t\t\telse\n\t\t\t\t\t$receiverId = $details[0]['user_id'];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$automail->sendMailEpMailBox($receiverId,$Object,$Message);\n\t\t\t\tif($articleParams['pagefrom']=='overdue')\n\t\t\t\t\t$this->_redirect(\"/ao/over-due?submenuId=ML2-SL11\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$client_id=$details[0]['clientId'];\n\t\t\t\t\t$ao_id=$details[0]['deliveryId'];\n\t\t\t\t\t$this->_redirect(\"/followup/delivery?ao_id=$ao_id&client_id=$client_id&submenuId=ML13-SL4\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($articleParams['pagefrom']=='overdue')\n\t\t\t\t\t$this->_redirect(\"/ao/over-due?submenuId=ML2-SL11\");\n\t\t\t\telse\n\t\t\t\t\t$this->_redirect(\"/contractmission/missions-list?submenuId=ML13-SL4\");\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "4acc34c94bbcd6c98a2fe4225103f982", "score": "0.5862035", "text": "function saveSubmit(&$args, &$request) {\n\t\t$step = isset($args[0]) ? $args[0] : 1;\n\t\t$monographId = $request->getUserVar('monographId');\n\n\t\t$this->validate($request, $monographId, $step);\n\t\t$this->setupTemplate(true);\n\t\t$monograph =& $this->monograph;\n\n\t\t$formClass = \"AuthorSubmitStep{$step}Form\";\n\t\timport(\"classes.author.form.submit.$formClass\");\n\n\t\t$submitForm = new $formClass($monograph);\n\t\t$submitForm->readInputData();\n\n\t\tif (!HookRegistry::call('SubmitHandler::saveSubmit', array($step, &$monograph, &$submitForm))) {\n\t\t\tif ($submitForm->validate()) {\n\t\t\t\t$monographId = $submitForm->execute();\n\n\t\t\t\tif ($step == 3) {\n\t\t\t\t\t// Send a notification to associated users\n\t\t\t\t\timport('lib.pkp.classes.notification.NotificationManager');\n\t\t\t\t\t$notificationManager = new NotificationManager();\n\t\t\t\t\t$monographDao =& DAORegistry::getDAO('MonographDAO');\n\t\t\t\t\t$monograph =& $monographDao->getMonograph($monographId);\n\t\t\t\t\t$roleDao =& DAORegistry::getDAO('RoleDAO');\n\t\t\t\t\t$notificationUsers = array();\n\t\t\t\t\t$pressManagers = $roleDao->getUsersByRoleId(ROLE_ID_PRESS_MANAGER);\n\t\t\t\t\t$allUsers = $pressManagers->toArray();\n\t\t\t\t\t$editors = $roleDao->getUsersByRoleId(ROLE_ID_EDITOR);\n\t\t\t\t\tarray_merge($allUsers, $editors->toArray());\n\t\t\t\t\tforeach ($allUsers as $user) {\n\t\t\t\t\t\t$notificationUsers[] = array('id' => $user->getId());\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($notificationUsers as $userRole) {\n\t\t\t\t\t\t$url = $request->url(null, 'editor', 'submission', $monographId);\n\t\t\t\t\t\t$notificationManager->createNotification(\n\t\t\t\t\t\t\t$userRole['id'], 'notification.type.monographSubmitted',\n\t\t\t\t\t\t\t$monograph->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_MONOGRAPH_SUBMITTED\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$request->redirect(null, null, 'submit', $step+1, array('monographId' => $monographId));\n\t\t\t} else {\n\t\t\t\t$submitForm->display();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "63dc8d3171d7c20359ca8a270c398f43", "score": "0.58571494", "text": "public function auto_approve_submitted_cron(){ // auto_approve_flag - 1 = Auto approved by cron\n\t\t$get_timesheet_data = $this->dashboard_model->get_submitted_for_autoapproval();\n\t\t$i=0;\n\t\tif(!empty($get_timesheet_data)){\n\t\t\tforeach((array)$get_timesheet_data as $timecard){\n\t\t\t\t$updated = $this->dashboard_model->update_Record('timecard', array('status'=>3, 'auto_approve_flag'=>1 ), array('timecard_id'=>$timecard->timecard_id));\n\t\t\t\tif($updated){\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f923fda0b99e3956e0daab9717019ea5", "score": "0.5848437", "text": "public function resubmitAfterVerification()\n {\n try {\n // Set the status to inactive to show immediate feedback to the user\n $this->markInactive('Rafter is resubmitting your domain to Cloud Run after verification.');\n\n $this->environment->client()->deleteCloudRunDomainMapping($this);\n\n sleep(1);\n\n $this->environment->client()->addCloudRunDomainMapping(new DomainMappingConfig($this));\n\n CheckDomainMappingStatus::dispatch($this->id)->delay(1);\n } catch (RequestException $e) {\n $this->markError($e);\n }\n }", "title": "" }, { "docid": "c663bcf71d2ba4cfa3408e9845ae85fe", "score": "0.58306056", "text": "function submit() {\r\n // set operation type and send request\r\n $this->_send(SMS_OP_SUBMIT);\r\n return $this->isSuccess();\r\n }", "title": "" }, { "docid": "a068e3fa9c1e5d592d20a8ec99edc41c", "score": "0.582543", "text": "function test_awaiting_approval()\n\t{\n\t\t$result = $this->takeaway->getAwaiting();\n\t\t\n\t\tif (!$result) {\n\t\t\t$this->_fail();\n\t\t} else {\n\t\t\t$found = false;\n\t\t\tforeach ($result AS $takeaway)\n\t\t\t\tif ($takeaway->takeawayId==$this->takeawayId)\n\t\t\t\t\t$found = true;\n\t\t\t\n\t\t\t$this->_assert_true($found);\n\t\t}\n\t}", "title": "" }, { "docid": "5bf62acd987d2f29b6719a47373980b6", "score": "0.58250505", "text": "public function deny()\n {\n $data = array_merge($this->settings, array(\n 'to' => ee()->input->post('email_to', TRUE),\n 'reply_to' => ee()->session->userdata['email'],\n 'reply_name'=> ee()->session->userdata['screen_name'],\n 'subject' => ee()->input->post('title', TRUE) .' was denied approval by '. ee()->session->userdata['screen_name'],\n 'template' => ee()->input->post('notes', TRUE),\n ));\n\n // Send the email\n ee()->publisher_email->send($data);\n\n // Add the notes to the approval\n ee()->db->where('type_id', ee()->input->post('type_id', TRUE))\n ->where('type', ee()->input->post('type', TRUE))\n ->where('publisher_lang_id', ee()->publisher_lib->lang_id)\n ->update('publisher_approvals', array(\n 'notes' => ee()->input->post('notes', TRUE)\n ));\n }", "title": "" }, { "docid": "c12b68efddef1cc7e882ae315f6b9c69", "score": "0.580262", "text": "public function callbackSubmit()\n {\n $date = new \\DateTime(\"now\", new \\DateTimeZone('Europe/Stockholm'));\n $postId = $this->form->value(\"postId\");\n $comment = new Comment();\n $comment->setDb($this->di->get(\"db\"));\n $comment->userId = $this->form->value(\"userId\");\n $comment->postId = $postId;\n $pcid = $this->form->value(\"parentCommentId\") == -1 ? null : $this->form->value(\"parentCommentId\");\n $comment->parentCommentId = $pcid;\n\n $comment->datetime = $date->format(\"Y-m-d H:i:s\");\n $comment->content = $this->form->value(\"content\");\n\n $comment->save();\n\n $this->di->get(\"response\")->redirect(\"posts/$postId\");\n }", "title": "" }, { "docid": "ddb5efa17cc020e792e870353f5af62d", "score": "0.58004874", "text": "public function approval_spb()\n\t{\n\t\t$data['container'] \t= 'nasabah/approval_spb';\n\t\t$this->load->view('core',$data);\n\t}", "title": "" }, { "docid": "52b44e9ef5e6cc0b2165714a8bb6036a", "score": "0.57933277", "text": "function contract_termination()\n {\n #check user access\n check_user_access($this, 'delete_contract', 'redirect');\n\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 's', 'i', 'b'));\n\n # Pick all assigned data\n $data = assign_to_data($urldata);\n $termination_reason = mysql_real_escape_string($_POST['termination_reason']);\n $date_contract_terminated = '';\n if(!empty($_POST['date_contract_terminated']))\n {\n $date_contract_terminated = date('Y-m-d',strtotime($_POST['date_contract_terminated']));\n }\n\n # print_r($data);\n # print_r($_POST);\n # exit();\n $author = $this->session->userdata('userid');\n $dataarray = array(\n 'terminated' =>'Y',\n 'reason_for_termination' =>$termination_reason,\n 'author' =>$author,\n 'dateterminated'=>$date_contract_terminated,\n 'id'=>decryptValue($data['i'])\n );\n\n\n//print_r($this->Query_reader->get_query_by_code('terminate_contract',$dataarray));\n if(!empty($data['i'])){\n $result = $this->db->query($this->Query_reader->get_query_by_code('terminate_contract',$dataarray));\n\n #deactivate the contract prices as well\n $this->db->update('contract_prices', array('isactive'=>'N'), array('contract_id'=>decryptValue($data['i'])));\n\n $this->session->set_userdata('dbid', \"The contract details has been successfully terminated.\");\n $msg = \"SUCCESS: The contract details has been successfully terminated.\";\n\n log_action('create',' The contract details has been successfully terminated', ' The contract details has been successfully terminated ');\n\n\n $status = \"1\";\n }\n else if(empty($data['msg']))\n {\n $this->session->set_userdata('dbid', \"ERROR: The contract details could not be terminated.\");\n $msg = \"ERROR: The contract details could not be terminated.\";\n $status = \"0\";\n }\n $dataarray['msg'] = $msg;\n $dataarray['status'] = $status;\n echo ($status);\n exit();\n\n\n // redirect(base_url().\"contracts/manage_contracts/m/dbid/\");\n }", "title": "" }, { "docid": "899d2d6debc13e1c4b28aa3326c4e1de", "score": "0.5788475", "text": "function submit() {\r\n\tglobal $template_footer;\r\n\tglobal $mysql_connection;\r\n\tcheck_vars();\r\n\t\r\n\t// TODO Display settings management\r\n\tdisplay_submitted_page_contents();\r\n}", "title": "" }, { "docid": "38ad9157f47e3106648759386a6c633c", "score": "0.57871383", "text": "public function approvalTimAction()\n {\n $id = $this->input->post('id');\n $approval_status = $this->input->post('approval_status');\n $approval_by = $this->session->user;\n\n try {\n // TODO:\n // form validation\n if (empty($id) || empty($approval_status)) throw new Exception(\"Body cannot be empty\");\n\n // TODO:\n // approval type validation\n // TIM just can set approval within REVISI, OPEN, CLOSED\n if (!in_array($approval_status, [CAR_STATUS::OPEN, CAR_STATUS::REVISI, CAR_STATUS::CLOSED])) throw new Exception(\"Approval type is not valid type\");\n\n // using funcion as parameter\n $this->M_car->approvalTimCar($id, $approval_by, $approval_status, function ($cars) {\n return $this->isAllCarIsClosed($cars);\n });\n\n return $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode([\n 'code' => 200,\n 'message' => \"Successfully\",\n 'approval_status' => [\n 'open' => [\n 'count' => $this->M_car->getAmountOfStatusHistory($id, CAR_STATUS::OPEN)\n ]\n ]\n ]));\n } catch (Exception $e) {\n return $this->output\n ->set_content_type('application/json')\n ->set_status_header(400)\n ->set_output(json_encode([\n 'code' => 400,\n 'message' => \"$e\",\n ]));\n }\n }", "title": "" }, { "docid": "49675b61122d699373f5cfbc2a922282", "score": "0.5779041", "text": "private function submit()\n {\n if ( ! isset($_REQUEST['do']) || empty($_REQUEST['do']) ) {\n echo \"<h2>method name is empty</h2>\";\n }\n else {\n $do_list = [\n 'forum_create', 'forum_delete',\n 'post_create', 'post_delete',\n 'comment_create', 'comment_delete',\n 'file_upload', 'file_delete',\n 'blogger_getUsersBlogs',\n 'login',\n ];\n if ( in_array( $_REQUEST['do'], $do_list ) ) $this->$_REQUEST['do']();\n else echo \"<h2>You cannot call the method - '$_REQUEST[do]' because the method is not listed on 'do-list'.</h2>\";\n\n }\n exit;\n }", "title": "" }, { "docid": "00be351e38e5e62d8bceac2f9fd07b83", "score": "0.57768154", "text": "function _notify2post(){\r\r\n\t\t// parse\r\r\n\t\tif( $notify_response = $this->_get_notify() ){\r\r\n\t\t\t// log\r\r\n\t\t\tmgm_log($notify_response, $this->module . __FUNCTION__);\r\r\n\t\t\t// only if canceled\r\r\n\t\t\tif( $notify_response->type == 'customer.subscription.deleted'){\r\r\n\t\t\t\t// get email\r\r\n\t\t\t\t$customer_id = $notify_response->data->object->customer;\r\r\n\t\t\t\t// get transaction\r\r\n\t\t\t\tif( $tran = mgm_get_transaction_by_option('stripe_customer_id', $customer_id) ){\r\r\n\t\t\t\t\t// check\r\r\n\t\t\t\t\tif( $member = mgm_get_member($transaction['data']['user_id']) ){\r\r\n\t\t\t\t\t\t// proces only when not canceled\r\r\n\t\t\t\t\t\tif( ! in_array($member->status, array( MGM_STATUS_AWAITING_CANCEL, MGM_STATUS_CANCELLED)) ){\r\r\n\t\t\t\t\t\t\t// set post fields\r\r\n\t\t\t\t\t\t\t$_POST['custom'] = $tran['id']; \r\r\n\t\t\t\t\t\t\t$_POST['notify_type'] = 'subscr_canceled';\r\r\n\t\t\t\t\t\t\t// $_POST['notify_type'] = 'subscr_expired'\r\r\n\t\t\t\t\t\t\t// set notify\r\r\n\t\t\t\t\t\t\t$this->response = $notify_response;\r\r\n\t\t\t\t\t\t\t// log\r\r\n\t\t\t\t\t\t\tmgm_log('Cancelling from Notify Post' . mgm_pr($tran, true), $this->module . __FUNCTION__);\r\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\r\n\t\t\t\t\t}\t\t\t\t\t\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "bf9e54510499485012571f026fa14953", "score": "0.577569", "text": "function doSubmit() {\n\t\t/* guard against an empty array */\n\t\t$array = $this->getRequest()->getArray( 'wpSpecial' );\n\t\tif ( !$array ) {\n\t\t\t$this->showForm( $this->msg( 'refreshspecial-none-selected' )->plain() );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->getOutput()->setSubtitle(\n\t\t\t$this->msg( 'refreshspecial-choice',\n\t\t\t\t$this->msg( 'refreshspecial-refreshing' )->plain()\n\t\t\t)->plain()\n\t\t);\n\t\t$this->refreshSpecial();\n\n\t\t$titleObj = SpecialPage::getTitleFor( 'RefreshSpecial' );\n\t\t$link_back = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(\n\t\t\t$titleObj,\n\t\t\t$this->msg( 'refreshspecial-link-back' )->plain()\n\t\t);\n\t\t$this->getOutput()->addHTML( '<br /><b>' . $link_back . '</b>' );\n\t}", "title": "" }, { "docid": "7590a0aef307824542d909a83704ad46", "score": "0.5774981", "text": "public function process()\n {\n $iId = $this->request()->get('id');\n \n $sPromoteCode = Phpfox::getService('jobposting.job')->getPromoteCode($iId, 1, 1);\n \n $this->template()->assign(array(\n 'iId' => $iId,\n 'sPromoteCode' => $sPromoteCode\n ));\n }", "title": "" }, { "docid": "bcbaf1c730c67035e34f6c1d5d28f9b2", "score": "0.57731235", "text": "public function approve()\n { \n $this->setApproved(true);\n $this->setApprovedAt(date('Y-m-d'));\n $this->save();\n }", "title": "" }, { "docid": "37774b609914dabc14d6ed2134c58974", "score": "0.57650477", "text": "public function onSuccess() {\r\n\t\techo 'successful submission';\r\n\t}", "title": "" }, { "docid": "7dff5320aba8fdf979fe3d154d2385e5", "score": "0.57615817", "text": "public function rejectApproval() \n\t{\n\t\t$sql = \"SELECT id FROM docmgr.dm_workflow_route WHERE id='\".$this->routeId.\"' AND account_id='\".USER_ID.\"'\";\n\t\t$info = $this->DB->single($sql);\n\t\t\n\t\tif (!$info)\n\t\t{\n\t\t\t$this->throwError(_I18N_PERMISSION_DENIED);\n\t\t\treturn false;\n\t\t}\n\n\t\t$routeId = $this->routeId;\n\t\t\n\t\t$this->DB->begin();\n\n\t\t//figure out how many other tasks are left at this left\n\t\t$sql = \"SELECT sort_order,workflow_id FROM docmgr.dm_workflow_route WHERE id='$routeId';\";\n\t\t$info = $this->DB->single($sql);\n\n\t\t$workflowId = $info[\"workflow_id\"];\n\n\t\t//update this route and delete the task from the alert\n\t\t$sql = \"UPDATE docmgr.dm_workflow_route SET status='rejected',comment='\".$this->apidata[\"comment\"].\"' WHERE id='$routeId';\";\n\t\t$sql .= \"UPDATE docmgr.dm_workflow SET status='rejected',date_complete='\".date(\"Y-m-d H:i:s\").\"' WHERE id='\".$workflowId.\"';\";\n\t\t$this->DB->query($sql);\n\n \t//clear all shares\n \t$this->cleanupPermissions();\n \t\n \t//notify the user it's done\n \t$this->notifyComplete(1);\n\n \t//log the rejection\n \tlogEvent('OBJ_WORKFLOW_REJECT',$objectId);\n\n \t$this->DB->end();\n \t\n \t$err = $this->DB->error();\n \tif ($err) $this->throwError($err);\n\n\t}", "title": "" }, { "docid": "1a69dc8202a5d8e9990278953df6abef", "score": "0.57453954", "text": "public function submitPost()\n {\n ?>\n\t\t<div class=\"contentheading\">Process payment ... Please wait ...</div>\n\t\t<form method=\"post\" action=\"<?php echo $this->_url; ?>\" name=\"jd_form\" id=\"jd_form\">\n\t\t\t<?php\nforeach ($this->_post_params as $key => $val) {\n echo '<input type=\"hidden\" name=\"' . $key . '\" value=\"' . $val . '\" />';\n echo \"\\n\";\n }\n\n ?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tfunction redirect()\n\t\t\t\t{\n\t\t\t\t\tdocument.jd_form.submit();\n\t\t\t\t}\n\t\t\t\tsetTimeout('redirect()', 3000);\n\t\t\t</script>\n\t\t</form>\n\t<?php\n}", "title": "" }, { "docid": "67222b22f710c47eb87a64b5f4f799a2", "score": "0.57429", "text": "function answer_assign(){\r\n\t\tglobal $database;\r\n\r\n\t\t$_SESSION['html_cache'] = $database->submit_assign($_SESSION['course_code'],$_SESSION['user']);\r\n\t\theader(\"Location: ../assign.php?t=1&assign=1&msg=Assignment+sumbitted+successfully\");\r\n\t}", "title": "" }, { "docid": "a14dfe663c8cd45a06c6a336ce7d8e0b", "score": "0.57408196", "text": "function cancel_preapprovals_backer_mail($array,$PayPalResult)\n\t{\n\t\t// for a backing pledge, but the execute failed, so we are marking that pledge \n\t\t// as cancelled.\n\t\t\n\t\t/*paykey,$backer_id,$back_id,$backer_name,$projectId,\n\t\t$project_name,$creator_id,$amount,$commision,$rewardId,$backer_email*/\n\t\textract($array);\n\t\textract($PayPalResult);\n\t\t\n\t\t$message=\"<html><head><style>.body{font-family:Arial, Helvetica, sans-serif; font-size:12px; }</style></head>\";\n\t\t$message.=\"<body> Hello \".$backer_name .\"<br><Br> Project \".$project_name.\" to which you pledged support failed to reach its goal.\n\tYour pledge has been cancelled. No funds will be taken from your account.\n\t<br><br> On behalf of the project owner thank you for your support.<br><br>\".DISPLAYSITENAME.\" Team\";\n\t\t$subject1=$project_name.\": project was unsuccessful in reaching its goal.\";\n\t\t$headers1 = \"MIME-Version: 1.0\\r\\n\";\n\t\t$headers1 .= \"Content-type: text/html\\r\\n\";\n\t\t$headers1 .= FROMEMAILADDRESS;\n\t\t$toemail=$backer_email; \n\n\t\t@mail(($toemail), $subject1, $message, $headers1);\n\t\t@mail('admin@'.$_SERVER['SERVER_NAME'], 'cc: '.$subject1, $message, $headers1);\t\n\t}", "title": "" }, { "docid": "577eba7dd2847f876e0a04399a065845", "score": "0.57398677", "text": "public function complete_job_form_submit($job_id) {\n\n if ($this->session->userdata('logged_in')) {\n\n $session_data = $this->session->userdata('logged_in');\n $user_role_id = $session_data['user_role_id'];\n $user_id = $session_data['user_id'];\n\n if ($user_role_id === \"4\") { //technician\n $page_data = $this->technician_view_data();\n\n $tech_id = $page_data['tech_id'];\n $new_job_list = $page_data['new_job_list'];\n $new_job_count = $page_data['new_job_count'];\n $assigned_to_me_job_list = $page_data['assigned_to_me_job_list'];\n $assigned_to_me_job_count = $page_data['assigned_to_me_job_count'];\n $store_parts_recieved_list = $page_data['store_parts_recieved_list'];\n $store_parts_recieved_count = $page_data['store_parts_recieved_count'];\n $store_my_completed_job_list = $page_data['store_my_completed_job_list'];\n $store_my_completed_job_count = $page_data['store_my_completed_job_count'];\n\n $data['tech_id'] = $tech_id;\n $data['new_job_list'] = $new_job_list;\n $data['new_job_count'] = $new_job_count;\n $data['assigned_to_me_job_list'] = $assigned_to_me_job_list;\n $data['assigned_to_me_job_count'] = $assigned_to_me_job_count;\n\n $data['store_parts_recieved_count'] = $store_parts_recieved_count;\n $data['store_parts_recieved_list'] = $store_parts_recieved_list;\n\n $data['store_my_completed_job_list'] = $store_my_completed_job_list;\n $data['store_my_completed_job_count'] = $store_my_completed_job_count;\n\n $data['job_id'] = $job_id;\n $data['nav'] = \"jobs\";\n\n\n $dataFieldsUpdate = array(\"technician_id\" => $tech_id, \"job_status\" => \"Finished not collected\", \"technician_status\" => \"Completed\", \"store_manager_status\" => \"Completed\", \"current_status\" => \"Completed\");\n $whereArrUpdate = array(\"job_id\" => $job_id);\n\n $resultUpdate = $this->db_model->updatedata(\"customer_job_tbl\", $dataFieldsUpdate, $whereArrUpdate);\n\n //get the job infomation\n $fieldJobInfo = \"*\";\n $whereArrJobInfo = array(\"job_id\" => $job_id);\n $resultJobInfo = $this->db_model->getData($fieldJobInfo, \"customer_job_tbl\", $whereArrJobInfo);\n\n $date = date(\"Y-m-d\");\n\n $job_history_details = array(\n 'job_id' => $job_id,\n 'customer_id' => $resultJobInfo[0]->customer_id,\n 'job_date' => $resultJobInfo[0]->job_date,\n 'status' => \"Completed\",\n 'final_status' => \"Finished not collected\",\n 'status_change_date' => $date\n );\n\n\n $result_customer_job_history_info = $this->db_model->insertData(\"customer_job_history_tbl\", $job_history_details);\n\n\n if ($resultUpdate && $result_customer_job_history_info) {\n\n $data['page_msg'] = \"success\";\n\n\n $this->load->view('psmsbackend/technician/jobs/job_completed_alert_page', $data);\n } else {\n\n //get the job_repair details from the job_reapir_inof_tbl \n $fieldJobRepairInfo = \"*\";\n $whereArrJobRepairInfo = array(\"tech_id\" => $tech_id, \"job_id\" => $job_id);\n $resultJobRepairInfo = $this->db_model->getData($fieldJobRepairInfo, \"job_repair_info_tbl\", $whereArrJobRepairInfo);\n\n\n $fieldJobPartsInfo = \"*\";\n $whereArrJobPartsInfo = array();\n $resultJobPartsInfo = $this->db_model->getData($fieldJobPartsInfo, \"parts_inventory_m_tbl\", $whereArrJobPartsInfo);\n\n $data['parts_inventory'] = $resultJobPartsInfo;\n $data['job_repair_info'] = $resultJobRepairInfo;\n\n\n $data['page_msg'] = \"complete_unsuccess\";\n $data['nav'] = \"jobs\"; // this is for highligting left navigation tab (associative array) \n $this->load->view('psmsbackend/technician/jobs/technician_job_complete_update_form', $data);\n }\n } else {\n\n $this->load->view('psmsbackend/403_error_page');\n }\n } else {\n\n $this->load->view('psmsbackend/401_error_page');\n }\n }", "title": "" }, { "docid": "2bc75cf469424454f02967fcdfcce847", "score": "0.57372063", "text": "public function assignPrionsers()\r\n {\r\n $isEdit = 0; \r\n $default_status = ''; $approvalStatusList = '';\r\n $assigned_prisoners = '';\r\n $statusInfo = $this->getApprovalStatusInfo();\r\n if(is_array($statusInfo) && count($statusInfo) > 0)\r\n {\r\n $default_status = $statusInfo['default_status']; \r\n $approvalStatusList = $statusInfo['statusList']; \r\n }\r\n //get current prison id\r\n $prison_id = $this->Session->read('Auth.User.prison_id');\r\n\r\n if($this->request->is(array('post','put'))){\r\n\r\n //debug($this->request->data); exit;\r\n \r\n if(isset($this->request->data['ApprovalProcess']) && count($this->request->data['ApprovalProcess']) > 0)\r\n {\r\n $status = 'Saved'; \r\n $remark = '';\r\n if($this->Session->read('Auth.User.usertype_id')==Configure::read('OFFICERINCHARGE_USERTYPE') || ($this->Session->read('Auth.User.usertype_id')==Configure::read('PRINCIPALOFFICER_USERTYPE')))\r\n {\r\n if(isset($this->request->data['ApprovalProcessForm']) && count($this->request->data['ApprovalProcessForm']) > 0)\r\n {\r\n $status = $this->request->data['ApprovalProcessForm']['type']; \r\n $remark = $this->request->data['ApprovalProcessForm']['remark'];\r\n }\r\n }\r\n //debug($this->data);exit;\r\n $rejectedList=array();\r\n $working_party_prisoner_id='';\r\n foreach ($this->data['ApprovalProcess'] as $key => $value) {\r\n \t if(isset($value['fid']) && $value['fid']!=''){\r\n \t \t$working_party_prisoner_id=$value['fid'];\r\n \t \tif($status != 'Saved'){\r\n \t \t\tforeach ($value['WorkingPartyPrisonerApprove'] as $key1 => $value1) {\r\n\t\t if($value1['is_approve'] == 2){\r\n\t\t $rejectedList[]=$value1['prisoner_id'];\r\n\t\t }\r\n\t\t }\r\n \t \t}\t \r\n\t \r\n\t //$this->updateWorkingPartyPrisoner($rejectedList,$working_party_prisoner_id);\r\n \t }else{\r\n \t \tunset($this->request->data['ApprovalProcess'][$key]);\r\n \t }\r\n \r\n }\r\n //debug($this->request->data);exit;\r\n $items = $this->request->data['ApprovalProcess']; \r\n \r\n $approveProcess = $this->setApprovalProcess($items, 'WorkingPartyPrisoner', $status, $remark);\r\n if(is_array($rejectedList) && count($rejectedList)>0 && $working_party_prisoner_id!=''){\r\n \t$this->updateWorkingPartyPrisoner($rejectedList,$working_party_prisoner_id);\r\n }\r\n \r\n if($approveProcess == 1)\r\n { \r\n //notification on approval of assign prisoner to working group list --START--\r\n if($this->Session->read('Auth.User.usertype_id')==Configure::read('RECEPTIONIST_USERTYPE'))\r\n {\r\n $notification_msg = \"Assigned prisoner to working party are pending for review.\";\r\n $notifyUser = $this->User->find('first',array(\r\n 'recursive' => -1,\r\n 'conditions' => array(\r\n 'User.usertype_id' => Configure::read('PRINCIPALOFFICER_USERTYPE'),\r\n 'User.is_trash' => 0,\r\n 'User.is_enable' => 1,\r\n 'User.prison_id' => $this->Session->read('Auth.User.prison_id')\r\n )\r\n ));\r\n if(isset($notifyUser['User']['id']))\r\n {\r\n $this->addNotification(array( \r\n \"user_id\" => $notifyUser['User']['id'], \r\n \"content\" => $notification_msg, \r\n \"url_link\" => \"/Earnings/assignPrionsers\", \r\n )); \r\n }\r\n }\r\n if($this->Session->read('Auth.User.usertype_id')==Configure::read('PRINCIPALOFFICER_USERTYPE'))\r\n {\r\n $notification_msg = \"Assigned prisoner to working party are pending for approve\";\r\n $notifyUser = $this->User->find('first',array(\r\n 'recursive' => -1,\r\n 'conditions' => array(\r\n 'User.usertype_id' => Configure::read('OFFICERINCHARGE_USERTYPE'),\r\n 'User.is_trash' => 0,\r\n 'User.is_enable' => 1,\r\n 'User.prison_id' => $this->Session->read('Auth.User.prison_id')\r\n )\r\n ));\r\n if(isset($notifyUser['User']['id']))\r\n {\r\n $this->addNotification(array( \r\n \"user_id\" => $notifyUser['User']['id'], \r\n \"content\" => $notification_msg, \r\n \"url_link\" => \"/Earnings/assignPrionsers\", \r\n ));\r\n }\r\n }\r\n //notification on approval of assign prisoner to working group list --END--\r\n $this->Session->write('message_type','success');\r\n $this->Session->write('message','Assign Prionser '.$status.' Successfully !');\r\n }\r\n else \r\n {\r\n $this->Session->write('message_type','error');\r\n $this->Session->write('message','Assign Prionser '.$status.' failed');\r\n }\r\n }\r\n else if(isset($this->request->data['workingPartyPrisonerEdit']['id']))\r\n { \r\n $this->request->data = $this->WorkingPartyPrisoner->findById($this->request->data['workingPartyPrisonerEdit']['id']);\r\n $isEdit = 1; \r\n\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['start_date']))\r\n $this->request->data['WorkingPartyPrisoner']['start_date']=date('d-m-Y',strtotime($this->request->data['WorkingPartyPrisoner']['start_date']));\r\n\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['end_date']))\r\n $this->request->data['WorkingPartyPrisoner']['end_date']=date('d-m-Y',strtotime($this->request->data['WorkingPartyPrisoner']['end_date']));\r\n\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['assignment_date']))\r\n $this->request->data['WorkingPartyPrisoner']['assignment_date']=date('d-m-Y',strtotime($this->request->data['WorkingPartyPrisoner']['assignment_date']));\r\n\r\n $assigned_prisoners = explode(',',$this->request->data['WorkingPartyPrisoner']['prisoner_id']);\r\n\r\n $assigned_prisoners = $this->request->data['WorkingPartyPrisoner']['prisoner_id'];\r\n\r\n //$this->request->data['WorkingPartyPrisoner']['prisoner_id'] = $assigned_prisoners;\r\n } \r\n else \r\n { \r\n $isCapacity = 1;\r\n $login_user_id = $this->Session->read('Auth.User.id'); \r\n $this->request->data['WorkingPartyPrisoner']['login_user_id'] = $login_user_id;\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['assignment_date']))\r\n $this->request->data['WorkingPartyPrisoner']['assignment_date']=date('Y-m-d',strtotime($this->request->data['WorkingPartyPrisoner']['assignment_date']));\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['start_date']))\r\n $this->request->data['WorkingPartyPrisoner']['start_date']=date('Y-m-d',strtotime($this->request->data['WorkingPartyPrisoner']['start_date']));\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['end_date']))\r\n $this->request->data['WorkingPartyPrisoner']['end_date']=date('Y-m-d',strtotime($this->request->data['WorkingPartyPrisoner']['end_date']));\r\n //create uuid\r\n if(empty($this->request->data['WorkingPartyPrisoner']['id']))\r\n {\r\n $uuid = $this->WorkingPartyPrisoner->query(\"select uuid() as code\");\r\n $uuid = $uuid[0][0]['code'];\r\n $this->request->data['WorkingPartyPrisoner']['uuid'] = $uuid;\r\n } \r\n\r\n if($this->Session->read('Auth.User.usertype_id')==Configure::read('OFFICERINCHARGE_USERTYPE')) \r\n {\r\n $this->request->data['WorkingPartyPrisoner']['status'] = 'Reviewed';\r\n } \r\n if(!empty($this->data['WorkingPartyPrisoner']['prisoner_id']))\r\n {\r\n $isCapacity = $this->checkWorkingPartyCapacity(count($this->data['WorkingPartyPrisoner']['prisoner_id']), $this->data['WorkingPartyPrisoner']['working_party_id']);\r\n \r\n $this->request->data['WorkingPartyPrisoner']['prisoner_id'] = implode(',',$this->data['WorkingPartyPrisoner']['prisoner_id']);\r\n }\r\n //echo '<pre>'; print_r($this->data['WorkingPartyPrisoner']); exit;\r\n //echo $isCapacity; exit;\r\n if($isCapacity == 1)\r\n {\r\n $db = ConnectionManager::getDataSource('default');\r\n $db->begin(); \r\n if($this->WorkingPartyPrisoner->save($this->request->data)){\r\n $refId = 0;\r\n $action = 'Edit';\r\n if(isset($this->request->data['WorkingPartyPrisoner']['id']) && (int)$this->request->data['WorkingPartyPrisoner']['id'] != 0)\r\n {\r\n $refId = $this->request->data['WorkingPartyPrisoner']['id'];\r\n $action = 'Edit';\r\n }\r\n //save audit log \r\n if($this->auditLog('WorkingPartyPrisoner', 'working_party_prisoners', $refId, $action, json_encode($this->data)))\r\n {\r\n $db->commit(); \r\n $this->Session->write('message_type','success');\r\n $this->Session->write('message','Saved Successfully !');\r\n $this->redirect(array('action'=>'assignPrionsers'));\r\n }\r\n else \r\n {\r\n $db->rollback();\r\n $this->Session->write('message_type','error');\r\n $this->Session->write('message','saving failed');\r\n $isEdit = 1; \r\n }\r\n }\r\n else{\r\n $db->rollback();\r\n $this->Session->write('message_type','error');\r\n $this->Session->write('message','Saving Failed !'); \r\n $isEdit = 1; \r\n }\r\n }\r\n else \r\n {\r\n $this->Session->write('message_type','error');\r\n $this->Session->write('message','Working party capacity exceeds!'); \r\n $isEdit = 1; \r\n }\r\n //debug($this->data); exit;\r\n // $db = ConnectionManager::getDataSource('default');\r\n // $db->begin(); \r\n // if($this->WorkingPartyPrisoner->save($this->request->data)){\r\n // $refId = 0;\r\n // $action = 'Edit';\r\n // if(isset($this->request->data['WorkingPartyPrisoner']['id']) && (int)$this->request->data['WorkingPartyPrisoner']['id'] != 0)\r\n // {\r\n // $refId = $this->request->data['WorkingPartyPrisoner']['id'];\r\n // $action = 'Edit';\r\n // }\r\n // //save audit log \r\n // if($this->auditLog('WorkingPartyPrisoner', 'working_party_prisoners', $refId, $action, json_encode($this->data)))\r\n // {\r\n // $db->commit(); \r\n // $this->Session->write('message_type','success');\r\n // $this->Session->write('message','Saved Successfully !');\r\n // $this->redirect(array('action'=>'assignPrionsers'));\r\n // }\r\n // else \r\n // {\r\n // $db->rollback();\r\n // $this->Session->write('message_type','error');\r\n // $this->Session->write('message','saving failed');\r\n // $isEdit = 1; \r\n // }\r\n // }\r\n // else{\r\n // $db->rollback();\r\n // $this->Session->write('message_type','error');\r\n // $this->Session->write('message','Saving Failed !'); \r\n // $isEdit = 1; \r\n // }\r\n } \r\n }\r\n\r\n //get prisoner list\r\n /*$WorkingPartyPrisonerApprove=$this->WorkingPartyPrisonerApprove->find('list',array(\r\n 'recursive'=>-1,\r\n 'joins' => array(\r\n array(\r\n 'table' => 'working_party_prisoners',\r\n 'alias' => 'WorkingPartyPrisoner',\r\n 'type' => 'inner',\r\n 'conditions'=> array('WorkingPartyPrisoner.id = WorkingPartyPrisonerApprove.working_party_prisoner_id')\r\n ),\r\n ), \r\n 'conditions'=>array(\r\n 'WorkingPartyPrisoner.is_enable' => 1,\r\n 'WorkingPartyPrisoner.is_trash' => 0,\r\n //'WorkingPartyPrisonerApprove.status'=>'Approved',\r\n 'WorkingPartyPrisonerApprove.is_approve'=>2\r\n ),\r\n 'fields'=>array('WorkingPartyPrisonerApprove.prisoner_id'),\r\n ));*/\r\n\r\n $SearchPrisonerList1 = $this->WorkingPartyPrisoner->find('list', array(\r\n 'recursive' => -1,\r\n 'joins' => array(\r\n array(\r\n 'table' => 'prisoners',\r\n 'alias' => 'Prisoner',\r\n 'type' => 'inner',\r\n 'conditions'=> array('WorkingPartyPrisoner.prisoner_id = Prisoner.id')\r\n ),\r\n ), \r\n 'fields' => array(\r\n //'Prisoner.id',\r\n 'WorkingPartyPrisoner.prisoner_id',\r\n ),\r\n 'conditions' => array(\r\n 'Prisoner.is_enable' => 1,\r\n 'Prisoner.is_trash' => 0,\r\n 'WorkingPartyPrisoner.is_enable' => 1,\r\n 'WorkingPartyPrisoner.is_trash' => 0,\r\n 'Prisoner.prison_id' => $prison_id\r\n ),\r\n 'order' => array(\r\n 'Prisoner.prisoner_no'\r\n ),\r\n 'group' => array('WorkingPartyPrisoner.prisoner_id')\r\n ));\r\n\r\n $condition = array(\r\n 'Prisoner.is_enable' => 1,\r\n 'Prisoner.is_trash' => 0,\r\n 'Prisoner.present_status' => 1,\r\n 'Prisoner.transfer_id' => 0,\r\n //'EarningRatePrisoner.is_trash' => 0,\r\n 'Prisoner.earning_grade_id !=' => 0,\r\n 'Prisoner.earning_rate_id !=' => 0,\r\n 'Prisoner.is_removed_from_earning' => 0,\r\n 'Prisoner.prison_id' => $prison_id\r\n );\r\n\r\n if(isset($SearchPrisonerList1) && !empty($SearchPrisonerList1))\r\n {\r\n // $SearchPrisoners = implode(',',$SearchPrisonerList1);\r\n // $condition += array(\"Prisoner.id not in (\".$SearchPrisoners.\")\");\r\n /*if(isset($WorkingPartyPrisonerApprove) && is_array($WorkingPartyPrisonerApprove) && count($WorkingPartyPrisonerApprove)>0){\r\n $finalConditionArr = array_unique(array_diff(explode(\",\",implode(\",\", $SearchPrisonerList1)),explode(\",\",implode(\",\", $WorkingPartyPrisonerApprove))));\r\n $SearchPrisoners = implode(',',$finalConditionArr);\r\n }else{\r\n $SearchPrisoners = implode(',',$SearchPrisonerList1);\r\n }*/\r\n $SearchPrisoners = implode(',',$SearchPrisonerList1);\r\n\r\n //echo $SearchPrisoners =chop($SearchPrisoners,$SearchPrisoners1);\r\n //$SearchPrisoners = preg_replace($SearchPrisoners1, '', $SearchPrisoners);\r\n $condition += array(\"Prisoner.id not in (\".$SearchPrisoners.\")\");\r\n }\r\n //echo '<pre>'; print_r($SearchPrisonerList1); \r\n $prisonerList = $this->Prisoner->find('list', array(\r\n 'recursive' => -1,\r\n // 'joins' => array(\r\n // array(\r\n // 'table' => 'earning_rate_prisoners',\r\n // 'alias' => 'EarningRatePrisoner',\r\n // 'type' => 'inner',\r\n // 'conditions'=> array('EarningRatePrisoner.prisoner_id = Prisoner.id')\r\n // ),\r\n // ), \r\n 'fields' => array(\r\n 'Prisoner.id',\r\n 'Prisoner.prisoner_no',\r\n ),\r\n 'conditions' => $condition,\r\n 'order' => array(\r\n 'Prisoner.prisoner_no'\r\n ),\r\n ));\r\n\r\n $SearchPrisonerList = $this->WorkingPartyPrisoner->find('list', array(\r\n 'recursive' => -1,\r\n 'joins' => array(\r\n array(\r\n 'table' => 'prisoners',\r\n 'alias' => 'Prisoner',\r\n 'type' => 'inner',\r\n 'conditions'=> array('WorkingPartyPrisoner.prisoner_id = Prisoner.id')\r\n ),\r\n ), \r\n 'fields' => array(\r\n 'Prisoner.id',\r\n 'Prisoner.prisoner_no',\r\n ),\r\n 'conditions' => array(\r\n 'Prisoner.is_enable' => 1,\r\n 'Prisoner.is_trash' => 0,\r\n 'WorkingPartyPrisoner.is_enable' => 1,\r\n 'WorkingPartyPrisoner.is_trash' => 0,\r\n 'Prisoner.prison_id' => $prison_id\r\n ),\r\n 'order' => array(\r\n 'Prisoner.prisoner_no'\r\n ),\r\n ));\r\n \r\n //echo '<pre>'; print_r($prisonerList); exit;\r\n //get working party list\r\n $workingPartyList = $this->WorkingParty->find('list', array(\r\n //'recursive' => -1,\r\n 'fields' => array(\r\n 'WorkingParty.id',\r\n 'WorkingParty.name',\r\n ),\r\n 'conditions' => array(\r\n 'WorkingParty.is_enable' => 1,\r\n 'WorkingParty.is_trash' => 0,\r\n 'WorkingParty.status' => Configure::read('Approved'),\r\n 'WorkingParty.open_status' => 1,\r\n 'WorkingParty.prison_id' => $prison_id\r\n ),\r\n 'order' => array(\r\n 'WorkingParty.name'\r\n ),\r\n ));\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['assignment_date']))\r\n $this->request->data['WorkingPartyPrisoner']['assignment_date']=date('d-m-Y',strtotime($this->request->data['WorkingPartyPrisoner']['assignment_date']));\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['start_date']))\r\n $this->request->data['WorkingPartyPrisoner']['start_date']=date('d-m-Y',strtotime($this->request->data['WorkingPartyPrisoner']['start_date']));\r\n if(!empty($this->request->data['WorkingPartyPrisoner']['end_date']))\r\n $this->request->data['WorkingPartyPrisoner']['end_date']=date('d-m-Y',strtotime($this->request->data['WorkingPartyPrisoner']['end_date']));\r\n \r\n $this->set(array(\r\n 'workingPartyList' => $workingPartyList,\r\n 'prisonerList' => $prisonerList,\r\n 'SearchPrisonerList' => $SearchPrisonerList,\r\n 'isEdit' => $isEdit,\r\n 'default_status' => $default_status,\r\n 'approvalStatusList' => $approvalStatusList,\r\n 'assigned_prisoners' => $assigned_prisoners\r\n ));\r\n }", "title": "" }, { "docid": "ced79aa281fdd602ae4988aa56c34649", "score": "0.5735039", "text": "function _submitMatchResult($vmkey,$eventid,$vtid,$vsets,$vlegs){\r\n\tglobal $event,$dbi,$LS_LEVEL,$usertoken;\r\n\t\r\n\t$editmode=0;\r\n\t$editmode=retAccessThisMatchKey($vmkey);\t\r\n\tif ($LS_LEVEL <2 && $editmode==0) die(\"<h3>No access ...$editmode</h3>\");\r\n\t\r\n\t# // save values into the match-team-assignment table\r\n\t$ret=DB_UpdateMatchTeamResults($vmkey,$eventid,$vtid,$vsets,$vlegs);\r\n\tif ($ret<>2) die(\"<h3>Error saving Match result values...</h3>\");\r\n\t\r\n\t// JUST set STATUS to SUBMITTED\r\n\t$ret=DB_setMatchStatus($vmkey,5);\r\n\tif ($ret<>1) die('<h3>Event: ('.$event['evname'].') Match: '.$vmkey.' Status Update failed ...</h3>');\r\n\t\r\n\tdsolog(1,$usertoken['uname'],'Result '.$vsets[0].':'.$vsets[1].' for Match $vmkey submitted for review');\r\n\t\r\n\t// MESSAGE BUS\r\n\tif ($usertoken['ttypeuser_id']<3){\r\n\t\t$msg=$event['evname'].' Result '.$vsets[0].':'.$vsets[1].' submitted by Account '.$usertoken['uname'].' - please review using the system link below.';\r\n\t\t$url='ls_system.php?func=showmatch&vmkey='.$vmkey.'&eventid='.$eventid;\r\n\t\t$ret=DB_setMessage($usertoken['uname'],1,1,$msg,$url,$event['mgroup_id']);\r\n\t\tif ($ret<>1) die('<h3>Event: ('.$event['evname'].') Match: '.$vmkey.' Request for approval could not be sent.</h3>');\r\n\t}\r\n\t_sendpendingmails();\r\n}", "title": "" }, { "docid": "52e2ba68ca6cd85c770dc716eeb51df8", "score": "0.5724978", "text": "public function getNeeded_approval()\n {\n return $this->needed_approval;\n }", "title": "" }, { "docid": "77dba690f5d34fe302dcc6c5dd94d231", "score": "0.5724078", "text": "public function process_form_submission() {\n global $wpdb, $woocommerce;\n\n if ( isset($_REQUEST['req']) ) {\n $request = $_REQUEST['req'];\n\n if ( $request == 'new_warranty' ) {\n $order_id = isset($_GET['order']) ? intval($_GET['order']) : false;\n $idxs = $_GET['idx'];\n $_POST = array_map('stripslashes_deep', $_POST);\n $request_type = $_POST['warranty_request_type'];\n\n\n\n if ( $order_id && $idxs ) {\n\t if ( ! is_user_logged_in() || ! current_user_can( 'view_order', intval( $order_id ) ) ) {\n\t\t wp_safe_redirect( wc_get_page_permalink( 'myaccount' ) );\n\t }\n\n $warranty_data = array();\n $order = wc_get_order( $order_id );\n $quantities = $_POST['warranty_qty'];\n $items = $order->get_items();\n $errors = array();\n\n if ( 'completed' === WC_Warranty_Compatibility::get_order_prop( $order, 'status' ) ) {\n $products = array();\n foreach ( $idxs as $i => $idx ) {\n $products[] = !empty( $items[ $idx ]['variation_id'] )\n ? $items[ $idx ]['variation_id']\n : $items[ $idx ]['product_id'];\n }\n\n $request_id = warranty_create_request( array(\n 'type' => $request_type,\n 'order_id' => $order_id,\n 'product_id' => $products,\n 'index' => $idxs,\n 'qty' => $quantities\n ) );\n\n\t if ( 'yes' == get_option( 'warranty_show_tracking_field', 'no' ) ) {\n\t\t update_post_meta( $request_id, '_request_tracking_code', 'y' );\n\n\t\t if ( ! empty( $_POST['tracking_provider'] ) ) {\n\t\t\t update_post_meta( $request_id, '_tracking_provider', $_POST['tracking_provider'] );\n\t\t }\n\n\t\t if ( ! empty( $_POST['tracking_code'] ) ) {\n\t\t\t update_post_meta( $request_id, '_tracking_code', $_POST['tracking_code'] );\n\t\t }\n\t }\n\n // save the custom forms\n $result = WooCommerce_Warranty::process_warranty_form( $request_id );\n\n if ( is_wp_error($result) ) {\n wp_delete_post( $request_id, true );\n\n $errors = $result->get_error_messages();\n } else {\n // set the initial status and send the emails\n warranty_update_status( $request_id, 'new' );\n }\n\n if ( empty( $errors ) ) {\n $back = get_permalink( get_option('woocommerce_warranty_page_id') );\n $back = add_query_arg( 'order', $order_id, $back );\n $back = add_query_arg( 'updated', urlencode(__('Request(s) sent', 'wc_warranty')), $back );\n\n wp_redirect( $back );\n exit;\n } else {\n $back = get_permalink( wc_get_page_id('warranty') );\n $back = add_query_arg( array(\n 'order' => $order_id,\n 'request_id' => $request_id,\n 'errors' => urlencode( wp_json_encode( $errors ) )\n ), $back );\n\n if (! empty($idxs) ) {\n foreach ( $idxs as $idx ) {\n $back = add_query_arg( 'idx[]', $idx, $back );\n }\n }\n\n wp_redirect( $back );\n exit;\n }\n } else {\n $request_id = new WP_Error( 'wc_warranty', __('Order does not have a valid warranty', 'wc_warranty') );\n\n $result = $request_id;\n $error = $result->get_error_message( 'wc_warranty' );\n $back = get_permalink( wc_get_page_id('warranty') );\n $back = add_query_arg( array(\n 'order' => $order_id,\n 'error' => urlencode( $error )\n ), $back );\n\n wp_redirect( $back );\n exit;\n }\n }\n } elseif ( $request == 'new_return' ) {\n $_POST = array_map('stripslashes_deep', $_POST);\n\n $return_id = $_POST['return'];\n $order_id = $_POST['order_id'];\n $product_name = $_POST['product_name'];\n $first_name = $_POST['first_name'];\n $last_name = $_POST['last_name'];\n $email = $_POST['email'];\n\n $warranty = array(\n 'post_content' => '',\n 'post_name' => __('Return Request for Order #', 'wc_warranty') . $order_id,\n 'post_status' => 'publish',\n 'post_author' => 1,\n 'post_type' => 'warranty_request'\n );\n $request_id = wp_insert_post( $warranty );\n\n $metas = array(\n 'order_id' => $order_id,\n 'product_id' => 0,\n 'product_name' => $product_name,\n 'answer' => '',\n 'attachment' => '',\n 'code' => warranty_generate_rma_code(),\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email\n );\n\n foreach ( $metas as $key => $value ) {\n add_post_meta( $request_id, '_'.$key, $value, true );\n }\n\n $status = WooCommerce_Warranty::process_warranty_form( $request_id );\n\n warranty_update_status( $request_id, 'new' );\n\n if ( is_wp_error( $status ) ) {\n wp_delete_post( $request_id, true );\n\n foreach ( $status->get_error_messages() as $error ) {\n wc_add_notice( $error, 'error' );\n }\n } else {\n if ( function_exists('wc_add_notice') ) {\n wc_add_notice(__('Return request submitted successfully', 'wc_warranty'));\n } else {\n $woocommerce->add_message(__('Return request submitted successfully', 'wc_warranty'));\n }\n\n wp_redirect( get_permalink($return_id) );\n exit;\n }\n }\n }\n\n if ( isset($_REQUEST['action']) ) {\n if ( $_REQUEST['action'] == 'set_tracking_code' ) {\n $request_id = $_REQUEST['request_id'];\n $code = $_REQUEST['tracking_code'];\n $provider = isset($_REQUEST['tracking_provider']) ? $_REQUEST['tracking_provider'] : '';\n\n update_post_meta( $request_id, '_tracking_code', $code );\n\n if (! empty($provider) ) {\n update_post_meta( $request_id, '_tracking_provider', $provider );\n }\n\n $request = warranty_load($request_id);\n\n $back = get_permalink( get_option('woocommerce_warranty_page_id') );\n $back = add_query_arg( 'order', $request['order_id'], $back );\n $back = add_query_arg( 'updated', urlencode(__('Tracking codes updated', 'wc_warranty')), $back );\n\n wp_redirect( $back );\n exit;\n }\n }\n }", "title": "" }, { "docid": "9c492fbd782bab4027e90a84f033a19f", "score": "0.5715573", "text": "function approve_view() {\r\n\t\t$echo = '<script type=\"text/javascript\">\r\n\t\t\t\t\t function submit_ajax(form_id) {\r\n\r\n\t\t\t\t\t\treturn $.ajax({\r\n\t\t\t\t\t \t \turl: $(\"#\"+form_id).attr(\"action\"),\r\n\t\t\t\t\t \t \ttype: $(\"#\"+form_id).attr(\"method\"),\r\n\t\t\t\t\t \t \tdata: $(\"#\"+form_id).serialize(),\r\n\t\t\t\t\t \t \tsuccess: function(data) {\r\n\t\t\t\t\t \t \t\tvar o = $.parseJSON(data);\r\n\t\t\t\t\t\t\t\tvar last_id = o.last_id;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(o.status == true) {\r\n\t\t\t\t\t\t\t\t\t$(\"#alert_dialog_form\").dialog(\"close\");\r\n\t\t\t\t\t\t\t\t\t\t$.get(base_url+\"processor/plc/validasi/proses?action=view&id=\"+last_id+\"&group_id=\"+o.group_id+\"&modul_id=\"+o.modul_id, function(data) {\r\n\t \t\t\t $(\"div#form_validasi_proses\").html(data);\r\n\t \t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\treload_grid(\"grid_validasi_proses\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t \t \t\r\n\t\t\t\t\t \t })\r\n\t\t\t\t\t }\r\n\t\t\t\t </script>';\r\n\t\t$echo .= '<h1>Approval</h1><br />';\r\n\t\t$echo .= '<form id=\"form_validasi_proses_approve\" action=\"'.base_url().'processor/plc/validasi/proses?action=approve_process\" method=\"post\">';\r\n\t\t$echo .= '<div style=\"vertical-align: top;\">';\r\n\t\t$echo .= 'Remark : \r\n\t\t\t\t<input type=\"hidden\" name=\"ivalidasi_id\" value=\"'.$this->input->get('ivalidasi_id').'\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"iupb_id\" value=\"'.$this->input->get('iupb_id').'\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"group_id\" value=\"'.$this->input->get('group_id').'\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"modul_id\" value=\"'.$this->input->get('modul_id').'\" />\r\n\t\t\t\t<textarea name=\"vRemark\"></textarea>\r\n\t\t<button type=\"button\" onclick=\"submit_ajax(\\'form_validasi_proses_approve\\')\">Approve</button>';\r\n\t\t\t\r\n\t\t$echo .= '</div>';\r\n\t\t$echo .= '</form>';\r\n\t\treturn $echo;\r\n\t}", "title": "" }, { "docid": "fc4ebd48d8371e984d8eab43ba6effda", "score": "0.57030165", "text": "function submit_bitpay_post() {\r\n // \"Please wait, your order is being processed...\" and then immediately\r\n // is redirected to bitpay.\r\n $echo= \"<form method=\\\"post\\\" class=\\\"eshop eshop-confirm\\\" action=\\\"\".$this->autoredirect.\"\\\"><div>\\n\";\r\n\t/*\r\n\t*\r\n\t* Grab the standard data\r\n\t*\r\n\t*/\r\n foreach ($this->fields as $name => $value) {\r\n\t\t\t$pos = strpos($name, 'amount');\r\n\t\t\tif ($pos === false) {\r\n\t\t\t $echo.= \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\" />\\n\";\r\n\t\t\t}else{\r\n\t\t\t\t$echo .= eshopTaxCartFields($name,$value);\r\n \t }\r\n }\r\n \t/*\r\n\t \t* Changes the standard text of the redirect page.\r\n\t\t*/\r\n $refid=uniqid(rand());\r\n $echo .= \"<input type=\\\"hidden\\\" name=\\\"bitpayoption1\\\" value=\\\"$refid\\\" />\\n\";\r\n $echo.='<label for=\"ppsubmit\" class=\"finalize\"><small>'.__('<strong>Note:</strong> Submit to finalize order at bitpay.','eshop').'</small><br />\r\n <input class=\"button submit2\" type=\"submit\" id=\"ppsubmit\" name=\"ppsubmit\" value=\"'.__('Proceed to Checkout &raquo;','eshop').'\" /></label>';\r\n\t $echo.=\"</div></form>\\n\";\r\n \r\n return $echo;\r\n }", "title": "" }, { "docid": "b1dd8e6b88b91e98d4259e4975dc94ed", "score": "0.57012266", "text": "public function callbackSubmit()\n {\n $question = $this->post ?: new Post($this->di->get(\"db\"));\n $postTag = new PostTag($this->di->get(\"db\"));\n $user = $this->di->get(\"authHelper\")->getLoggedInUser();\n $tag = $this->di->get(\"tag\");\n\n $question->userId = $question->userId ?: $user->id;\n $question->type = \"question\";\n $question->title = $this->form->value(\"title\");\n $question->content = $this->form->value(\"content\");\n $question->save();\n\n $postTag->clear($question->id, $this->di->get(\"db\"));\n foreach ($this->form->value(\"tags\") as $tagName) {\n $tag->find(\"tag\", $tagName);\n $postTag->postId = $question->id;\n $postTag->tagId = $tag->id;\n $postTag->save();\n unset($postTag->id);\n }\n\n $this->di->get(\"response\")->redirect(\"questions/{$question->id}\");\n }", "title": "" }, { "docid": "bfe17db59da34aa2c546a2d937acad09", "score": "0.5696447", "text": "public function complete()\n {\n App::loggedOnly();\n\n if (! array_key_exists('id', $_GET) || ! $_GET['id']) {\n App::error('Предоставьте ID');\n } else if (! Database::userHasTaskWithId(App::$userId, $_GET['id'])) {\n App::error('У вас нет такой задачи');\n } else {\n Database::switchTaskDone($_GET['id']);\n App::redirect('/');\n }\n }", "title": "" }, { "docid": "5f5e2fd25f88828253b3a52a4d832ee4", "score": "0.5693698", "text": "public function submit_piutang() {\n\n\t\t// Permission\n\t\t$this->session_lib->check_permission('p_approval_submit');\n\n\t\t$this->db->trans_start();\n\n\t\t$data = array(\n\t\t\t\t\t\t'sale_status'\t\t\t\t=> 2,\n\t\t\t\t\t\t'date_lunas'\t\t\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t\t'nominal_bayar'\t\t\t\t=> floatval($this->input->post('nominal_bayar')),\n\t\t\t\t\t\t'payment_method_id' \t\t=> $this->input->post('payment_method_id'),\n\t\t\t\t\t\t'updated_time'\t\t\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t\t'updated_by' \t\t\t\t=> $this->session->userdata('user_id')\n\t\t\t\t\t);\n\n\t\t$this->db->where('id', $this->input->post('id'));\n\t\t$this->db->update('sale', $data);\n\n\t\t$this->db->query(\"UPDATE sale_record SET detail = JSON_SET(detail, '$.\" . date('Y-m-d H:i:s') . \"', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tJSON_OBJECT('status_menu', 3, 'act', 1, 'user_id', '\" . $this->session->userdata('user_id') . \"'))\n\t\t\t\t\t\t\t\t\t \t\t\tWHERE sale_id = \" . $this->input->post('id'));\n\n\t\tif ($this->db->trans_status() === false) {\n\t\t\t$this->db->trans_rollback();\n\n\t\t\techo 'error';\n\t\t} else {\n\t\t\t$this->db->trans_commit();\n\n\t\t\techo 'success';\n\t\t}\n\t}", "title": "" }, { "docid": "e9a2280bd110c80cc7cda7802d2f6717", "score": "0.56931216", "text": "public function change_approval_status(){\n\t\tif ($this->checkLogin('CA') == ''){\n\t\t\tredirect('deals_crm');\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$user_id = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'no':'yes';\n\t\t\t$newdata = array('approved' => $status);\n\t\t\t$condition = array('id' => $user_id);\n\t\t\t$this->seller_model->update_details(USERS,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Renter Approval Changed Successfully');\n\t\t\tredirect('crmadmin/seller/display_seller_list');\n\t\t}\n\t}", "title": "" }, { "docid": "a42c6e08a1a42960f357a0c57cb68b23", "score": "0.5688091", "text": "protected function onSubmit()\n {\n //$status->parentId = $this->parentId;\n $this->contentType->deadline = (new Date())->fromGermanFormat($this->datum->getValue());\n $this->contentType->saveType();\n\n }", "title": "" }, { "docid": "5362267652361029dc9f8eb332bbfb14", "score": "0.56866634", "text": "public function submit(): WcAjaxCartResponse;", "title": "" }, { "docid": "d5730a713ee9d0b1baf3c17746bb4c6e", "score": "0.56834644", "text": "public function PostProcess(){\n\t\tif(isset($_POST['method'])){\n\t\t\t$this->PrcessPostedData();\n\t\t}\n\t\telse {\n\t\t\techo 'You did not submit all the details, please try again.';\n\t\t}\n\t}", "title": "" }, { "docid": "8649f6ed1886269524000a7dccdb2bb1", "score": "0.5680514", "text": "function execute() {\n\t\t$validator = new Validator();\n\t\t$result = $validator->required(self::NAME_KEY, \"a name\")\n\t\t\t->requiredEmail(self::EMAIL_KEY, \"an email address\")\n\t\t\t->passwordWithConfirm(self::PWD_KEY, \"a password\")\n\t\t\t->run();\n\t\t\n\t\tif ($result->isValid()) {\n\t\t\t$token = $this->repository->add(\n\t\t\t\t$_POST[self::NAME_KEY], $_POST[self::EMAIL_KEY], \n\t\t\t\t$_POST[self::PWD_KEY]);\n\t\t\t\n\t\t\t$this->emailService->sendMemberConfirm($_POST[self::EMAIL_KEY], $token);\n\t\t\t$this->phpHelpers->redirect('registerSuccess.php');\n\t\t}\n\t\telse {\n\t\t\t$this->messenger->addMessages($result->messages());\n\t\t\t$urlParams = $this->buildParams();\n\t\t\t$this->phpHelpers->redirect('register.php?' . http_build_query($urlParams));\n\t\t}\n\t}", "title": "" }, { "docid": "7ebbf028e572263048f3e13fcfd13636", "score": "0.56722945", "text": "public function submit_post()\n\t{\n\n\t$tokenData = $this->authorization_token->generateToken($token_data);\n\t$final = array();\n\t$final['token'] = $tokenData;\n\t$final['status'] = 'ok';\n\n\t$data=array(\n\t\t\n\t\t'email'=> $this->input->post('email'),\n\t\t'usertype' => $this->input->post('usertype'),\n\n\t);\n\t$this->Registration_model->insertdata($data);\n\t\n\t\n\t $this->response($final);\n\t \t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t/*\n\t\t\t\t\t\t\t$token = array(\n \"iat\" => $issued_at,\n \"exp\" => $expiration_time,\n \"iss\" => $issuer,\n \"data\" => array(\n \"id\" => $user->id,\n \"firstname\" => $user->firstname,\n \"lastname\" => $user->lastname,\n \"email\" => $user->email\n )\n );\n\t\t*/\n\t\t/*\n\t\t\t$token_data['user_id'] = 121;\n\t\t$token_data['fullname'] = 'code'; \n\t\t$token_data['email'] = 'code@gmail.com';\n\n\t\t$tokenData = $this->authorization_token->generateToken($token_data);\n\n\t\t$final = array();\n\t\t$final['token'] = $tokenData;\n\t\t$final['status'] = 'ok';\n \n\t\t$this->response($final);\n\t\t*/\n\t\t\t\t\n\t}", "title": "" }, { "docid": "b01dd44f204fa860298b324df69f6ca1", "score": "0.56617934", "text": "public function approvalUnitAction()\n {\n $user = $this->session->user;\n $id_kecelakaan = $this->input->post('id_kecelakaan');\n\n try {\n // update table\n $this->M_car->approvalUnitCar($id_kecelakaan, CAR_STATUS::VERIFIED, $user);\n\n $this->session->set_flashdata('success', \"Sukses mengapprove CAR\");\n } catch (Exception $e) {\n $this->session->set_flashdata('error', \"Terjadi kesalahan saat mengapprove, silahkan coba kembali atau menghubungi seksi ICT - HRD\");\n }\n\n return redirect($_SERVER['HTTP_REFERER']);\n }", "title": "" }, { "docid": "644446e73cc08a7d89bc3e037f1c40a4", "score": "0.56573564", "text": "function approveThisRequest($supplyId, $username, $addedOn, $appComment)\n{\n require('../core/db.php');\n $srStatus = 'Approved, Awaiting Dispatch';\n $sql = \"UPDATE supplies SET \n sr_status = '$srStatus',\n sr_approved = 'YES',\n approved_by = '$username',\n approved_on = '$addedOn',\n approved_comment = '$appComment'\n WHERE id = '$supplyId' \";\n if ($con->query($sql) === true) {\n echo \"sm\";\n // Update Branch Request\n $sql = \"UPDATE supplybranches SET \n srb_status = '$srStatus'\n WHERE supply_id = '$supplyId' \";\n if ($con->query($sql) === true) {\n echo \"\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $con->error;\n }\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $con->error;\n }\n $con->close();\n}", "title": "" }, { "docid": "1393abbcd9a05a245534ec52c6667537", "score": "0.5655413", "text": "function process_cancel(){\r\r\n\t\t// redirect to cancel page\r\r\n\t\tmgm_redirect(add_query_arg(array('status'=>'cancel'), $this->_get_thankyou_url()));\r\r\n\t}", "title": "" }, { "docid": "1393abbcd9a05a245534ec52c6667537", "score": "0.5655413", "text": "function process_cancel(){\r\r\n\t\t// redirect to cancel page\r\r\n\t\tmgm_redirect(add_query_arg(array('status'=>'cancel'), $this->_get_thankyou_url()));\r\r\n\t}", "title": "" }, { "docid": "9d40dc7dc3540bc5c73cac53ea0a2d8b", "score": "0.5654568", "text": "protected function onSubmit()\n {\n\n $process = new ToDoProcess();\n $process->parentId = $this->parentId;\n $process->toDo = $this->todo->getValue();\n $process->saveType();\n\n if ($this->appendParameter) {\n $this->redirectSite->addParameter(new WorkflowParameter($process->getDataId()));\n }\n\n }", "title": "" }, { "docid": "f95cb7e47423da540a6790ec4d542e01", "score": "0.5652714", "text": "function apply()\n\t{\n\t\t// Check for request forgeries.\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\t$post\t= JRequest::get('post');\n\t\tif (!($user->authorise('core.create', 'com_gmapfp') and empty($post['id'])) and !($user->authorise('core.edit', 'com_gmapfp') and !empty($post['id'])))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_CREATE_RECORD_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('personnalisation');\n\t\t\t$returnid=$model->store($post);\n\t\t\tif ($returnid>0) {\n\t\t\t\t$msg = JText::_( 'GMAPFP_SAVED' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMAPFP_SAVED_ERROR' );\n\t\t\t}\n\t\t}\n\n\t\t$link = 'index.php?option=com_gmapfp&controller=personnalisation&task=edit';\n\t\t// Check the table in so it can be edited.... we are done with it anyway\n\t\t$this->setRedirect($link, $msg);\n\t}", "title": "" }, { "docid": "02ebe892c6c6829756904425059793ea", "score": "0.56509316", "text": "public function submittogcm($id){\n\t\tif(Request::ajax()){\n\t\t\tif(Auth::user()->hasRole(\"PMOG PLANNER\")){\n\t\t\t\t$arr = DB::transaction(function() use ($id) {\n\t\t\t\t\t$activity = Activity::find($id);\n\t\t\t\t\t\n\t\t\t\t\tif((empty($activity)) || (!ActivityPlanner::myActivity($activity->id)) ){\n\t\t\t\t\t\t$arr['success'] = 0;\n\t\t\t\t\t\t$arr['error'] = $validation['message'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$status = (int) Input::get('submitstatus');\n\t\t\t\t\t\t$activity_status = 2;\n\t\t\t\t\t\t$pro_recall = 0;\n\t\t\t\t\t\t$pmog_recall = 0;\n\n\n\t\t\t\t\t\tif($status == 1){\n\t\t\t\t\t\t\t// check valdiation\n\t\t\t\t\t\t\t$required_rules = array('budget','approver','cycle','activity','category','brand','objective','background','customer', 'submission_deadline');\n\n\t\t\t\t\t\t\tif($activity->activitytype->with_scheme){\n\t\t\t\t\t\t\t\tarray_push($required_rules, 'scheme');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($activity->activitytype->with_sob){\n\t\t\t\t\t\t\t\tarray_push($required_rules, 'sob_start_week');\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\tif($activity->activitytype->with_msource){\n\t\t\t\t\t\t\t\tarray_push($required_rules, 'material_source');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$validation = Activity::validForDownload($activity,$required_rules);\n\t\t\t\t\t\t\tif($validation['status'] == 0){\n\t\t\t\t\t\t\t\t$arr['success'] = 0;\n\t\t\t\t\t\t\t\t$arr['error'] = $validation['message'];\n\t\t\t\t\t\t\t\treturn $arr;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t// check if there is a gcom\n\t\t\t\t\t\t\t\t$pmog_recall = 1;\n\t\t\t\t\t\t\t\t$gcom_approvers = ActivityApprover::getApproverByRole($activity->id,'GCOM APPROVER');\n\t\t\t\t\t\t\t\tif(count($gcom_approvers) > 0){\n\t\t\t\t\t\t\t\t\t$comment_status = \"SUBMITTED TO GCOM\";\n\t\t\t\t\t\t\t\t\t$activity_status = 5;\n\t\t\t\t\t\t\t\t\tforeach ($gcom_approvers as $gcom_approver) {\n\t\t\t\t\t\t\t\t\t\t$approver = ActivityApprover::find($gcom_approver->id);\n\t\t\t\t\t\t\t\t\t\t$approver->show = 1;\n\t\t\t\t\t\t\t\t\t\t$approver->for_approval = 1;\n\t\t\t\t\t\t\t\t\t\t$approver->update();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$cdops_approvers = ActivityApprover::getApproverByRole($activity->id,'CD OPS APPROVER');\n\t\t\t\t\t\t\t\t\tif(count($cdops_approvers) > 0){\n\t\t\t\t\t\t\t\t\t\t$comment_status = \"SUBMITTED TO CD OPS\";\n\t\t\t\t\t\t\t\t\t\t$activity_status = 6;\n\t\t\t\t\t\t\t\t\t\tforeach ($cdops_approvers as $cdops_approver) {\n\t\t\t\t\t\t\t\t\t\t\t$approver = ActivityApprover::find($cdops_approver->id);\n\t\t\t\t\t\t\t\t\t\t\t$approver->show = 1;\n\t\t\t\t\t\t\t\t\t\t\t$approver->for_approval = 1;\n\t\t\t\t\t\t\t\t\t\t\t$approver->update();\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$cmd_approvers = ActivityApprover::getApproverByRole($activity->id,'CMD DIRECTOR');\n\t\t\t\t\t\t\t\t\t\tif(count($cmd_approvers) > 0){\n\t\t\t\t\t\t\t\t\t\t\t$comment_status = \"SUBMITTED TO CMD\";\n\t\t\t\t\t\t\t\t\t\t\t$activity_status = 7;\n\t\t\t\t\t\t\t\t\t\t\tforeach ($cmd_approvers as $cmd_approver) {\n\t\t\t\t\t\t\t\t\t\t\t\t$approver = ActivityApprover::find($cmd_approver->id);\n\t\t\t\t\t\t\t\t\t\t\t\t$approver->show = 1;\n\t\t\t\t\t\t\t\t\t\t\t\t$approver->for_approval = 1;\n\t\t\t\t\t\t\t\t\t\t\t\t$approver->update();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t$comment_status = \"APPROVED FOR FIELD\";\n\t\t\t\t\t\t\t\t\t\t\t$activity_status = 8;\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}\n\t\t\t\t\t\t\t\t$class = \"text-success\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}elseif($status == 3){\n\t\t\t\t\t\t\t$comment_status = \"RECALLED ACTIVITY\";\n\t\t\t\t\t\t\t$class = \"text-warning\";\n\t\t\t\t\t\t\t$pro_recall = 1;\n\t\t\t\t\t\t\t$pmog_recall = 0;\n\t\t\t\t\t\t\t$activity_status = 4;\n\t\t\t\t\t\t\tActivityApprover::resetAll($activity->id);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$comment_status = \"DENIED ACTIVITY\";\n\t\t\t\t\t\t\t$class = \"text-danger\";\n\t\t\t\t\t\t\tActivityApprover::resetAll($activity->id);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$activity->status_id = $activity_status;\n\t\t\t\t\t\t$activity->pro_recall = $pro_recall;\n\t\t\t\t\t\t$activity->pmog_recall = $pmog_recall;\n\t\t\t\t\t\t$activity->update();\n\n\t\t\t\t\t\t$comment = new ActivityComment;\n\t\t\t\t\t\t$comment->created_by = Auth::id();\n\t\t\t\t\t\t$comment->activity_id = $id;\n\t\t\t\t\t\t$comment->comment = Input::get('submitremarks');\n\t\t\t\t\t\t$comment->comment_status = $comment_status;\n\t\t\t\t\t\t$comment->class = $class;\n\t\t\t\t\t\t$comment->save();\n\n\t\t\t\t\t\t$arr['success'] = 1;\n\t\t\t\t\t\tSession::flash('class', 'alert-success');\n\t\t\t\t\t\tSession::flash('message', 'Activity successfully updated.'); \n\t\t\t\t\t}\n\t\t\t\t\treturn $arr;\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\treturn json_encode($arr);\n\t\t}\n\t}", "title": "" }, { "docid": "3a02fdaf71fb1b9b4ecf69e8da7da46d", "score": "0.56420344", "text": "public function requiresApproval(): bool;", "title": "" }, { "docid": "9c51761849b5ba63c2d312d7b66c03c6", "score": "0.56366754", "text": "public function confirm() \n {\n $formData = $_POST ? $_POST : null;\n $parsedData = '';\n $clientId = '';\n\n // parse necessary data into array\n if ($formData) {\n $parsedData = $this->parseFormData($formData);\n }\n \n //check if client exists\n if ($parsedData) {\n if ($parsedData['agreement_checked'] == 1 && $parsedData['kreddy_form']['client_embg'] != '') {\n $userCheck = $this->findKreddyUserByDocNum($parsedData['kreddy_form']['doc_type'], $parsedData['kreddy_form']['doc_number']);\n }\n }\n \n //create client if it doesnt exist\n if (!$userCheck) {\n $clientId = $this->createKreddyClient($parsedData['client'], $parsedData['kreddy_form']);\n } else {\n $clientId = $userCheck['id'];\n }\n\n $app = [];\n //create application\n if ($clientId) {\n $app = $this->createLoanApplication($clientId, $parsedData['client']['ip_address'], $parsedData['loan_info']);\n }\n\n //failed order status code\n $orderStatusCode = 10;\n\n //loan application is good\n if (isset($app['code']) && $app['code'] == 'OK') {\n $orderStatusCode = 1;\n \n //send email here\n }\n\n\t\tif ($this->session->data['payment_method']['code'] == 'kreddy_payment_gateway') {\n\t\t\t$this->load->model('checkout/order');\n\n\t\t\t$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $orderStatusCode);\n\t\t}\n }", "title": "" }, { "docid": "474715c003f5cccb3419fa2e2f164d9a", "score": "0.5629445", "text": "function process_cancel(){\r\n\t\t// redirect to cancel page\r\n\t\tmgm_redirect(add_query_arg(array('status'=>'cancel'), $this->_get_thankyou_url()));\r\n\t}", "title": "" }, { "docid": "a2603b4b33d0a9a1a0b1bc0f78f57dbf", "score": "0.56291354", "text": "public function complete()\n {\n // [U_14] render\n\n parent::_assign_job_info();\n\n if($this->is_login()){\n parent::_assign_common_params();\n $user_login = true;\n }else{\n $user_login = false;\n }\n\n $bc_param = array('inquiry_complete_current');\n $this->_bread_crumb['base_url'] = base_url();\n $this->_bread_crumb['content'] = get_static_breadcrumb($bc_param);\n\n $this->smarty->assign('breadcrumb' , $this->_bread_crumb);\n $this->smarty->assign('login' , $user_login);\n $this->smarty->display($this->template_path() . \"/client/inquire/complete.html\");\n }", "title": "" } ]
8afa62dbc9e48dd9e59a567f12512505
This function is used to check Model object that is ready valid before save into database, developer need to override this fuction before use it
[ { "docid": "b58bc1fb4814bfc0f1bc8f18f1d04273", "score": "0.0", "text": "public function isValid()\r\n {\r\n return false;\r\n }", "title": "" } ]
[ { "docid": "9019d40ca3f08a7fb0e7581fe0523eff", "score": "0.6879283", "text": "protected function _beforeSave()\n {\n Mage::helper('ampersand_system')->loadIfExists($this, $this->_modelName, $this->_loadField);\n Mage::helper('ampersand_system')->validate($this, $this->_requiredFields);\n\n return parent::_beforeSave();\n }", "title": "" }, { "docid": "bdf8abd2f7cfbb0b2230c7af904f5361", "score": "0.68251026", "text": "public function validateBeforeSave()\n {\n return true;\n }", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.67915034", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.67915034", "text": "public function valid() {}", "title": "" }, { "docid": "f18e2443d186c7505cf891d7b7dff67d", "score": "0.67160004", "text": "public function is_valid();", "title": "" }, { "docid": "ba082cec63e0f24f43a6a546ed3048f9", "score": "0.6655112", "text": "public function afterValidate()\n {\n /* @var $model BaseActiveRecord */\n $model = $this->owner;\n if (!empty($this->_savedHasOneModels) && $model->hasErrors()) {\n $this->_rollbackSavedHasOneModels();\n }\n }", "title": "" }, { "docid": "fd48b77f0404fa6be1a857af9270b400", "score": "0.66179657", "text": "public function valid(){}", "title": "" }, { "docid": "fece6af3b37ab1102b21c0a97a29499e", "score": "0.6552275", "text": "public function valid() {\n }", "title": "" }, { "docid": "07f869260ba470722e523c2726179a05", "score": "0.65036935", "text": "public function validate(){\r\n\r\n if ($this->actionType == 'CREATE'){\r\n\r\n }else if ($this->actionType == 'UPDATE'){\r\n\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "13242a47761b385cd84dd71c421d9af7", "score": "0.6499643", "text": "protected function _preSave() {\n $this->_checkForExisting();\n }", "title": "" }, { "docid": "3d3ff5d42750feb7147f3dfe81cfe5cc", "score": "0.64620864", "text": "public function validate(){\r\n \r\n if ($this->actionType == 'CREATE'){\r\n \r\n }else if ($this->actionType == 'UPDATE'){\r\n \r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "c9ab9a58c9fbc8647a7887e84b144657", "score": "0.6459768", "text": "protected function validateModel(){\n if(is_nan($this->comment->getCommentId())){\n throw new Exception(\"Comment id must not be empty\");\n }\n\n }", "title": "" }, { "docid": "d51d24a1b4b806ae7a82ba68d8c9d501", "score": "0.6448127", "text": "protected function _validate()\n {\n }", "title": "" }, { "docid": "0445fe511d17728a7d36c0b61126327d", "score": "0.6445846", "text": "abstract protected function modelNotSetError();", "title": "" }, { "docid": "1aa53de6aac92e5f022ea7a3197255cb", "score": "0.6445437", "text": "public function valid()\n {\n }", "title": "" }, { "docid": "1aa53de6aac92e5f022ea7a3197255cb", "score": "0.6445437", "text": "public function valid()\n {\n }", "title": "" }, { "docid": "cd802df0e0d3bd4a848148f17807902b", "score": "0.6436006", "text": "public function is_valid() {\n return true;\n }", "title": "" }, { "docid": "7885aae19d836886f747d531937332cb", "score": "0.63903195", "text": "protected function validateData()\n {\n return $this->getProject() && $this->getModel() && $this->getModel()->project_id === $this->getProject()->id;\n }", "title": "" }, { "docid": "b482f34eb843181a6c1bb2aad5a79125", "score": "0.63647306", "text": "public function whenValid()\n {\n }", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6364592", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6364592", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6364592", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6364592", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6364592", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6364592", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6364592", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6364592", "text": "public function valid();", "title": "" }, { "docid": "0b3ae4f6598f80e97d1f6a6c22bee32a", "score": "0.630081", "text": "public function valid() {\r\n\t\treturn $this->tmp_dal->valid();\r\n\t}", "title": "" }, { "docid": "5357d6e97eafff52d98839d89aa1c622", "score": "0.6292846", "text": "function valid() {\n\t\treturn !$this->dry();\n\t}", "title": "" }, { "docid": "807ff2fba8fe43328e921f65b3a86af5", "score": "0.62884504", "text": "public function beforeSave(){\n \treturn $this->_canSave();\n }", "title": "" }, { "docid": "613a3cddcdf7794427a3132ac13e1e3e", "score": "0.628792", "text": "protected function _always_validate()\n\t{\n\t}", "title": "" }, { "docid": "ebf376117b18d209d924ff034ff125a8", "score": "0.62565273", "text": "protected function validate() {}", "title": "" }, { "docid": "ebf376117b18d209d924ff034ff125a8", "score": "0.62565273", "text": "protected function validate() {}", "title": "" }, { "docid": "f6745051ea45fc466e08579678293faa", "score": "0.6226089", "text": "public function is_valid_save() {\n\t\tif ( ! $this->verified_nonce_in_request() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$params = func_get_args();\n\t\treturn $this->is_valid_attach_for_object( $params[0] );\n\t}", "title": "" }, { "docid": "17a7d6e3195a722efab9265b3f126101", "score": "0.6222115", "text": "protected function berforeValidate(){\n if($this->isNewRecord){\n $this->create_time = $this->update_time= new CDbExpression('NOW()');\n $this->create_user_id = $this->update_user_id = Yii::app()->user->id;\n }else{\n $this->update_time = new CDbExpression('NOW()');\n $this->update_user_id = Yii::app()->user->id;\n }\n return parent::berforeValidate();\n }", "title": "" }, { "docid": "8e2cb9e734de2d8e45c4e82b71d48328", "score": "0.6219731", "text": "protected function validate()\n {\n /* do nada. */\n }", "title": "" }, { "docid": "92685bb69135ecac19d5a5485a059f1a", "score": "0.6218161", "text": "public function valid() {\n\t\treturn $this->id === 0;\n\t}", "title": "" }, { "docid": "0d7ebb5b2b64aa538b1affc03052ffe9", "score": "0.62089765", "text": "public function valid()\n\t{\n\t\treturn $this->data->valid();\n\t}", "title": "" }, { "docid": "a8fb7163a23b1f3f3ba91af5577abc95", "score": "0.61931705", "text": "public abstract function valid();", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.6188822", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "3bed1448737342fa7aad7329f4c4ed85", "score": "0.6187306", "text": "public function valid()\n {\n return $this->position < $this->models->size();\n }", "title": "" }, { "docid": "70c368aed430133de4cae06b5862d73b", "score": "0.6177368", "text": "public function saveCheck() {\n if (!$this->save()) {\n throw new RevisionModuleException('400',$this->getValidationErrors());\n }\n }", "title": "" }, { "docid": "70693a006223660b7ca343dcd2071edc", "score": "0.6155128", "text": "public function valid(){\n\t\t\treturn !is_null($this->association());\n\t\t}", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.6151008", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.6151008", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.6151008", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.6151008", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.6151008", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.6151008", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.6151008", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "e00ca0f2af55cd60b5c945f87fe03454", "score": "0.61498237", "text": "abstract public function valid();", "title": "" }, { "docid": "bdbf3d32102ef5b7bd8109abd744c24b", "score": "0.61348504", "text": "protected function validate() {\n \n \n }", "title": "" }, { "docid": "339afa40ea476eedb0d8df7de6af5561", "score": "0.6128409", "text": "protected function preSave(){}", "title": "" }, { "docid": "7e83f0480e1589052e79f8057e34028e", "score": "0.61261356", "text": "public function validate(){\n if ($this->actionType == 'CREATE'){\n // TODO : Write your validation for CREATE here\n }else if ($this->actionType == 'UPDATE'){\n // TODO : Write your validation for UPDATE here\n }\n \n return true;\n }", "title": "" }, { "docid": "9ff1cea2fa3f99af930d70782f4d9626", "score": "0.61248446", "text": "protected function _beforeSave() {}", "title": "" }, { "docid": "17ce4968ab35f7889b1adafed712e7f2", "score": "0.61225617", "text": "protected function prepareForValidation()\n {\n \n }", "title": "" }, { "docid": "d74c7387de918033a2115fce45188307", "score": "0.6119784", "text": "public function validation() { \n\n return true; \n\n }", "title": "" }, { "docid": "67d0f304f7779b00ed603ff5c4435ead", "score": "0.611167", "text": "protected function _validateBeforeSave() {\n\t\tif (! $this->isValid ()) {\n\t\t\tMage::throwException ( $this->getValidationErrors ( true, true ) );\n\t\t}\n\t\tif (! $this->getInternalReferenceId ()) {\n\t\t\tMage::throwException ( Mage::helper ( 'payment' )->__ ( 'An internal reference ID is required to save the payment profile.' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "2d8d864fd5d160dc4116ef3715006713", "score": "0.6111233", "text": "function check() {\n\t\t$this->project_active = intval( $this->project_active );\n\t\t$this->project_private = intval( $this->project_private );\n\n\t\treturn NULL; // object is ok\n\t}", "title": "" }, { "docid": "443ce9a79e246bcd4070889fbe30a4a7", "score": "0.6110106", "text": "public function isValid() {\n // check for valid JSON\n if ( parent::isValid() ) {\n // load MOOC entity if not loaded yet\n if ( !isset( $this->entity ) ) {\n $this->entity = $this->loadItem();\n }\n return ( $this->entity != null );\n }\n return false;\n }", "title": "" }, { "docid": "6be603567cc0c99af9dccde710ed5df2", "score": "0.61016405", "text": "public function validate(){\r\n \r\n if ($this->actionType == 'CREATE'){\r\n // TODO : Write your validation for CREATE here\r\n \r\n }else if ($this->actionType == 'UPDATE'){\r\n // TODO : Write your validation for UPDATE here\r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "60db59deb5b93c9e60473ed26eda07d5", "score": "0.60793775", "text": "protected function validate() { \n return true;\n }", "title": "" }, { "docid": "f0ae22352424e705bef521de863f96d0", "score": "0.6072944", "text": "public function isValidated():bool{\n return parent::isValidated();\n }", "title": "" }, { "docid": "b183ade6ec3a9fbb25885ee1ffe3a205", "score": "0.6053032", "text": "function validate ()\n {\n if (!$this->_objValidation)\n return true;\n\n Loader::loadClass ('ValidationUtil');\n $res1 = ValidationUtil::validateObjectPlain ($this->_objPath, $this->_objValidation);\n $res2 = $this->validatePostProcess();\n\n return ($res1 && $res2);\n }", "title": "" }, { "docid": "2692023971f46ebc693049c69dfd2662", "score": "0.6048344", "text": "protected function validate()\n {\n return true;\n }", "title": "" }, { "docid": "b8f59e48aadadb6c495410125eb29961", "score": "0.6036319", "text": "public function validate()\n\t{\n return true; \n\t}", "title": "" }, { "docid": "895a85abc5a09c7e4ea9c3e78e6d79b8", "score": "0.60283834", "text": "function beforeSave(&$model)\r\n\t\t{\r\n\t\t\t$schema = $model->schema();\r\n\t\t\t\r\n\t\t\tforeach ($model->data[$model->alias] as $fieldName => $fieldValue)\r\n\t\t\t{\r\n\t\t\t\t// We need the isset because FU05 schema does not contain id field\r\n\t\t\t\tif (isset($schema[$fieldName]['type']) && $schema[$fieldName]['type'] == 'date')\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($fieldValue == '')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$model->data[$model->alias][$fieldName] = null;\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$model->data[$model->alias][$fieldName] = databaseDate($fieldValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "8eebf425ce52b4bb228e70caffb79698", "score": "0.0", "text": "public function authorize()\n {\n return true;\n }", "title": "" } ]
[ { "docid": "61b6850924368e14814b635e85110c7f", "score": "0.8342963", "text": "public function authorize()\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "61b6850924368e14814b635e85110c7f", "score": "0.8342963", "text": "public function authorize()\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "f276ece97c00c47c50fdc4f0e62769d0", "score": "0.8332328", "text": "public function authorize(): bool\n {\n return $this->getUser() !== null;\n }", "title": "" }, { "docid": "972861a0767f1651ba9390269d0bed4c", "score": "0.82964295", "text": "public function authorize()\n {\n return $this->user() ? true : false;\n }", "title": "" }, { "docid": "c81b0d3d0e9a2e4326824c7234cebc66", "score": "0.82651734", "text": "function isAuthorized()\n {\n\n $controller = $this->request->controller;\n $action = $this->request->action;\n \n return $this->checkAccess($controller, $action);\n \n }", "title": "" }, { "docid": "6376534de447322dc42273a919390fb2", "score": "0.826116", "text": "public function authorize()\n {\n if ($this->isUserAdmin()) {\n return true;\n }\n\n return $this->isUserOwner($this->resourcesData);\n }", "title": "" }, { "docid": "1d9d94d60f24f4ee69318fc43d74c4c6", "score": "0.81400335", "text": "public function authorize()\n {\n return (bool) $this->user();\n }", "title": "" }, { "docid": "ca32f713c379fc0a7b4a09b4800cb61f", "score": "0.8121342", "text": "public function authorize()\n {\n return auth()->check() && $this->route('user_id') == auth()->user()->id;\n }", "title": "" }, { "docid": "d6ac25c880181d2c548e111a3ac86671", "score": "0.8103934", "text": "public function authorize()\n {\n return (bool)$this->user();\n }", "title": "" }, { "docid": "05590fc9a3eaa9395069921dc992b629", "score": "0.8099088", "text": "public function authorize()\n {\n //Todo check is admin\n return $this->user() != null;\n }", "title": "" }, { "docid": "575d626a3b099bc592cf09b78f1b57ae", "score": "0.80795056", "text": "public function isAuth()\n {\n return $this->userObj->IsAuthorized();\n }", "title": "" }, { "docid": "2e33f59696016a92dfe5d1d195f98b1e", "score": "0.8077799", "text": "public function authorize()\n {\n $accessor = $this->user();\n $user = $this->route('user');\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users-alerts') ||\n $accessor->id === $user->id;\n }", "title": "" }, { "docid": "37f7f199e7353737d1005bcaa49ae905", "score": "0.80763596", "text": "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || (\n strpos($this->url(), 'keys/') === false &&\n $accessor->hasKey('get-users')\n );\n }", "title": "" }, { "docid": "28fa91a0b628ffc0a5cb95f7d5fa9d14", "score": "0.8066222", "text": "protected function authorize()\n {\n $request = $this->getRequest();\n try {\n if ($request->getHeaders()->has('X-AUTH-TOKEN')) {\n $encodedToken = $request->getHeader('X-AUTH-TOKEN')->getFieldValue();\n $key = \"secret\";\n $token = \\JWT::decode($encodedToken, $key);\n $uid = $token->uid;\n if ($uid == self::AUTHORIZED_USER) { // TODO: Hard coded for now, but should be used to look-up user\n return true;\n }\n }\n } catch (\\Exception $e) {\n }\n return false;\n }", "title": "" }, { "docid": "9848174a7f01e602f5b2cca10182994a", "score": "0.8060135", "text": "public function authorize()\n {\n return ($this->ownableUser())? true: false;\n }", "title": "" }, { "docid": "09254afa403915a120b0d408a5b2fbcd", "score": "0.804474", "text": "public function authorize()\n {\n if(!auth()->check() || !$this->user_id) return false;\n\n return true;\n }", "title": "" }, { "docid": "3d95a428c1cdd0297797015f69cd4f5a", "score": "0.79473895", "text": "public function authorize()\n {\n if ($this->user()->can('user-edit')) {\n return true;\n } elseif ($this->user()->can('user-self-edit')) {\n return $this->user()->id === User::find($this->route('user'))->id;\n } else return false;\n }", "title": "" }, { "docid": "607e2aa99c9a40e92cce23b8d35a8f9e", "score": "0.79349846", "text": "public function authorize()\n {\n return !!request()->user();\n }", "title": "" }, { "docid": "f25f6e02a3368b29327adf7c8b177885", "score": "0.7934032", "text": "public function authorize()\n {\n return $this->authorizable() && $this->recipient->user_id === $this->user()->id;\n }", "title": "" }, { "docid": "68cbbf2a944e943c11bb4d48842aef74", "score": "0.79302984", "text": "public function authorize()\r\n {\r\n if (! isset(Auth::user()->id)) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "30f42faca9c3470b19994d64c14c4c63", "score": "0.79233885", "text": "public function authorize()\n {\n return (int)$this->input('user_id') === Auth::user()->id;\n }", "title": "" }, { "docid": "8f5796b47b92d878d279cc7ad0c1b777", "score": "0.7914554", "text": "public function authorize()\n {\n return $this->cashFlow->user_id === auth()->id();\n }", "title": "" }, { "docid": "35329a1c71e8cc8e016e8b5cf27c6b0d", "score": "0.7910345", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "57a82e0219fd61ee5fc8c70b2bab3f6b", "score": "0.78987485", "text": "public function authorize()\n {\n $id = $this->route('user');\n\n return User::where('id', $id)->exists();\n }", "title": "" }, { "docid": "c83975f213bfce526e079a1f2d254850", "score": "0.7886052", "text": "public function authorize(): bool\n {\n return $this->user()->can('user.read', $this->route()->parameter('server'));\n }", "title": "" }, { "docid": "e38720f6cb5bf28a801028cc3bbe85ae", "score": "0.7871111", "text": "public function authorize()\n {\n if ( $this->getMethod() === 'POST' && Sentinel::hasAccess( 'listprofile.add' ) ) {\n return true;\n } else if ( $this->getMethod() === 'PUT' && Sentinel::hasAccess( 'listprofile.edit' ) ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "20970467e823cfff4065d1dc431760b1", "score": "0.7847633", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "525cb396f8ffd2d15c44bb7435f630e3", "score": "0.78460395", "text": "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t\t//TODO: must be logged in, but doesnt need an org\n\t}", "title": "" }, { "docid": "1ebc37971dea284c629977ed977a7251", "score": "0.78421044", "text": "public function isAuthorized()\n {\n return boolval($this->getToken());\n }", "title": "" }, { "docid": "340d335aaf485d507323dbdd50bd4d12", "score": "0.7839742", "text": "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "title": "" }, { "docid": "f9745674758397cae802c3c19d4b5663", "score": "0.78009135", "text": "public function isAuthorized() {\n\t\t$currentUser = $this->_refreshUser(true);\n\t\tif (!$currentUser) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$roles = Hash::extract((array) $currentUser, 'Role.{n}.name');\n\t\t$check = \"{$this->params['controller']}::{$this->params['action']}\";\n\t\t$user = $this->_refreshUser();\n\t\treturn in_array($check, $roles);\n\t}", "title": "" }, { "docid": "0c5acd04242b11ada42962c187851765", "score": "0.77802587", "text": "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "title": "" }, { "docid": "ed6efd25e10c164ee912eacbb3b7408f", "score": "0.7779269", "text": "public function authorize()\n {\n return ! $this->container['auth']->check();\n }", "title": "" }, { "docid": "60cab0f6dbeb086261240fd352acb09f", "score": "0.77733076", "text": "public function authorize()\n {\n if ($this->user()->user_type == 'admin') return true;\n return false;\n }", "title": "" }, { "docid": "7f108c712ca0becaf542bec5196e4acb", "score": "0.7770967", "text": "public function isAuthorized()\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "66ddf82416ba034c74a597cd64ac1d3a", "score": "0.7767944", "text": "public function isAuthorized()\n {\n $hasSession = Yii::$app->session->has($this->sessionParam);\n $sessionVal = Yii::$app->session->get($this->sessionParam);\n return ($hasSession && !empty($sessionVal));\n }", "title": "" }, { "docid": "b78960d42c8d923d1a2aaa61725af1e7", "score": "0.7763642", "text": "public function authorize()\n {\n $action = $this->route()->getAction();\n\n $is_edit = Auth::user()->can($action['as'], 'edit');\n $own_edit = Auth::user()->can($action['as'], 'own_edit');\n\n if ($is_edit == 1 || (!empty($own_edit) && ($this->user->created_by == Auth::user()->id))) {\n return true;\n } else {\n abort(403);\n }\n }", "title": "" }, { "docid": "d2aff1e96cd748e725cb68cf14dbfc45", "score": "0.77636045", "text": "public function authorize()\n {\n if (auth()->quest) {\n return false;\n }\n if (!auth()->user()->is_admin) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.7761786", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "155700df53771c7310f4186fc2f2e777", "score": "0.77592695", "text": "public function authorize() {\n\t\t// Check if the user is an admin\n\t\tif (!auth()->user()->is_admin) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f4095d67de1b50bdbc6c577880ab6522", "score": "0.7755321", "text": "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->isCommittee() || \n ($accessor->isEntrant() && $accessor->entry_id == $this->input('entry', null));\n }", "title": "" }, { "docid": "b944c706849f30f8074ab3c052baae9f", "score": "0.7743614", "text": "public function authorize()\n {\n return $this->container['auth']->check() and ! $this->container['auth']->user()->isRegistered() and \n $this->get('_token') or $this->container['session.store']->getOldInput('_token');\n }", "title": "" }, { "docid": "d50c0193c5251a5f83978acf28ceb3d0", "score": "0.7739021", "text": "public function authorize()\n {\n $service = \\App::make('\\App\\Services\\UserService');\n if ($service->getUserById(\\Auth::user()->id)->user_flag == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "b4352ac854d3de57135d1fb8b59e6ac9", "score": "0.77379715", "text": "public function authorize()\n {\n $idFromRoute = $this->route()->parameter('id');\n\n if (\\Auth::id() == $idFromRoute) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "ff8257362abf926bd0668a8e742b32df", "score": "0.77374905", "text": "public function authorize()\n {\n $metadata_id =$this->route('metadata');\n $metadata = Metadata::find($metadata_id);\n\n if (auth()->user()->isAdmin() || auth()->user()->can('user-edit') || $metadata->id == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5b4c01003b40c31053fde7580331e0fc", "score": "0.77371556", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "39b253a44ced92a3cc4ef7d6d3b3d357", "score": "0.7726127", "text": "public function authorize()\n {\n $id = (int) $this->route('livro');\n if($id == 0) {\n return false;\n }\n\n $livro = $this->repository->find($id);\n\n return $livro->author_id == \\Auth::user()->id;\n }", "title": "" }, { "docid": "a400c4ad3b40a246ede87970badd78de", "score": "0.77189285", "text": "public function authorize()\n {\n $user = User::find($this->route('user'));\n if (isset($contact)) {\n if (Auth::id() !== $user->user_id) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "977c162efbb9ce6cf5f45729c4416c11", "score": "0.77181315", "text": "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "title": "" }, { "docid": "898712fbcecfc0d2dbede07c285ed664", "score": "0.7716203", "text": "public function authorize()\n {\n $comment = $this->route('comment');\n\n return $comment->user_id == auth()->id();\n }", "title": "" }, { "docid": "37e3a663086b468f101b243035cc75b0", "score": "0.7713876", "text": "public function authorize()\n {\n switch (FormRequest::get('method')) {\n case 'updateUser':\n return $this->user()->can('Update User');\n case 'restoreUser':\n return $this->user()->can('Restore User');\n case 'revokeUserAccess':\n return $this->user()->can('Revoke User');\n default:\n return false;\n }\n }", "title": "" }, { "docid": "7572c857607dd6bf2eba3e6802950835", "score": "0.77015555", "text": "public function isAuthorized() : bool;", "title": "" }, { "docid": "7572c857607dd6bf2eba3e6802950835", "score": "0.77015555", "text": "public function isAuthorized() : bool;", "title": "" }, { "docid": "7572c857607dd6bf2eba3e6802950835", "score": "0.77015555", "text": "public function isAuthorized() : bool;", "title": "" }, { "docid": "c6aea3b396636e4503ce1626b53d82ba", "score": "0.76929665", "text": "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "532c6c1036e7cfad132d50317ea265f2", "score": "0.76916873", "text": "function isAuthorized() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fb8e9aa8c9212aa2d6d9e94b9b66d2b9", "score": "0.769021", "text": "public function authorize()\n {\n if ($this->pad && ! $this->padBelongsToUser()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "e3bf4e1d584bb0846b61a01f2d94a302", "score": "0.7684", "text": "public function authorize()\n\t{\n\t\tif ( $this->sensor != null ) {\n\t\t\treturn Auth::user()->isMySensor( $this->sensor );\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5de7e533dd92526defeffa6a387298a2", "score": "0.76786", "text": "public function authorize()\n {\n $user = $this->user();\n\n $entry = strpos($this->url(), 'entries/') !== false ?\n $this->route('entry')->id :\n $this->input('entry', null);\n\n return $user->isAdmin() || $user->hasKey('get-attempts') || \n ($user->isEntrant() && $user->entry->id == $entry);\n }", "title": "" }, { "docid": "f9167c54311f5a4e6dc10099b24e923e", "score": "0.7674682", "text": "public function isAuthorised()\r\n {\r\n return $this->access_token_expire && $this->access_token && $this->refresh_token;\r\n }", "title": "" }, { "docid": "d37445a87bbd20583e6134ae835f4e64", "score": "0.7671761", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_providers') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3dd89f2a3c871f7e46d9829f5a99f7cb", "score": "0.76618916", "text": "public function isAuthorizedVisitor()\n {\n\n return $this->session->has('auth');\n }", "title": "" }, { "docid": "253207c500333409209d27c34b250540", "score": "0.7661621", "text": "public function authorize()\n {\n return ($this->user()->id == $this->route('battle')->user_id);\n }", "title": "" }, { "docid": "425ebe2bc8bb5e740ead4713694cf790", "score": "0.7653183", "text": "public function authorize()\n {\n return $this->user()->userType == 1? true : false;\n }", "title": "" }, { "docid": "893fefcaa8f0bbabe2639b6e2fc59c84", "score": "0.76386935", "text": "public function authorize()\n {\n if (Auth::check()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5ace9b025739d57e0a049734e5fc68db", "score": "0.76363504", "text": "public function authorize()\n {\n $article = $this->route('article');\n\n if ($article->viewable){\n return true;\n }\n \n try {\n if (! $user = JWTAuth::parseToken()->authenticate()) {\n return false;\n }\n }\n catch (\\Exception $e) {\n return false;\n }\n return $article->user->id == $user->id || $user->isAnAdmin();\n \n }", "title": "" }, { "docid": "92ddf6452647b088c25aca867d3e6d7a", "score": "0.7629922", "text": "public function authorize()\n {\n // Authorization parameters.\n $isTeamOwner = $this->team->owner_id === Auth::user()->id;\n $isResourceOwner = $this->resource->author_id === Auth::user()->id;\n $resourceBelongsToTeam = $this->resource->team_id === $this->team->id;\n // We also need to check for the resource status but this will be done in the controller\n // in order to return the proper error message there.\n return $resourceBelongsToTeam && ($isResourceOwner || $isTeamOwner);\n }", "title": "" }, { "docid": "b7a2c9ad92964ba77cc60e3b5e1786e6", "score": "0.76293683", "text": "public function authorize()\n {\n if ($this->guardName() !== '') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7610821", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "c7ce4d12e5eee0ca4049234179731162", "score": "0.76102245", "text": "public function authorize(): bool\n {\n return $this->user()->can('authentication settings');\n }", "title": "" }, { "docid": "b798c2efb4a2a8ccb7262f70bc26c3aa", "score": "0.7608559", "text": "public function authorize()\n {\n // if(request()->is('api/*')){\n // return $this->user->id === auth()->user()->id;\n // }\n\n return true;\n }", "title": "" }, { "docid": "5263af9679eb1474d420b4a980521ae9", "score": "0.7607275", "text": "public function authorize()\n\t{\n\t\treturn true; //TODO: user checking (EG admin or admin of the org)\n\t}", "title": "" }, { "docid": "c78e31ee952b9abb7f96de3c25225186", "score": "0.7607157", "text": "public function authorize()\n {\n if (Auth::check()) {\n if (Auth::user()->role_id == 1) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "f771a1d50ce486a5c4823424102f9c57", "score": "0.7599725", "text": "public function authorize()\n {\n return $this->user()->role_id === RoleEnums::ADMIN;\n }", "title": "" }, { "docid": "7721e9deb876b374da55f4c6b2acd97a", "score": "0.75978255", "text": "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "c4a627017a1dba672171a1026addae07", "score": "0.75959927", "text": "public function authorize()\n {\n if (auth()->user()->admin === 1) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "ba17bbe327e3c9ae9bf4edf2881667b4", "score": "0.7591778", "text": "public function authorize()\n {\n\t\t//在这里可以校验是否有权限等\n return true;\n }", "title": "" }, { "docid": "a46b0a139ee6646088a7b14a71906fc2", "score": "0.75857234", "text": "public function authorize()\n {\n // Covered by Admin user auth\n return true;\n }", "title": "" }, { "docid": "d67c2280a23ce79bed8ef6132f1c6cfb", "score": "0.7583556", "text": "public function authorize() : bool\n {\n return $this->encodePrimaryKey(auth()->user()->id) === request()->segment(3);\n }", "title": "" }, { "docid": "aa4e4595eeb521827bc14f0edf670c1b", "score": "0.75799966", "text": "public function authorize()\n {\n // Authorization is handled with the Authorization Policy, if we wanted to handle it here, commented code below would be the way\n // $todoUserId = $this->route('todo')->user_id;\n // $currentUserId = $this->user()->id;\n // return ($todoUserId === $currentUserId);\n\n return true;\n }", "title": "" }, { "docid": "4a4f0083ebf8a39536ac8ea3d76ee822", "score": "0.7576373", "text": "public function authorize()\n {\n /* if ($this->user_id == auth()->user()->id)\n {\n return true;\n } else {\n return false;\n } */\n\n return true;\n }", "title": "" }, { "docid": "87d1c597738cd059f848ede801414455", "score": "0.75681305", "text": "public function authorize(){\n\t\t// Make mongodb the presence verifier (check for duplicate names)\n\t\t$this->getValidatorInstance()->getPresenceVerifier()->setConnection('app');\n\n\t\treturn $this->user()->is('admin');\n\t}", "title": "" }, { "docid": "313d94e8acea8646cc8150a6ab69f739", "score": "0.7564375", "text": "public function authorize()\n {\n return !user();\n }", "title": "" }, { "docid": "f5ae0de655336a2b70af177e89a38a8d", "score": "0.7556303", "text": "public function authorize()\n {\n if ( !Auth::check() )\n {\n return false;\n }\n\n $theUser = User::find($this->segment(2));\n // 如果是编辑操作, 或者当前用户不是对象创建者\n if ( !$theUser || $theUser->id != Auth::id()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d23761969a1cc53cc7da18f0d5ec27f8", "score": "0.75437546", "text": "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\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 // Reply to an invitation?\n $p['reply'] = true;\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }", "title": "" }, { "docid": "1e5bc4bbb7e375fd2e6207c90646128b", "score": "0.7541607", "text": "public function authorize()\n {\n return Auth::user() ? true : false;\n }", "title": "" }, { "docid": "a3e5e19a77bffb5d50f3339e6f87e3d3", "score": "0.75383884", "text": "public function authorize()\n {\n if ($this->request->get('roles')) {\n if (in_array('admin',array_values($this->request->get('roles')) ))\n {\n return (auth()->user()->hasRole('admin')) ? true: false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "4fc2ec7163e002c1ff9ce94bbf54c10e", "score": "0.7534116", "text": "public function authorize()\n {\n return User::where('id', \\Auth::id())->exists();\n }", "title": "" }, { "docid": "6bfd1731ff920472c83db5e90bee1819", "score": "0.7522952", "text": "public function authorize()\n {\n return $this->user()->can('view-permission');\n }", "title": "" }, { "docid": "df76ffddcb026f417ccf56b596ccefb5", "score": "0.75185955", "text": "public function authorize()\n {\n $data = $this->validationData();\n return (!is_null($data['username']) && $this->user()->username == $data['username']);\n }", "title": "" }, { "docid": "6f0c79da624bfa4177e2c2224acb6af7", "score": "0.75159144", "text": "public function authorize()\n {\n return $this->user()->userRole->add_clients == 1 ? true : false;\n }", "title": "" }, { "docid": "d90be9edb33d6193d01dddcbd025baf8", "score": "0.7514678", "text": "public function authorize()\n {\n return auth()->check() && auth()->user()->hasAnyRole(permitRolesByUri('opsi'));\n }", "title": "" }, { "docid": "63b722e3507fccc9ed6815168a337646", "score": "0.75139207", "text": "public function authorize()\n {\n return $this->can('edit-resident')\n || (!empty($this->resident_id) && $this->user()->resident && $this->resident_id == $this->user()->resident->id);\n }", "title": "" }, { "docid": "c62eea1d429f7cce19f0ce1ef4d3ea1d", "score": "0.7512714", "text": "public function authorize()\n {\n $data = $this->validationData();\n $story = $this->writerService->GetStoryByID($data['story_id']);\n return (!is_null($story) && $this->user()->username == $story['username']);\n }", "title": "" }, { "docid": "29a9da87bc44bd91bda5d32aae974c98", "score": "0.75073355", "text": "private function _isAuthorized()\n {\n $app = JFactory::getApplication();\n return ( $app->isAdmin() && JFactory::getSession()->checkToken());\n }", "title": "" }, { "docid": "79f8ed22ed7dab55b2030c1d6037d5df", "score": "0.75025696", "text": "public function authorize()\n {\n $parameters = $this->route()->parameters;\n\n $post = Models::post()->with('discussion')->findOrFail($parameters['post']);\n\n return (! is_null($this->user())) && $this->user()->id === (int) $post->user_id;\n }", "title": "" }, { "docid": "9cf7062eba5e301eed991dbfc61484f2", "score": "0.75014484", "text": "public function authorize()\n {\n\t\t// only allow updates if the user is logged in\n\t\treturn backpack_auth()->check();\n }", "title": "" }, { "docid": "c56e00592b535ca39627eac396d04b4b", "score": "0.7500403", "text": "public function authorize()\n {\n $user = $this->user('api');\n return $user->user_type === 'Restaurant';\n }", "title": "" }, { "docid": "b528e0bbb08c396e9c12fb17074b4e78", "score": "0.7491641", "text": "public function authorize()\n {\n if (!Auth::check()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "4b8ec1bb175769ef85dce4064d3ae134", "score": "0.7490147", "text": "public function authorize(Request $request)\n {\n return false == is_null(Auth::user())\n && Auth::user()->id == $request->route('user_id');\n }", "title": "" }, { "docid": "72914acb0198bc54c343122b30392285", "score": "0.7488136", "text": "public function authorize()\n {\n return $this->user()->can(\n 'update',\n $this->route('professional') ? $this->route('professional') : $this->user()\n );\n }", "title": "" } ]
9cea94120d4bcd0b39e4ec6d1f9d2005
get a list of IDs with the passed SKUs (pipe deliminated)
[ { "docid": "d92d40eec44c5d9430ccb02d74b3b089", "score": "0.5760664", "text": "public function getID($skus);", "title": "" } ]
[ { "docid": "1f50e7afcf7e05f937dfb0a01073391b", "score": "0.61385727", "text": "function get_product_id_list() \n {\n global $order;\n\n $product_id_list = '';\n foreach ($order->products as $product) {\n $product_id_list .= ',' . zen_db_input($product['id']);\n }\n return substr($product_id_list, 1);\n }", "title": "" }, { "docid": "f81538d6a8ca3da9edde1c3091fd4c51", "score": "0.60676926", "text": "public function getProductSkuById($ids){\n \n if($this->_skuToIdMapping == null){\n \n $productCol = Mage::getResourceModel('catalog/product_collection');\n $idsSelect = clone $productCol->getSelect();\n $idsSelect->reset(Zend_Db_Select::ORDER);\n $idsSelect->reset(Zend_Db_Select::LIMIT_COUNT);\n $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET);\n $idsSelect->reset(Zend_Db_Select::COLUMNS);\n $idsSelect->from(null, array('e.'.$productCol->getEntity()->getIdFieldName(), 'e.sku'));\n $idsSelect->resetJoinLeft();\n \n $this->_skuToIdMapping = $productCol->getConnection()->fetchPairs($idsSelect, array());\n \n }\n \n // return single sku or array with skus\n if (!is_array($ids)) {\n return isset($this->_skuToIdMapping[$ids]) ? $this->_skuToIdMapping[$ids] : null;\n } else {\n $skuArr = array();\n \n foreach ($ids as $id) {\n $skuArr[] = isset($this->_skuToIdMapping[$id]) ? $this->_skuToIdMapping[$id] : null;\n }\n \n return $skuArr;\n }\n }", "title": "" }, { "docid": "eec6c23a16f0b34255d1a9160b523491", "score": "0.60335857", "text": "public static function getSkus ($itms){\n\t\t$itemsCollection = Item::collection();\n\n\t\t$ids = array();\n\t\t$items = array();\n\t\t$itemSkus = array();\n\n\t\tforeach($itms as $itm){\n\t\t\t$items[$itm['item_id']] = $itm;\n\t\t\t$ids[] = new MongoId($itm['item_id']);\n\t\t}\n\t\t$iSkus = $itemsCollection->find(array('_id' => array( '$in' => $ids )));\n\t\tunset($ids);\n\t\t$iSs = array();\n\t\tforeach ($iSkus as $i) {\n\t\t\t$iSs[ (string) $i['_id'] ] = $i;\n\t\t}\n\n\t\tforeach ($itms as $itm) {\n\t\t\t// If the SKU does not exist for this item generate it now and update the item document\n\t\t\tif (!isset($iSs[ $itm['item_id'] ]['sku_details'][ $itm['size'] ])) {\n\t\t\t\t$sku = static::getUniqueSku(\n\t\t\t\t\t$iSs[ $itm['item_id'] ]['vendor'],\n\t\t\t\t\t$iSs[ $itm['item_id'] ]['vendor_style'],\n\t\t\t\t\t$itm['size'],\n\t\t\t\t\t$iSs[ $itm['item_id'] ]['color']\n\t\t\t\t);\n\n\t\t\t\t$iSs[ $itm['item_id'] ]['sku_details'][ $itm['size'] ] = $sku;\n\n\t\t\t\t$skuList = array();\n\t\t\t\t$skuList[ $itm['size'] ] = $sku;\n\t\t\t\t$skuList = array_merge($iSs[ $itm['item_id'] ]['sku_details'], $skuList);\n\t\t\t\t$result = $itemsCollection->update(\n\t\t\t\t\tarray('_id' => new MongoId($itm['item_id'])),\n\t\t\t\t\tarray('$set' => array('sku_details' => $skuList,'skus' => array_values($skuList) ))\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$sku = $iSs[ $itm['item_id'] ]['sku_details'][ $itm['size'] ];\n\t\t\t}\n\n\t\t\t$itemSkus[ $sku ] = $itm;\n\t\t}\n\n\t\tunset($iSs);\n\t\tunset($items);\n\t\treturn $itemSkus;\n\t}", "title": "" }, { "docid": "2e989fbb9e7056d71efdf086b9e10440", "score": "0.5928012", "text": "function getIds($options = array()){\n\t\t$out = array();\n\t\tforeach($this->getItems($options) as $item){ $out[] = $item->getId(); }\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "5942f81d4040e5e96b22313b37c7cd59", "score": "0.5876441", "text": "public static function getIds() {\n\n\n if (isset($_SESSION['culturefeed_userpoints_wishlist'])) {\n return array_keys($_SESSION['culturefeed_userpoints_wishlist']);\n }\n \n return array();\n \n }", "title": "" }, { "docid": "e940712f28a349802eff7b8581d5c35c", "score": "0.5847678", "text": "function get_all_woocommerce_skus() {\n\n\tglobal $wpdb;\n\n\t$sku_array = array();\n\n\t$table_name = $wpdb->prefix . \"postmeta\";\n\t$sql = \"SELECT meta_value FROM \" . $table_name . \" WHERE meta_key = '_sku'\";\n\t$rows = $wpdb->get_results($sql, ARRAY_A);\n\n\tforeach($rows as $row) {\n\t\t$sku = $row['meta_value'];\n\t\tif ( !is_null($sku) && !empty($sku) ) {\n\t\t\tarray_push( $sku_array, $sku );\n\t\t}\n\t}\n\n\treturn $sku_array;\n}", "title": "" }, { "docid": "436b48a8eeff5aa5771c1208c2becb83", "score": "0.579755", "text": "private function retrieveProductIds(array $productSkus, int $customerGroupId): array\n {\n if (!$this->sharedCatalogRetriever->isSharedCatalogPresent($customerGroupId)) {\n $publicCatalog = $this->sharedCatalogRetriever->getPublicCatalog();\n $publicCatalogProductSkus = $this->sharedCatalogProductsLoader->getAssignedProductsSkus(\n (int) $publicCatalog->getCustomerGroupId()\n );\n $productSkus = array_diff($productSkus, $publicCatalogProductSkus);\n }\n\n $productIds = $this->productResourceModel->getProductsIdsBySkus($productSkus);\n\n return array_values($productIds);\n }", "title": "" }, { "docid": "bb3b971593d51c34c3c7187fdaa2d0d8", "score": "0.57047445", "text": "function GetProductsByIDs($id_list) {\n // Create list part of query\n $query_list_entry = \"\";\n foreach ($id_list as $curr_id) {\n if (!empty($query_list_entry)) {\n $query_list_entry .= \", \";\n } else {\n $query_list_entry .= \"(\";\n }\n $query_list_entry .= $curr_id;\n }\n $query_list_entry .= \")\";\n\n $query = \"SELECT * FROM products WHERE id IN \".$query_list_entry.\" ORDER BY ID ASC;\";\n $result = $GLOBALS['conn']->query($query);\n while ($row = mysqli_fetch_array($result)) {\n $rows[] = $row;\n }\n return $rows;\n }", "title": "" }, { "docid": "08a0207d4ce092627c154cbb60456cde", "score": "0.57032794", "text": "function get_user_by_ids($ids) {\n global $users;\n \n $_ids = explode('-', $ids);\n $return = array();\n foreach($users as $user) {\n foreach($_ids as $_id) {\n if($user['id'] == $_id) {\n $return[] = $user;\n break;\n }\n }\n }\n return $return;\n}", "title": "" }, { "docid": "27e1880e9e8594b751eac255cdba5606", "score": "0.56833184", "text": "public function getProductIds()\n {\n// $products = array();\n// if(isset($_SESSION[WebUser::PRODUCT]))\n// {\n// $products = Yii::app()->session->get(WebUser::PRODUCT);\n// }\n// else\n// {\n// $products = $this->loadUser()->getProducts();\n// Yii::app()->session->add(WebUser::PRODUCT, $products);\n// }\n// return $products;\n \n return $this->loadUser()->getProducts();\n }", "title": "" }, { "docid": "c5b463ee08dcd0dfcd99c85f68880464", "score": "0.5652566", "text": "public function getProductSkusByIds($productIds)\n {\n $adapter = Mage::getSingleton('core/resource')->getConnection('core_read');\n $productTableName = Mage::getSingleton('core/resource')->getTableName('catalog/product');\n $select = $adapter->select()\n ->from($productTableName, array('entity_id', 'sku'))\n ->where('entity_id IN (?)', $productIds);\n\n return $adapter->fetchPairs($select);\n }", "title": "" }, { "docid": "efc680d79af5991ffb9d4fdc5f6d6638", "score": "0.5624018", "text": "public function getIds(): string\n {\n return $this->ids;\n }", "title": "" }, { "docid": "8c97404d32df6d7613803bb9ed201c3c", "score": "0.5563319", "text": "public function testGETSkusSkuId()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "04b562396eb61a76cf7d33826f9144aa", "score": "0.5555228", "text": "public function getFilteredSku($block_sku_list) {\n\n if ($block_sku_list != '') {\n\n $where = \"where id not in(\" . implode(',', $block_sku_list) . \")\";\n } else {\n $where = \"\";\n }\n $sql = \"SELECT id,sku_code,sku_description as sku_name FROM `tbld_sku` $where\";\n $query = $this->db->query($sql)->result_array();\n\n return $query;\n }", "title": "" }, { "docid": "1fbb26c19de7c76ce6611ee7ccd71239", "score": "0.5550676", "text": "public function getOnlyIds()\n\t{\n\t\t$cart = $this->get();\n\t\t$ids = [];\n\t\tif (is_array($cart)) {\n\t\t\tforeach($cart as $item){\n\t\t\t\tif(isset($item['id']))\n\t\t\t\t\tarray_push($ids,$item['id']);\n\t\t\t}\n\t\t}\n\t\treturn $ids;\n\t}", "title": "" }, { "docid": "26d0c1a45ad3324a586d2c958966cb90", "score": "0.55505866", "text": "private function _createIds($product) {\n\t\t//set defaults\n\t\treturn implode(\"__\", array(str_replace('__', '', $product['advertiser-id']), str_replace('__', '', $product['sku']), str_replace('__', '', $product['manufacturer-name']), str_replace('__', '', $product['manufacturer-sku']), str_replace('__', '', $product['upc']), $this->feedName, ));\n\t}", "title": "" }, { "docid": "205da289721cf0d9a8ae38948eb200ba", "score": "0.5546143", "text": "public function getSellerProductIds()\n {\n $sellerId = $this->getCustomerId();\n $productIds = [];\n if ($sellerId) {\n $productCollection = $this->_marketplaceProductCollection->create()\n ->addFieldToFilter(\n 'seller_id',\n $sellerId\n );\n foreach ($productCollection as $product) {\n $productIds[] = $product->getMageproductId();\n }\n }\n return $productIds;\n }", "title": "" }, { "docid": "7489d805a7a8d435eea2a025811cd94e", "score": "0.5539718", "text": "public function get_ids_by_code( $code );", "title": "" }, { "docid": "cdb1866cb578384cd772932b90a17047", "score": "0.5526963", "text": "private function getProductsBySkuQuery() : string\n {\n return <<<QUERY\nquery getProductsBySku {\n products(filter: { sku: { eq: \"configurable\" } }) {\n items {\n sku\n name\n price_range {\n minimum_price {\n regular_price {\n value\n currency\n }\n discount {\n amount_off\n percent_off\n }\n final_price {\n value\n currency\n }\n }\n maximum_price {\n regular_price {\n value\n currency\n }\n discount {\n amount_off\n percent_off\n }\n final_price {\n value\n currency\n }\n }\n }\n ... on ConfigurableProduct {\n variants {\n product {\n sku\n }\n }\n }\n }\n }\n}\nQUERY;\n }", "title": "" }, { "docid": "d797fc34fa7a49bbe8e684296a0955e8", "score": "0.5501038", "text": "protected function getIdsBySku(array $sku, $customerGroupId)\n {\n $column = static::COLUMN_SKU;\n\n $select = $this->_connection->select()\n ->from($this->getMainTable(), [static::COLUMN_ENTITY_ID, $column])\n ->where($column.' IN (?)', $sku)\n ->where(static::COLUMN_CUSTOMER_GROUP_ID.' = ?', $customerGroupId);\n\n return $this->_connection->fetchPairs($select);\n }", "title": "" }, { "docid": "b6e2957a9b71422916efadc4221e3884", "score": "0.54754883", "text": "protected function getIDsList()\n\t{\n\t\t// Get ids from input\n\t\t$list = $this->app->input->get->getString('ids');\n\n\t\t// Check if ids were passed\n\t\tif (isset($list))\n\t\t{\n\t\t\t// Convert the ids list to array\n\t\t\t$idsList = explode(',', $list);\n\n\t\t\treturn $idsList;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ac3cdf70702192ee46e88517fb6d2da3", "score": "0.5470069", "text": "public function list_item_ids() {\n\t\t$ids = array();\n\t\tfor ($i = 0; $i < count($this->items); $i++) {\n\t\t\tarray_push($ids, $this->items[$i]->get_item_id());\n\t\t}\n\t\treturn $ids;\n\t}", "title": "" }, { "docid": "69dbc984cf0ac174d0cb4384a0ac4fb5", "score": "0.5457729", "text": "public function getIds($sourceName, array $options = []);", "title": "" }, { "docid": "211b82386789adb7822f2b20b15f5866", "score": "0.53926337", "text": "private function extractPlaylistSongIds($playlist) {\n return $playlist->songs->keyBy('song_identifier')->toArray();\n }", "title": "" }, { "docid": "586c7b879f574c15ffab8cab412a74ef", "score": "0.5352607", "text": "function extraerIds($data = array()) {\n\t\tif (!empty($data)) {\n\t\t\t$ids = array();\n\t\t\tforeach ($data as $k=>$v) {\n\t\t\t\tif (($v === 1 || $v === \"1\" || $v === true || $v === \"true\") && preg_match(\"/^id_([0-9]+$)/\", $k, $matches)) {\n\t\t\t\t\t$ids[] = $matches[1];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $ids;\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "b9a93ec4368ef73f568a7355cf6c9f00", "score": "0.5331321", "text": "protected function _getProductIdsInCart()\n {\n return Mage::getSingleton('checkout/cart')->getProductIds();\n }", "title": "" }, { "docid": "5983f1216a44653d54c1506ad65b84c5", "score": "0.53192645", "text": "function genRetrieveUserData2($session_ids) {\r\r\n\r\r\n\t\t$sql=array();\r\r\n\r\r\n\t\tforeach($session_ids as $nr => $session_id) {\r\r\n\r\r\n\t\t\t$sql[]=$this->genRetrieveSID($session_id);\r\r\n\t\t}\r\r\n\r\r\n\t\treturn(implode(\" UNION \", $sql));\r\r\n\r\r\n\t}", "title": "" }, { "docid": "a6860522e27eda0e6778aefa19cb8eb0", "score": "0.53130394", "text": "public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(InvGroupCode::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}", "title": "" }, { "docid": "207b8673f75d3a23bf97b381a3b49ccc", "score": "0.5307894", "text": "function getRecordIds($options = array()){\n\t\t$out = array();\n\t\tforeach($this->getItems($options) as $item){ $out[] = $item->getRecordId(); }\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "e0cba04dd4f46cba42661fa571f8b604", "score": "0.53075135", "text": "public function getAllUserIds(): array;", "title": "" }, { "docid": "529ad219fe16479c1fbf20b8f2dc4199", "score": "0.5295259", "text": "public function getStockIDs(){\n\t\tforeach($this->stocks as $key => $value){\n\t\t\t$data[] = $key;\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "8201054df2230d6152142de469ae2f63", "score": "0.52831", "text": "public static function getAllId() {\n $vaccins = ModelStock::getListVaccinInStock();\n $prods = ModelStock::getListCentreInStock();\n return array($vaccins,$prods);\n }", "title": "" }, { "docid": "ad08c63276a65e537633308880e6bf3b", "score": "0.52809775", "text": "public function rightIDProvider()\n {\n return [\n [1],\n [2],\n [3],\n ];\n }", "title": "" }, { "docid": "7915a71626bb0d71d79c9925e06fd314", "score": "0.52599525", "text": "function get_ids() {\n\t\t$hybrid_cloud_array = array();\n\t\t$query = \"select hybrid_cloud_id from $this->_db_table\";\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute($query);\n\t\tif (!$rs)\n\t\t\t$event->log(\"get_list\", $_SERVER['REQUEST_TIME'], 2, \"hybrid-cloud.class.php\", $db->ErrorMsg(), \"\", \"\", 0, 0, 0);\n\t\telse\n\t\twhile (!$rs->EOF) {\n\t\t\t$hybrid_cloud_array[] = $rs->fields;\n\t\t\t$rs->MoveNext();\n\t\t}\n\t\treturn $hybrid_cloud_array;\n\t}", "title": "" }, { "docid": "29830ba44b39961e771f62e91c267256", "score": "0.5253612", "text": "public function provider_sanitize_id()\n\t{\n\t\treturn [\n\t\t\t[\n\t\t\t\t'foo',\n\t\t\t\t'0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33'\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "5922674e6ce9571379c93803d9fa9dfa", "score": "0.52490985", "text": "public function getContainedIds();", "title": "" }, { "docid": "e4c56cbe1f94287951e291d633442b3c", "score": "0.5224037", "text": "public function getFeaturedProductIds(){\n $productIds = array();\n if($this->getId()){\n $productIds = explode(',', $this->getFeaturedProducts());\n }\n return $productIds;\n }", "title": "" }, { "docid": "7924d9f3b7ff7e9eda8196876ba1af5a", "score": "0.52191216", "text": "public static function getAllIds() {\n $cart = self::getAll();\n $ids = array();\n foreach ($cart as $element) {\n $ids[] = $element->getElementId();\n }\n return $ids;\n }", "title": "" }, { "docid": "06ebcfc2b8244d1180d032913f24bc20", "score": "0.5215195", "text": "public function getIdsExcluded();", "title": "" }, { "docid": "37b782db0ab4e6dcb3b50a8a65b8cd38", "score": "0.5214676", "text": "public function ids(): array;", "title": "" }, { "docid": "7dba1b38452733984e33d3c145cb71d5", "score": "0.5199361", "text": "public function translateNamesToIds($names) {\n $ids = array();\n for($i = 0; $i < count($names); $i++) {\n $ids[$i] = $this->getBrandNameById($names[$i]);\n }\n return $ids;\n }", "title": "" }, { "docid": "ccad25335767408cec5634870100606c", "score": "0.5184699", "text": "public function setSkus($value)\r\n {\r\n $skus = explode(',', $value);\r\n if ($skus && is_array($skus) && count($skus)) {\r\n foreach ($skus as $sku) {\r\n #Masked sku\r\n if (strpos(trim($sku), \"*\") !== false) {\r\n # Remove double stars\r\n while (strpos($sku, \"**\") !== false) {\r\n $sku = str_replace(\"**\", \"*\", trim($sku));\r\n }\r\n $request = trim($sku);\r\n $sku = str_replace(\"*\", \"%\", trim($sku));\r\n\r\n # Search mask for Product's sku\r\n $products = Mage::getModel('catalog/product')->getCollection();\r\n $products->addFieldToFilter('sku', array('like' => $sku));\r\n\r\n foreach ($products as $product) {\r\n $sku = $product->getSku();\r\n if (trim($sku) && $this->_isValidSku(trim($sku))) {\r\n if ($this->getGrouped()) {\r\n $this->_registerVirtualSku($request, $sku);\r\n } else {\r\n $this->_registerProduct($sku);\r\n }\r\n }\r\n }\r\n\r\n # Search mask for orders' sku\r\n /** @var AW_Advancedreports_Model_Mysql4_Collection_Product_Item $items */\r\n $items = Mage::getResourceModel('advancedreports/collection_product_item');\r\n $items->addFieldToFilter('sku', array('like' => $sku));\r\n if (count($products->getAllIds())) {\r\n $items->addFieldToFilter('product_id', array('nin' => $products->getAllIds()));\r\n }\r\n $items->groupByAttribute('sku');\r\n\r\n foreach ($items as $item) {\r\n $sku = $item->getSku();\r\n if (trim($sku) && $this->_isValidSku(trim($sku))) {\r\n if ($this->getGrouped()) {\r\n $this->_registerVirtualSku($request, $sku);\r\n } else {\r\n $this->_registerProduct($sku);\r\n }\r\n }\r\n }\r\n\r\n # General sku\r\n } elseif (trim($sku) && $this->_isValidSku(trim($sku))) {\r\n $this->_registerProduct($sku);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "c3146b2ae3b02a8d7b8922f2cf2d8ab0", "score": "0.51841754", "text": "public function fetchIdsBySurname($surname)\n {\n $sql = \"SELECT $this->primaryKey FROM $this->tableName\"\n . \" WHERE $this->surname LIKE :surname\";\n $results = $this->dbh->prepare($sql);\n $results->execute([':surname' => '%' . $surname . '%']);\n $ids = '';\n while($row = $results->fetch(\\PDO::FETCH_NUM)) {\n $ids .= ', ' . $row[0];\n }\n $ids = substr($ids, 2); // Chop off the first ', '\n return $ids;\n }", "title": "" }, { "docid": "dc3daa5e5e6014f859b321faaaf965e4", "score": "0.5173867", "text": "public function getPriceSku(array $sku);", "title": "" }, { "docid": "cec7a6d670b496dce1d16d547f78027a", "score": "0.51731527", "text": "function listUniqueIdentifiers()\n\t{\n\t\t$this->cmd(\"UIDL\");\n\t\t$this->listing_mode = TRUE;\n\t\t$uids = /*. (string[int]) .*/ array();\n\t\tdo {\n\t\t\t$line = $this->getLine();\n\t\t\tif( $line === NULL )\n\t\t\t\tbreak;\n\t\t\t$line = trim($line);\n\t\t\tif( preg_match(\"/^([0-9]+) +([\\x21-\\xfe]+)/sD\", $line, $matches_mixed) !== 1 )\n\t\t\t\tthrow new IOException(\"cannot parse reply to the UIDL command: $line\");\n\t\t\t$matches = cast(\"string[int]\", $matches_mixed);\n\t\t\t$uids[(int) $matches[1]] = $matches[2];\n\t\t} while(TRUE);\n\t\treturn $uids;\n\t}", "title": "" }, { "docid": "6c3961001bb3306b3334d2feca71dfaf", "score": "0.5173088", "text": "function dttheme_get_user_purchased_product_ids($user_id) {\n\t\n\t$user_purchased_products = array();\n\t\n\tif($user_id == '') {\n\t\t$user_id = get_current_user_id();\n\t}\n\t\n\t$order_args = array(\n\t\t'post_type' => 'shop_order',\n\t\t'posts_per_page' => -1,\n\t\t'post_status' => array( 'wc-processing', 'wc-completed' ),\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => '_customer_user',\n\t\t\t\t'value' => $user_id\n\t\t\t)\n\t\t),\n\t\t'fields' => 'ids',\n\t);\n\t$orders = get_posts( $order_args );\n\t\n\tforeach( $orders as $order_post_id ) {\n\t\t\n\t\t$order = new WC_Order( $order_post_id );\n\t\t$items = $order->get_items();\n\t\t\n\t\tforeach( $items as $item ) {\n\t\t\t$user_purchased_products[$order->id] = $item['product_id'];\t\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $user_purchased_products;\n\n}", "title": "" }, { "docid": "d96c4b5e8e715a7d71a3dc8640b5f80e", "score": "0.51694214", "text": "function getInStockStockIds() {\n\t\t\t$stockIds = array( );\n\t\t\tforeach ($this->getInStockStockItems( ) as $stockItem) {\n\t\t\t\t$stockId = $stockItem->getStockId( );\n\t\t\t\t$stockIds[$stockId] = $stockId;\n\t\t\t}\n\n\t\t\treturn $stockIds;\n\t\t}", "title": "" }, { "docid": "3bfb069212585a61f1400e5d55baaec5", "score": "0.51593304", "text": "public function exportIds()\n {\n if ($this->variation) {\n $query = ' SELECT * FROM ( ( ';\n $query .= 'SELECT p.id_product, \\'0\\' as id_product_attribute ' . $this->buildTotalQuery();\n $query .= ' ) UNION ALL ( ';\n $query .= 'SELECT p.id_product, pa.id_product_attribute ' . $this->buildTotalQuery(true);\n $query .= ' ) ) as tmp ORDER BY id_product, id_product_attribute';\n } else {\n $query = 'SELECT p.id_product, \\'0\\' as id_product_attribute ' . $this->buildTotalQuery();\n }\n if ($this->limit && $this->limit > 0) {\n if ($this->offset && $this->offset > 0) {\n $query .= ' LIMIT ' . $this->offset . ', ' . $this->limit . ' ';\n } else {\n $query .= ' LIMIT 0,' . $this->limit . ' ';\n }\n }\n try {\n return Db::getInstance()->executeS($query);\n } catch (PrestaShopDatabaseException $e) {\n return array();\n }\n }", "title": "" }, { "docid": "8644b2b00ed835b3f98786a361306428", "score": "0.51537913", "text": "public function GetParksIdInWishlist() {\n // Query to select all park IDs\n $sQueryParksId = \"SELECT wish_id\n , concat('w', wish_id) as wish_id_alias\n , park_id \n FROM wishlist \n WHERE user_id = :userId\";\n // Execute query\n $objPDOStatement = $this->_objConnection->prepare($sQueryParksId);\n $objPDOStatement->bindValue(':userId', $this->_userId);\n $objPDOStatement->execute();\n $lstParksInWishlist = $objPDOStatement->fetchAll(PDO::FETCH_OBJ);\n // Return list of parks\n return $lstParksInWishlist;\n }", "title": "" }, { "docid": "3b8f79845060026e897520f8f6dace4c", "score": "0.51533693", "text": "function get_baitlist_that_bait_protein_ided($bait_str = 0){\n $baitIDs = array();\n $SQL = \" select B.ID from Bait B, Hits H where \";\n if($bait_str){\n $SQL .= \"B.ID in($bait_str) and \";\n }\n $SQL .=\" H.BaitID=B.ID and H.GeneID=B.GeneID group by B.ID\";\n //echo $SQL;\n $results = mysqli_query($this->link, $SQL);\n $i = 0;\n while (list($baitIDs[$i])= mysqli_fetch_row($results) ) {\n $i++;\n }\n return $baitIDs;\n }", "title": "" }, { "docid": "db034f945d2be4983baacb27d02210af", "score": "0.5149936", "text": "public function get_ids()\n {\n if (isset($_SESSION['cart']))\n {\n return array_keys($_SESSION['cart']);\n }\n return NULL;\n }", "title": "" }, { "docid": "aeeedd7ba21c3846d93e89fe5551f83c", "score": "0.5147122", "text": "private function get_batch_order_ids() {\n\t\treturn array_slice( $this->order_ids, 0, $this->batch_size );\n\t}", "title": "" }, { "docid": "50a2c83d6ba723afc94d382d48145fd9", "score": "0.51296955", "text": "public function lookup(array $uids): array;", "title": "" }, { "docid": "db4d8cec1eaa7654bd16f65094426e8a", "score": "0.5123378", "text": "function getStandIds($dbh)\n\t{\n\t\t$sql3=\"SELECT `id` FROM `stand_id`\";\n\t\t$m_j_f_data_raw = $dbh->query($sql3)->fetchAll(PDO::FETCH_ASSOC);\n\t\t$m_j_f_data = array();\n\t\tforeach ($m_j_f_data_raw as $key => $value) {\n\t\t\t# code...\n\t\t\tarray_push($m_j_f_data, $value['id']);\n\t\t}\n\t\treturn $m_j_f_data;\n\t}", "title": "" }, { "docid": "ad485405e4d40f83220df9700d7f9db2", "score": "0.5123083", "text": "private function getSourceIds()\n {\n $sourcesData = $this->getDb()->createQueryBuilder()\n ->select('`id`')\n ->from(Source::TABLE_NAME)\n ->execute()\n ->fetchAll();\n\n $sources = [];\n foreach ($sourcesData as $data) {\n $sources[] = $data['id'];\n }\n\n return $sources;\n }", "title": "" }, { "docid": "4ec9cb3d9aff68ae1013d1d73a4e1728", "score": "0.511211", "text": "public function getSellerIds()\n {\n $sellerIds = array();\n\n foreach ($this->getOrders() as $order)\n {\n $sellerIds[] = $order->getSeller()->getId();\n }\n\n return $sellerIds;\n }", "title": "" }, { "docid": "0872eef11edf00923ea4d6df67110a68", "score": "0.5107644", "text": "public function getIds($prefix = null)\n\t{\n\t\tif ($prefix) {\n\t\t\treturn $this->getRedis()\n\t\t\t\t->keys($this->getNamespace() . '\\[' . $prefix . '*');\n\t\t} else {\n\t\t\treturn $this->getRedis()\n\t\t\t\t->keys($this->getNamespace() . '*');\n\t\t}\n\t}", "title": "" }, { "docid": "a3a72bcdce26e10ec8a524b3cdcb6c9d", "score": "0.51060146", "text": "function fetchProductIds(){\n try {\n $result = $this->soap->Product_GetAll()->Product_GetAllResult->item;\n } catch (SoapFault $e){\n return null;\n }\n echo 'Products directly from SmartWeb:'.PHP_EOL;\n var_dump($result);\n $ids = array();\n foreach($result as $p){\n $ids[] = $p->Id;\n $this->products[$p->Id] = $p;\n }\n \n return $ids;\n \n }", "title": "" }, { "docid": "b2bd283209eb702610acf06d8b5bfd5d", "score": "0.5102626", "text": "function find_ids_via_guids($guids)\n{\n $or_list = '';\n foreach ($guids as $guid) {\n if ($or_list != '') {\n $or_list .= ' OR ';\n }\n $or_list .= db_string_equal_to('resource_guid', $guid);\n }\n $query = 'SELECT resource_id,resource_guid FROM ' . get_table_prefix() . 'alternative_ids WHERE ' . $or_list;\n $ret = $GLOBALS['SITE_DB']->query($query, null, null, false, true);\n return collapse_2d_complexity('resource_id', 'resource_guid', $ret);\n}", "title": "" }, { "docid": "2ba9a29e48bf4a8034cc52162394c87f", "score": "0.51004785", "text": "private function getSSIDs() {\n $ssidList = [];\n $ssidList['add'] = [];\n $ssidList['del'] = [];\n if (isset(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid'])) {\n foreach (CONFIG_CONFASSISTANT['CONSORTIUM']['ssid'] as $ssid) {\n if (\\core\\common\\Entity::getAttributeValue(CONFIG_CONFASSISTANT, 'CONSORTIUM', 'tkipsupport') == TRUE) {\n $ssidList['add'][$ssid] = 'TKIP';\n } else {\n $ssidList['add'][$ssid] = 'AES';\n $ssidList['del'][$ssid] = 'TKIP';\n }\n }\n }\n if (isset($this->attributes['media:SSID'])) {\n $ssidWpa2 = $this->attributes['media:SSID'];\n\n foreach ($ssidWpa2 as $ssid) {\n $ssidList['add'][$ssid] = 'AES';\n }\n }\n if (isset($this->attributes['media:SSID_with_legacy'])) {\n $ssidTkip = $this->attributes['media:SSID_with_legacy'];\n foreach ($ssidTkip as $ssid) {\n $ssidList['add'][$ssid] = 'TKIP';\n }\n }\n if (isset($this->attributes['media:remove_SSID'])) {\n $ssidRemove = $this->attributes['media:remove_SSID'];\n foreach ($ssidRemove as $ssid) {\n $ssidList['del'][$ssid] = 'DEL';\n }\n }\n return $ssidList;\n }", "title": "" }, { "docid": "08a059c25fb6b80d451e233fdf56101f", "score": "0.5100196", "text": "function getResIds(array $params, $resources) {\r\n\t\t$default_params = $this->getFilterParams($resources);\r\n\t\t$ids = $this->getResParams($resources);\r\n\r\n\t\t$in = $out = array();\r\n\t\tforeach ($params as $key => $value) {\r\n\r\n\t\t\tif (strpos($key, 'ms_') === false && strpos($key, 'tv_') === false) {continue;}\r\n\r\n\t\t\t$type = $default_params[$key]['type'];\r\n\t\t\tforeach ($ids as $id => $params) {\r\n\t\t\t\tif (!array_key_exists($key, $params)) {$out[] = $id;continue;}\r\n\t\t\t\tif ($type == 'number' && count($value) == 2) {\r\n\t\t\t\t\tif ($params[$key] >= $value[0] && $params[$key] <= $value[1]) {$in[] = $id;}\r\n\t\t\t\t\telse {$out[] = $id;}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tforeach ($params[$key] as $value2) {\r\n\t\t\t\t\t\tif (in_array($value2, $value)) {$in[] = $id;}\r\n\t\t\t\t\t\telse {$out[] = $id;}\r\n\t\t\t\t\t}*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t$exists = 0;\r\n\t\t\t\t\tforeach ($params[$key] as $value2) {\r\n\t\t\t\t\t\tif (in_array($value2, $value)) {$exists += 1;}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($exists == 0) {$out[] = $id;}\r\n\t\t\t\t\telse {$in[] = $id;}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//$in = array_unique($in);\r\n\t\t//$out = array_unique($out);\r\n\r\n\t\tif (!empty($in) && empty($out)) {return array_unique($in);}\r\n\t\telse if (!empty($out) && empty($in)) {return array();}\r\n\t\telse if (!empty($out) && !empty($in)) {\r\n\t\t\t$out = array_flip($out);\r\n\t\t\tforeach ($in as $key => $value) {\r\n\t\t\t\tif (isset($out[$value])) {\r\n\t\t\t\t\tunset($in[$key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn array_unique($in);;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn explode(',',$resources);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8a0fc50d98e09799feba2ee9e4018b40", "score": "0.50924903", "text": "function get_product_from_ids($str_product_ids){\n\t\t\tif(!$str_product_ids)\n\t\t\t\treturn;\n\t\t\t$query = \" SELECT *\n\t\t\t\t\tFROM fs_news\n\t\t\t\t\tWHERE id IN ($str_product_ids) \";\n\t\t\t$query;\n\t\t\tglobal $db;\n\t\t\t$db->query($query);\n\t\t\t$result = $db->getObjectList();\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "ea99c7c0de89a7169a552ea9e292be26", "score": "0.5089859", "text": "public function getIds(): array\n {\n return [];\n }", "title": "" }, { "docid": "1119f3ca73fe73a83d5d7d0bb7433bc0", "score": "0.5088934", "text": "private function getIds($key, $value)\n {\n $products = [];\n\n if($key=='category'){\n $catProduct = new Models('CategoryProduct');\n $products = $catProduct->where(['category_id'=>$value])->with(['shop'])->get();\n }\n else if($key=='subcategory'){\n $subcatProduct = new Models('ProductSubCategory');\n $products = $subcatProduct->where(['sub_category_id'=>$value])->with(['shop'])->get();\n }\n else if($key=='subsubcategory'){\n $subsubcatProduct = new Models('ProductSubSubCategory');\n $products = $subsubcatProduct->where(['sub_sub_category_id'=>$value])->with(['shop'])->get();\n }\n\n $ids = [\n 'brand' =>[],\n 'unit' =>[],\n 'color' =>[],\n 'size' =>[],\n $key =>$value,\n ];\n foreach ($products as $key => $value) {\n // Retrive Brand Id\n if(!in_array($value->shop->brand_id, $ids['brand'])){\n array_push($ids['brand'], $value->shop->brand_id);\n }\n // Retrive Unit Id\n if(!in_array($value->shop->unit_id, $ids['unit'])){\n array_push($ids['unit'], $value->shop->unit_id);\n }\n // Retrive Color Id\n if($value->shop->color){\n foreach ($value->shop->color as $color) {\n if(!in_array($color->id, $ids['color'])){\n array_push($ids['color'], $color->id);\n }\n }\n }\n // Retrive Size id\n if($value->shop->size){\n foreach ($value->shop->size as $size) {\n if(!in_array($size->id, $ids['size'])){\n array_push($ids['size'], $size->id);\n }\n }\n }\n }\n return $ids;\n }", "title": "" }, { "docid": "d0f6be098a223b3074aa146388dbe015", "score": "0.50873315", "text": "public function getIds($prefix = null)\n {\n if ($prefix) {\n return $this->client\n ->keys('\\[' . $prefix . '*');\n } else {\n return $this->client\n ->keys('*');\n }\n }", "title": "" }, { "docid": "deec5477d297f07781da8b6a84a5371f", "score": "0.5075808", "text": "function explodeIds($s_ids, $f_applyFunc = null) {\n\tif (!is_string($s_ids))\n\t\treturn $s_ids;\n\tif ($s_ids == \"\")\n\t\treturn array();\n\t$a_ids = explode(\"||\", $s_ids);\n\t$a_ids = str_replace(\"|\", \"\", $a_ids);\n\tif ($f_applyFunc !== null)\n\t{\n\t\tfor ($i = 0; $i < count($a_ids); $i++)\n\t\t{\n\t\t\t$a_ids[$i] = $f_applyFunc($a_ids[$i]);\n\t\t}\n\t}\n\treturn $a_ids;\n}", "title": "" }, { "docid": "17fca0b7105135a6e2796a029f3544f7", "score": "0.507482", "text": "function dttheme_get_class_subscription_product_ids( $class_id ){\n\t\n\t$product_ids = array();\n\t\n\tif(dttheme_yith_subscription_plugin_active()) {\n\t\t$product_ids = get_post_meta( $class_id, 'dt-class-subscription-product-id', true );\n\t\t$product_ids = ($product_ids == '') ? array() : $product_ids;\n\t}\n\t\n\treturn $product_ids;\n\n}", "title": "" }, { "docid": "03f6acbc4cca2922ddae5574a3bce9cf", "score": "0.50646555", "text": "public function findAllBySku($sku);", "title": "" }, { "docid": "4eac961952200e45b3a66b51bf480b6a", "score": "0.5055933", "text": "function getManufacturersFromIds($ids)\n\t {\n\t\t$ret = array();\n\t\tif(is_array($ids) && count($ids) > 0) {\n\t\t\t$criteria = new Criteria('manu_id', '('.implode(',', $ids).')', 'IN');\n\t\t\t$ret = $this->getObjects($criteria, true, true, '*', false);\n\t\t}\n\t\treturn $ret;\n\t }", "title": "" }, { "docid": "2420aefc64ace910328d326888e52988", "score": "0.5055713", "text": "public function getUniqueSourceList();", "title": "" }, { "docid": "15629f7d6ec0c5d48867917cef47449a", "score": "0.50506556", "text": "public function get_ids() {\n\t\t$ids = [];\n\t\t$queried = $this->get_query();\n\n\t\tif ( empty( $queried ) ) {\n\t\t\treturn $ids;\n\t\t}\n\n\t\tforeach ( $queried as $key => $item ) {\n\t\t\t$ids[ $key ] = $item;\n\t\t}\n\n\t\treturn $ids;\n\n\t}", "title": "" }, { "docid": "caa907adc902a3bf5b0526021eafab3a", "score": "0.5049943", "text": "protected function get_ashley_products_by_sku() {\r\n return ar::assign_key( $this->get_results( \"\r\n SELECT p.`sku`, p.`name`, p.`price`, p.`weight`, ps1.`value` as spec_depth, ps2.`value` as spec_length, ps3.`value` as spec_height\r\n FROM `products` p\r\n LEFT JOIN `product_specification` ps1 ON ps1.product_id = p.product_id AND ps1.`key` = 'Depth'\r\n LEFT JOIN `product_specification` ps2 ON ps2.product_id = p.product_id AND ps2.`key` = 'Length'\r\n LEFT JOIN `product_specification` ps3 ON ps3.product_id = p.product_id AND ps3.`key` = 'Height'\r\n WHERE `user_id_created` = 353\r\n AND `publish_visibility` = 'public'\"\r\n , PDO::FETCH_ASSOC )\r\n , 'sku', true );\r\n }", "title": "" }, { "docid": "7b77c2004b29dc1818853fec114ee3b4", "score": "0.5047445", "text": "private function getAccessObjectIds()\n\t{\n\t\t$accessIds = $this->getAccessIdentifiers();\n\t\t$placeholders = array_fill(0, count($accessIds), '?');\n\t\t$placeholder = implode(\",\",$placeholders);\n\n\t\t$query = \"select record_id from object_access where user_type in (?,?) and user in (\".$placeholder.\");\";\n\t\t$values = array_merge(array('user','role'),$accessIds);\n\t\t$result = $this->dbSelect($query,$values);\n\t\t$ids = vUtil::get1Dfrom2D($result,'record_id');\n\t\t// print_r($ids);die;\n\t\treturn $ids;\n\t}", "title": "" }, { "docid": "b60b338f5cd566465aa0c788be0200b1", "score": "0.504437", "text": "function get_all_ids() {\n\t\t$cloudselector_list = array();\n\t\t$query = \"select id from \".$this->_db_table;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute($query);\n\t\tif (!$rs)\n\t\t\t$this->_event->log(\"get_all_ids\", $_SERVER['REQUEST_TIME'], 2, \"cloudselector.class.php\", $db->ErrorMsg(), \"\", \"\", 0, 0, 0);\n\t\telse\n\t\twhile (!$rs->EOF) {\n\t\t\t$cloudselector_list[] = $rs->fields;\n\t\t\t$rs->MoveNext();\n\t\t}\n\t\treturn $cloudselector_list;\n\n\t}", "title": "" }, { "docid": "9dcd9f2559a3f5da828aaf89f20d2414", "score": "0.5042291", "text": "static function getProducts($start = 0, $end = -1) : array \n { \n $productIds = Redis::zRange('products', $start, $end, 'WITHSCORES'); \n \n $products = []; \n \n foreach ($productIds as $productId => $score) \n { \n $products[$score]= Redis::hGetAll(\"product:$productId\"); \n } \n \n return $products; \n }", "title": "" }, { "docid": "2f14ce470e49d7c29e3405860c4ff4ce", "score": "0.50419146", "text": "public function getWishItems($userID){\n $sqlQuery = \"SELECT itemID FROM wish_list WHERE customerID='$userID'\";\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute();\n\n $itemIDs = [];\n\n while ($row = $statement->fetch()) {\n $itemIDs[] = $row['itemID'];\n }\n\n return $itemIDs;\n }", "title": "" }, { "docid": "8e29f6d0df4b9293b7ab48c7eab33224", "score": "0.5041171", "text": "public function getItemName() {\n $items = \\common\\models\\ItemMaster::find()->where(['status' => 1])->all();\n $source;\n foreach ($items as $value) {\n $source[] = $value->SKU;\n }\n return $source;\n }", "title": "" }, { "docid": "3af02c3441be7373b8df78a3f6f4e9ee", "score": "0.50309384", "text": "abstract public function getCustomerIDs();", "title": "" }, { "docid": "5e45662b00e799efc73403633bc27cd7", "score": "0.5030856", "text": "function dttheme_get_course_purchased_student_list($course_id) {\n\t\n\t$product_ids = dttheme_get_course_all_products($course_id);\n\t\t\n\t$order_ids = array();\n\t\n\tforeach($product_ids as $product_id) {\n\t\t$order_id_new = dttheme_get_product_orders($product_id);\n\t\t$order_ids = array_merge($order_id_new, $order_ids);\n\t}\n\t\n\t$users_list = array();\n\t\n\tforeach( $order_ids as $order_post_id ) {\n\t\t\n\t\tif($order_post_id > 0) {\n\t\t\t\n\t\t\t$user_id = get_post_meta($order_post_id, '_customer_user', true);\n\t\t\tif($user_id != '') {\n\t\t\t\t$users_list[] = $user_id;\n\t\t\t}\n\t\t\n\t\t}\n\n\t}\n\t\t\n\treturn array_unique($users_list);\n\t\n}", "title": "" }, { "docid": "6f9ae654695fe9433ad6085834a72973", "score": "0.50229573", "text": "public function groupIds();", "title": "" }, { "docid": "74115066db9b1e32fba36c173a68cd25", "score": "0.50228024", "text": "function doGetOnlineUids()\n {\n // Fetch uids\n $temp = array();\n $uids_online = $this -> doDatabaseQuery(\"SELECT fe_sessions.ses_userid FROM fe_users, fe_sessions WHERE fe_users.uid = fe_sessions.ses_userid AND (fe_users.username LIKE '\" . $letter . \"%' OR fe_users.username LIKE '\" . strtoupper($letter) . \"%')\");\n for ($i = 0; $i < sizeof($uids_online);$i++) {\n $temp[] = $uids_online[$i]['ses_userid'];\n }\n // return\n return $temp;\n }", "title": "" }, { "docid": "b72a984e454d9f9852148f5f8d9b0f1a", "score": "0.50219756", "text": "function get_product_list($product_ids){\n \t$ids = explode(\",\", $product_ids);\n \tif(count($ids) > 0) {\n \t\t$newIds = array();\n \t\tforeach($ids as $id) {\n \t\t\tif(intval($id) > 0) {\n \t\t\t\tarray_push($newIds, intval($id));\n \t\t\t}\n \t\t}\n \t\tif(count($newIds) > 0) {\n \t\t\t$condition = \"WHERE pi.id IN(\" . implode(\",\", $newIds) . \")\";\n \t\t\treturn $this->get_products($condition);\n \t\t}\n \t}\n \t\n \treturn array();\n }", "title": "" }, { "docid": "c3eec0154c343f5259dec0ff70ff53e1", "score": "0.500738", "text": "public function ids()\n {\n return $this->pluck('id')->all();\n }", "title": "" }, { "docid": "87689184ed5d5dd3a64e66f0cff1d7c7", "score": "0.5005304", "text": "public static function getUserids()\n {\n return self::where('status', '!=', 'DELETED')->pluck('uid');\n }", "title": "" }, { "docid": "4af805382b8d9e68b32844765a20094b", "score": "0.5004879", "text": "function get_ids()\n {\n if(count($this->response) == 0)\n {\n return null;\n }\n\n // Expecting a response form the server that lists\n // the ID of each SMS segment on a new line:\n // id: 7392a60b5ad26b138f4b939310b330f0\n // id: 754206ff53e47e05b32d017d5c6b97f4\n // id: a4c5ad77ad6faf5aa55f66a7261abc31\n \t$result = array();\n foreach($this->response as $line)\n {\n $result[] = $this->get_op_result($line);\n }\n\n return $result;\n }", "title": "" }, { "docid": "ea5059e77c49d765302d47822981e949", "score": "0.49920842", "text": "public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(SysLoginGroup::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}", "title": "" }, { "docid": "c9434a8871f8b1e21b1bc6f279a79f7b", "score": "0.4989971", "text": "function get_ids() {\n\t\t$tmpfs_storage_volume_array = array();\n\t\t$query = \"select tmpfs_storage_volume_id from \".$this->_db_table;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute($query);\n\t\tif (!$rs)\n\t\t\t$event->log(\"get_list\", $_SERVER['REQUEST_TIME'], 2, \"tmpfs-storage-volume.class.php\", $db->ErrorMsg(), \"\", \"\", 0, 0, 0);\n\t\telse\n\t\twhile (!$rs->EOF) {\n\t\t\t$tmpfs_storage_volume_array[] = $rs->fields;\n\t\t\t$rs->MoveNext();\n\t\t}\n\t\treturn $tmpfs_storage_volume_array;\n\t}", "title": "" }, { "docid": "4f6f0bd4c1486ac12c39fa800589a10f", "score": "0.49757224", "text": "protected function getIDsFromJSON(array $data) {\n $ids = array();\n if ($this->version == '1.0') {\n foreach ($data as $item) {\n $ids[] = $item['identifier'];\n }\n }\n else {\n $datasets = 0;\n $total = $this->page + $this->offset;\n foreach ($data['dataset'] as $item) {\n if ($datasets < $this->offset) {\n $datasets++;\n continue;\n }\n $uuid = explode(\"\\\\\", $item['identifier']);\n $ids[] = array_pop($uuid);\n $datasets++;\n if ($total && $datasets >= $total) {\n break;\n }\n }\n }\n return $ids;\n }", "title": "" }, { "docid": "c928e7dc52f79b328bb8646cfe509033", "score": "0.49745405", "text": "private function prepareSkusForLocalizeProduct(OdinProduct $product): array\n {\n $skus = [];\n $skusOld = $product->skus;\n // skus, if not published skip it\n foreach ($skusOld as $key => $sku) {\n if (!$sku['is_published']) {\n continue;\n }\n $skus[] = [\n 'code' => $sku['code'],\n 'name' => $sku['name'],\n 'brief' => $sku['brief'],\n 'has_battery' => $sku['has_battery'],\n 'quantity_image' => $sku['quantity_image'],\n ];\n }\n return $skus;\n }", "title": "" }, { "docid": "56d4c26ee05de1afc536776f519e4ac1", "score": "0.49743754", "text": "public function getCategoryProductsBySku($sku);", "title": "" }, { "docid": "dafc0a8b0a29fb335df65bd73ee28778", "score": "0.49565935", "text": "public static function get_ids($include_nologin = false, $include_unapproved = false){\n\n // Redirect this shortcut request to full internal function\n return self::get_field_values('user_id', $include_nologin, $include_unapproved);\n\n }", "title": "" }, { "docid": "07d8225dd4311d112ff3286e750b220e", "score": "0.49554116", "text": "public function generateSku($items) {\n\t $itemCollection = Item::connection()->connection->items;\n\t // Logger::debug(\"Going generate skus for {$items->count()} items\");\n\t foreach ($items as $item) {\n\t \tLogger::debug(\"Generating skus for {$item['description']} ({$item['_id']}) from event {$item['event'][0]} :\");\n\t\t\t$sku_details = array();\n\t\t\t$skus = array();\n\t\t\t$shacount = 0;\n\t\t\t#get sizes\n\t\t\t$sizes = array_keys($item['details']);\n\t\t\tforeach($sizes as $size) {\n\t\t\t\t$sku = Item::getUniqueSku($item['vendor'], $item['vendor_style'], $size, $item['color']);\n\t\t\t\t$sku_details[$size] = $sku;\n\t\t\t\t$skus[] = $sku;\n\t\t\t}\n\t\t\tLogger::debug(\"Saving sku details and skus\");\n\t\t\t$itemCollection->update(\n\t\t\t\tarray('_id' => $item['_id']),\n\t\t\t\tarray('$set' => array('sku_details' => $sku_details ))\n\t\t\t);\n\t\t\t$itemCollection->update(\n\t\t\t\tarray('_id' => $item['_id']),\n\t\t\t\tarray('$set' => array('skus' => $skus ))\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c10b76ec984c28b98e00b7ca23ae921b", "score": "0.49551964", "text": "public function getMultiple(&$cids);", "title": "" }, { "docid": "c3dfc355f241631ae7990ce19a0f71da", "score": "0.4954091", "text": "public function getIds()\n {\n return $this->_backend->getIds();\n }", "title": "" }, { "docid": "19a352c0c7bc8240b1d528e323e53292", "score": "0.4949603", "text": "public function getDeletedItemsSku()\n {\n /** @var \\Magento\\AdvancedCheckout\\Model\\Cart $cart */\n $cart = $this->cartFactory->create();\n $cart->setSession($this->sessionQuote);\n $skus = [];\n foreach ($cart->getFailedItems() as $item) {\n if ($item['code'] == \\Magento\\AdvancedCheckout\\Helper\\Data::ADD_ITEM_STATUS_FAILED_SKU) {\n $skus[] = $item['item']['sku'];\n }\n }\n return $skus;\n }", "title": "" }, { "docid": "1a23b6388980a5ac12b440dd88f98dbe", "score": "0.4948139", "text": "function tr_sku_search_helper($wp){\n // Clayton Kriesel [Three Remain Production]\n global $wpdb;\n\n //Check to see if query is requested\n if( !isset( $wp->query['s'] ) || !isset( $wp->query['post_type'] ) || $wp->query['post_type'] != 'product') return;\n $sku = $wp->query['s'];\n $ids = $wpdb->get_col( $wpdb->prepare(\"SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value = %s;\", $sku) );\n if ( ! $ids ) return;\n unset( $wp->query['s'] );\n unset( $wp->query_vars['s'] );\n $wp->query['post__in'] = array();\n foreach($ids as $id){\n $post = get_post($id);\n if($post->post_type == 'product_variation'){\n $wp->query['post__in'][] = $post->post_parent;\n $wp->query_vars['post__in'][] = $post->post_parent;\n } else {\n $wp->query_vars['post__in'][] = $post->ID;\n }\n }\n}", "title": "" }, { "docid": "f89752a4e0f51b884ea11f3b151fba81", "score": "0.4946076", "text": "public function selectIdStates() {\n $sql = \"SELECT DISTINCT id_stav FROM klienti;\";\n $result = self::myQuery($sql);\n $id_states = array();\n while($row = mysqli_fetch_assoc($result)) {\n $id_states[] = $row['id_stav'];\n }\n return $id_states;\n }", "title": "" }, { "docid": "cd5d2a8578db5bee3fcab5481fa337d5", "score": "0.49452776", "text": "public function getExcludeProductIds()\n {\n return array();\n }", "title": "" }, { "docid": "9e7a30bf0b6f841a329b92d900886916", "score": "0.49423647", "text": "function getAsinBySku($sku) {\n\n $sku = $sku . '-XL-F-CUSTOM';\n\n\n\n /*\n\n https://mws.amazonservices.com/Products/2011-10-01\n\n ?AWSAccessKeyId=AKIAEXAMPLEFWR4TJ7ZQ\n\n &Action=GetMatchingProductForId\n\n &SellerId=A1IMEXAMPLEWRC\n\n &SignatureVersion=2\n\n &Timestamp=2012-12-04T21%3A09%3A02Z\n\n &Version=2011-10-01\n\n &Signature=ZhhdEXAMPLEiTy6k5etzw%2BIOCvbDrGop5u9EXAMPLE8%3D\n\n &SignatureMethod=HmacSHA256\n\n &MarketplaceId=ATVPDKIKX0DER\n\n &IdType=ISBN\n\n &IdList.Id.1=9781933988665\n\n &IdList.Id.2=0439708184\n\n */\n\n\n\n $amazonUrl = 'https://mws.amazonservices.co.uk/Products/2011-10-01';\n\n\n\n $marketplaceIds = $this->getContainer()->getParameter('amazon.sites.uk.marketplace_ids');\n\n\n\n $urlParams = array(\n\n 'AWSAccessKeyId' => $this->getContainer()->getParameter('amazon.sites.uk.aws_access_key_id'),\n\n 'Action' => 'GetMatchingProductForId',\n\n 'SellerId' => $this->getContainer()->getParameter('amazon.sites.uk.merchant_id'),\n\n 'SignatureVersion' => '2',\n\n 'Timestamp' => gmdate(\"Y-m-d\\TH:i:s\\Z\"),\n\n 'Version' => '2011-10-01',\n\n // 'Signature' => $signature,\n\n 'SignatureMethod' => 'HmacSHA256',\n\n 'MarketplaceId' => $marketplaceIds[0],\n\n 'IdType' => 'SellerSKU',\n\n 'IdList.Id.1' => $sku\n\n );\n\n\n\n ksort($urlParams);\n\n\n\n // @todo http://docs.developer.amazonservices.com/en_UK/dev_guide/DG_ClientLibraries.html#DG_OwnClientLibrary__Signatures\n\n // @todo AWS Client line 1283\n\n\n\n $stringToSign = \"POST\\n\"\n\n . \"mws.amazonservices.co.uk\\n\"\n\n . \"/Products/2011-10-01\\n\"\n\n . http_build_query($urlParams);\n\n\n\n $secret = $this->getContainer()->getParameter('amazon.sites.uk.aws_secret_access_key');\n\n\n\n $hmacSignature = hash_hmac('sha256', $stringToSign, $secret);\n\n\n\n echo \"stringToSign: $stringToSign\" . PHP_EOL;\n\n echo \"HmacSHA256: \" . $hmacSignature . PHP_EOL;\n\n echo \"Base64HMAC: \" . base64_encode(hash_hmac('sha256', $stringToSign, $secret, true)) . PHP_EOL;\n\n\n\n $urlParams['Signature'] = base64_encode(hash_hmac('sha256', $stringToSign, $secret, true));\n\n\n\n $ch = curl_init();\n\n\n\n //set the url, number of POST vars, POST data\n\n curl_setopt($ch, CURLOPT_URL, $amazonUrl);\n\n curl_setopt($ch, CURLOPT_POST, count($urlParams));\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($urlParams));\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n // curl_setopt($ch, CURLOPT_USERAGENT, 'Aardvark-Admin/0.1 (Language=PHP; Host=iconwallstickers.co.uk)');\n\n //execute post\n\n $result = curl_exec($ch);\n\n // print $result;\n\n\n\n if (preg_match('/\\<ASIN\\>([A-Z0-9])\\<\\/ASIN\\>/', $result, $match)) {\n\n echo __METHOD__ . \"(sku=$sku): Found ASIN: \" . $match[1] . PHP_EOL;\n\n return $match[1];\n\n } else {\n\n echo __METHOD__ . \"(sku=$sku): ASIN Not found. Does the product exist?\" . PHP_EOL;\n\n return null;\n\n }\n\n}", "title": "" }, { "docid": "d65080086341b745f876ce6f80e23a4a", "score": "0.49417445", "text": "function Sql_Select_IDs($ids,$fields,$orderby=\"\",$postprocess=FALSE,$table=\"\")\n {\n return $this->Sql_Select_Hashes\n (\n array\n (\n \"ID\" => \"IN ('\".join(\"', '\",$ids).\"')\"\n ),\n $fields,\n $orderby,\n $postprocess,\n $table \n );\n }", "title": "" } ]
887fa4447e0d5ad7f7896ec8ccc8ff2c
endregion Members, properties, fields, static resources
[ { "docid": "315d5980a3f368f19788ba773c6553ec", "score": "0.0", "text": "public function __construct($localization_manager) {\r\n $this->localizationManager = $localization_manager;\r\n parent::__construct();\r\n }", "title": "" } ]
[ { "docid": "1cba85d71aaae163c3b8c5c0c8350a4b", "score": "0.5853004", "text": "final public static function finalPublicStaticFuntion()\n {\n }", "title": "" }, { "docid": "39f616afb719d4ac5e8a0c36bdd49ab7", "score": "0.5669718", "text": "public function setupResources();", "title": "" }, { "docid": "2229a76a056e02a56563530b0f341dcb", "score": "0.5585844", "text": "public function init() {\r\n\r\n // title setting\r\n $this->title = 'Library Resources';\r\n\r\n /* END EDITABLE SECTION 2\r\n *************************/\r\n }", "title": "" }, { "docid": "6aca94f51e0a290b3174129eff4ef2e5", "score": "0.5534941", "text": "protected static function init(){}", "title": "" }, { "docid": "c5e99d615ad9081af98ca6c4257dabd9", "score": "0.5517605", "text": "protected static function _init()\n {\n /**\n * If you want to call the Common's _init to bring any shared code online,\n * then uncomment the following line.\n */\n// parent::_init();\n\n /**\n * This functions a lot like a __construct in a instantiated class.\n */\n\n // Add the getFooter method to admin_footer action.\n add_action('admin_footer', [static::$_class, 'getFooter']);\n }", "title": "" }, { "docid": "cd8a42cb3e85fc5237afcdbbf125d698", "score": "0.5488022", "text": "function opinionstage_help_resource_load_footer(){\n}", "title": "" }, { "docid": "8ba8985caaf7d248d43fb49a120f9b3b", "score": "0.54828703", "text": "function properties()\n\t{\n\t\tparent::properties();\n\n\t\t// BUTTONS\n\t\t$this->tpl->setVariable(\"BTN1_NAME\",\"addTranslation\");\n\t\t$this->tpl->setVariable(\"BTN1_TEXT\",$this->lng->txt(\"cont_new_assignment\"));\n\t\t\n\t\tif($trs = $this->object->getTranslations())\n\t\t{\n\t\t\tinclude_once \"./Services/Object/classes/class.ilObjectFactory.php\";\n\t\t\tforeach($trs as $tr)\n\t\t\t{\n\t\t\t\t$tmp_obj = ilObjectFactory::getInstanceByRefId($tr);\n\t\t\t\t$this->tpl->setCurrentBlock(\"TRANSLATION_ROW\");\n\t\t\t\t$this->tpl->setVariable(\"ROW_ID\",$tr);\n\t\t\t\t$this->tpl->setVariable(\"ROW_TITLE\",$tmp_obj->getTitle());\n\t\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t\t\n\t\t\t\tunset($tmp_obj);\n\t\t\t}\n\t\t\t$this->tpl->setVariable(\"BTN2_NAME\",\"deleteTranslation\");\n\t\t\t$this->tpl->setVariable(\"BTN2_TEXT\",$this->lng->txt(\"cont_del_assignment\"));\n\t\t}\n\t\t$this->tpl->setCurrentBlock(\"TRANSLATION\");\n\t\t$this->tpl->setVariable(\"TRANSLATION_HEADER\",$this->lng->txt(\"cont_translations\"));\n\t\t$this->tpl->parseCurrentBlock();\n\t}", "title": "" }, { "docid": "6344116651e10a5a7372df151a257786", "score": "0.54544395", "text": "public function DefineJsResources()\n {\n $this->carabiner->js(array(\n array('/libs/jquery/jquery.js'),\n array('/libs/bootstrap/bootstrap.min.js'),\n array('/libs/fontawesome/all.js')\n ));\n }", "title": "" }, { "docid": "4cb7d7b9b21b7730de57628b705a3961", "score": "0.54274964", "text": "public static function init()\n {\n\n }", "title": "" }, { "docid": "9998c8321d7162dbb2934ff6e88e687a", "score": "0.5422964", "text": "public static function init() {\n \n }", "title": "" }, { "docid": "475fcae2a14c5e159cb68f6eaa0692cf", "score": "0.5379581", "text": "function __construct()\t{\n\t\t//that intialised in the parent class\n\t\tparent::__construct();\n\n\t\t//specify the regions that exist in the template file\n\t\t//note the region names in the template must be exactly\n\t\t//the same as the regions named. Also a region name must\n\t\t//be unique in a template\n\t\t$this->regions[]\t\t=\t'region1';\t//the region where student information is usually displayed\n\t\t$this->regions[]\t\t=\t'region2';\t//the region where ilp information is displayed\n\n\t}", "title": "" }, { "docid": "8327e9eabce40fd11d3715c9be01b2d4", "score": "0.5340248", "text": "protected function getInitializePropertiesMethod()\n {\n return <<<EOF\n/**\n * initialize properties.\n * called in the constructor to add default properties.\n */\nprotected function initializeProperties()\n{\n}\nEOF;\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.5334368", "text": "private function __() {\n }", "title": "" }, { "docid": "ddbcd390b3b0649c1209be973c0f5f79", "score": "0.5310609", "text": "protected function properties()\n {\n ;\n }", "title": "" }, { "docid": "76ecdc18adba46843b81be4770cf888a", "score": "0.5306262", "text": "abstract public function get_resources();", "title": "" }, { "docid": "2c5d42ee9f28438e6767b7e4a495115a", "score": "0.53019786", "text": "static private function staticPrivateFuntion()\n {\n // note: static is normally supposed to follow public/private\n }", "title": "" }, { "docid": "269570fd5066aa9e1e4ebbbaf5cf63f5", "score": "0.5289704", "text": "function __custructor() \n {\n parent::__custructor();\n }", "title": "" }, { "docid": "c4c8daccad56b42130303859bb1fd315", "score": "0.5286949", "text": "public function _init()\n {\n }", "title": "" }, { "docid": "b6eff07b512cca9d3c04def0c3dd19b2", "score": "0.5277566", "text": "public function load_resources() {\r\n\r\n\t}", "title": "" }, { "docid": "bf14095236a1885b30a3e95e0632dde9", "score": "0.52682835", "text": "protected function _init() {}", "title": "" }, { "docid": "6d7e0eac47e4c2df89bc46404eca60b8", "score": "0.52674747", "text": "public function init ()\n {\n }", "title": "" }, { "docid": "6d7e0eac47e4c2df89bc46404eca60b8", "score": "0.52674747", "text": "public function init ()\n {\n }", "title": "" }, { "docid": "6d7e0eac47e4c2df89bc46404eca60b8", "score": "0.52674747", "text": "public function init ()\n {\n }", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5265344", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5265344", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5265344", "text": "protected function init() {}", "title": "" }, { "docid": "4a22ac82d9fdd1fc254aa076ac82952e", "score": "0.52450514", "text": "final private function __construct()\n {\n static::init();\n }", "title": "" }, { "docid": "04c63e25a395f39fd8984ecb59315464", "score": "0.5223372", "text": "protected function defineResources()\n {\n $this->loadViewsFrom(SPARK_PATH.'/resources/views', 'spark');\n\n $this->loadTranslationsFrom(SPARK_PATH.'/resources/lang', 'spark');\n\n if ($this->app->runningInConsole()) {\n $this->defineViewPublishing();\n\n $this->defineAssetPublishing();\n\n $this->defineLanguagePublishing();\n\n $this->defineFullPublishing();\n }\n }", "title": "" }, { "docid": "782eb4d66307c626318a98e8720de33e", "score": "0.5216846", "text": "public static function finalize()\n {\n\n }", "title": "" }, { "docid": "c9c787ae6feb278d18f9f3c991cc1959", "score": "0.517957", "text": "private function init()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "e40f16acab92e9441aefb65017e0ea81", "score": "0.5175887", "text": "public static function init() {\n /**\n * Nothin' yet!\n */\n }", "title": "" }, { "docid": "f8cae437e1b6e5df5995126e6a794ea2", "score": "0.51696587", "text": "public function __init() {\n\t}", "title": "" }, { "docid": "a41261d9a45dadc9e3af4d30720d682a", "score": "0.51618856", "text": "protected function _init()\n {\n\n }", "title": "" }, { "docid": "995f80380571c4cc2033e21760936582", "score": "0.5156892", "text": "protected function initialization()\n {\n $this->parent_instance = DiviRoids_Modules();\n $this->url_css = DIVIROIDS_PLUGIN_ASSETS_CSS_URL;\n $this->url_js = DIVIROIDS_PLUGIN_ASSETS_JS_URL;\n $this->has_js = true;\n $this->has_css = true;\n }", "title": "" }, { "docid": "cc2bb85739f74f593455fad171a83307", "score": "0.51543504", "text": "abstract protected function getResourceObject();", "title": "" }, { "docid": "43d0b1725d7b5d39b79514156994f7b6", "score": "0.51493514", "text": "function get_resources() {\n\t\t// Write JS to change the form submit type if there aren't any filters.\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script($this->prefix.'profile-photo', admin_url('?'.$this->action.'=js'), array('jquery'), $this->ver);\n\t\tglobal $wp_scripts;\n\t\t$wp_scripts->localize($this->prefix.'profile-photo', 'cfuppObj', array(\n\t\t\t'prefix' => $this->prefix,\n\t\t\t'deleteEndpoint' => admin_url(),\n\t\t\t'deleteLinkId' => 'delete_profile_photo',\n\t\t\t'deleteErrorMsg' => __('An error occurred trying to remove your profile photo.', $this->text_domain),\n\t\t\t'cf_action' => $this->action,\n\t\t));\n\t}", "title": "" }, { "docid": "a90e7f40d0cd491a884f041006c063c1", "score": "0.5139497", "text": "public static function staticInit();", "title": "" }, { "docid": "cae4c63951a432d135f459e9f6ec9a55", "score": "0.51341385", "text": "public function init() {\n\t\t$this->license_uri_helpers();\n\t}", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.5133241", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.5133241", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "7b571a8681974c8d95d8615337fdf262", "score": "0.5123311", "text": "public static function init() {\n\t\tPUM_ALM_Site_Assets::init();\n\n\t}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.51222426", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.51222426", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.51222426", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.51222426", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.51222426", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.51222426", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.51222426", "text": "public function init() {}", "title": "" }, { "docid": "230a74c75c729b6900789f83bc5f3149", "score": "0.51210564", "text": "protected static function init()\n {\n }", "title": "" }, { "docid": "60401afe27b434efa451c892da934ea9", "score": "0.51136124", "text": "protected function defineResources()\n {\n // SITE requests cannot view Kilvin resources, s'il vous plait\n if (defined('KILVIN_REQUEST') && in_array(KILVIN_REQUEST, ['SITE', 'CP', 'CONSOLE'])) {\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'kilvin');\n $this->loadTranslationsFrom(__DIR__.'/../../resources/language', 'kilvin');\n }\n\n if ($this->app->runningInConsole()) {\n $this->defineViewPublishing();\n $this->defineAssetPublishing();\n $this->defineLanguagePublishing();\n $this->defineFullPublishing();\n }\n }", "title": "" }, { "docid": "b3df0fa291c9ac8a767d93d3c1364f64", "score": "0.51021975", "text": "function asset_resource()\n {\n return Asset::resource();\n }", "title": "" }, { "docid": "d0073ead02e26eab1b1fe21e7a532b65", "score": "0.51018345", "text": "public static function footer()\r\n {\r\n }", "title": "" }, { "docid": "b85fcf46d32e9e01933567b840814397", "score": "0.5095925", "text": "public static function static_init()\n\t{\n\t\tself::$CONSTRUCT_NAME = new CaseInsensitiveString(\"__construct\");\n\t\tself::$DESTRUCT_NAME = new CaseInsensitiveString(\"__destruct\");\n\t\tself::$TO_STRING_NAME = new CaseInsensitiveString(\"__toString\");\n\t\tself::$CLONE_NAME = new CaseInsensitiveString(\"__clone\");\n\t}", "title": "" }, { "docid": "6053ffc557a5bf4869a1be0247a58ab5", "score": "0.5095487", "text": "static public function init() {\n\n\t\t// page vars\n\t\tself::$title = 'Salesforce Authorization';\n\t\tself::$slug = 'chief-sfc-settings';\n\n\t\t// the names of our stored settings arrays\n\t\tself::$client_setting = 'chief_sfc_settings';\n\t\tself::$tokens_setting = 'chief_sfc_authorization';\n\n\t\tself::add_actions();\n\n\t}", "title": "" }, { "docid": "7bd5b047805088e0e5af807609d1b222", "score": "0.50874776", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.5086785", "text": "public function init()\n {\n }", "title": "" } ]
4db29c19c8366d7630d895100bfab20a
Make a state data factory using caching target_data models.
[ { "docid": "17c703d8c2d7ac4bfa88ebddee02f6b5", "score": "0.66087794", "text": "protected function makeStateDataFactoryFrom(ArrayObject $models)\n\t{\n\t\tif (!$this->target_data_type_model instanceof OLP_IModel)\n\t\t{\n\t\t\t// assumption here is that types of target data the factory \n\t\t\t// is interested in won't change.\n\t\t\t$this->target_data_type_model = $this->newCachedTargetDataTypeModel();\n\t\t}\n\n\t\t$data_type_ids = array();\n\n\t\tforeach ($this->target_data_type_model->loadAllBy() as $type) \n\t\t{\n\t\t\t$data_type_ids[] = $type->target_data_type_id;\n\t\t}\n\t\t\n\t\treturn new OLPBlackbox_Factory_TargetStateData(\n\t\t\t$this->newCachedTargetDataModel($models, $data_type_ids), \n\t\t\t$this->target_data_type_model\n\t\t);\n\t}", "title": "" } ]
[ { "docid": "59a82d3df56648d0f2bce036f1ee3c8b", "score": "0.64914423", "text": "protected function newCachedTargetDataTypeModel()\n\t{\n\t\t$target_data_type_model = $this->getModelFactory()->getModel('TargetDataType');\n\t\t\n\t\t$relevant_data_types = $target_data_type_model->loadAllBy(\n\t\t\tarray('name' => OLPBlackbox_Factory_TargetStateData::relevantFactoryKeys())\n\t\t);\n\t\t\n\t\t$target_data_type_cache = new Cache_Model_InMemory();\n\t\t$target_data_type_cache->setCache($relevant_data_types);\n\t\t\n\t\t\n\t\treturn new OLP_Models_Cacheable(\n\t\t\t$target_data_type_model, $target_data_type_cache\n\t\t);\n\t}", "title": "" }, { "docid": "5b7aea6ec893b51db39aade874c77438", "score": "0.638577", "text": "protected function newCachedTargetDataModel($models, $target_data_type_ids)\n\t{\n\t\t$target_data_cache = new Cache_Model_InMemory();\n\t\t$target_data_model = $this->getModelFactory()->getModel('TargetData');\n\t\t$relevant_target_data = array();\n\t\t\n\t\t$target_ids = $this->getIdsFromModelsAndChildren($models);\n\t\tif ($target_ids && $target_data_type_ids)\n\t\t{\n\t\t\t$relevant_target_data = $target_data_model->loadAllBy(\n\t\t\t\tarray('target_id' => $target_ids, 'target_data_type_id' => $target_data_type_ids)\n\t\t\t);\n\t\t}\n\t\t\n\t\t$target_data_cache->setCache($relevant_target_data);\n\t\t\n\t\treturn new OLP_Models_Cacheable($target_data_model, $target_data_cache);\n\t}", "title": "" }, { "docid": "06325d158d6071c96f7ebc057c2e50ce", "score": "0.57629865", "text": "public function create(array $data) : State;", "title": "" }, { "docid": "da5048198026c09756a84edd93c8dc4e", "score": "0.53553873", "text": "public function createNew(): StatefulInterface\n {\n $cls = $this->entityRegistry->getEntityByHigh(static::getHigh());\n $r = new $cls;\n if ($this instanceof InitEntityInterface) {\n foreach ($this->initSteps() as $step) {\n $step($r);\n }\n }\n return $r;\n }", "title": "" }, { "docid": "0aab12855616b43c75ec5ffb89644ff7", "score": "0.5316287", "text": "abstract public function modelFactory();", "title": "" }, { "docid": "0893a0817c9b915d9809c3842f0390d7", "score": "0.514834", "text": "public function makeData()\n { \n factory(User::class, 1)->create([\n 'username' => 'admin',\n 'password' => bcrypt('admin'),\n 'is_active' => 1,\n 'is_admin' => 1,\n 'full_name' => 'Admin'\n ]);\n factory(User::class, 1)->create([\n 'username' => 'user1',\n 'password' => bcrypt('user1'),\n 'is_active' => 1,\n 'is_admin' => 0,\n 'full_name' => 'User1'\n ]);\n factory(User::class, 1)->create([\n 'username' => 'user2',\n 'password' => bcrypt('user2'),\n 'is_active' => 0,\n 'is_admin' => 0,\n 'full_name' => 'User2'\n ]);\n }", "title": "" }, { "docid": "d07e8214b06244c1f9ad5fc62ec20e58", "score": "0.51400137", "text": "public static function __set_state(array $data)\n {\n $metadata = new static();\n\n foreach ($data as $key => $value) {\n $metadata->$key = $value;\n }\n\n return $metadata;\n }", "title": "" }, { "docid": "4cb98aeb99a708b55478dff95e1bc478", "score": "0.51190424", "text": "protected function makeState(\n int $id,\n ?int $previous = null,\n $createdAt = null,\n $expiresAt = null\n ): State {\n $createdAt = $createdAt ?? Date::now();\n\n return $this->getStateFactory()->make(\n $id,\n $previous,\n $createdAt,\n $expiresAt\n );\n }", "title": "" }, { "docid": "3dce1342a8fb1a8cac4dd8a020362310", "score": "0.50927055", "text": "protected function baseData()\n {\n $this->organisation = factory(Organisation::class)->create();\n $this->survey = factory(Questionnaire::class)->create();\n }", "title": "" }, { "docid": "b01fd1c0cbd620b482ff52b4a79c65c4", "score": "0.5063856", "text": "protected function getStatemachineFactory()\n {\n $detector = new Detector();\n $factory = new Factory($detector, $detector);\n $factory->attachStatemachineObserver($this);\n\n return $factory;\n }", "title": "" }, { "docid": "67e7e41e4ff07d5f5de0b679f26aef7a", "score": "0.50635576", "text": "public static function constructFromData( $data, $updateMultitonStoreIfExists = TRUE )\n\t{\t\t\n\t\t/* Initiate an object */\n\t\tif ( $data['app'] )\n\t\t{\n\t\t\t$classname = 'IPS\\\\' . $data['app'] . '\\tasks\\\\' . $data['key'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$plugin = \\IPS\\Plugin::load( $data['plugin'] );\n\t\t\trequire_once \\IPS\\ROOT_PATH . '/plugins/' . $plugin->location . '/tasks/' . $data['key'] . '.php';\n\t\t\t$classname = 'IPS\\pluginTasks\\\\' . $data['key'];\n\t\t\t\\IPS\\IPS::monkeyPatch( 'IPS\\pluginTasks', $data['key'] );\n\t\t}\n\t\t\n\t\t$obj = new $classname;\n\t\t$obj->_new = FALSE;\n\t\t\n\t\t/* Import data */\n\t\tforeach ( $data as $k => $v )\n\t\t{\n\t\t\tif( static::$databasePrefix )\n\t\t\t{\n\t\t\t\t$k = \\substr( $k, \\strlen( static::$databasePrefix ) );\n\t\t\t}\n\t\t\t\n\t\t\t$obj->_data[ $k ] = $v;\n\t\t}\n\t\t$obj->changed = array();\n\t\t\t\t\n\t\t/* Return */\n\t\treturn $obj;\n\t}", "title": "" }, { "docid": "829e7d8f12a1e63ba1531444dcc9880d", "score": "0.5062008", "text": "protected function makeModel()\n {\n return factory(Employee::class)->create();\n }", "title": "" }, { "docid": "fbfc2c849435c500200e5fa4a05b04ce", "score": "0.50584304", "text": "public function run()\n {\n factory(\\App\\CachedData::class, 20)->create();\n factory(\\App\\User::class, 4)->create();\n factory(\\App\\Client::class, 20)->create();\n\n// factory(\\App\\PriceList::class, 50)->create()->each(function ($equipment) {\n// factory(\\App\\PriceListLog::class, 1)->create(['price_list_id' => $equipment->id]);\n// });\n\n// factory(\\App\\Order::class, 50)->create()->each(function ($order) {\n// factory(\\App\\OrderLog::class, 1)->create(['order_id' => $order->id]);\n// });\n }", "title": "" }, { "docid": "ed1ae39fb5ba56fd78d93287bb88dd02", "score": "0.5040528", "text": "private function initData()\n {\n $data = $this->cache->load($this->cacheId);\n if (false === $data) {\n /** @var Definition $reader */\n $reader = $this->readerFactory->create();\n $data = $reader->read();\n $this->cache->save($this->serializer->serialize($data), $this->cacheId);\n } else {\n $data = $this->serializer->unserialize($data);\n }\n\n if (!empty($data)) {\n $this->data = $this->evaluateComponentArguments($data);\n }\n }", "title": "" }, { "docid": "5a09b3ca498a79acb06987b7f1bec0eb", "score": "0.50272846", "text": "protected function initModel()\n {\n if (trim($this->targetState) === '') {\n throw new yii\\web\\BadRequestHttpException('Target state cannot be empty');\n }\n\n /** @var IStateful|\\netis\\crud\\db\\ActiveRecord $model */\n $model = new $this->controller->modelClass;\n if (!$model instanceof IStateful) {\n throw new yii\\base\\InvalidConfigException(\n Yii::t('netis/fsm/app', 'Model {model} needs to implement the IStateful interface.', [\n 'model' => $this->modelClass,\n ])\n );\n }\n\n $model->scenario = IStateful::SCENARIO;\n $model->{$model->stateAttributeName} = $this->getSourceState($model);\n\n return $model;\n }", "title": "" }, { "docid": "c9bcd48128b84abbfc67cae2546a6a5b", "score": "0.5002848", "text": "protected function getStateData(Blackbox_Models_IReadableTarget $target_model)\n\t{\n\t\t$state_data = NULL;\n\t\t$tier_number = NULL;\n\t\t\n\t\tif ($this->getFactoryConfig()->getTierNumber($target_model->property_short))\n\t\t{\n\t\t\t$tier_number = $this->getFactoryConfig()->getTierNumber($target_model->property_short);\n\t\t}\n\t\telseif ($this->getFactoryConfig()->isPreferredTier($target_model))\n\t\t{\n\t\t\t$tier_number = 1;\n\t\t}\n\n\t\tif ($tier_number !== NULL)\n\t\t{\n\t\t\t$state_data = new OLPBlackbox_TargetCollectionStateData(\n\t\t\t\tarray('tier_number' => $tier_number)\n\t\t\t);\n\t\t}\n\n\t\treturn $state_data;\n\t}", "title": "" }, { "docid": "dd8a21e0b3b69fc4694bcabec888b77a", "score": "0.49991614", "text": "public function Factory (){\n\t\t\n\t\t// create all the singletons\n\t\t$this->singletonCache['ToDoService'] = new ToDoService();\n\t\t$this->singletonCache['Controller'] = new Controller( $this->singletonCache['ToDoService']);\n\t}", "title": "" }, { "docid": "7f0cad6024f7cb98ece67d7d59405fb7", "score": "0.4979544", "text": "public function run()\n {\n /*$datas = ['Pedido','Promessa','Execução','Afirmação','Aceitação'];\n\n foreach ($datas as $data) {\n $new = factory(TState::class, 1)->create();\n\n factory(TStateName::class, 1)->create([\n 't_state_id' => $new->id, \n 'name' => $data,\n 'language_id' => App\\Language::where('slug', 'pt')->first()->id,\n 'updated_by' => $new->updated_by,\n ]);\n }*/\n \n //Fazendo seeds ao modo antigo\n $dados = [\n [\n 'id' => '1',\n 'updated_by' => '1',\n 'deleted_by' => NULL\n ],\n [\n 'id' => '2',\n 'updated_by' => '1',\n 'deleted_by' => NULL\n ],\n [\n 'id' => '3',\n 'updated_by' => '1',\n 'deleted_by' => NULL\n ],\n [\n 'id' => '4',\n 'updated_by' => '1',\n 'deleted_by' => NULL\n ],\n [\n 'id' => '5',\n 'updated_by' => '1',\n 'deleted_by' => NULL\n ]\n\n ];\n\n foreach ($dados as $value) {\n TState::create($value);\n }\n }", "title": "" }, { "docid": "efe29dbdcaf29bf5c22b46810ad5f029", "score": "0.4969305", "text": "public function testLazyCreate()\n {\n $context = [\n 'namespace' => 'axy\\creator\\tests\\tst',\n 'args' => [1, 2],\n ];\n $pointer = ['Target', [3, 4]];\n $count = Target::$count;\n $lazy = new Lazy($context, $pointer);\n $this->assertSame($count, Target::$count);\n $target = $lazy();\n $this->assertSame($count + 1, Target::$count);\n $target2 = $lazy();\n $this->assertSame($count + 1, Target::$count);\n $this->assertInstanceOf('axy\\creator\\tests\\tst\\Target', $target);\n $this->assertEquals([1, 2, 3, 4], $target->args);\n $this->assertSame($target, $target2);\n }", "title": "" }, { "docid": "008ec991853d348cc3b1fdbace863293", "score": "0.4968077", "text": "public function run()\n {\n $id = 1;\n Person::factory()->state([\n 'user_id' => $id\n ])->count(3)->has(\n Posting::factory()->state([\n 'user_id' => $id\n ])->count(3)\n )->create();\n\n $id = 2;\n Person::factory()->state([\n 'user_id' => $id\n ])->count(3)->has(\n Posting::factory()->state([\n 'user_id' => $id\n ])->count(3)\n )->create();\n }", "title": "" }, { "docid": "e8175c869e86830b2fa739f0991e50df", "score": "0.4963043", "text": "public static function factory() {\n // the current state, but it can be extended in any way\n return new self;\n }", "title": "" }, { "docid": "da28c367ccc24eca4cf5f74cfa495511", "score": "0.4939734", "text": "public function definition()\n {\n\n $dt = $this->faker->dateTimeBetween($startDate = 'now', $endDate = '+3 months');\n $date = $dt->format(\"Y-m-d\"); // 1994-09-24\n return [\n //'user_id' => User::factory(),\n 'board_id' => Board::factory(),\n 'title' => $this->faker->sentence,\n 'description' => $this->faker->paragraph,\n 'due_date' => $date,\n 'state' => $this->faker->randomElement(['todo' ,'ongoing', 'done']),\n 'category_id' => Category::factory(), \n 'created_at' => now(),\n 'updated_at' => now(),\n\n ];\n }", "title": "" }, { "docid": "ceb531878b3630d49e37f248b10b7202", "score": "0.4912275", "text": "public static function factory($data = NULL){\n return parent::factory($data);\n }", "title": "" }, { "docid": "dd03894ad5fce2cbf8e164bea870444c", "score": "0.48981002", "text": "protected function getNewWeatherCache(): WeatherCache {\n return new WeatherCache();\n }", "title": "" }, { "docid": "40a4352fae069c3380c53b68c7a310de", "score": "0.488159", "text": "public function createCache()\n {\n $cache = new Cache($this->cacheFile);\n $router = new Router($cache, new UrlTools());\n\n $table = $router->getRoutingTable($this->resources);\n $cache->set(\"router\", $table);\n }", "title": "" }, { "docid": "17cb7f20bb969f3669c90845d34a867b", "score": "0.4871592", "text": "public function factory();", "title": "" }, { "docid": "fcc51862ef3ab09af24a2a110b19893d", "score": "0.48463002", "text": "static public function make()\n {\n if(!isset(self::$cache)){\n $ioc = IoC::getInstance();\n $repository = $ioc->make(Repository::class);\n self::$cache = $repository;\n }\n\n return self::$cache;\n }", "title": "" }, { "docid": "9af0fb5a7158774b966bfcdc906b5df2", "score": "0.48462915", "text": "public function getFactory();", "title": "" }, { "docid": "9af0fb5a7158774b966bfcdc906b5df2", "score": "0.48462915", "text": "public function getFactory();", "title": "" }, { "docid": "9af0fb5a7158774b966bfcdc906b5df2", "score": "0.48462915", "text": "public function getFactory();", "title": "" }, { "docid": "df81ca26a666facf49dabfaf439ef29a", "score": "0.4843157", "text": "public function fetched()\n {\n return $this->state(function (array $attributes) {\n return [\n 'region' => $this->faker->city,\n 'country' => $this->faker->country,\n 'latitude' => $this->faker->latitude,\n 'longitude' => $this->faker->longitude,\n 'timezone' => $this->faker->timezone,\n 'organization' => $this->faker->company,\n 'as' => $this->faker->bs,\n 'use_mobile_connection' => $this->faker->boolean,\n 'use_proxy' => $this->faker->boolean,\n 'status' => 1,\n ];\n });\n }", "title": "" }, { "docid": "9ccc9a34341bb09379886cb1201cf0c8", "score": "0.48028284", "text": "protected function getDL(): object\n {\n return new TestDataLayer();\n }", "title": "" }, { "docid": "31a421200130da9357970bc71f322027", "score": "0.4788891", "text": "public function makeData()\n {\n factory(User::create([\n 'username' => 'user1',\n 'password' => bcrypt('user1'),\n 'email' => 'user1@gmail.com',\n 'full_name' => 'User1',\n 'phone' => '0123456789',\n 'is_active' => 1,\n 'is_admin' => 0\n ])\n );\n }", "title": "" }, { "docid": "07838df49145ee7bac401fe6d60b5c87", "score": "0.477727", "text": "public static function factory($type) {\n return self::buildCache($type);\n }", "title": "" }, { "docid": "3bc254d9ac3a99e7f5e83026cd4902f4", "score": "0.47696638", "text": "public function create(&$data);", "title": "" }, { "docid": "260d528c8375a76fb27c8b1207f64331", "score": "0.47547093", "text": "protected function getApiPlatform_Metadata_Resource_MetadataFactory_CachedService()\n {\n $a = ($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService());\n\n return $this->privates['api_platform.metadata.resource.metadata_factory.cached'] = new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\CachedResourceMetadataFactory(($this->privates['api_platform.cache.metadata.resource'] ?? $this->getApiPlatform_Cache_Metadata_ResourceService()), new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\FormatsResourceMetadataFactory(new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\OperationResourceMetadataFactory(new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\AnnotationResourceFilterMetadataFactory($a, new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ShortNameResourceMetadataFactory(new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\PhpDocResourceMetadataFactory(new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\InputOutputResourceMetadataFactory(new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ExtractorResourceMetadataFactory(($this->privates['api_platform.metadata.extractor.yaml'] ?? ($this->privates['api_platform.metadata.extractor.yaml'] = new \\ApiPlatform\\Core\\Metadata\\Extractor\\YamlExtractor([], $this))), new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\AnnotationResourceMetadataFactory($a, new \\ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ExtractorResourceMetadataFactory(($this->privates['api_platform.metadata.extractor.xml'] ?? ($this->privates['api_platform.metadata.extractor.xml'] = new \\ApiPlatform\\Core\\Metadata\\Extractor\\XmlExtractor([], $this)))))))))), $this->parameters['api_platform.patch_formats']), $this->parameters['api_platform.formats'], $this->parameters['api_platform.patch_formats']));\n }", "title": "" }, { "docid": "80af66a2609a68f9871b27d1550d35a2", "score": "0.47502753", "text": "public function __construct(ClientInterface $http_client, ConfigFactoryInterface $config_factory, StateInterface $state, CacheBackendInterface $cache, Json $json, TimeInterface $time) {\n $this->configFactory = $config_factory;\n $this->httpClient = $http_client;\n $this->config = $this->configFactory->getEditable('salesforce.settings');\n $this->state = $state;\n $this->cache = $cache;\n $this->json = $json;\n $this->time = $time;\n $this->httpClientOptions = [];\n return $this;\n }", "title": "" }, { "docid": "31e6b6e7a3428d34c8c6ab0ce94c8164", "score": "0.4748243", "text": "private function getFactory()\n {\n return new DetailFactory($this->getMockPhotoFactory());\n }", "title": "" }, { "docid": "72e220971a99dc283911d0679fe191e5", "score": "0.47469756", "text": "protected function fillCache()\n {\n // Lets create the definitions\n return $this->createDefinitions();\n }", "title": "" }, { "docid": "72e220971a99dc283911d0679fe191e5", "score": "0.47469756", "text": "protected function fillCache()\n {\n // Lets create the definitions\n return $this->createDefinitions();\n }", "title": "" }, { "docid": "8b8b20d1bc9416c59ec849c0bb9a0d50", "score": "0.4713128", "text": "private function createDataObjectFactoryStub()\n {\n $dataObjectFactoryStub = $this->getMockBuilder(DataObjectFactory::class)\n ->disableOriginalConstructor()\n ->setMethods([ 'create' ])\n ->getMock();\n $dataObjectFactoryStub->method('create')\n ->willReturn(new DataObject());\n\n return $dataObjectFactoryStub;\n }", "title": "" }, { "docid": "ab80d536657fbd2d3dd8e02f127b51ac", "score": "0.4694316", "text": "public function run()\n {\n $states = [\n [\n 'name' => \"inactive\",\n 'value' => 0,\n ],\n [\n 'name' => \"active\",\n 'value' => 1,\n ],\n [\n 'name' => \"sub\",\n 'value' => 2,\n ]\n ];\n\n foreach ($states as $state) {\n $data = State::create([\n 'name' => $state['name'],\n 'value' => $state['value'],\n ]);\n }\n }", "title": "" }, { "docid": "c7e9d7e34a4a385cb5693b6c5d355f01", "score": "0.4682907", "text": "public function getMetadataFactory()\n {\n }", "title": "" }, { "docid": "afdebab549fffdea3fb012653f1cf961", "score": "0.4681207", "text": "public function definition()\n {\n return [\n 'sorteio_id' => Sorteio::factory(),\n 'pedido_id' => Pedido::factory()\n ->state(function (array $attr, Sorteio $sorteio) {\n return [\n 'user_id' => $sorteio->user_id\n ];\n }),\n 'valor' => $this->faker->randomFloat(2, 1, 100),\n 'desconto' => $this->faker->randomFloat(2, 1, 10)\n ];\n }", "title": "" }, { "docid": "9b6c6ee4ad7d29b5995322f7c653a90a", "score": "0.46739712", "text": "private function makeObject($data)\n\t{\n\t\t$class = $this->class;\n\t\t$m = new $class();\n\t\t$m->fill($data);\n\t\t\n\t\treturn $m;\n\t\t\n\t}", "title": "" }, { "docid": "58baf8f4bb1497a9afe8e3e50aa90c63", "score": "0.46716946", "text": "abstract protected function create();", "title": "" }, { "docid": "7d4b89d5adf29506aee7c690536e249b", "score": "0.46705595", "text": "protected function setUp()\r\n {\r\n parent::setUp();\r\n\r\n $this->factory = new \\Cachedecorator\\AbstractFactory;\r\n }", "title": "" }, { "docid": "f6f23bbd08a83b22f32f5856c9e1ea3c", "score": "0.4669946", "text": "public function run()\n {\n \n factory(App\\Models\\Record\\Service::class, 20)->create();\n factory(App\\Models\\Record\\Branch::class, 12)->states('with_room', 'with_services')->create();\n \n factory(App\\Models\\Production\\Category::class, 15)->create();\n factory(App\\Models\\Production\\Product::class, 20)->states('with_categories')->create();\n\n\n factory(App\\Models\\Auth\\User::class, 250)->states('create_transaction')->create();\n }", "title": "" }, { "docid": "47345756abb45883996df7765c17a5ac", "score": "0.4667257", "text": "protected function makeScope()\n {\n $resource = $this->makeResource();\n\n if (isset($this->serializer)) {\n $this->fractal->setSerializer($this->serializer);\n }\n\n return $this->fractal->createData($resource);\n }", "title": "" }, { "docid": "78993e8b84eca257cda830066410fd70", "score": "0.46615154", "text": "public function definition(): array\n {\n $targetCategories = TargetCategory::all()->pluck('id')->toArray();\n return [\n 'target_type' => TypeSelectEnum::getRandomValue(),\n 'target_name' => $this->faker->name,\n 'target_status' => TargetStatusEnum::getRandomValue(),\n 'amount' => MoneyValueObject::fromNative($this->faker->randomNumber(4)),\n 'first_pay_date' => date(config('panel.date_format')),\n 'monthly_pay_amount' => $this->faker->randomNumber(2),\n 'pay_to_date' => date(config('panel.date_format')),\n 'description' => $this->faker->text,\n 'target_is_done' => $this->faker->boolean,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n\n 'target_category_id' => $this->faker->randomElement($targetCategories),\n 'currency_id' => function () {\n return 1;\n },\n 'team_id' => function () {\n return 1;\n },\n 'account_from_id' => function () {\n /**\n * @var Account\n */\n $account = Account::factory()->create();\n return $account->id;\n },\n 'user_id' => function () {\n return 1;\n },\n ];\n }", "title": "" }, { "docid": "9d2f2eb72dee8a7d983227aa2334d666", "score": "0.46415442", "text": "public function make($mDataSupport);", "title": "" }, { "docid": "7adede9b46476045c4b6850a5ea983bb", "score": "0.462805", "text": "public function create(array $newmeal_data): Meal\n {\n $meal = Meal::create($newmeal_data);\n Cache::put(\"meal-$meal->id\",$meal);\n Cache::forget(\"meals-all\");\n\n return $meal;\n }", "title": "" }, { "docid": "5771aba8fe02d2f85bd16b522b919ed5", "score": "0.46200472", "text": "private function build_cache(): void\n {\n // gets the values for the datarows\n $dataset = Self::arrange((array) $this->get_rows());\n // sets the labels\n $labels = $dataset[BarDatarow::LABEL];\n unset($dataset[BarDatarow::LABEL]);\n // initializes cache with datarow values\n\t$this->cache = Self::print_object(\n array(\"label\" => $this->get_label()),\n $dataset\n );\n // initializes label variable with label values\n $this->labels_cache = Self::print_array($labels);\n }", "title": "" }, { "docid": "d391a4672c4fa4c034d6d3d56484e67e", "score": "0.4616245", "text": "abstract protected function initBuildingData();", "title": "" }, { "docid": "c3192969d59641591d0c35ec5f33ddd1", "score": "0.46033543", "text": "abstract protected function createFromData(string $name, array $data): object;", "title": "" }, { "docid": "c85b69ba92dc237d94e3ef603e0fd1ae", "score": "0.45928198", "text": "public function definition()\n {\n $states = [\n 'AC',\n 'AL',\n 'AP',\n 'AM',\n 'BA',\n 'CE',\n 'DF',\n 'ES',\n 'GO',\n 'MA',\n 'MT',\n 'MS',\n 'MG',\n 'PA',\n 'PB',\n 'PR',\n 'PE',\n 'PI',\n 'RJ',\n 'RN',\n 'RS',\n 'RO',\n 'RR',\n 'SC',\n 'SP',\n 'SE',\n 'TO'\n ];\n\n\n return [\n 'user_id' => 1,\n 'name' => $this->faker->name(),\n 'state' => $states[random_int(0, 26)]\n ];\n }", "title": "" }, { "docid": "af4ff66627911b27466ba3327ac73db9", "score": "0.4578015", "text": "public function createData()\n {\n // TODO: Implement createData() method.\n }", "title": "" }, { "docid": "caa1bde994908ea94d13e14fee52aa76", "score": "0.4572365", "text": "public function from(Map $identityMap): State;", "title": "" }, { "docid": "ff0ca1c99d224e812ab14284bda67a5c", "score": "0.4564339", "text": "public static function newFactory()\n {\n return ReturnTrackingDetailFactory::new();\n }", "title": "" }, { "docid": "fe26bd7d0e81c8795481b7cffd29e053", "score": "0.45637068", "text": "public function make($target)\n {\n $arguments = $this->getArgumentTypes($target);\n\n $resolved = $this->mockArguments($arguments);\n\n return call_user_func_array([$target, '__construct'], $resolved);\n }", "title": "" }, { "docid": "e835a8df70c485b366cfcbe053334619", "score": "0.4556835", "text": "protected function _createEntity()\n {\n $entityName = $this->_getEntityName();\n return new $entityName();\n }", "title": "" }, { "docid": "bb7692d5b9260f80ada359f9daa3eb86", "score": "0.45524612", "text": "public function definition()\n {\n return [\n 'user_id' => $this->faker->numberBetween(1, 100),\n 'provider' => $this->faker->randomElement($this->providers),\n 'amount' => $this->faker->numberBetween(1000, 150000) / 100,\n 'state' => $this->faker->randomElement($this->state),\n 'created_at' => $this->faker->dateTimeBetween($startDate = '-60 days', $endDate = 'now'),\n ];\n }", "title": "" }, { "docid": "d92f99c6117ccdc8c434c202b9cc0857", "score": "0.4551107", "text": "final public function dataRefresh()\n {\n $schema = Schema::get($this->namespace);\n list($data) = Data::factoryData(['id' => $this->id], $this->table, $schema);\n \n // Database data object unique to this object\n $this->_data = new Data($data, $this->table, $schema);\n \n // Call replacement constructor after storing in the cache list (to prevent recursion)\n $this->dataClearCache();\n $this->_init();\n \n return $this;\n }", "title": "" }, { "docid": "5fd5e8bf4d00cc7cce4450424955c8b2", "score": "0.45453826", "text": "public function run()\n {\n\n\n\n\n factory(State::class)->create([\n 'name' => 'Abruzzo',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Abu Dhabi',\n\n 'country_id' => 127,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aceh',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Adana',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Adiyaman Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Administrative unit Maribor',\n\n 'country_id' => 108,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Agri',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aguascalientes',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aichi Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aisne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Akita Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Akwa Ibom',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Alabama',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Alaska',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Alberta',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Alexandria Governorate',\n\n 'country_id' => 30,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Algeria',\n\n 'country_id' => 1,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Allier',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Altai Krai',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Altai Republic',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Amasya Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Amazonas',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Amur Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ancash',\n\n 'country_id' => 90,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Andalusia',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Andhra Pradesh',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Angola',\n\n 'country_id' => 2,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Anguilla',\n\n 'country_id' => 3,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Anhui',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ankara',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Antalya',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Antioquia',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Antofagasta Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Antwerp',\n\n 'country_id' => 9,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Anzoategui',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aomori Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aosta',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Apulia',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Arad County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aragon',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aragua',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Arauca',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Araucania',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Arequipa',\n\n 'country_id' => 90,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Arica y Parinacota Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ariege',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Arizona',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Arkansas',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Arkhangelsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Armenia',\n\n 'country_id' => 5,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aseer Province',\n\n 'country_id' => 103,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Assam',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Assiut Governorate',\n\n 'country_id' => 30,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Astrakhan Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Asturias',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aswan Governorate',\n\n 'country_id' => 30,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Atacama Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Atlantico',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Attica',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aube',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Auckland',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aude',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Australian Capital Territory',\n\n 'country_id' => 6,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Autonomous City of Buenos Aires',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aveiro District',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Aveyron',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ayacucho',\n\n 'country_id' => 90,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Azores',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Azuay',\n\n 'country_id' => 29,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bacau County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bacs-Kiskun',\n\n 'country_id' => 49,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Baden-Wurttemberg',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Baja California',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Baja California Sur',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Balearic Islands',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bali',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Balikesir Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Balochistan',\n\n 'country_id' => 86,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bangka Belitung Islands',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bangkok',\n\n 'country_id' => 121,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Banten',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Baranya',\n\n 'country_id' => 49,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Barinas',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bas-Rhin',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Basel City',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Basque Country',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Batman',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bavaria',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bay Of Plenty',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Beijing',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Belarus',\n\n 'country_id' => 8,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Belgorod Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bengkulu',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Benin',\n\n 'country_id' => 10,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Benue',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Berlin',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bicol',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bihar',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bihor County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bingol Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bio Bio Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Blekinge County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bogota',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bolivar',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bolivar',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Borno',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bosnia and Herzegovina',\n\n 'country_id' => 11,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Braga',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Braganca District',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Brandenburg',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Brasov County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bratislava Region',\n\n 'country_id' => 107,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bremen',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'British Columbia',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Brittany',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Brunei',\n\n 'country_id' => 13,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Brussels',\n\n 'country_id' => 9,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bryansk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bucharest',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Budapest',\n\n 'country_id' => 49,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Buenos Aires Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Burkina Faso',\n\n 'country_id' => 15,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Bursa',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Busan',\n\n 'country_id' => 112,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ca Mau',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cairo Governorate',\n\n 'country_id' => 30,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cajamarca',\n\n 'country_id' => 90,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Calabarzon',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Calabria',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Caldas',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'California',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Calvados',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cambodia',\n\n 'country_id' => 16,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Campania',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Campeche',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Can Tho',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Canakkale',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Canary Islands',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cantabria',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cantal',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Canterbury',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Canton of Bern',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Canton of Glarus',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Canton of Neuchatel',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Canton of Obwalden',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Canton of Solothurn',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Capital District',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Capital Region of Denmark',\n\n 'country_id' => 25,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Caqueta',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Carabobo',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Caras-Severin County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Carinthia',\n\n 'country_id' => 7,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Casanare',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Castelo Branco District',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Castile and Leon',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Castile-La Mancha',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Catalonia',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Catamarca Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cauca Department',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Central Bohemian Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Central Denmark Region',\n\n 'country_id' => 25,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Central Java',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Central Kalimantan',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Central Luzon',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Central Macedonia',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Central Sulawesi',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Central Visayas',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Centre-Val de Loire',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cesar',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ceuta',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chaco Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chandigarh',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Charente',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Charente-Maritime',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chechnya',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chelyabinsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chhattisgarh',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chiapas',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chiba Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chihuahua',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Choco',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chongqing',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chubut Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chukotka Autonomous Okrug',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Chuvashia Republic',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'City of Zagreb',\n\n 'country_id' => 22,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Clare',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Coahuila',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Colima',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Colorado',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Community of Madrid',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Connecticut',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Constanta County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Coquimbo Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cordillera Administrative Region',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cordoba',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cordoba',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cork City',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Correze',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Corrientes Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Corsica',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cote-d Or',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Crete',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cross River',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cundinamarca',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Cyprus',\n\n 'country_id' => 23,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dagestan Republic',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dalarna County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Delhi',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Denizli',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Deux-Sevres',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Djibouti',\n\n 'country_id' => 26,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dolj County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dominica',\n\n 'country_id' => 27,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dominican Republic',\n\n 'country_id' => 28,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Donetsk Oblast',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dordogne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Doubs',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Drenthe',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Drome',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dubai',\n\n 'country_id' => 127,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dublin City',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Dubrovnik-Neretva County',\n\n 'country_id' => 22,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Durango',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'East Java',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'East Kalimantan',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'East Nusa Tenggara',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Eastern Cape',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Eastern Province',\n\n 'country_id' => 103,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ehime Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'El Oro',\n\n 'country_id' => 29,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'El Salvador',\n\n 'country_id' => 31,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Elazig',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Emilia-Romagna',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'England',\n\n 'country_id' => 128,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Entre Rios',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Enugu',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Eritrea',\n\n 'country_id' => 32,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Erzincan',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Erzurum',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Eskisehir Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ethiopia',\n\n 'country_id' => 34,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Eure',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Evora District',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Extremadura',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Falcon',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Faro District',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Faroe Islands',\n\n 'country_id' => 35,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Federal Capital Territory',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Federal District',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Federal Territory of Kuala Lumpur',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Fes-Boulemane',\n\n 'country_id' => 75,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Finland',\n\n 'country_id' => 36,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Finnmark',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Flevoland',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Florida',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Formosa Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Free State',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'French Guiana',\n\n 'country_id' => 38,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Friesland',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Friuli-Venezia Giulia',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Fujian',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Fukui Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Fukuoka Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Fukushima Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gabon',\n\n 'country_id' => 39,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Galicia',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Galway City',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gansu',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gard',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gauteng',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gavleborg County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gaziantep',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gelderland',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Geneva',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Georgia',\n\n 'country_id' => 40,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Georgia',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gers',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ghana',\n\n 'country_id' => 42,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gia Lai Province',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gibraltar',\n\n 'country_id' => 43,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gifu Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gironde',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gisborne',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gombe',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gorontalo',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gotland County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Grand Casablanca',\n\n 'country_id' => 75,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Greater Poland Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Greece',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Grisons',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Groningen',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guadeloupe',\n\n 'country_id' => 45,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guanajuato',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guangdong',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guangxi',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guarico',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guatemala',\n\n 'country_id' => 46,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guerrero',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guinea',\n\n 'country_id' => 47,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guizhou',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Gujarat',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Guyana',\n\n 'country_id' => 48,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Haifa District',\n\n 'country_id' => 54,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hail Province',\n\n 'country_id' => 103,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hainan',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hainaut',\n\n 'country_id' => 9,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hajdu-Bihar',\n\n 'country_id' => 49,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Halland County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hamburg',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hanoi',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Harju County',\n\n 'country_id' => 33,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Haskovo Province',\n\n 'country_id' => 14,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hatay',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Haut-Rhin',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Haute-Garonne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Haute-Loire',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Haute-Savoie',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Haute-Vienne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hautes-Pyrenees',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hawaii',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hawke s Bay',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hebei',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hedmark',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Heilongjiang',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Henan',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Herault',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hesse',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hidalgo',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Himachal Pradesh',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hiroshima Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ho Chi Minh',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hokkaido',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hordaland',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hradec Kralove Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hubei',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Huila',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hunan',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hunedoara County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Hyogo',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Iasi County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Iceland',\n\n 'country_id' => 50,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Idaho',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Igdir',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ile-de-France',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Illinois',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Indiana',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ingushetia',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Inner Mongolia',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ioannina',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Iowa',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Irkutsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Isere',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ishikawa Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Islamabad Capital Territory',\n\n 'country_id' => 86,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Isparta Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Istanbul',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Istria County',\n\n 'country_id' => 22,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ivano-Frankivs ka oblast',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ivanovo Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Iwate Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Izmir',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jalisco',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jamaica',\n\n 'country_id' => 56,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jambi',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jammu and Kashmir',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jamtland County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jasz-Nagykun-Szolnok',\n\n 'country_id' => 49,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jharkhand',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jiangsu',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jiangxi',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jilin',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Johor',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jujuy',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Jura',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kabardino-Balkaria',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kaduna',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kagawa Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kagoshima Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kahramanmaras Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kaliningrad Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kalmar County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kalmykia',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kaluga Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kanagawa Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kano',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kansas',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Karlovy Vary Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kars',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kastamonu',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kastoria',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Katsina',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kaunas County',\n\n 'country_id' => 66,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kayseri Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kazakhstan',\n\n 'country_id' => 58,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kedah',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kemerovo Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kentucky',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kenya',\n\n 'country_id' => 59,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kerala',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kerry',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Khabarovsk Krai',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Khanh Hoa Province',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Khanty-Mansi Autonomous Okrug',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Khersons ka oblast',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Khyber Pakhtunkhwa',\n\n 'country_id' => 86,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kien Giang',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kildare',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kirov Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Klaipeda County',\n\n 'country_id' => 66,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kochi',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Komi Republic',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Konya',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kosice Region',\n\n 'country_id' => 107,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kostroma Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kozani',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Krasnodar Krai',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Krasnoyarsk Krai',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kronoberg County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kumamoto Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kurgan Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kursk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kutahya',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kuyavian-Pomeranian Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'KwaZulu-Natal',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kwara',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kyiv city',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kyoto',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Kyrgyzstan',\n\n 'country_id' => 60,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'La Pampa Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'La Rioja Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Labuan Federal Territory',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lagos',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lam Djong',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Landes',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Laos',\n\n 'country_id' => 61,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lara',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Larnaca',\n\n 'country_id' => 23,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lazio',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lesotho',\n\n 'country_id' => 63,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lesser Poland Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Liaoning',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Liberia',\n\n 'country_id' => 64,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Libya',\n\n 'country_id' => 65,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Liege',\n\n 'country_id' => 9,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Liepajas pilseta',\n\n 'country_id' => 62,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Liguria',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Limburg',\n\n 'country_id' => 9,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Limburg',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Limerick City',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Limpopo',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lipetsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lisbon',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ljubljana',\n\n 'country_id' => 108,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lodz Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Loire',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lombardy',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Los Lagos Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lot',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lot-et-Garonne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Louisiana',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lower Austria',\n\n 'country_id' => 7,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lower Saxony',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lower Silesian Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lozere',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lublin Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lubusz Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Lucerne',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Luxor Governorate',\n\n 'country_id' => 30,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'MIMAROPA',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Macau',\n\n 'country_id' => 67,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Madagascar',\n\n 'country_id' => 68,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Madeira',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Madhya Pradesh',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Magadan Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Magallanes y la Antartica Chilena Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Maharashtra',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Maine',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Makkah Province',\n\n 'country_id' => 103,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Malacca',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Malatya',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Malawi',\n\n 'country_id' => 69,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Malta',\n\n 'country_id' => 71,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Manabi Province',\n\n 'country_id' => 29,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Manawatu-Wanganui',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Manche',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Manipur',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Manisa',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Manitoba',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Maramures County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Marche',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mardin',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mari El Republic',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Marne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Maryland',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Masovian Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Massachusetts',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Maule Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mecklenburg-Vorpommern',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Meghalaya',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Meknes-Tafilalet',\n\n 'country_id' => 75,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Melilla',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mendoza Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Merida',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Meta',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Metro Manila',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Meurthe-et-Moselle',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Meuse',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mexico City',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Michigan',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Michoacan',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Minnesota',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Misiones Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mississippi',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Missouri',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Miyagi Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Miyazaki Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Moldova',\n\n 'country_id' => 73,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Monagas',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Montana',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Montenegro',\n\n 'country_id' => 74,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Moravian-Silesian Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mordovia',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'More og Romsdal',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Morelos',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Moscow',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Moscow Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Moselle',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mozambique',\n\n 'country_id' => 76,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mpumalanga',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mugla Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mures County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Murmansk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Mus',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nagano Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nagasaki Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Namibia',\n\n 'country_id' => 77,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Narino',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Navarre',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nayarit',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nebraska',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nelson',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nepal',\n\n 'country_id' => 78,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Neuquen',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nevada',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nevsehir',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'New Brunswick',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'New Caledonia',\n\n 'country_id' => 80,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'New Jersey',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'New Mexico',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'New South Wales',\n\n 'country_id' => 6,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'New York',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Newfoundland and Labrador',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ngazidja',\n\n 'country_id' => 21,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nghe An',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nicaragua',\n\n 'country_id' => 82,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nidwalden',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nievre',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Niger',\n\n 'country_id' => 83,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Niger',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Niigata',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ningxia',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nizhny Novgorod Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nord',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nord-Trondelag',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nordland',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Norrbotten County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Brabant',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Carolina',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Dakota',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Denmark Region',\n\n 'country_id' => 25,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Holland',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Rhine-Westphalia',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Santander',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Sulawesi',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Sumatra',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North Tipperary',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'North West',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Northern Borders Province',\n\n 'country_id' => 103,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Northern Cape',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Northern Ireland',\n\n 'country_id' => 128,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Northern Territory',\n\n 'country_id' => 6,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Northland',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Northwest Territories',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nova Scotia',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Novosibirsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nueva Esparta',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nuevo Leon',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Nunavut',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'O Higgins Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Oaxaca',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Odessa Oblast',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Odisha',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ohio',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Oise',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Oita',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Okayama Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Okinawa Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Oklahoma',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Olomouc Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Omsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ondo',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ontario',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Orebro County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Oregon',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Orenburg Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Oriental',\n\n 'country_id' => 75,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Osaka',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Osijek-Baranja County',\n\n 'country_id' => 22,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Oslo',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ostfold',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Otago',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Overijssel',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Oyo',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pahang',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Panama',\n\n 'country_id' => 87,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Panevezys County',\n\n 'country_id' => 66,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Paphos',\n\n 'country_id' => 23,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Papua',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Papua New Guinea',\n\n 'country_id' => 88,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Paraguay',\n\n 'country_id' => 89,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pardubice Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Parnu County',\n\n 'country_id' => 33,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pas-de-Calais',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pays de la Loire',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Penang',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pennsylvania',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Penza Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Perak',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Perm Krai',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Phu Yen Province',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Piedmont',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Piura',\n\n 'country_id' => 90,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Plateau',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Plzen Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Podkarpackie Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Poltavs ka oblast',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pomeranian Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Port Said Governorate',\n\n 'country_id' => 30,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Portuguesa',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Prague',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Presov Region',\n\n 'country_id' => 107,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Preveza',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Primorje-Gorski Kotar County',\n\n 'country_id' => 22,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Primorsky Krai',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Prince Edward Island',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Provence-Alpes-Cote d Azur',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Province of Namur',\n\n 'country_id' => 9,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pskov Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Puebla',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Puerto Rico',\n\n 'country_id' => 94,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Punjab',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Punjab',\n\n 'country_id' => 86,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Puno',\n\n 'country_id' => 90,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Putumayo',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Puy-de-Dome',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pyrenees-Atlantiques',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Pyrenees-Orientales',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Qatar',\n\n 'country_id' => 95,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Qinghai',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Quebec',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Queensland',\n\n 'country_id' => 6,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Quindio',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Quintana Roo',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rabat-Sale-Zemmour-Zaer',\n\n 'country_id' => 75,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rajasthan',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Red Sea Governorate',\n\n 'country_id' => 30,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Region Syddanmark',\n\n 'country_id' => 25,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Region XII',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Region Zealand',\n\n 'country_id' => 25,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Region of Murcia',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Republic of Bashkortostan',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Republic of Karelia',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Republic of Khakassia',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rhineland-Palatinate',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rhode Island',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rhone',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Riau',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Riau Islands',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Riga',\n\n 'country_id' => 62,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rio Negro',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Risaralda',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Riyadh Province',\n\n 'country_id' => 103,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rogaland',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rostov Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Rwanda',\n\n 'country_id' => 98,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saare County',\n\n 'country_id' => 33,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sabah',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saga Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saint Kitts and Nevis',\n\n 'country_id' => 99,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saint Vincent and the Grenadines',\n\n 'country_id' => 100,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saitama Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sakha Republic',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sakhalin Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Salta Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Salzburg',\n\n 'country_id' => 7,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Samoa',\n\n 'country_id' => 101,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Samsun',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'San Luis Potosi',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'San Luis Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'San Martin',\n\n 'country_id' => 90,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sanliurfa Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Santa Cruz Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Santa Fe Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Santander Department',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Santiago Metropolitan Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sao Tome and Principe',\n\n 'country_id' => 102,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saone-et-Loire',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saratov Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sarawak',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sardinia',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saskatchewan',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Satu Mare County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Savoie',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saxony',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Saxony-Anhalt',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Schleswig-Holstein',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Scotland',\n\n 'country_id' => 128,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Seine-Maritime',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Selangor',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Senegal',\n\n 'country_id' => 104,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Seoul',\n\n 'country_id' => 112,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Serbia',\n\n 'country_id' => 105,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Setubal',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Shaanxi',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Shandong',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Shanghai',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Shanxi',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sharjah',\n\n 'country_id' => 127,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Shimane Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Shizuoka Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Siauliai County',\n\n 'country_id' => 66,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sibiu',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sichuan',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sicily',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sierra Leone',\n\n 'country_id' => 106,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Siirt Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Silesian Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sinaloa',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sindh',\n\n 'country_id' => 86,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sinop Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sivas',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Skane County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sligo',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Slovenia',\n\n 'country_id' => 108,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sodermanland County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sogn og Fjordane',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sohag Governorate',\n\n 'country_id' => 30,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sokoto',\n\n 'country_id' => 84,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Solomon Islands',\n\n 'country_id' => 109,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Somalia',\n\n 'country_id' => 110,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Somme',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sonora',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sor-Trondelag',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Souss-Massa-Draa',\n\n 'country_id' => 75,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South Australia',\n\n 'country_id' => 6,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South Bohemian Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South Carolina',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South Dakota',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South East Sulawesi',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South Holland',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South Kalimantan',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South Moravian Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'South Sumatra',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Southland',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Special Region of Yogyakarta',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Split-Dalmatia County',\n\n 'country_id' => 22,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sri Lanka',\n\n 'country_id' => 114,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Stara Zagora',\n\n 'country_id' => 14,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Acre',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Alagoas',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Amapa',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Amazonas',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Bahia',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Ceara',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Espirito Santo',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Goias',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Maranhao',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Mato Grosso',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Mato Grosso do Sul',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Mexico',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Minas Gerais',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Para',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Paraiba',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Parana',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Pernambuco',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Piaui',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Rio Grande do Norte',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Rio Grande do Sul',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Rio de Janeiro',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Rondonia',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Roraima',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Santa Catarina',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Sao Paulo',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Sergipe',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'State of Tocantins',\n\n 'country_id' => 12,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Stavropol Krai',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Stockholm County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Styria',\n\n 'country_id' => 7,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Suceava County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sucre',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sucre',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Suriname',\n\n 'country_id' => 115,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Sverdlovsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Swaziland',\n\n 'country_id' => 116,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tabasco',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tabuk Province',\n\n 'country_id' => 103,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tachira',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tajikistan',\n\n 'country_id' => 119,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tamaulipas',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tamil Nadu',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tangier-Tetouan',\n\n 'country_id' => 75,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tanzania',\n\n 'country_id' => 120,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Taranaki',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tarapaca Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tarn',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tarn-et-Garonne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tartu County',\n\n 'country_id' => 33,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tasman',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tasmania',\n\n 'country_id' => 6,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tatarstan',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Telangana',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Telemark',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tennessee',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Terengganu',\n\n 'country_id' => 70,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Territoire de Belfort',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Texas',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Thanh Hoa',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Thessalia',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Thua Thien Hue',\n\n 'country_id' => 133,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Thuringia',\n\n 'country_id' => 41,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tianjin',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tibet',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ticino',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tierra del Fuego Province',\n\n 'country_id' => 4,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Timis County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tlaxcala',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Togo',\n\n 'country_id' => 122,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tokat',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tokushima Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tolima',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tomsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tottori Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Toyama Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Trabzon',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Trencin Region',\n\n 'country_id' => 107,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Trentino-Alto Adige/South Tyrol',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tripura',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Trnava Region',\n\n 'country_id' => 107,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Troms',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Trujillo',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tula Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tulcea County',\n\n 'country_id' => 96,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tungurahua',\n\n 'country_id' => 29,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tunisia',\n\n 'country_id' => 123,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Turks and Caicos Islands',\n\n 'country_id' => 125,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tuscany',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tuva',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tver Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tyrol',\n\n 'country_id' => 7,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Tyumen Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Udmurt Republic',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ulsan',\n\n 'country_id' => 112,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ulyanovsk Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Umbria',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Upper Austria',\n\n 'country_id' => 7,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Uppsala County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Uruguay',\n\n 'country_id' => 130,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Usak',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Utah',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Utrecht',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Uttar Pradesh',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Uzbekistan',\n\n 'country_id' => 131,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Valais',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Valencian Community',\n\n 'country_id' => 113,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Valle del Cauca',\n\n 'country_id' => 20,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Van',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Varazdin County',\n\n 'country_id' => 22,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Varmland County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vasterbotten County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vasternorrland County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vastmanland County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vastra Gotaland County',\n\n 'country_id' => 117,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vaud',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Veneto',\n\n 'country_id' => 55,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Ventspils',\n\n 'country_id' => 62,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Veracruz',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vest-Agder',\n\n 'country_id' => 85,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Veszprem',\n\n 'country_id' => 49,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Victoria',\n\n 'country_id' => 6,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vienna',\n\n 'country_id' => 7,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vienne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vilnius County',\n\n 'country_id' => 66,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Virginia',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Viseu District',\n\n 'country_id' => 93,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Volgograd Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vologda Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Volyns ka oblast',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vorarlberg',\n\n 'country_id' => 7,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Voronezh Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Vosges',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Waikato',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Wales',\n\n 'country_id' => 128,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Walloon Brabant',\n\n 'country_id' => 9,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Washington',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Waterford City',\n\n 'country_id' => 53,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Wellington',\n\n 'country_id' => 81,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'West Bengal',\n\n 'country_id' => 51,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'West Flanders',\n\n 'country_id' => 9,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'West Java',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'West Kalimantan',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'West Nusa Tenggara',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'West Pomeranian Voivodeship',\n\n 'country_id' => 92,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'West Sumatra',\n\n 'country_id' => 52,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'West Virginia',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Western Australia',\n\n 'country_id' => 6,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Western Cape',\n\n 'country_id' => 111,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Western Greece',\n\n 'country_id' => 44,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Western Visayas',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Wisconsin',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Wyoming',\n\n 'country_id' => 129,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'XI Region',\n\n 'country_id' => 18,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Xinjiang',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yalova Province',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yamaguchi Prefecture',\n\n 'country_id' => 57,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yamalo-Nenets Autonomous Okrug',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yaracuy',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yaroslavl Oblast',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yonne',\n\n 'country_id' => 37,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yucatan',\n\n 'country_id' => 72,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yukon Territory',\n\n 'country_id' => 17,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Yunnan',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zabaykalsky Krai',\n\n 'country_id' => 97,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zadar County',\n\n 'country_id' => 22,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zakarpats ka oblast',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zambia',\n\n 'country_id' => 134,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zamboanga Peninsula',\n\n 'country_id' => 91,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zeeland',\n\n 'country_id' => 79,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zhejiang',\n\n 'country_id' => 19,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zhytomyrs ka oblast',\n\n 'country_id' => 126,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zimbabwe',\n\n 'country_id' => 135,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zlin Region',\n\n 'country_id' => 24,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zonguldak',\n\n 'country_id' => 124,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zulia',\n\n 'country_id' => 132,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Zurich',\n\n 'country_id' => 118,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n\n\n\n factory(State::class)->create([\n 'name' => 'Albania',\n\n 'country_id' => 136,\n\n 'created_at' => now(),\n\n\n\n\n\n ]);\n }", "title": "" }, { "docid": "46ecf894d2f43ce25167c87f7c2fa2e3", "score": "0.45356485", "text": "protected function getApiPlatform_Metadata_Property_MetadataFactory_CachedService()\n {\n $a = ($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService());\n\n return $this->privates['api_platform.metadata.property.metadata_factory.cached'] = new \\ApiPlatform\\Core\\Metadata\\Property\\Factory\\CachedPropertyMetadataFactory(($this->privates['api_platform.cache.metadata.property'] ?? $this->getApiPlatform_Cache_Metadata_PropertyService()), new \\ApiPlatform\\Core\\Bridge\\Symfony\\Validator\\Metadata\\Property\\ValidatorPropertyMetadataFactory(($this->services['validator'] ?? $this->getValidatorService()), new \\ApiPlatform\\Core\\Metadata\\Property\\Factory\\ExtractorPropertyMetadataFactory(($this->privates['api_platform.metadata.extractor.yaml'] ?? ($this->privates['api_platform.metadata.extractor.yaml'] = new \\ApiPlatform\\Core\\Metadata\\Extractor\\YamlExtractor([], $this))), new \\ApiPlatform\\Core\\Metadata\\Property\\Factory\\AnnotationPropertyMetadataFactory($a, new \\ApiPlatform\\Core\\Metadata\\Property\\Factory\\AnnotationSubresourceMetadataFactory($a, new \\ApiPlatform\\Core\\Metadata\\Property\\Factory\\SerializerPropertyMetadataFactory(($this->privates['api_platform.metadata.resource.metadata_factory.cached'] ?? $this->getApiPlatform_Metadata_Resource_MetadataFactory_CachedService()), ($this->privates['serializer.mapping.class_metadata_factory'] ?? $this->getSerializer_Mapping_ClassMetadataFactoryService()), new \\ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Metadata\\Property\\DoctrineOrmPropertyMetadataFactory(($this->services['doctrine'] ?? $this->getDoctrineService()), new \\ApiPlatform\\Core\\Metadata\\Property\\Factory\\InheritedPropertyMetadataFactory(($this->privates['api_platform.metadata.resource.name_collection_factory.cached'] ?? $this->getApiPlatform_Metadata_Resource_NameCollectionFactory_CachedService()), new \\ApiPlatform\\Core\\Bridge\\Symfony\\PropertyInfo\\Metadata\\Property\\PropertyInfoPropertyMetadataFactory(($this->privates['property_info'] ?? $this->getPropertyInfoService()), new \\ApiPlatform\\Core\\Metadata\\Property\\Factory\\ExtractorPropertyMetadataFactory(($this->privates['api_platform.metadata.extractor.xml'] ?? ($this->privates['api_platform.metadata.extractor.xml'] = new \\ApiPlatform\\Core\\Metadata\\Extractor\\XmlExtractor([], $this))))))), ($this->privates['api_platform.resource_class_resolver'] ?? $this->getApiPlatform_ResourceClassResolverService())))))));\n }", "title": "" }, { "docid": "a389537e80d217f1356675aaa9a424e2", "score": "0.4535147", "text": "public function __construct(Factory $cache)\n {\n $this->cache = $cache;\n }", "title": "" }, { "docid": "71e16beb30dbf40d046bb78feae63882", "score": "0.4529942", "text": "public function make();", "title": "" }, { "docid": "a44e1fa813798983a8e00b2c6945280f", "score": "0.4529481", "text": "public function run()\n {\n factory(User::class, 10)->state('seller')->create();\n factory(User::class, 10)->state('buyer')->create();\n }", "title": "" }, { "docid": "7439e1728b50028464cf02e9552cb4a9", "score": "0.45289093", "text": "private function loadDataWrapper() {\r\n if ($this->config->dataSource) {\r\n $file = CONTROLLER . \"{$this->controllerName}/{$this->controllerName}.{$this->config->dataSource}.php\";\r\n if (file_exists($file)) {\r\n require_once $file;\r\n $className = \"\\\\controller\\\\{$this->controllerName}{$this->config->dataSource}\";\r\n // Create istance of right controller data wrapper\r\n\r\n $this->data = new $className();\r\n return;\r\n }\r\n }\r\n // Create Dummy Data Object\r\n\r\n $this->data = new \\core\\ControllerData();\r\n }", "title": "" }, { "docid": "425ac9724f615656ba8912bef3e247e1", "score": "0.4526755", "text": "public function run()\n {\n $state = new State();\n $state->estado = \"Disponible\";\n $state->descripcion = \"-\";\n $state->created_at = now();\n $state->updated_at = now();\n $state->save();\n\n $state = new State();\n $state->estado = \"Ocupado\";\n $state->descripcion = \"-\";\n $state->created_at = now();\n $state->updated_at = now();\n $state->save();\n\n $state = new State();\n $state->estado = \"Mantenimiento\";\n $state->descripcion = \"\";\n $state->created_at = now();\n $state->updated_at = now();\n $state->save();\n\n $state = new State();\n $state->estado = \"Fuera de servicio\";\n $state->descripcion = \"-\";\n $state->created_at = now();\n $state->updated_at = now();\n $state->save();\n }", "title": "" }, { "docid": "10d741d06a378439aa68a0d2292a8f13", "score": "0.45134544", "text": "public function getProxyFactory(): LazyLoadingGhostFactory;", "title": "" }, { "docid": "d44d9af0a0da17993786e2917ae841e7", "score": "0.45090932", "text": "public function create()\n {\n $spec = new ArrayObject(['entities' => []]);\n $factory = $this->getMapperBuilder();\n $modelsOptions = $this->getOptions('models');\n foreach ($modelsOptions as $modelOption) {\n foreach (new \\FilesystemIterator($modelOption['path']) as $file) {\n $entityName = substr($file->getFileName(), 0, -4);\n $entityNamespace = '\\\\' . $modelOption['namespace'] . '\\\\' . $entityName;\n\n if (!class_exists($entityNamespace)) {\n continue;\n }\n \n $entity = new $entityNamespace();\n $spec['entities'][] = $this->getSpecification($entity);\n }\n };\n $factory->create($spec);\n }", "title": "" }, { "docid": "134920e4acc8ac17411a99bd145daf02", "score": "0.45090485", "text": "public function prepare()\n {\n print_r('准备' . $this->name);\n //通过原料工厂创建指定的原料,特定的工厂会生产特定的原料,不关心是哪一个工厂\n $this->dough = $this->ingredientFactory->createDough();\n $this->sauce = $this->ingredientFactory->createSauce();\n $this->cheese = $this->ingredientFactory->createCheese();\n $this->veggies = $this->ingredientFactory->createVeggies();\n\n }", "title": "" }, { "docid": "e4a43cbd4a9d0b9fe6afb7596272ec7f", "score": "0.45073292", "text": "public function definition()\n {\n $country_id = array_rand(Country::all()->pluck(\"id\")->toArray());\n $city_id = City::where(\"country_id\", $country_id)->get()->random()->id;\n return [\n \"user_id\" => User::factory(),\n \"country_id\" => $country_id,\n \"city_id\" => $city_id,\n \"number_of_employee_id\" =>\n $this->faker->randomElement(NumberOfEmployee::all()->pluck(\"id\")->toArray()),\n \"industry_category_id\" =>\n $this->faker->randomElement(IndustryCategory::all()->pluck(\"id\")->toArray()),\n \"name\" => $this->faker->unique()->company,\n \"url\" => $this->faker->unique()->url,\n \"about\" => $this->faker->paragraph,\n \"founded_date\" => $this->faker->date(),\n \"logo\" => $this->faker->image(\"public/avatar\", 400, 400, null, false),\n \"cover_image\" => $this->faker->image(\"public/avatar\", 800, 400, null, false)\n ];\n }", "title": "" }, { "docid": "6c6d695d05787023010c050173a2fb5c", "score": "0.45060003", "text": "public function definition(): array\n {\n $table_names = config('mmcms.modules.seo.allowed_target_tables');\n\n $table_names_count = count($table_names);\n\n $table_names_idx = rand(0, $table_names_count - 1);\n\n return [\n 'facebook_description' => $this->faker->sentence,\n 'facebook_image' => $this->faker->url,\n 'facebook_title' => $this->faker->word,\n 'json_schema' => null,\n 'meta_description' => $this->faker->sentence,\n 'meta_robots_follow' => rand(0, 1) === 0 ? 'follow' : 'nofollow',\n 'meta_robots_index' => rand(0, 1) === 0 ? 'index' : 'noindex',\n 'meta_title' => $this->faker->word,\n 'page_title' => $this->faker->word,\n 'target_id' => static function (array $data) {\n $model_classname = config('mmcms.models.namespace').\n Str::title(Str::singular($data['target_table'])).'';\n\n if (class_exists($model_classname)) {\n return call_user_func($model_classname.'::factory')\n ->create()\n ->id;\n }\n\n return null;\n },\n 'target_table' => $table_names[$table_names_idx],\n 'twitter_description' => $this->faker->sentence,\n 'twitter_image' => $this->faker->url,\n 'twitter_title' => $this->faker->word,\n ];\n }", "title": "" }, { "docid": "c03307b743e720c169821f8e8fb36d94", "score": "0.45016283", "text": "abstract protected function generateDependencyData();", "title": "" }, { "docid": "074eaa07d7cb5c4540e8ac767a3a693d", "score": "0.45006636", "text": "public function run()\n {\n return factory(EducationalInfo::class,1)->create();\n }", "title": "" }, { "docid": "0c984ebcec2defa2de7cc79065c919f3", "score": "0.44903508", "text": "public function run()\n {\n $recordNo = 20;\n\n //Not used factory\n// for($i=0; $i<$recordNo; $i++){\n// App\\Loan::create([\n// 'amount' => random_int(10000,100000),\n// 'term' => 1,\n// 'interest_rate' => 15,\n// 'start_date' => '2018-05-01',\n//// ]);\n// }\n\n\n //Used factory\n factory(App\\Loan::class, $recordNo)->create();\n }", "title": "" }, { "docid": "2e9251a59c018e654c8a4c14d923aef2", "score": "0.44895747", "text": "public static function createTestData()\n {\n }", "title": "" }, { "docid": "868aeaea6860be989fedc96bef7088f3", "score": "0.44889313", "text": "protected function createNewEntity()\n {\n return new Mock();\n }", "title": "" }, { "docid": "290fb278e28a12f58194d3408ad9b00a", "score": "0.44884044", "text": "static function factory($namespace, $useCache=true) {\n\t\tif($useCache && isset(self::$_instances[$namespace]))\n\t\t\treturn self::$_instances[$namespace];\n\t\telseif($useCache && $Context = Kernel::getCache()->get($namespace.'.Context'))\n\t\t\treturn self::$_instances[$namespace] = $Context;\n\t\telse {\n\t\t\tTRACE and Kernel::trace(LOG_DEBUG, TRACE_DEPINJ, __METHOD__, $namespace);\n\t\t\tlist($namespace2, $className, $dirName, $fileName) = Kernel::parseClassName(str_replace('.','\\\\', $namespace.'.Context'));\n\t\t\tif(empty($dirName))\n\t\t\t\t$xmlPath = \\metadigit\\core\\BASE_DIR.$namespace.'-context.xml';\n\t\t\telse\n\t\t\t\t$xmlPath = $dirName.DIRECTORY_SEPARATOR.'context.xml';\n\t\t\tself::$_instances[$namespace] = $Context = new Context($namespace, $xmlPath);\n\t\t\tKernel::getCache()->set($namespace.'.Context', $Context);\n\t\t\treturn $Context;\n\t\t}\n\t}", "title": "" }, { "docid": "2f7ff4deaa84ca3d8647b5ffb43249b0", "score": "0.44881037", "text": "public function run()\n {\n /*$states = factory(State::class,2)\n ->create()\n ->each(function($state){\n factory(Town::class,3)->create(['state_id' => $state->id])\n ->each(function($town){\n factory(OfficersPermission::class,1)->create([\n 'town_id' => $town->id,\n 'officer_id' => function () {\n return factory(Officer::class)->create()->id;\n },\n ]);\n\n factory(Customer::class,2)->create([\n 'town_id' => $town->id,\n\n ])->each(function ($customer) {\n factory(Telephone::class)->create([\n 'user_id'=>$customer->id,\n 'user_type' => 'App\\Models\\Clients\\Customer'\n ]);\n factory(Email::class)->create([\n 'user_id'=>$customer->id,\n 'user_type' => 'App\\Models\\Clients\\Customer'\n ]);\n $customer->save();\n });\n });\n });*/\n factory(App\\Models\\Clients\\Service::class,3)->create();\n\n DB::connection('mysql_client')->table('currencies')->insert(['name'=>'Naira','code'=>'NGN','html'=>'&#8358;']);\n DB::connection('mysql_client')->table('currencies')->insert(['name'=>'US Dollar','code'=>'USD','html'=>'&#36;']);\n }", "title": "" }, { "docid": "31a862b82ebd6c8df5e78fb932b913a7", "score": "0.4486622", "text": "public function definition()\n {\n return [\n 'company_id' => Company::factory(),\n 'position_id' => function (array $attributes) {\n return Position::factory()->create([\n 'company_id' => $attributes['company_id'],\n ]);\n },\n 'team_id' => function (array $attributes) {\n return Team::factory()->create([\n 'company_id' => $attributes['company_id'],\n ]);\n },\n 'recruiting_stage_template_id' => function (array $attributes) {\n return RecruitingStageTemplate::factory()->create([\n 'company_id' => $attributes['company_id'],\n ]);\n },\n 'active' => true,\n 'fulfilled' => false,\n 'reference_number' => $this->faker->text(10),\n 'title' => $this->faker->text(100),\n 'description' => $this->faker->text(300),\n 'slug' => function (array $attributes) {\n return Str::slug($attributes['title'], '-');\n },\n 'activated_at' => $this->faker->dateTimeThisCentury(),\n ];\n }", "title": "" }, { "docid": "589fe9471d57d55ae42acca30495c0bf", "score": "0.44822043", "text": "protected static function newFactory()\n {\n return PoolFactory::new();\n }", "title": "" }, { "docid": "aa9df9eacd94bbdfcbe66f9604b5f8bb", "score": "0.4470773", "text": "public function prepare()\n {\n print_r('准备' . $this->name);\n //通过原料工厂创建指定的原料,特定的工厂会生产特定的原料,不关心是哪一个工厂\n $this->dough = $this->ingredientFactory->createDough();\n $this->sauce = $this->ingredientFactory->createSauce();\n $this->cheese = $this->ingredientFactory->createCheese();\n $this->pepperoni = $this->ingredientFactory->createPepperoni();\n\n }", "title": "" }, { "docid": "b6e8d6837b81bbbfdb82380c28c12d6e", "score": "0.4470521", "text": "public function prepare()\n {\n print_r('准备' . $this->name);\n //通过原料工厂创建指定的原料,特定的工厂会生产特定的原料,不关心是哪一个工厂\n $this->dough = $this->ingredientFactory->createDough();\n $this->sauce = $this->ingredientFactory->createSauce();\n $this->cheese = $this->ingredientFactory->createCheese();\n $this->clam = $this->ingredientFactory->createClam();\n\n }", "title": "" }, { "docid": "811d25421041f479064de4514f2a5d07", "score": "0.44701692", "text": "abstract public function build();", "title": "" }, { "docid": "811d25421041f479064de4514f2a5d07", "score": "0.44701692", "text": "abstract public function build();", "title": "" }, { "docid": "823136ce03c36799fd0dcbc228da05e7", "score": "0.44700631", "text": "public function create(array $data)\n {\n $item = $this->model->newInstance();\n\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "title": "" }, { "docid": "da042cb05334e300ad4b7d73795deccd", "score": "0.44698396", "text": "public function definition()\n {\n $output = ['first_name' => $this->faker->firstName()];\n\n // 50/50 to add a middle name\n if(rand(0,1) === 1) $output['middle_name'] = $this->faker->firstName();\n\n $output['last_name'] = $this->faker->lastName();\n\n // 50/50 to add a suffix\n if(rand(0,1) === 1) $output['name_suffix'] = $this->faker->suffix();\n\n // Add a random primary_type and specialty\n $output['primary_type'] = array_rand(array_flip(self::$attrs['primary_type']));\n $output['specialty'] = array_rand(array_flip(self::$attrs['specialty']));\n\n // Add a minimum of 1, and randomly up to all 5 license_state_codes\n $output['license_state_code1'] = $this->faker->state();\n if(rand(0,1) === 1) {\n $output['license_state_code2'] = $this->faker->state();\n if(rand(0,1) === 1) {\n $output['license_state_code3'] = $this->faker->state();\n if(rand(0,1) === 1) {\n $output['license_state_code4'] = $this->faker->state();\n if(rand(0,1) === 1) {\n $output['license_state_code5'] = $this->faker->state();\n }\n }\n }\n }\n\n // Add a random cms_id\n $output['cms_id'] = $this->faker->unique()->numberBetween(100,10000) + 200000000;\n\n // Generate an address\n $output['address_id'] = Address::factory();\n\n return $output;\n }", "title": "" }, { "docid": "2370e333e33cefc901fdbb70a6a22f6d", "score": "0.44690385", "text": "public static function map($data, $target)\n {\n if (is_string($target)) {\n $target = new $target;\n }\n\n $propertyAccessor = new PropertyAccessor();\n\n foreach ($data as $key => $value) {\n $propertyAccessor->setValue($target, $key, $value);\n }\n\n return $target;\n }", "title": "" }, { "docid": "1d359d85512e08429f1d71c640378486", "score": "0.4468544", "text": "public function getDataModel()\n {\n $storelocatorData = $this->getData();\n\n $storelocatorDataObject = $this->storelocatorDataFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $storelocatorDataObject,\n $storelocatorData,\n StorelocatorInterface::class\n );\n\n return $storelocatorDataObject;\n }", "title": "" }, { "docid": "6e3980203b13b51491e18e774ca82b05", "score": "0.4468117", "text": "public function prepare()\n {\n print_r('准备' . $this->name);\n //通过原料工厂创建指定的原料,特定的工厂会生产特定的原料,不关心是哪一个工厂\n $this->dough = $this->ingredientFactory->createDough();\n $this->sauce = $this->ingredientFactory->createSauce();\n $this->cheese = $this->ingredientFactory->createCheese();\n\n }", "title": "" }, { "docid": "71da9cae822e48b9d429a6a4fb8f5d6b", "score": "0.44614625", "text": "protected function makeMetaDataManager()\n\t{\n\t\treturn MetaDataManager::create($this->makeXMLFilePath());\n\t}", "title": "" }, { "docid": "941a9e99c5a8904042edea50ace0c54e", "score": "0.4459969", "text": "public function createTestContainerGeneratorDataLoader(): DataLoader\n {\n $dataProcessor = new TestContainerGeneratorDataProcessor();\n return new DataLoader($dataProcessor);\n }", "title": "" }, { "docid": "0338fc0e94eaa326d1e5ed80e1cc8024", "score": "0.4452484", "text": "public function run()\n {\n $this->seedData('/countries/countries', Country::class);\n $this->seedData('/languages/language_status', LanguageStatus::class);\n $this->seedData('/languages/languages', Language::class);\n $this->seedData('/languages/language_translations', LanguageTranslation::class);\n $this->seedData('/languages/language_bibleInfo', LanguageBibleInfo::class);\n $this->seedData('/languages/numeral_systems', NumeralSystem::class);\n $this->seedData('/languages/numeral_system_glyphs', NumeralSystemGlyph::class);\n $this->seedData('/languages/alphabets', Alphabet::class);\n $this->seedData('/countries/country_translations', CountryTranslation::class);\n $this->seedData('/countries/country_languages', CountryLanguage::class);\n $this->seedData('/bibles/bibles', Bible::class);\n $this->seedData('/bibles/bibles_translations', BibleTranslation::class);\n $this->seedData('/organizations/organizations', Organization::class);\n $this->seedData('/organizations/assets', Asset::class);\n $this->seedData('/organizations/organization_translations', OrganizationTranslation::class);\n $this->seedData('/organizations/organization_logos', OrganizationLogo::class);\n $this->seedData('/organizations/organization_relationships', OrganizationRelationship::class);\n $this->seedData('/bibles/bible_links', BibleLink::class);\n $this->seedData('/bibles/books', Book::class);\n $this->seedData('/bibles/book_translations', BookTranslation::class);\n $this->seedData('/bibles/bible_books', BibleBook::class);\n $this->seedData('/bibles/bible_organization', BibleOrganization::class);\n $this->seedData('/bibles/bible_fileset_sizes', BibleFilesetSize::class);\n $this->seedData('/bibles/bible_fileset_types', BibleFilesetType::class);\n $this->seedData('/bibles/bible_filesets', BibleFileset::class);\n $this->seedData('/bibles/bible_fileset_connections', BibleFilesetConnection::class);\n $this->seedData('/bibles/bible_fileset_copyright_roles', BibleFilesetCopyrightRole::class);\n $this->seedData('/bibles/bible_fileset_copyrights', BibleFilesetCopyright::class);\n $this->seedData('/bibles/bible_fileset_copyright_organizations', BibleFilesetCopyrightOrganization::class);\n $this->seedData('/bibles/bible_files', BibleFile::class);\n $this->seedData('/bibles/bible_file_video_resolutions', VideoResolution::class);\n $this->seedData('/bibles/bible_file_video_transport_stream', VideoTransportStream::class);\n $this->seedData('/bibles/bible_organization', BibleOrganization::class);\n $this->seedData('/bibles/equivalents/bible-gateway', BibleEquivalent::class);\n $this->seedData('/access/access_groups', AccessGroup::class);\n $this->seedData('/access/access_types', AccessType::class);\n $this->seedData('/access/access_group_filesets', AccessGroupFileset::class);\n $this->seedData('/access/access_group_types', AccessGroupType::class);\n }", "title": "" }, { "docid": "bc5742995ace6a2cc15eb863a78f9ffd", "score": "0.4449567", "text": "abstract public static function create(array $data);", "title": "" }, { "docid": "f563655666fd13e58a871ee2f692aa8b", "score": "0.44469106", "text": "public function run()\n {\n $randomCoursesNumber = 100;\n $publishCourseNumber = 100;\n $normalCourseNumber = 100;\n $liveCourseNumber = 100;\n factory(App\\Models\\Course::class, $randomCoursesNumber)->create();\n factory(App\\Models\\Course::class, $publishCourseNumber)->state('publish')->create();\n factory(App\\Models\\Course::class, $normalCourseNumber)->state('normal')->create();\n factory(App\\Models\\Course::class, $liveCourseNumber)->state('live')->create();\n }", "title": "" }, { "docid": "7bb1d5397e92c1542815b89da3791128", "score": "0.44447657", "text": "protected function makeRepo()\n {\n return new EmployeeRepository(\n new Employee(),\n new UserRepository(new User())\n );\n }", "title": "" }, { "docid": "f7201d4c6b99ebd1c640496ac5e5f43e", "score": "0.44444385", "text": "public function getSource() {\n $entity = new Source;\n $entity->name = 'Source Name Test' ;\n $entity->api_key = 'ThisIsMyTestApiKey';\n\n $entity->save();\n\n return $entity;\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "3ca36acd1130c145fec3824dfbb00135", "score": "0.6494459", "text": "public function store(Request $request, $resource)\n {\n $command = $this->translator->getCommandFromResource($resource, 'store');\n\n $this->runBeforeCommands($command);\n\n $data = $this->dispatchFrom($command, $request);\n\n $this->fireEventForResource($resource, 'store', $data);\n\n return $this->success($data, 201);\n }", "title": "" }, { "docid": "00155c41d87c9c0387e4babe3e9a9ae9", "score": "0.6454226", "text": "public function save()\n {\n $this->storage->write($this);\n }", "title": "" }, { "docid": "7356d03f49eac7d05de240c473d2bfe9", "score": "0.6448581", "text": "public function save()\n {\n $this->handler->write($this->getId(), $this->prepareForStorage(\n serialize($this->attributes)\n ));\n\n $this->started = false;\n }", "title": "" }, { "docid": "8ee7e267114dc7aff05b19f9ebc39079", "score": "0.6424367", "text": "public function create($resource);", "title": "" }, { "docid": "5903d0dda7e3d80629ad4f3dc0709b1e", "score": "0.63630116", "text": "public function store()\n {\n $request = app($this->store_request);\n $this->service->create($request->all());\n\n return back()->with('success', 'Record Created Successfully');\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77284616", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "63ad7fad99855a56a3b8abf3768cf47e", "score": "0.7624933", "text": "public function create()\n {\n return $this->showForm(\"create\");\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.7588457", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75723624", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75723624", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.74937576", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.74937576", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "e29bfa68ffaef61efeb49c80001ed407", "score": "0.74066937", "text": "public function create()\n\t{\n\t\treturn view('properties.creation_form');\n\t}", "title": "" }, { "docid": "a88dfafe57fd2497dd585577ba27a652", "score": "0.73498106", "text": "public function create()\n {\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('pages.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "8a64a4d98dad0ad9bf563bea212fd7ee", "score": "0.7297957", "text": "public function create()\n {\n return view('pages.ministry.createForm');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7279311", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7279311", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "d003f30dbf6733d773b642b79c6ae697", "score": "0.7268012", "text": "public function newAction()\n {\n $form = $this->createForm($this->form, $this->entity);\n\n return $this->render($this->path_template.':new.html.twig', array(\n 'entity' => $this->entity,\n 'form' => $form->createView(),\n 'route_prefix' => $this->route_prefix\n ));\n }", "title": "" }, { "docid": "8654d58fdfc61d0a0f4ff85bc7de99cf", "score": "0.7236242", "text": "public function showCreateForm(){\n return view('create', [\n 'mode' => 'create'\n ]);\n }", "title": "" }, { "docid": "3fd8b0caa9c41dad35b63cf58721af6c", "score": "0.7232469", "text": "public function create()\n {\n return view('frontend.forms.create');\n \n }", "title": "" }, { "docid": "ee2aca4be13b6a0d979d2ece5284d39a", "score": "0.7229812", "text": "public function create()\n {\n //Показываем предстовления для добавления\n return view('back.car.create');\n }", "title": "" }, { "docid": "ede2ebb819285ef917e2b5a240f72abf", "score": "0.72276443", "text": "public function create()\n {\n //Show a form to create new record.\n return view('record.create');\n }", "title": "" }, { "docid": "f06182781baa0b805a9fec90241a5c37", "score": "0.7224071", "text": "public function create()\n {\n $this->authChecker();\n\n return view('general.form', ['setup' => [\n 'inrow'=>true,\n 'title'=>__('crud.new_item', ['item'=>__($this->title)]),\n 'action_link'=>route($this->webroute_path.'index'),\n 'action_name'=>__('crud.back'),\n 'iscontent'=>true,\n 'action'=>route($this->webroute_path.'store'),\n ],\n 'fields'=>$this->getFields(), ]);\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.7219317", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "b8aeabd2768a2ce4a6eea6ab19bdc556", "score": "0.71779215", "text": "public function create()\n {\n return view('addform');\n }", "title": "" }, { "docid": "cdccf0772168a4c3198ad8229762752f", "score": "0.7154761", "text": "public function create()\n {\n return $this->view('form');\n }", "title": "" }, { "docid": "4be7c43f422dc5a438147a5a698b32d9", "score": "0.71522576", "text": "public function newAction()\n\t{\n\t\t$this->render( View::make( 'curriculums/form' , array(\n\t\t\t'title' => 'Ajouter une formation',\n\t\t\t'timeslots' => Timeslot::all()\n\t\t) ) );\n\t}", "title": "" }, { "docid": "9b5e65ccdf189da41ab955a4ab00bd49", "score": "0.7149391", "text": "public function create()\n {\n return view('add-form');\n }", "title": "" }, { "docid": "c8569f6d3d5a0d408e7ad230e384a162", "score": "0.71404827", "text": "public function showForm()\n {\n return view('setup.people.create');\n }", "title": "" }, { "docid": "0324ad3d56f56ecb8342812c78064a91", "score": "0.7132452", "text": "public function newAction()\n {\n $this->initializeScaffolding();\n\n $this->beforeNew();\n $this->view->form = $this->scaffolding->getForm();\n $this->afterNew();\n }", "title": "" }, { "docid": "578e81ebc73ea116268e741f66c4dc24", "score": "0.7124008", "text": "public function create()\n {\n return view('rest.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71148264", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "4008dd9a844cc262307fa041eb2dee16", "score": "0.71073616", "text": "public function newAction()\n {\n $entity = new Contador();\n $form = $this->createForm(new ContadorType(), $entity);\n\n return $this->render('ContadoresBundle:Contador:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'contador_new'\n ));\n }", "title": "" }, { "docid": "07a64cd24a5f1e5d3715fda7ce81a07d", "score": "0.7088418", "text": "public function create()\n {\n\n return view('back_end.forms.hires.create');\n }", "title": "" }, { "docid": "e7930383d5f0c0a2ea4021d59a43c3a8", "score": "0.70831364", "text": "public function create()\n {\n return view('new.create');\n }", "title": "" }, { "docid": "c3ae649f0eb4efa3ab932240c426d328", "score": "0.70795923", "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['categories_select'] = $this->getCategory();\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "05f249c0d81bbf1140380ae6f2855bb1", "score": "0.7079468", "text": "public function create()\n {\n $form = Forms::firstOrNew(array('id' => -1));\n\n return view('formbuilder::admin.forms.create', compact('form'));\n }", "title": "" }, { "docid": "d96ee85fb50128d36ec966c8d1341d40", "score": "0.70765954", "text": "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/locations/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle implantation',\n\t\t\t'school_id' => (int) $this->getRequest()->get( 'school_id' )\n\t\t) ) );\n\t}", "title": "" }, { "docid": "6d417d3813fb26a07adc44e97c37c7cb", "score": "0.7071751", "text": "public function create()\n {\n //\n return view('penulis/add');\n }", "title": "" }, { "docid": "3d71bfc84cbf694bce46b63fdb6800a6", "score": "0.70659065", "text": "public function create()\n {\n // MOSTRAR VISTA DE FORMULARIO\n return view('admin.director.create');\n }", "title": "" }, { "docid": "d068d0081544540b36fbe64a62df48c3", "score": "0.7065631", "text": "public function create()\n {\n return view('drdr.form',['location' => 'Document Review & Distribution Request']);\n }", "title": "" }, { "docid": "1b1107c8c82f06e8836658e1dd6b8af5", "score": "0.70647335", "text": "public function create()\n {\n return view ('guru.form');\n }", "title": "" }, { "docid": "533cfd54aea57067b2e130dc0d9b0d25", "score": "0.70601684", "text": "public function create()\n {\n return view('conection.form');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571405", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "155e046a493adfb2e9e37bfd7fd9cfb4", "score": "0.7038376", "text": "public function create()\n {\n return view('laralite::admin.product.form', [\n 'type' => 'create',\n ]);\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7026507", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "ccd7222b977fae80d1e5a91064dcf3f5", "score": "0.70207435", "text": "public function create()\n {\n //\n return view('ireul/new');\n }", "title": "" }, { "docid": "0afba6121689958a008f66b75bb8be57", "score": "0.70135087", "text": "public function create() //there are controller actions\n\t{\n\t\treturn View::make(\"newUserForm\");\n\t}", "title": "" }, { "docid": "380a2b351ac1030e3005f6f9daa97b3f", "score": "0.7008994", "text": "public function create()\r\n {\r\n return view(\"add\");\r\n }", "title": "" }, { "docid": "17654b771a3310caa720e204f0f9365d", "score": "0.7002836", "text": "public function create()\n\t{\n\t\treturn view('hoadonnhap.create');\n\t}", "title": "" }, { "docid": "bf2059d4d118ee786d18d4a90906eef2", "score": "0.7000831", "text": "public function create()\n\t{\n\t\treturn View::make('allowances.create');\n\t}", "title": "" }, { "docid": "db6f3f5275afa6be79af48cc164f12b3", "score": "0.7000777", "text": "public function createAction() : object\n {\n // Load framework services\n $page = $this->di->get(\"page\");\n $session = $this->di->get(\"session\");\n\n // Active user id\n $userid = $session->get(\"user\", false);\n\n // Collect data\n $form = new CreateForm($this->di, $userid);\n $form->check();\n\n $data = [\n \"title\" => \"Frågor | Skapa ny\",\n \"navbar\" => 'question',\n \"intro_mount\" => 'Frågor',\n \"intro_path\" => 'Skapa ny',\n \"form\" => $form->getHTML()\n ];\n\n // Add and render views\n $page->add(\"mahw17/intro/subintro\", $data, \"subintro\");\n $page->add(\"mahw17/question/crud/create\", $data, \"main\");\n\n return $page->render($data);\n }", "title": "" }, { "docid": "4dd938930c0d9c3df89bd85bd0788218", "score": "0.6997316", "text": "public function newAction()\n {\n $entity = new $this->entityClass();\n $form = $this->createCreateForm($entity);\n\n return $this->render($this->render_prefix.'new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c299c48c1f296bf66e8cdcf3e0f57dad", "score": "0.69966495", "text": "public function create()\n {\n $model = new Supplier();\n return view('admin.supplier.form', compact('model'));\n }", "title": "" }, { "docid": "0dac64c43fb1ef4240ca5acfde71a1f3", "score": "0.6991837", "text": "public function newAction()\n {\n $entity = new CortePrenda();\n $form = $this->createForm(new CortePrendaType(), $entity, array());\n\n $data['titulo_cabecera'] = \"Cortes\";\n $data['titulo_principal'] = \"Corte - Nuevo registro\";\n $data['entity'] = $entity;\n $data['form'] = $form->createView();\n\n return $this->render('CreceRegistroBundle:CortePrenda:new.html.twig', $data);\n }", "title": "" }, { "docid": "c133f085eb2e1a836af4bc4199701298", "score": "0.6990993", "text": "public function create()\n {\n return view(\"fragment.project.form\");\n }", "title": "" }, { "docid": "9d1962f7179a2e73924d6e8ffcbd7fa9", "score": "0.69854355", "text": "public function create()\n {\n return view ('admin.nomenclaturas.create');\n }", "title": "" }, { "docid": "199d8719bade44313f54fd7f51c74d4a", "score": "0.6983768", "text": "public function create()\n {\n SEO::setTitle('Create ' . title_case($this->singular));\n SEO::setDescription('Create ' . title_case($this->singular));\n\n $fields = $this->getFieldsFromRules(new $this->formRequest);\n\n $viewPrefix = request()->is('admin*') ? 'admin.' : '';\n\n return view(\n $viewPrefix.'crud.create',\n [\n 'slug' => $this->slug,\n 'model' => $this->model,\n 'fields' => $fields,\n ]\n );\n }", "title": "" }, { "docid": "fe3e46fd58af29cb48481581ae0de0b2", "score": "0.6979709", "text": "public function create()\n {\n return view('siswa.form');\n }", "title": "" }, { "docid": "6fb9045be9dc19050a475201096a7558", "score": "0.6975252", "text": "public function create()\n {\n return view ('pilihan.create');\n }", "title": "" }, { "docid": "7bf3ffcd51f64242d7b97a5bfe9f3065", "score": "0.6972826", "text": "public function create()\n\t{\n\t\treturn View::make('ekstra.create');\n\t}", "title": "" }, { "docid": "8ad27ef2c924f5ed4baee8b0b6be49ed", "score": "0.6966099", "text": "public function create()\n {\n return view('marketing.hotmart.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n ]);\n }", "title": "" }, { "docid": "0a8864e0fefc68a0b923fed5bc033585", "score": "0.6956737", "text": "public function create()\n {\n return view ('livro.create');\n }", "title": "" }, { "docid": "df2d4c10e663c5e6017c53e6b2c821eb", "score": "0.69488806", "text": "public function create()\n {\n //Return Caregiver form\n return view('caregiver.create');\n }", "title": "" }, { "docid": "95fb9a388abcd56273de19cb2ca44c89", "score": "0.69452924", "text": "public function create()\n {\n return view('vinyls.create');\n }", "title": "" }, { "docid": "1d48c829643cbd9ac81333950ddcb4db", "score": "0.6942023", "text": "public function create()\n {\n $data['designations'] = Designation::orderBy('name', 'asc')->get();\n $data['user_types'] = UserType::where('id', '!=', 1)->orderBy('user_type', 'asc')\n ->get();\n return view('humanResource.humanResourceForm', $data);\n }", "title": "" }, { "docid": "6cd3db66a165d4bfece0d03b5ab62ca8", "score": "0.69367474", "text": "public function create()\n {\n return view('presensi::create');\n }", "title": "" }, { "docid": "b40ba4940b2b8342898480f2b67766eb", "score": "0.6934187", "text": "public function create()\n\t{\n\t\treturn view('registerhamils.create');\n\t}", "title": "" }, { "docid": "214a38e5841db268c513869d01a78ef1", "score": "0.6929673", "text": "public function create() {\n $this->data['action'] = 'Create';\n \t\treturn view('brand.form',$this->data);\n \t}", "title": "" }, { "docid": "b74e67d554c312fd5f4d53bfaf69251e", "score": "0.69283205", "text": "public function create()\n {\n $action = route('admin.flores.store');\n return view('admin.flores.form', compact('action'));\n }", "title": "" }, { "docid": "71e21da0cf61608bfc6a3fd38a4b09a6", "score": "0.69266474", "text": "public function create()\n\t{\n\t\treturn view('konselor.create');\n\t}", "title": "" }, { "docid": "d25ce1cb8774e2810f7f5636e8d3c3c1", "score": "0.6922638", "text": "public function create()\n {\n return view('book.bookadd');\n }", "title": "" }, { "docid": "726d68b28ff59e41d60c97aa8795c184", "score": "0.69209784", "text": "public function create()\n {\n $type ='add';\n $menu = 'Iklan';\n $submenu = 'index';\n $pagename = 'Iklan';\n return view('dashboard.iklan.form', compact('menu', 'submenu', 'pagename', 'type'));\n }", "title": "" }, { "docid": "4cc618292f3b10c40b709baa2f548833", "score": "0.69183934", "text": "public function create() {\n\n //validate the incoming request\n if (!is_numeric(request('resource_id')) || !in_array(request('resource_type'), $this->approved_resources)) {\n //hide the add button\n request()->merge([\n 'visibility_list_page_actions_add_button' => false,\n ]);\n }\n\n //payload\n $payload = [];\n\n //show the view\n return new CreateResponse($payload);\n }", "title": "" }, { "docid": "cb8709fb04c248c1ba63342e526c5646", "score": "0.69177157", "text": "public function create()\n {\n return view('healthexpertform');\n }", "title": "" }, { "docid": "a511dc05130f630f248f7d9e7bfdc4b7", "score": "0.69135106", "text": "public function create()\n {\n $name = \"Osaa inayat\";\n return view('AdminPanel.AddingNewProduct.ProductForm',compact('name'));\n }", "title": "" }, { "docid": "82b22b9f466b32b12e30d34ff6379faf", "score": "0.6913199", "text": "public function create()\n\t{\n\t\treturn view('hoadontk.create');\n\t}", "title": "" }, { "docid": "c9f1137f9370eb2b5a601d1eab133a0d", "score": "0.6909421", "text": "public function create()\n {\n \n return view('control.create');\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906439", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "82a112e6801a21325d7d6387e9c21d43", "score": "0.6902604", "text": "public function create()\n {\n // $tambah_catalog = \\App\\model_catalog::all();\n return view('form');\n }", "title": "" }, { "docid": "82bccdb6ba01bbfa961f7a135f2ea8c2", "score": "0.6899032", "text": "public function create()\n {\n return view('manufacturer.ManufacturerForm');\n }", "title": "" }, { "docid": "318d6b1f3710da9252c900caa8730e2c", "score": "0.68971664", "text": "public function create()\n\t{\n\t\treturn View::make('dynaflow::sysflow.form');\n\t}", "title": "" }, { "docid": "d875494da1f4659d50a3a7e9a879a767", "score": "0.68952507", "text": "public function create() //renders the view to display the form to create a Farm\n {\n //\n return view('farms.create');\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890121", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "52b58d6fc4a50661368b682a572eca31", "score": "0.6889911", "text": "public function create()\n {\n return view('main.create');\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.6888326", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.6888326", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "9d96152ef5a961f400ba5e942b648dfc", "score": "0.6886949", "text": "public function create()\n {\n return \"form.blade.php\";\n }", "title": "" }, { "docid": "140b03129b019858acfaf2da89962546", "score": "0.68856966", "text": "public function create() {\n print ('aki esta el formulario de crear');\n }", "title": "" }, { "docid": "6ef3748a0657559a1fd00a6cc4d782a8", "score": "0.68856204", "text": "public function create() //Mostra o formulário de criar\n {\n return view('novocliente');\n }", "title": "" }, { "docid": "067b9d24b5dac175821c0735d6d806cc", "score": "0.68855023", "text": "public function create()\n {\n return view('master.form.store-form');\n }", "title": "" }, { "docid": "d9fb9408a2ea2284ba0eb01e9b9f0ad9", "score": "0.68853515", "text": "public function create()\n\t{\n\t\treturn view('bookadd');\n\t}", "title": "" }, { "docid": "ac084576ebba1a00bcfe56d170892acd", "score": "0.68848366", "text": "public function create()\n {\n //\n return view('hr.job.new');\n }", "title": "" }, { "docid": "ec8d29c90d63c7dd5dc4c06d47bbbc59", "score": "0.6881617", "text": "public function create()\n\t{\n\t\treturn View::make('marcas.create');\n\t}", "title": "" }, { "docid": "a1931b2dade47be4ae044efee6a437c9", "score": "0.68812037", "text": "public function create()\n {\n return view('terms.form.create');\n }", "title": "" }, { "docid": "6ff9402d5f32e658ee203214231d02a5", "score": "0.68809646", "text": "public function create()\n\t{\n\t\treturn view('siswa.create');\n\t}", "title": "" }, { "docid": "3e7f6652e7cb52b2c7212149ee225866", "score": "0.6880933", "text": "public function create()\n {\n return view('admin.addNewMemberForm');\n }", "title": "" }, { "docid": "029d8900ec4b878546c64c7d4964c9d0", "score": "0.68782794", "text": "public function create()\n {\n // grazina vaizda i client.create vaizda- forma sukurimui\n return view (\"client.create\");\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.68750674", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "442b566398321ea055dcc29fb9151c08", "score": "0.6871886", "text": "public function create()\r\n {\r\n //\r\n return view('secretary.secretary-form');\r\n }", "title": "" }, { "docid": "6e5bbe77c19ff98d3f26567dbcab62ac", "score": "0.68704957", "text": "public function create()\n {\n return view('pharmacist.create');\n }", "title": "" }, { "docid": "b61af7c8c374791295e620c96cd2efe2", "score": "0.68678457", "text": "public function create()\n\t{\n\t\treturn view('promotores.create');\n\t}", "title": "" }, { "docid": "aa81c39ccad2d288485f3d159e37562d", "score": "0.6867421", "text": "public function create()\n {\n $resources = Resource::all();\n return view('income.add', compact('resources'));\n }", "title": "" }, { "docid": "cbfb3722629fd217139fdd353b1d221a", "score": "0.68662983", "text": "public function newAction()\n {\n\t\t$request = Request::createFromGlobals();\n\n $entity = new Customer();\n\n $form = $this->createForm(new CustomerType(), $entity);\n\n return $this->render('EcsCrmBundle:Customer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "4715d6a980032ef3d97b14b36b6a4836", "score": "0.6860022", "text": "public function create()\n {\n // load the create form\n return View::make('admin/contacts/create');\n }", "title": "" }, { "docid": "5262a456380a2fc8192827bb080bd28d", "score": "0.6859541", "text": "public function create()\n {\n //\n return view('cajas.new');\n }", "title": "" } ]
6c1e20e7a397eb26dc7b8085c3b4f8e3
Load options to use later
[ { "docid": "a160eb9b232dbeadd89e4a79cfb46f5c", "score": "0.78402823", "text": "function loadOptions()\n\t{\n\n\t\t$this->_options = get_option($this->WPB_PREFIX.'_settings',$this->_defaults);\n\n\t}", "title": "" } ]
[ { "docid": "cdb301da8230ba1e505fa4722732f5b9", "score": "0.81560457", "text": "public function load_options() {\n\t\tif ( !$this->options )\n\t\t\t$this->options = (array) get_option( self::HANDLE, array(\n\t\t\t'consumer_key' => '',\n\t\t\t'consumer_secret' => ''\n\t\t) );\n\t}", "title": "" }, { "docid": "3511d8b6fd338839b88b84cdbd0aae05", "score": "0.7850549", "text": "function loadOptions() {\n $this->options = array_merge($this->options_default, get_option('asgarosforum_options', array()));\n $this->options_editor['teeny'] = $this->options['minimalistic_editor'];\n }", "title": "" }, { "docid": "a98f3469afdac42dc8a47dcc5254edb1", "score": "0.7499512", "text": "private function load_options() {\r\n\t\t$options = get_option( 'wp_declutter_options', array() );\r\n\t\tif( !isset( $options['options_version'] ) || $options['options_version'] < self::db_version ) {\r\n\t\t\t$defaults = array( 'wp_headers', 'wp_head', 'template_redirect', 'feed', 'body_classes', 'post_classes', 'comment_classes', 'menu_classes', 'special', 'other' );\r\n\t\t\tforeach( $defaults as $d ) if( !isset( $options[$d] ) ) $options[$d] = array();\t// empty array\r\n\r\n\t\t\t// delete old wp_head options\r\n\t\t\tforeach( array( 'index_rel_link', 'parent_post_rel_link', 'start_post_rel_link' ) as $old )\r\n\t\t\t\tunset( $options['wp_head'][$old] );\r\n\r\n\t\t\t$options['options_version'] = self::db_version;\r\n\t\t\tupdate_option( 'wp_declutter_options' , $options );\r\n\t\t}\r\n\t\t$this->options = $options;\r\n\t}", "title": "" }, { "docid": "bf9973206c74e3c8cb77155050a87b16", "score": "0.739185", "text": "function LoadOptions() {\n\n\t\t$this->InitOptions();\n\n\t\t//First init default values, then overwrite it with stored values so we can add default\n\t\t//values with an update which get stored by the next edit.\n\t\t$storedoptions=get_option(\"sm_options\");\n\t\tif($storedoptions && is_array($storedoptions)) {\n\t\t\tforeach($storedoptions AS $k=>$v) {\n\t\t\t\t$this->_options[$k]=$v;\n\t\t\t}\n\t\t} else update_option(\"sm_options\",$this->_options); //First time use, store default values\n\t}", "title": "" }, { "docid": "461c235d5dc187cf95ad96f3ccb31b51", "score": "0.72593766", "text": "protected function options() { }", "title": "" }, { "docid": "c287cbb94569761038bdc39e2ca3be93", "score": "0.72047824", "text": "public function preload_options($options)\n {\n }", "title": "" }, { "docid": "f5cafde3acf20f2c9e32d950a7e3820e", "score": "0.7202646", "text": "function getOptions() {}", "title": "" }, { "docid": "2aacbf2c3267b22383ffefa61c034b33", "score": "0.71640617", "text": "protected function _loadOptions()\n\t{\n\t\t$options = $this->getFrontController()\n\t\t\t->getParam(\"bootstrap\")\n\t\t\t->getOption(\"facebook\");\n\t\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.71584105", "text": "public function options();", "title": "" }, { "docid": "cd169dfebfae55494d1173fc71dd6a91", "score": "0.7119314", "text": "protected function getOptions() {}", "title": "" }, { "docid": "cd169dfebfae55494d1173fc71dd6a91", "score": "0.7119314", "text": "protected function getOptions() {}", "title": "" }, { "docid": "c1ab542840a834a8b71e1d2a78c40b9d", "score": "0.71126956", "text": "public function options(){}", "title": "" }, { "docid": "0e5028e94f3c958adec4a6147581db3d", "score": "0.70860386", "text": "abstract protected static function getOptions();", "title": "" }, { "docid": "97a7cbf56929202f5ad83e52aa0115c7", "score": "0.70755637", "text": "public function load_options(){\n\n\t\t$service_options = API_Con_Model::get( API_Con_Model::$meta_keys['service_options'] );\n\t\t$options = $service_options[ $this->name ];\n\n\t\tif ( count( $options ) )\n\t\t\tforeach ( $options as $key => $val )\n\t\t\t\t$this->options[$key] = $val;\n\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "b4b11a4e3137f40829257be01863f9dd", "score": "0.7070116", "text": "public function load_options(){\r\n\r\n // detect loaded or not\r\n if( $this->options_loaded )\r\n return;\r\n\r\n $options = apply_filters( 'better-framework/user-metabox/options', array() );\r\n\r\n $this->options = array();\r\n foreach( $options as $key => $val ){\r\n\r\n if(\r\n preg_match( '/(\\d+)|(^[^_a-zA-Z])(^\\d)/', $key )\r\n || empty( $val['config'] )\r\n || empty( $val['fields'] )\r\n )\r\n continue;\r\n\r\n $this->options[ $key ] = $val;\r\n }\r\n }", "title": "" }, { "docid": "7791ca0de26efc95184cb768042d63d3", "score": "0.70081866", "text": "protected function _initOptions()\n {\n $options = $this->getOptions();\n \n if (isset($options['options'])) {\n foreach ($options['options'] as $key => $value) {\n Zend_Registry::set('option-' . $key, $value);\n }\n }\n }", "title": "" }, { "docid": "4d3bda707afac9ae1d570c55532ffdb1", "score": "0.6991589", "text": "public function initOptions() {\n\n\t\t\trequire_once( 'tribe-settings.class.php' );\n\t\t\trequire_once( 'tribe-settings-tab.class.php' );\n\t\t\trequire_once( 'tribe-field.class.php' );\n\t\t\trequire_once( 'tribe-validate.class.php' );\n\n\t\t\tTribeSettings::instance();\n\t\t}", "title": "" }, { "docid": "60f1a4e6e8908647830ff1678090a865", "score": "0.6961377", "text": "public static function getOptions() {}", "title": "" }, { "docid": "b9474331e778d2299b602917290b8f2c", "score": "0.69544166", "text": "function init_options() {\n\t\t$this->options = new SF_Plugin_Options( 'socialflow', apply_filters( 'sf_init_options', $this->default_options ) );\n\t}", "title": "" }, { "docid": "6fa6c3aabb3fc66e6b7c90955f59c125", "score": "0.6943463", "text": "protected function initOptions()\n {\n $this\n ->fetchParent()\n ->fetchItemVariants()\n ->fetchCustomRouteName()\n ->fetchDefaultOptions()\n ->fetchExtra()\n ->fetchTitle()\n ->fetchVisible()\n ->fetchVisibleIfDisabled()\n ->fetchAliasRouteNames()\n ->fetchRequireRouteName()\n ->fetchCustomUrl()\n ->fetchAddRequestVariables()\n ->fetchSetRequestVariables()\n ->fetchMatchRequestVariables()\n ->fetchAnchor()\n ->fetchIcons()\n ->fetchRequireRole()\n ->fetchTemplates()\n ->fetchPropel()\n ->fetchCustomObject()\n ;\n }", "title": "" }, { "docid": "830005d4547e6b5aa3a534a8946fd633", "score": "0.6929383", "text": "public static function options_setup() {\n\t\t\t\t\n\t\t\tslp_pvw_plugin_framework::pvw_options_setup();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "475c87171bfc8d66dd041ce1cc540a62", "score": "0.69177574", "text": "function load_options($prefix, $my_array){\n\t\t// noop\n\t}", "title": "" }, { "docid": "b3c55834f42fdd8ce604e711c27e9767", "score": "0.6904324", "text": "function getOptions() ;", "title": "" }, { "docid": "25f8d27cd4ff371fba12d051fab1ed11", "score": "0.6903384", "text": "public function get_options();", "title": "" }, { "docid": "c79c4ce847460cc1bd6736932e2b2482", "score": "0.69022477", "text": "abstract public function getOptions();", "title": "" }, { "docid": "307965dddae2960d2ee7b25165a0c31d", "score": "0.6876415", "text": "function set_opts( $options ) {\n\t\t$this->options = array_merge( $this->options, $options );\n\t}", "title": "" }, { "docid": "4979d50a6c3e0f37425644cd435d8a74", "score": "0.68566376", "text": "function options_init() {\n return array();\n }", "title": "" }, { "docid": "f8c4f4e7a16af2ef533d3ba46e991329", "score": "0.6813792", "text": "function options() {\n $webweb_wp_mibew_obj = WebWeb_WP_Mibew::get_instance();\n $opts = get_option('settings');\n\n include_once(dirname(__FILE__) . '/menu.settings.php');\n }", "title": "" }, { "docid": "b86534a7af42ee8a19e31449eab30105", "score": "0.676477", "text": "function load_options($prefix, $my_array){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "668dec0a1af768681f1f14a8bb110fc1", "score": "0.6758295", "text": "protected function _init_options ($options)\n {\n $options->show_folder = false;\n $options->show_branch = false;\n $options->show_release = false;\n }", "title": "" }, { "docid": "7bf4dbf2f1c43b4443f561ec68a50a56", "score": "0.6756522", "text": "public function getOptionsExternally()\n\t{\n\t\t$this->loadExternally = 1;\n\n\t\treturn $this->getOptions();\n\t}", "title": "" }, { "docid": "6d5c8cdcfce5eaa5d99938d0306a953c", "score": "0.675355", "text": "public function init() {\n\t\t$backup = json_decode( get_option( $this->optionsName ), true );\n\t\tif ( empty( $backup ) ) {\n\t\t\tupdate_option( $this->optionsName, '{}' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->backup = $backup;\n\t\t$this->options = aioseo()->dynamicOptions->getDefaults();\n\n\t\t$this->restorePostTypes();\n\t\t$this->restoreTaxonomies();\n\t\t$this->restoreArchives();\n\t}", "title": "" }, { "docid": "a62ab2c50e6711b567edd6f2d2975b91", "score": "0.67332894", "text": "function initialize_options()\r\n\t\t{\r\n\t\t\tglobal $config;\r\n\r\n\t\t\t$defaults = array(\r\n\t\t\t\t'prime_captcha_reg'\t\t=> PRIME_CAPTCHA_ENABLE,\r\n\t\t\t\t'prime_captcha_post'\t=> PRIME_CAPTCHA_ENABLE,\r\n\t\t\t);\r\n\t\t\tforeach ($defaults as $option => $default)\r\n\t\t\t{\r\n\t\t\t\tif (!isset($config[$option]))\r\n\t\t\t\t{\r\n\t\t\t\t\tset_config($option, $default);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "85a6d991823cb7e5a946b4efb6bffcb4", "score": "0.6720667", "text": "public function loadFromOptions()\n\t{\n\t\t$this->files = /*.(array[int][string]string).*/ array();\n\t\tforeach(CBitrixCloudOption::getOption(\"backup_files\")->getArrayValue() as $FILE_NAME => $FILE_SIZE)\n\t\t{\n\t\t\t$this->files[] = array(\n\t\t\t\t\"FILE_NAME\" => $FILE_NAME,\n\t\t\t\t\"FILE_SIZE\" => $FILE_SIZE,\n\t\t\t);\n\t\t}\n\t\t$this->quota = doubleval(CBitrixCloudOption::getOption(\"backup_quota\")->getStringValue());\n\t\t$this->total_size = doubleval(CBitrixCloudOption::getOption(\"backup_total_size\")->getStringValue());\n\t\t$this->last_backup_time = intval(CBitrixCloudOption::getOption(\"backup_last_backup_time\")->getStringValue());\n\t\t$this->init = true;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c3dbf721841467f581df6613bd3c23fb", "score": "0.6716727", "text": "private function load_options() {\n\n\t\tglobal $cs;\n\n\t\t/**\n\t\t * Delete Options Transient when Options page is saved\n\t\t */\n\t\tadd_action('acf/save_post', function ($post_id) {\n\n\t\t\tif ( $post_id == 'options' )\n\t\t\t\tdelete_transient( 'cs_options' );\n\n\t\t}, 1);\n\n\n\n\n\t\t/**\n\t\t * Load Options as transient\n\t\t */\n\t\t$cs = get_transient('cs_options');\n\n\t\tif ( $cs === false ) {\n\n\t\t\t$cs = get_fields('options');\n\t\t\tset_transient('cs_options', $cs, 3600 * 24);\n\n\n\t\t\t$css = get_key('cs_custom_css', $cs);\n\n\t\t\tif ( $css ) :\n\n\t\t\t\t$custom_css = fopen( get_theme_file_path('custom.css') , 'w');\n\n\t\t\t\tfwrite($custom_css, $css);\n\t\t\t\tfclose($custom_css);\n\t\t\tendif;\n\t\t}\n\t}", "title": "" }, { "docid": "bc5b10c2e683e13efea765bf41e7f00a", "score": "0.67100924", "text": "function initialize_options() {\n $in_series_opts = get_option('in_series');\n $value = InSeriesInit::get_default_options();\n if(empty($in_series_opts)) {\n $desc = __('Determines how In Series stores and displays series data', 'in_series');\n add_option('in_series', $value, $desc);\n }\n else {\n InSeriesInit::do_2_2_to_3_0_option_convert();\n InSeriesInit::do_3_0_to_3_1_option_convert();\n // Refresh the options\n $in_series_opts = get_option('in_series');\n\n // Merge any missing (new, and with no backwards-mapping) options\n foreach($value as $key => $item) {\n if(empty($in_series_opts[\"$key\"]))\n { $in_series_opts[\"$key\"] = $item; }\n }\n $in_series_opts[\"in_series_version\"] = $value[\"in_series_version\"];\n update_option(\"in_series\", $in_series_opts);\n }\n }", "title": "" }, { "docid": "9d7ca4051b3e099aa3fabf34e9a6ffdd", "score": "0.670516", "text": "public function initialize(Getopt $_options)\n {\n\n }", "title": "" }, { "docid": "4c654562577346e077e2a71b08d14875", "score": "0.6704393", "text": "public function getOptions() {}", "title": "" }, { "docid": "4c654562577346e077e2a71b08d14875", "score": "0.6704393", "text": "public function getOptions() {}", "title": "" }, { "docid": "4c654562577346e077e2a71b08d14875", "score": "0.6703967", "text": "public function getOptions() {}", "title": "" }, { "docid": "335aeef8e844c2790814ee1f889f980d", "score": "0.6697425", "text": "function options() {\n\t\t$WebWeb_WP_NotesRemover_obj = WebWeb_WP_NotesRemover::get_instance();\n $opts = get_option('settings');\n\n include_once(WebWeb_WP_NotesRemover_BASE_DIR . '/menu.settings.php');\n }", "title": "" }, { "docid": "833c2f530493af262c054098482a798c", "score": "0.66930544", "text": "protected function _init_options ($options)\n {\n $options->show_folder = false;\n $options->show_component = false;\n }", "title": "" }, { "docid": "10e7a3428ef22b08d331f72e43d3eb2e", "score": "0.6691167", "text": "protected function _init_options ($options)\n {\n $options->show_folder = false;\n $options->show_branch = false;\n }", "title": "" }, { "docid": "d0f3a4f536d292f54eec9d371bc677be", "score": "0.6688369", "text": "private function __construct()\n\t\t{\n\t\t\t$this->options = get_option(self::OPTION_KEY);\n\t\t}", "title": "" }, { "docid": "46967b082590f8dcb73d185d8d085cb1", "score": "0.6665834", "text": "private static function parseOptions ( &$options ) {\n\t\t$option_defaults = array(\n\t\t\t'macros' => true,\n\t\t\t'comments' => false,\n\t\t\t'minify' => true,\n\t\t\t'versioning' => true,\n\t\t);\n\t\tself::$options = is_array( $options ) ?\n\t\t\tarray_merge( $option_defaults, $options ) : $option_defaults;\n\t}", "title": "" }, { "docid": "e250ae3470dc1c97a9e88f5416489b52", "score": "0.66499925", "text": "private function loadThemeOptions() {\n\t\t$of_functions\t= __DIR__ . '/vendor/options-framework/functions.php';\n\t\tif (file_exists($of_functions)) {\n\t\t\trequire_once $of_functions;\n\t\t}\n\t}", "title": "" }, { "docid": "3f844db588e35e1180334d161838dbb8", "score": "0.6638455", "text": "protected function get_registered_options()\n {\n }", "title": "" }, { "docid": "7d068812e2166b357ed6f2bb3248e0dc", "score": "0.66366285", "text": "static private function loadOptions() {\n\n if (static::$option_value_types) {\n return;\n }\n\n $options = array(\n 'CURLOPT_AUTOREFERER' => \"bool\",\n 'CURLOPT_BINARYTRANSFER' => \"bool\",\n 'CURLOPT_COOKIESESSION' => \"bool\",\n 'CURLOPT_CERTINFO' => \"bool\",\n 'CURLOPT_CRLF' => \"bool\",\n 'CURLOPT_DNS_USE_GLOBAL_CACHE' => \"bool\",\n 'CURLOPT_FAILONERROR' => \"bool\",\n 'CURLOPT_FILETIME' => \"bool\",\n 'CURLOPT_FOLLOWLOCATION' => \"bool\",\n 'CURLOPT_FORBID_REUSE' => \"bool\",\n 'CURLOPT_FRESH_CONNECT' => \"bool\",\n 'CURLOPT_FTP_USE_EPRT' => \"bool\",\n 'CURLOPT_FTP_USE_EPSV' => \"bool\",\n 'CURLOPT_FTP_CREATE_MISSING_DIRS' => \"bool\",\n 'CURLOPT_FTPAPPEND' => \"bool\",\n 'CURLOPT_FTPASCII' => \"bool\",\n 'CURLOPT_FTPLISTONLY' => \"bool\",\n 'CURLOPT_HEADER' => \"bool\",\n 'CURLINFO_HEADER_OUT' => \"bool\",\n 'CURLOPT_HTTPGET' => \"bool\",\n 'CURLOPT_HTTPPROXYTUNNEL' => \"bool\",\n 'CURLOPT_MUTE' => \"bool\",\n 'CURLOPT_NETRC' => \"bool\",\n 'CURLOPT_NOBODY' => \"bool\",\n 'CURLOPT_NOPROGRESS' => \"bool\",\n 'CURLOPT_NOSIGNAL' => \"bool\",\n 'CURLOPT_POST' => \"bool\",\n 'CURLOPT_PUT' => \"bool\",\n 'CURLOPT_RETURNTRANSFER' => \"bool\",\n 'CURLOPT_SSL_VERIFYPEER' => \"bool\",\n 'CURLOPT_TRANSFERTEXT' => \"bool\",\n 'CURLOPT_UNRESTRICTED_AUTH' => \"bool\",\n 'CURLOPT_UPLOAD' => \"bool\",\n 'CURLOPT_VERBOSE' => \"bool\",\n 'CURLOPT_BUFFERSIZE' => \"int\",\n 'CURLOPT_CLOSEPOLICY' => \"int\",\n 'CURLOPT_CONNECTTIMEOUT' => \"int\",\n 'CURLOPT_CONNECTTIMEOUT_MS' => \"int\",\n 'CURLOPT_DNS_CACHE_TIMEOUT' => \"int\",\n 'CURLOPT_FTPSSLAUTH' => \"int\",\n 'CURLOPT_HTTP_VERSION' => \"int\",\n 'CURLOPT_HTTPAUTH' => \"int\",\n 'CURLOPT_INFILESIZE' => \"int\",\n 'CURLOPT_LOW_SPEED_LIMIT' => \"int\",\n 'CURLOPT_LOW_SPEED_TIME' => \"int\",\n 'CURLOPT_MAXCONNECTS' => \"int\",\n 'CURLOPT_MAXREDIRS' => \"int\",\n 'CURLOPT_PORT' => \"int\",\n 'CURLOPT_PROTOCOLS' => \"int\",\n 'CURLOPT_PROXYAUTH' => \"int\",\n 'CURLOPT_PROXYPORT' => \"int\",\n 'CURLOPT_PROXYTYPE' => \"int\",\n 'CURLOPT_REDIR_PROTOCOLS' => \"int\",\n 'CURLOPT_RESUME_FROM' => \"int\",\n 'CURLOPT_SSL_VERIFYHOST' => \"int\",\n 'CURLOPT_SSLVERSION' => \"int\",\n 'CURLOPT_TIMECONDITION' => \"int\",\n 'CURLOPT_TIMEOUT' => \"int\",\n 'CURLOPT_TIMEOUT_MS' => \"int\",\n 'CURLOPT_TIMEVALUE' => \"int\",\n 'CURLOPT_MAX_RECV_SPEED_LARGE' => \"int\",\n 'CURLOPT_MAX_SEND_SPEED_LARGE' => \"int\",\n 'CURLOPT_SSH_AUTH_TYPES' => \"int\",\n 'CURLOPT_CAINFO' => \"string\",\n 'CURLOPT_CAPATH' => \"string\",\n 'CURLOPT_COOKIE' => \"string\",\n 'CURLOPT_COOKIEFILE' => \"string\",\n 'CURLOPT_COOKIEJAR' => \"string\",\n 'CURLOPT_CUSTOMREQUEST' => \"string\",\n 'CURLOPT_EGDSOCKET' => \"string\",\n 'CURLOPT_ENCODING' => \"string\",\n 'CURLOPT_FTPPORT' => \"string\",\n 'CURLOPT_INTERFACE' => \"string\",\n 'CURLOPT_KEYPASSWD' => \"string\",\n 'CURLOPT_KRB4LEVEL' => \"string\",\n 'CURLOPT_POSTFIELDS' => array(\"string\",\"array\"),\n 'CURLOPT_PROXY' => \"string\",\n 'CURLOPT_PROXYUSERPWD' => \"string\",\n 'CURLOPT_RANDOM_FILE' => \"string\",\n 'CURLOPT_RANGE' => \"string\",\n 'CURLOPT_REFERER' => \"string\",\n 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' => \"string\",\n 'CURLOPT_SSH_PUBLIC_KEYFILE' => \"string\",\n 'CURLOPT_SSH_PRIVATE_KEYFILE' => \"string\",\n 'CURLOPT_SSL_CIPHER_LIST' => \"string\",\n 'CURLOPT_SSLCERT' => \"string\",\n 'CURLOPT_SSLCERTPASSWD' => \"string\",\n 'CURLOPT_SSLCERTTYPE' => \"string\",\n 'CURLOPT_SSLENGINE' => \"string\",\n 'CURLOPT_SSLENGINE_DEFAULT' => \"string\",\n 'CURLOPT_SSLKEY' => \"string\",\n 'CURLOPT_SSLKEYPASSWD' => \"string\",\n 'CURLOPT_SSLKEYTYPE' => \"string\",\n 'CURLOPT_URL' => \"string\",\n 'CURLOPT_USERAGENT' => \"string\",\n 'CURLOPT_USERPWD' => \"string\",\n 'CURLOPT_HTTP200ALIASES' => \"array\",\n 'CURLOPT_HTTPHEADER' => \"array\",\n 'CURLOPT_POSTQUOTE' => \"array\",\n 'CURLOPT_QUOTE' => \"array\",\n 'CURLOPT_FILE' => \"resource\",\n 'CURLOPT_INFILE' => \"resource\",\n 'CURLOPT_STDERR' => \"resource\",\n 'CURLOPT_WRITEHEADER' => \"resource\",\n 'CURLOPT_HEADERFUNCTION' => \"callable\",\n 'CURLOPT_PASSWDFUNCTION' => \"callable\",\n 'CURLOPT_PROGRESSFUNCTION' => \"callable\",\n 'CURLOPT_READFUNCTION' => \"callable\",\n 'CURLOPT_WRITEFUNCTION' => \"callable\",\n );\n\n foreach ($options as $option => $type) {\n if (defined($option)) {\n static::$option_value_types[constant($option)] = $type;\n }\n }\n }", "title": "" }, { "docid": "a4247cbda07a0b1de7efc035aa1ab732", "score": "0.6621516", "text": "function init__options() {\n\n\t\t$this->set__existing_version();\n\n\t\tif ( ! $this->have_existing_version() ) {\n\t\t\t$this->set__options();\n\t\t\tupdate_option( \"$this->option_name-version\", $this->version );\n\t\t\tupdate_option( $this->option_name, apply_filters( \"init-options-$this->option_name\", $this->options ) );\n\t\t}\n\n\t}", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.660957", "text": "public function getOptions();", "title": "" }, { "docid": "faca89311e8c7a7902a25f076fadd35f", "score": "0.6600442", "text": "protected function initOptions()\n {\n if (!isset($this->options['id'])) {\n $this->options['id'] = $this->getId();\n }\n }", "title": "" }, { "docid": "60655125be20ba59e8e59e9a3f689362", "score": "0.65915436", "text": "protected function defineOptions() {\n return [];\n }", "title": "" }, { "docid": "17f3374b7056767192ad25378ad14d8b", "score": "0.65824634", "text": "public function options($assoc = false);", "title": "" }, { "docid": "54ee9e3b5716e138de030325ba89a224", "score": "0.6581299", "text": "function happyrider_core_customizer_load_options() {\n\t\t$mode = isset($_POST['mode']) ? $_POST['mode'] : '';\n\t\t$override = isset($_POST['override']) ? $_POST['override'] : '';\n\t\tif ($mode!='reset' || $override!='customizer') {\n\t\t\tglobal $HAPPYRIDER_GLOBALS;\n\t\t\t$schemes = get_option('happyrider_options_custom_colors');\n\t\t\tif (!empty($schemes)) $HAPPYRIDER_GLOBALS['custom_colors'] = $schemes;\n\t\t\t$fonts = get_option('happyrider_options_custom_fonts');\n\t\t\tif (!empty($fonts)) $HAPPYRIDER_GLOBALS['custom_fonts'] = $fonts;\n\t\t}\n\t}", "title": "" }, { "docid": "90aa46bf215a8b457f6a6c2aa62eefb2", "score": "0.6573443", "text": "public function moduleOptionsLoad()\n\t{\n\t\t$GLOBALS['TL_DCA']['tl_iso_shipping_options']['palettes']['default'] = '{general_legend},name;{config_legend},weight_from,weight_to,rate;{enabled_legend},enabled';\n\t\t$GLOBALS['TL_DCA']['tl_iso_shipping_options']['list']['sorting']['headerFields'][] = 'weight_unit';\n\t}", "title": "" }, { "docid": "0e1faf304982d18b359b834b531c3eb3", "score": "0.65676457", "text": "function load_config_options()\n{\n global $CONFIG_OPTIONS_CACHE, $CONFIG_OPTIONS_FULLY_LOADED;\n\n $CONFIG_OPTIONS_FULLY_LOADED = true;\n\n if (!isset($GLOBALS['SITE_DB'])) {\n return;\n }\n\n if (multi_lang_content()) {\n $select = array('c_name', 'c_value', 'c_value_trans', 'c_needs_dereference');\n } else {\n $select = array('c_name', 'c_value');\n }\n $temp = $GLOBALS['SITE_DB']->query_select('config', $select, null, '', null, null, true);\n\n if ($temp === null) {\n if (running_script('install')) {\n $temp = array();\n } else {\n if ($GLOBALS['SITE_DB']->table_exists('config', true)) { // LEGACY: Has to use old naming from pre v10; also has to use $really, because of possibility of corrupt db_meta table\n $temp = $GLOBALS['SITE_DB']->query_select('config', array('the_name AS c_name', 'config_value AS c_value', 'config_value AS c_value_trans', 'if(the_type=\\'transline\\' OR the_type=\\'transtext\\' OR the_type=\\'comcodeline\\' OR the_type=\\'comcodetext\\',1,0) AS c_needs_dereference'), null, '', null, null, true);\n if ($temp === null) {\n critical_error('DATABASE_FAIL');\n }\n } else {\n critical_error('DATABASE_FAIL');\n }\n }\n }\n\n $CONFIG_OPTIONS_CACHE = list_to_map('c_name', $temp);\n}", "title": "" }, { "docid": "75905171fcaf39a1b8fb914f6ec95e2c", "score": "0.6567112", "text": "public function options()\n {\n\n }", "title": "" }, { "docid": "4c7fed2ab1f4935bad6f84dec9fde258", "score": "0.65627784", "text": "function load_settings()\n {\n $this->general_settings = ( array )get_option(self::general_settings_key);\n\t\t\n\t\t// there is a problem with the array below....i believe it needs some more work below that is currently missing, unsure where it came from. Wade 29th Sep 2015.\n\t\t// $this->search_settings = (array) get_option( $this->search_settings_key );\n\t\t\n\t\t// Merge with defaults\n $this->general_settings = array_merge(array(\n\n 'general_option' => 'General value'\n ), $this->general_settings);\n\n }", "title": "" }, { "docid": "ff1c7c180de27277e7b83ae7fd26e6d7", "score": "0.6544224", "text": "protected abstract function _setupBriefOptions();", "title": "" }, { "docid": "2fe7dd4162a191f5762c1521b66f2814", "score": "0.654141", "text": "public function init_options(){\n\n\t\tupdate_option( 'GroupPress_ver', GroupPress::$VER );\n\t\tadd_option( 'GroupPress_db_ver', GroupPress::$DB_VER );\n\n\t\tadd_option( 'GroupPress_prev_ver', 0 );\n\t\tadd_option( 'GroupPress_posts_per_page', 5 );\n\t\tadd_option( 'GroupPress_show_welcome_page', true );\n\t}", "title": "" }, { "docid": "7af6599ea2526873b17b1dc575eecc89", "score": "0.6538161", "text": "public function options(): array;", "title": "" }, { "docid": "9362fce6187a5d7ccc72985662f2cbf9", "score": "0.65329444", "text": "public function init() {\n\t\t\t$this->options = $this->_initOptions();\n\t\t\t//$this->_default_options();\n\t\t}", "title": "" }, { "docid": "6e8f51b5b81f27770e8f7ce670f2cb85", "score": "0.6529632", "text": "public function __construct($options = null){\n\n\t\t//first load core form config\n\t\t$this->LoadConfig();\n\t\t//now override\n\t\t$this->LoadOptions($options);\n\n\t}", "title": "" }, { "docid": "6a686dbea6ae00e4c4be6d14ebd8c24a", "score": "0.65112907", "text": "public function load($options) {\n if ($this->isLoaded)\n throw new Exception('Options already loaded!');\n \n $this->scriptName= array_shift($options);\n $i=0;\n while($i<count($options)) {\n if (in_array($options[$i], $this->skipValues)) {\n $this->options[$options[$i]]= -1;\n $i++;\n } else {\n $this->options[$options[$i]]= isset($options[$i+1]) ? $options[$i+1] : null;\n $i=$i+2;\n }\n } \n $this->isLoaded= true;\n }", "title": "" }, { "docid": "4e123cfdb455d234de22a52782d872a7", "score": "0.64973134", "text": "private function initOptions($options)\n {\n $options = Tools::arrayDeepMerge($this->defaultOptions, $options);\n $privates = array_keys($options);\n foreach ($privates as $key)\n {\n $this->$key = $options[$key];\n }\n }", "title": "" }, { "docid": "553192de0ca2b6e5da5129b53ffce5f1", "score": "0.6496735", "text": "public function options_callback() {\n\t}", "title": "" }, { "docid": "553192de0ca2b6e5da5129b53ffce5f1", "score": "0.6496735", "text": "public function options_callback() {\n\t}", "title": "" }, { "docid": "50749f051beacc129871d90986f3ee91", "score": "0.64839184", "text": "function create_options() {\n\t\t\t$options = array ();\n\t\t\t$options [\"cache_enabled\"] = false;\n\t\t\t$options [\"cache_dir\"] = \"cache\";\n\t\t\t$options [\"cache_time\"] = 86400;\n\t\t\t$options [\"optimize_scripts\"] = false;\n\t\t\t$options [\"curl_redirects_enabled\"] = false;\n\t\t\tadd_option ( BLIP_SLIDESHOW_DOMAIN, $options, \"\", \"yes\" );\n\t\t}", "title": "" }, { "docid": "5c99da5bfc075ed45ed335c5b1f43db7", "score": "0.64825016", "text": "function _init_option()\n{\n\t$this->_init_site_info();\n}", "title": "" }, { "docid": "fd6c6aa448e8d0922918ea116bf0015c", "score": "0.6482412", "text": "function populate_options(array $options = array())\n{\n}", "title": "" }, { "docid": "5daf7b507e1ecf02d6af471f22841183", "score": "0.6480668", "text": "protected function initOptions()\n {\n $this->options = array_merge([\n 'class' => 'grid-view',\n ], $this->options);\n }", "title": "" }, { "docid": "38e7ab8764abf4d4029130168d9d6902", "score": "0.6477568", "text": "public function get_options()\n {\n }", "title": "" }, { "docid": "5342ced65924aa86cc436cb8f7050384", "score": "0.64655143", "text": "public function init($options_ = []\n ): void {\n }", "title": "" }, { "docid": "7a80fca985490f29a109e592247cd50a", "score": "0.6450848", "text": "public static function options_init()\n {\n set_current_screen('boilerplate-settings');\n }", "title": "" }, { "docid": "495d2cb44c7e7eb9edd614a5cb273407", "score": "0.64459336", "text": "abstract public function extractOptions();", "title": "" }, { "docid": "4c608ad77a500c7f7c644f984b7a25d5", "score": "0.6436536", "text": "public function options($options) {\n\t\t$this->options = Set::merge($this->options, $options);\n\t}", "title": "" }, { "docid": "5de3647ddde12ad830860b3310c94077", "score": "0.64322776", "text": "function get_opts( ) {\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "f3ad651917619ea6f4948f32ba026342", "score": "0.6422905", "text": "protected function init()\n {\n parent::init();\n\n foreach ($this->options as $name => $value) {\n switch ($name) {\n case 'include':\n $this->setInclude($value);\n break;\n case 'other':\n $this->setOther($value);\n break;\n }\n }\n }", "title": "" }, { "docid": "a183f61c6429d2fc7b75cf827fb6af83", "score": "0.64215064", "text": "protected function get_options() {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "5c5462b74786fcfc4d5048258753271a", "score": "0.6420967", "text": "private function getOptsFromConfig() :void\n {\n $this->includeConfig('app');\n $this->includeConfig('db');\n $this->includeConfig('routes');\n }", "title": "" }, { "docid": "6659d42c9f8b4967093dd353a6e565f1", "score": "0.6417548", "text": "private static function create_options()\n {\n }", "title": "" }, { "docid": "ba0c88df2f069944398424aa43d5443c", "score": "0.64155996", "text": "public function _getOptions($options)\n {\n }", "title": "" }, { "docid": "9eb085f6d0127b279505397c448d5950", "score": "0.6399362", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "title": "" }, { "docid": "eae71b02502ed24aa9be85b6e9905628", "score": "0.6389879", "text": "public function getOptions(){ }", "title": "" } ]
ae85bd3b6d4b55b935665ab3a23b7049
define an array for our fridays
[ { "docid": "49cad822f1243ce0c4f0dd8e4ec634b9", "score": "0.6403553", "text": "public static function getFridays($year)\n\t{\n\t\t$fridays = array();\n\n\t\t// get start date\n\t $startDate = new DateTime($year . '-01-01 Friday 11:00');\n\n\t \t// get current date\n\t \t$currentDate = new DateTime(SpoonDate::getDate('d-m-Y'));\n\n\t $year++;\n\n\t // get end date\n\t $endDate = new DateTime($year . '-01-01');\n\n\t $int = new DateInterval('P7D');\n\t foreach(new DatePeriod($startDate, $int, $endDate) as $d) {\n\t\t\t$dateTimeToCheck= new DateTime($d->format('F j, Y'));\n\n\t\t\tif ($currentDate > $dateTimeToCheck) continue;\n\n\t $fridays[] = array(\n \t\t'fridayTimeStamp' => strtotime((string)$d->format('F j, Y h:00:00')),\n \t\t'friday' => $d->format('jS F Y')\n \t);\n\t }\n\n\t return $fridays;\n\t}", "title": "" } ]
[ { "docid": "ebd299a239b60dcd95e55115e61bf216", "score": "0.6876341", "text": "public function addBusinessDaysProvider(): array\n {\n return [\n // From Monday morning.\n ['Monday 2018-05-14 00:00', 0, 'Monday 2018-05-14 00:00'],\n ['Monday 2018-05-14 09:00', 0, 'Monday 2018-05-14 09:00'],\n ['Monday 2018-05-14 09:00', 0.25, 'Monday 2018-05-14 11:00'],\n ['Monday 2018-05-14 09:00', 0.5, 'Monday 2018-05-14 13:00'],\n ['Monday 2018-05-14 09:00', 0.75, 'Monday 2018-05-14 15:00'],\n ['Monday 2018-05-14 09:00', 1, 'Tuesday 2018-05-15 09:00'],\n ['Monday 2018-05-14 00:00', 1, 'Tuesday 2018-05-15 00:00'],\n ['Monday 2018-05-14 09:00', 1.25, 'Tuesday 2018-05-15 11:00'],\n ['Monday 2018-05-14 09:00', 1.5, 'Tuesday 2018-05-15 13:00'],\n ['Monday 2018-05-14 09:00', 1.75, 'Tuesday 2018-05-15 15:00'],\n ['Monday 2018-05-14 09:00', 2, 'Wednesday 2018-05-16 09:00'],\n // From Friday morning.\n ['Friday 2018-05-18 00:00', 0, 'Friday 2018-05-18 00:00'],\n ['Friday 2018-05-18 00:00', 0.25, 'Friday 2018-05-18 11:00'],\n ['Friday 2018-05-18 00:00', 0.5, 'Friday 2018-05-18 13:00'],\n ['Friday 2018-05-18 00:00', 0.75, 'Friday 2018-05-18 15:00'],\n ['Friday 2018-05-18 00:00', 1, 'Monday 2018-05-21 00:00'],\n ['Friday 2018-05-18 00:00', 1.25, 'Monday 2018-05-21 11:00'],\n // From Friday evening.\n ['Friday 2018-05-18 17:00', 0, 'Friday 2018-05-18 17:00'],\n ['Friday 2018-05-18 17:00', 0.25, 'Monday 2018-05-21 11:00'],\n ['Friday 2018-05-18 17:00', 0.5, 'Monday 2018-05-21 13:00'],\n ['Friday 2018-05-18 17:00', 0.75, 'Monday 2018-05-21 15:00'],\n ['Friday 2018-05-18 17:00', 1, 'Monday 2018-05-21 17:00'],\n ['Friday 2018-05-18 17:00', 1.25, 'Tuesday 2018-05-22 11:00'],\n ['Friday 2018-05-18 17:00', 1.5, 'Tuesday 2018-05-22 13:00'],\n ['Friday 2018-05-18 17:00', 1.75, 'Tuesday 2018-05-22 15:00'],\n ['Friday 2018-05-18 17:00', 2, 'Tuesday 2018-05-22 17:00'],\n ['Friday 2018-05-18 17:00', 3, 'Wednesday 2018-05-23 17:00'],\n // Negative values.\n ['Friday 2018-05-18 00:00', -0, 'Friday 2018-05-18 00:00'],\n ['Friday 2018-05-18 17:00', -0, 'Friday 2018-05-18 17:00'],\n ['Friday 2018-05-18 17:00', -0.25, 'Friday 2018-05-18 15:00'],\n ['Friday 2018-05-18 17:00', -0.5, 'Friday 2018-05-18 13:00'],\n ['Friday 2018-05-18 17:00', -0.75, 'Friday 2018-05-18 11:00'],\n ['Friday 2018-05-18 17:00', -1, 'Thursday 2018-05-17 17:00'],\n ['Friday 2018-05-18 17:00', -1.25, 'Thursday 2018-05-17 15:00'],\n ['Friday 2018-05-18 17:00', -1.5, 'Thursday 2018-05-17 13:00'],\n ['Friday 2018-05-18 17:00', -1.75, 'Thursday 2018-05-17 11:00'],\n ['Friday 2018-05-18 17:00', -2, 'Wednesday 2018-05-16 17:00'],\n ];\n }", "title": "" }, { "docid": "57c233256816ec7a7814bd30c97db6d0", "score": "0.65856856", "text": "public function fridays()\n {\n return $this->days(Schedule::FRIDAY);\n }", "title": "" }, { "docid": "005f1811532065644a859d7259921700", "score": "0.6380432", "text": "public function addBusinessDayProvider(): array\n {\n return [\n ['Monday 2018-05-14 00:00', 'Tuesday 2018-05-15 00:00'],\n ['Monday 2018-05-14 08:00', 'Tuesday 2018-05-15 08:00'],\n ['Monday 2018-05-14 09:00', 'Tuesday 2018-05-15 09:00'],\n ['Monday 2018-05-14 10:00', 'Tuesday 2018-05-15 10:00'],\n ['Monday 2018-05-14 17:00', 'Tuesday 2018-05-15 17:00'],\n ['Tuesday 2018-05-15 11:00', 'Wednesday 2018-05-16 11:00'],\n ['Wednesday 2018-05-16 12:00', 'Thursday 2018-05-17 12:00'],\n ['Thursday 2018-05-17 13:00', 'Friday 2018-05-18 13:00'],\n ['Friday 2018-05-18 14:00', 'Monday 2018-05-21 14:00'],\n ['Saturday 2018-05-19 15:00', 'Monday 2018-05-21 17:00'],\n ['Sunday 2018-05-20 16:00', 'Monday 2018-05-21 17:00'],\n ['Friday 2019-06-28 00:00', 'Monday 2019-07-01 00:00'],\n ];\n }", "title": "" }, { "docid": "fbbf3b8debdc46f05e84142c36e3acad", "score": "0.6239091", "text": "public function fridays()\n {\n return $this->days(5);\n }", "title": "" }, { "docid": "ecc6f24d0210eb2047f682abbdb7c26f", "score": "0.61087763", "text": "protected function create_dates()\n\t{\n\t\t// numeric array of days of the week that corresponds to date('w')\n\t\t$days = array('Zondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrijdag', 'Zaterdag');\n\t\t// numeric array of months that corresponds to date('n')\n\t\t$months = array(1 => 'januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december');\n\t\t\n\t\tfor ($i=0; $i<21; $i++)\n\t\t{\n\t\t\t$time = strtotime(\"+$i days\");\n\t\t\t$this->dates[date('Ymd', $time)] = array(\n\t\t\t\t\t'day' => $days[(date('w', $time))], // Zondag \n\t\t\t\t\t'date' => date('d', $time).' '.$months[date('n', $time)] // 13 januari\n\t\t\t\t\t); \n\t\t}\n\t}", "title": "" }, { "docid": "039f117fa0649ca17de7a7aecb44bedb", "score": "0.60155475", "text": "private function getDatesFromData() {\n $dates = [];\n foreach ($this->days as $day) {\n $date = $shift_start = '' . $day . '.' . $this->month . '.' . $this->year;\n $dates[] = $date;\n }\n return $dates;\n }", "title": "" }, { "docid": "2f2e9133cc355b40b1c90d011d169ebd", "score": "0.5906071", "text": "public static function get_week_days() {\n $result = [];\n $day_of_week = date('N');\n $now = time();\n $day_of_week = $now - (static::OneDay * $day_of_week);\n\n for ($i=0 ; $i<7 ; $i++) {\n $day_of_week += static::OneDay;\n $result[] = [\"day_of_week\" => date(\"l\", $day_of_week),\"day\" => date('d', $day_of_week), \"month\" => date('F', $day_of_week), \"date\" => date(\"Y-m-d\", $day_of_week)];\n }\n return $result;\n }", "title": "" }, { "docid": "d781672e4599f1a7c93cb7fa89ea86a6", "score": "0.5827182", "text": "function return_month_array($year, $month) {\r\n $data = array();\r\n $selectedyear = $year;\r\n $selectedmonth = $month;\r\n $days_total=cal_days_in_month(CAL_GREGORIAN,$selectedmonth,$selectedyear);\r\n\r\n $data['month'] = $month;\r\n $data['year'] = $year;\r\n $data['totaldays'] = $days_total;\r\n $data['days'] = array();\r\n\r\n $week = 1;\r\n $jd_first = gregoriantojd($selectedmonth,1,$selectedyear);\r\n $first_day_on_week = jddayofweek($jd_first,1);\r\n for ($d=1; $d <= $days_total; $d++){\r\n $jd=gregoriantojd($selectedmonth,$d,$selectedyear);\r\n $dayname = jddayofweek($jd,1);\r\n $day_date = $selectedmonth . '-' . $d . '-' . $selectedyear;\r\n $daynumber = $d;\r\n\r\n if ($d != 1 && $dayname == $first_day_on_week) {\r\n $week += 1;\r\n }\r\n $dayarray = array();\r\n // dayname\r\n $dayarray['dayname'] = strtolower($dayname);\r\n // daydate\r\n $dayarray['daydate'] = $day_date;\r\n // dayweek\r\n $dayarray['dayweek'] = $week;\r\n // daynumber\r\n $dayarray['daynum'] = $daynumber;\r\n\r\n array_push($data['days'], $dayarray);\r\n }\r\n\r\n return $data;\r\n\r\n\r\n}", "title": "" }, { "docid": "d96bf9da0ace4546b06fa210610df9e9", "score": "0.5816241", "text": "function _movecalc_init_calendar($year) {\n\tfor($month = 1; $month <= 12 ; $month++){\n\t\n\t\t// days and weeks vars now ... \n\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_this_week = 1;\n\t\t$day_counter = 0;\n\t\t$dates_array = array();\n\t\n\t\tfor($day=1;$day <= $days_in_month; $day++){\n\t\t\t$date = $year.'-'.$month.'-'.$day;\n\t\t\t\n\t\t\t$peak_type = movecalc_peak_date($date);\t\t\n\t\t\t$record = movecalc_get_calendar_type($date);\t\n\t\t\t\t\n\t\t\tif($record === FALSE) {\n\t\t\t$record = new StdClass();\n\t\t\t$record->date = $date;\n\t\t\t$record->price_type = $peak_type;\t\n\t\t\t\n\t\t\tmovecalc_set_calendar_type($record);\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\n\t}\n\n}", "title": "" }, { "docid": "5f9260edf76272776d157a2dce292a97", "score": "0.5814506", "text": "private function getHolidays(): array\n {\n return [];\n }", "title": "" }, { "docid": "490f2a45b2b6658f8935829aecc1846b", "score": "0.5720653", "text": "function get_event_days(){\r\n\t\t$event_days = array();\r\n\r\n\t\tforeach($this->feed->get_items() as $item){\r\n\t\t\t$start_date = $item->get_start_date();\r\n\r\n\t\t\t//Round start date to nearest day\r\n\t\t\t$start_date = mktime(0, 0, 0, date('m', $start_date), date('d', $start_date) , date('Y', $start_date));\r\n\r\n\t\t\tif(!isset($event_days[$start_date])){\r\n\t\t\t\t//Create new array in $event_days for this date (only dates with events will go into array, so, for \r\n\t\t\t\t//example $event_days[26] will exist if 26th of month has events, but won't if it has no events)\r\n\t\t\t\t//(Now uses unix timestamp rather than day number, but same concept applies).\r\n\t\t\t\t$event_days[$start_date] = array();\r\n\t\t\t}\r\n\r\n\t\t\t//Push event into array just created (may be another event for this date later in feed)\r\n\t\t\tarray_push($event_days[$start_date], $item);\r\n\t\t}\r\n\r\n\t\treturn $event_days;\r\n\t}", "title": "" }, { "docid": "f5f8a64e7af6507f8c6c945444c0809e", "score": "0.571593", "text": "public function getHoursArray(){\n $this->hours = array();\n for($i = 1 ; $i <= 12 ; $i++){\n $this->hours[$i.'am'] = ['Mon' => 0, 'Tue' => 0, 'Wed' => 0, 'Thu' => 0, 'Fri' => 0, 'Sat' => 0, 'Sun' => 0];\n }\n for($i = 1 ; $i <= 12 ; $i++){\n $this->hours[$i.'pm'] = ['Mon' => 0, 'Tue' => 0, 'Wed' => 0, 'Thu' => 0, 'Fri' => 0, 'Sat' => 0, 'Sun' => 0];\n }\n }", "title": "" }, { "docid": "26fc860f770375c1d126a1023fac51e1", "score": "0.56968534", "text": "public static function getDaysList(){\n\t\treturn array(\n\t\t\t'1' => 'Monday',\n\t\t\t'2' => 'Tuesday',\n\t\t\t'3' => 'Wednesday',\n\t\t\t'4' => 'Thursday',\n\t\t\t'5' => 'Friday',\n\t\t\t'6' => 'Saturday',\n\t\t\t'0' => 'Sunday',\n\t\t);\n\t}", "title": "" }, { "docid": "20024c8b96e87dfe2b5220b864bb3fd4", "score": "0.56945413", "text": "function initialize_events() {\n global $daily_events, $calendardata, $month, $day, $year;\n\n for ($i=7;$i<23;$i++){\n if ($i<10){\n $evntime = '0' . $i . '00';\n } else {\n $evntime = $i . '00';\n }\n $daily_events[$evntime] = 'empty';\n }\n\n $cdate = $month . $day . $year;\n\n if (isset($calendardata[$cdate])){\n\t\tforeach($calendardata[$cdate] as $calfoo) {\n $daily_events[\"$calfoo[key]\"] = $calendardata[$cdate][$calfoo['key']];\n }\n }\n}", "title": "" }, { "docid": "da3d883f3335adb1291aa2b6ea971092", "score": "0.56909007", "text": "function createArrayNumberOfDays($offset, $number_of_days) {\n $the_date = array();\n for ($i = $offset; $i < $offset + $number_of_days; $i++) {\n $timestamp = time();\n $tm = 86400 * $i; // 60 * 60 * 24 = 86400 = 1 day in seconds\n $tm = $timestamp - $tm;\n\n $the_date[] = date(\"d-m-Y\", $tm);\n }\n return $the_date;\n }", "title": "" }, { "docid": "23050251e4d615f8943cf1f9e78d3999", "score": "0.568888", "text": "function save7(){\n //Declare an array\n $fv=array();\n //Fill the array\n $fv[0]=$this->pv;\n for($year=1;$year<=$this->nYears;$year++){\n $fv[$year]=$fv[$year-1]*(1+$this->intr);\n }\n return $fv;\n }", "title": "" }, { "docid": "539cba79bb3a875754ef34354a33922e", "score": "0.568589", "text": "static public function createAirportArray() {\n \n }", "title": "" }, { "docid": "be867617c17c4bfffc1635d5074fcc4a", "score": "0.5664356", "text": "function day_chart($array=null,$number=20){\n\t$now = date_now();\n\tfor ($i=0; $i < $number; $i++) { \n\t\t$data[$i]['label'] = date('Y-m-d', strtotime(\"-$i days\"));\n\t\t$data[$i]['data'] = '0';\n\t}\n\tforeach ($array as $key => $value) {\n\t\t$date = date_create($value->label);\n\t\t$diff = date_diff($date,date_create());\n\t\t$index = $diff->format(\"%a\");\n\t\t$data[$index]['data'] = $value->data;\n\t}\n\treturn array_reverse($data);\n}", "title": "" }, { "docid": "066f0be54a446396fda94fc4cd8b52a5", "score": "0.5660364", "text": "public static function pricingDays()\n {\n return [\n 'monday' => __('Monday'),\n 'tuesday' => __('Tuesday'),\n 'wednesday' => __('Wednesday'), \n 'thursday' => __('Thursday'),\n 'friday' => __('Friday'),\n 'saturday' => __('Saturday'),\n 'sunday' => __('Sunday'), \n ];\n }", "title": "" }, { "docid": "e74c877b1d9515e711995891e2ce7e12", "score": "0.56551176", "text": "function getEvents($year){\r\n global $bdd;\r\n $sql = 'SELECT dateDebut, DateFin FROM vacances';\r\n $req = $bdd->query($sql) or die('Erreur SQL !<br />' . $sql . '<br />' . mysql_error());\r\n $r = array();\r\n\r\n while($d=$req->fetch(PDO::FETCH_OBJ)){\r\n\r\n $r[strtotime(date('Y-m-j', strtotime($d->dateDebut)))] = strtotime(date('Y-m-j', strtotime($d->DateFin)));\r\n }\r\n\r\n return $r;\r\n }", "title": "" }, { "docid": "e732785821043d160c54438d42209ef5", "score": "0.56479603", "text": "public function Isfreeday(\\DateTime $date){\n $day_free=array();\n //////////////// for national_days://////////////////////////////////////////////\n $path_nd=\"C:/xampp/htdocs/GestionDesProjets/Gestion Projects/public/js/nationalDays.json\";\n \n $national_days = file_get_contents($path_nd); \n $array_decod = json_decode($national_days, true);\n\n foreach($array_decod as $key => $value ){\n \n if($date->format('m')==$value[\"date\"][0] && $date->format('d')==$value[\"date\"][1]){\n $day_free[]=$value[\"day\"];\n }\n \n }\n /////////////// for normal free_days: 2018 2019 2020/////////////////////////////\n $path_fd=\"C:/xampp/htdocs/GestionDesProjets/Gestion Projects/public/js/freeDays.json\";\n $data = file_get_contents($path_fd); \n $array_decod = json_decode($data,true);\n\n\n if($date->format('Y')==2018){/*jours fériés pour 2018*/\n foreach ($array_decod[\"2018\"] as $key => $value) {\n if($date->format('m')==$value[\"month\"] && $date->format('d')>=$value[\"dayStart\"] && $date->format('d')<=$value[\"dayEnd\"]){\n // $value[\"title\"]);\n $day_free[]=$value[\"title\"];\n }\n }\n }else if($date->format('Y')==2019){/*jours fériés pour 2018*/\n foreach ($array_decod[\"2019\"] as $key => $value) {\n if($date->format('m')==$value[\"month\"] && $date->format('d')>=$value[\"dayStart\"] && $date->format('d')<=$value[\"dayEnd\"]){\n // $value[\"title\"]);\n $day_free[]=$value[\"title\"];\n }\n }\n }else if($date->format('Y')==2020){/*jours fériés pour 2018*/\n foreach ($array_decod[\"2020\"] as $key => $value) {\n if($date->format('m')==$value[\"month\"] && $date->format('d')>=$value[\"dayStart\"] && $date->format('d')<=$value[\"dayEnd\"]){\n // $value[\"title\"]);\n $day_free[]=$value[\"title\"];\n }\n }\n }\n \n $result=implode(\",\",$day_free);\n/*jours fériés pour 2019*/\n\n/*jours fériés pour 2020*/\nreturn $result;\n}", "title": "" }, { "docid": "cd4b46c51628263f9685c177a9127ca3", "score": "0.5644051", "text": "function getDateForSpecificDayBetweenDates($start, $end, $weekday)\n {\n $weekdays = \"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday\";\n $arr_weekdays = explode(\",\", $weekdays);\n $arr_weekdays_day = explode(\",\", $weekday);\n //print_r($arr_weekdays_day);\n $i = 1;\n $string = '';\n foreach ($arr_weekdays_day as $weekdays) {\n if ($weekdays == 1) {\n $weekdays = 0;\n } elseif ($weekdays == 2) {\n $weekdays = 1;\n } elseif ($weekdays == 3) {\n $weekdays = 2;\n } elseif ($weekdays == 4) {\n $weekdays = 3;\n } elseif ($weekdays == 5) {\n $weekdays = 4;\n } elseif ($weekdays == 6) {\n $weekdays = 5;\n } elseif ($weekdays == 7) {\n $weekdays = 6;\n }\n $weekday = $arr_weekdays[$weekdays];\n if (!$weekday)\n $this->inventory_model->store_error(current_user_type(), hotel_id(), \"2\", 'Invalid WeekDay', 'Bulk Update', date('m/d/Y h:i:s a', time()));\n $starts = strtotime(\"+0 day\", strtotime($start));\n //$starts = strtotime($start);\n $ends = strtotime($end);\n //$dateArr = array();\n $friday = strtotime($weekday, $starts);\n while ($friday <= $ends) {\n /*$dateArr[] = date(\"Y-m-d\", $friday);\n $friday = strtotime(\"+1 weeks\", $friday);*/\n $dateArr[] = date(\"Y-m-d\", $friday);\n $date = date(\"Y-m-d\", $friday);\n $string .= \"value\" . $i . \"='\" . $date . \"' \";\n $friday = strtotime(\"+1 weeks\", $friday);\n $i++;\n }\n //$dateArr[] = date(\"Y-m-d\", $friday);\n }\n //echo $string.'<br>';\n //return $dateArr;\n return $string;\n }", "title": "" }, { "docid": "0727c30d3be031c27c0f1deb4840f046", "score": "0.563721", "text": "function getYearday() {\n return array_var($this->date_data, 'yday');\n }", "title": "" }, { "docid": "b7877c839b6c5074b95e19506c519c83", "score": "0.56246966", "text": "function getDates() {\n // Set timezone\n date_default_timezone_set('Europe/Stockholm');\n // Current date\n $date = date('Y-m-d');\n \n for ($i = 0; $i < 6; $i++) {\n $date = strtotime(\"+$i day\");\n $out[$i] = date('Y-m-d', $date);\n }\n \n return $out;\n}", "title": "" }, { "docid": "7f0cf51c6d2ef60c53c7edc72db7f277", "score": "0.5614632", "text": "private function get_available_days($array, $timestamp) {\n\t\t// SERVICE PERIOD TYPE\n\t\t$period_type = (string) get_post_meta($this->service_id, 'ga_service_period_type', true);\n\n\t\tif( $period_type == 'date_range' ) {\n\t\t\t$range = (array) get_post_meta($this->service_id, 'ga_service_date_range', true);\n\n\t\t\t$dates = array();\n\t\t\tif( isset($range['from']) && ga_valid_date_format($range['from']) && isset($range['to']) && ga_valid_date_format($range['to']) ) {\n\t\t\t\t$period = new DatePeriod(\n\t\t\t\t new DateTime($range['from']),\n\t\t\t\t new DateInterval('P1D'),\n\t\t\t\t new DateTime($range['to'])\n\t\t\t\t);\n\t\t\t\tforeach ($period as $key => $value) {\n\t\t\t\t $dates[] = $value->format('Y-m-j');\n\t\t\t\t}\n\n\t\t\t\t $dates[] = $range['to'];\n\t\t\t}\n\t\t\treturn $dates;\n\t\t}\n\n\t\tif( $period_type == 'custom_dates' ) {\n\t\t\t$custom_dates = (array) get_post_meta($this->service_id, 'ga_service_custom_dates', true);\n\t\t\treturn $custom_dates;\n\t\t}\n\n\n\t\t$array = (array) $array;\n\t\t$weeks = array('sunday' ,'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday');\n\t\t$dates = array();\n\n\t\tforeach( $array as $week ) {\n\t\t\tif( in_array($week, $weeks) ) {\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimezone( new DateTimeZone( $this->time_zone ) );\n\t\t\t\t$date->setTimestamp($timestamp);\n\t\t\t\t$date->modify(\"first $week of this month\");\n\t\t\t\t$thisMonth = $date->format('m');\n\t\t\t\twhile ($date->format('m') == $thisMonth) {\n\t\t\t\t\t$dates[] = $date->format('Y-m-j');\n\t\t\t\t\t$date->modify(\"next $week\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $dates;\n\t}", "title": "" }, { "docid": "369cbfacf844b004fe6aa040432272e4", "score": "0.5611342", "text": "private function _constructDays() {\r\n\t\t$first_day_of_month = strtotime($this->year . '-' . str_pad($this->month, 2, '0', STR_PAD_LEFT) . '-01');\r\n\t\t$first_day_number_of_month = date( 'N', $first_day_of_month );\r\n\t\t$number_of_days_in_previous_month = $first_day_number_of_month - 1;\r\n\r\n\t\t//echo $first_day_of_month;\r\n\r\n\t\t$start_time_stamp = $first_day_of_month - (24 * 60 * 60 * $number_of_days_in_previous_month);\r\n\r\n\t\t$cell_counter = 0;\r\n\t\t$laatse_dag_verwerkt = false;\r\n\t\t$timestamp = $start_time_stamp;\r\n\r\n\t\twhile (++$cell_counter) {\r\n\t\t\t//echo $cell_counter;\r\n\t\t\t$this->days[] = $timestamp;\r\n\t\t\t$timestamp += (24 * 60 * 60);\r\n\r\n\t\t\t// stoppen zodra we de laatste rij gevuld hebben met dagen van de volgende maand (let ook even op december)\r\n\t\t\tif ( ( ( date('m', $timestamp) > $this->month || ( date('m', $timestamp) == 1 && $this->month == 12) ) && $cell_counter % 7 == 0 ) || $cell_counter > 50 ) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//print_r($this->days); echo date('d-m-y', $this->days[count($this->days) - 1]);\r\n\t\t//echo 'first day of month ' . $this->year . '-' . str_pad($this->month, 2, '0', STR_PAD_LEFT) . '-01';\r\n\t\t//echo $first_day_of_month;\r\n\t}", "title": "" }, { "docid": "f5d87cd55458b762f20240d66fa2f6c7", "score": "0.5607618", "text": "private function getFechasBusqueda(){\r\n\t\t$_POST['re_fecha_ini'] = $fecha_ini;\r\n\t\tif ( !(isset($fecha_ini)) ){\r\n\t\t\t$fecha_ini = strtotime('last Monday');\r\n\t\t\t// check if we need to go back in time one more week\r\n\t\t\t$fecha_ini = date('W', $fecha_ini)==date('W') ? $fecha_ini-7*86400 : $fecha_ini;\r\n\t\t\t$fecha_ini = date(\"Y-m-d\", $fecha_ini);\r\n\t\t} \r\n\t\t\r\n\t\t$_POST['re_fecha_fin'] = $fecha_fin;\r\n\t\tif ( !(isset($fecha_fin)) ){\r\n\t\t\t$fecha_fin = strtotime('last Friday');\r\n\t\t\t// check if we need to go back in time one more week\r\n\t\t\t$fecha_fin = date('W', $fecha_fin)==date('W') ? $fecha_fin-7*86400 : $fecha_fin;\r\n\t\t\t$fecha_fin = date(\"Y-m-d\", $fecha_fin);\r\n\t\t} \r\n\t\t\r\n\t\treturn array($fecha_ini, $fecha_fin);\r\n\t}", "title": "" }, { "docid": "14623ea3a70f0b4d698059ba59cd739f", "score": "0.5589729", "text": "public function getWeekDays() {\n $day_array = [];\n\n array_push($day_array, $this->getWeekStartDate());\n array_push($day_array, date('Y-m-d', strtotime('next tuesday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next wednesday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next thursday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next friday', strtotime($this->getWeekStartDate()))));\n\n return $day_array;\n }", "title": "" }, { "docid": "3e8a2e124fbc5ea17eb44dcb54e7f960", "score": "0.5577064", "text": "public function todaySpecialDiscounts(): array\n {\n //this will be modified randomly depending on the day\n }", "title": "" }, { "docid": "9116c50d000e9a54504df4955e74cb19", "score": "0.55766815", "text": "function getListeDates ( ) {\r\n\t\t$dateDeb = new clDate ( DATELANCEMENT ) ;\r\n\t\t$dateFin = new clDate ( ) ;\r\n\t\t$tDeb = $dateDeb -> getTimestamp ( ) ;\r\n\t\t$tab = array ( ) ;\r\n\t\tfor ( ; $dateFin -> getTimestamp ( ) >= $tDeb ; $dateFin -> addDays ( -1 ) )\r\n\t\t\t$tab[$dateFin->getDate ( \"Y-m-d\")] = $dateFin -> getDate ( \"d/m/Y\" ) ;\r\n\t\treturn $tab ;\r\n\t}", "title": "" }, { "docid": "7a6c93ac4f91f4d5782b9f210014ad7b", "score": "0.55730224", "text": "public function setDays(): void\n {\n //get first day in calendar\n $start = $this->getStart();\n\n //get last day in calendar\n $end = $this->getEnd();\n\n $month = $this->getMonth();\n $year = $this->getYear();\n\n $days = array();\n $loop = 0;\n\n //create period\n $period = Carbon::parse($start)->toPeriod($end, '1 day');\n \n foreach ($period as $date) {\n $currentMonth = $date->format('m') == $month->number;\n $dayOfWeek = $this->setDayOfWeek($date->dayOfWeek);\n\n $day = new Day(\n $year,\n $month,\n $date->format('d'),\n $dayOfWeek,\n $date,\n $currentMonth\n );\n $days[$loop] = $day->getDay();\n \n $loop++;\n }\n\n $this->days = new Collection($days);\n }", "title": "" }, { "docid": "9530a67c1a7bf7fc36bc90040773df2a", "score": "0.5536063", "text": "private function getFreqDates( $event )\n\t{\n\t\t$newDatesStack = [];\n\n\t\t// determine how many times we should iterate\n\t\t$count = $this->calculateEventIteration( $event );\n\n\t\t// for each iteration, increase the date apportionately\n\t\tfor( $i=1; $i < $count; $i++ )\n\t\t{\n\t\t\t$startDate = $event['startDate']->copy();\n\t\t\t$endDate = $event['endDate']->copy();\n\n\t\t\t// update the start and end dates of the event frontmatter\n\t\t\tswitch($event['freq']) {\n\t\t\t\tcase 'daily':\n\t\t\t\t\t$newStart = $startDate->addDays($i);\n\t\t\t\t\t$newEnd = $endDate->addDays($i);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'weekly':\n\t\t\t\t\t$newStart = $startDate->addWeeks($i);\n\t\t\t\t\t$newEnd = $endDate->addWeeks($i);\n\t\t\t\t\tbreak;\n\n\t\t\t\t// special case for monthly because there aren't the same\n\t\t\t\t// number of days each month.\n\t\t\t\tcase 'monthly':\n\t\t\t\t\t// start vars\n\t\t\t\t\t$sDayOfWeek = $startDate->dayOfWeek;\n\t\t\t\t\t$sWeekOfMonth = $startDate->weekOfMonth;\n\t\t\t\t\t$sHours = $startDate->hour;\n\t\t\t\t\t$sMinutes = $startDate->minute;\n\t\t\t\t\t$sMonth = $startDate->month;\n\t\t\t\t\t$sYear = $startDate->year;\n\t\t\t\t\t$sNext = $startDate->addMonths($i)->firstOfMonth();\n\n\t\t\t\t\t// end vars\n\t\t\t\t\t$eDayOfWeek = $endDate->dayOfWeek;\n\t\t\t\t\t$eWeekOfMonth = $endDate->weekOfMonth;\n\t\t\t\t\t$eHours = $endDate->hour;\n\t\t\t\t\t$eMinutes = $endDate->minute;\n\t\t\t\t\t$eMonth = $endDate->month;\n\t\t\t\t\t$eYear = $endDate->year;\n\t\t\t\t\t$eNext = $endDate->addMonths($i)->firstOfMonth();\n\n\t\t\t\t\t// weeks\n\t\t\t\t\t$rd[1] = 'first';\n\t\t\t\t\t$rd[2] = 'second';\n\t\t\t\t\t$rd[3] = 'third';\n\t\t\t\t\t$rd[4] = 'fourth';\n\t\t\t\t\t$rd[5] = 'fifth';\n\n\t\t\t\t\t// days\n\t\t\t\t\t$ry[0] = 'sunday';\n\t\t\t\t\t$ry[1] = 'monday';\n\t\t\t\t\t$ry[2] = 'tuesday';\n\t\t\t\t\t$ry[3] = 'wednesday';\n\t\t\t\t\t$ry[4] = 'thursday';\n\t\t\t\t\t$ry[5] = 'friday';\n\t\t\t\t\t$ry[6] = 'saturday';\n\n\t\t\t\t\t// months\n\t\t\t\t\t$rm[1] = 'jan';\n\t\t\t\t\t$rm[2] = 'feb';\n\t\t\t\t\t$rm[3] = 'mar';\n\t\t\t\t\t$rm[4] = 'apr';\n\t\t\t\t\t$rm[5] = 'may';\n\t\t\t\t\t$rm[6] = 'jun';\n\t\t\t\t\t$rm[7] = 'jul';\n\t\t\t\t\t$rm[8] = 'aug';\n\t\t\t\t\t$rm[9] = 'sep';\n\t\t\t\t\t$rm[10] = 'oct';\n\t\t\t\t\t$rm[11] = 'nov';\n\t\t\t\t\t$rm[12] = 'dec';\n\n\t\t\t\t\t// get the correct next date\n\t\t\t\t\t$sStringDateTime = $rd[$sWeekOfMonth] . ' ' . $ry[$sDayOfWeek] . ' of ' . $rm[$sNext->month] . ' ' . $sNext->year;\n\t\t\t\t\t$eStringDateTime = $rd[$eWeekOfMonth] . ' ' . $ry[$eDayOfWeek] . ' of ' . $rm[$eNext->month] . ' ' . $eNext->year;\n\n\t\t\t\t\t$newStart = Carbon::parse($sStringDateTime)->addHours($sHours)->addMinutes($sMinutes);\n\t\t\t\t\t$newEnd = Carbon::parse($eStringDateTime)->addHours($eHours)->addMinutes($eMinutes);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'yearly':\n\t\t\t\t\t$newStart = $startDate->addYears($i);\n\t\t\t\t\t$newEnd = $endDate->addYears($i);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$newDates['startDate'] = $newStart;\n\t\t\t$newDates['endDate'] = $newEnd;\n\n\t\t\t// add the new dates to the stack\n\t\t\t$newDatesStack[] = $newDates;\n\t\t}\n\n\t\treturn $newDatesStack;\n\t}", "title": "" }, { "docid": "0513438f0a2933ac11c5923e52c8e20e", "score": "0.55343616", "text": "function get_the_dates() {\n global $event_details, $multi_time, $multi_price;\n\n\n $data['date'] = array( );\n $data['time'] = array( );\n\n\n $dates_data = $event_details['_epl_start_date'];\n\n //$input_type = (epl_nz($event_details['_epl_event_type'],5) == 5) ? 'radio' : 'checkbox';\n $input_type = 'radio';\n\n foreach ( $dates_data as $event_date_id => $event_date ) {\n\n //$open_for_regis = epl_compare_dates( $event_details['_epl_regis_start_date'][$event_date_id], date( \"m/d/Y\" ), \"<=\" );\n\n $value = (isset( $_SESSION['__epl'][$this->regis_id]['_dates']['_epl_start_date'][$event_details['ID']] )) ? $_SESSION['__epl'][$this->regis_id]['_dates']['_epl_start_date'][$event_details['ID']] : '';\n $start_date = $event_details['_epl_start_date'][$event_date_id];\n $end_date = $event_details['_epl_start_date'][$event_date_id];\n\n $end_date = ($start_date != $end_date ? ' - ' . $end_date : '');\n $epl_fields = array(\n 'input_type' => $input_type,\n 'input_name' => \"_epl_start_date[{$event_details['ID']}][]\",\n 'options' => array( $event_date_id => $start_date . $end_date ),\n 'default_checked' => 1,\n 'display_inline' => true,\n 'value' => $value\n );\n\n //if not true, returns a message\n $ok_to_register = epl_is_ok_to_register( $event_details, $event_date_id );\n if ( $ok_to_register !== true ) {\n\n $epl_fields['readonly'] = 1;\n $epl_fields['default_checked'] = 0;\n $epl_fields['options'][$event_date_id] .= ' <span class=\"epl_font_red\">' . $ok_to_register . '</span>';\n }\n $epl_fields += ( array ) $this->overview_trigger;\n //has to register for all dates.\n if ( $event_details['_epl_event_type'] == 5 ) {\n $epl_fields['input_type'] = 'radio';\n\n if ( count( $epl_fields['options'] ) == 1 ) {\n $epl_fields['default_checked'] = 1;\n }\n }\n elseif ( $event_details['_epl_event_type'] == 7 ) {\n $epl_fields['readonly'] = 1;\n }\n\n\n if ( $this->mode == 'overview' && !in_array( $event_date_id, ( array ) $value ) ) {\n \n }else\n $data['date'][] = $this->epl_util->create_element( $epl_fields );\n\n if ( $multi_time ) {\n\n $data['time'][] = $this->_get_time_fields( $event_date_id );\n }\n if ( $multi_price ) {\n\n $data['prices'][] = $this->_get_prices( $event_date_id );\n }\n\n //}\n }\n return $this->epl->load_view( 'front/cart/cart-dates', $data, true );\n }", "title": "" }, { "docid": "89343cb995d42b1377e1245c83c0cb2f", "score": "0.5527751", "text": "function fillRight(){\r\n\t\t\t\tglobal $today_line, $today_col, $today, $Arr, $line, $col, $day;\r\n\t\t\t\t\r\n\t\t\t\t$line = $today_line;\r\n\t\t\t\t$col = $today_col + 1; checkCol();\r\n\t\t\t\t$day = $today + 1; checkDay();\r\n\t\t\t\tif ($line < 6){ // handle error on day 31 at line 5 col 6\r\n\t\t\t\t\twhile (!(($line == 5) && ($col == 6))){\r\n\t\t\t\t\t\t$Arr[$line][$col]= $day;\r\n\t\t\t\t\t\t$col++; checkCol();\r\n\t\t\t\t\t\t$day++; checkDay(); \r\n\t\t\t\t\t}\r\n\t\t\t\t\t$Arr[5][6] = $day;\r\n\t\t\t\t}\r\n\t\t\t}", "title": "" }, { "docid": "0ead61882e6b9c17b6ec428ed0d9a13b", "score": "0.55009586", "text": "public function getAllDays()\n {\n $sql = \"SELECT Day, MxT, MnT, AvT FROM weather\";\n $query = $this->db->prepare($sql);\n $result = $query->execute();\n \n // Replaced with SQLITE3 syntax\n $row = array();\n \n $i = 0;\n \n //Itterate through all day arrays to create one array for return\n while ($res = $result->fetchArray(SQLITE3_ASSOC)) {\n \n if (!isset($res['Day']))\n continue;\n \n $row[$i]['Day'] = $res['Day'];\n $row[$i]['MxT'] = $res['MxT'];\n $row[$i]['MnT'] = $res['MnT'];\n $row[$i]['AvT'] = $res['AvT'];\n \n $i++;\n \n }\n \n return $row;\n }", "title": "" }, { "docid": "5654f9c90cc6e8a70e8fd988f53ef6be", "score": "0.54945636", "text": "public function weekDates()\n {\n $day = 60*60*24;\n $weekDates = array();\n for ($i=0;$i<7;$i++){\n $dayTime = time()-($day*$i);\n array_push($weekDates,date('Y-m-d',$dayTime));\n }\n return $weekDates;\n }", "title": "" }, { "docid": "bf4416fcc23cce98d4858740ba7fce8d", "score": "0.5483963", "text": "public function daysOfWeek()\n {\n $days = explode(',', $this->daysOfWeek);\n if ($days[0] === '*') {\n return $this->returnFrame('day of the week');\n }\n if ($this->isRecurring($days[0])) {\n return [];\n }\n if ($this->isRange($days[0])) {\n return $this->returnFrame('days of the week', $days[0]);\n }\n return array_map(function ($day) {\n return $this->dayMapping[$day];\n }, $days);\n }", "title": "" }, { "docid": "71e2650eb067e64459340acdcca2d1b0", "score": "0.54733276", "text": "public function providerLastDay()\n {\n return array(\n\n //2011.\n array(1, 2011, 31),\n array(2, 2011, 28),\n array(3, 2011, 31),\n array('01', 2011, 31),\n array('02', 2011, 28),\n array('03', 2011, 31),\n array(10, 2011, 31),\n array(11, 2011, 30),\n array(12, 2011, 31),\n\n //2012.\n array(1, 2012, 31),\n array(2, 2012, 29),\n array(3, 2012, 31),\n array('01', 2012, 31),\n array('02', 2012, 29),\n array('03', 2012, 31),\n array(10, 2012, 31),\n array(11, 2012, 30),\n array(12, 2012, 31),\n );\n }", "title": "" }, { "docid": "3922b55533a68ec61c3b54767da3c1c8", "score": "0.5451075", "text": "function getDayChanges($symbol,$date_list) {\n\t$last_date = $date_list[0];\n\tforeach ($date_list as $i => $current_date) {\n\t\t$result_list[$current_date] = getChangeinValue($symbol,$last_date,$current_date);\n\t\t$last_date = $current_date;\n\t}\n\t#Set Cost Basis\n\t$result_list[$date_list[0]] = getStockPrice($symbol,$date_list[0]);\n\t\n\treturn $result_list;\n}", "title": "" }, { "docid": "acb7498edab18ea1ec329d624885e46c", "score": "0.5445691", "text": "function dates($key = null) # Get useful dates of points in time.\n\t{\n\t\t$thissunday = date(\"Y-m-d\", strtotime(sprintf(\"-%d days\", date(\"w\"))));\n\t\t$thissaturday = date(\"Y-m-d 23:59:59\", strtotime(\"$thissunday +6 day\"));\n\n\t\t$lastsunday = date(\"Y-m-d\", strtotime(\"$thissunday -1 week\"));\n\t\t$lastsaturday = date(\"Y-m-d 23:59:59\", strtotime(\"$lastsunday +6 day\"));\n\n\t\t#echo \"THIS YER/WK=$thisyear, $thisweek; thissun=$thissunday, SAT=$thissaturday, last=$lastsunday, $lastsaturday\";\n\n\t\t$thismonthstart = date(\"Y-m-01\", strtotime('this month'));\n\t\t$nextmonthstart = date(\"Y-m-01\", strtotime('next month'));\n\t\t$thismonthend = date(\"Y-m-d 23:59:59\", strtotime(\"$nextmonthstart - 1 day\"));\n\n\t\t$lastmonthstart = date(\"Y-m-01\", strtotime('last month'));\n\t\t$lastmonthend = date(\"Y-m-d 23:59:59\", strtotime(\"$thismonthstart - 1 day\"));\n\n\t\t$dates = array(\n\t\t\t'thissunday'=>$thissunday,\n\t\t\t'thissaturday'=>$thissaturday,\n\t\t\t'lastsunday'=>$lastsunday,\n\t\t\t'lastsaturday'=>$lastsaturday,\n\t\t\t'thismonthstart'=>$thismonthstart,\n\t\t\t'nextmonthstart'=>$nextmonthstart,\n\t\t\t'thismonthend'=>$thismonthend,\n\t\t\t'lastmonthstart'=>$lastmonthstart,\n\t\t\t'lastmonthend'=>$lastmonthend,\n\t\t);\n\t\t$this->dates = $dates;\n\n\t\treturn !empty($key) ? \"'\".$dates[$key].\"'\" : $dates;\n\t}", "title": "" }, { "docid": "c29d14a25185f44391865dccf91eaa5c", "score": "0.54412663", "text": "protected function translateDays(){\n $this->days = array(\n 0=>Yii::t('calendar','Sunday'),\n 1=>Yii::t('calendar','Monday'),\n 2=>Yii::t('calendar','Thuesday'),\n 3=>Yii::t('calendar','Wednesday'),\n 4=>Yii::t('calendar','Thursday'),\n 5=>Yii::t('calendar','Friday'),\n 6=>Yii::t('calendar','Saturday'),\n );\n }", "title": "" }, { "docid": "48a95aed614834cbda7a89beae8e969c", "score": "0.5429636", "text": "function contarDomingos($fechaInicio,$fechaFin)\n{\n $dias=array();\n $fecha1=date($fechaInicio);\n $fecha2=date($fechaFin);\n $fechaTime=strtotime(\"-1 day\",strtotime($fecha1));//Les resto un dia para que el next sunday pueda evaluarlo en caso de que sea un domingo\n $fecha=date(\"Y-m-d\",$fechaTime);\n while($fecha <= $fecha2)\n {\n $proximo_domingo=strtotime(\"next Sunday\",$fechaTime);\n $fechaDomingo=date(\"Y-m-d\",$proximo_domingo);\n if($fechaDomingo <= $fechaFin)\n { \n $dias[$fechaDomingo]=$fechaDomingo;\n }\n else\n {\n break;\n }\n $fechaTime=$proximo_domingo;\n $fecha=date(\"Y-m-d\",$proximo_domingo);\n }\n return $dias;\n}", "title": "" }, { "docid": "d2f5ac4cd54bce8cbfc1135b5e5298e9", "score": "0.54236513", "text": "public function weekDays()\n {\n $day = 60*60*24;\n $weekDays = \"[\";\n for ($i=0;$i<7;$i++){\n $dayTime = time()-($day*$i);\n $weekDays .= '\"'.date('l', $dayTime).'\",'; \n }\n $weekDays = rtrim($weekDays, \",\").\"]\";\n return $weekDays;\n }", "title": "" }, { "docid": "66fa4e2db7b1f40d3638a12b3985b631", "score": "0.54079276", "text": "protected function workingDaysArray($array)\n {\n $fields = $this->dayArrayKeys();\n\n $daysCollection = $this->daysCollection($array);\n\n $working_days = $daysCollection->mapWithKeys(function ($day) use($fields) {\n return [\n $day[$fields[0]] => [\n $fields[1] => $day[$fields[1]],\n $fields[2] => $day[$fields[2]],\n ]\n ];\n });\n\n return $working_days->all();\n }", "title": "" }, { "docid": "104124c643b7ebf2822c6bde1f5d7635", "score": "0.5401946", "text": "function getDayDates( $date )\n\t{\n\t\t$weekdays = array( );\n\n\t\t$weekdays[0] = date( 'Y-m-d', strtotime( $date ) );\n\t\tfor ( $i = 1; $i < 7; $i++ )\n\t\t{\n\t\t\t$weekdays[$i] = date( 'Y-m-d', strtotime( $date . ' +' . $i . 'days' ) );\n\t\t}\n\n\t\treturn $weekdays;\n\t}", "title": "" }, { "docid": "be39bec5214c0b82cded8fb3679b4457", "score": "0.54003173", "text": "function getDatelist($days, $start = 0, $options = 'noWeekend'){\n $dates = [];\n $i = $start;\n if ($days > 0){\n while ($i <$days){\n $date = mktime(0,0,0,date('m'), date('d')+$i, date('y'));\n if (($options == 'noWeekend' and date('w', $date) != 0 AND date('w', $date) != 6) OR $options != 'noWeekend'){ //bedingtes Filtern auf Wochentage\n $entryDate = date('Y-m-d', $date);\n $displayDate = date('d.m.Y K\\WW D', $date);\n $dates[$entryDate] = $displayDate;\n }\n $i++;\n\n }\n } elseif ($days < 0){\n while ($days+$i <0){\n $entryDate = date('Y-m-d', mktime(0,0,0,date('m'), date('d')-$i, date('y')));\n $displayDate = date('d.m.Y', mktime(0,0,0,date('m'), date('d')-$i, date('y')));\n $dates[$entryDate]=$displayDate ;\n $i++;\n }\n }\n return $dates;\n}", "title": "" }, { "docid": "11c7a6f45dbc82cc2858a5ecef815b96", "score": "0.5399384", "text": "function calendarHolidayArray($low_date, $high_date)\n{\n\tglobal $db_prefix;\n\n\t// Get the lowest and highest dates for \"all years\".\n\tif (substr($low_date, 0, 4) != substr($high_date, 0, 4))\n\t\t$allyear_part = \"eventDate BETWEEN '0000-\" . substr($low_date, 4) . \"' AND '0000-12-31'\n\t\t\tOR eventDate BETWEEN '0000-01-01' AND '0000-\" . substr($high_date, 4) . \"'\";\n\telse\n\t\t$allyear_part = \"eventDate BETWEEN '0000-\" . substr($low_date, 4) . \"' AND '0000-\" . substr($high_date, 4) . \"'\";\n\n\t// Find some holidays... ;).\n\t$result = db_query(\"\n\t\tSELECT DAYOFMONTH(eventDate) AS day, YEAR(eventDate) AS year, title\n\t\tFROM {$db_prefix}calendar_holidays\n\t\tWHERE eventDate BETWEEN '$low_date' AND '$high_date'\n\t\t\tOR $allyear_part\", __FILE__, __LINE__);\n\t$holidays = array();\n\twhile ($row = mysql_fetch_assoc($result))\n\t\t$holidays[$row['day']][] = $row['title'];\n\tmysql_free_result($result);\n\n\treturn $holidays;\n}", "title": "" }, { "docid": "5ed1533d00f9e8d4df6ceb00e3692e08", "score": "0.539089", "text": "function servercron_getdays() {\n return array(\n '-1' => 'Every day',\n '1' => '01',\n '2' => '02',\n '3' => '03',\n '4' => '04',\n '5' => '05',\n '6' => '06',\n '7' => '07',\n '8' => '08',\n '9' => '09',\n '10' => '10',\n '11' => '11',\n '12' => '12',\n '13' => '13',\n '14' => '14',\n '15' => '15',\n '16' => '16',\n '17' => '17',\n '18' => '18',\n '19' => '19',\n '20' => '20',\n '21' => '21',\n '22' => '22',\n '23' => '23',\n '24' => '24',\n '25' => '25',\n '26' => '26',\n '27' => '27',\n '28' => '28',\n '29' => '29',\n '30' => '30',\n '31' => '31',\n );\n}", "title": "" }, { "docid": "099e3c2f0208079b092f37c1770f13d6", "score": "0.5379098", "text": "function getWorkDays($mois) {\n\n\t\t$joursFeries = ['1-1', '11-1', '1-5', '30-7', '14-8', '20-8', '21-8', '6-11', '18-11'];\n\n\t\t$workdays = array();\n\t\t$work = [];\n\t\t$type = CAL_GREGORIAN;\n\t\t$month = date($mois); \n\t\t$year = date('Y'); \n\t\t$day_count = cal_days_in_month($type, $month, $year); \n\n\t\tfor ($i = 1; $i <= $day_count; $i++) {\n\n\t $date = $year.'/'.$month.'/'.$i; //format date\n\t $get_name = date('l', strtotime($date)); //le nom du jour\n\t $day_name = substr($get_name, 0, 3); // filtrer les trois premier char of day\n\n\t //if not a weekend ajouter a la liste des jours\n\t if($day_name != 'Sun' && !in_array($i.'-'.$month, $joursFeries)){\n\t $workdays[] = $i;\n\t \n\t }\n\t\t}\n\t\tfor ($i=0; $i < count($workdays); $i++) { \n\t\t\tarray_push($work, $year.'-'.$month.'-'.$workdays[$i]);\n\t\t}\n\t\t\n\t\treturn $work;\n\t}", "title": "" }, { "docid": "f091d611f0d7a6cb09204108fc66c763", "score": "0.5338753", "text": "public static function getAbbrevDaysList(){\n\t\treturn array(\n\t\t\t'1' => 'Mon.',\n\t\t\t'2' => 'Tues.',\n\t\t\t'3' => 'Wed.',\n\t\t\t'4' => 'Thur.',\n\t\t\t'5' => 'Fri.',\n\t\t\t'6' => 'Sat.',\n\t\t\t'0' => 'Sun.',\n\t\t);\n\t}", "title": "" }, { "docid": "ef064f71700e3766ce28627b00296751", "score": "0.5330744", "text": "public function graph_dates_daily($interval = 1, $unselected_count = 0, $in_sun, $in_mon, $in_tue, $in_wed, $in_thu, $in_fri, $in_sat, $is_filter = 0, $from_date = '0000-00-00', $to_date = '0000-00-00')\n\t{\n\t\t$in_sun = (int)$in_sun;\n\t\t$in_mon = (int)$in_mon;\n\t\t$in_tue = (int)$in_tue; \n\t\t$in_wed = (int)$in_wed; \n\t\t$in_thu = (int)$in_thu; \n\t\t$in_fri = (int)$in_fri;\n\t\t$in_sat = (int)$in_sat;\n\t\t$is_filter = (int)$is_filter;\n\t\t$interval = (int)$interval;\n\t\t$unselected_count = (int)$unselected_count;\n\t\t$default_dates = array();\n\t\t$prev_num = (int)$prev_num;\n\t\t$next_num = (int)$next_num;\n\t\t$valid_from_date = $this->is_valid_date($from_date);\n\t\t$valid_to_date = $this->is_valid_date($to_date);\n\t\tif(($from_date != \"\" && $valid_from_date == false) || ($to_date != \"\" && $valid_to_date == false)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$query = $this->db->query(\"CALL graph_dates_daily($in_sun, $in_mon, $in_tue, $in_wed, $in_thu, $in_fri, $in_sat, $is_filter, $interval, '\".$from_date.\"', '\".$to_date.\"', $unselected_count)\");\t\n\t\t\t\t\n\t\t$query->next_result();\n\t\t$dates = ($query->num_rows() > 0) ? $query->result() : false;\t\n\t\t\n\t\t\n\t\tif($dates){\n\t\t\t$count = count($dates);\n\t\t\t$x = 1;\n\t\t\t\n\t\t\tforeach($dates as $date){\n\t\t\t\tif($x == 1){\n\t\t\t\t\t$default_dates['start_date'] = $date->selected_date;\t\n\t\t\t\t\t$default_dates['start_date_formatted'] = $date->formatted_date;\t\n\t\t\t\t}\n\t\t\t\tif($x == $count && $x != 1){\n\t\t\t\t\t$default_dates['last_date'] = $date->selected_date;\t\n\t\t\t\t\t$default_dates['last_date_formatted'] = $date->formatted_date;\t\n\t\t\t\t}\n\t\t\t\t$x++;\n\t\t\t\t$default_dates['actual_dates'][] = $date;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$default_dates['dates'] = $dates;\n\t\t\n\t\treturn $default_dates;\n\t}", "title": "" }, { "docid": "f67eff49af63ee4c2f4eda5885e521bc", "score": "0.5329058", "text": "function apply_season_rates( $paypal_dayprice, $days_array, $booking_type, $times_array, $post_form ) {\r\n\r\n// debuge($paypal_dayprice, $days_array, $booking_type, $times_array, $post_form, 'test ');\r\n\r\n if ($times_array[0] == array('00','00','00') ) $times_array[0] = array('00','00','01');\r\n if ($times_array[1] == array('00','00','02') ) $times_array[1] = array('24','00','02');\r\n\r\n $one_night = 0;\r\n $paypal_price_period = get_bk_option( 'booking_paypal_price_period' );\r\n $costs_depends_from_selection_new = array();\r\n if ($paypal_price_period == 'day') {\r\n\r\n $costs_depends_from_selection = $this->get_all_days_cost_depends_from_selected_days_count($booking_type, $days_array, $times_array );\r\n if ($costs_depends_from_selection !== false) {\r\n $costs_depends_from_selection[0]=0; \r\n for ($ii = 1; $ii < count($costs_depends_from_selection); $ii++) {\r\n $costs_depends_from_selection_new[] = $costs_depends_from_selection[$ii];\r\n }\r\n }\r\n\r\n }elseif ($paypal_price_period == 'night') {\r\n\r\n if (count($days_array)>1) {\r\n if ( ( ($times_array[0] == array('00','00','01') ) && ($times_array[1] == array('00','00','00') )) ||\r\n ( ($times_array[0] == array('00','00','01') ) && ($times_array[1] == array('24','00','02') ))\r\n ) { $one_night = 1; }\r\n }\r\n\r\n $costs_depends_from_selection = $this->get_all_days_cost_depends_from_selected_days_count($booking_type, $days_array, $times_array );\r\n if ($costs_depends_from_selection !== false) {\r\n $costs_depends_from_selection[0]=0; \r\n for ($ii = 1; $ii < count($costs_depends_from_selection); $ii++) {\r\n $costs_depends_from_selection_new[] = $costs_depends_from_selection[$ii];\r\n $one_night = 0;\r\n }\r\n }\r\n\r\n\r\n }elseif ($paypal_price_period == 'hour') {\r\n \r\n \r\n } else {\r\n //return array($paypal_dayprice); //fixed\r\n }\r\n\r\n $days_rates = array();\r\n\r\n for($i=0;$i<(count($days_array) - $one_night );$i++){ $d_day = $days_array[$i];\r\n\r\n if (! empty($d_day)) {\r\n// foreach ($days_array as $d_day) { $i++;\r\n $times_array_check = array(array('00','00','01'),array('24','00','02'));\r\n if ( $i==0 ) { $times_array_check[0] = $times_array[0]; }\r\n if ( $i == (count($days_array) -1- $one_night )) { $times_array_check[1] = $times_array[1]; }\r\n\r\n //$times_array_check = array($times_array[0],$times_array[1]); // Its will make cost calculation only between entered times, even on multiple days\r\n $d_day = explode('.',$d_day);\r\n $day = ($d_day[0]+0); $month = ($d_day[1]+0); $year = ($d_day[2]+0);\r\n $week = date('w', mktime(0, 0, 0, $month, $day, $year) );\r\n $days_rates[] = $this->get_1_day_cost_apply_rates($booking_type, $paypal_dayprice, $day , $month, $year, $times_array_check , $post_form );\r\n }\r\n }\r\n //if (count($days_rates)>1) $days_rates[count($days_rates)-1] = 0;\r\n // If fixed deposit so take only for first day cost\r\n\r\n if ($paypal_price_period == 'fixed') { if (count($days_rates)>0) { $days_rates = array($days_rates[0]); } else {$days_rates = array();} }\r\n\r\n\r\n /**/\r\n\r\n if ( ( count($costs_depends_from_selection_new)>0) &&\r\n (! ( (count($days_array) == 1 ) && (empty($days_array[0])) ) )\r\n ){\r\n $rates_with_procents = array();\r\n // check is some value of $costs_depends_from_selection_new consist % if its true so then apply this procents to days\r\n $is_rates_with_procents = false;\r\n for ($iii = 0; $iii < count($costs_depends_from_selection_new); $iii++) {\r\n if ( strpos($costs_depends_from_selection_new[$iii], 'add') !== false ) {\r\n $my_vvalue = floatval(str_replace('add','',$costs_depends_from_selection_new[$iii] ) );\r\n $rates_with_procents[]= $my_vvalue + $days_rates[$iii];\r\n } elseif ( strpos($costs_depends_from_selection_new[$iii], '%') !== false ) {\r\n $is_rates_with_procents = true;\r\n $proc = str_replace('%','',$costs_depends_from_selection_new[$iii] ) * 1;\r\n if (isset($days_rates[$iii]))\r\n $rates_with_procents[]= $proc*$days_rates[$iii]/100;\r\n } else {\r\n $rates_with_procents[]= floatval($costs_depends_from_selection_new[$iii]);// $days_rates[$iii]; // just cost\r\n }\r\n }\r\n\r\n if ($is_rates_with_procents) return $rates_with_procents; // Rates with procents from cost depends from number of days\r\n else return $costs_depends_from_selection_new; // Cost depends from number of days\r\n } else return $days_rates; // Just pure rates\r\n\r\n }", "title": "" }, { "docid": "413fce5089fb19b759ebf48476d15f06", "score": "0.53239393", "text": "function makeDayArray($xetconfig,$events, $date, $sortOrder='ASC') {\n\tglobal $modx;\n\t\n\tif (is_array($events)) {\n\t\t\n\t\t$timestampdaystart = $this->get_ts_daystart($date);\n\t\t$timestampmonthstart = $this->get_ts_monthstart($date);\n\t\t$timestampweekstart = $this->get_ts_weekstart($date);\n\t\t$timestampyearstart = $this->get_ts_yearstart($date);\n\t\tif ($this->xetconfig['counteventstarts'] == '1') {\n\t\t\t$this->counteventstarts($events);\n\t\t}\n\t\t$data_array=array();\n\t\t$rowid = 0;\n\t\t$rowscount = 0;\n\t\t$dayeventscount = 0;\n\t\t$weekeventscount = 0;\n\t\t$montheventscount = 0;\n\t\t$yeareventscount = 0;\n\t\t$theyearend = $themonthend = $theweekend = $thedayend = $sortOrder=='ASC'? -10000000000000:10000000000000;\n\t\t$theyearstart = $themonthstart = $theweekstart = $thedaystart = $sortOrder=='ASC'? -10000000000000:10000000000000;\n\t\t$rowscount = count($events);\n\t\tforeach ($events as $event) {\n\t\t\t$ID = $event['ID'];\n\t\t\t/*\n\t\t\t$rowTpl = $this->xettpl['datarowTpl'];\n\t\t\tif (isset ($event['tpl'])) {\n\t\t\t\t$tplfilename = $xetconfig['tplpath'] . \"/\" . $event['tpl'];\n\t\t\t\tif (($event['tpl'] !== '') && (file_exists($tplfilename))) {\n\t\t\t\t\t$rowTpl = \"@FILE:\" . $tplfilename;\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\t\t\t$eventdaystart = $this->get_ts_daystart($event['Time']);\n\t\t\t$eventweekstart = $this->get_ts_weekstart($event['Time']);\n\t\t\t$eventmonthstart = $this->get_ts_monthstart($event['Time']);\n\t\t\t$eventyearstart = $this->get_ts_yearstart($event['Time']);\n\t\t\t$eventdayend = $this->get_ts_dayend($event['Time']);\n\t\t\t$eventweekend = $this->get_ts_weekend($event['Time']);\n\t\t\t$eventmonthend = $this->get_ts_monthend($event['Time']);\n\t\t\t$eventyearend = $this->get_ts_yearend($event['Time']);\n\n if ($sortOrder == 'ASC')\n {\n if ($event['Time'] > $thedayend)\n {\n $dayeventscount = 1;\n $thedayend = $eventdayend;\n } else\n {\n $dayeventscount++;\n }\n if ($event['Time'] > $theweekend)\n {\n $weekeventscount = 1;\n $theweekend = $eventweekend;\n } else\n {\n $weekeventscount++;\n }\n if ($event['Time'] > $themonthend)\n {\n $montheventscount = 1;\n $themonthend = $eventmonthend;\n } else\n {\n $montheventscount++;\n }\n if ($event['Time'] > $theyearend)\n {\n $yeareventscount = 1;\n $theyearend = $eventyearend;\n } else\n {\n $yeareventscount++;\n }\n \n \n } else\n {\n if ($event['Time'] < $thedaystart)\n {\n $dayeventscount = 1;\n $thedaystart = $eventdaystart;\n } else\n {\n $dayeventscount++;\n }\n if ($event['Time'] < $theweekstart)\n {\n $weekeventscount = 1;\n $theweekstart = $eventweekstart;\n } else\n {\n $weekeventscount++;\n }\n if ($event['Time'] < $themonthstart)\n {\n $montheventscount = 1;\n $themonthstart = $eventmonthstart;\n } else\n {\n $montheventscount++;\n }\n if ($event['Time'] < $theyearstart)\n {\n $yeareventscount = 1;\n $theyearstart = $eventyearstart;\n } else\n {\n $yeareventscount++;\n }\n \n }\n\n\n\n\t\t\t$rowid++;\n\t\t\t$event['rowid'] = $rowid;\n\t\t\t$event['rowscount'] = $rowscount;\n\t\t\t$event['daydatarowid'] = $dayeventscount;\n\t\t\t$event['dayeventsid'] = $dayeventscount;\n\t\t\t$event['weekeventsid'] = $weekeventscount;\n\t\t\t$event['montheventsid'] = $montheventscount;\n\t\t\t$event['yeareventsid'] = $yeareventscount;\n\t\t\tif ($xetconfig['countdayevents'] == '1') {\n\t\t\t\t$this->countdayevents($events, $event['Time']);\n\t\t\t\t$event['dayeventscount'] = $this->eventscount['day'][$eventdaystart];\n\t\t\t}\n\t\t\tif ($xetconfig['countweekevents'] == '1') {\n\t\t\t\t$this->countweekevents($events, $event['Time']);\n\t\t\t\t$event['weekeventscount'] = $this->eventscount['week'][$eventweekstart];\n\t\t\t}\n\t\t\tif ($xetconfig['countmonthevents'] == '1') {\n\t\t\t\t$this->countmonthevents($events, $event['Time']);\n\t\t\t\t$event['montheventscount'] = $this->eventscount['month'][$eventmonthstart];\n\t\t\t}\n\t\t\tif ($xetconfig['countyearevents'] == '1') {\n\t\t\t\t$this->countyearevents($events, $event['Time']);\n\t\t\t\t$event['yeareventscount'] = $this->eventscount['year'][$eventyearstart];\n\t\t\t}\n\t\t\tif ($xetconfig['counteventstarts'] == '1') {\n\t\t\t\t$event['daystartscount'] = $this->eventscount['daystarts'][$eventdaystart];\n\t\t\t\t$event['weekstartscount'] = $this->eventscount['weekstarts'][$eventweekstart];\n\t\t\t\t$event['monthstartscount'] = $this->eventscount['monthstarts'][$eventmonthstart];\n\t\t\t\t$event['yearstartscount'] = $this->eventscount['yearstarts'][$eventyearstart];\n\t\t\t}\n\t\t\t$event['fromprevday'] = ($event['Time'] < $timestampdaystart) ? 1 : 0;\n\t\t\t$event['fromprevweek'] = ($event['Time'] < $timestampweekstart) ? 1 : 0;\n\t\t\t$event['fromprevmonth'] = ($event['Time'] < $timestampmonthstart) ? 1 : 0;\n\t\t\t$event['fromprevyear'] = ($event['Time'] < $timestampyearstart) ? 1 : 0;\n\t\t\t$event['tsday'] = $date;\n\t\t\t$data_array[]= $event;\n\t\t}\n\t}\n \t//$tpl = new mgChunkie($this->xettpl['dataouterTpl']);\n\t$day_array = array ();\n $link = array ();\n\t$removearray=array('tsmonth');\n $link['tsday'] = $date;\n $day_array['link_tsday'] = $this->blox->smartModxUrl($modx->documentObject[\"id\"], NULL, $link,$removearray);\n\t$day_array['date'] = $date;\n\t$day_array['daytimestamp'] = $date;\n\t$day_array['tsday'] = $date;\n\t$day_array['innerrows']['datarow'] = $data_array;\n\t$day_array['datarowscount'] = $rowscount;\n\t$day_array['dayeventscount'] = $dayeventscount;\n\t//$day_array['config'] = $xetconfig;\n\t//$tpl->addVar('xeventtable', $dataouterTplData);\n\t//$output = $tpl->Render();\n\treturn $day_array;\n}", "title": "" }, { "docid": "5a4f2f3c0486dc88af03d8406d8cbc2e", "score": "0.532016", "text": "public static function getValues() {\n return array(\n self::MONTH,\n self::WEEK,\n self::DAY,\n );\n }", "title": "" }, { "docid": "7b76c3d28b83b4a5681b63b44f2dbbee", "score": "0.52902967", "text": "function getDayName($daynb=0, $array=0)\n\t{\n\n\t\tstatic $days = null;\n\n\t\tif ($days === null)\n\t\t{\n\t\t\t$days = array();\n\n\t\t\t$days[0] = JText::_('JEV_SUNDAY');\n\t\t\t$days[1] = JText::_('JEV_MONDAY');\n\t\t\t$days[2] = JText::_('JEV_TUESDAY');\n\t\t\t$days[3] = JText::_('JEV_WEDNESDAY');\n\t\t\t$days[4] = JText::_('JEV_THURSDAY');\n\t\t\t$days[5] = JText::_('JEV_FRIDAY');\n\t\t\t$days[6] = JText::_('JEV_SATURDAY');\n\t\t}\n\n\t\tif ($array == 1)\n\t\t{\n\t\t\treturn $days;\n\t\t}\n\n\t\t$i = $daynb % 7; //modulo 7\n\t\treturn $days[$i];\n\n\t}", "title": "" }, { "docid": "ab102473e570845bfefc09f54e425d11", "score": "0.52888465", "text": "function fillLeft(){\r\n\t\t\t\tglobal $today_line, $today_col, $today, $Arr, $line, $col, $day;\r\n\t\t\t\t\r\n\t\t\t\t$line = $today_line;\r\n\t\t\t\t$col = $today_col; checkCol();\r\n\t\t\t\t$day = $today;\r\n\t\t\t\t\r\n\t\t\t\t//echo $today_line.\" \".$line.\" \".$col;\r\n\t\t\t\twhile (!(($line == 0) && ($col == 0))){\r\n\t\t\t\t\t$Arr[$line][$col]= $day;\r\n\t\t\t\t\t$col--; checkCol();\r\n\t\t\t\t\t$day--; checkDay();\r\n\t\t\t\t}\r\n\t\t\t\t$Arr[0][0] = $day;\r\n\t\t\t\t\r\n\t\t\t}", "title": "" }, { "docid": "50a6e382a7e98f3811b1c361a4adc072", "score": "0.52821344", "text": "private function getDays()\n {\n $first_day_of_week = date('w', mktime(0, 0, 0, $this->month, 1, $this->year));\n $days_count = date('d', mktime(0, 0, 0, $this->month + 1, 0, $this->year));\n\n $days_of_week = $this->days_of_week;\n // Sunday can be set as either 0 or 7 in cron. For our purposes 0 is probably better\n if (isset($days_of_week[7])) {\n unset($days_of_week[7]);\n $days_of_week[0] = true;\n }\n\n $days_of_week_skipped = false;\n if (array_keys($days_of_week) === range(0, 6)) {\n $days_of_week = array();\n $days_of_week_skipped = true;\n }\n\n $days_of_month = $this->days_of_month;\n foreach ($days_of_month as $day => $_) {\n if ($day > $days_count || $day < 1) {\n unset($days_of_month[$day]);\n }\n }\n\n $days_of_month_skipped = false;\n if (array_keys($days_of_month) === range(1, $days_count)) {\n $days_of_month = array();\n $days_of_month_skipped = true;\n }\n\n if ($days_of_month_skipped && $days_of_week_skipped) {\n $result = array();\n for ($i = 1; $i <= $days_count; $i++) $result[$i] = true;\n return $result;\n }\n\n $result = $days_of_month;\n for ($i = 1; $i <= $days_count; $i++) {\n if (isset($days_of_week[($first_day_of_week + $i - 1) % 7])) {\n $result[$i] = true;\n }\n }\n\n ksort($result, SORT_NUMERIC);\n return $result;\n }", "title": "" }, { "docid": "dfd19ab893b41874eac5ce43c15c73b8", "score": "0.52793807", "text": "private function get_busiest_time_interval_array() {\n\n $buseiest_day = [];\n $count=0;\n for($i=0;$i<24;$i+=2) {\n $buseiest_day[$i.'-'.($i+2)] = 0;\n }\n\n return $buseiest_day;\n }", "title": "" }, { "docid": "2ff866e3bd441e93ac497b45e788ae57", "score": "0.5264493", "text": "function servercron_getweekdays() {\n return array(\n '-1' => 'Every weekday',\n '0' => 'Sunday',\n '1' => 'Monday',\n '2' => 'Tuesday',\n '3' => 'Wednesday',\n '4' => 'Thursday',\n '5' => 'Friday',\n '6' => 'Saturday',\n );\n}", "title": "" }, { "docid": "b697ace4960ede426a90445efb336697", "score": "0.52616185", "text": "private function getRealDatesFlightSchedules(array $flightSchedules)\n {\n $result = [];\n $dateNow = date('Y-m-d');\n foreach($flightSchedules as $flightSchedule){\n $dateFlight = $flightSchedule['date'];\n if($dateFlight >= $dateNow){ //@todo better throught Datetime...\n $result[] = $dateFlight;\n } \n } \n return $result;\n }", "title": "" }, { "docid": "66c861eaa3ae978f5380ba38a6426c77", "score": "0.5247934", "text": "public function normalizeDayFrame() {\n $this->dayFramedata = array();\n \n $dayIndex = 0;\n $lastDay = \"\";\n foreach ($this->rawData as $point) {\n $day = date('N', $point[$this->timeIndex]);\n if ($lastDay > $day) {\n $dayIndex++;\n }\n $time = LocalizedTimeStamp::fromUnix($point[$this->timeIndex]);\n $this->dayFrameData[$dayIndex][] = array($time->intVal(), $point[$this->valIndex]);\n $lastDay = $day;\n }\n \n \n return $this->dayFramedata;\n }", "title": "" }, { "docid": "68c8f3c255a7743010b4f4ead79dd5f9", "score": "0.5245575", "text": "#[Pure] public function getDaysWeek(): array\n {\n return $this->week->getDays()->all();\n }", "title": "" }, { "docid": "89be52d792537de835760c13ddc56f8d", "score": "0.5243861", "text": "public static function all($date, string $format = null): array\n {\n return FinancialCalendar::fromStatic('array', $date, $format);\n }", "title": "" }, { "docid": "b941f2dfaec9bec93c884a1883a41708", "score": "0.5242351", "text": "public static function get_pn_days($date) {\n $result = [];\n if ($date === null) {\n $date = date(\"Y-m-d\");\n }\n $part = explode(\"-\", $date);\n $time = mktime(12,0,0, $part[1], $part[2], $part[0]);\n\n $result['time'] = $time;\n $result['this'] = $date;\n $result['prev'] = date(\"Y-m-d\", $time - static::OneDay);\n $result['next'] = date(\"Y-m-d\", $time + static::OneDay);\n\n return $result;\n }", "title": "" }, { "docid": "2baa5b2dde17dcac143746231161c12b", "score": "0.52409613", "text": "public static function weekends() : array\n {\n $days = self::getAll();\n $weekEndDays = [];\n\n foreach ($days as $key => $day) {\n if ($day->isWeekEnd()) {\n $weekEndDays[] = $day;\n }\n }\n\n return $weekEndDays;\n }", "title": "" }, { "docid": "7776cadcb65f3f6d4839da299b5070ae", "score": "0.5236262", "text": "private function _getSalariesDays(){\n\t\t\t$interval \t= DateInterval::createFromDateString('1 month');\n\t\t\t$period \t= new DatePeriod($this->start_date, $interval, $this->end_date);\n\n\t\t\tforeach ($period as $date){\n\t\t\t\t$year \t\t= $date->format(\"Y\");\n\t\t\t\t$month \t\t= $date->format(\"m\");\n\t\t\t\t$day \t\t= $date->format(\"t\");\n\n\t\t\t\tif($this->isDayForbidden(date(\"l\",strtotime(\"$year-$month-$day\")))){\n\t\t\t\t\t$day = date(\"d\",strtotime(self::ALTERNATIVE_SALARY_DAY,$date->format(\"U\")));\n\t\t\t\t}\n\n\t\t\t\t$this->table[$date->format(\"F\")][\"Salary\"] = $day;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e1d92fff49a2a14a0ea00e4568ecdf46", "score": "0.5235951", "text": "protected function dayArrayKeys()\n {\n return ['working_day_id', 'start_at', 'end_at'];\n }", "title": "" }, { "docid": "97aa7c25924cad3675fc8a68cf226316", "score": "0.5225617", "text": "public function weekdays()\n {\n return $this->days(Schedule::MONDAY.'-'.Schedule::FRIDAY);\n }", "title": "" }, { "docid": "94d9a35ff928ad7b24e0588cb410da2a", "score": "0.52213913", "text": "function dayOptions() {\n\t\t\tfor ($i=1; $i<=31; $i++)\n\t\t\t{\n\t\t\t\t$day[] = $i;\n\t\t\t}\n\t\t\treturn makeOptions($day, $this->d);\n\t\t}", "title": "" }, { "docid": "3ea3358398cc33a81d218311dd9a6207", "score": "0.52149045", "text": "private static function getHolidays($time){\n $holidays = array();\n $year = date('Y', strtotime($time)); //$time's year\n\n array_push($holidays, $year . '-01-01'); //New Year's day\n array_push($holidays, date('Y-m-d', strtotime(\"january $year third monday\"))); //Martin Luthor King Jr. Day\n array_push($holidays, date('Y-m-d', strtotime(\"february $year third monday\"))); //Presidents Day\n array_push($holidays, date('Y-m-d', easter_date($year))); // Easter\n\n //Memorial Day is slightly more complicated\n $MDay = date('Y-m-d', strtotime(\"may $year first monday\")); // Memorial Day\n //(\"may $year last monday\") will give you the last monday of may 1967\n $explodedMDay = explode(\"-\",$MDay);\n $month = $explodedMDay[1];\n $day = $explodedMDay[2];\n\n while($day <= 31){\n $day = $day + 7;\n }\n if($day > 31){\n $day = $day - 7;\n }\n\n $MDay = $year.'-'.$month.'-'.$day;\n array_push($holidays, $MDay);\n\n array_push($holidays, $year . '-07-04'); //Independence Day\n array_push($holidays, date('Y-m-d', strtotime(\"september $year first monday\"))); //Labor Day\n array_push($holidays, date('Y-m-d', strtotime(\"october $year third monday\"))); //Columbus Day\n array_push($holidays, $year . '-11-11'); //Veteran's Day\n\n //Thanksgiving is slightly more complicated\n $thanksgiving = date('Y-m-d', strtotime(\"november $year first thursday\")); // Thanksgiving\n //(\"november $year last thursday\") will give you the last thursday of november 1967\n $explodedThanksgiving = explode(\"-\",$thanksgiving);\n $month = $explodedThanksgiving[1];\n $day = $explodedThanksgiving[2];\n\n while($day <= 30){\n $day = $day + 7;\n }\n if($day > 30){\n //watch out for the days in the month November only have 30\n $day = $day - 7;\n }\n\n $thanksgiving = $year.'-'.$month.'-'.$day;\n array_push($holidays, $thanksgiving);\n\n array_push($holidays, $year . '-12-24'); //Christmas Eve\n array_push($holidays, $year . '-12-25'); //Christmas\n array_push($holidays, $year . '-12-31'); //New Year's Eve\n\n return $holidays;\n }", "title": "" }, { "docid": "6a9b91d4c5402d48a5be4662bdc23b24", "score": "0.52121556", "text": "protected function calender($pml, $tml, $wfd){\n $last = false;\n $day = $pml - ($wfd - 1);\n if(($tml + $wfd)>35)\n $row = 6; \n else if($tml == 28 && $wfd == 0)\n $row = 4;\n else\n $row = 5;\n \n $cal = [[],[]];\n for($r=0; $r < $row; $r++){\n for($c = 0;$c < 7; $c++){\n if($day > $pml && !$last){\n $day = 1;\n $last = true;\n }\n $cal[$r][$c] = $day;\n $day++;\n\n if($last && $day>$tml)\n $day = 1;\n }\n }\n return $cal;\n }", "title": "" }, { "docid": "9b895372607d88f839c12359087fe26c", "score": "0.52042586", "text": "function easter_days ($year = null, $method = null) {}", "title": "" }, { "docid": "f3d47c9106f2a384df2ecd4bf8857621", "score": "0.5202829", "text": "function getNonWorkingDays( )\n\t{\n\t\t$config = Calendar::getInstance( );\n\t\t\t\n\t\t$str_days = $config->get( 'non_working_days' );\n\n\t\t$non_working_days = array( );\n\t\t$str_days = @preg_replace( '/\\s/', '', $str_days );\n\t\t$non_working_days = explode( ',', $str_days );\n\n\t\treturn $non_working_days;\n\t}", "title": "" }, { "docid": "a78e3ddbf897e2e50f2c052d26269d63", "score": "0.51871437", "text": "public function toArray(): array\n {\n return [\n $this->createDayZero() => $this->createDayZero(),\n $this->createDateOne() => $this->createDateOne(),\n $this->createDateTwo() => $this->createDateTwo(),\n $this->createDateThree() => $this->createDateThree()\n ];\n }", "title": "" }, { "docid": "8507e2ca8e67d84a07e89029d287e00b", "score": "0.5181374", "text": "function wedding_add_new_intervals($schedules) \n{\n\t$schedules['hourly'] = array(\n\t\t'interval' => 3600,\n\t\t'display' => esc_html__('Once Hourly','weddingvendor')\n\t);\n\n\t$schedules['weekly'] = array(\n\t\t'interval' => 604800,\n\t\t'display' => esc_html__('Once Weekly','weddingvendor')\n\t);\n\n\t$schedules['monthly'] = array(\n\t\t'interval' => 2635200,\n\t\t'display' => esc_html__('Once a month','weddingvendor')\n\t);\n\n\treturn $schedules;\n}", "title": "" }, { "docid": "11c42c591bb5d21a64b1895a57a1ba3d", "score": "0.5163474", "text": "public function list_days_of_the_week($respect_start_of_week = true) {\n\t\tglobal $wp_locale;\n\t\t$days_of_the_week = array();\n\t\t$i = $j = $respect_start_of_week ? get_option('start_of_week', 1) : 1;\n\t\twhile ($i < $j+7) { // 7 days\n\t\t\t$days_of_the_week[] = array(\n\t\t\t\t'index' => $i % 7,\n\t\t\t\t'value' => $wp_locale->get_weekday($i % 7),\n\t\t\t);\n\t\t\t$i++;\n\t\t}\n\t\treturn $days_of_the_week;\n\t}", "title": "" }, { "docid": "36c13e9d3970df367a30565970b4dc41", "score": "0.5162312", "text": "function getPays($clef) {\r\n $pays = Array(\"FR\" => Array(\"France\", \"France\"),\r\n 'BA' => array('Bosnia','Bosnie'),\r\n 'TR' => array('Turkey','Turquie'),\r\n 'NO' => array('Norway','Norvège'),\r\n 'FI' => array('Finland','Finlande'),\r\n 'SE' => array('Sweden','Suède'),\r\n 'BG' => array('Bulgaria','Bulgarie'),\r\n 'RO' => array('Romania','Roumanie'),\r\n 'EE' => array('Estonia','Estonie'),\r\n 'LV' => array('Latvia','Lettonie'),\r\n 'LT' => array('Lithuania','Lituanie'),\r\n 'HU' => array('Hungary','Hongrie'),\r\n 'HR' => array('Croatia','Croatie'),\r\n 'SI' => array('Slovenia','Slovénie'),\r\n 'NL' => array('The Netherlands','Pays-Bas'),\r\n 'FR' => array('France','France'),\r\n 'ES' => array('Spain','Espagne'),\r\n 'IT' => array('Italy','Italie'),\r\n 'AT' => array('Austria','Autriche'),\r\n 'BE' => array('Belgium','Belgique'),\r\n 'CH' => array('Switzerland','Suisse'),\r\n 'CY' => array('Cyprus','Chypre'),\r\n 'CZ' => array('Czech Republic','République Tchèque'),\r\n 'DE' => array('Germany','Allemagne'),\r\n 'DK' => array('Denmark','Danemark'),\r\n 'GR' => array('Greece','Grèce'),\r\n 'IE' => array('Ireland','Irlande'),\r\n 'IS' => array('Iceland','Islande'),\r\n 'PL' => array('Poland','Pologne'),\r\n 'PT' => array('Portugal','Portugal'),\r\n 'RU' => array('Russia','Russie'),\r\n 'SK' => array('Slovakia','Slovaquie'),\r\n 'UA' => array('Ukraine','Ukraine'),\r\n 'YU' => array('Yugoslavia','Yougoslavie'));\r\n\r\n return $pays[$clef][getLangID(LANG)];\r\n }", "title": "" }, { "docid": "3982fc539649becc24e2caff1c199169", "score": "0.5155414", "text": "function seasonHighOdinary ($info )\n {\n \n $dates = array();\n $startAdvent = $info->getStartAdvent();\n $startDate = strtotime('-1 day', $startAdvent);\n $endDate = strtotime('-7 day', $startAdvent);\n\n while ($startDate > $endDate)\n {\n\n \n $cal = new Calendary($startDate);\n $key = $cal->getLiteralDow().'OfThe'.ordinalNumbers(33).'WeekOfOrdinaryTime';\n $cal->setLiteralDay($cal->getLiteralDow().' of the '.ordinalNumbers(33).' week of Ordinary Time');\n $cal->setRank('WEEKDAY');\n $cal->setLiturgicalWeek(34);\n $cal->setLiturgicalColor('GREEN');\n $cal->setLiturgicalSeason('OT');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n \n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n $startDate = strtotime('-1 day', $startDate);\n\n }\n\n $startDate = strtotime('-7 day', $startAdvent); \n\n $cal = new Calendary($startDate);\n $key = 'christTheKing';\n $cal->setLiteralDay('Christ the King of the Universe');\n $cal->setRank('SOLEMNITY');\n $cal->setLiturgicalWeek(34);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('OT');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n\n $startDate = strtotime('-8 day', $startAdvent);\n $endDate = $info->getPentecostSunday();\n\n $weekOfOrdinaryTime = 32;\n $counter = 0;\n\n while ($startDate > $endDate)\n {\n $cal = new Calendary($startDate);\n\n if ( $cal->getDayOfWeek() == 0 ) \n { // Sunday\n $key = 'the'.ordinalNumbers($weekOfOrdinaryTime).'SundayOfOrdinaryTime';\n $cal->setLiteralDay('The '.ordinalNumbers($weekOfOrdinaryTime).' Sunday of Ordinary Time');\n $cal->setRank('SUNDAY');\n $cal->setLiturgicalWeek($weekOfOrdinaryTime + 1);\n $weekOfOrdinaryTime--;\n }\n else\n {\n\n $key = $cal->getLiteralDow().'OfThe'.ordinalNumbers($weekOfOrdinaryTime).'WeekOfOrdinaryTime';\n $cal->setLiteralDay($cal->getLiteralDow().' of the '.ordinalNumbers($weekOfOrdinaryTime).' week of Ordinary Time');\n $cal->setRank('WEEKDAY');\n $cal->setLiturgicalWeek($weekOfOrdinaryTime + 1);\n }\t\n \n $cal->setLiturgicalColor('GREEN');\n $cal->setLiturgicalSeason('OT');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n \n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n $startDate = strtotime('-1 day', $startDate);\n\n }\n\n $dates = sortArray($dates);\n\n//******************************************************************************* \n $arrayResult = array_column($dates, 0);\n $arrayKeys = array_keys($dates);\n $timeToSearch = strtotime('+7 days', $info->getPentecostSunday());\n \n $position = array_search($timeToSearch, $arrayResult);\n $dates = replaceKey($dates,$arrayKeys[$position], 'trinitySunday' );\n $dates['trinitySunday'][1]->setRank('SOLEMNITY');\n $dates['trinitySunday'][1]->setLiteralDay('Trinity Sunday'); \n $dates['trinitySunday'][1]->setLiturgicalColor('WHITE'); \n\n//******************************************************************************* \n \n if ($info->isCorpusChristiOnThur())\n {\n $timeToSearch = strtotime ('+4 days', $timeToSearch);\n }\n else\n {\n $timeToSearch = strtotime ('+7 days', $timeToSearch);\n }\n \n $position = array_search($timeToSearch, $arrayResult);\n $dates = replaceKey($dates,$arrayKeys[$position], 'corpusChristi' );\n $dates['corpusChristi'][1]->setRank('SOLEMNITY');\n $dates['corpusChristi'][1]->setLiteralDay('Corpus Christi'); \n $dates['corpusChristi'][1]->setLiturgicalColor('WHITE'); \n\n//******************************************************************************* \n\n $timeToSearch = strtotime('+19 days', $info->getPentecostSunday());\n \n $position = array_search($timeToSearch, $arrayResult);\n $dates = replaceKey($dates,$arrayKeys[$position], 'sacredHeart' );\n $dates['sacredHeart'][1]->setRank('SOLEMNITY');\n $dates['sacredHeart'][1]->setLiteralDay('The Most Sacred Heart of Jesus'); \n $dates['sacredHeart'][1]->setLiturgicalColor('WHITE'); \n \n//******************************************************************************* \n\n $timeToSearch = strtotime('+1 days', $timeToSearch);\n \n $position = array_search($timeToSearch, $arrayResult);\n $dates = replaceKey($dates,$arrayKeys[$position], 'immaculateHeartOfMary' );\n $dates['immaculateHeartOfMary'][1]->setRank('MEMORIAL');\n $dates['immaculateHeartOfMary'][1]->setLiteralDay('Immaculate Heart of Mary'); \n $dates['immaculateHeartOfMary'][1]->setLiturgicalColor('WHITE'); \n \n//******************************************************************************* \n\n $timeToSearch = mktime(0,0,0,6,24, $info->getYear());\n \n $position = array_search($timeToSearch, $arrayResult);\n $dates = replaceKey($dates,$arrayKeys[$position], 'birthOfJohnTheBaptist' );\n $dates['birthOfJohnTheBaptist'][1]->setRank('SOLEMNITY');\n $dates['birthOfJohnTheBaptist'][1]->setLiteralDay('Birth of John the Baptist'); \n $dates['birthOfJohnTheBaptist'][1]->setLiturgicalColor('WHITE'); \n \n//******************************************************************************* \n\n $timeToSearch = mktime(0,0,0,6,29, $info->getYear());\n \n $position = array_search($timeToSearch, $arrayResult);\n $dates = replaceKey($dates,$arrayKeys[$position], 'peterAndPaulApostles' );\n $dates['peterAndPaulApostles'][1]->setRank('SOLEMNITY');\n $dates['peterAndPaulApostles'][1]->setLiteralDay('Saints Peter and Paul Apostles'); \n $dates['peterAndPaulApostles'][1]->setLiturgicalColor('RED'); \n \n//******************************************************************************* \n\n $timeToSearch = mktime(0,0,0,8,15,$info->getYear());\n \n $position = array_search($timeToSearch, $arrayResult);\n $dates = replaceKey($dates,$arrayKeys[$position], 'assumption' );\n $dates['assumption'][1]->setRank('SOLEMNITY');\n $dates['assumption'][1]->setLiteralDay('Assumption'); \n $dates['assumption'][1]->setLiturgicalColor('WHITE'); \n \n\n//******************************************************************************* \n\n $timeToSearch = mktime(0,0,0,11,1,$info->getYear());\n \n $position = array_search($timeToSearch, $arrayResult);\n $dates = replaceKey($dates,$arrayKeys[$position], 'allSaints' );\n $dates['allSaints'][1]->setRank('SOLEMNITY');\n $dates['allSaints'][1]->setLiteralDay('All Saints'); \n $dates['allSaints'][1]->setLiturgicalColor('WHITE'); \n\n//******************************************************************************* \n \n return ($dates);\n \n }", "title": "" }, { "docid": "2c3f17d79ece2d254b18347fb7a27519", "score": "0.51546127", "text": "public function __construct($array) {\r\n $this->fecha=$this->getFecha();\r\n for($i=0; $i<count($array);$i++){\r\n array_push($this->inventarios, $array[$i]);\r\n }\r\n }", "title": "" }, { "docid": "2106e820e5e72f9c23b8417c26036b6a", "score": "0.5139703", "text": "function get_date($array){\n\t// array(\"001\", \"TextoA\", \"01/11/2012\");\n\t$fecha = $array[2];\n\t$dia = $fecha[0].$fecha[1];\n\t$mes = $fecha[3].$fecha[4];\n\t$year = $fecha[6].$fecha[7].$fecha[8].$fecha[9];\n\t//print \"$fecha[6]$fecha[7]$fecha[8]$fecha[9]\";\n\t$fecha = array ($dia, $mes, $year);\n\treturn $fecha;\n}", "title": "" }, { "docid": "dc4823f5b6c5e8dfcd82e2974f51600e", "score": "0.51291436", "text": "public function sundays()\n {\n return $this->days(0);\n }", "title": "" }, { "docid": "f2a7a0c95801bb147b8b462f4c45a2fd", "score": "0.51247454", "text": "public function weekends()\n {\n return $this->days(Schedule::SATURDAY.','.Schedule::SUNDAY);\n }", "title": "" }, { "docid": "1587f12c9374b9899563de58eea31cd8", "score": "0.51229924", "text": "public function testGetDaysReturnsCorrectArrayOfDaysWithFormatForMultipleDaysInSingleYear()\n {\n $newDateRange = new DateRange(\n new \\DateTime('2011-08-05'),\n new \\DateTime('2011-08-10')\n );\n $expected = array(\n '2011-08-05 00',\n '2011-08-06 00',\n '2011-08-07 00',\n '2011-08-08 00',\n '2011-08-09 00',\n '2011-08-10 00',\n );\n $result = $newDateRange->getDays('Y-m-d H');\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "59111bacd907fb9edf8566d2cf2643ca", "score": "0.51210517", "text": "public function saturdays()\n {\n return $this->days(6);\n }", "title": "" }, { "docid": "75d5db788b42d2c16ffca5f3b3df52a7", "score": "0.5117049", "text": "function get_quarter_dates ($q, $y, $b=\"B\") { // Brokerage vs Calendar\n\n$arr_qtrs = array(1=>\"Jan|Mar\",2=>\"Apr|Jun\",3=>\"Jul|Sep\",4=>\"Oct|Dec\"); \n$arr_qtrs_startmon = array(1=>\"01\",2=>\"04\",3=>\"07\",4=>\"10\"); \n$arr_qtrs_endmon = array(1=>\"03\",2=>\"06\",3=>\"09\",4=>\"12\"); \n\n$arr_start_end_months = explode(\"|\",$arr_qtrs[$q]);\n\n\tif ($b==\"B\") {\n\t\t$result_ = mysql_query(\"SELECT brk_start_date FROM brk_brokerage_months where brk_month = '\".$arr_start_end_months[0].\"' and brk_year = '\".$y.\"'\") or die (mysql_error());\n\t\twhile ( $row = mysql_fetch_array($result_) ) {\n\t\t\t$begin_tradedate = $row[\"brk_start_date\"];\n\t\t}\n\n\t\t$result_ = mysql_query(\"SELECT brk_end_date FROM brk_brokerage_months where brk_month = '\".$arr_start_end_months[1].\"' and brk_year = '\".$y.\"'\") or die (mysql_error());\n\t\twhile ( $row = mysql_fetch_array($result_) ) {\n\t\t\t$end_tradedate = $row[\"brk_end_date\"];\n\t\t}\n\n\t\t$arr_return_dates = array($begin_tradedate,$end_tradedate);\n\t\treturn $arr_return_dates;\n\n\t} else {\n\t\t//to be programmed\n\t\t$sdate = $y.\"-\".$arr_qtrs_startmon[$q].\"-01\";\n\t\t$edate = $y.\"-\".$arr_qtrs_endmon[$q].\"-\".idate('d', mktime(0, 0, 0, ($arr_qtrs_endmon[$q] + 1), 0, $y));\n\t\treturn array($sdate,$edate);\n\t}\n}", "title": "" }, { "docid": "565f5913873d0dabb92ec0fd6d9493e4", "score": "0.51137465", "text": "public function createCalendar($month_input)//fungsi buat bikin kalender\n {//awal fungsi create calendar\n\t\t$calendar = [];\n\t\t$keyboard = [];\n\t\t$maxdate = date(\"t\", strtotime($month_input.\"-01\"));\n\t\t$startday = date(\"w\", strtotime($month_input.\"-01\"));\n\t\t$date = 1;\n\t\t$row = 0;\n\t\t$calendar = [];\n\t\twhile($date<=$maxdate){\n\t\t\t$calendarperrow = [];\n\t\t\tfor($col=0;$col<7;$col++){\n\t\t\t\tif((($col<$startday)&&($row==0))||(($date>$maxdate))){\n\t\t\t\t\t$calendarperrow[] = Keyboard::inlineButton(['text' => '_', 'callback_data' => '_']);\n\t\t\t\t}else{\n\t\t\t\t\t$calendarperrow[] = Keyboard::inlineButton(['text' => substr(\"0\".strval($date),-2), 'callback_data' => '/updpsn#'.$month_input.\"-\".substr(\"0\".strval($date),-2)]);\n\t\t\t\t\t$date++;\n\t\t\t\t}//end else\n\t\t\t}//end for\n\t\t\t$calendar[] = $calendarperrow;\n\t\t\t$row++;\n\t\t}//end while\n\t\t$eek = trim($month_input).\"-01\";\n\t\t$prev_date = DateTime::createFromFormat('Y-m-d',$eek)->sub(new DateInterval('P1M'))->format(\"Y-m\");\n\t\t$next_date = DateTime::createFromFormat('Y-m-d',$eek)->add(new DateInterval('P1M'))->format(\"Y-m\");\n\n $calendarperrow = [\n\t\t\tKeyboard::inlineButton(['text' => 'Previous', 'callback_data' => '/updpsn#change'.$prev_date]),\n\t\t\tKeyboard::inlineButton(['text' => 'Next', 'callback_data' => '/updpsn#change'.$next_date])\n\t\t];\n\t\t$calendar[] = $calendarperrow;\n\n\t\treturn $calendar;\n\t}", "title": "" }, { "docid": "6ba9cbb37ee8057f67a4df10e2002b6c", "score": "0.51106894", "text": "function queryStays($Query_DateRange = 21, $Query_minNights = 1) {\n\n\t// Set default TimeZone as Australia Brisbane UTC+10\n\tdate_default_timezone_set('Australia/Brisbane');\n\n\t// Set Date time format to get string like 2016-04-26\n $strDateTimeFormat = \"Y-m-d\";\n\n\t// Basic Configurations\n $strBaseURI = \"https://app-apac.thebookingbutton.com\";\n $strFileFormat = \"\";\n $strChannelCode = \"camhotsyddirect\";\n $objDateTime = new DateTime('NOW');\n $strStartDate = $objDateTime->format($strDateTimeFormat);\n $strEndDate = $objDateTime->add(new DateInterval('P' . $Query_DateRange . 'D'))->format($strDateTimeFormat);\n\n\t// Compose the Query URI, it would be like \"https://app-apac.thebookingbutton.com/api/v1/properties/camhotsyddirect/rates?start_date=2012-06-15\"\n $strPropertyURI = $strBaseURI . \"/api/v1/properties/\" . $strChannelCode . \"/rates\" . $strFileFormat .\"?start_date=\" . $strStartDate . \"&end_date=\" . $strEndDate;\n\n\t// Use PHP SimpleXML to load the file\n $RoomRates = simplexml_load_file($strPropertyURI) or die(\"feed not loading\");\n\n\t// Set default output array in final: arrProperty\n $arrProperty = array();\n foreach ($RoomRates->property as $Property) {\n\t\n\t\t// Set a temporarily output array: arrRoomType as the container to store the Date-Rate information\n $arrRoomType = array();\n foreach ($Property->{'room-types'}->{'room-type'} as $RoomType) {\n\t\t\n\t\t\t// Set a temporarily output array: arrRoomDateRate\n $arrRoomDateRate = array();\n\t\t\t\n\t\t\t// Init the avaiable Nights with Counter and Rates Accumulation\n $accAvailableNights = 0;\n $arrAccumulatedRates = array_fill(0, $Query_minNights, 0);\n\t\t\t\n foreach ($RoomType->{'room-type-dates'}->{'room-type-date'} as $RoomTypeDate) {\n\n // Rolling the Accumulation;\n\t\t\t\t// for example, for the consecutive 3 night to the final checkout date of 2016-04-12, we sum up the rate of 2016-04-10 (which value in $arrAccumulatedRates[0]), the rate of 2016-04-11 ($arrAccumulatedRates[1]), and the rate of 2016-04-12 $arrAccumulatedRates[2]); for the next night, we find the 2016-04-13 is available, so we need to sum up the night started from 2016-04-11 to 2016-04-13. The mechanism used here is while codes execution here would put the \"arr[i] = arr[i-1]\". That is, for the record of 2016-04-13, the value of $arrAccumulatedRates[1] is the rate of 2016-04-12, not the old 2016-04-11 stored while calculating 2016-04-12 night\n for($h=1; $h < $Query_minNights; $h++){\n $arrAccumulatedRates[$h-1] = $arrAccumulatedRates[$h];\n }\n $arrAccumulatedRates[$Query_minNights-1] = (int)$RoomTypeDate->rate;\n\n\t\t\t\t// Check the night is available; if not, no result stored in final, and also reset the counter of accumulated Available Nights\n if($RoomTypeDate->available > 0) {\n $accAvailableNights ++;\n\n\t\t\t\t\t// checke the accumulated nights whether fit the User request; if yes, put the accurate accumulated rates into record; else put zero as accumulation\n if ( $accAvailableNights == $Query_minNights ) {\n array_push($arrRoomDateRate, array(\"Date\" => (string)$RoomTypeDate->date, \"Rate\" => (int)$RoomTypeDate->rate, \"accRates\" => array_sum($arrAccumulatedRates)));\n $accAvailableNights --;\n }else {\n array_push($arrRoomDateRate, array(\"Date\" => (string)$RoomTypeDate->date, \"Rate\" => (int)$RoomTypeDate->rate, \"accRates\" => 0));\n }\n }else {\n $accAvailableNights = 0;\n }\n }\n\t\t\t\n if (!empty($arrRoomDateRate)) {\n // if there is no available nights meet user query, put zero into minPrice; else, put the minimum price store in the temporary object arrRoomDateRate\n\t\t\t\t// Put the temporary array objects (arrRoomDateRate) into the \"Dates\" as sub-array\n\t\t\t\tif (count(array_diff(array_column($arrRoomDateRate, \"accRates\"), array(0)))) {\n array_push($arrRoomType, array(\"RoomType\" => (string)$RoomType->name, \"minPrice\" => min(array_diff(array_column($arrRoomDateRate, \"accRates\"), array(0))), \"Dates\" => $arrRoomDateRate));\n }else{\n array_push($arrRoomType, array(\"RoomType\" => (string)$RoomType->name, \"minPrice\" => 0, \"Dates\" => $arrRoomDateRate));\n }\n }else{\n\t\t\t\t// if there is no any available single nights, put empty array in the \"Dates\"\n array_push($arrRoomType, array(\"RoomType\" => (string)$RoomType->name, \"minPrice\" => 0, \"Dates\" => []));\n }\n }\n if (!empty($arrRoomType)) {\n\t\t\t// To see whether there is any room type could meet the user query for minimum nights stay.\n\t\t\t// Put the temporary array objects (arrRoomDateRate) into the \"RoomTypes\" as sub-array\n if (count(array_diff(array_column($arrRoomType, \"minPrice\"), array(0)))) {\n array_push($arrProperty, array(\"Property\" => (string)$Property->name, \"minPrice\" => min(array_diff(array_column($arrRoomType, \"minPrice\"), array(0))), \"RoomTypes\" => $arrRoomType));\n }else{\n array_push($arrRoomType, array(\"Property\" => (string)$Property->name, \"minPrice\" => 0, \"RoomTypes\" => $arrRoomType));\n }\n }\n }\n\n /* Compose the final output HTML */\n $strHTML = \"\";\n\t// if there is no any room type has single available night\n if (empty($arrProperty)){\n $strHTML = \"<h1>Sorry! No any available rooms under your choice. The date range from \" . $strStartDate . \" to \" . $strEndDate . \", with condition of min. \" . $Query_minNights . \" Night(s) stay.</h1>\";\n }else{\n\t\t// Compose the conditions\n $strHTML = \"<h1> According to your choice, the Date Range from \" . $strStartDate . \" to \" . $strEndDate . \", with condition of min. \" . $Query_minNights . \" Night(s) stay, the best price would be: </h1>\";\n\t\t\n for($i = 0; $i < count($arrProperty); $i++) {\n\t\t\t// store the overall minimum rate in the view of Property\n $minPrice_Property = $arrProperty[$i][\"minPrice\"];\n $strHTML .= \"<h2>Property - \" . $arrProperty[$i][\"Property\"] . \", minimum $\" . $minPrice_Property . \"</h2>\";\n \n\t\t\t// if the minPrice is zero, means there is no suitable nights under user query\n\t\t\tif ($minPrice_Property==0) {$strHTML .= \" <span style='font-weight: 500; color: blue;'> !! No available night(s) in this Property !! </span>\";}\n $strHTML .= \"</h2>\";\n\t\t\t\n\t\t\t// Do the iteration to parse the array in RoomType\n $arrayRoomType_T = $arrProperty[$i][\"RoomTypes\"];\n for($j = 0; $j < count($arrayRoomType_T); $j++) {\n\t\t\t\t// store the overall minimum rate in the view of RoomType\n $minPrice_RoomType = $arrayRoomType_T[$j][\"minPrice\"];\n $strHTML .= \"<h3>Room Type - \" . $arrayRoomType_T[$j][\"RoomType\"] . \", minimum $\" . $minPrice_RoomType;\n\t\t\t\t\n\t\t\t\t// if the minPrice is zero, means there is no suitable nights under user query\n if ($minPrice_RoomType==0) {$strHTML .= \" <span style='font-weight: 500; color: blue;'> !! No available night(s) in this Room Type !! </span>\";}\n $strHTML .= \"</h3>\";\n\t\t\t\t\n\t\t\t\t// Do the iteration to parse the array in Date Rates\n $arrayRoomDateRate_T = $arrayRoomType_T[$j][\"Dates\"];\n for($k = 0; $k < count($arrayRoomDateRate_T); $k++) {\n $strHTML .= \"Date - \" . $arrayRoomDateRate_T[$k][\"Date\"] . \", $\" . $arrayRoomDateRate_T[$k][\"Rate\"];\n\n if ($Query_minNights > 1) {\n\t\t\t\t\t\t// if the value in accRates is not zero and the minimum nights user queried is more than one night, then this record should be one the possible checkout date \n if ($arrayRoomDateRate_T[$k][\"accRates\"] > 0) {\n $strHTML .= \", total Rent$\" . $arrayRoomDateRate_T[$k][\"accRates\"] . \" check-in from \" . date($strDateTimeFormat, strtotime((\"-\" . $Query_minNights . \" day\"), strtotime($arrayRoomDateRate_T[$k][\"Date\"])));\n\n\t\t\t\t\t\t\t// inidicate whether the price meets the lowest, from the view of property or room type\n if ($arrayRoomDateRate_T[$k][\"accRates\"] == $minPrice_Property){\n $strHTML .= \"<span style='font-weight: 700; color: red;'> !! Best Deal in this Property !! </span>\";\n } else if ($arrayRoomDateRate_T[$k][\"accRates\"] == $minPrice_RoomType) {\n $strHTML .= \"<span style='font-weight: 500; color: green;'> !! Cheapest Date in this Room Type !! </span>\";\n }\n }\n }else {\n\t\t\t\t\t\t// if User only query one night stay, then simply compare the minimum on Rate; inidicate whether the price meets the lowest, from the view of property or room type\n if ($arrayRoomDateRate_T[$k][\"accRates\"] == $minPrice_Property){\n $strHTML .= \"<span style='font-weight: 700; color: red;'> !! Best Deal in this Property !! </span>\";\n } else if ($arrayRoomDateRate_T[$k][\"accRates\"] == $minPrice_RoomType) {\n $strHTML .= \"<span style='font-weight: 500; color: green;'> !! Cheapest Date in this Room Type !! </span>\";\n }\n }\n\t\t\t\t\t// Make each record present in one line.\n $strHTML .= \"<br />\";\n }\n }\n }\n }\n return $strHTML;\n}", "title": "" }, { "docid": "ad9f08c8554bbc855b803424c14e525a", "score": "0.510963", "text": "public function dataFacturasTour(){\n //... IN ... simulacion de datos ........................\n $data = array();\n for($i=0; $i<5; $i++){\n $data[$i] = array(\n 'date'=> '08/04/2015',\n 'supplier_agency'=> 'MiCuba Local',\n 'supplier_name'=> 'Fatima Elena',\n 'supplier_mobile'=> '0053 52906540',\n 'supplier_phone'=> '0053 4199 6686',\n 'supplier_email'=> 'bookingcuba.micubalocal@gmail.com',\n 'client_agency'=> 'MiCuba - Reisspecialist in Cuba&nbsp;',\n 'client_address'=> 'Veembroederhof 173, 1019 HD in Amsterdam, Nl',\n 'client_mobile'=> '0031 6 442135578',\n 'client_web'=> 'www.micuba.nl',\n 'client_email'=> 'julio@micuba.nl',\n 'booking_name'=>'Renate A. Vogt ',\n 'booking_pax'=>'2548',\n 'booking_number'=>'115150178',\n 'total' => '35,00',\n 'services'=>array()\n );\n for($j=0; $j<15; $j++) {\n $data[$i]['services'][] = array(\n 'services_checkIn' => '09/04/2015',\n 'services_checkOut' => '09/04/2015',\n 'services_description' => 'CENA+BEBIDA-',\n 'services_price' => '23.00',\n 'services_total' => '25.00'\n );\n }\n }\n //... OUT ... simulacion de datos ........................\n return $data;\n }", "title": "" }, { "docid": "ecc8bc013bbf028b14d4ebf61387c5bb", "score": "0.5094966", "text": "public static function getProjectDays(){\n $pdo = new PDO_MYSQL();\n $stmt = $pdo->queryMulti(\"SELECT DATE(timestamp) AS dates FROM entrance_logs GROUP BY DATE(timestamp) ORDER BY dates\");\n $dates = [];\n while($res = $stmt->fetchObject()) {\n array_push($dates, $res->dates);\n }\n return $dates;\n }", "title": "" }, { "docid": "e283d68cdf4c4462fcda0cec22b85a05", "score": "0.50897086", "text": "function tbl_HappyMonday() {\n\n switch (COUNTRY) {\n case \"JP\":\n $tbl = array(\n // M,No,WEEK, StartYMD, EndYMD ,Public Holiday Name\n array( 1, 2, 1, 20000101, 99999999,'成人の日'),\n array( 7, 3, 1, 20030101, 99999999,'海の日'),\n array( 9, 3, 1, 20030101, 99999999,'敬老の日'),\n array(10, 2, 1, 20000101, 99999999,'体育の日'),\n );\n return $tbl;\n case \"US\":\n $tbl = array(\n array( 1, 3, 1, 00000000, 99999999,'Birthday of Martin Luther King'),\n array( 2, 3, 1, 00000000, 99999999,'President\\'s Day'),\n array( 5, 9, 1, 00000000, 99999999,'Memorial Day'), // Last Monday\n array( 9, 1, 1, 00000000, 99999999,'Labor Day'),\n array(10, 2, 1, 00000000, 99999999,'Columbus Day'),\n array(11, 9, 4, 18631101, 19401231,'Thanksgiving Day'),// Last Thursday\n array(11, 4, 4, 19410101, 99999999,'Thanksgiving Day'),\n );\n return tbl_HappyMonday_State($tbl);\n };\n\n return 0;\n}", "title": "" }, { "docid": "4ff79cc4f8dd7ab83fb80c684f664d18", "score": "0.50855196", "text": "public function userDayoffs($user_id, $start = \"\", $end = \"\") {\n $this->lang->load('calendar', $this->session->userdata('language'));\n $this->db->select('dayoffs.*');\n $this->db->join('dayoffs', 'users.contract = dayoffs.contract');\n $this->db->where('users.id', $user_id);\n $this->db->where('date >=', $start);\n $this->db->where('date <=', $end);\n $events = $this->db->get('users')->result();\n \n $jsonevents = array();\n foreach ($events as $entry) {\n switch ($entry->type)\n {\n case 1:\n $title = $entry->title;\n $startdate = $entry->date . 'T07:00:00';\n $enddate = $entry->date . 'T18:00:00';\n $allDay = TRUE;\n $startdatetype = 'Morning';\n $enddatetype = 'Afternoon';\n break;\n case 2:\n $title = lang('Morning') . ': ' . $entry->title;\n $startdate = $entry->date . 'T07:00:00';\n $enddate = $entry->date . 'T12:00:00';\n $allDay = FALSE;\n $startdatetype = 'Morning';\n $enddatetype = 'Morning';\n break;\n case 3:\n $title = lang('Afternoon') . ': ' . $entry->title;\n $startdate = $entry->date . 'T12:00:00';\n $enddate = $entry->date . 'T18:00:00';\n $allDay = FALSE;\n $startdatetype = 'Afternoon';\n $enddatetype = 'Afternoon';\n break;\n }\n $jsonevents[] = array(\n 'id' => $entry->id,\n 'title' => $title,\n 'start' => $startdate,\n 'color' => '#000000',\n 'allDay' => $allDay,\n 'end' => $enddate,\n 'startdatetype' => $startdatetype,\n 'enddatetype' => $enddatetype\n );\n }\n return json_encode($jsonevents);\n }", "title": "" }, { "docid": "7f9b413e8eafc39eb9fee4c8044ff755", "score": "0.5080704", "text": "public function sundays()\n {\n return $this->days(Schedule::SUNDAY);\n }", "title": "" }, { "docid": "e13a3496cc5826618c1f3af63d2212ae", "score": "0.50777006", "text": "public function getFeeBounds(): array;", "title": "" }, { "docid": "a341aa8768273c47e8b72481a69a42a3", "score": "0.50762635", "text": "public function weekdays()\n {\n return $this->spliceIntoPosition(5, '1-5');\n }", "title": "" }, { "docid": "207c827dddb5d646fcd0cf05fb429b8e", "score": "0.5075929", "text": "private function getAutoUnitTodaySchedule() : array\n {\n return \\App\\Models\\AutoUnit\\DailySchedule::where('systemDate', $this->systemDate)\n ->where('status', '!=', 'success')\n ->get()\n ->toArray();\n }", "title": "" }, { "docid": "b7b74b97e5d809e07ee02b86d5cad385", "score": "0.50717664", "text": "function dd_fiter_days($item_values) {\nif ($item_values == 1)\n{\nreturn true;\n}\nreturn false;\n}", "title": "" }, { "docid": "4560023bb7f204fc9b7f34c3dd141f14", "score": "0.50681204", "text": "public function getLocalHolidays($year)\n {\n return array_merge(\n parent::getLocalHolidays($year),\n $this->getReformationDay($year),\n $this->getRepentanceDay($year)\n );\n }", "title": "" }, { "docid": "6d3c2a76f424e3035f6ceceae21cc2a1", "score": "0.5064816", "text": "function mkWeekDays()\r\n {\r\n $out = '';\r\n if ($this->startOnSun) {\r\n if ($this->mostrar_semanas) {\r\n\r\n $out .=\"<tr class=\\\"\".$this->cssWeekDay.\"\\\"><td>\".\"Sem\".\"</td>\";\r\n }\r\n $out.='<td>'.$this->getDayName(0).'</td>';\r\n $out.='<td>'.$this->getDayName(1).'</td>';\r\n $out.='<td>'.$this->getDayName(2).'</td>';\r\n $out.='<td>'.$this->getDayName(3).'</td>';\r\n $out.='<td>'.$this->getDayName(4).'</td>';\r\n $out.='<td>'.$this->getDayName(5).'</td>';\r\n $out.='<td>'.$this->getDayName(6).\"</td></tr>\\n\";\r\n } else {\r\n if ($this->mostrar_semanas) {\r\n $out .=\"<tr class=\\\"\".$this->cssWeekDay.\"\\\"><td>\".'Sem'.'</td>';\r\n //$out .=\"<tr style=\\\"\".'background-color:rgba(0,51,255,0.75);color:white;'.\"\\\"><td>\".'Sem'.'</td>';\r\n }\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(1).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(2).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(3).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(4).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(5).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(6).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(0).\"</td></tr>\\n\";\r\n $this->firstday=$this->firstday-1;\r\n if ($this->firstday<0) {\r\n $this->firstday=6;\r\n }\r\n }\r\n return $out;\r\n }", "title": "" }, { "docid": "bbc2ab203f502846e85bbd9a88a90c1e", "score": "0.5061015", "text": "function Feriados($ano, $posicao) {\n $dia = 86400;\n $datas = array();\n $datas['pascoa'] = easter_date($ano);\n $datas['sexta_santa'] = $datas['pascoa'] - (2 * $dia);\n $datas['carnaval'] = $datas['pascoa'] - (47 * $dia);\n $datas['corpus_cristi'] = $datas['pascoa'] + (60 * $dia);\n $feriados = array(\n '01/01',\n '02/02', // Navegantes\n date('d/m', $datas['carnaval']),\n date('d/m', $datas['sexta_santa']),\n date('d/m', $datas['pascoa']),\n '21/04',\n '01/05',\n date('d/m', $datas['corpus_cristi']),\n '07/09',\n '20/09', // Revolução Farroupilha \\m/\n '12/10',\n '02/11',\n '15/11',\n '25/12',\n );\n\n return $feriados[$posicao] . \"/\" . $ano;\n}", "title": "" }, { "docid": "382d027006132b1703e0bac58f65aaa1", "score": "0.506067", "text": "public function getCalendarDates()\n {\n $zendData = new Zend_Date();\n\n $currentDate = $zendData->getDate();\n\n $data['start'] = $currentDate->addDay('1')->getIso();\n $data['end'] = $currentDate->addDay('7')->getIso();\n\n return $data;\n }", "title": "" } ]
0878be5ce43192c7600ee45ffe93ca61
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
[ { "docid": "bd39d0ae0ef089ed0d3c49ca92ff5862", "score": "0.0", "text": "public static function model($className=__CLASS__)\n\t{\n\t\treturn parent::model($className);\n\t}", "title": "" } ]
[ { "docid": "9816d7bf330a9e21d8b3599d73f2e74c", "score": "0.7271581", "text": "public static function model($className=__CLASS__) { return parent::model($className); }", "title": "" }, { "docid": "9816d7bf330a9e21d8b3599d73f2e74c", "score": "0.7271581", "text": "public static function model($className=__CLASS__) { return parent::model($className); }", "title": "" }, { "docid": "b89513e64e5fcdd2618d48b9a2356e70", "score": "0.72703993", "text": "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "title": "" }, { "docid": "b89513e64e5fcdd2618d48b9a2356e70", "score": "0.72703993", "text": "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "title": "" }, { "docid": "dc82aa86202161768bd4e3cfd7d69625", "score": "0.714373", "text": "public static function model ($class_name=__CLASS__) {\n return parent::model($class_name);\n }", "title": "" }, { "docid": "ed2f419ac31ca0239077f167b618e992", "score": "0.71287453", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "ed2f419ac31ca0239077f167b618e992", "score": "0.71287453", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "ed2f419ac31ca0239077f167b618e992", "score": "0.71287453", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.7102495", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.7102495", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "833872b2fd4f50222f701e21dea28627", "score": "0.71009284", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "1716587f85e87b40024fbd9d29ea137d", "score": "0.70919555", "text": "public static function model($className = __CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "1716587f85e87b40024fbd9d29ea137d", "score": "0.70919555", "text": "public static function model($className = __CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "336543304aa3b8efb7089b878a8b7a70", "score": "0.7077301", "text": "public static function model($className = __CLASS__) {\r\n return parent::model($className);\r\n }", "title": "" }, { "docid": "a5414ed4c55e4ebe1d6b0848b59bd4ad", "score": "0.7074701", "text": "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.7064163", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" } ]
649cae20651fed960f37e55470304522
Rollback the active database transaction.
[ { "docid": "250111d74836ca6eb0a66de51c76799a", "score": "0.81097114", "text": "public function rollback();", "title": "" } ]
[ { "docid": "98e4205b1b81f13db5d2d08770468206", "score": "0.85958165", "text": "public function rollbackTransaction() {\n\t\t$connection = $this->db->getConnection();\n\t\t$connection->rollback();\n\t}", "title": "" }, { "docid": "d65f6fc270df32db27655c8cfc8911d6", "score": "0.8509975", "text": "public static function rollback()\n {\n self::$db->rollback();\n }", "title": "" }, { "docid": "1cd01f35a5af331351aff91660813544", "score": "0.8497442", "text": "public function rollback() {\n $this->db->rollback();\n }", "title": "" }, { "docid": "055a3305449d035785f8bd22dd1f3a3c", "score": "0.83646995", "text": "public function rollbackTransaction();", "title": "" }, { "docid": "6b0f865e98330af7d88a54df644bb6a4", "score": "0.8346786", "text": "public static function rollback_transaction() {\n\t\tDatabase::instance()->rollback();\n\t}", "title": "" }, { "docid": "09c36db9c47e2d69051eb700430791ba", "score": "0.83434945", "text": "protected function dbRollbackTransaction()\n {\n DB::rollback();\n }", "title": "" }, { "docid": "22b22226b1de8f81b35777cb179a5156", "score": "0.83389074", "text": "public function rollback()\n {\n db2_rollback($this->db);\n db2_autocommit($this->db, $this->autocommit);\n }", "title": "" }, { "docid": "b7cae9ba7223e92ef2aa41d766311083", "score": "0.82601374", "text": "public static function rollback()\n {\n self::getConnection()->rollback();\n }", "title": "" }, { "docid": "b455199708f4c60b830cecfd0412f6de", "score": "0.8226592", "text": "public function transactionRollback()\n {\n $this->getEntityManager()->getConnection()->rollback();\n }", "title": "" }, { "docid": "05305c532f40187c57f3c80aa3ce52be", "score": "0.8219586", "text": "public function rollback() {\n $this->query('ROLLBACK',0);\n }", "title": "" }, { "docid": "06bdc9bd6d2074cc0b2299299b5a56f3", "score": "0.8208157", "text": "public function rollback()\n\t{\n\t\tif ($this->active && $this->connection->getActive()) {\n\t\t\t\\Yii::trace('Rolling back transaction', __CLASS__);\n\t\t\t$this->connection->pdo->rollBack();\n\t\t\t$this->active = false;\n\t\t}\n\t\telse {\n\t\t\tthrow new Exception('Transaction is inactive and cannot perform roll back operation.');\n\t\t}\n\t}", "title": "" }, { "docid": "e8963d4c0dd6e98559c86a3da2fe7116", "score": "0.8172897", "text": "public function rollbackTransaction()\r\n\t{\r\n\t\t$this->Connection->rollback();\r\n\t\t$this->Connection->autocommit(true);\r\n\t}", "title": "" }, { "docid": "3094e092d45ad101b35bf6d311f8fc72", "score": "0.81722325", "text": "public function rollback()\n {\n if (!$this->beginTriggered) {\n throw new DatabaseException(\"Cannot roll back. Not in transaction.\");\n }\n\n // Roll back all started transactions\n foreach ($this->connections as $name => $connection) {\n if ($connection->inTransaction()) {\n $connection->rollBack();\n }\n }\n\n // End global transaction\n $this->beginTriggered = false;\n }", "title": "" }, { "docid": "c00cd82cf3ea07d54e8e7125d6a47f92", "score": "0.8163856", "text": "public function rollbackTransaction() {}", "title": "" }, { "docid": "c00cd82cf3ea07d54e8e7125d6a47f92", "score": "0.8163856", "text": "public function rollbackTransaction() {}", "title": "" }, { "docid": "b0fb78f791ba29997585cec70eecc8eb", "score": "0.81610096", "text": "public function rollback()\n {\n $this->connection->rollback();\n }", "title": "" }, { "docid": "a48866d9c1ecafb69e37f7a686e2a255", "score": "0.8100697", "text": "function rollback() {\n\t\t$this->_conn->rollback();\n\t}", "title": "" }, { "docid": "36d78f777488232f6dee57500128cdc0", "score": "0.80853945", "text": "public function rollback()\n {\n DB::rollback();\n }", "title": "" }, { "docid": "39a846cd017959baf2cc81995e3100f6", "score": "0.8009777", "text": "public function rollbackTransaction() {\r\n\t\tif (!$this->isInTransaction) {\r\n\t\t\tthrow new DatabaseException('Cannot rollback - not in a transaction');\r\n\t\t}\r\n\t\t$this->conn->rollback();\r\n\t\t$this->conn->autocommit(true);\r\n\t\t$this->isInTransaction=false;\r\n\t}", "title": "" }, { "docid": "26ea336617fe30a6a08c414ec94ba527", "score": "0.7906465", "text": "public function rollbackTransaction()\n\t{\n\t\tif ( $this->m_oTransaction ) \n\t\t{\n\t\t\t$this->m_oTransaction->rollBack();\n\t\t\t$this->m_oTransaction = null;\n\t\t}\n\t}", "title": "" }, { "docid": "189246d43e1d372b20683b17d00d6b86", "score": "0.78457654", "text": "protected function _rollback() {\n if($this->inTxn) {\n $dbc = $this->getDataSource();\n $dbc->rollback();\n \n $this->inTxn = false;\n }\n }", "title": "" }, { "docid": "d0c338fa193b50f6e419ecaf3c005b0e", "score": "0.78421944", "text": "public abstract function rollbackTransaction();", "title": "" }, { "docid": "0dce7010e244306dc1c2e2799b6136f4", "score": "0.7833379", "text": "public function rollback() { return $this->db_handle->rollback($this->db_handle); }", "title": "" }, { "docid": "d0314b1001a6d3b28ab0c9d8d7cdb65f", "score": "0.78147286", "text": "public function transactionRollback()\n {\n if (!$this->connection) {\n throw new ConnectionException('No database connection');\n }\n $this->connection->rollBack();\n }", "title": "" }, { "docid": "5c3b46cc012dce0cf0b307631d6f6761", "score": "0.7808637", "text": "public function rollback () {}", "title": "" }, { "docid": "540cf0e6ddb80e7de7d07e974c539b0d", "score": "0.7774262", "text": "public function rollback() {\n \n $this->_inTransaction = !mysql_query(\"ROLLBACK\", $this->_link);\n }", "title": "" }, { "docid": "729ab7de616264c3ce83e965be42fc5f", "score": "0.7768867", "text": "public function rollback()\n {\n $this->db->query('ROLLBACK');\n\n throw new TransactionHaltException();\n }", "title": "" }, { "docid": "bd923f8a3ec22e4620ad7959d7f26251", "score": "0.77479476", "text": "public static function rollback(){\n return self::$_database->rollback();\n }", "title": "" }, { "docid": "9cfe4060dda4d31bfa6f3d23253faa21", "score": "0.77425694", "text": "public function rollbackTransaction()\n {\n }", "title": "" }, { "docid": "b2186013217d7059cd6e6bc62e559f2a", "score": "0.7734527", "text": "public function rollbackTransaction(): void;", "title": "" }, { "docid": "2504979bf3cb731cd72564e5f10f5b2a", "score": "0.76772004", "text": "public function rollbackTrans()\n {\n try{\n $this->impl->rollbackTrans();\n log_debug( \"debug,smart_gateway,sql\", \"done: rollbackTrans\" );\n }\n catch ( Exception $e )\n {\n _catch( $e, TRUE );\n _throw( new Charcoal_DBRollbackTransactionException( __METHOD__.\" Failed.\", $e ) );\n }\n }", "title": "" }, { "docid": "02e64b1ced16df5f34bc5efd1e294b47", "score": "0.76668763", "text": "public function rollback(){\n\n if($this->lockEnable)\n {\n $this->lockEnable = false;\n return $this->pdo->rollBack();\n }\n }", "title": "" }, { "docid": "1b5ba4160f206a5106d79978b3d0f5b1", "score": "0.7662012", "text": "public function rollback ()\n {\n try {\n $this->conn->rollback();\n $this->conn = null;\n } catch (PDOException $e) {\n throw new DBException($e->getMessage(), $e->getCode());\n }\n }", "title": "" }, { "docid": "86da6146a955a20cd45089d9f6fe3cbe", "score": "0.76519006", "text": "abstract public function rollback();", "title": "" }, { "docid": "efa26dc1099d9975bacba89388dd8ef4", "score": "0.7615106", "text": "public function rollback() {\n\t\treturn $this->db->rollBack();\n\t}", "title": "" }, { "docid": "11bd65abab0b89f286dd6248f65265f4", "score": "0.75981945", "text": "public static function rollback()\n {\n if (self::$conn[self::$counter])\n {\n $driver = self::$conn[self::$counter]->getAttribute(PDO::ATTR_DRIVER_NAME);\n if ($driver !== 'dblib')\n {\n // rollback\n self::$conn[self::$counter]->rollBack();\n }\n self::$conn[self::$counter] = NULL;\n self::$counter --;\n }\n }", "title": "" }, { "docid": "46c0da590371e516b6bfa64ae6ff8d34", "score": "0.75917447", "text": "public function executeRollback() {}", "title": "" }, { "docid": "91771ab984ab019308aeb20e0be0eed6", "score": "0.7583341", "text": "protected function rollback() {\n }", "title": "" }, { "docid": "8076953d681a1d7c6d34626166df609f", "score": "0.75818795", "text": "public function rollBackTransaction(){\n\t\t$this->db->rollBack();\n\t}", "title": "" }, { "docid": "4c56deaf33dd37169a7f364dd533658e", "score": "0.7564567", "text": "function rollback()\n {\n // TODO: Implement rollback() method.\n }", "title": "" }, { "docid": "0302b779b521f2a8b2341cf150f6cb3b", "score": "0.7547541", "text": "public function rollback()\r\n {\r\n }", "title": "" }, { "docid": "daac932a2ef9c20274c3d1c7dfbd679b", "score": "0.75225425", "text": "public function rollback()\n {\n\n return $this->query(\" ROLLBACK \");\n }", "title": "" }, { "docid": "68c40a8ec1a225285d3fd875c5f4e667", "score": "0.75204784", "text": "public function rollback(): void\n {\n if ($this->isFinalized) {\n return;\n }\n\n $this->driver->getPdo()->rollBack();\n $this->isFinalized = true;\n }", "title": "" }, { "docid": "58b217ecd78fd0d695c3120697629007", "score": "0.7484561", "text": "public function rollbackDbTransaction()\n {\n $result = $this->_write->rollbackDbTransaction();\n $this->_lastQuery = $this->_write->getLastQuery();\n return $result;\n }", "title": "" }, { "docid": "75167b2b0ee0adee631685f9456c8b38", "score": "0.7467055", "text": "public function rollback() {\r\n\r\n\t\tif (! $this->connected) {\r\n\t\t\t$this->connect ();\r\n\t\t}\r\n\r\n\t\tif (!mysqli_rollback($this->dbHandle)) {\r\n\t\t\tthrow new dbException( mysqli_error ($this->dbHandle), mysqli_errno ($this->dbHandle) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d4542130850fc29a80586d8488790467", "score": "0.7454012", "text": "public static function rollback()\n {\n try {\n \\OxidEsales\\Eshop\\Core\\DatabaseProvider::getDb()->rollbackTransaction();\n } catch (\\Exception $e) {\n WalleeModule::log(Logger::ERROR, \"UNABLE TO ROLLBACK: {$e->getMessage()} - {$e->getTraceAsString()}.\");\n }\n }", "title": "" }, { "docid": "58a6cd1eaf7236c014a4738623ea7f3a", "score": "0.7411785", "text": "abstract function rollback();", "title": "" }, { "docid": "58a6cd1eaf7236c014a4738623ea7f3a", "score": "0.7411785", "text": "abstract function rollback();", "title": "" }, { "docid": "58a6cd1eaf7236c014a4738623ea7f3a", "score": "0.7411785", "text": "abstract function rollback();", "title": "" }, { "docid": "592390bca847ba6e2fa43ce033336186", "score": "0.73858196", "text": "public function rollBack()\n {\n if ($this->_active_transactions == 1) {\n $this->_pdo->rollBack();\n $this->_transaction = false;\n }\n $this->_active_transactions--;\n }", "title": "" }, { "docid": "a3591d5dfd9262adcc53a3bfc728e287", "score": "0.73710597", "text": "public function rollback()\n {\n $this->db->drop(static::updateTableName());\n $this->db->rename(static::backupTableName(), static::runtimeTableName(), static::updateTableName());\n }", "title": "" }, { "docid": "4c8e4892913296dad43f4f397d8c449b", "score": "0.7356546", "text": "function rollback() {}", "title": "" }, { "docid": "5c1f8932630a991ee6870ef0526f1793", "score": "0.73495144", "text": "public function rollback()\n\t{\n\t\t// One less is referencing this transaction\n\t\t$this->_transactionRefcount--;\n\n\t\tif (!$this->_isTransactionRolledBack) {\n\t\t\t// We have not rolled back yet. Rollback now instead of waiting for\n\t\t\t// refcount to reach 0 to avoid \"leaks\".\n\t\t\t// Try-and-catch is suggested in http://support.microsoft.com/kb/309335\n\t\t\ttry {\n\t\t\t\tparent::rollBack();\n\t\t\t\t$this->_transactionIsolationLevel = null;\n\t\t\t} catch (Exception $e) {\n\t\t\t\t// Gargara\n\t\t\t}\n\t\t}\n\n\t\t// Mark as rolled back for as long as somebody is referencing this transaction\n\t\t$this->_isTransactionRolledBack = ($this->_transactionRefcount > 0);\n\t}", "title": "" }, { "docid": "568418722047bd460fe2e571cc27c3fd", "score": "0.73327726", "text": "public function rollBack()\n {\n # Make sure we have a connection\n if ($this->pdo !== null)\n {\n # Roll back the records and start a new transaction\n $this->pdo->rollBack();\n $this->pdo->beginTransaction();\n }\n }", "title": "" }, { "docid": "8837b33c3184e25e0bc58060e7380d12", "score": "0.73266697", "text": "public function rollbackTransaction(): void\n {\n }", "title": "" }, { "docid": "9687ba24dd79fccb7070159d8b6ac27d", "score": "0.73249334", "text": "abstract protected function rollback();", "title": "" }, { "docid": "7b25b1b887e9e5b02bcadbc0203bdd8e", "score": "0.7311775", "text": "public function rollback() {\n // my code\n }", "title": "" }, { "docid": "4252569f8569fd42bac1f86b914de6b4", "score": "0.7300294", "text": "public static function rollBack() {\n static::$db[static::$activeConnection]->rollBack();\n }", "title": "" }, { "docid": "2e1698264dbaa0ba6f88a87e40251ef1", "score": "0.7296258", "text": "public function rollback() {\n\t\t$this->reset();\n\t}", "title": "" }, { "docid": "057abfa31969b35eccdb80af43c150db", "score": "0.7292939", "text": "function transactionRollback($id);", "title": "" }, { "docid": "ba1e6b7cfd99639591569031988d97b2", "score": "0.72780263", "text": "public function rollback()\n {\n if (!$this->conn) {\n throw new NoDatabaseConnectionException(\n 'Cannot rollback transaction. No database connection found.'\n );\n }\n\n pg_query($this->conn, 'ROLLBACK');\n\n $this->close();\n }", "title": "" }, { "docid": "98de80392d697170ece289db25d8f2cf", "score": "0.7269089", "text": "public function rollbackTransaction(array $request);", "title": "" }, { "docid": "ef2e7315286d41e1a0fcd9ea10a08288", "score": "0.7256919", "text": "public function rollback() {\n\t\treturn $this->connection->query(\"ROLLBACK;\");\n\t}", "title": "" }, { "docid": "f6593a5ca253608bdeff4c6eb5a9617b", "score": "0.7249926", "text": "public function rollBack()\n {\n if ($this->inTransaction()) {\n parent::rollBack();\n }\n }", "title": "" }, { "docid": "81120ad8f19cc8c7665dae29275411d4", "score": "0.72417325", "text": "public function transRollback()\n\t{\n\t\treturn($this->sqlconn->rollBack());\n\t}", "title": "" }, { "docid": "aaca1c80d1e222a539d1a7a179006f4c", "score": "0.72365844", "text": "public function rollBack(){\n $this->_tableTransaction->getAdapter()->rollBack();\n }", "title": "" }, { "docid": "8f3dde9c278e1f7aa03fdaa8fd92611b", "score": "0.71914834", "text": "public static function rollBack () {\n\t\tif(self::$inTransaction)\n\t\t\tself::getInstance()->rollBack();\n\t\tself::$inTransaction = false;\n\t}", "title": "" }, { "docid": "959523705a1d1e4f1683681e237982b2", "score": "0.7180772", "text": "public function rollBackTransaction()\n\t{\n\t\tif(!$this->pdoConnection->rollBack())\n\t\t{\n\t\t\tthrow new RelationalSqlException(\"Unable to rollback transactions for unknown reasons\");\n\t\t}\n\t}", "title": "" }, { "docid": "d313b0039858dfefd58aca273b753b10", "score": "0.71559376", "text": "public function rollback()\n {\n if (!$this->mysqli->rollback()) {\n throw new CannotRollbackException('Rollback error');\n }\n }", "title": "" }, { "docid": "42411af8fb81c4fa506b378177e3d633", "score": "0.7150063", "text": "public function rollback($tx = NULL) {\n if (!$tx) {\n $tx = $this->getTransaction();\n }\n $tx->rollback();\n }", "title": "" }, { "docid": "e2b82224c07def5605c8bad6a4e0fc91", "score": "0.7144153", "text": "function rollback_tran() {\n\t\tif ($this->_inTransaction()) {\n\t\t\t$this->tran--;\n\t\t\t$this->_commit = OCI_COMMIT_ON_SUCCESS;\n\t\t}\n\t\t\n\t\treturn oci_rollback($this->conn_id);\n\t}", "title": "" }, { "docid": "e61024320a7ae0f2370a7542501eb201", "score": "0.7120123", "text": "function rollbackdTransaction(){\r\n return mysqli_rollback($this->m_db);\r\n }", "title": "" }, { "docid": "3b4a084e512dc22a7ae8ccf0823e6b34", "score": "0.71143866", "text": "abstract protected function _rollback();", "title": "" }, { "docid": "1299416d494a16f47cc9731938e54979", "score": "0.71101743", "text": "public function actionRollback()\n\t{\n\t\t$this->requirePostRequest();\n\t\t$this->requireAjaxRequest();\n\n\t\t$data = craft()->request->getRequiredPost('data');\n\t\t$handle = $this->_getFixedHandle($data);\n\n\t\tif ($this->_isManualUpdate($data))\n\t\t{\n\t\t\t$uid = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$uid = $data['uid'];\n\t\t}\n\n\t\tif (isset($data['dbBackupPath']))\n\t\t{\n\t\t\t$return = craft()->updates->rollbackUpdate($uid, $handle, $data['dbBackupPath']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$return = craft()->updates->rollbackUpdate($uid, $handle);\n\t\t}\n\n\t\tif (!$return['success'])\n\t\t{\n\t\t\t// Let the JS handle the exception response.\n\t\t\tthrow new Exception($return['message']);\n\t\t}\n\n\t\t$this->returnJson(array('alive' => true, 'finished' => true, 'rollBack' => true));\n\t}", "title": "" }, { "docid": "145fed6ebc084d9a432765de06c2d3d0", "score": "0.704335", "text": "public function rollBack ( );", "title": "" }, { "docid": "830c0e387e7f5120adb88580cc352b3a", "score": "0.7039522", "text": "public function rollback()\n {\n /** @var MDbConnection $connection */\n $connection = $this->getConnection();\n if ($connection->emulateNestedTransaction) {\n self::$nestedCount--;\n if ($this->index == 0) {\n parent::rollback();\n }\n } else {\n parent::rollback();\n }\n }", "title": "" }, { "docid": "fbfa39fd0dd893fd5dd11f554e7749cb", "score": "0.70195276", "text": "public function rollback($savepoint = null);", "title": "" }, { "docid": "9dc9b45d3a06b065e8f0a35b53da9f19", "score": "0.70193493", "text": "public function rollback($id);", "title": "" }, { "docid": "3519ed597503fbc2fcff2503822758a4", "score": "0.6970141", "text": "public function rollback()\n {\n if (!$this->getConnection()->getTransactionLevel()) {\n return false;\n }\n\n return $this->getConnection()->rollback();\n }", "title": "" }, { "docid": "4337eeda1fe82201dab69ade73d53de9", "score": "0.6963187", "text": "function rollback($result) {\n $this->connection=RollbackTrans();\n}", "title": "" }, { "docid": "c41824faf35241207b47962267827495", "score": "0.6938479", "text": "public function rollBack() {\n\t\t$this->pdoConn->rollBack();\n\t}", "title": "" }, { "docid": "799379e4ab678ac733df40a659eb6df8", "score": "0.68762213", "text": "public final function TransactionRollBack() {\n $this->ExecuteTransactionRollBack();\n $this->intTransactionDepth = 0;\n }", "title": "" }, { "docid": "4c68b1770b5a2c9504f44083cb3cf97f", "score": "0.6874065", "text": "public function getSqlRollbackTransaction();", "title": "" }, { "docid": "b253e28772cfa6061a799c4e1d4fc343", "score": "0.6871015", "text": "function RollbackTransaction() {\n @mysqli_query($this->c_ConnectStat, \"ROLLBACK\");\n $this->c_Message->SetMessage(7);\n }", "title": "" }, { "docid": "3dd820409d8cb8c42f664588407aee69", "score": "0.6870316", "text": "function db_rollback()\n{\n db_query('ROLLBACK');\n db_query('SET AUTOCOMMIT=1');\n}", "title": "" }, { "docid": "232dd804d6caf91efd67f6fd3a0d0ceb", "score": "0.68485963", "text": "public function Rollback()\r\n {\r\n return sqlsrv_rollback($this->conn);\r\n }", "title": "" }, { "docid": "4ec7b973c74307a7c5ae16d939e19280", "score": "0.6847005", "text": "function ibase_rollback ($link_or_trans_identifier = null) {}", "title": "" }, { "docid": "c8d713fd3b6c5c702cd50691a5bdae05", "score": "0.6834943", "text": "public function cancel(){\n if($this->start_flag==1){\n $this->dbh->rollback();\n $this->start_flag =0;\n }\n else throw new Exception (\"An error occured without rolling back the last query\");\n }", "title": "" }, { "docid": "7699659563b249bc3494bdece096843b", "score": "0.6833642", "text": "public function rollBack(): void\n\t{\n\t\tif ($this->transactions === 1) {\n\t\t\tif ($this->getPDO()->rollBack()) {\n\t\t\t\tLog::sql(\"{$this->configKey}>>>PDO rollBack\");\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Can not commit PDO transaction for adapter={$this->getConfigKey()}\");\n\t\t\t}\n\t\t}\n\n\t\t$this->transactions--;\n\t}", "title": "" }, { "docid": "a1e9b743183a3fd1da979d53a7ea5879", "score": "0.6829701", "text": "function ocirollback($conn) {}", "title": "" }, { "docid": "d4f7f34f0c4d3a084a11808ea52616fe", "score": "0.68274903", "text": "public function rollbackTransaction()\n\t{\n\t\tif ( $this->myTransactionFlag>0 ) {\n\t\t\tif ( --$this->myTransactionFlag == 0 ) {\n\t\t\t\t$this->myModel->db->rollBack();\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6f10180fb9a45c08a5c9cf2ac9c750e6", "score": "0.68023205", "text": "public function rollback()\n{ \n\n // Get connection\n $conn = $this->get_connection('write');\n\n // Rollback transaction\n if (!mysqli_rollback($conn)) { \n throw new DBException('rollback');\n }\n\n //EwReturnr\n return true;\n \n}", "title": "" }, { "docid": "4774e9c8faaf07962a8eee03231edbda", "score": "0.6796176", "text": "public function cancelTransaction(){\n if($this->transaction){\n $this->pdo->rollback();\n $this->transaction = false;\n }\n }", "title": "" }, { "docid": "118e32525fa829eaea6da1f6cf6b0e5a", "score": "0.67952496", "text": "public function rollBack()\n {\n --$this->currentTransactionLevel;\n if ($this->currentTransactionLevel == 0 || !$this->nestable()) {\n parent::rollBack();\n } else {\n $this->exec(\"ROLLBACK TO SAVEPOINT LEVEL{$this->currentTransactionLevel}\");\n }\n }", "title": "" }, { "docid": "6298b8504d925ea3798dc64b787b5ff9", "score": "0.67918223", "text": "public function rollback()\n {\n return null;\n }", "title": "" }, { "docid": "f37b554d3b79a135d0b1c9194c6dfe37", "score": "0.67791367", "text": "abstract protected function ExecuteTransactionRollBack();", "title": "" } ]
4bf077a1d3b8185f964fce691c153d3b
Convert a floating point number to the whole and the decimal
[ { "docid": "cb392f04708ce34e4c7219b02018f0ef", "score": "0.0", "text": "public function float2parts(float $number, bool $returnUnsigned = false): array\n {\n $negative = 1;\n if ($number < 0) {\n $negative = -1;\n $number *= -1;\n }\n\n if ($returnUnsigned) {\n return [\n floor($number),\n $number - floor($number),\n ];\n }\n\n return [\n floor($number) * $negative,\n ($number - floor($number)) * $negative,\n ];\n }", "title": "" } ]
[ { "docid": "d41c4346e46abe0bb47261d35c1da59d", "score": "0.7268291", "text": "function toDecimal($value){\r\n if(isFormatoReal($value)){\r\n $result = floatval(str_replace(',', '.', str_replace('.', '', $value)));\r\n return (float) $result;\r\n }else{\r\n return (float) $value;\r\n }\r\n}", "title": "" }, { "docid": "27fd5dc7f235cdfe19fdc9c272f24229", "score": "0.67464495", "text": "public function rtnFloat($number){\n $temp = str_replace(',', '.', str_replace('.', '', $number));\n\n return $temp;\n }", "title": "" }, { "docid": "ab851b979463ff0f00928ec3fdea6569", "score": "0.6623488", "text": "function tofloat($num) {\n $dotPos = strrpos($num, '.');\n $commaPos = strrpos($num, ',');\n $sep = (($dotPos > $commaPos) && $dotPos) ? $dotPos : \n ((($commaPos > $dotPos) && $commaPos) ? $commaPos : false);\n\n if (!$sep) {\n return floatval(preg_replace(\"/[^0-9]/\", \"\", $num));\n } \n\n return floatval(\n preg_replace(\"/[^0-9]/\", \"\", substr($num, 0, $sep)) . '.' .\n preg_replace(\"/[^0-9]/\", \"\", substr($num, $sep+1, strlen($num)))\n );\n }", "title": "" }, { "docid": "eac7b59252a83fdc9ed86d7bd4d84992", "score": "0.652601", "text": "function float_number($value)\n{\n return $number = number_format($value, 2);\n}", "title": "" }, { "docid": "66132e4dc0f0b3eabe3dfa8070f51ffd", "score": "0.6464203", "text": "function two_decimal($number){\r\n return number_format((float)$number, 2, '.', '');\r\n}", "title": "" }, { "docid": "2b0120056b8c46af19c56a34a558cb73", "score": "0.6449024", "text": "function two_decimal($number)\n{\n return number_format((float)$number, 2, '.', '');\n}", "title": "" }, { "docid": "dee8eb2167ee31fd05274d5ffa2dee7c", "score": "0.6430453", "text": "function get_float($value) {\r\n\treturn sprintf (\"%.2f\", $value);\r\n}", "title": "" }, { "docid": "5e238f788f8c3159b43d5da951286c54", "score": "0.6417489", "text": "function fixFloat($val,$dec){\r\n /* val = 1.23123213 -> 1.2 mode = 0*/\r\n return intval(pow(10,$dec)*$val)/pow(10,$dec);\r\n }", "title": "" }, { "docid": "47dabb0e76c8731117fba154c305a63e", "score": "0.6408896", "text": "function stringToDecimalConversion($string)\n{\n return number_format((float)$string, 2, '.', '');\n}", "title": "" }, { "docid": "ad02903f35311405b39b256b870925f6", "score": "0.63382083", "text": "function convert(float $value, string $from, string $to): float;", "title": "" }, { "docid": "785f25694ba6626165526b0427f14ac9", "score": "0.6307384", "text": "public function toFloat(): float;", "title": "" }, { "docid": "e2f5c632a0d8d7abb7a8b6f05b49c88f", "score": "0.62028843", "text": "function ae_floatvalue( $value ) {\n\n\t$value = preg_replace(\"/[^0-9,.]/\", \"\", $value);\n\t$value = str_replace(',', '.', $value);\n\treturn number_format( floatval($value), 2, '.', '' );\n}", "title": "" }, { "docid": "072035f43d8658f185647d452357798a", "score": "0.61969036", "text": "function bcconv($fNumber)\n{\n $sAppend = '';\n $iDecimals = ini_get('precision') - floor(log10(abs($fNumber)));\n if (0 > $iDecimals)\n {\n $fNumber *= pow(10, $iDecimals);\n $sAppend = str_repeat('0', -$iDecimals);\n $iDecimals = 0;\n }\n return number_format($fNumber, $iDecimals, '.', '').$sAppend;\n}", "title": "" }, { "docid": "c4548a6b261f4951ac15cbb36fe7f48c", "score": "0.61849284", "text": "function truncateFloat($number, $digitos)\r\n{\r\n $raiz = 10;\r\n $multiplicador = pow ($raiz,$digitos);\r\n $resultado = ((int)($number * $multiplicador)) / $multiplicador;\r\n return number_format($resultado, $digitos);\r\n \r\n}", "title": "" }, { "docid": "ff364a466f9273e91ff85d6080abc5cd", "score": "0.6170127", "text": "function conv_from_f($value) {\n $newtemp = (5.0/9.0)*($value-32);\n return $newtemp;\n}", "title": "" }, { "docid": "b7d9a569ca6d1661b2d66412fc48eda0", "score": "0.61563736", "text": "function fNumber($number, $decimals = 0)\n{\n\treturn number_format($number, $decimals, Core::getLang()->getItem(\"DECIMAL_POINT\"), Core::getLang()->getItem(\"THOUSANDS_SEPERATOR\"));\n}", "title": "" }, { "docid": "f82047910f0d8646f0e997adb11c5440", "score": "0.61459655", "text": "function fl($b) {\r\n\treturn number_format(floor(\t$b) , 2, ',','.');\r\n}", "title": "" }, { "docid": "92cc05b283c9e6ed39423baa1c155fe3", "score": "0.6131294", "text": "static function format_float($number, $num_decimals = 2)\n {\n return number_format($number, $num_decimals, '.', '');\n }", "title": "" }, { "docid": "8d16ed38aa0faa99075c22bce691d483", "score": "0.6093788", "text": "function to_float($amount)\n {\n return Moip\\Helper\\Utils::toFloat($amount);\n }", "title": "" }, { "docid": "c7f6da4d26eaee87d178e0e38307f468", "score": "0.6074126", "text": "function convert($var_dec, $precision)\n {\n return floor($var_dec*(10**$precision))/10**$precision;\n }", "title": "" }, { "docid": "03b1bc4b3c5e986620816f6cc9864306", "score": "0.60697997", "text": "function decToFraction($float) {\n // 9/16, 11/16, 13/16, 15/16\n $whole = floor ( $float );\n $decimal = $float - $whole;\n $leastCommonDenom = 48; // 16 * 3;\n $denominators = array (2, 3, 4, 8, 16, 24, 48 );\n $roundedDecimal = round ( $decimal * $leastCommonDenom ) / $leastCommonDenom;\n if ($roundedDecimal == 0)\n return $whole;\n if ($roundedDecimal == 1)\n return $whole + 1;\n foreach ( $denominators as $d ) {\n if ($roundedDecimal * $d == floor ( $roundedDecimal * $d )) {\n $denom = $d;\n break;\n }\n }\n return ($whole == 0 ? '' : $whole) . \" \" . ($roundedDecimal * $denom) . \"/\" . $denom;\n}", "title": "" }, { "docid": "eb1b2307efa510c7cda3bc03c4cca5bf", "score": "0.60572124", "text": "protected static function decimal($float) {\n return number_format(round($float, 2), 2, '.', '');\n }", "title": "" }, { "docid": "057da1f29de5c51a85eaedcd8a12538d", "score": "0.5990855", "text": "function func_roundidndg( $float, $precision ) \n{ \n // $float is really a float value here! \n // e.g. $float === 3.0249999999; \n $float = round( $float*100 )/100; \n return $float; \n}", "title": "" }, { "docid": "adb9a38fa5cd0cde63ba8708dc531a59", "score": "0.59714305", "text": "public static function priceToFloat($s)\n {\n // convert \",\" to \".\"\n $s = str_replace(',', '.', $s);\n\n // remove everything except numbers and dot \".\"\n $s = preg_replace(\"/[^0-9\\.]/\", \"\", $s);\n\n // remove all seperators from first part and keep the end\n $s = str_replace('.', '',mb_substr($s, 0, -3)) . mb_substr($s, -3);\n\n // return float\n return (float) $s;\n }", "title": "" }, { "docid": "f1b099d3575fec560031c3989028428c", "score": "0.59708124", "text": "function ToFloat($value){\n\t\n\tif(is_numeric($value)){\n\t\tif(is_int($value)){\n\t\t\treturn \"0.$value\";\n\t\t}\n\t\treturn $value; // should be a float already\n\t}else{\n\t\tdie('ToFloat($value) only accepts NUMBERS.');\n\t}\t\n}", "title": "" }, { "docid": "8e5d58fbc3c94fdeb66665879a7c302c", "score": "0.5937543", "text": "function dsf_round($number, $precision) {\n if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.')+1)) > $precision)) {\n $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1);\n\n if (substr($number, -1) >= 5) {\n if ($precision > 1) {\n $number = substr($number, 0, -1) + ('0.' . str_repeat(0, $precision-1) . '1');\n } elseif ($precision == 1) {\n $number = substr($number, 0, -1) + 0.1;\n } else {\n $number = substr($number, 0, -1) + 1;\n }\n } else {\n $number = substr($number, 0, -1);\n }\n }\n\n return $number;\n }", "title": "" }, { "docid": "ddd4a7216c37e7f1018d6f0e74cc5228", "score": "0.5907041", "text": "function priceToFloat($s)\n{\n $s = str_replace(',', '.', $s);\n\n // remove everything except numbers and dot \".\"\n $s = preg_replace(\"/[^0-9\\.]/\", \"\", $s);\n\n // remove all seperators from first part and keep the end\n $s = str_replace('.', '',substr($s, 0, -3)) . substr($s, -3);\n\n // return float\n return (float) $s;\n}", "title": "" }, { "docid": "a335ce51954ee674bb264b28c8a4badc", "score": "0.5903176", "text": "public function sql_float($num){\n\t\t// stripping out all but numers and separators\n\t\t$decimal_point = $this->getLocaleInfo('decimal_point');\n\t\t$thousands_sep = $this->getLocaleInfo('thousands_sep');\t\t\n\t\t$pattern = \"[^0-9\".$decimal_point.$thousands_sep.\"]\";\n\t\t$num = trim($num);\n\t\t$num = preg_replace(\"/\".$pattern.\"/\", \"\", $num);\n\t\tif(empty($num)) return 0;\n\t\t$exp = preg_split(\"/[\".$decimal_point.$thousands_sep.\"]/\", $num);\n\t\t$dec = array_pop($exp);\n\t\t$int = implode(\"\", $exp);\n\t\treturn $int.\".\".$dec;\n\t}", "title": "" }, { "docid": "a21e22d798a174d31ef2ea49a8a9a294", "score": "0.58549774", "text": "function convertNum($x){\n\treturn number_format($x, 2, '.', ',');\n}", "title": "" }, { "docid": "453ebf31721ce0949df22aa12fe3fe98", "score": "0.5852366", "text": "function toPointFloat($comma_float) {\n\t$float = str_replace(\".\", \"\", $comma_float);\n\t$float = str_replace(\",\", \".\", $float);\n\t$point_float = round($float, 2);\n\treturn $point_float;\n}", "title": "" }, { "docid": "afd3aec0cceda08a5a4adae5fb69c835", "score": "0.58259577", "text": "public function getAmountAsFloat(): float\n {\n return $this->amount / 100;\n }", "title": "" }, { "docid": "514f8cc9f26c28723c895ce8f73657ed", "score": "0.58128387", "text": "public static function moneyToFloat($money)\n {\n $money = str_replace('.', '', $money);\n $money = str_replace(',', '.', $money);\n return $money;\n }", "title": "" }, { "docid": "1e627b4f32e22071e2ad6bdde8d160a4", "score": "0.58095473", "text": "protected function _formatFloat($value) {\n return number_format($value, 2, '.', '');\n }", "title": "" }, { "docid": "4f9b45029cdb367eab2fd5bd7dc7e5d1", "score": "0.5801632", "text": "public static function float($val) {\r\n\t\treturn (is_numeric($val) ? floatval($val) : 0.0);\r\n\t}", "title": "" }, { "docid": "45baca0a8f26194b74c5113a1b845c90", "score": "0.57742286", "text": "function adverts_filter_float( $data ) {\n return filter_var( $data, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );\n}", "title": "" }, { "docid": "225f4d2a9291d5337610e544101f2e45", "score": "0.57732266", "text": "function tep_round($number, $precision) {\n if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.')+1)) > $precision)) {\n $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1);\n\n if (substr($number, -1) >= 5) {\n if ($precision > 1) {\n $number = substr($number, 0, -1) + ('0.' . str_repeat(0, $precision-1) . '1');\n } elseif ($precision == 1) {\n $number = substr($number, 0, -1) + 0.1;\n } else {\n $number = substr($number, 0, -1) + 1;\n }\n } else {\n $number = substr($number, 0, -1);\n }\n }\n\n return $number;\n }", "title": "" }, { "docid": "6137bb1391cb639a2f26ac09b6713ddb", "score": "0.57686967", "text": "public function getConvertedAmount(): float\n {\n return round($this->amount * $this->getRate(), $this->builder->getDefaultRoundTo());\n }", "title": "" }, { "docid": "39a2c19e2094b20a4944a6653d08222c", "score": "0.57606745", "text": "function tep_round($number, $precision) {\n// {{\n if (abs($number) < (1 / pow(10, $precision + 1))) $number = 0;\n// }}\n if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.') + 1)) > $precision)) {\n $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1);\n\n if (substr($number, -1) >= 5) {\n if ($precision > 1) {\n $number = substr($number, 0, -1) + ('0.' . str_repeat(0, $precision-1) . '1');\n } elseif ($precision == 1) {\n $number = substr($number, 0, -1) + 0.1;\n } else {\n $number = substr($number, 0, -1) + 1;\n }\n } else {\n $number = substr($number, 0, -1);\n }\n }\n\n return $number;\n}", "title": "" }, { "docid": "36adab04673906ce2ec0629e9ce20137", "score": "0.5757672", "text": "static function FixFloat($float) {\r\n if ($float - (int) $float >= 0.9999) {\r\n return ceil($float);\r\n } else {\r\n return $float;\r\n }\r\n }", "title": "" }, { "docid": "92a62c469852105a4906b5981958b985", "score": "0.5756121", "text": "public static function float($value)\n {\n return floatval($value);\n }", "title": "" }, { "docid": "3f966e06df9d8645bfed3ec2f34b2373", "score": "0.5751932", "text": "public function convertToNumeric(&$number) {\n $number = (double) $number;\n }", "title": "" }, { "docid": "570b4b957e99f2b6c7576626c92f7df1", "score": "0.5739136", "text": "private function roundResult($commissionFee) \n {\n //float 8611.41\n $whole = floor($commissionFee); // 8611\n $fraction = ($commissionFee - $whole) * 100; // 41\n\n $commissionFee = $commissionFee;\n\n if($whole > 0)\n {\n if($fraction > 0)\n {\n $commissionFee = $whole + 1;\n }\n else\n {\n $commissionFee = $whole;\n }\n } \n \n $test = is_float($this->oamount + 0);\n \n if($test > 0)\n {\n return number_format(round($commissionFee, 3), 2, '.', ''); ;\n }\n else\n {\n return $commissionFee;\n }\n \n }", "title": "" }, { "docid": "e1a17e97e9c59b85dc686bd3b95c0e68", "score": "0.5733645", "text": "protected function filterFloat($value) {\n\t\t\treturn round($value, 2);\n\t\t}", "title": "" }, { "docid": "8d628f7a632e8b00a3924ea6b62bab41", "score": "0.5728307", "text": "static function toNumber($value) {\n\t$result = '' . $value;\n\t$minus = preg_match('/\\-/',$result);\n\t$result = preg_replace('/[^0-9.]/','',$result);\n\tif ($result == '') $result = 0.0;\n\t$result = 0.0 + $result;\n\tif ($minus) $result *= -1.0;\n\treturn $result;\n\t}", "title": "" }, { "docid": "2735ac0e6c1182ff8a8aa41f138561ba", "score": "0.5720502", "text": "function _float($field) {\n\t\n\t\t$checkValue = $this->data[$field];\n\t\t//echo $checkValue;\n\t\t//if(ereg('^[0-9](\\.\\d+)?$', $checkValue)) {\n\t\tif(ereg('^[0-9]*\\.[0-9]+|[0-9]+)$', $checkValue)) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9790538f5689b211b342f72dfd97d804", "score": "0.5712705", "text": "function convert_price_tx($n, $asset2_dec, $asset1_dec = 8)\n{\n $price = ($n / 10 ** (8 + ($asset2_dec - $asset1_dec)));\n\n return $price;\n //then number_format($price, 8, '.', ',');\n}", "title": "" }, { "docid": "c36b5ebc2ed9603add82f28283f9ecbe", "score": "0.5686422", "text": "function truncate($val, $f = '2') {\n if (($p = strpos($val, '.')) !== false) {\n $val = floatval(substr($val, 0, $p + 1 + $f));\n }\n return $val;\n }", "title": "" }, { "docid": "acc714454dc62861e3224c4f4d542096", "score": "0.5684892", "text": "private static function convert(float $value, float $fromFactor, float $toFactor): float\n {\n //====================================================================//\n // Convert Source to Base Unit then Apply Target Factor\n return $value * ($toFactor / $fromFactor);\n }", "title": "" }, { "docid": "6429446b638fa02e12d51bbb8be21bd1", "score": "0.56716686", "text": "function si_get_number_format( $value = 1, $dec_point = '.', $thousands_sep = '' ) {\n\t$fraction = ( is_null( $dec_point ) || ! $dec_point ) ? 0 : 2 ;\n\treturn apply_filters( 'si_get_number_format', number_format( floatval( $value ), $fraction, $dec_point, $thousands_sep ), $value );\n}", "title": "" }, { "docid": "d8fa8d603eea77150d1729a83f7d0a96", "score": "0.56712604", "text": "private function formatDecimalValue(float $number, NumberFormatSection $section): string\n {\n $format_left = str_replace(',', '', $section->getFormatLeft());\n $format_right = str_replace(',', '', $section->getFormatRight());\n\n // Handle thousands scaling.\n if ($section->getThousandsScale() > 0) {\n $number /= pow(1000, $section->getThousandsScale());\n }\n\n // Apply maximum characters behind decimal symbol limit.\n $number = number_format((float) $number, strlen($format_right), '.', '');\n\n // Remove minus sign for now, as it requires explicit handling.\n $number = str_replace('-', '', $number);\n\n // Remove insignificant zeroes for now, we will (re-)add them based on format_info next.\n if (strpos($number, '.') !== false) {\n $number = rtrim($number, '0');\n }\n\n // Split number into pre-decimal and post-decimal.\n $number_parts = explode('.', $number);\n\n // Handle left side of decimal point.\n $number_left = $this->mergeValueIntoNumericalFormat($number_parts[0], $format_left);\n\n // Handle right side of decimal point. (Can't use mergeValueIntoNumericalFormat() here.)\n $number_right = '';\n if (count($number_parts) > 1) {\n $right_side_chars = str_split($number_parts[1]);\n\n if (!empty($right_side_chars) && $right_side_chars[0] === '') { // Side-effect of str_split('') under PHP<=8.1\n $right_side_chars = array();\n }\n $format_chars = str_split(str_replace('?', ' ', $format_right));\n if (!empty($right_side_chars) && $format_chars[0] === '') { // Side-effect of str_split('') under PHP<=8.1\n $format_chars = array();\n }\n for ($i = 0; $i < strlen($format_right); $i++) {\n if (isset($right_side_chars[$i])) {\n $number_right .= $right_side_chars[$i]; // Add digit here.\n } elseif ($format_chars[$i] !== '#') {\n $number_right .= $format_chars[$i]; // Add filler character here.\n }\n }\n }\n\n $number = $number_left . ($number_right !== '' ? ('.' . $number_right) : '');\n\n // Place thousands separators.\n if ($section->useThousandsSeparators()) {\n $number_parts = explode('.', $number);\n $number_left = $number_parts[0];\n $number_left_with_separators = '';\n while (strlen($number_left) > 3) {\n if (substr($number_left, -4, 1) === ' ') {\n // Handle edge case: format: [?,000], value: [123], result: [ 123], wrong: [ 123], also wrong: [ ,123]\n $number_left_with_separators = ' ' . substr($number_left, -3) . $number_left_with_separators;\n } else {\n // No edge case, just add the separator character.\n $number_left_with_separators = ',' . substr($number_left, -3) . $number_left_with_separators;\n }\n $number_left = substr($number_left, 0, strlen($number_left) - 3);\n }\n $number_left_with_separators = $number_left . $number_left_with_separators;\n if (count($number_parts) > 1) {\n $number = $number_left_with_separators . '.' . $number_parts[1];\n } else {\n $number = $number_left_with_separators;\n }\n }\n\n // Edge-case: Commas at start of decimal format are non-functional and must be output as-is.\n if (preg_match('{^(,+)}', $section->getFormatLeft(), $matches)) {\n $number = $matches[1] . $number;\n }\n\n return $number;\n }", "title": "" }, { "docid": "9ac29e48277eb85ed8a76efd45f4d149", "score": "0.5671135", "text": "function is_decimal( $val )\n{\n return is_numeric( $val ) && floor( $val ) != $val;\n}", "title": "" }, { "docid": "95796f8beae971b7f673de5c990d975b", "score": "0.5670479", "text": "function toCommaFloat($point_float) {\n\t$comma_float = number_format($point_float, 2, \",\", \".\");\n\treturn $comma_float;\n}", "title": "" }, { "docid": "b277c6e73ce84d1115ec254412144b11", "score": "0.5635004", "text": "private function getFloat($var) {\n if(is_float($var)) {\n return $var;\n }\n else {\n return floatval($var);\n }\n }", "title": "" }, { "docid": "e93b27ab1605a233dabe6db4287fe314", "score": "0.5631138", "text": "function numeric_price_format($val)\n {\n $new_val = number_format($val,'2','.',',');\n return $new_val;\n }", "title": "" }, { "docid": "d5784c9812591fe96b630537e4e4ef2d", "score": "0.5620312", "text": "function curr_format($string) {\r\n\t\treturn number_format((float)$string, 2, '.', '');\r\n\t}", "title": "" }, { "docid": "837fd6021eb8ce71b8f7a4af02b36585", "score": "0.5616816", "text": "public function onlyFloat($v)\n {\n return filter_var($v, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n }", "title": "" }, { "docid": "63463ccf74dc588ba30cadb2557a61f6", "score": "0.56114596", "text": "function formatFloat($float) {\n return (float) str_replace(\",\", \"\", $float);\n}", "title": "" }, { "docid": "2ab31e23f638f75dffcfb651e3d515af", "score": "0.5587494", "text": "function modificaNumericValor($valor) {\r\n $valor = number_format ( $valor, 2, ',', '.' );\r\n return $valor;\r\n }", "title": "" }, { "docid": "273d96d6e588f4736aff7223eb6a1955", "score": "0.55863214", "text": "public function toDecimalString() {\n\t\treturn $this->toFloatString();\n\t}", "title": "" }, { "docid": "c31cbd020dea07e89f8d3fd5497001b5", "score": "0.55840355", "text": "public function floatVal(): float\n {\n if (!isset($this->_float)) {\n $m = $this->_mantissa->intVal();\n $e = $this->_exponent->intVal();\n $this->_float = (float) ($m * pow($this->_base, $e));\n }\n return $this->_float;\n }", "title": "" }, { "docid": "a5dd4906369d393180270516a73c5288", "score": "0.5569459", "text": "public static function convertMoedaToFloat($numero){ \r\n \r\n $valor=\"\";\r\n //verifica se existe virgula na string\r\n if(strpos($numero, ',')){ \r\n $source = array('.', ','); \r\n $replace = array('', '.'); \r\n $valor = str_replace($source, $replace, $numero); //remove os pontos e substitui a virgula pelo ponto \r\n }\r\n return $valor; //retorna o valor formatado para gravar no banco \r\n }", "title": "" }, { "docid": "5118712f22ec2c881ed15869d5fc6557", "score": "0.5564971", "text": "private static function ensureDecimal(string $s): string\n {\n return strpos($s, '.') === false ? ($s . '.0') : $s;\n }", "title": "" }, { "docid": "4e636b23ad1d934b3a41ee4a3758b793", "score": "0.5559785", "text": "public function testString2Float()\n {\n $oUtils = oxRegistry::getUtils();\n $fFloat = $oUtils->string2Float(\"10.322,32\");\n $this->assertEquals($fFloat, 10322.32);\n $fFloat = $oUtils->string2Float(\"10,322.32\");\n $this->assertEquals($fFloat, 10322.32);\n $fFloat = $oUtils->string2Float(\"10322,32\");\n $this->assertEquals($fFloat, 10322.32);\n $fFloat = $oUtils->string2Float(\"10322.32\");\n $this->assertEquals($fFloat, 10322.32);\n $fFloat = $oUtils->string2Float(\"10.32225\");\n $this->assertEquals($fFloat, 10.32225);\n $fFloat = $oUtils->string2Float(\"10 000.32225\");\n $this->assertEquals($fFloat, 10000.32225);\n $fFloat = $oUtils->string2Float(\"10 000.00\");\n $this->assertEquals($fFloat, 10000);\n }", "title": "" }, { "docid": "450bc30eb366c094d1cbb09d1dc40808", "score": "0.555565", "text": "function Getfloat($str) {\n\t if(is_null($str) )\n\t \t$str = '0';\n\t \n\t if(strstr($str, \",\")) {\n\t $str = str_replace(\".\", \"\", $str); \n\t $str = str_replace(\",\", \".\", $str); \n\t }\n\n\t if(!is_numeric($str) )\n\t \t$str = '0';\n\t \n\t if(preg_match(\"#([0-9\\.]+)#\", $str, $match)) { \n\t $return=floatval($match[0]);\n\t }else{\n\t $return=floatval($str); \n\t }\n\t \n\t if($return == '') $return='0.00';\t \t\n\t return $return;\t \t\n\t}", "title": "" }, { "docid": "b204e95ec6128d0f520bd7965b4b73f5", "score": "0.55552673", "text": "public function convertComaNumberToFloat(string $number): float\n {\n return (float) str_replace(',', '.', $number);\n }", "title": "" }, { "docid": "8da752cb1ea0e2afaad30d281c10de27", "score": "0.55336034", "text": "public function parseFloat($value) {\n return floatval(preg_replace(\"/[^0-9\\.\\-]/\",\"\",$value));\n }", "title": "" }, { "docid": "4aedc23b4b62e0c9c21879d1e63aec0e", "score": "0.5530542", "text": "function money($num){\n\t$num = round($num, 2);\n\t$num = number_format((float)$num, 2, '.', '');\n\treturn $num;\n}", "title": "" }, { "docid": "9a7d597675d79041f49b22b89c725564", "score": "0.55220914", "text": "public function floatToFraction($float, $tolerance = 1.e-6)\n {\n if (!$this->_isFloat($float)) {\n return 0;\n }\n\n $h1 = 1;\n $h2 = 0;\n $k1 = 0;\n $k2 = 1;\n $b = 1 / $float;\n\n do {\n $b = 1 / $b;\n $a = floor($b);\n $aux = $h1;\n $h1 = $a * $h1 + $h2;\n $h2 = $aux;\n $aux = $k1;\n $k1 = $a * $k1 + $k2;\n $k2 = $aux;\n $b = $b - $a;\n } while (abs($float - $h1 / $k1) > $float * $tolerance);\n\n if (true && ($h1 == $k1)) {\n return $h1;\n }\n\n return $h1.'/'.$k1;\n }", "title": "" }, { "docid": "1d0f42932150c4b0c1e9b041e9c0f328", "score": "0.551674", "text": "function convert_price($n, $asset2_dec, $asset1_dec = 8)\n{\n $price = ($n / 10 ** (8 - ($asset2_dec - $asset1_dec)));\n\n return number_format($price, 8, '.', ',');\n}", "title": "" }, { "docid": "e2f0c0b7435393666162ed88f0f79954", "score": "0.55087554", "text": "public function getFractionDigits();", "title": "" }, { "docid": "b4e34699470fec7b4b2d1c49c726dcbd", "score": "0.55087537", "text": "function _float ($in) {\n\tif (is_array($in)) {\n\t\treturn array_map(\n\t\t\tfunction ($in) {\n\t\t\t\treturn (float)$in;\n\t\t\t},\n\t\t\t$in\n\t\t);\n\t}\n\treturn (float)$in;\n}", "title": "" }, { "docid": "4401351fb2386aa968e9ded72ee830b0", "score": "0.54995644", "text": "public function float();", "title": "" }, { "docid": "6302d3a2eb190118d7dabce2889f55be", "score": "0.54970783", "text": "public function fractionToFloat($fraction, $precision = 4)\n {\n if ($this->_isFloat($fraction)) {\n return $fraction;\n }\n\n if ($this->_isFraction($fraction)) {\n list($numerator, $denominator) = explode('/', $fraction);\n\n $float = $numerator / ($denominator ? $denominator : 1);\n\n return round($float, $precision);\n }\n\n return 0;\n }", "title": "" }, { "docid": "f0a263f35533c04b5f4669c15f471e3d", "score": "0.54854965", "text": "function rationalToFloat($rational)\n\t{\n\t\t$arr = explode(\"/\", $rational);\n\t\tif(count($arr) > 1)\n\t\t{\n\t\t\treturn trim($arr[0]) / trim($arr[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $rational;\n\t\t}\n\t}", "title": "" }, { "docid": "58459a51ad3dc5ed4a02c32910db3c78", "score": "0.5482191", "text": "function conv_from_c($value) {\n $newtemp = (((9.0/5.0)*$value)+32);\n return $newtemp;\n}", "title": "" }, { "docid": "2262cd42796dcb8433ca2f9d325966bb", "score": "0.54799217", "text": "public function toDecimalString() : string;", "title": "" }, { "docid": "5980498ba5facba574c018c5d81b9fbe", "score": "0.54799014", "text": "private function convertToFloat($value)\n {\n $retval = 0.0;\n if (is_scalar($value) || (is_object($value) && method_exists($value, '__toString'))) {\n // intermediate step that will cast an object into a string.\n if (is_object($value)) {\n $value = (string) $value;\n }\n \n // cast to float.\n $retval = (float) $value;\n }\n \n return $retval;\n }", "title": "" }, { "docid": "9bc1c182de8209cffe88d0b69c67dec1", "score": "0.5477982", "text": "function commify(?float $num, int $decimals = 0, ?string $decimal_separator = '.', ?string $thousands_separator = ','): string\n{\n return number_format($num ?? 0.0, $decimals, $decimal_separator, $thousands_separator);\n}", "title": "" }, { "docid": "c39d8af0605eb58ef196a98ca4f8c4ca", "score": "0.5470605", "text": "public static function CtoF ($decValue) {\r\n return $decValue * 1.8 + 32;\r\n\r\n }", "title": "" }, { "docid": "d08d7b9d20cc496dd8839b80c38ab0f2", "score": "0.54672796", "text": "public static function convertFloatToMoeda($numero){\r\n //numero é o valor a ser trabalhado\r\n //2 é a quantida de casas decimais\r\n //, é o separador decimal\r\n //. é o separador de milhar\r\n return number_format($numero, 2, ',', '.');\r\n }", "title": "" }, { "docid": "55b7fe3083e2b8b00135b7f86764a7cf", "score": "0.5462937", "text": "public static function float($key)\n {\n return static::make($key)->asFloat();\n }", "title": "" }, { "docid": "fa2081fbf09a6bf96d33a25662eb7c45", "score": "0.5461607", "text": "function long_to_dotted_decimal($long)\n{\n $long = (int)$long;\n return ($long >> 24 & 0xFF) . '.' . ($long >> 16 & 0xFF) . '.' . ($long >> 8 & 0xFF) . '.' . ($long & 0xFF);\n}", "title": "" }, { "docid": "2e689af44e2d96f2b4787c6f671ae1a8", "score": "0.5458286", "text": "public function float_to_string($value) {\n\t\tif(!is_float($value)) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$locale = localeconv();\n\t\t$string = strval($value);\n\t\t$string = str_replace($locale['decimal_point'], '.', $string);\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "d6516eb5e82878071913f65f780e231a", "score": "0.54570425", "text": "function convert_amount_tx($n, $asset2_dec, $asset1_dec = 8)\n{\n $amount = ($n / 10 ** (8 - ($asset2_dec - $asset1_dec)));\n\n return $amount;\n //then number_format($amount, 8, '.', ',');\n}", "title": "" }, { "docid": "c6730553970daaa4d76c25da287a0441", "score": "0.5456831", "text": "private function _assertFloat($value)\n {\n return floatval($value);\n }", "title": "" }, { "docid": "7d48d4cf6504bf18fa1131bfd7b08e4d", "score": "0.54532737", "text": "static public function is_whole_number($var){\n return (is_numeric($var)&&(intval($var)==floatval($var)));\n }", "title": "" }, { "docid": "71185c84004a9020782883a78dca633d", "score": "0.5452661", "text": "public static function convert($number)\n {\n $number = preg_replace('/\\,/i', '', $number);\n\n $number = preg_replace('/([^0-9\\.\\-])/i', '', $number);\n\n if (! is_numeric($number)) {\n return '0.00';\n }\n\n $isCents = (bool) preg_match('/^0.\\d+$/', $number);\n\n return ($isCents ? '0' : null).number_format($number * 100., 0, '.', '');\n }", "title": "" }, { "docid": "7635c98ec1622aa7a115d12759e14dd9", "score": "0.54495806", "text": "function wffloatval($val)\n{\n\t$fVal = floatval(str_replace(\",\", \".\", $val));\n\t$valEnd = substr($val, -2);\n\tif ($valEnd == \"KB\")\n\t{\n\t\t$fVal = $fVal * 1024;\n\t}\n\telseif ($valEnd == \"MB\")\n\t{\n\t\t$fVal = $fVal * 1048576;\n\t}\n\telseif ($valEnd == \"GB\")\n\t{\n\t\t$fVal = $fVal * 1073741824;\n\t}\n\treturn $fVal;\n}", "title": "" }, { "docid": "95dd86a2efff29a32e6351697f048c65", "score": "0.5445572", "text": "public function testNumeric(float $variable): float\n {\n return $variable;\n }", "title": "" }, { "docid": "6f2c3c77a79e2d79c4f77229102d51c4", "score": "0.54445547", "text": "public function readFloat() {\n $int = $this->readInteger();\n $dec = $this->readInteger();\n \n return floatval($int.'.'.$dec);\n }", "title": "" }, { "docid": "88413dbed524454c76e4d7051c5b5a27", "score": "0.5440492", "text": "function formatMoney($number, $fractional = false) \n\t{ \n\t\tif ($fractional) \n\t\t{ \n\t\t\t$number = sprintf('%.2f', $number); \n\t\t} \n\t\twhile (true) \n\t\t{ \n\t\t\t$replaced = preg_replace('/(-?\\d+)(\\d\\d\\d)/', '$1.$2', $number); \n\t\t\tif ($replaced != $number) \n\t\t\t{ \n\t\t\t\t$number = $replaced; \n\t\t\t} \n\t\t\telse \n\t\t\t{ \n\t\t\t\tbreak; \n\t\t\t} \n\t\t} \n \treturn $number; \n\t}", "title": "" }, { "docid": "9d04da95ba095470f8b4721363d651a5", "score": "0.54392034", "text": "public static function toFixed(float $source, int $digits = 0): float\n {\n return \\round($source, $digits, \\PHP_ROUND_HALF_UP);\n }", "title": "" }, { "docid": "4cf6509955e7244fd9e3b9d1c9a539fd", "score": "0.54338473", "text": "public static function getReal($var)\n {\n if (is_numeric($var)) {\n return strval(number_format((float)$var, 2, '.', ''));\n }\n }", "title": "" }, { "docid": "443b9a1ef46761ad6ec41ed2038b3862", "score": "0.5432701", "text": "function bytesToDollars($bytes) {\n $dollars = round($bytes / 1000000000 * 0.15, 4);\n return $dollars;\n}", "title": "" }, { "docid": "1032583e7d052e454cff1d8e941270f3", "score": "0.54323184", "text": "function convert_amount($n, $asset2_dec, $asset1_dec = 8)\n{\n $amount = ($n / 10 ** (8 + ($asset2_dec - $asset1_dec)));\n\n return number_format($amount, 8, '.', ',');\n}", "title": "" }, { "docid": "37dbca39ef4e3d27c34474f8e71d829e", "score": "0.54320437", "text": "function SoloformatearDinero($valor){\n\t\t//no se debe usar para grabar valores en la base ..\n\t\t//no agrega el simbolo pesos $\n\t\treturn number_format(floatval($valor), 2, ',', '.');\n\t}", "title": "" }, { "docid": "25bf7b210e5ec94d25a64fa634e71843", "score": "0.54318565", "text": "public function testGetDoubleAndDecimalSame()\n {\n //TODO: this is wrong, decimal must be a string that can be handled with the bc_math extension\n $prop = $this->node->getNode('numberPropertyNode/jcr:content')->getProperty('longNumber');\n $double = $prop->getDouble();\n $decimal = $prop->getDecimal();\n $this->assertEquals($double, $decimal);\n }", "title": "" }, { "docid": "6d05a49da575dc6f2c840e1d9dc679d8", "score": "0.5426737", "text": "static public function mysql_float_conversion($int, $digits_after_decimal = 2)\r\n\t{\r\n\t\t$divider = pow(10, $digits_after_decimal);\r\n\t\t$int = $int / $divider;\r\n\t\treturn number_format($int, $digits_after_decimal);\r\n\t}", "title": "" }, { "docid": "21fe43b85e01465f9f8f9ba45c0b69b6", "score": "0.5426603", "text": "public static function decimal($value): bool\n {\n return static::float($value);\n }", "title": "" }, { "docid": "005bb5c0c7262c67d29620d201dd8b01", "score": "0.54003954", "text": "function isTrueFloat($val) \n{ \n\t$pattern = '/^[+-]?(\\d*\\.\\d+([eE]?[+-]?\\d+)?|\\d+[eE][+-]?\\d+)$/'; \n\treturn (!is_bool($val) && (is_float($val) || preg_match($pattern, trim($val)))); \n}", "title": "" }, { "docid": "98ae1f80db53b44047646e29d214e6a6", "score": "0.53993237", "text": "function price_format($price) {\n\n $fraction = explode('.', $price);\n $cents = substr($fraction[0], (strlen($fraction[0])-2), strlen($fraction[0]));\n $number = substr($fraction[0], 0, (strlen($fraction[0])-2));\n if(strlen($cents) == 1) {\n\treturn number_format($number.'.0'.$cents, 2, ',', '.').'.'.$fraction[1];\n }\n else {\n return number_format($number.'.'.$cents, 2, ',', '.').'.'.$fraction[1];\n }\n\n}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "ce675102ce17e8b49f9d77ec228842b8", "score": "0.0", "text": "public function store(CreatePostRequest $request)\n {\n $user = Auth::user();\n\n $input = $request->all();\n\n if($file = $request->file('photo_id')){\n\n $name = $file->getClientOriginalName();\n\n\n $file->move('images', $name); // public/image folder\n //$name = 'posts/' . $name;\n\n $photo = Photo::create(['path' => $name]); // put the image path in the photo DB\n\n $input['photo_id'] = $photo->id; // put the photo id in the Users table\n\n }\n\n // This works.\n /*$input['user_id'] = $user->id;\n Post::create($input);*/\n\n $user->posts()->create($input);\n\n return redirect('admin/posts');\n }", "title": "" } ]
[ { "docid": "66fc929ce2208598ecac269021e7947f", "score": "0.72289926", "text": "public function store()\n {\n // Use the parent API to save the resource\n $object = $this->api()->store();\n\n // Redirect back with message\n return $this->back('created', ['id' => $object->id])\n ->with('message', $this->message('created') );\n }", "title": "" }, { "docid": "bbc87396bab9e03eae11f7a5d70bb9f4", "score": "0.70448303", "text": "public function store(ResourceCreateRequest $request)\n {\n if($resource = Resource::create($request->all()))\n {\n if ($request->hasFile('document')) {\n $file = $request->document;\n $path = Storage::putFile('files/resources', $file);\n $resource->file = $path;\n $resource->save();\n }\n SweetAlert::success('Resource created successfully', 'Resource Created');\n }\n else\n {\n SweetAlert::error('Resource was not created. Please correct your errors.', 'Oops!');\n return back();\n }\n return redirect('admin/resources');\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "39bea6da81fe955b5bc1e31916165a92", "score": "0.6423722", "text": "public function store(Request $request)\n {\n $this->validate($request, Resource::getValidationRules());\n $input = $request->all();\n $resource = Resource::create([\n 'type' => $input['type'],\n 'data' => $input['data'],\n 'description' => $input['description'],\n 'author_id' => $request->user()->id,\n ]);\n $resource->save();\n // return view('resources.show', ['resource' => $resource]);\n return redirect()->route('resources.show', ['id' => $resource->id]);\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "48a4f5d82e2ca95f2db842758d31ad70", "score": "0.63516957", "text": "public function store(CreateResourcesRequest $request)\n\t{\n\t\t$input = $request->all();\n\n\t\t$input['objectId'] = 'Reses'.str_random(10);\n\n\t\tif($request->file('author_img_path')){\n\t\t\t$image = $this->uploadImage($request->file('author_img_path'),'/authors_photo/');\n\t\t\t$input['author_img_path'] = $image['resize_url'][0];\n\t\t}\n\t\tif($request->file('resource_icon_img')){\n\t\t\t$image = $this->uploadImage($request->file('resource_icon_img'),'/resources_photo/');\n\t\t\t$input['resource_icon_img'] = $image['resize_url'][0];\n\t\t}\n\n\t\t$resources = $this->resourcesRepository->create($input);\n\n\t\tFlash::success('Resources saved successfully.');\n\n\t\treturn redirect(route('resources.index'));\n\t}", "title": "" }, { "docid": "df49e7e65ee574fc2aeeafed99804329", "score": "0.6347012", "text": "public function store()\n {\n $sanitized = request()->all();\n return new $this->resource($this->manager->storeOrUpdate($sanitized));\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "1a7c92f08b68523de94392129a6ddb87", "score": "0.0", "text": "public function destroy($id)\n {\n $templateDelete = Template::find( $id );\n $result = $templateDelete->delete();\n\n if($result) {\n $massage = 'Deleted template';\n return successResponse($result, $massage);\n }else{\n $massage = \"Error\";\n $error =$result;\n return errorResponse($error, $massage);\n }\n }", "title": "" } ]
[ { "docid": "97c51cab4a2ebd0c97c646aca8926260", "score": "0.7629593", "text": "public function remove(ResourceInterface $resource);", "title": "" }, { "docid": "2b9d2c85f4c5a3ea90f0276710558864", "score": "0.73587126", "text": "public function removeResource(ResourceInterface $resource);", "title": "" }, { "docid": "f3145913d36c871004ac569d3ea3b842", "score": "0.68346053", "text": "public function remove()\n {\n /** Not needed in this storage */\n }", "title": "" }, { "docid": "4899cb69f473bc3ba1f4a04f43330487", "score": "0.67682105", "text": "public function delete($resource, $id);", "title": "" }, { "docid": "0339cc54ab464d5806494f53b7d84761", "score": "0.66848737", "text": "public function destroy(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "52c1a7c30e906794e889381e09749736", "score": "0.63817745", "text": "public function delete(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "5a5e27d4baf0a8d48a3ac4cd3f04c3ed", "score": "0.6287119", "text": "function removeStorage($imgName,$storagePath){\n return Storage::delete($storagePath.\"/\".$imgName);\n }", "title": "" }, { "docid": "dbe827e5c99e979e1cb815eddd797184", "score": "0.6278533", "text": "public function destroy($id)\n {\n// Storage::delete('file.jpg');\n }", "title": "" }, { "docid": "78c3b7fd0c00f45a9e6a8a5f6ed56a7a", "score": "0.6199108", "text": "protected function removeResourceAndThumbnailsByResource(Resource $resource)\n {\n // delete from database\n $this->deleteThumbnailsByResource($resource);\n\n $resource->disableLifecycleEvents();\n $this->persistenceManager->remove($resource);\n }", "title": "" }, { "docid": "64fdd6f4d9385414cdb313161249d8ec", "score": "0.6190533", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.6125602", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "9a3fb17518efe8911c9caa31836bf58e", "score": "0.6083851", "text": "public function destroy($id)\n {\n //\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return redirect()->route('admin.specificate.storage.index');\n }", "title": "" }, { "docid": "0d390882ed3b7497dc5a3ef5f578179f", "score": "0.6073157", "text": "function cleanup_resource($request_path, $created_resource)\n {\n $this->emit_detail(\"Cleaning up (DELETE) Resource {$request_path}/{$created_resource['id']}\");\n $this->assert_api_delete(\"{$request_path}/{$created_resource['id']}\");\n }", "title": "" }, { "docid": "5eb527f9c836748cdd39d6f19527a3bc", "score": "0.6071406", "text": "public function destroy(Resource $resource) {\n $resource->delete();\n return redirect()->route('admin.resources.index')->with('success', 'Resource deleted!');\n }", "title": "" }, { "docid": "2bc45e3efcdaeea24d7871374eee5196", "score": "0.606356", "text": "public function delete(): void\n {\n $absoluteFolder = __FILE_STORAGE_PATH__ . $this->file->folder;\n $absoluteFile = $absoluteFolder . '/' . $this->file->fileName;\n unlink($absoluteFile);\n }", "title": "" }, { "docid": "56ef86723a3ce311a8ed60a2c434aaba", "score": "0.60469806", "text": "private function destroyResource()\n {\n foreach ($this->events as $event) {\n $this->removeEvent($event);\n }\n\n if ($this->handle) {\n event_base_loopexit($this->handle, 1);\n event_base_free($this->handle);\n $this->handle = null;\n }\n }", "title": "" }, { "docid": "cf8f9645c05b25edb15fe5ac3b20e0d9", "score": "0.6045932", "text": "protected function delete($resource){\n $entity = $this->dataService->delete($resource);\n return $entity;\n }", "title": "" }, { "docid": "27f5fe23fb8978b59377436419e62306", "score": "0.6006565", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n $resource = new ResourceResource($resource);\n return $this->success('Resource Deleted Successfully.', $resource);\n }", "title": "" }, { "docid": "ce2d9089bdc6105e259a8fc7435710e3", "score": "0.5969368", "text": "public function physicalRemove(){\n \n global $strings;\n\n if ($this->isOnS3()){\n if(!$this->getS3()->deleteObject($this->bucket, $this->path)){\n throw new Exception($strings['cantDeleteFileS3']);\n }\n }else{\n if (!unlink($this->getPhysicalPath())){\n throw new Exception(\"Can't delete: \" . $this->getPhysicalPath());\n }\n }\n\n }", "title": "" }, { "docid": "342298363719c61574c6860bd21aaa5c", "score": "0.5961146", "text": "public function remove($id)\n {\n $media = Media::findOrFail($id);\n // Storage::delete('storage/'.$media->filename);\n // return redirect('dashboard/media');\n $path = public_path().\"/storage/\".$media->filename;\n if(File::exists($path)){\n File::delete($path);\n } \n $media->delete();\n return redirect('dashboard/media');\n }", "title": "" }, { "docid": "256b2882eab04971d66d3cd5fe279069", "score": "0.5953901", "text": "function remove_by_resource_id($faistate_resource_id) {\n\t$db=htvcenter_get_db_connection();\n\t$rs = $db->Execute(\"delete from \".$this->_db_table.\" where fai_resource_id=\".$faistate_resource_id);\n}", "title": "" }, { "docid": "0f33fc82bbb0ee650523b55fee3fd916", "score": "0.59241194", "text": "public function deleteResource(\n Resource\\ResourceType $resourceType,\n Resource\\ResourceId $resourceId\n );", "title": "" }, { "docid": "36651b549fe41bd0664da956114a9c49", "score": "0.5921025", "text": "private function _deleteStorage($name) {\r\n\t\tunset($this->_storage[$name]);\r\n\t}", "title": "" }, { "docid": "52076dacbb2bf9f60da7deed7636119b", "score": "0.5918752", "text": "public function destroy($id)\n {\n $get=Slide::where('id',$id)->first();\n if($get->image!=null&&file_exists(\"/storage/$get->image\")){\n unlink('storage/'.$get->image);\n }\n $get->delete();\n return redirect()->route('listSlide');\n }", "title": "" }, { "docid": "f51dca1995fbb4ea013dc67c8631ad87", "score": "0.5914943", "text": "public function trash($resourceId)\n {\n $resource = $this->resourceContract->findOnlyTrashed($resourceId);\n Storage::disk('public')->delete('resources/' . $resource->document);\n\n $result = $this->resourceContract->destory($resource);\n\n $result ? Flash::success('Resource has been forcefully deleted.')\n : Flash::error('Resource could not be forcefully deleted.');\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "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": "a026f3ede198f3fb93bcad88386d926d", "score": "0.58884346", "text": "public function remove()\r\n\t{\r\n\t\tif ($this->id)\r\n\t\t{\r\n\t\t\t// TODO: delete\r\n\t\t\t$this->id = null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "45d0719ac780944f2d2b2ab31d280549", "score": "0.58856535", "text": "public function remove($id, $filename = null);", "title": "" }, { "docid": "6431de611c573a19db0ba3678e104c9e", "score": "0.58781254", "text": "public function destroy($id)\n {\n //eliminar por id\n $usuario= Usuarios::findOrFail($id);\n\n if( Storage::delete('public/'.$usuario->Foto)){\n Usuarios::destroy($id);\n }\n \n return redirect('usuarios');\n\n }", "title": "" }, { "docid": "49d15f822dfd652237898762b1555ff1", "score": "0.5869462", "text": "public function onRemove()\n {\n try {\n $this->repository->getFilesystem()->delete($this->storageKey);\n } catch (FileNotFound $e) {\n if (!$this->isMissingFileIgnoredOnDelete()) {\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "a5b45321d84c25ff616ce9aaffca6cb1", "score": "0.58543277", "text": "public function remove(FileInterface $media);", "title": "" }, { "docid": "6fa97a75d590a5487f6acd2521e91056", "score": "0.5812348", "text": "public function destroy($id)\n {\n $resource = $this->CourseSectionResource->find($id);\n try{\n if(!empty($resource->file)){\n deleteFileFromPrivateStorage($resource->file);\n }\n }\n catch(\\Exception $e){\n session()->flash('error_msg' , 'Couldn`t delete resource file from storage!');\n }\n $this->CourseSectionResource->delete($resource->id);\n return redirect()->back()->with('success_msg', 'Course section resource deleted successfully!');\n }", "title": "" }, { "docid": "e1628f8f31899e5e41eb946b26eb231a", "score": "0.58072346", "text": "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n// if(Storage::exists('uploads/'.$product->avatar))\n// {\n// unlink('storage/uploads/'.$product->avatar);\n// }\n if(file_exists(public_path('uploads/'.$product->avatar)))\n {\n // dd(\"yes\");\n unlink(public_path('uploads/'.$product->avatar));\n }\n $product->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "33d10a0171eabd9b8fe683d93d2886aa", "score": "0.5801854", "text": "public function destroy() {\n $this->provider->trash( $this->getData() );\n }", "title": "" }, { "docid": "c76ba5203390ca9cf0624c810c367c90", "score": "0.5798788", "text": "public function deleteResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n\n try {\n // delete() returns boolean\n $wasDeleted = $client->delete(Path::fromString($resource->getSha1()));\n } catch (FileDoesNotExistsException $exception) {\n // In some rare cases the file might be missing in the storage but is still present in the db.\n // We need to process the corresponding exception to be able to also remove the resource from the db.\n $wasDeleted = true;\n }\n\n return $wasDeleted;\n }", "title": "" }, { "docid": "221de0333cec1309efddd33a75bcb64c", "score": "0.57902867", "text": "public function remove() {\r\n self::removeById($this->id);\r\n }", "title": "" }, { "docid": "58dd1e60cf8a295194560ca90fca3669", "score": "0.57566226", "text": "public function removeFromStorage($image)\n {\n Storage::disk('public')->delete($image);\n }", "title": "" }, { "docid": "c41a8c586f3cfc39935459b577d1b862", "score": "0.575272", "text": "public function removeUpload()\n {\n if (isset($this->temp)) {\n unlink($this->temp);\n }\n }", "title": "" }, { "docid": "750ee1857a66f841616cd130d5793980", "score": "0.57492644", "text": "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "title": "" }, { "docid": "3efb4e7d01d53fcd85a29779b8a9e415", "score": "0.5737984", "text": "public function remove(): void\n\t{\n\t\t$this->start();\n\t\t$this->data = null;\n\t\t$this->meta = null;\n\t}", "title": "" }, { "docid": "1fa59c233c11ccd35321ef052c3bb1c2", "score": "0.5732476", "text": "public function destroy($id){\n $slider = Slider::findOrFail($id);\n $myfile = public_path('public/uploads/slider/'.$slider->image_name);\n if (file_exists($myfile)){\n unlink($myfile);\n $slider->delete();\n \\Session::flash('flash_msg','Slider has been successfully deleted!');\n return redirect('/admin/slider/'); \n }else{\n $slider->delete();\n \\Session::flash('flash_msg','Slider has been successfully deleted!');\n return redirect('/admin/slider/');\n }\n\n }", "title": "" }, { "docid": "ca7fb18e5d4c43e979f30bce3c8319df", "score": "0.57185286", "text": "public function clearStorage(): void\n {\n $this -> getStorage() -> clear();\n }", "title": "" }, { "docid": "366c0d7d78edfe804e2c2262e8291b78", "score": "0.57133925", "text": "public function remove(Stream $person): void;", "title": "" }, { "docid": "ed7546f0b845fa3c3353ea35a4a20a99", "score": "0.5709106", "text": "public function remove() {\n\t\t$this->read();\n\t\t$this->clearBlock();\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "166e690e4f196682a2a814a6027b0db7", "score": "0.56951386", "text": "public function destroy($id)\n {\n $question=Question::find($id);\n //delete related file from storage\n $question->delete();\n return redirect()->route('questions.index');\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "2c1af4221a72590e3cb0cd0ad912aa00", "score": "0.5676235", "text": "public function delete($key)\n {\n try{\n if ($this->fs->has($key)) {\n $this->fs->delete($key);\n }\n } catch (\\RuntimeException $ex) {\n throw StorageException::fromPrevious($ex);\n }\n }", "title": "" }, { "docid": "54cf17987ccf71e05fd4894be16724fe", "score": "0.56715244", "text": "public function destroy($id)\n {\n $result = Storage::destroy($id);\n\n if (!$result) return response(null, 404);\n\n return response(null, 200);\n }", "title": "" }, { "docid": "a1996902e0be9853d1ca44ee082f83c4", "score": "0.5652084", "text": "public function delete(StorageDeleteRequest $request)\n {\n $this->storages->remove($request->input('link'));\n\n return $this->respondJson([]);\n }", "title": "" }, { "docid": "4e1b157fd4962cd773a05c730cd6bf95", "score": "0.5639948", "text": "public function remove($payload);", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.56398225", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "d8cf040d5d088baee69ea50d0218c37e", "score": "0.56377107", "text": "function delete_quiz_resource($id_quiz_resource) {\n if (!$this->ion_auth->logged_in()) {\n redirect();\n } else {\n $temp = $this->load->model_quiz->select_quiz_resource_by_id($id_quiz_resource)->row();\n if ($temp->ext != '') {\n unlink('./resource/' . $temp->file);\n $this->load->model_quiz->delete_quiz_resource($id_quiz_resource);\n } else {\n $this->load->model_quiz->delete_quiz_resource($id_quiz_resource);\n }\n $data1['resource_id'] = 0;\n $data2['summary_id'] = 0;\n $this->load->model_quiz->delete_quiz_resource_from_soal($id_quiz_resource, $data1);\n $this->load->model_quiz->delete_quiz_summary_from_soal($id_quiz_resource, $data2);\n }\n }", "title": "" }, { "docid": "6f829749f6f0cfbf567b9b89e34dcc1c", "score": "0.56330186", "text": "function external_resource_delete_delete($resource_id=null)\n\t{\t\t\n\t\t$this->load->model(\"Survey_resource_model\");\t\t\n\t\ttry{\n\t\t\tif(!is_numeric($resource_id)){\n\t\t\t\tthrow new Exception(\"MISSING_PARAM: resource_id\");\n\t\t\t}\n\n\t\t\t$this->Survey_resource_model->delete($resource_id);\n\t\t\t$this->set_response('DELETED', REST_Controller::HTTP_OK);\t\t\t\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\t$this->set_response($e->getMessage(), REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\t}", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "23aa98c0e45a4d5bc13c5c73f9bd3dde", "score": "0.56284964", "text": "public function destroy($id)\n {\n $getpost = Post::where('slug', '=',$id)->first();\n $filename = $getpost->thumbnail;\n $filename = public_path('uploads/photos'. $filename);\n if($getpost->delete()){\n if (file_exists($filename)) {\n @unlink($filename);\n }\n }\n\n \n}", "title": "" }, { "docid": "ce4dd2b67d8a9a32540569f994a6989e", "score": "0.562772", "text": "public function destroy(Supplier $supplier)\n {\n $remove = Supplier::find($supplier->id);\n $photo = $supplier->photo;\n if($photo){\n unlink($photo);\n }\n $remove->delete();\n }", "title": "" }, { "docid": "83296d43845200428d3f972a111c72f8", "score": "0.5608048", "text": "public function remove($id)\n {\n $this->persistence->remove($id);\n }", "title": "" }, { "docid": "3d22d714e6088f6711137bbeb6db1bbb", "score": "0.5600981", "text": "public function remove($path){\n return unlink($path);\n }", "title": "" }, { "docid": "27c4016299257e94c3026a2ba2ba5c83", "score": "0.55814904", "text": "public function destroy($id)\n {\n $slider = Slider::findOrFail($id);\n /*\n * unlink('backend/Images/'.$slider->image);\n *\n * the code is delete the image but we need image don't deltete it so for that reason we will\n * make comment to this code\n */\n $slider->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "2866af9241b67fd5770b87451aa83579", "score": "0.55732435", "text": "public function delete(string $path): self;", "title": "" }, { "docid": "7c943bc0e1841b8090151d8b0b8ca4ac", "score": "0.5568121", "text": "function remove(){\n Resource::remove($_SESSION[\"object_id\"]);\n\n DB::db_query(\"delete_collection\", \"DELETE FROM resource WHERE id='\".$_SESSION[\"object_id\"].\"'\");\n if(DB::db_check_result(\"delete_collection\") > 0){\n include($GLOBALS[\"draw_includes_path\"].\"/Resource/.BookDeleted.html\");\n }\n }", "title": "" }, { "docid": "bd1f8717cf8c32b58c71fe82e627e4e1", "score": "0.55641353", "text": "public function my_delete() {\n Storage::delete($this->path);\n \\Log::info('Deleted file: ' . $this->path);\n $this->delete();\n }", "title": "" }, { "docid": "c69a6aec9441a09ecb4034c5f58d9e56", "score": "0.55601335", "text": "public function destroy($id)\n {\n $post=Post::find($id);\n\n if(File::exists('storage/'.$post->image)){\n File::delete('storage/'.$post->image);\n }\n\n $post->tags()->detach();\n $post->delete();\n return redirect('/admin/posts');\n }", "title": "" }, { "docid": "b87ec107871ee33340d2fa1536c6d83e", "score": "0.55535823", "text": "public function destroy(Request $request)\n {\n $path = $request->input('path');\n $path = preg_replace('|^https?://[^\\/]+/storage/|', '', $path);\n Storage::disk('public')->delete($path);\n return response('ok', 204);\n }", "title": "" }, { "docid": "1445f22d5bc412cd6a2e4068e0188f31", "score": "0.5553502", "text": "public function destroy($id)\n {\n $data = User::find($id);\n if ($data->image != \"default.PNG\" && $data->image != \"\" ){ \n $fileName = $data->image;\n Storage::delete($fileName);\n }\n $data->delete();\n return redirect()->route('user.index');\n }", "title": "" }, { "docid": "9306b600c172932b3726caa50eab111c", "score": "0.55530834", "text": "public function destroy($id)\n {\n $file = MediaFiles::find($id);\n /*$mediaFiles->deleted = true;\n $mediaFiles->save();*/ \n $file->delete();\n }", "title": "" }, { "docid": "25fb474df202e3c8494a2eb910e15a59", "score": "0.55449986", "text": "public function deleteResource(){\n if(parent::delete()){\n return \"ok\";\n }\n return \"error\";\n }", "title": "" }, { "docid": "39f3b4981da393b14f808c0c0b6ef46c", "score": "0.55448544", "text": "public function delete($path) {\n try {\n $status = $this->_s3->deleteObject($this->_bucket, $this->_getObjectName($path));\n } catch(S3Exception $e) {\n $this->_log($e->getMessage());\n throw new Scalar_Storage_Exception('Unable to delete file.');\n }\n }", "title": "" }, { "docid": "bcab9946ef86c53d040c2a39fa7ecb57", "score": "0.55423814", "text": "public function remove($id)\n {\n if ($this->fileSystem->fileExists($id)) {\n $this->fileSystem->delete($id);\n }\n }", "title": "" }, { "docid": "619b554e580350c34f6536df94d8d29f", "score": "0.55413246", "text": "function remove_resource($resource_id) {\n if (empty($resource_id)) return FALSE;\n\t $this->db->trans_begin();\n\n\t\t$this->db->where('resource_id',$resource_id);\n\t\t$this->db->delete($this->tables['resources']);\n\n\t\t$this->db->where('resource_id',$resource_id);\n\t\t$this->db->delete($this->tables['grants']);\n\n\t\tif ($this->db->trans_status() === FALSE)\n\t {\n\t\t\t$this->db->trans_rollback();\n\t\t\treturn FALSE;\n\t }\n\n\t $this->db->trans_commit();\n\t return TRUE;\n }", "title": "" }, { "docid": "426f594c80545265eb0a48c145c39378", "score": "0.5540242", "text": "public function destroy($id)\n {\n $get=Blog::where('id',$id)->first();\n unlink('storage/'.$get->thumbnail);\n Blog::where('id',$id)->delete();\n return redirect()->route('listBlog');\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": "b5b688091a31c75ff8615389051972dc", "score": "0.5539336", "text": "public function delete()\n {\n $this->removeImage();\n parent::delete();\n }", "title": "" }, { "docid": "4697a00d553d37cc8d8db652c56c76b2", "score": "0.5534565", "text": "public function remove($id)\n {\n $image = $this->image->find($id);\n\n $full_path = public_path('/images/product/'.$image->imagePath);\n\n File::delete($full_path);\n\n $image->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "2cce19e05c22aab21227d7f37af1fd4e", "score": "0.55311805", "text": "public function destroy($id)\n {\n $data=Slider::findOrFail($id);\n $img_path='public/uploads/sliders/'.$data['slider_image'];\n if($data['slider_image']!=null and file_exists($img_path)){\n unlink($img_path);\n }\n $data->delete();\n return redirect('slider')->with('msg_success','Slide Successfully Deleted!');\n }", "title": "" }, { "docid": "c63d38df163184005e90c31c619d88b8", "score": "0.5529311", "text": "public function delete()\n {\n return $this->storage->disk()->delete($this->path);\n }", "title": "" }, { "docid": "f75f489326b0b6ab4bdfe2ad0a2a4cb3", "score": "0.5527862", "text": "public function delete(): void\n {\n $this->api->delete($this);\n $this->api->getPool()->remove($this->_getPoolKeys());\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": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "8272e4330e4a37b7def3a16cf53eddcf", "score": "0.0", "text": "public function run()\n {\n\n DB::table('poszt_tipusok')->insert([\n 'id' => 1,\n 'code' => 'sajat',\n 'web_nev' => 'Saját',\n ]);\n\n DB::table('poszt_tipusok')->insert([\n 'id' => 2,\n 'code' => 'szemelyes',\n 'web_nev' => 'Személyes',\n ]);\n\n DB::table('poszt_tipusok')->insert([\n 'id' => 3,\n 'code' => 'polgarmesteri',\n 'web_nev' => 'Polgármesteri',\n ]);\n\n DB::table('poszt_tipusok')->insert([\n 'id' => 4,\n 'code' => 'alpolgarmesteri',\n 'web_nev' => 'Alpolgármesteri',\n ]);\n\n DB::table('poszt_tipusok')->insert([\n 'id' => 5,\n 'code' => 'csoportoldal',\n 'web_nev' => 'Csoport oldal',\n ]);\n\n DB::table('poszt_tipusok')->insert([\n 'id' => 6,\n 'code' => 'media',\n 'web_nev' => 'Média',\n ]);\n\n DB::table('poszt_tipusok')->insert([\n 'id' => 7,\n 'code' => 'kepviselotars',\n 'web_nev' => 'Képviselőtárs',\n ]);\n\n DB::table('poszt_tipusok')->insert([\n 'id' => 8,\n 'code' => 'egyeb',\n 'web_nev' => 'Egyéb',\n ]);\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => 'alan@alan.fr',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => 'alice@alice.fr',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => 'admin@admin.fr',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => 'santi@correo.com',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => 'forge405@gmail.com',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => 'echivambo@psi.org.mz',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => 'enhacudima@psi.org.mz',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::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 Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \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": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => 'hello@company.co',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::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 Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> 'jperez@gmail.com',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => 'test@gmail.com',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => 'test2@gmail.com',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => 'seyii@seyi.com',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@drea.com',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::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 Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@e-learning.com',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => 'lecturer@e-learning.com',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => 'student@e-learning.com',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => 'tomaslanda1989@gmail.com',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => 'mohamedbendary1994@gmail.com'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => 'ahmed@gmail.com'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => 'abdo@gmail.com'\n ]);\n }", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => 'admin@admin.fr',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => 'davidisback4good@hotmail.com',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', 'plj@un.or.id'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'pablo.nolasco@live.com']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" } ]
cd9744baa7bc1b990a28950a04657ab3
Parses the steps array by stripping off nested arrays not included in the branches and returns a simple array with the correct steps.
[ { "docid": "f4282870bb23b16572cb730750780c8a", "score": "0.74305105", "text": "protected function _parseSteps( $steps ) {\n\n $parsed = [];\n\n foreach( $steps as $key => $name ) {\n if( is_array( $name ) ) {\n foreach( $name as $branchName => $step ) {\n $branchType = $this->_branchType( $branchName );\n if( $branchType ) {\n if( $branchType !== 'skip' ) {\n $branch = $branchName;\n }\n } elseif( empty( $branch ) && $this->defaultBranch ) {\n $branch = $branchName;\n }\n }\n if( !empty( $branch ) ) {\n if( is_array( $name[ $branch ] ) ) {\n $parsed = array_merge( $parsed, $this->_parseSteps( $name[ $branch ] ) );\n } else {\n $parsed[] = $name[ $branch ];\n }\n }\n unset( $branch );\n } else {\n $parsed[] = $name;\n }\n }\n\n return $parsed;\n }", "title": "" } ]
[ { "docid": "6efe6a11d1c4fbc6a86240e66149bae5", "score": "0.5873563", "text": "protected function validate_steps( $steps = array() ) {\n\t\t\tif ( ! empty( $steps ) ) {\n\t\t\t\tforeach ( $steps as $steps_type => $steps_type_set ) {\n\t\t\t\t\tif ( ( is_array( $steps_type_set ) ) && ( ! empty( $steps_type_set ) ) ) {\n\t\t\t\t\t\t$steps_query_args = array(\n\t\t\t\t\t\t\t'post_type' => $steps_type,\n\t\t\t\t\t\t\t'post__in' => array_keys( $steps_type_set ),\n\t\t\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t\t\t'fields' => 'ids',\n\t\t\t\t\t\t\t'orderby' => 'post__in',\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$steps_query = new WP_Query( $steps_query_args );\n\t\t\t\t\t\tif ( ( $steps_query instanceof WP_Query ) && ( property_exists( $steps_query, 'posts' ) ) ) {\n\t\t\t\t\t\t\tif ( ! is_array( $steps_query->posts ) ) {\n\t\t\t\t\t\t\t\t$steps_query->posts = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$step_ids_diff = array_diff( array_keys( $steps_type_set ), $steps_query->posts );\n\t\t\t\t\t\t\tif ( ! empty( $step_ids_diff ) ) {\n\t\t\t\t\t\t\t\tforeach ( $step_ids_diff as $step_id_diff ) {\n\t\t\t\t\t\t\t\t\tif ( isset( $steps[ $steps_type ][ $step_id_diff ] ) ) {\n\t\t\t\t\t\t\t\t\t\tunset( $steps[ $steps_type ][ $step_id_diff ] );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( isset( $steps_type_set[ $step_id_diff ] ) ) {\n\t\t\t\t\t\t\t\t\t\tunset( $steps_type_set[ $step_id_diff ] );\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}\n\n\t\t\t\t\t\tif ( ! empty( $steps_type_set ) ) {\n\t\t\t\t\t\t\tforeach ( $steps_type_set as $step_id => $step_id_set ) {\n\t\t\t\t\t\t\t\tif ( ( is_array( $step_id_set ) ) && ( ! empty( $step_id_set ) ) ) {\n\t\t\t\t\t\t\t\t\t$steps[ $steps_type ][ $step_id ] = $this->validate_steps( $step_id_set );\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\treturn $steps;\n\t\t}", "title": "" }, { "docid": "207deb2719358c816eaa836367862082", "score": "0.56851596", "text": "protected function build_steps() {\n\t\t\tif ( ! isset( $this->steps['h'] ) ) {\n\t\t\t\t$this->steps['h'] = array();\n\t\t\t}\n\t\t\tif ( ! isset( $this->steps['t'] ) ) {\n\t\t\t\t$this->steps['t'] = array();\n\t\t\t}\n\t\t\tif ( ! isset( $this->steps['r'] ) ) {\n\t\t\t\t$this->steps['r'] = array();\n\t\t\t}\n\t\t\tif ( ! isset( $this->steps['l'] ) ) {\n\t\t\t\t$this->steps['l'] = array();\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->steps['h'] ) ) {\n\n\t\t\t\tif ( empty( $this->steps['t'] ) ) {\n\t\t\t\t\t$this->steps['t'] = $this->steps_grouped_by_type( $this->steps['h'] );\n\t\t\t\t}\n\n\t\t\t\tif ( empty( $this->steps['l'] ) ) {\n\t\t\t\t\t$this->steps['l'] = $this->steps_grouped_linear( $this->steps['h'] );\n\t\t\t\t}\n\n\t\t\t\tif ( empty( $this->steps['r'] ) ) {\n\t\t\t\t\t$this->steps['r'] = $this->steps_grouped_reverse_keys( $this->steps['h'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ed3b0da7612b0913afd915633ee6c4f6", "score": "0.5511902", "text": "protected function getPreTypeCastPreparationSteps(): array\n {\n return [\n new ArrayDeserializeStep()\n ];\n }", "title": "" }, { "docid": "6ea8b968092b59cfd15f2addd1c4254b", "score": "0.5474337", "text": "function getSteps($stepsText) {\r\n global $lang, $module;\r\n $stepKeys = ray('original,english,toReplace,callers,functionName');\r\n $pattern = ''\r\n . '^/\\\\*\\\\*\\\\s?$\\\\s'\r\n . '^ \\\\* ([^\\*]*?)\\\\s?$\\\\s'\r\n . '^ \\\\*\\\\s?$\\\\s'\r\n . '^ \\\\* in: ((.*?)\\\\s?$\\\\s'\r\n . '^ \\\\*/\\\\s?$\\\\s'\r\n . ($lang == 'PHP'\r\n ? '^function (.*?)\\()'\r\n : '^this\\.(.*?) = function \\()');\r\n \r\n preg_match_all(\"~$pattern~ms\", $stepsText, $matches, PREG_SET_ORDER);\r\n// if (!$matches) die(print_r(compact('stepsText','pattern'), 1));\r\n $steps = [];\r\n foreach ($matches as $step) {\r\n $step = rayCombine($stepKeys, $step);\r\n// $step['callers'] = explode(\"\\n * \", $step['callers']); // add to the list, but don't delete\r\n $step['callers'] = array(); // rebuild this list every time\r\n $steps[$step['functionName']] = $step; // use the function name as the index for the step\r\n }\r\n return $steps;\r\n}", "title": "" }, { "docid": "4bd7c50d39eff58c4b0c5d0024238aef", "score": "0.5407676", "text": "function edu_steps( $steps ) {\n\t$array = array(\n\t\t'htmlcss' => array(\n\t\t\t'title' => 'HTML & CSS',\n\t\t\t'description' => 'Основная технология создания сайтов - HTML & CSS',\n\t\t\t'image' => 'html5.svg',\n\t\t\t// кол-во занятий\n\t\t\t'length' => 8,\n\t\t\t'program' => array(\n\t\t\t\t'Основы языка разметки HTML',\n\t\t\t\t'Принцип структурирования HTML документа',\n\t\t\t\t'Табличная и блочная верстка',\n\t\t\t\t'HTML5 и CSS3',\n\t\t\t\t'Практика верстки макета дизайна, подготовленного в графическом редакторе',\n\t\t\t\t'Кроссбраузерная верстка - верстки для разных браузеров',\n\t\t\t\t'Создание адаптивного дизайна',\n\t\t\t),\n\t\t\t'skills' => array(\n\t\t\t\t'Владение HTML5 и CSS3',\n\t\t\t\t'Валидная кроссбраузерная и блочная вёрстка сайтов',\n\t\t\t\t'Использование препроцессоров LESS',\n\t\t\t\t'Разработка с использованием Twitter Bootstrap',\n\t\t\t),\n\t\t),\n\t\t'mysql' => array(\n\t\t\t'title' => 'Базы данных',\n\t\t\t'description' => 'Основы базы данных, и язык SQL',\n\t\t\t'image' => 'mysql.svg',\n\t\t\t'length' => 2,\n\t\t\t'program' => array(\n\t\t\t\t'Реляционные базы данных',\n\t\t\t\t'Проектирование базы данных',\n\t\t\t\t'Создание таблиц',\n\t\t\t\t'Заполнение таблиц данными',\n\t\t\t\t'Получение данных по фильтру',\n\t\t\t\t'Обновление и удаление данных',\n\t\t\t\t'Получение данных из нескольких взаимосвязанных таблиц',\n\t\t\t\t'Функции агрегации',\n\t\t\t),\n\t\t\t'skills' => array(\n\t\t\t\t'Знание основ языка SQL и проектирования баз данных',\n\t\t\t),\n\t\t),\n\t\t'php' => array(\n\t\t\t'title' => 'PHP',\n\t\t\t'description' => 'Основы back-end разработки - срверный язык PHP',\n\t\t\t'image' => 'php.svg',\n\t\t\t'length' => 14,\n\t\t\t'program' => array(\n\t\t\t\t'Подготовка локальной машины к работе. Знакомство с языком. Примеры/практика.',\n\t\t\t\t'Операторы. Примеры/практика.',\n\t\t\t\t'Циклы. Примеры/практика.',\n\t\t\t\t'Формы и запросы. Примеры/практика.',\n\t\t\t\t'Работа с cookie. Примеры/практика.',\n\t\t\t\t'Работа с файлами. Примеры/практика.',\n\t\t\t\t'Работа с базой данных. Примеры/практика.',\n\t\t\t\t'Архитектура проектов и разработка собственного сайта',\n\t\t\t),\n\t\t\t'skills' => array(\n\t\t\t\t'Создание сайтов \"под ключ\"',\n\t\t\t\t'Обработка и формирование данных на сервере',\n\t\t\t\t'Процедурное программирование',\n\t\t\t\t'Объектно ориентированное программирование',\n\t\t\t),\n\t\t),\n\t\t// http://learn.javascript.ru/first-steps\n\t\t'javascript' => array(\n\t\t\t'title' => 'JavaScript',\n\t\t\t'description' => 'Основы front-end разработки на языке JavaScript',\n\t\t\t'image' => 'javascript.svg',\n\t\t\t'length' => 8,\n\t\t\t'program' => array(\n\t\t\t\t'Подключение и порядок исполнения скриптов',\n\t\t\t\t'Переменные и выбор имен переменных',\n\t\t\t\t'Шесть типов данных',\n\t\t\t\t'Основные операторы',\n\t\t\t\t'Операторы сравнения и логические значения',\n\t\t\t\t'Побитовые операторы',\n\t\t\t\t'Взаимодействие с пользователем: alert, prompt, confirm',\n\t\t\t\t'Условные операторы',\n\t\t\t\t'Логические операторы',\n\t\t\t\t'Преобразование типов',\n\t\t\t\t'Циклы',\n\t\t\t\t'Функции',\n\t\t\t),\n\t\t\t'skills' => array(\n\t\t\t\t'Умение создавать интерактивные страницы на JavaScript',\n\t\t\t\t'Использование инструментов разработки и отладки в браузере',\n\t\t\t\t'Обработка событий, манипуляции с элементами DOM',\n\t\t\t),\n\t\t),\n\t\t// https://jqbook.net.ru/\n\t\t'jquery' => array(\n\t\t\t'title' => 'jQuery',\n\t\t\t'description' => 'Практика использования популярной библиотеки jQuery',\n\t\t\t'image' => 'jquery.svg',\n\t\t\t'length' => 4,\n\t\t\t'steps_visibility' => false,\n\t\t\t'program' => array(\n\t\t\t\t'Подключение библиотеки',\n\t\t\t\t'Слекторы',\n\t\t\t\t'Атрибуты',\n\t\t\t\t'Фильтры',\n\t\t\t\t'Работа с DOM',\n\t\t\t\t'События',\n\t\t\t\t'',\n\t\t\t),\n\t\t\t'skills' => array(\n\t\t\t\t'Использование библиотеки JQuery',\n\t\t\t),\n\t\t),\n\t\t// https://jqbook.net.ru/\n\t\t'ajax' => array(\n\t\t\t'title' => 'AJAX',\n\t\t\t'description' => 'Связь частей приложения по средствам AJAX',\n\t\t\t'image' => 'ajax.svg',\n\t\t\t'length' => 4,\n\t\t\t'steps_visibility' => false,\n\t\t\t'program' => array(\n\t\t\t\t'GET',\n\t\t\t\t'POST',\n\t\t\t\t'JQuery AJAX',\n\t\t\t\t'AJAX Iframe',\n\t\t\t\t'AJAX Отправка файла',\n\t\t\t),\n\t\t\t'skills' => array(\n\t\t\t\t'Опыт написания Ajax-запросов',\n\t\t\t),\n\t\t),\n\t\t'git' => array(\n\t\t\t'title' => 'Командная разработка проекта',\n\t\t\t'description' => 'Опыт разработки в команде и контроль версий',\n\t\t\t'image' => 'git.svg',\n\t\t\t'skills' => array(\n\t\t\t\t'Контроль версий и совместная работа над проектом(GIT)',\n\t\t\t),\n\t\t),\n\t\t'teamwork' => array(\n\t\t\t'title' => 'Окончание обучения',\n\t\t\t'image' => 'victory.svg',\n\t\t),\n\t);\n\n\tif ( ! is_array( $steps ) ) {\n\t\t$steps = array_map( 'trim', explode( ',', $steps ) );\n\t}\n\n\t$out = [];\n\tforeach ( $steps as $key ) {\n\t\t//pr( $key );\n\t\tif ( ! empty( $array[ $key ] ) ) {\n\t\t\t$out[ $key ] = $array[ $key ];\n\t\t}\n\t}\n\n\treturn $out;\n}", "title": "" }, { "docid": "fc4a6abb8ff04cbf4cd95e91cb75b7c8", "score": "0.5406759", "text": "private function _flatten_item_parent_steps( $steps = array() ) {\n\t\t\t$flattened_steps = array();\n\n\t\t\tif ( ! empty( $steps ) ) {\n\t\t\t\tforeach ( $steps as $a_step_key => $a_steps ) {\n\t\t\t\t\t$flattened_steps[] = $a_step_key;\n\t\t\t\t\t$sub_steps = $this->_flatten_item_parent_steps( $a_steps );\n\t\t\t\t\tif ( !empty( $sub_steps ) ) {\n\t\t\t\t\t\t$flattened_steps = array_merge( $flattened_steps, $sub_steps );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $flattened_steps;\n\t\t}", "title": "" }, { "docid": "1fef869a9ce43d30a37cc2584a752ad8", "score": "0.53831786", "text": "protected function generate_step_tree() {\n\n\t\t$steps_list = APP_Form_Progress_Checkout_Registry::steps( $this->checkout_type );\n\n\t\t$active_steps = $this->get_active_checkout( $part = 'steps' );\n\n\t\tforeach( $steps_list as $key => $step ) {\n\n\t\t\t// Checkout only - keep only the steps registered by the Checkout module\n\t\t\tif ( ! isset( $active_steps[ $key ] ) )\n\t\t\t\tcontinue;\n\n\t\t\tif ( isset( $step['map_to'] ) ) {\n\t\t\t\t$s_key = $step['map_to'];\n\t\t\t\t$mapped_step = $steps_list[ $step['map_to'] ];\n\t\t\t} else {\n\t\t\t\t$s_key = $key;\n\t\t\t\t$mapped_step = $step;\n\t\t\t}\n\n\t\t\t$steps[ $s_key ] = $mapped_step;\n\n\t\t\tif ( $key == $this->current_step )\n\t\t\t\t$current_s_key = $s_key;\n\t\t}\n\n\t\tif ( ! empty( $current_s_key ) ) {\n\t\t\t$steps[ $current_s_key ]['current'] = true;\n\t\t}\n\n\t\treturn $this->format_display( $steps );\n\t}", "title": "" }, { "docid": "b8de5a456a7dc8318d93a82df109998f", "score": "0.5372335", "text": "public function steps() : array\n {\n return $this->steps;\n }", "title": "" }, { "docid": "b5617014cce341e315f3cc1b0cc479f6", "score": "0.52372956", "text": "public function getPartSteps()\n {\n if ($this->_partSteps === null) {\n $v = $this->getVersion();\n if ($v === null) {\n $this->_partSteps = [];\n foreach (static::steps() as $version => $data) {\n $this->_partSteps = array_merge($this->_partSteps, $data);\n }\n }\n else {\n $found = false;\n $index = 1;\n foreach (static::steps() as $version => $data) {\n if ($version == $v) {\n $found = true;\n }\n $index++;\n if ($found) {\n break;\n }\n }\n $part = array_slice(static::steps(), $index);\n $this->_partSteps = [];\n foreach ($part as $version => $data) {\n $this->_partSteps = array_merge($this->_partSteps, $data);\n }\n }\n }\n return $this->_partSteps;\n }", "title": "" }, { "docid": "d9963b72dd92c22dd423bd6e0ae8aa75", "score": "0.52319145", "text": "public function getSteps(){\n\t\t$arResult = array();\n\t\t$arResult['CHECK'] = array(\n\t\t\t'NAME' => static::getMessage('ACRIT_EXP_EXPORTER_STEP_CHECK'),\n\t\t\t'SORT' => 10,\n\t\t\t#'FUNC' => __CLASS__.'::stepCheck',\n\t\t\t'FUNC' => array($this, 'stepCheck'),\n\t\t);\n\t\t$arResult['EXPORT'] = array(\n\t\t\t'NAME' => static::getMessage('STEP_EXPORT'),\n\t\t\t'SORT' => 100,\n\t\t\t#'FUNC' => __CLASS__.'::stepExport',\n\t\t\t'FUNC' => array($this, 'stepExport'),\n\t\t);\n\t\treturn $arResult;\n\t}", "title": "" }, { "docid": "7ce7ebf4e16b0626bd828bbb484bc2ea", "score": "0.5160724", "text": "public function clearSteps() {\n $this->steps = array();\n }", "title": "" }, { "docid": "e530b59b642194e202a46c3206e0da95", "score": "0.49447346", "text": "public static function findAll(): array\n {\n $stmt = PDOManager::getInstance()->getPDO()->query(\"SELECT * FROM step;\");\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $objects = [];\n foreach ($results as $result) {\n array_push($objects, new Step($result[\"s_description\"], $result[\"s_order\"], RecipeManager::findOneById($result[\"s_fk_recipe_id\"])));\n }\n return $objects;\n }", "title": "" }, { "docid": "e65585101c19627ba89bd64f47a248d9", "score": "0.48828033", "text": "protected function buildDirectionsSteps(array $directionsSteps)\n {\n $results = array();\n\n foreach($directionsSteps as $directionsStep)\n $results[] = $this->buildDirectionsStep($directionsStep);\n\n return $results;\n }", "title": "" }, { "docid": "f47ad0f852d9bd70d4984f749ed95369", "score": "0.4864914", "text": "protected static function getTransformerSteps()\n {\n return ['wrapInQuotes', 'wrapInArrayBrackets', 'decode'];\n }", "title": "" }, { "docid": "28ccd87beb6c364884b3f53559b929fb", "score": "0.4849695", "text": "public function getUndefinedSteps()\n {\n return $this->undefinedSteps;\n }", "title": "" }, { "docid": "7e622feba6ecbdf3024854db855ec09d", "score": "0.48295823", "text": "public function getHttpSteps() {\n\t\t$httpsteps = [];\n\n\t\tif (array_key_exists('hosts', $this->data)) {\n\t\t\tforeach ($this->data['hosts'] as $host) {\n\t\t\t\tif (array_key_exists('httptests', $host)) {\n\t\t\t\t\tforeach ($host['httptests'] as $httptest) {\n\t\t\t\t\t\tforeach ($httptest['steps'] as $httpstep) {\n\t\t\t\t\t\t\t$httpsteps[$host['host']][$httptest['name']][$httpstep['name']] = $httpstep;\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\tif (array_key_exists('templates', $this->data)) {\n\t\t\tforeach ($this->data['templates'] as $template) {\n\t\t\t\tif (array_key_exists('httptests', $template)) {\n\t\t\t\t\tforeach ($template['httptests'] as $httptest) {\n\t\t\t\t\t\tforeach ($httptest['steps'] as $httpstep) {\n\t\t\t\t\t\t\t$httpsteps[$template['template']][$httptest['name']][$httpstep['name']] = $httpstep;\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\treturn $httpsteps;\n\t}", "title": "" }, { "docid": "f8f8e67168620ae88af38e59ae948b39", "score": "0.48217207", "text": "function get_steps( $steps_type = 'h' ) {\n\t\t\t$this->load_steps();\n\n\t\t\tif ( isset( $this->steps[ $steps_type ] ) ) {\n\t\t\t\treturn $this->steps[ $steps_type ];\n\t\t\t} elseif ( 'all' === $steps_type ) {\n\t\t\t\treturn $this->steps;\n\t\t\t}\n\n\t\t\treturn array();\n\t\t}", "title": "" }, { "docid": "630fcbe7b8a573cb9db16f0b22a3c53e", "score": "0.48165396", "text": "public function parse($lines)\n\t{\n\t\tif (is_string($lines)) {\n\t\t\t$lines = explode(\"\\n\", $lines);\n\t\t}\n\n\t\tif (empty($lines)) {\n\t\t\treturn array();\n\t\t}\n\n\t\t#echo \"=BEGIN=\\n\";\n\n\t\t$tree = array();\n\t\t$branch = array();\n\t\t$element = trim($lines[0]);\n\t\t$last_element = $element;\n\t\t#echo '==========opened '.$element.\"\\n\\n\";\n\t\t$min_indent = $this->indent_of($lines[0]);\n\n\t\tforeach($lines as $number => $line) {\n\t\t\tif (trim($line) == '') continue;\n\t\t\t$indent = $this->indent_of($line);\n\n\t\t\tif ($indent > $min_indent) {\n\t\t\t\t$branch[] = $line;\n\n\t\t\t\t#echo $line.\"\\n\";\n\t\t\t} elseif ($indent == $min_indent && $number != 0) {\n\t\t\t\t#echo '==========closed '.$element.\"\\n\\n\";\n\t\t\t\t$tree[] = $this->close($element, $branch);\n\n\t\t\t\t$element = trim($line);\n\t\t\t\t$branch = array();\n\t\t\t\t#echo '==========opened '.$element.\"\\n\\n\";\n\t\t\t}\n\t\t}\n\n\t\t#echo '==========closed '.$element.\"\\n\\n\";\n\t\t$tree[] = $this->close($element, $branch);\n\n\t\t#echo \"=END=\\n\\n\";\n\n\t\treturn $tree;\n\t}", "title": "" }, { "docid": "617afad037ec3d86a680ac85663fb6a9", "score": "0.48062155", "text": "public function testArray04() {\n\t\t$expected = \"\\narray(1) {\\n\";\n\t\t$expected .= \" [0] => array(1) {\\n\";\n\t\t$expected .= \" [0] => array(1) {\\n\";\n\t\t$expected .= \" [0] => array(1) {\\n\";\n\t\t$expected .= \" [0] => array(1) {\\n\";\n\t\t$expected .= \" [0] => array(1) {\\n\";\n\t\t$expected .= \" [0] => array(1) {\\n\";\n\t\t$expected .= \" [0] => array(1) {\\n\";\n\t\t$expected .= \" [0] => *MAX DEPTH*\\n\";\n\t\t$expected .= \" }\\n\";\n\t\t$expected .= \" }\\n\";\n\t\t$expected .= \" }\\n\";\n\t\t$expected .= \" }\\n\";\n\t\t$expected .= \" }\\n\";\n\t\t$expected .= \" }\\n\";\n\t\t$expected .= \" }\\n\";\n\t\t$expected .= \"}\\n\";\n\t\t$this->expectOutputString($expected);\n\t\t\n\t\td(array(array(array(array(array(array(array(array(0)))))))));\n\t}", "title": "" }, { "docid": "396c21394131c0d9dd1e5aa70612bbe8", "score": "0.4782952", "text": "private function init_steps() {\n $refs = array();\n $qry = \"SELECT steps.id, steps.pid, steps.num, steps.name FROM `steps` WHERE steps.template_id = 1 ORDER BY pid, num;\";\n $res = $this->db->query($qry);\n\n if($res && $res->num_rows) {\n while($data = $res->fetch_object()) {\n $thisref = &$refs[ $data->id ];\n $thisref['id'] = $data->id;\n $thisref['pid'] = $data->pid;\n $thisref['name'] = $this->lingual->get_text($data->name);\n\n if ($data->pid == 0) {\n $this->steps[ $data->id ] = &$thisref;\n } else {\n $refs[$data->pid]['children'][ $data->id ] = &$thisref;\n }\n }\n } else {\n echo 'Error when constructing tree...';\n }\n }", "title": "" }, { "docid": "494eccf4d340e8e350384b2c3eede0ac", "score": "0.47680125", "text": "private function _steps_reverse_keys_walk( $steps, $parent_tree = array() ) {\n\t\t\t$steps_reversed = array();\n\n\t\t\tif ( ! empty( $steps ) ) {\n\t\t\t\tforeach ( $steps as $steps_type => $steps_type_set ) {\n\n\t\t\t\t\tif ( ( is_array( $steps_type_set ) ) && ( ! empty( $steps_type_set ) ) ) {\n\t\t\t\t\t\tforeach ( $steps_type_set as $step_id => $step_id_set ) {\n\t\t\t\t\t\t\t$steps_parents = array();\n\t\t\t\t\t\t\t$steps_parents[ $steps_type . ':' . $step_id ] = $parent_tree;\n\n\t\t\t\t\t\t\tif ( ( is_array( $step_id_set ) ) && ( ! empty( $step_id_set ) ) ) {\n\t\t\t\t\t\t\t\t$sub_steps = $this->_steps_reverse_keys_walk( $step_id_set, $steps_parents );\n\t\t\t\t\t\t\t\tif ( ! empty( $sub_steps ) ) {\n\t\t\t\t\t\t\t\t\t$steps_parents = array_merge( $steps_parents, $sub_steps );\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\tif ( ! empty( $steps_parents ) ) {\n\t\t\t\t\t\t\t\t$steps_reversed = array_merge( $steps_reversed, $steps_parents );\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\treturn $steps_reversed;\n\t\t}", "title": "" }, { "docid": "b9e03c14e871e810ad970a2b6f403d01", "score": "0.46987283", "text": "protected function parseArray($array)\n\t{\n\t\t$array = preg_replace('/^\\s*\\[\\s*(.*)\\s*\\]\\s*$/usm', \"$1\", $array);\n\n\t\t$depth = 0;\n\t\t$buffer = '';\n\t\t$result = array();\n\t\t$insideString = false;\n\t\t$insideComment = false;\n\n\t\t// TODO: This is a 80% duplicate of the logic in the parse() method.\n\t\t// Find a way to combine these blocks\n\t\tfor($i = 0; $i < strlen($array); $i++) {\n\n\t\t\tif(!$insideString && $array[$i] === '[') {\n\t\t\t\t$depth++;\n\t\t\t}\n\n\t\t\tif(!$insideString && $array[$i] === ']') {\n\t\t\t\t$depth--;\n\t\t\t}\n\n\t\t\tif($array[$i] === '\"' && ((isset($array[$i-1]) && $array[$i-1] !== '\\\\') || $i === 0)) {\n\t\t\t\t$insideString = !$insideString;\n\t\t\t}\n\n\t\t\tif(!$insideString && $array[$i] === '#') {\n\t\t\t\t$insideComment = true;\n\t\t\t}\n\n\t\t\tif(!$insideString && $array[$i] === ',' && 0 === $depth) {\n\t\t\t\t$result[] = $this->parseValue(trim($buffer));\n\t\t\t\t$this->validateArrayElementTypes($result);\n\t\t\t\t$buffer = '';\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif($array[$i] === \"\\n\") {\n\t\t\t\t$insideComment = false;\n\t\t\t}\n\n\t\t\tif($insideComment === true) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$buffer.= $array[$i];\n\t\t}\n\n\t\t// Detect if array hasnt been closed properly\n\t\tif(0 !== $depth) {\n\t\t\tthrow new \\Exception(sprintf('Unclosed array on line %s', $this->lineNum));\n\t\t}\n\n\t\t// whatever meaningful text left in the buffer should be the last element\n\t\tif($buffer = trim($buffer)) {\n\t\t\t$result[] = $this->parseValue($buffer);\n\t\t\t$this->validateArrayElementTypes($result);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0a8880a425be4865144f1ebb773bd412", "score": "0.4663097", "text": "public function parse()\n {\n // Array\\n\n $this->arrayStart();$this->lf();\n // (\\n\n $this->braceOpen();$this->lf();\n //)\n $this->braceClose();\n return array();\n }", "title": "" }, { "docid": "a1fe72288df0aad024262acbd19b5b45", "score": "0.4587024", "text": "protected function unfold(array $lines)\n {\n $string = implode(PHP_EOL, $lines);\n $string = str_ireplace('&nbsp;', ' ', $string);\n $string = preg_replace('/' . PHP_EOL . '[ \\t]/', '', $string);\n\n $lines = explode(PHP_EOL, $string);\n\n return $lines;\n }", "title": "" }, { "docid": "e0852469a5db6537517616f7a20cf493", "score": "0.4586858", "text": "private function tfaFullSetupSteps() {\n $steps = array();\n $plugins = array(\n 'tfa_totp',\n 'tfa_basic_sms',\n 'tfa_basic_trusted_browser',\n 'tfa_recovery_code',\n );\n $config = $this->config('tfa_basic.settings');\n foreach ($plugins as $plugin) {\n if ($plugin === $config->get('tfa_validate_plugin', '') ||\n in_array($plugin, $config->get('fallback_plugins', array())) ||\n in_array($plugin, $config->get('login_plugins', array()))) {\n $steps[] = $plugin;\n }\n }\n return $steps;\n }", "title": "" }, { "docid": "7f2cafefc4e1fe85a106e2618f1171de", "score": "0.4586277", "text": "function GetHookElements()\n {\n $ret = array();\n $cmd = $this->config->get_cfg_value(\"servrepository\", \"repositoryBranchHook\");\n if(!empty($cmd)){\n $res = shell_exec($cmd);\n $res2 = trim($res);\n if(!$res || empty($res2)){\n msg_dialog::display(_(\"Error\"), msgPool::cmdexecfailed(\"repositoryBranchHook\", $cmd, _(\"Repository service\")), ERROR_DIALOG);\n }else{ \n $tmp = preg_split(\"/\\n/\",$res);\n foreach($tmp as $hook){\n /* skip empty */\n if(empty($hook)) continue;\n\n if(preg_match(\"/;/\",$hook)){ \n $hookinfo = explode(\";\",$hook);\n $ret[$hookinfo[0]] = $hookinfo[0];\n }else{\n $ret[$hook] = $hook;\n }\n }\n }\n }\n return($ret);\n }", "title": "" }, { "docid": "8f985887447bec3aa597ff8225877383", "score": "0.45618966", "text": "public function setSteps($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\NetworkManagement\\V1\\Step::class);\n $this->steps = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "0ee84e4fb0963de07fc3bf3891a82d5c", "score": "0.45475474", "text": "function _flatten_array( $array, $cut_branch = 0, $keep_child_array_keys = true )\n\t{\n\t\tif ( !is_array( $array ) ) {\n\t\t\treturn $array;\n\t\t}\n\n\t\tif ( empty( $array ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$temp = array();\n\t\tforeach ( $array as $k => $v ) {\n\t\t\tif ( $cut_branch && $k == $cut_branch )\n\t\t\t\tcontinue;\n\t\t\tif ( is_array( $v ) ) {\n\t\t\t\tif ( $keep_child_array_keys ) {\n\t\t\t\t\t$temp[$k] = true;\n\t\t\t\t}\n\t\t\t\t$temp += BP_SQL_Schema_Parser::_flatten_array( $v, $cut_branch, $keep_child_array_keys );\n\t\t\t} else {\n\t\t\t\t$temp[$k] = $v;\n\t\t\t}\n\t\t}\n\t\treturn $temp;\n\t}", "title": "" }, { "docid": "5bcadb4c46ed29ea6b0a0a3c481bd842", "score": "0.4497535", "text": "protected function steps_grouped_by_type( $steps = array() ) {\n\t\t\t$steps_by_type = array();\n\n\t\t\tif ( ! empty( $steps ) ) {\n\t\t\t\tforeach ( $steps as $steps_type => $steps_type_set ) {\n\t\t\t\t\tif ( ! isset( $steps_by_type[ $steps_type ] ) ) {\n\t\t\t\t\t\t$steps_by_type[ $steps_type ] = array();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( is_array( $steps_type_set ) ) && ( ! empty( $steps_type_set ) ) ) {\n\t\t\t\t\t\tforeach ( $steps_type_set as $step_id => $step_id_set ) {\n\t\t\t\t\t\t\t$steps_by_type[ $steps_type ][] = $step_id;\n\t\t\t\t\t\t\tif ( ( is_array( $step_id_set ) ) && ( ! empty( $step_id_set ) ) ) {\n\t\t\t\t\t\t\t\t$sub_steps = $this->steps_grouped_by_type( $step_id_set );\n\t\t\t\t\t\t\t\tif ( ! empty( $sub_steps ) ) {\n\t\t\t\t\t\t\t\t\tforeach ( $sub_steps as $sub_step_type => $sub_step_ids ) {\n\t\t\t\t\t\t\t\t\t\tif ( ! isset( $steps_by_type[ $sub_step_type ] ) ) {\n\t\t\t\t\t\t\t\t\t\t\t$steps_by_type[ $sub_step_type ] = array();\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( ! empty( $sub_step_ids ) ) {\n\t\t\t\t\t\t\t\t\t\t\t$steps_by_type[ $sub_step_type ] = array_merge( $steps_by_type[ $sub_step_type ], $sub_step_ids );\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}\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\treturn $steps_by_type;\n\t\t}", "title": "" }, { "docid": "6fe1dc4232241e8c995274f92e7b7dcd", "score": "0.44755164", "text": "private function buildRoadBack(Step $currentStep)\n {\n $roadBack = array ();\n\n $lastStepId = $this->session->get('lastStepId');\n $lastStep = $this->stepManager->get($lastStepId);\n\n if ($lastStep) {\n $currentStepLevel = $currentStep->getLvl();\n $lastStepParents = $lastStep->getParents();\n\n if ($lastStepParents) {\n if (in_array($currentStep, $lastStepParents)) {\n foreach ($lastStepParents as $lastStepParent) {\n if ($lastStepParent->getLvl() > $currentStepLevel) {\n $ghost[] = $lastStepParent;\n }\n }\n $roadBack[] = $lastStep;\n }\n }\n }\n\n return $roadBack;\n }", "title": "" }, { "docid": "d5f856168a26775510ca6005d11025ac", "score": "0.4463663", "text": "function array_unfold($arr, $fold_arr = array(), $parent = ''){\n\t\tforeach ($arr as $arr_key => $arr_val){\n\t\t\tif (is_array($arr[$arr_key])){\n\t\t\t\tif ($parent == ''){\n\t\t\t\t\t$fold_arr = array_merge($fold_arr, $this->array_unfold($arr[$arr_key], $fold_arr, $arr_key));\n\t\t\t\t\t$temp = $arr[$arr_key];\n\t\t\t\t\tforeach ($temp as $key => $item) {\n\t\t\t\t\t\tif (empty($item)) { unset($temp[$key]); }\n\t\t\t\t\t}\n \n\t\t\t\t\t$fold_arr = array_merge($fold_arr, array( $arr_key => join(MULTI_SEPARATOR,$temp)) );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$fold_arr = array_merge($fold_arr, $this->array_unfold($arr[$arr_key], $fold_arr, $parent . '[' . $arr_key . ']'));\n\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif ($parent == ''){\n\t\t\t\t\t$fold_arr[$arr_key] = $arr_val;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$fold_arr[$parent . '[' . $arr_key . ']'] = $arr_val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $fold_arr;\n\t}", "title": "" }, { "docid": "555713f45f36ca70a374499c1c486033", "score": "0.4455344", "text": "public function get_steps($parsed = false, $limit = false) {\n\t\t$game_log = $this->_file[FILE_GAME_LOG];\n\n\t\tif (false !== $limit) {\n\t\t\t$game_log = array_slice($game_log, 0, $limit + 1);\n\t\t}\n\n\t\tif ( ! $parsed) {\n\t\t\treturn $game_log;\n\t\t}\n\n\t\t$game_log = array_reverse($game_log);\n\t\t$trade_bonus = $this->_extra_info['trade_card_bonus'];\n\n\t\t$logs = [];\n\t\tforeach ($game_log as $data) {\n\t\t\t$log = [\n\t\t\t\t'data' => $data,\n\t\t\t\t'message' => self::parse_move_info($data, $trade_bonus, $game_id = 0, $logs),\n\t\t\t];\n\n\t\t\t$logs[] = $log;\n\t\t}\n\n\t\treturn $logs;\n\t}", "title": "" }, { "docid": "687ebbc365c090f523bfa140fa9baf6e", "score": "0.44351038", "text": "public function getUndefinedStepsSnippets()\n {\n $snippets = '';\n\n foreach ($this->undefinedSteps as $id => $regexp) {\n $snippets .= sprintf(\"\\n\\n%s\", $regexp);\n }\n\n return $snippets;\n }", "title": "" }, { "docid": "c68caaa226d3c6114048dc50403a1b2d", "score": "0.44129178", "text": "public function testArrayTraverse() {\n $fixture = $this->__fixturesDir . DIRECTORY_SEPARATOR . 'traverse.json';\n $result = [];\n $function = function(array $inCurrent, $isLead, $inParent, &$inOutResult) {\n $inOutResult[] = $inCurrent['data'];\n };\n Tree::arrayTraverse($this->__treeAsArray, $function, $result);\n $this->assertJsonStringEqualsJsonFile($fixture, json_encode($result));\n }", "title": "" }, { "docid": "04a324087fcdc8424cd4008d1bac6d88", "score": "0.4400556", "text": "function inflate_nested_array($arr, $divider_char = \"/\") {\n if (!is_array($arr)){ return false; }\n $split = '/' . preg_quote($divider_char, '/') . '/';\n $ret = array();\n foreach ($arr as $key => $val) {\n $parts = preg_split($split, $key, -1, PREG_SPLIT_NO_EMPTY);\n $leafpart = array_pop($parts);\n $parent = &$ret;\n foreach ($parts as $part) {\n if (!isset($parent[$part])) {\n $parent[$part] = array();\n } elseif (!is_array($parent[$part])) {\n $parent[$part] = array();\n }\n $parent = &$parent[$part];\n }\n if (empty($parent[$leafpart])) {\n $parent[$leafpart] = $val;\n }\n }\n return $ret;\n}", "title": "" }, { "docid": "de38a0b550d7848b0875193fa403e335", "score": "0.437464", "text": "protected function steps_grouped_reverse_keys( $steps = array() ) {\n\t\t\t$steps_reversed = $this->_steps_reverse_keys_walk( $steps );\n\t\t\tif ( ! empty( $steps_reversed ) ) {\n\t\t\t\tforeach ( $steps_reversed as $reversed_key => $reversed_set ) {\n\t\t\t\t\tif ( ! empty( $reversed_set ) ) {\n\t\t\t\t\t\t$steps_reversed[ $reversed_key ] = $this->_flatten_item_parent_steps( $reversed_set );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$steps_reversed[ $reversed_key ] = array();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $steps_reversed;\n\t\t}", "title": "" }, { "docid": "761427e5a249559aff55e77daf2e5d33", "score": "0.43726024", "text": "function clean_input_array($arr) {\n\tif (!is_array($arr)) return $arr;\n\tif (count($arr) == 1 && !$arr[0]) return array();\n\treturn $arr;\n}", "title": "" }, { "docid": "fa0ab09ac8a75b5bffb26510886b5725", "score": "0.4372393", "text": "public function parseArray(array $arr): array\n {\n array_walk_recursive($arr, function (&$v) {\n $v = $this->parseString($v);\n });\n return $arr;\n }", "title": "" }, { "docid": "1d0a16ba0641165791ac53ed98e6d842", "score": "0.43587205", "text": "public function getSteps()\n {\n return $this->steps;\n }", "title": "" }, { "docid": "1d0a16ba0641165791ac53ed98e6d842", "score": "0.43587205", "text": "public function getSteps()\n {\n return $this->steps;\n }", "title": "" }, { "docid": "c335da03b88375efc82dd48087f17ee1", "score": "0.4342451", "text": "public function transformBackward(array $data): array\n {\n $data = $this->eventManager->filter(\n 'Shopware_Components_SwagImportExport_Transformers_FlattenTransformer_TransformBackward',\n $data,\n ['subject' => $this]\n );\n\n $mainNode = $this->getMainIterationPart();\n $this->processIterationParts($mainNode);\n $tree = [];\n\n foreach ($data as $row) {\n $tree[] = $this->transformToTree($mainNode, $row, $mainNode['name']);\n }\n\n return $tree;\n }", "title": "" }, { "docid": "8a32900bfdcb7949ccb334833c556a9c", "score": "0.43413386", "text": "protected function cleanEvaluationForDebugger(array $evaluation) {\n\t\tunset($evaluation['tsObject']);\n\t\tunset($evaluation['metaConfiguration']['class']);\n\t\tunset($evaluation['configuration']['__meta']);\n\t\tunset($evaluation['configuration']['__objectType']);\n\n\t\tif (isset($evaluation['children'])) {\n\t\t\tforeach ($evaluation['children'] as $key => $childEvaluation) {\n\t\t\t\t$evaluation['children'][$key] = $this->cleanEvaluationForDebugger($childEvaluation);\n\t\t\t}\n\t\t}\n\n\t\treturn $evaluation;\n\t}", "title": "" }, { "docid": "c34f029d6d93d5b8d4b716d14693861f", "score": "0.4327209", "text": "public static function succeedingValuesBeforeFix(): array\n {\n return [\n 'string=\"test\"' => ['name', 'test', 'test2'],\n 'int=1' => ['counter', 1, 1],\n 'bool=true' => ['enabled', true, 1],\n 'json=[null]' => ['extra', [null], 1],\n 'json=1' => ['extra', 1, 1],\n 'json=1.1' => ['extra', 1.1, 1],\n 'json=true' => ['extra', true, 1],\n 'json=\"test\"' => ['extra', 'test', 'test'],\n 'json=\"1\"' => ['extra', '1', 1],\n ];\n }", "title": "" }, { "docid": "a98cf227fbe641047ca614d73228cce9", "score": "0.43251103", "text": "protected static function _getParentItemDirectoryClasses($componentClass, $steps = null)\n {\n $ret = array();\n foreach (Kwc_Abstract::getComponentClasses() as $class) {\n foreach (Kwc_Abstract::getChildComponentClasses($class) as $childClass) {\n if ($childClass == $componentClass) {\n if ($steps === 0) {\n $ret[] = $class;\n } else if (is_null($steps)) {\n if (is_instance_of($class, 'Kwc_Directories_Item_Directory_Component')) {\n $ret[] = $class;\n }\n } else {\n $ret = array_merge(\n $ret,\n self::_getParentItemDirectoryClasses($class, $steps - 1)\n );\n }\n }\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "d9bf7e499721dbdf7eb13b21f7bd2087", "score": "0.43207654", "text": "public static function extract(array $data, string $path)\n {\n if ('' === $path) {\n return $data;\n }\n\n $steps = explode('.', $path);\n $actual = $data;\n foreach ($steps as $step) {\n if (!array_key_exists($step, $actual)) {\n return null;\n }\n\n $actual = $actual[$step];\n }\n\n return $actual;\n }", "title": "" }, { "docid": "a1369fe719fd1a1f29cd535da1691171", "score": "0.43102327", "text": "public function getTeardownSteps(): array\n {\n return $this->teardownSteps;\n }", "title": "" }, { "docid": "d2b7bb9e2e635a5066767f3d08197942", "score": "0.4301419", "text": "protected function pathsToArray($str)\n {\n $array = array();\n $lines = explode(\"\\n\", trim($str));\n\n if (!empty($lines[0]))\n {\n foreach ($lines as $line)\n {\n list($path, $value) = explode(' = ', $line);\n\n $steps = explode('/', $path);\n array_shift($steps);\n\n $insertion =& $array;\n\n foreach ($steps as $step)\n {\n if (!isset($insertion[$step]))\n {\n $insertion[$step] = array();\n }\n $insertion =& $insertion[$step];\n }\n $insertion = ctype_digit($value) ? (int) $value : $value;\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "f8a9d044d237fd5a6b3bec99a24201fd", "score": "0.42941412", "text": "final public function uninstallProcessGitIgnoreDataProvider(): array {\n\n $reverseInstall = [];\n foreach ($this->installProcessGitIgnoreDataProvider() as [$a, $b]) {\n $reverseInstall[] = [$b, $a];\n }\n\n $extraCases = [\n [\n \"# Ignore Composer-managed dependencies.\\n/vendor\\n\" . self::GITIGNORE_VAGRANT_LINE . self::GITIGNORE_TARGET_LOCAL_CONFIG_FILENAME_LINE . \"# Ignore binaries.\\n/bin\\n\",\n \"# Ignore Composer-managed dependencies.\\n/vendor\\n# Ignore binaries.\\n/bin\\n\",\n ],\n [\n ltrim(self::GITIGNORE_VAGRANT_LINE) . self::GITIGNORE_TARGET_LOCAL_CONFIG_FILENAME_LINE,\n '',\n ],\n [\n self::GITIGNORE_VAGRANT_LINE . ltrim(self::GITIGNORE_TARGET_LOCAL_CONFIG_FILENAME_LINE),\n '',\n ],\n [\n ltrim(self::GITIGNORE_VAGRANT_LINE) . ltrim(self::GITIGNORE_TARGET_LOCAL_CONFIG_FILENAME_LINE),\n '',\n ],\n [\n \"\\n\\n\" . self::GITIGNORE_VAGRANT_LINE . self::GITIGNORE_TARGET_LOCAL_CONFIG_FILENAME_LINE,\n '',\n ],\n [\n self::GITIGNORE_VAGRANT_LINE . self::GITIGNORE_TARGET_LOCAL_CONFIG_FILENAME_LINE . \"\\n\\n\\n\",\n '',\n ],\n [\n \"\\n\\n\" . self::GITIGNORE_VAGRANT_LINE . self::GITIGNORE_TARGET_LOCAL_CONFIG_FILENAME_LINE . \"\\n\",\n '',\n ],\n ];\n\n return array_merge($reverseInstall, $extraCases);\n }", "title": "" }, { "docid": "0e1e4a269c1f2add45991121ebee341b", "score": "0.42934045", "text": "public static function cleanArray(array $data, int $depth = 0)\n {\n if (empty($data)) return [];\n\n $cleanData = [];\n $depth--;\n foreach ($data as $key => $item)\n {\n if (is_string($data) || is_numeric($data))\n {\n $cleanData[$key] = self::cleanValue($item);\n }\n else if ($depth >= 0)\n {\n $cleanData[$key] = self::cleanArray($item, $depth);\n }\n }\n return $cleanData;\n }", "title": "" }, { "docid": "820b73d821e2a4ce51b7dc8cdf5953f0", "score": "0.4292482", "text": "function ouwiki_get_restore_array(&$current,$multiple,$single) {\n if(isset($current[$multiple][0]['#'][$single])) {\n return $current[$multiple][0]['#'][$single];\n } else {\n return array();\n } \n}", "title": "" }, { "docid": "b117fdeb6ed65ab003ff262f53c39ffc", "score": "0.42880887", "text": "function parse_walk_array ($array, $names) {\r\n\tglobal $stringType, $nameType;\r\n\tif (!is_array($nameType[$names])) return;\r\n\t$reg= \"/<\".$stringType.\">(.+?)<\\/\".$stringType.\">/is\";\r\n\t$i=0;\r\n\tforeach ($array as $whole_line) {\r\n\t\t$name=$nameType[$names][$i];\r\n\t\tif (is_array($whole_line)) $return[$name]=$whole_line;\r\n\t\telse {\r\n\t\t\t$try=preg_match($reg, $whole_line, $matches);\r\n\t\t\tif ($try=0) $return[$name]='';\r\n\t\t\telse {\r\n\t\t\t\t@list($whole, $type, $value)=$matches;\r\n\t\t\t\tif ($type!='struct') $return[$name]=$value;\r\n\t\t\t\telse $return[$name]=parse_struct($value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$i+=1;\r\n\t\tunset ($try, $name, $whole, $type, $value);\r\n\t}\r\n\treturn $return;\r\n}", "title": "" }, { "docid": "63fc76028ad9711aa3cfabbcdfa1f906", "score": "0.4279304", "text": "public function steps()\n {\n return $this->steps;\n }", "title": "" }, { "docid": "0b979371884bf8f7bfa3d02c29a60b33", "score": "0.42745098", "text": "protected function parseData(array $data): array\n {\n $newData = [];\n\n foreach ($data as $key => $value) {\n if (\\is_array($value)) {\n return $this->parseData($value);\n }\n $newData[$key] = $value;\n }\n\n return $newData;\n }", "title": "" }, { "docid": "eca550f0fa4a0910c28b448b52db6051", "score": "0.42493433", "text": "private function parse_rules()\n\t{\n\t\t$rules = [];\n\n\t\tforeach ($this->rules as $id => $rule)\n\t\t{\n\t\t\tif (!is_array($rule))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$rules[$id]['action'] = NULL;\n\t\t\t$rules[$id]['message'] = NULL;\n\t\t\t$rules[$id]['conditions'] = [];\n\n\t\t\tforeach ($rule as $rule_part)\n\t\t\t{\n\t\t\t\t// Assigning action\n\t\t\t\tif (is_null($rules[$id]['action']) AND ($rule_part == 'allow' OR $rule_part == 'deny' OR $rule_part == 'drop'))\n\t\t\t\t{\n\t\t\t\t\t$rules[$id]['action'] = $rule_part;\n\t\t\t\t}\n\n\t\t\t\t// Assigning message\n\t\t\t\telseif (is_null($rules[$id]['message']) AND is_string($rule_part))\n\t\t\t\t{\n\t\t\t\t\t$rules[$id]['message'] = $rule_part;\n\t\t\t\t}\n\n\t\t\t\t// Assugning conditions\n\t\t\t\telseif (is_array($rule_part) AND sizeof($rule_part) >= 2)\n\t\t\t\t{\n\t\t\t\t\t$rules[$id]['conditions'][] = $this->parse_condition($rule_part);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (is_null($rules[$id]['action']))\n\t\t\t{\n\t\t\t\tunset($rules[$id]);\n\t\t\t}\n\t\t}\n\n\t\t$this->rules = $rules;\n\t}", "title": "" }, { "docid": "425668795103d3357be1f78328767357", "score": "0.4238898", "text": "public function An_Unexpected_Journey()\n {\n $wizard = Gandalf::knownAs('the Grey');\n $dwarfKing = Thorin::knownAs('Oakenshield');\n $burglar = Bilbo::knownAs('the Hobbit');\n return array(\n $wizard,\n $dwarfKing,\n $burglar\n );\n }", "title": "" }, { "docid": "0ca9d560b10eec2dbadf4a5861977863", "score": "0.42330828", "text": "function get_problem_arr($relative_path)\n{\n $problem = file_get_contents(dirname(__FILE__).$relative_path);\n //explode string and seperate them in to arrays\n $text_rows = explode(\"\\n\",$problem);\n //explode each row into an associate array\n\n $lang_row_arr = array();\n foreach ($text_rows as $key => $text_row) {\n $lang_row = parse_text_row($text_row);\n //check if row is not empty\n if($text_row != \"\"){\n array_push($lang_row_arr, $lang_row);\n }\n }\n\n return $lang_row_arr;\n}", "title": "" }, { "docid": "2c2955a39b13ff9fe4fb8180ca89d051", "score": "0.42308298", "text": "public function get_tree_history() {\n $rta = array();\n if (is_array($this->path) && count($this->path) >= 1) {\n for ($i = 0; $i <= $this->path_max; $i++) {\n switch ($i) {\n case 0:\n $rta[$i][\"question\"] = \"Canal\";\n $rta[$i][\"ans\"] = $this->get_division()->get_prop(\"nombre\");\n $rta[$i][\"path\"] = \"D\" . $this->get_division()->get_prop(\"id\");\n break;\n case 1:\n $rta[$i][\"question\"] = \"Tipo\";\n $rta[$i][\"ans\"] = $this->get_system()->get_prop(\"nombre\");\n $rta[$i][\"path\"] = $rta[$i - 1][\"path\"] . \",S\" . $this->get_system()->get_prop(\"id\");\n break;\n default:\n $o = $this->path_obj[$i];\n $q = $this->objsCache->get_object(\"Question\", $o->get_prop(\"idpregunta\"),false,true);\n $rta[$i][\"question\"] = $q->get_prop(\"texto\");\n $rta[$i][\"ans\"] = $o->get_prop(\"texto\");\n $rta[$i][\"path\"] = $rta[$i - 1][\"path\"] . \",O\" . $o->get_prop(\"id\");\n break;\n }\n }\n return $rta;\n }\n return NULL;\n }", "title": "" }, { "docid": "df3d37a5053b86e3581a339dd614ad9d", "score": "0.42102456", "text": "function process($source) {\n\t\t// limpiando los datos del arreglo\n\t\tif (is_array($source))\t {\n\t\t\tfor ($i = 0; $i < count($source); $i++)\n\t\t\t\tif (is_string($source[$i])) $source[$i] = $this->remove($this->decode($source[$i]));\n\t\t\treturn $source;\n\t\t// limpiando el string\n\t\t} else if (is_string($source)) return $this->remove($this->decode($source));\t\t\t\t\t\t\t\n\t\t// retornando los recursos obtenidos\n\t\telse return $source;\t\n\t}", "title": "" }, { "docid": "dab6ba4582ccf01c47248f92286745b7", "score": "0.42085525", "text": "private function removeEmptyLines(array $lines): array\n {\n $out = [];\n foreach ($lines as $line) {\n $marker = trim($line);\n if ($marker === '' || substr($marker, 0, 2) === '# ' || substr($line, 0, 3) === '---' || substr($line, 0, 5) === '%YAML') {\n continue;\n }\n $out[] = $line;\n }\n \n return $out;\n }", "title": "" }, { "docid": "1d2b543435937a6a6364d220094da113", "score": "0.42059702", "text": "public function flatIssues($classified_issues)\n {\n $issues = [];\n foreach ($classified_issues as $some)\n {\n foreach ($some as $one)\n {\n $issues[] = $one;\n }\n }\n return $issues;\n }", "title": "" }, { "docid": "6acb611c9c16550c02869d580b29f47a", "score": "0.42007348", "text": "function bugs_get_quater_split_by_mile(&$mile_bugs, &$bugs)\n{\n $mile_bugs = array();\n foreach ($bugs as $bug) {\n if ( !isset($mile_bugs[$bug->m_target_milestone]) ) {\n $mile_bugs[$bug->m_target_milestone] = array();\n }\n $mile_bugs[$bug->m_target_milestone][] = $bug;\n }\n}", "title": "" }, { "docid": "bb2201a73d4db33ef7c97911ebb5864b", "score": "0.41867313", "text": "function doFeature(&$steps, $featureFilename) {\r\n global $firstScenarioOnly, $FEATURE_NAME, $FEATURE_LONGNAME;\r\n global $skipping; \r\n $GROUP = basename(dirname(dirname($featureFilename)));\r\n $FEATURE_NAME = str_replace('.feature', '', basename($featureFilename));\r\n $FEATURE_LONGNAME = $FEATURE_NAME; // default English description of feature, in case it's missing from feature file\r\n $FEATURE_HEADER = '';\r\n $TESTS = '';\r\n $SETUP_LINES = '';\r\n $skipping = FALSE;\r\n \r\n $lines = explode(\"\\n\", file_get_contents($featureFilename));\r\n\r\n // Parse into sections and scenarios\r\n $section_headers = explode(' ', 'Feature Variants Setup Scenario');\r\n $sections = $scenarios = array();\r\n $variantGroups = array();\r\n\r\n while (!is_null($line = array_shift($lines))) {\r\n if (!($line = trim($line))) continue; // ignore blank lines\r\n if (substr($line, 0, 1) == '#') continue; // ignore comment lines\r\n $any = preg_match('/^([A-Z]+)/i', $line, $matches);\r\n $word1 = $word1_original = $any ? $matches[1] : '';\r\n $tail = trim(substr($line, strlen($word1) + 1));\r\n\r\n if ($word1 == 'Skip' or $word1 == 'Resume') {\r\n $skipping = ($word1 == 'Skip');\r\n } elseif (@$skipping) {\r\n continue;\r\n } elseif (in_array($word1, $section_headers)) {\r\n $state = $word1;\r\n switch ($word1) {\r\n case 'Feature':\r\n $FEATURE_HEADER .= \"//\\n// $line\\n\";\r\n $FEATURE_LONGNAME = $tail;\r\n break;\r\n case 'Scenario': \r\n $testFunction = 'test' . (preg_replace(\"/[^A-Z]/i\", '', ucwords($tail))); \r\n $scenarios[$testFunction] = array($line);\r\n break;\r\n case 'Variants':\r\n $variantGroups[] = $variantCount = count(@$sections['Variants'] ?: []);\r\n if (@$sections['Setup'] and !isset($firstVariantAfterSetup)) $firstVariantAfterSetup = $variantCount;\r\n }\r\n } elseif ($state == 'Scenario') {\r\n $scenarios[$testFunction][] = $line;\r\n } else $sections[$state][] = $line;\r\n }\r\n\r\n foreach (@$sections['Feature'] ?: [] as $line) $FEATURE_HEADER .= \"// $line\\n\"; // parse features\r\n\r\n $variants = parseVariants(@$sections['Variants']); // if empty, return a single line that will get replaced with itself\r\n if (!isset($firstVariantAfterSetup)) $firstVariantAfterSetup = count($variants); // in case all variants are pre-setup\r\n if (!@$variantGroups) $variantGroups = array(0);\r\n $g9 = count($variantGroups);\r\n $variantGroups[] = count($variants); // point past the end of the last group (for convenience)\r\n\r\n for ($g = 0; $g < $g9; $g++) { // for each variant group, parse setups and scenarios with all their variants\r\n $start = $variantGroups[$g]; // pointer to first line of variant group\r\n $next = $variantGroups[$g + 1]; // pointer past last line of variant group\r\n $preSetup = ($start < $firstVariantAfterSetup); // whether to make changes to setup steps as well as scenarios\r\n for ($i = $start + ($start > 0 ? 1 : 0); $i < $next; $i++) { // for each variant in group (do unaltered scenario only once)\r\n if ($i == 0 or $preSetup) if (@$sections['Setup']) $SETUP_LINES .= doSetups($steps, $sections['Setup'], $variants, $start, $i);\r\n foreach ($scenarios as $testFunction => $lines) $TESTS .= doScenario($steps, $testFunction, $lines, $variants, $start, $i);\r\n }\r\n }\r\n\r\n return compact(ray('GROUP,FEATURE_NAME,FEATURE_LONGNAME,FEATURE_HEADER,SETUP_LINES,TESTS'));\r\n}", "title": "" }, { "docid": "fb3d33c2b03cf455214bbd20843001b7", "score": "0.41804236", "text": "public function restructure_worklog($data_array)\n\t{\n\t\t// change the partial-array to full-array just in case.\n\t\t$data_array = json_decode(json_encode($data_array), true);\n\t\t\n\t\tif(\n\t\t ($data_array['@attributes']['number_of_worklogs'] > 1)\n\t\t && isset($data_array['worklog'][0])\n\t\t)\n\t\t{}\n\t\telseif($data_array['@attributes']['number_of_worklogs'] == 0){\n\t\t\t$data_array['worklog'] = \"\";\n\t\t}\n\t\telseif( !isset($data_array['worklog']) ){\n\t\t\t$data_array['worklog'] = \"\";\n\t\t}\n\t\telseif(\n\t\t ($data_array['@attributes']['number_of_worklogs'] == 1)\n\t\t && !isset($data_array['worklog']['username']))\n\t\t{\n\t\t\t$data_array['worklog'] = \"\";\n\t\t\tprint_r($data_array);\n\t\t}\n\t\telseif(\n\t\t ($data_array['@attributes']['number_of_worklogs'] == 1)\n\t\t && isset($data_array['worklog']['username']))\n\t\t{\n\t\t\tforeach($data_array['worklog'] as $f => $d)\n\t\t\t{\n\t\t\t\t$output_array['worklog'][0][$f] = $d;\n\t\t\t}\n\t\t\t$data_array['worklog'] = $output_array['worklog'];\n\t\t\t//print_r($data_array);\n\t\t}\n\t\treturn $data_array;\n\t}", "title": "" }, { "docid": "e35a59379ebeb8bd9ead4683a6db4c64", "score": "0.41781124", "text": "function _unserializeArray($text) {\r\n $r = array();\r\n do {\r\n $f = $this->getNextToken($text,$i,$type);\r\n switch ( $type ) {\r\n case IN_STRING:\r\n case IN_ATOMIC:\r\n $r[] = $f;\r\n break;\r\n case IN_OBJECT:\r\n $r[] = $this->unserialize(\"{\".$f.\"}\");\r\n $i--;\r\n break;\r\n case IN_ARRAY: \r\n $r[] = $this->_unserializeArray($f);\r\n $i--;\r\n break;\r\n \r\n }\r\n $this->getNextToken($text,$i,$type);\r\n } while ( $type == IN_ENDSTMT);\r\n \r\n return $r;\r\n }", "title": "" }, { "docid": "a0f3fb4669baa601a4ff6403872be548", "score": "0.41670665", "text": "public function providerDecodeTests() {\n $data = [\n // NULL files.\n ['', NULL],\n [\"\\n\", NULL],\n [\"---\\n...\\n\", NULL],\n\n // Node anchors.\n [\n \"\njquery.ui:\n version: &jquery_ui 1.10.2\n\njquery.ui.accordion:\n version: *jquery_ui\n\",\n [\n 'jquery.ui' => [\n 'version' => '1.10.2',\n ],\n 'jquery.ui.accordion' => [\n 'version' => '1.10.2',\n ],\n ],\n ],\n ];\n\n // 1.2 Bool values.\n foreach ($this->providerBoolTest() as $test) {\n $data[] = ['bool: ' . $test[0], ['bool' => $test[1]]];\n }\n $data = array_merge($data, $this->providerBoolTest());\n\n return $data;\n }", "title": "" }, { "docid": "84692e1e8fc7fa3126a584416fdc1219", "score": "0.41621712", "text": "public function getRouteAsArray()\n {\n $route = trim($this->route, '/');\n $routes = explode('/', $route);\n $cleanRoute = [];\n foreach ($routes as $route) {\n if (trim($route) != '') {\n $cleanRoute[] = $route;\n }\n }\n return $cleanRoute;\n }", "title": "" }, { "docid": "7c29702f53367123617a73648cad8b9e", "score": "0.41600642", "text": "private static function convertNodeToArray(string $node): array {\n $m = preg_split(\"/'[^']*'(*SKIP)(*F)|(,\\s)+/\", $node);\n $args = array();\n foreach ($m as $v) {\n if(strpos($v, \" => \")) {\n $v = explode(\" => \", $v, 2);\n $t = array();\n $t = explode(\", \", $v[1]);\n $t[0] = ltrim($t[0], \"'\");\n $t[count($t) - 1] = rtrim($t[count($t) - 1], \"'\");\n if(count($t) == 1) {\n $t = $t[0];\n }\n //dump($t);\n if($v[0] !== \"validator\") {\n if(is_array($t)) {\n $t = implode(\", \", $t);\n }\n }\n $args[$v[0]] = $t;\n\n }\n }\n return $args;\n }", "title": "" }, { "docid": "fcd350c469895dc493c6d15b06ab79aa", "score": "0.41510972", "text": "private function unParseMultiArrays() {\n foreach ($this->content as $section => $array) {\n foreach ($array as $row => $value) {\n if (is_array($value)) {\n $this->content[$section . 'Content'] = $value;\n $this->content[$section][$row] = '{{' . $section . 'Content}}';\n }\n }\n }\n }", "title": "" }, { "docid": "575a02b9d338d502f76091fa0e00c147", "score": "0.41488898", "text": "public function maybe_skip_preview( $steps ) {\n\t\tif ( ! empty( $_POST['submit_job'] ) && $_POST['submit_job'] === 'submit--no-preview' && isset( $steps['preview'] ) ) {\n\t\t\tunset( $steps['preview'] );\n\t\t}\n\n\t\treturn $steps;\n\t}", "title": "" }, { "docid": "470452314fa55f6718eff2859b074f09", "score": "0.41444302", "text": "public function flatternDataSet(){\n return [\n [\n [\n [1, 2, 3], 4, 5\n ],\n [\n 1, 2, 3, 4, 5\n ]\n ],\n [\n ['a' => 'alpha', 'b' => 'bravo'],\n ['alpha', 'bravo']\n ]\n ];\n }", "title": "" }, { "docid": "21cae24a95d3f59147685f921d6f2f69", "score": "0.4143687", "text": "protected function linesElements(array $lines){\n\t\t$Elements = array();\n\t\t$CurrentBlock = null;\n\n\t\tforeach ($lines as $line){\n\t\t\tif (chop($line) === ''){\n\t\t\t\tif (isset($CurrentBlock)){\n\t\t\t\t\t$CurrentBlock['interrupted'] = (isset($CurrentBlock['interrupted'])\n\t\t\t\t\t\t? $CurrentBlock['interrupted'] + 1 : 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\twhile (($beforeTab = strstr($line, \"\\t\", true)) !== false){\n\t\t\t\t$shortage = 4 - mb_strlen($beforeTab, 'utf-8') % 4;\n\n\t\t\t\t$line = $beforeTab\n\t\t\t\t\t. str_repeat(' ', $shortage)\n\t\t\t\t\t. substr($line, strlen($beforeTab) + 1);\n\t\t\t}\n\n\t\t\t$indent = strspn($line, ' ');\n\n\t\t\t$text = $indent > 0 ? substr($line, $indent) : $line;\n\n\t\t\tif( $this->preserveIndentations && $indent >= 4 ){\n\t\t\t\t$tabs = floor( $indent / 4 );\n\n\t\t\t\tdo{\n\t\t\t\t\tif( $tabs >= 2 && $this->liturgicalHTML ){\n\t\t\t\t\t\t$text = '<span class=\"spacer-tab-x2\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>' . $text;\n\t\t\t\t\t\t$tabs = $tabs - 2;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( $this->liturgicalHTML )\n\t\t\t\t\t\t\t$text = '<span class=\"spacer-tab\">&nbsp;&nbsp;&nbsp;&nbsp;</span>' . $text;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$text = '&nbsp;&nbsp;&nbsp;&nbsp;' . $text;\n\n\t\t\t\t\t\t--$tabs;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile( $tabs > 0 );\n\t\t\t}\n\n\n\t\t\t# ~\n\n\t\t\t$Line = array('body' => $line, 'indent' => $indent, 'text' => $text);\n\n\t\t\t# ~\n\n\t\t\tif (isset($CurrentBlock['continuable'])){\n\t\t\t\t$methodName = 'block' . $CurrentBlock['type'] . 'Continue';\n\t\t\t\t$Block = $this->$methodName($Line, $CurrentBlock);\n\n\t\t\t\tif (isset($Block)){\n\t\t\t\t\t$CurrentBlock = $Block;\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if ($this->isBlockCompletable($CurrentBlock['type'])){\n\t\t\t\t\t$methodName = 'block' . $CurrentBlock['type'] . 'Complete';\n\t\t\t\t\t$CurrentBlock = $this->$methodName($CurrentBlock);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t# ~\n\n\t\t\t$marker = $text[0];\n\n\n\t\t\t/*\n\t\t\t * Prepare the unmarked block types\n\t\t\t */\n\t\t\t$blockTypes = $this->unmarkedBlockTypes;\n\n\t\t\tif (isset($this->BlockTypes[$marker])){\n\t\t\t\tforeach ($this->BlockTypes[$marker] as $blockType){\n\t\t\t\t\t$blockTypes []= $blockType;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $this->liturgicalElements && isset($this->LiturgicalBlockTypes[$marker]) ){\n\t\t\t\tforeach ($this->LiturgicalBlockTypes[$marker] as $blockType){\n\t\t\t\t\t$blockTypes []= $blockType;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t/*\n\t\t\t * Prepare the unmarked block types\n\t\t\t */\n\t\t\tforeach ($blockTypes as $blockType){\n\t\t\t\t$Block = $this->{\"block$blockType\"}($Line, $CurrentBlock);\n\n\t\t\t\tif (isset($Block)){\n\t\t\t\t\t$Block['type'] = $blockType;\n\n\t\t\t\t\tif ( ! isset($Block['identified'])){\n\t\t\t\t\t\tif (isset($CurrentBlock)){\n\t\t\t\t\t\t\t$Elements[] = $this->extractElement($CurrentBlock);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$Block['identified'] = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->isBlockContinuable($blockType)){\n\t\t\t\t\t\t$Block['continuable'] = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t$CurrentBlock = $Block;\n\n\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t# ~\n\n\t\t\tif (isset($CurrentBlock) and $CurrentBlock['type'] === 'Paragraph'){\n\t\t\t\t$Block = $this->paragraphContinue($Line, $CurrentBlock);\n\t\t\t}\n\n\t\t\tif (isset($Block)){\n\t\t\t\t$CurrentBlock = $Block;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (isset($CurrentBlock)){\n\t\t\t\t\t$Elements[] = $this->extractElement($CurrentBlock);\n\t\t\t\t}\n\n\t\t\t\t$CurrentBlock = $this->paragraph($Line);\n\n\t\t\t\t$CurrentBlock['identified'] = true;\n\t\t\t}\n\t\t} // End: foreach($lines)\n\n\t\t# ~\n\n\t\tif (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type'])){\n\t\t\t$methodName = 'block' . $CurrentBlock['type'] . 'Complete';\n\t\t\t$CurrentBlock = $this->$methodName($CurrentBlock);\n\t\t}\n\n\t\t# ~\n\n\t\tif (isset($CurrentBlock)){\n\t\t\t$Elements[] = $this->extractElement($CurrentBlock);\n\t\t}\n\n\t\t# ~\n\n\t\treturn $Elements;\n\t}", "title": "" }, { "docid": "f133f2810b2eba3c32a7f953c0860408", "score": "0.41406554", "text": "function splitByFirstLevel($expresion) {\n\t$pos = 0;\n\t$level = 0;\n\n\twhile (isset($expresion[$pos])) {\n\t\tswitch ($expresion[$pos]) {\n\t\t\tcase '(':\n\t\t\t\t++$level;\n\t\t\t\tbreak;\n\t\t\tcase ')':\n\t\t\t\t--$level;\n\t\t\t\tbreak;\n\t\t\tcase '&':\n\t\t\tcase '|':\n\t\t\t\tif (!$level) {\n\t\t\t\t\t$tmpArr[] = trim(substr($expresion, 0, $pos));\n\t\t\t\t\t$expresion = substr($expresion, $pos + 1);\n\t\t\t\t\t$pos = -1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\t++$pos;\n\t}\n\n\tif ($expresion) {\n\t\t$tmpArr[] = trim($expresion);\n\t}\n\n\treturn $tmpArr;\n}", "title": "" }, { "docid": "1595ab2ded5a68e688fc3756d16b1a6d", "score": "0.41351056", "text": "public function dataForMaxDepth()\n {\n $padding = str_repeat(' ', Debug::DUMP_INDENT_INCREMENT);\n\n $obj1 = new StdClass();\n $obj2 = new StdClass();\n $obj3 = new StdClass();\n\n $obj3->next = null;\n $obj2->next = $obj3;\n $obj1->next = $obj2;\n\n\n $arr1 = [];\n $arr2 = [];\n $arr3 = [];\n\n $arr3['next'] = null;\n $arr2['next'] = $arr3;\n $arr1['next'] = $arr2;\n\n return [\n [$obj1, 5, \"/\\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}{$padding}next => \\\\(null\\\\)\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n [$obj1, 4, \"/\\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}{$padding}next => \\\\(null\\\\)\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n [$obj1, 3, \"/\\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}{$padding}next => \\\\(null\\\\)\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n [$obj1, 2, \"/\\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}{$padding}...\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n [$obj1, 1, \"/\\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}...\\n{$padding}}\\n}\\n/\", null],\n [$obj1, 0, \"/\\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}...\\n}\\n/\", null],\n [$obj1, -1, \"/\\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}next => \\\\(object\\\\): stdClass \\\\[\\d+: .+?\\\\] \\\\{\\n{$padding}{$padding}{$padding}next => \\\\(null\\\\)\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n\n [$arr1, 5, \"/\\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}{$padding}next => \\\\(null\\\\)\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n [$arr1, 4, \"/\\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}{$padding}next => \\\\(null\\\\)\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n [$arr1, 3, \"/\\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}{$padding}next => \\\\(null\\\\)\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n [$arr1, 2, \"/\\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}{$padding}...\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n [$arr1, 1, \"/\\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}...\\n{$padding}}\\n}\\n/\", null],\n [$arr1, 0, \"/\\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}...\\n}\\n/\", null],\n [$arr1, -1, \"/\\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}next => \\\\(array\\\\[1\\\\]\\\\) \\\\{\\n{$padding}{$padding}{$padding}next => \\\\(null\\\\)\\n{$padding}{$padding}}\\n{$padding}}\\n}\\n/\", null],\n ];\n }", "title": "" }, { "docid": "0b74e5b801cc85ede2a8d8e59dc51078", "score": "0.4132412", "text": "function CalculateRouteSteps($activeRoute) {\n\t$result = array();\n\tfor($i = 0; $i < count($activeRoute); $i++) {\t\t\n \tif ($i < count($activeRoute) - 1) {\n\n \t\t$actPosition = new stdClass();\n\t\t\t$actPosition->lat = $activeRoute[$i]->lat;\n\t\t\t$actPosition->lng = $activeRoute[$i]->lng;\t \t\n\n\t \t$nextPosition = new stdClass();\n\t\t\t$nextPosition->lat = $activeRoute[$i + 1]->lat;\n\t\t\t$nextPosition->lng = $activeRoute[$i + 1]->lng;\n\t \t$steps = distance($actPosition->lat, $actPosition->lng, $nextPosition->lat, $nextPosition->lng) % 500;\n\n\t \t$result = array_merge($result, CalculateRouteStepsBetweenMarkers($actPosition, $nextPosition, $steps));\n \t}\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "56eb90520101a1f7f033edc1e404034a", "score": "0.41310713", "text": "public static function removeEmptyElementsRecursively(array $array): array\n {\n $result = $array;\n foreach ($result as $key => $value) {\n if (is_array($value)) {\n $result[$key] = self::removeEmptyElementsRecursively($value);\n if ($result[$key] === []) {\n unset($result[$key]);\n }\n } elseif ($value === null) {\n unset($result[$key]);\n }\n }\n return $result;\n }", "title": "" }, { "docid": "24bf8ae6d32f53c6bbd811a69a198c56", "score": "0.41300687", "text": "function array_flat( array $arr, $depth = 1 ): array\n {\n \n $depth_remaining = $depth;\n $has_sub_arrays = true;\n \n while( $depth_remaining && $has_sub_arrays ) {\n \n $arr = array_reduce( $arr, function( $acc, $curr ) {\n if( is_array( $curr ) ) {\n foreach( $curr as $sub_item ) $acc[] = $sub_item;\n } else {\n $acc[] = $curr;\n }\n return $acc;\n });\n \n // Check if $arr contains an array\n $has_sub_arrays = false;\n foreach( $arr as $item ) {\n if( is_array( $item ) ) $has_sub_arrays = true;\n }\n \n $depth_remaining--;\n }\n \n return $arr;\n }", "title": "" }, { "docid": "33a0458d145746827e8c58000bc4ee77", "score": "0.4124756", "text": "private function cleanPathArray($pathArray)\r\n\t{\r\n\t\t$toreturn = array();\r\n\t\tforeach($pathArray as $item) {\r\n\t\t\tif ($item != '') {\r\n\t\t\t\t$toreturn[] = $item;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $toreturn;\r\n\t}", "title": "" }, { "docid": "f3cd220ac2704861db25b04ccd1970aa", "score": "0.4124134", "text": "function a895_nl_2_array($str)\n{\n $arr = array_filter(preg_split(\"/\\n|\\r\\n|\\r/\", $str));\n return is_array($arr) ? $arr : array($arr);\n}", "title": "" }, { "docid": "7259f72e20399b4519ce362f2892493b", "score": "0.41032112", "text": "private function strip($text)\n\t{\n\t\t$output = array();\n\n\t\t// preformatted code state\n\t\t$codestate = self::CS_NONE;\n\t\t$level = 0; // Level of nesting\n\t\t$random = ''; // Random string\n\t\t$admon = false;\n\t\t$prfx = ''; // Space indention\n\n\t\t$lines = explode(\"\\n\", $text);\n\n\t\tforeach ($lines as $i => $txt)\n\t\t{\n\t\t\t// Get the amount of indention\n\t\t\t// Indention occurs when formatting code blocks inside of list items\n\t\t\t// * Item\n\t\t\t// {{{\n\t\t\t// blorg\n\t\t\t// }}}\n\t\t\t// Since <pre> displays the extra spacing, we need to cut it out\n\t\t\t$indent = strspn($txt, ' ');\n\t\t\t$prfx = substr($txt, 0, $indent);\n\n\t\t\t$line = trim($txt);\n\t\t\t$processor = '';\n\n\t\t\tif ('' == $line)\n\t\t\t{\n\t\t\t\t$output[] = $txt;\n\t\t\t}\n\t\t\telse if ('{{{}}}' == $line)\n\t\t\t{\n\t\t\t\t$output[] = '';\n\t\t\t}\n\t\t\t// pre blocks must start a line\n\t\t\telse if ('{{{' == substr($line, 0, 3) || '<pre>{{{' == substr($line, 0, 8))\n\t\t\t{\n\t\t\t\tif ($codestate == self::CS_NONE)\n\t\t\t\t{\n\t\t\t\t\t// Is there a processor declaration on the same line?\n\t\t\t\t\tif (strlen($line) > strlen('{{{'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$subline = substr($line, strlen('{{{'));\n\t\t\t\t\t\tif (substr($subline, 0, strlen('#!')) == '#!')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (substr($subline, 0, strlen('#!wiki')) == '#!wiki')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$admon = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$processor = \"\\n\" . $subline;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Does the next line contain a processor declaration?\n\t\t\t\t\telse if (isset($lines[$i+1]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$next = trim($lines[$i+1]);\n\t\t\t\t\t\tif (substr($next, 0, strlen('#!wiki')) == '#!wiki')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$admon = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$random = $this->_randomString();\n\t\t\t\t\t$output[] = ($admon)\n\t\t\t\t\t\t\t? $prfx . '{admonition ' . $random . '}' . $processor\n\t\t\t\t\t\t\t: $prfx . '<pre ' . $random . '>' . $processor;\n\t\t\t\t\t$codestate = self::CS_CODE;\n\t\t\t\t}\n\t\t\t\t// We're already in a code block, so we have nested {{{ }}}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$output[] = substr($txt, $indent); //$txt;\n\t\t\t\t\t$codestate = self::CS_CODE_SUB; // Nested code tags\n\t\t\t\t\t$level++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// pre blocks must end a line\n\t\t\telse if ('}}}' == substr($line, 0, strlen('}}}')))\n\t\t\t{\n\t\t\t\tif ($codestate == self::CS_CODE_SUB)\n\t\t\t\t{\n\t\t\t\t\t$output[] = substr($txt, $indent);//$txt;\n\t\t\t\t\t$level--;\n\t\t\t\t\tif (!$level)\n\t\t\t\t\t{\n\t\t\t\t\t\t$codestate = self::CS_CODE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($codestate == self::CS_CODE)\n\t\t\t\t{\n\t\t\t\t\t$output[] = ($admon)\n\t\t\t\t\t\t\t? '{/admonition ' . $random . '}'\n\t\t\t\t\t\t\t: '</pre ' . $random . '>';\n\t\t\t\t\t$admon = false;\n\t\t\t\t\t$codestate = self::CS_NONE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$output[] = $txt;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Not in a code block\n\t\t\t\tif ($codestate == self::CS_NONE)\n\t\t\t\t{\n\t\t\t\t\t// Convert inline `code`\n\t\t\t\t\t$txt = $this->_code($txt);\n\t\t\t\t}\n\t\t\t\t// IN a code block\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Strip indention\n\t\t\t\t\t//$txt = substr($txt, $indent);\n\t\t\t\t}\n\n\t\t\t\t$output[] = $txt;\n\t\t\t}\n\t\t}\n\n\t\t// Added insurance that all tags are closed\n\t\tif ($codestate == self::CS_CODE)\n\t\t{\n\t\t\tdo {\n\t\t\t\t$output[] = '</pre ' . $this->token() . '>';\n\t\t\t\t$codestate = self::CS_NONE;\n\t\t\t\t$level--;\n\t\t\t} while ($level >= 0);\n\t\t}\n\n\t\t$output = implode(\"\\n\", $output);\n\t\t$output = preg_replace_callback('/<(pre) (.+?)>(.*)<\\/(\\1) \\2>/si', array(&$this, '_dataPush'), $output);\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "d7161c59b8adf66e01c0561f7056361f", "score": "0.41005003", "text": "function breakApart($string, array $arrays = null)\n{\n\n\t$start = strpos($string, '{');\n\t$end = strpos($string, '}');\n\tif ($start && $end) {\n\t\t$length = $end - $start - 1;\n\n\t\t$capture = substr($string, $start + 1, $length);\n\n\t\t// Capture \"This is my \"\n\t\t$before = substr($string, 0 , $start);\n\t\t$leftOver = substr($string, $end+1);\n\t\t$capturedPossibilites = possibilities($capture);\n\t\t$matrix = array();\n\n\t\tforeach ($capturedPossibilites as $possibility) {\n\t\t\tif ($leftOver) {\n\t\t\t\t$children = breakApart($leftOver);\n\t\t\t\tforeach ($children as $child) {\n\t\t\t\t\t$matrix[] = $before . $possibility . $child;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$matrix[] = $before . $possibility;\n\t\t\t}\n\t\t}\n\t\treturn $matrix;\n\t}\n\treturn array($string);\n}", "title": "" }, { "docid": "1f622fa1be5a94c2e0a0be83521f45c5", "score": "0.40995508", "text": "public static function getAnalysisDump($steps, $index = 0)\n {\n $data = [];\n $step = $steps[$index];\n foreach ($step as $obj) {\n $class = K::getClass($obj);\n switch ($class) {\n case K::TERM:\n case K::TERM_ENCLOSURE:\n self::_analysisDumpTerm($data, $obj);\n break;\n case K::FACTOR:\n case K::FACTOR_ENCLOSURE:\n self::_analysisDumpFactor($data, $obj);\n break;\n case K::POWER:\n case K::POWER_ENCLOSURE:\n self::_analysisDumpPower($data, $obj);\n break;\n }\n }\n return $data;\n }", "title": "" }, { "docid": "b9d8a6d558201603a29e8fbf1f208d59", "score": "0.40985063", "text": "function wizardArray()\t{\n\t\tif (is_array($this->config)) {\n\t\t\t$wizards = $this->config['wizardItems.'];\n\t\t}\n\t\t$appendWizards = $this->wizard_appendWizards($wizards['elements.']);\n\n\t\t$wizardItems = array();\n\n\t\tif (is_array($wizards)) {\n\t\t\tforeach ($wizards as $groupKey => $wizardGroup) {\n\t\t\t\t$groupKey = preg_replace('/\\.$/', '', $groupKey);\n\t\t\t\t$showItems = t3lib_div::trimExplode(',', $wizardGroup['show'], true);\n\t\t\t\t$showAll = (strcmp($wizardGroup['show'], '*') ? false : true);\n\t\t\t\t$groupItems = array();\n\n\t\t\t\tif (is_array($appendWizards[$groupKey . '.']['elements.'])) {\n\t\t\t\t\t$wizardElements = array_merge((array) $wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']);\n\t\t\t\t} else {\n\t\t\t\t\t$wizardElements = $wizardGroup['elements.'];\n\t\t\t\t}\n\n\t\t\t\tif (is_array($wizardElements)) {\n\t\t\t\t\tforeach ($wizardElements as $itemKey => $itemConf) {\n\t\t\t\t\t\t$itemKey = preg_replace('/\\.$/', '', $itemKey);\n\t\t\t\t\t\tif ($showAll || in_array($itemKey, $showItems)) {\n\t\t\t\t\t\t\t$tmpItem = $this->wizard_getItem($groupKey, $itemKey, $itemConf);\n\t\t\t\t\t\t\tif ($tmpItem) {\n\t\t\t\t\t\t\t\t$groupItems[$groupKey . '_' . $itemKey] = $tmpItem;\n\t\t\t}\n\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count($groupItems)) {\n\t\t\t\t\t$wizardItems[$groupKey] = $this->wizard_getGroupHeader($groupKey, $wizardGroup);\n\t\t\t\t\t$wizardItems = array_merge($wizardItems, $groupItems);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// Remove elements where preset values are not allowed:\n\t\t$this->removeInvalidElements($wizardItems);\n\n\t\treturn $wizardItems;\n\t}", "title": "" }, { "docid": "e8c375626e06031c12fd7f8fcaececff", "score": "0.40934536", "text": "public function parserDataSet(): array\n {\n $scenarios = [\n 'account collection' => [AccountCollection::class, include __DIR__ . '/data/account_valid.php'],\n 'billable collection' => [BillableCollection::class, include __DIR__ . '/data/billable_valid.php'],\n 'country collection' => [CountryCollection::class, include __DIR__ . '/data/country_valid.php'],\n 'contact collection' => [ContactCollection::class, include __DIR__ . '/data/contact_valid.php'],\n 'domain availability collection' => [DomainAvailabilityCollection::class, include __DIR__ . '/data/domain_availability_valid.php'],\n 'domain contact collection' => [DomainContactCollection::class, include __DIR__ . '/data/domain_contact_valid.php'],\n 'domain details collection' => [DomainDetailsCollection::class, include __DIR__ . '/data/domain_details_valid.php'],\n 'ds data collection' => [DsDataCollection::class, include __DIR__ . '/data/ds_data_valid.php'],\n 'key data collection' => [KeyDataCollection::class, include __DIR__ . '/data/key_data_valid.php'],\n 'price collection' => [PriceCollection::class, include __DIR__ . '/data/price_valid.php'],\n 'contact property collection' => [ContactPropertyCollection::class, include __DIR__ . '/data/contact_property_valid.php'],\n 'launch phase collection' => [LaunchPhaseCollection::class, include __DIR__ . '/data/launch_phase.php'],\n 'log collection' => [LogCollection::class, include __DIR__ . '/data/log.php'],\n 'notification collection' => [NotificationCollection::class, include __DIR__ . '/data/notification_valid.php'],\n 'provider collection' => [ProviderCollection::class, include __DIR__ . '/data/provider_valid.php'],\n 'downtime collection' => [DowntimeCollection::class, include __DIR__ . '/data/downtime_valid.php'],\n ];\n // For each type, create a flat and a pagination scenario.\n $dataset = [];\n foreach ($scenarios as $key => $scenario) {\n $dataset[\"{$key} (flat)\"] = [\n $scenario[0],\n [$scenario[1], $scenario[1], $scenario[1]],\n 3,\n ];\n $dataset[\"{$key} (pagination)\"] = [\n $scenario[0],\n [\n 'entities' => [$scenario[1], $scenario[1], $scenario[1]],\n 'pagination' => [\n 'total' => 3,\n 'offset' => 0,\n 'limit' => 3,\n ],\n ],\n 3,\n ];\n }\n return $dataset;\n }", "title": "" }, { "docid": "1b828696bd9d182de3aa9539426b3e4f", "score": "0.40889788", "text": "public function steps($user)\n\t{\n\t\t// Load each step with the current User object.\n\t\treturn collect($this->steps)->map(function($step) use ($user) {\n\t\t\treturn $step->setUser($user);\n\t\t});\n\t}", "title": "" }, { "docid": "eba72070330d06839de0bbf2a2d30f76", "score": "0.40883842", "text": "protected function format_display( $steps ) {\n\n\t\t$steps_display = array();\n\n\t\t$curr_num = count( $steps );\n\t\t$num = 1;\n\t\tforeach( $steps as $key => $step ):\n\n\t\t\tif ( isset( $step['current'] ) )\n\t\t\t\t$curr_num = $num;\n\n\t\t\tif ( $num <= $curr_num )\n\t\t\t\t$class = $this->css['done'];\n\t\t\telse\n\t\t\t\t$class = $this->css['todo'];\n\n\t\t\t$steps_display[] = array(\n\t\t\t\t'title' => $step['title'],\n\t\t\t\t'class' => $class\n\t\t\t);\n\t\t\t$num++;\n\t\tendforeach;\n\n\t\treturn $steps_display;\n\t}", "title": "" }, { "docid": "722cddea55e135e043ffad1bc289c1bb", "score": "0.4086757", "text": "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"StepNo\",$param) and $param[\"StepNo\"] !== null) {\n $this->StepNo = $param[\"StepNo\"];\n }\n\n if (array_key_exists(\"StepName\",$param) and $param[\"StepName\"] !== null) {\n $this->StepName = $param[\"StepName\"];\n }\n\n if (array_key_exists(\"StepId\",$param) and $param[\"StepId\"] !== null) {\n $this->StepId = $param[\"StepId\"];\n }\n\n if (array_key_exists(\"Status\",$param) and $param[\"Status\"] !== null) {\n $this->Status = $param[\"Status\"];\n }\n\n if (array_key_exists(\"StartTime\",$param) and $param[\"StartTime\"] !== null) {\n $this->StartTime = $param[\"StartTime\"];\n }\n\n if (array_key_exists(\"Errors\",$param) and $param[\"Errors\"] !== null) {\n $this->Errors = [];\n foreach ($param[\"Errors\"] as $key => $value){\n $obj = new StepTip();\n $obj->deserialize($value);\n array_push($this->Errors, $obj);\n }\n }\n\n if (array_key_exists(\"Warnings\",$param) and $param[\"Warnings\"] !== null) {\n $this->Warnings = [];\n foreach ($param[\"Warnings\"] as $key => $value){\n $obj = new StepTip();\n $obj->deserialize($value);\n array_push($this->Warnings, $obj);\n }\n }\n\n if (array_key_exists(\"Progress\",$param) and $param[\"Progress\"] !== null) {\n $this->Progress = $param[\"Progress\"];\n }\n }", "title": "" }, { "docid": "1f7a8385316d1ccd583023e1cc6904e2", "score": "0.40816784", "text": "public function classifyIssues($issues)\n {\n if (!$issues) { return []; }\n\n $classified_issues = [];\n foreach ($issues as $issue)\n {\n if (isset($issue['parent']) && $issue['parent'])\n {\n if (isset($classified_issues[$issue['parent']['no']]) && $classified_issues[$issue['parent']['no']])\n {\n $classified_issues[$issue['parent']['no']][] = $issue;\n }\n else\n {\n $classified_issues[$issue['parent']['no']] = [ $issue ];\n }\n }\n else\n {\n if (isset($classified_issues[$issue['no']]) && $classified_issues[$issue['no']])\n {\n array_unshift($classified_issues[$issue['no']], $issue);\n }\n else\n {\n $classified_issues[$issue['no']] = [ $issue ];\n }\n }\n }\n\n return $classified_issues;\n }", "title": "" }, { "docid": "0e0203372fa9a590b197d9e45852d59e", "score": "0.40795356", "text": "private function rectifyInput(&$arr, $fields){\r\n\t\t$this->applyInTransforms($arr);\r\n\t\t$this->rectifyInputFields($arr, $fields);\r\n\t\treturn $arr;\r\n\t}", "title": "" }, { "docid": "ebf4fcd89be8a8137cbbd46c489f62c3", "score": "0.4079322", "text": "public function set_steps( $course_steps = array() ) {\n\t\t\tif ( ! empty( $this->course_id ) ) {\n\t\t\t\t$this->steps = array();\n\t\t\t\t$this->steps['h'] = $course_steps;\n\n\t\t\t\t$this->build_steps();\n\n\t\t\t\tif ( LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Courses_Builder', 'shared_steps' ) != 'yes' ) {\n\t\t\t\t\t$this->set_step_to_course_legacy();\n\n\t\t\t\t\t$course_steps = get_post_meta( $this->course_id, 'ld_course_steps', true );\n\t\t\t\t\tif ( ! is_null( $course_steps ) ) {\n\t\t\t\t\t\tdelete_post_meta( $this->course_id, 'ld_course_steps' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->set_step_to_course();\n\t\t\t\t\tupdate_post_meta( $this->course_id, 'ld_course_steps', $this->steps ); \n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a8a4022ae6affa7b8d3e67699a660732", "score": "0.40791047", "text": "function __stripslashes_array( &$arr )\r\n\t{\r\n\t\tarray_walk( $arr, '__stripslashes' );\r\n\t}", "title": "" }, { "docid": "821714160989a2e6068b866c7c9314ea", "score": "0.40725586", "text": "protected static function process(array $data): array\n {\n $data = self::clean($data);\n $data = self::type($data);\n\n return $data;\n }", "title": "" }, { "docid": "773c8b9af0cfe9c2dc0053484f6b9155", "score": "0.4071799", "text": "protected function normalize()\n {\n $nodes = [];\n foreach ($this as $node) {\n $nodes[] = $node;\n }\n $this->exchangeArray($nodes);\n }", "title": "" }, { "docid": "fccbf9fe564b953bb7251670d1e4ca37", "score": "0.40675056", "text": "public function getWithoutArguments(): array\n {\n $testcases = [];\n foreach ($this->testcases as $testcase) {\n if (count($testcase->getDefinition()->getArguments()) === 0) {\n $testcases[] = $testcase;\n }\n }\n return $testcases;\n }", "title": "" }, { "docid": "ae89c947683d37d4b3240ccef454e8c3", "score": "0.40499124", "text": "function determinizeFSM(&$startState, &$origSymbols, &$origFinalStates, &$origRules, &$origStates) {\n\t\t$states_storage = array(array($startState)); //Qnew := {sd}; array of arrays\n\t\t$finalRules = array(); //Rd, array of objects\n\t\t$finalDFSMStates = array(); //Qd \n\t\t$finalFinalStates = array(); //Fd\n\t\t$counter = 0;\n\t\t\n\t\twhile(count($states_storage)) {\n\t\t\t\n\t\t\t// an array used to pick arrays from states_storage and iterate through them\n\t\t\t$s_iterator = array(); //Q'\n\t\t\t\n\t\t\tfor($i = 0; $i < count($states_storage[$counter]); $i++) { \n\t\t\t\tarray_push($s_iterator, $states_storage[$counter][$i]); // Q' is an element of Qnew\n\t\t\t}\n\n\t\t\tunset($states_storage[$counter]); // Qnew := Qnew - {Q'};\n\t\t\t$counter++;\n\t\t\t\n\t\t\t// if there is more than one state in the array, it becomes a string a_a\n\t\t\tsort($s_iterator);\n\t\t\t$dfsm_aid = implode('_', $s_iterator);\n\t\t\tarray_push($finalDFSMStates, $dfsm_aid);\n\t\t\t\n\n\t\t\tforeach ($origSymbols as $loop_sym) { \n\t\t\t \t$s_pusher = array(); //Q''\n\t\t\t \tforeach ($s_iterator as $loop_iter) { // p is element of Q';\n\t\t\t \t\tforeach ($origRules as $R) { // pa -> q is element of R;\n\t\t\t \t\t\tif (($R->initState === $loop_iter) and ($R->inputSymbol === $loop_sym)) {\n\t\t\t \t\t\t\tif (!in_array($R->targetState, $s_pusher)){\n\t\t\t \t\t\t\t\tarray_push($s_pusher, $R->targetState);\t\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\tif (count($s_pusher)) { // Q'' is not empty;\n\t\t \t\t\t\n\t\t \t\t\tsort($s_pusher);\n\t\t \t\t\t$temp_aid2 = implode('_', $s_pusher);\n\t\t \t\t\t$temp_aid3 = FALSE;\n\t\t \t\t\t\n\t\t \t\t\t// if the state is not in the DFSM states array and it is not an epsilon\n\t\t \t\t\tif (!in_array($temp_aid2, $finalDFSMStates) and $temp_aid !== '') {\n\t\t \t\t\t\t// if it is not already in the queue\n\t\t \t\t\t\tforeach ($states_storage as $key => $inner_array) {\n\t\t \t\t\t\t\tif ($s_pusher === $inner_array) {\n\t\t \t\t\t\t\t\t$temp_aid3 = TRUE;\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 ($temp_aid3 == FALSE) {\n\t\t \t\t\t\t\tarray_push($states_storage, $s_pusher);\n\t\t \t\t\t\t}\n\t\t \t\t\t}\t \n\t\t \t\t\t// create a new rule\n\t\t \t\t\t$temp_aid4 = FALSE;\n\t\t \t\t\t$rule = new InputRules();\n\t\t \t\t\t$rule->initState = implode(\"_\", $s_iterator);\n\t\t \t\t\t$rule->inputSymbol = $loop_sym;\n\t\t \t\t\t$rule->targetState = implode(\"_\", $s_pusher);\n\t\t \t\t\t\n\t\t \t\t\t// see if the rule is already exists\n\t\t \t\t\tforeach ($finalRules as $key) {\n\t\t \t\t\t\tif ($key->initState === $rule->initState) {\n\t\t \t\t\t\t\tif ($key->inputSymbol === $rule->inputSymbol) {\n\t\t \t\t\t\t\t\tif ($key->targetState === $rule->targetState) {\n\t\t\t\t\t\t\t\t\t$temp_aid4 = TRUE;\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\t// if it does not, push it\n\t\t \t\t\tif ($temp_aid4 == FALSE) {\n\t\t \t\t\t\tarray_push($finalRules, $rule);\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t\t}\n\t\t\t// if Q' is a part of F, add it to F\n\t\t\tif (array_intersect($s_iterator, $origFinalStates)) {\n\t\t\t\tif (!in_array(implode(\"_\", $s_iterator), $finalFinalStates)) {\n\t\t\t\t\tarray_push($finalFinalStates, implode(\"_\", $s_iterator));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t$origStates = $finalDFSMStates;\n\t\t$origRules = $finalRules;\n\t\t$origFinalStates = $finalFinalStates;\n\t\tsort($origRules);\n\t\tsort($origStates);\n\t\tsort($origFinalStates);\n\t}", "title": "" }, { "docid": "78dc69273ef1355e7b6bcc8c9a657b4d", "score": "0.40432188", "text": "function doSteps($steps, &$stepsText) {\r\n\r\n foreach ($steps as $functionName => $step) {\r\n global $lang;\r\n \r\n $varName = $lang == 'PHP' ? '$arg' : 'arg';\r\n extract($step); // original, english, toReplace, callers, TMB, functionName, argCount\r\n $newCallers = replacement($callers, @$TMB, $functionName); // (replacement includes function's opening parenthesis)\r\n if ($original == 'new') {\r\n for ($argList = '', $i = 0; $i < $argCount; $i++) {\r\n $argList .= ($argList ? ', ' : '') . $varName . ($i + 1);\r\n }\r\n $global = $lang == 'PHP' ? \" global \\$testOnly;\\n\" : '';\r\n $stepsText .= <<<EOF\r\n\r\n/**\r\n * $english\r\n *\r\n * in: {$newCallers}$argList) {\r\n$global todo;\r\n}\r\n\r\nEOF;\r\n } else $stepsText = str_replace($toReplace, $newCallers, $stepsText);\r\n }\r\n}", "title": "" }, { "docid": "729775c3dcbd2520b6a7da6ce26b2666", "score": "0.40403956", "text": "private function simplifyArray(&$array) {\n //var_dump($array);\n foreach($array as $ak => $days) {\n foreach($days as $key =>$times) {\n if(isset($times['module']) && isset($times['room'])){\n if ($times['module'] == '' && $times['room'] == '') {\n unset($array[$ak][$key]);\n }\n else if ($times['room'] == '') {\n unset($array[$ak][$key]['room']);\n }\n else if ($times['module'] == '') {\n unset($array[$ak][$key]['module']);\n }\n }\n }\n }\n return $array;\n\n\n }", "title": "" }, { "docid": "af3e1d3f9399449fe987f69a30423611", "score": "0.40291822", "text": "public function parseLine(array $data): array;", "title": "" }, { "docid": "d52037db763d84d2f42fd480a5435d1b", "score": "0.40269357", "text": "private function createNormalizedData(array $data): array\n {\n $flattenedData = Arr::dot($data);\n $fields = array_keys($flattenedData);\n $ruleKeys = array_keys($this->getRules());\n $defaultValues = [];\n\n foreach ($ruleKeys as $ruleKey) {\n $exactFoundKeys = preg_grep($this->createExactRuleMatcherRegexp($ruleKey), $fields);\n\n if (empty($exactFoundKeys)) {\n $defaultValues += $this->createDefaultValuesForMissingData($ruleKey, $fields);\n }\n }\n\n return $flattenedData + $defaultValues;\n }", "title": "" }, { "docid": "aaefa87398f3558c28b731d5c14e5e8f", "score": "0.4018047", "text": "public function getStoryline():array {\n\n # Declare result\n $result = [];\n\n # New reflection\n $reflection = new \\ReflectionClass($this);\n\n # Get methods\n $methods = $reflection->getMethods();\n\n # Check methods\n if($methods)\n\n # Iteration of methods\n foreach($methods as $method)\n\n # Check run children methods\n if(\n substr($method->name, 0, 3) == \"run\" && \n strlen($method->name) > 3\n )\n\n # Push result in result\n $result[] = $method->name;\n\n # Return result\n return $result;\n\n }", "title": "" }, { "docid": "15515417965b7721b04d3c71d2208b6d", "score": "0.40104902", "text": "protected function parseFailedJob(array $failed)\n {\n $row = array_values(Arr::except($failed, ['payload', 'exception']));\n array_splice($row, 3, 0, $this->extractJobName($failed['payload']));\n $row[0] = $row[5];\n array_splice($row, 5);\n array_splice($row, 1,1);\n return $row;\n }", "title": "" } ]
9b9db359170823bfc9e99e294b6140cc
log transfer stats For debugging purpose
[ { "docid": "5d72ada444dffbd17b71ccabd1b5d4cc", "score": "0.60892767", "text": "protected function logStats(TransferStats $stats) : array {\n return [\n 'time' => (string)$stats->getTransferTime()\n ];\n }", "title": "" } ]
[ { "docid": "d0a04be58bc15ce9b0cc844f7c5c3c41", "score": "0.61409974", "text": "public static function logStats()\r\n {\r\n $s3Funcs = DUPX_S3_Funcs::getInstance();\r\n DUPX_Log::resetIndent();\r\n\r\n if (!empty($s3Funcs->report) && is_array($s3Funcs->report)) {\r\n $stats = \"--------------------------------------\\n\";\r\n $stats .= sprintf(\"SCANNED:\\tTables:%d \\t|\\t Rows:%d \\t|\\t Cells:%d \\n\", $s3Funcs->report['scan_tables'], $s3Funcs->report['scan_rows'], $s3Funcs->report['scan_cells']);\r\n $stats .= sprintf(\"UPDATED:\\tTables:%d \\t|\\t Rows:%d \\t|\\t Cells:%d \\n\", $s3Funcs->report['updt_tables'], $s3Funcs->report['updt_rows'], $s3Funcs->report['updt_cells']);\r\n $stats .= sprintf(\"ERRORS:\\t\\t%d \\nRUNTIME:\\t%f sec\", $s3Funcs->report['err_all'], $s3Funcs->report['time']);\r\n DUPX_Log::info($stats);\r\n }\r\n }", "title": "" }, { "docid": "6b8eee375d03c750f75d0e14e2b044e5", "score": "0.59672695", "text": "public function send_log() {\n\t}", "title": "" }, { "docid": "bc8424ff82b18b30362913831173d089", "score": "0.58209234", "text": "public function printStats(){\n\t\techo \"POSITIONS TO IMPORT: \".$this->to_import_items.\"<br>\";\n\t\techo \"POSITIONS IMPORTED: \".$this->imported_items.\"<br>\";\n\t}", "title": "" }, { "docid": "fcddf38319dba7cd6cf10c3973a5e321", "score": "0.56936705", "text": "public function stream_stat(): void\n {\n }", "title": "" }, { "docid": "61b86578461256e7b17e4b65d5f1e2a4", "score": "0.56731635", "text": "function on_request_stats( TransferStats $stats ) {\n\tif ( ! function_exists( 'HM\\\\Platform\\\\XRay\\\\on_aws_guzzle_request_stats' ) ) {\n\t\treturn;\n\t}\n\n\tXRay\\on_aws_guzzle_request_stats( $stats );\n}", "title": "" }, { "docid": "675a869e8678fdb9520a1497d29f53ef", "score": "0.5653661", "text": "function atten_log() {\n $device_ip = $this->deviceData()->device_ip;\n }", "title": "" }, { "docid": "e1354c4f9a61d4dd67f5f25686705a4f", "score": "0.56195194", "text": "public function __debug() {\n var_dump($this->getLastRequest(), $this->getLastResponse());\n }", "title": "" }, { "docid": "41cb6e0eb75af51ceeccf340e1694561", "score": "0.5602106", "text": "public function report()\n {\n if ($this->diff === null) {\n $this->end();\n }\n\n $this->statsdInstace->send($this->name, $this->diff, StatsdClient::TIMER_MS);\n }", "title": "" }, { "docid": "a4789d3122d7b3ddc563ed468dac2da9", "score": "0.5538221", "text": "private function _logCall()\n\t{\n\t\tif($this->debug) {\n\t\t\terror_log('URL: ' . $this->getUrl() . ' - STATUS: ' . $this->getHttpCodeText($this->getHttpCode())); \n\t\t}\n\t}", "title": "" }, { "docid": "e9747b4b58248ab4b008aa9cd9e4ba20", "score": "0.55002666", "text": "private static function appendTotalInfo() {\n\t\tself::$_fb->log('[AppTime: ' . self::formatTime(self::$DATA_APP_TIME) . '] [AppMemory: ' . self::formatMemory(self::$DATA_APP_MEMORY) . ']');\n\t}", "title": "" }, { "docid": "d68a1be9f09fb9289eb72884406055af", "score": "0.5447293", "text": "function sendALog($extra, $flag){\nreturn;\n////////////////////////////////////////////////////////////////\n/// Specify if it is in development mode ///////////////////////\n////////////////////////////////////////////////////////////////\n$developmentMode = $GLOBALS['DEV_OPS']['sunlogs_devmode'];\n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////////\n/// Set the authentication parameters //////////////////////////\n////////////////////////////////////////////////////////////////\n$repoName = \"PhotoSched\";\n$key = \"QMasd2kqSuExaAphIOXMBNtQeVNnJXTBuOF\"; \n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n\n\n////////////////////////////////////////////////////////////////\n/// Make sure required parameters are set //////////////////////\n////////////////////////////////////////////////////////////////\nif(!isset($developmentMode)){\n print \"DevelopmentMode Definition is not set.\";\n die();\n}\nif(!isset($repoName)){\n print \"DevelopmentMode Definition is not set.\";\n die();\n}\nif(!isset($key)){\n print \"DevelopmentMode Definition is not set.\";\n die();\n}\n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n\n\n////////////////////////////////////////////////////////////////\n/// Specify where the receiver is //////////////////////////////\n////////////////////////////////////////////////////////////////\nif($developmentMode == true){\n $url = \"http://localhost:333/receiver.php\";\n} else {\n $url = \"http://sunlogs.com/receiver.php\";\n}\n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n\n\n////////////////////////////////////////////////////////////////\n/// Generate required data /////////////////////////////////////\n////////////////////////////////////////////////////////////////\ndate_default_timezone_set(\"UTC\");\n$when = date('Y-m-d H:i:s');\n$key = md5(md5($key).$when);\n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n\n\n////////////////////////////////////////////////////////////////\n/// Set the data fields required for the log ///////////////////\n////////////////////////////////////////////////////////////////\nif(!isset($extra)){\n $extra = \"\"; \n}\nif(!isset($flag)){\n $flag = \"\"; \n}\n$ip = $_SERVER['REMOTE_ADDR'];\n if(!isset($ip)){\n $ip = \"\"; \n }\n$for = $_SERVER['HTTP_X_FORWARDED_FOR'];\n if(!isset($for)){\n $for = \"\"; \n }\n$agent = $_SERVER['HTTP_USER_AGENT'];\n if(!isset($agent)){\n $agent = \"\"; \n }\n$refer = $_SERVER['HTTP_REFERER'];\n if(!isset($refer)){\n $refer = \"\"; \n }\n \n$uri = $_SERVER['REQUEST_URI'];\n if(!isset($uri)){\n $uri = \"\"; \n }\n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n\n\n////////////////////////////////////////////////////////////////\n/// Put all data to be sent in correct format //////////////////\n////////////////////////////////////////////////////////////////\n$postdata = http_build_query(\n array(\n 'when'=>$when,\n 'logtype'=>'php',\n 'IP'=> $ip,\n 'forwardedFor'=> $for,\n 'agent'=> $agent,\n 'referer'=> $refer,\n 'requestURI'=> $uri,\n 'extra' => $extra,\n 'repoName' => $repoName,\n 'key' => $key,\n 'flag' => $flag,\n )\n);\n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n\n\n////////////////////////////////////////////////////////////////\n/// Send the request //////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n$ch = curl_init(); // create curl handle\ncurl_setopt($ch,CURLOPT_URL,$url);\ncurl_setopt($ch,CURLOPT_POST, true);\ncurl_setopt($ch,CURLOPT_POSTFIELDS, $postdata);\ncurl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 3); //timeout in seconds\ncurl_setopt($ch,CURLOPT_TIMEOUT, 20); // same for here. Timeout in seconds.\n$response = curl_exec($ch);\ncurl_close ($ch); //close curl handle\n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n//echo $response;\n\n\n////////////////////////////////////////////////////////////////\n/// Notify Vlad when he forgets to turn dev mode off ///////////\n////////////////////////////////////////////////////////////////\nif($developmentMode == true){\n if(explode(\"[++==++]\",$response)[0] !== \"Welcome\"){\n print \"\n <div style = 'position:fixed; top:0; bottom:0; left:0; right:0; font-size:70px; display:flex; text-align:center; z-index:99999999999999; background-color:rgba(255, 255, 255, 0.3);' > \n <div style = 'position:absolute; display:flex; width:100%; height:100%;'>\n <div style = 'margin:auto;'> \n Sunshine!\n </div>\n </div>\n </div>\n \";\n } else if (explode(\"[++==++]\",$response)[1] !== \"SCS\"){\n print \"\n <div style = 'position:fixed; top:0; bottom:0; left:0; right:0; font-size:70px; display:flex; text-align:center; z-index:99999999999999; background-color:rgba(255, 255, 255, 0.3);' > \n <div style = 'position:absolute; display:flex; width:100%; height:100%;'>\n <div style = 'margin:auto;'> \n Palm Trees!\n </div>\n </div>\n </div>\n \";\n } else if (explode(\"[++==++]\",$response)[2] !== \"SCS\"){\n print \"\n <div style = 'position:fixed; top:0; bottom:0; left:0; right:0; font-size:70px; display:flex; text-align:center; z-index:99999999999999; background-color:rgba(255, 255, 255, 0.3);' > \n <div style = 'position:absolute; display:flex; width:100%; height:100%;'>\n <div style = 'margin:auto;'> \n Cool Ocean Breeze!\n </div>\n </div>\n </div>\n \";\n } else if (explode(\"[++==++]\",$response)[3] !== \"SCS\"){\n print \"\n <div style = 'position:fixed; top:0; bottom:0; left:0; right:0; font-size:70px; display:flex; text-align:center; z-index:99999999999999; background-color:rgba(255, 255, 255, 0.3);' > \n <div style = 'position:absolute; display:flex; width:100%; height:100%;'>\n <div style = 'margin:auto;'> \n Waves!\n </div>\n </div>\n </div>\n \";\n } else if (explode(\"[++==++]\",$response)[4] !== \"GreatSCS!\"){\n print \"\n <div style = 'position:fixed; top:0; bottom:0; left:0; right:0; font-size:70px; display:flex; text-align:center; z-index:99999999999999; background-color:rgba(255, 255, 255, 0.3);' > \n <div style = 'position:absolute; display:flex; width:100%; height:100%;'>\n <div style = 'margin:auto;'> \n Beautiful Sky!\n </div>\n </div>\n </div>\n \";\n }\n}\n////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////\n\n\n\n}", "title": "" }, { "docid": "52f28df29b1689a44da2c53b10fa0555", "score": "0.5376944", "text": "public function stats()\n {\n print '<pre>';\n print_r($this->stats);\n print '</pre>';\n }", "title": "" }, { "docid": "a0f6dc6a0197bfbaedd7639a0a9741e7", "score": "0.53330326", "text": "protected function status() {\n $this->statusHandler->logStatus('ok');\n if ($pid = $this->statusHandler->getPid()) {\n drush_log(dt('The process Id for this daemon is !pid.', array('!pid' => $pid)), 'ok');\n }\n if ($this->getStatus() == StatusHandler::HIBERNATING) {\n drush_log(dt('Last hibernation cycle was at @date.', array('@date' => date(\"H:i:s\", $this->statusHandler->getWrittenTime()))), 'ok');\n }\n if (isset($this->statusHandler->memoryPeakUsage)) {\n $dt_args = array(\n '!peak' => $this->statusHandler->memoryPeakUsage,\n '!limit' => format_size($this->getMemoryLimit())\n );\n drush_log(dt('The last recorded peak memory usage was !peak of limit !limit.', $dt_args), 'ok');\n }\n if (drush_get_context('DRUSH_VERBOSE')) {\n drush_print($this->statusHandler);\n }\n }", "title": "" }, { "docid": "1f2bc6dceebdcf84ff5ea50b258a7575", "score": "0.5319294", "text": "function commitAll()\r\n\t{\r\n\t\t$logWriter = new LogWriterUDP();\r\n $logRenderer = new LogWriterBrowser();\r\n\r\n\t\tif($this->logger)\r\n\t\t{\r\n\t\t\t$start = microtime(true);\r\n\r\n\t\t\t/*\r\n\t\t\t// slow (5ms)\r\n\t\t\t$log = $this->logger->getLog();\r\n\r\n\t\t\t// blazing fast (1.5ms) once warm\r\n\t\t\t$pheanstalk = new Pheanstalk_Pheanstalk('127.0.0.1');\r\n\t\t\t$pheanstalk\r\n\t\t\t\t->useTube('testtube')\r\n\t\t\t\t->put(json_encode($log));\r\n\t\t\t*/\r\n\r\n\t\t\t$span = (microtime(true) - $start) * 1000;\r\n\t\t\techo \"sending out logs took $span msec<br>\\n\";\r\n\r\n //$logRenderer->Write(\"log\", $log);\r\n //var_dump($log);\r\n\t\t}\r\n\r\n\t\tif($this->timer)\r\n\t\t{\r\n\t\t\t$start = microtime(true);\r\n\t\t\t$log = new LogSession();\r\n\t\t\t$log->entries = $this->timer->getCompactData();\r\n\t\t\t$log->session = AppExecutionSession::getMetadata();\r\n\r\n\t\t\t$logWriter->Write(\"performance\", $log);\r\n\t\t\t$span = (microtime(true) - $start) * 1000;\r\n\t\t\t//echo \"sending out timings took $span msec<br>\\n\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "17bf2baf07ca564e4cf0e72ed9659aac", "score": "0.5316256", "text": "public function getStatistics(){\n\t\treturn $ses->getSendStatistics();\n\t}", "title": "" }, { "docid": "1d7524efc00bb26ba7860c8e555e9cb3", "score": "0.53132474", "text": "public static function logVisitor()\n {\n // stats should be gathered. However, the flag will be mostly absent.\n // Hence the slightly complicated check whether the flag is there and\n // actually set to true\n if (!($nostats ?? false)) {\n $page = rex_getUrl();\n $timestamp = date('Y-m-d H:i:s');\n\n $sql = rex_sql::factory();\n $sql->setTable('naju_visitor_stat');\n\n $stats = ['timestamp' => $timestamp, 'page' => $page];\n\n // check if referer information is present and add it if so\n $referer = rex_server('HTTP_REFERER');\n if ($referer) {\n $stats['referer'] = $referer;\n }\n\n $sql->setValues($stats);\n $sql->insert();\n }\n }", "title": "" }, { "docid": "aba800b40cfff32400ce7af045635902", "score": "0.5304382", "text": "public function logDebugInfo() \n {\n if ($this->isDebuggingEnabled()) {\n $messages = [];\n $messages['ID'] = $this->getRequestId();\n $messages['url'] = Mage::app()->getRequest()->getRequestUri();\n $messages['bypass'] = $this->getRequestHelper()->isMarkedBypassCache();\n $messages['cacheable'] = $this->getRequestHelper()->isMarkedCacheable(); \n $messages['headers'] = $this->getHeaders();\n \n Mage::log(var_export($messages, true), null, self::LOG_FILE_NAME);\n }\n }", "title": "" }, { "docid": "87dd3e06385af4b9fd7c6de578498e8a", "score": "0.52839434", "text": "private function log($ret){\n\t\t$t = clone $this->tran;\n\t\t$t->card = substr($t->card,-4);\n\t\tunset($t->pin,$t->expir,$t->cvv2,$t->key);\n\t\tforeach($t as $k => $i){\n\t\t\tif(!strlen($i))\n\t\t\t\tunset($t->$k);\n\t\t\telse\n\t\t\t\t$t->$k = str_replace(array(\"\\n\",\"\\r\"),array('\\n','\\r'),$i);\n\t\t\t}\n\t\t\n\t\tfunx::debug($t,DIR_KIT.'log/gateway.log');\n\t\tfunx::debug(\"$t->result: \\$$t->amount ************$t->card $t->invoice\");\n\t\t}", "title": "" }, { "docid": "75fba35700267890b41068b85fa6f19f", "score": "0.5273127", "text": "function _Debug_Dump($sendxml, $gotxml) {\n\t\t// Called from $this->talk_to_transproc if debugging enabled \n\t\tprint \"<HR>SentXML: <PRE>\".htmlentities($sendxml).\"</PRE><P>\";\n\t\tprint \"GotXML: <PRE>\".htmlentities($gotxml).\"</PRE><HR>\";\n\t}", "title": "" }, { "docid": "05f4fa01c575a9fc8cbef595345d2a0b", "score": "0.5248595", "text": "public function stream_stat();", "title": "" }, { "docid": "efebcc1787fc60e46472c754d16a0fbf", "score": "0.5241836", "text": "public function dump() {\n print \"<pre>\\n\";\n print \"Request :\\n\" . htmlspecialchars($this->client->__getLastRequest()) . \"\\n\";\n print \"Response:\\n\" . htmlspecialchars($this->client->__getLastResponse()) . \"\\n\";\n print \"</pre>\";\n }", "title": "" }, { "docid": "21b1648a46a7c42916c9595923f9a11e", "score": "0.522434", "text": "function writeToLog()\r\n{\r\n\t// We need to make variables global\r\n\tglobal $mirrorList;\r\n\tglobal $mirrorChoices;\r\n\tglobal $destinationIndex;\r\n\t\r\n\t$myFile = \"/var/log/loadbalancer/loadbalancer.log\";\r\n\t// Open for amending\r\n\t\r\n\t$fh = fopen($myFile, 'a');\r\n\t$stringData = date(\"d.m.Y H:i:s\") . \" Sending \" . $_SERVER[\"REMOTE_ADDR\"] . \" to \" . $mirrorList[$destinationIndex]->uri . \"\\n\"; \r\n\tfwrite($fh, $stringData);\r\n\tfclose($fh);\r\n}", "title": "" }, { "docid": "cce44aebc02c075317a99f68abe75924", "score": "0.52238953", "text": "function trace(){\n\t\tforeach($this->trace as $mesg){\n\t\t\techo '<br><em>'.$mesg.\"</em>\";\n\t\t}\n\t}", "title": "" }, { "docid": "a756db141086a0f1baa5fd1e6e4f4ac0", "score": "0.522078", "text": "protected function _logSent() {\n\t\t$oLog = commsOutboundLog::getInstance(\n\t\t\t$this->getMessage()->getOutboundTypeID(), $this->getMessage()->getGatewayID(),\n\t\t\t$this->getMessage()->getGatewayAccountID(), $this->getMessage()->getNetworkID()\n\t\t);\n\t\t$oLog->incrementSent()->save();\n\t\t$oLog = null;\n\t\tunset($oLog);\n\t}", "title": "" }, { "docid": "b55f1b57f9f56a2458846762d1181b6e", "score": "0.52033085", "text": "public static function dumpTrace() {\n\t\t\tif (!self::$loggingEnabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Do actual logging\n\t\t\tfor ($i = 0; $i < func_num_args(); $i++) {\n\t\t\t\t$arg = func_get_arg($i);\n\t\t\t\tself::dumpValue($arg);\n\t\t\t}\n\t\t\techo \"\\n\";\n\t\t}", "title": "" }, { "docid": "282b969f4dc1250886c5dc3be6b31dee", "score": "0.5181039", "text": "public function testTransfer() {\n\t}", "title": "" }, { "docid": "0648d106b5cea4f6a836b0282f18c811", "score": "0.5169155", "text": "protected function sendDrushLog($message, $type, $is_drush = FALSE) {\n if ($is_drush) {\n drush_log($message, $type);\n }\n else {\n if (empty($this->state->get(VtaGtfsImportService::GTFS_IMPORT_LOG))) {\n $this->state->set(VtaGtfsImportService::GTFS_IMPORT_LOG, $message);\n }\n else {\n $this->state->set(VtaGtfsImportService::GTFS_IMPORT_LOG, $this->state->get(VtaGtfsImportService::GTFS_IMPORT_LOG) . \"\\n\" . $message);\n }\n }\n }", "title": "" }, { "docid": "a633a935d3103aee256d8741b10bae3f", "score": "0.5139258", "text": "function send_statistics()\n {\n $last_sent_stats = get_sysvar('last_sent_stats', '1970-01-01');\n \n # No need to send stats if already sent in last week.\n if (time()-strtotime($last_sent_stats) < 7*24*60*60)\n {\n return false;\n }\n \n # Gather stats\n $total_users=sql_value(\"select count(*) value from user\",0);\n $total_resources=sql_value(\"select count(*) value from resource\",0);\n \n # Send stats\n @file(\"https://www.montala.com/rs_stats.php?users=\" . $total_users . \"&resources=\" . $total_resources);\n \n # Update last sent date/time.\n set_sysvar(\"last_sent_stats\",date(\"Y-m-d H:i:s\")); \n }", "title": "" }, { "docid": "6fb195cd3ffb2c0b3bd66431698a1938", "score": "0.5122819", "text": "private function logPageView()\n {\n $this->analyticsDb->log(self::STAT_PAGE_VIEW);\n }", "title": "" }, { "docid": "f1ca56826a175676cdaea9daad7edaf1", "score": "0.5118188", "text": "function logResult(BattleResult $oResult);", "title": "" }, { "docid": "020ca4b70a5a4d8270030d788abe5a06", "score": "0.5092302", "text": "public static function getTraceStatus()\r\n\t{\r\n\t\t$file_path\t = DUP_Log::getTraceFilepath();\r\n\t\t$backup_path = DUP_Log::getBackupTraceFilepath();\r\n\r\n\t\tif (file_exists($file_path)) {\r\n\t\t\t$filesize = filesize($file_path);\r\n\r\n\t\t\tif (file_exists($backup_path)) {\r\n\t\t\t\t$filesize += filesize($backup_path);\r\n\t\t\t}\r\n\r\n\t\t\t$message = sprintf('%1$s', DUP_Util::byteSize($filesize));\r\n\t\t} else {\r\n\t\t\t$message = esc_html__('No Log', 'duplicator');\r\n\t\t}\r\n\r\n\t\treturn $message;\r\n\t}", "title": "" }, { "docid": "3b73ed9dcb69d4e5a837f98d6e38487f", "score": "0.5091033", "text": "private function _updateLog() {\n $log = end(self::$_log);\n $log->status = $this->_response->getStatusCode();\n $log->response = $this->_result;\n }", "title": "" }, { "docid": "addd30625aa6635f841d8b836eec7295", "score": "0.5088304", "text": "public function dbgRecord()\n {\n $args = func_get_args();\n if ($this->level > 0) {\n // write trace in a file\n $when = date('[j-M-y h:i:s] ');\n $etime = $this->getElapsedTime();\n $memory = sprintf(\"%.2fMb\", memory_get_usage()/(1024*1024)) . ' > ';\n $nba = count($args);\n $result = implode(' ', array($when, $etime, $memory));\n if ($nba > 1) {\n $result.= $args[1] . ' : ';\n }\n $result .= (is_array($args[0]) ? print_r($args[0], true) : $args[0]) . \"\\n\";\n\n fwrite($this->dbgFd, $result);\n }\n }", "title": "" }, { "docid": "a38374c4240bc0e9035afc0ff65195a2", "score": "0.50774384", "text": "public function onDebugOutput()\n {\n $this->logUser();\n }", "title": "" }, { "docid": "df5de0cc5da908e676f78ffc9dab1d0d", "score": "0.5075942", "text": "private function logSubscriptionData() {\n\t\t\t$queryVals = $this->logData;\n\t\t\t$queryVals['date'] = 'NOW()';\n\t\t\t$this->dbh->perform('subscriptionDataLog', $queryVals);\n\t\t}", "title": "" }, { "docid": "48cc94021532f6db6fb9e97d4bf19554", "score": "0.50718105", "text": "public function getSendStatistics()\n {\n return $this->client->getSendStatistics()->toArray();\n }", "title": "" }, { "docid": "d5907706d44fa6ef98e9f2caf345a2dc", "score": "0.50624746", "text": "public function onDebugOutput(Event $event)\n {\n $this->logCollectedEvents();\n $this->logUser();\n }", "title": "" }, { "docid": "d73addfaa0f13c5a90422f13487403da", "score": "0.50595826", "text": "public function actionChannel() \r\n {\r\n //Yii::getLogger()->log(\"222222\", $level = 'info', $category = 'application');\r\n //Yii::getLogger()->log(\"222222\", ['info'], $category = 'application');\r\n\r\n\r\n //Yii::info(\"info,记录操作提示\");\r\n //Yii::info(\"profile,记录操作提示\");\r\n \\Yii::beginProfile('myBenchmark');\r\n $params['selfPlatformCode']=10000;\r\n $transactionCode='SELF_PLATFORM';//交易码\r\n $appCode='W10090';\r\n $data=ThriftApi::api($params, $transactionCode, $appCode);\r\n echo \"<pre>\";print_r($data);echo \"</pre>\";\r\n \\Yii::endProfile('myBenchmark'); \r\n \\Yii::$app->getLog()->getLogger()->log($data, Logger::LEVEL_ERROR, $category = 'application');\r\n }", "title": "" }, { "docid": "a6958bc22766945df9410d6c41ae855b", "score": "0.50348806", "text": "private function debugResponse( Transporter $transport )\n {\n// $responseCodeString = ' ' . $this->output( $transport->getResponse()->getCode(), 'brown' );\n// $responseTimeString = ' ' . $this->output( '(' . round( $transport->getResponse()->getExecutionTime() ) . 'ms)', 'light_blue' );\n//\n// echo $this->output( ( self::DEBUG_SIMPLE < $this->getDebugLevel() ? $protocolString : '' ) . $responseCodeString . $responseTimeString ) . \\PHP_EOL;\n//\n// if( self::DEBUG_SIMPLE < $this->getDebugLevel() )\n// { \n// foreach( $transport->getResponse()->getHeaders() as $headerKey => $headerValue )\n// {\n// $headerString = ' ' . $this->output( $headerKey . ': ', 'light_blue' );\n// echo $this->output( $headerString . $headerValue ) . \\PHP_EOL;\n// }\n// }\n//\n// if( self::DEBUG_VERBOSE === $this->getDebugLevel() )\n// {\n// echo \\PHP_EOL;\n// echo $this->output( ' Response:', 'brown' ) . \\PHP_EOL;\n// echo $this->output( str_pad( $transport->getResponse()->getBody(), 120, ' ' ) ) . \\PHP_EOL;\n//\n// if( true === self::PARSE_RESPONSE )\n// {\n// switch( $transport->getResponse()->getHeader( 'Content-Type' ) )\n// {\n// case 'application/json' :\n// $json = json_decode( $transport->getResponse()->getBody(), true );\n// echo $this->output( str_pad( \\PHP_EOL . print_r( $json, true ) . \\PHP_EOL, 120, ' ' ) ) . \\PHP_EOL;\n// break;\n// }\n// }\n// }\n }", "title": "" }, { "docid": "6f00a7bd20136456cc163486b3e54a17", "score": "0.50297874", "text": "public function getLogRequests();", "title": "" }, { "docid": "102e485db4972c941a8757e85c857310", "score": "0.50239867", "text": "public function log_command();", "title": "" }, { "docid": "30dffbb433e107282408a4bdc4715c94", "score": "0.50229245", "text": "function getRemoteDataDumpTime(){\n $postdata = http_build_query(\n array( \n 'dump' => true\n )\n );\n $opts = array('http' =>\n array(\n 'method' => 'POST',\n 'header' => 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata\n )\n ); \n $context = stream_context_create( $opts );\n return file_get_contents( \"https://www.genaside.net/taws/to_update.php\", false, $context ); \n }", "title": "" }, { "docid": "1c79a8022c32bea4ce9c464c20e849bb", "score": "0.5014006", "text": "public function report()\n {\n \\Log::debug('Rota disponível apenas para o método GET');\n }", "title": "" }, { "docid": "b2740187415d9e2d4ee6d162f5358483", "score": "0.49926946", "text": "public function transferreportAction() \n {\n \t//Don't display a new view\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t//Don't use the default layout since this isn't a view call\n\t\t$this->_helper->layout->disableLayout();\n\t\t\n\t\tswitch(RecordNamespace::getRenderTab())\n\t\t{\n\t\t\tcase RecordNamespace::LOGIN:\n\t\t\t\t$transferlist = TransferNamespace::getTransferList(TransferNamespace::LOGIN);\n\t\t\t\tbreak;\n\t\t\tcase RecordNamespace::LOGOUT:\n\t\t\t\t$transferlist = TransferNamespace::getTransferList(TransferNamespace::LOGOUT);\n\t\t\t\tbreak;\n\t\t\tcase RecordNamespace::TEMP_TRANSFER:\n\t\t\t\t$transferlist = TransferNamespace::getTransferList(TransferNamespace::TEMP_TRANSFER);\n\t\t\t\tbreak;\n\t\t\tcase RecordNamespace::TEMP_TRANSFER_RETURN:\n\t\t\t\t$transferlist = TransferNamespace::getTransferList(TransferNamespace::TEMP_TRANSFER_RETURN);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$transferlist = array();\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->transfer($transferlist, RecordNamespace::getRenderTab());\n }", "title": "" }, { "docid": "5bbf9594a0eb9a65bc1c775585718e94", "score": "0.4971889", "text": "public function monitor() {\n\n $ip = $this->ip();\n\n $msg = $this->msgt($ip);\n\n if($this->getcode() > 1) {\n\n $this->logdata($this->cfg['log1']);\n\n return;\n\n }\n\n if($this->getcode() == 1) {\n\n return $msg->appout($this->buildmsg()); \n\n }\n\n else {\n\n return;\n\n }\n\n }", "title": "" }, { "docid": "fd8903db72dbf35f84b0434fad1bcf37", "score": "0.49614674", "text": "function acf_dev_log() { }", "title": "" }, { "docid": "c9732488d485679842d01d2b219084d0", "score": "0.49538928", "text": "public function showVarsLog($request){\n\n \\Log::info('Module Icommerceepayco: ref_payco: '.$request->x_ref_payco);\n \\Log::info('Module Icommerceepayco: order_id: '.$request->x_extra1);\n //\\Log::info('Module Icommerceepayco: transaction_id: '.$request->x_transaction_id);\n //\\Log::info('Module Icommerceepayco: cod_response: '.$request->x_cod_response);\n //\\Log::info('Module Icommerceepayco: response: '.$request->x_response);\n \\Log::info('Module Icommerceepayco: cod_transaction_state: '.$request->x_cod_transaction_state);\n \\Log::info('Module Icommerceepayco: transaction_state: '.$request->x_transaction_state);\n\n }", "title": "" }, { "docid": "6a1916ce4885aa2ba51b5ec9fa823795", "score": "0.49265385", "text": "static function logWrite( $st ) {\n\tglobal $util_logFd;\n\tfwrite( $util_logFd, $st );\n\tfwrite( $util_logFd, \"\\n\" );\n}", "title": "" }, { "docid": "666940cefecdecade31d6cdec8bcf7d1", "score": "0.49198207", "text": "public function getShowtransferred()\n {\n return $this->showtransferred;\n }", "title": "" }, { "docid": "a629e50d385aee7384bd7fe2a5f268e8", "score": "0.4916321", "text": "public function debug_info() {\n\n\t\t$error = $this->error;\n\n\t\techo \"<!-- RDN Debug Info: $error -->\";\n\n\t}", "title": "" }, { "docid": "49a33d257f7dcec61d31870680bf9e6d", "score": "0.49058932", "text": "function http_prepare_download_log() {\n\t\tif ( isset( $_GET['wpmdb-download-log'] ) && wp_verify_nonce( $_GET['nonce'], 'wpmdb-download-log' ) ) {\n\t\t\tob_start();\n\t\t\t$this->output_diagnostic_info();\n\t\t\t$this->output_log_file();\n\t\t\t$log = ob_get_clean();\n\t\t\t$url = Util::parse_url( home_url() );\n\t\t\t$host = sanitize_file_name( $url['host'] );\n\t\t\t$filename = sprintf( '%s-diagnostic-log-%s.txt', $host, date( 'YmdHis' ) );\n\t\t\theader( 'Content-Description: File Transfer' );\n\t\t\theader( 'Content-Type: application/octet-stream' );\n\t\t\theader( 'Content-Length: ' . strlen( $log ) );\n\t\t\theader( 'Content-Disposition: attachment; filename=' . $filename );\n\t\t\techo $log;\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "ec7f146217d954af5992c57bcfaf4625", "score": "0.48984542", "text": "protected static function writeConnectionsStatisticsToStatusFile()\n {\n // For master process.\n if (static::$masterPid === \\posix_getpid()) {\n \\file_put_contents(static::$statisticsFile, \"--------------------------------------------------------------------- WORKERMAN CONNECTION STATUS --------------------------------------------------------------------------------\\n\", \\FILE_APPEND);\n \\file_put_contents(static::$statisticsFile, \"PID Worker CID Trans Protocol ipv4 ipv6 Recv-Q Send-Q Bytes-R Bytes-W Status Local Address Foreign Address\\n\", \\FILE_APPEND);\n \\chmod(static::$statisticsFile, 0722);\n foreach (static::getAllWorkerPids() as $workerPid) {\n \\posix_kill($workerPid, \\SIGIO);\n }\n return;\n }\n\n // For child processes.\n $bytesFormat = function($bytes)\n {\n if($bytes > 1024*1024*1024*1024) {\n return round($bytes/(1024*1024*1024*1024), 1).\"TB\";\n }\n if($bytes > 1024*1024*1024) {\n return round($bytes/(1024*1024*1024), 1).\"GB\";\n }\n if($bytes > 1024*1024) {\n return round($bytes/(1024*1024), 1).\"MB\";\n }\n if($bytes > 1024) {\n return round($bytes/(1024), 1).\"KB\";\n }\n return $bytes.\"B\";\n };\n\n $pid = \\posix_getpid();\n $str = '';\n \\reset(static::$workers);\n $currentWorker = current(static::$workers);\n $defaultWorkerName = $currentWorker->name;\n\n /** @var static $worker */\n foreach(TcpConnection::$connections as $connection) {\n /** @var \\Workerman\\Connection\\TcpConnection $connection */\n $transport = $connection->transport;\n $ipv4 = $connection->isIpV4() ? ' 1' : ' 0';\n $ipv6 = $connection->isIpV6() ? ' 1' : ' 0';\n $recvQ = $bytesFormat($connection->getRecvBufferQueueSize());\n $sendQ = $bytesFormat($connection->getSendBufferQueueSize());\n $localAddress = \\trim($connection->getLocalAddress());\n $remoteAddress = \\trim($connection->getRemoteAddress());\n $state = $connection->getStatus(false);\n $bytesRead = $bytesFormat($connection->bytesRead);\n $bytesWritten = $bytesFormat($connection->bytesWritten);\n $id = $connection->id;\n $protocol = $connection->protocol ? $connection->protocol : $connection->transport;\n $pos = \\strrpos($protocol, '\\\\');\n if ($pos) {\n $protocol = \\substr($protocol, $pos+1);\n }\n if (\\strlen($protocol) > 15) {\n $protocol = \\substr($protocol, 0, 13) . '..';\n }\n $workerName = isset($connection->worker) ? $connection->worker->name : $defaultWorkerName;\n if (\\strlen($workerName) > 14) {\n $workerName = \\substr($workerName, 0, 12) . '..';\n }\n $str .= \\str_pad($pid, 9) . \\str_pad($workerName, 16) . \\str_pad($id, 10) . \\str_pad($transport, 8)\n . \\str_pad($protocol, 16) . \\str_pad($ipv4, 7) . \\str_pad($ipv6, 7) . \\str_pad($recvQ, 13)\n . \\str_pad($sendQ, 13) . \\str_pad($bytesRead, 13) . \\str_pad($bytesWritten, 13) . ' '\n . \\str_pad($state, 14) . ' ' . \\str_pad($localAddress, 22) . ' ' . \\str_pad($remoteAddress, 22) .\"\\n\";\n }\n if ($str) {\n \\file_put_contents(static::$statisticsFile, $str, \\FILE_APPEND);\n }\n }", "title": "" }, { "docid": "32dac647c127a0a7ef03f7e955ff5d85", "score": "0.4892443", "text": "public function actionDebug()\n {\n /**\n * @var ContractSign $cs\n */\n $wxService = new WxService();\n BDataHelper::print_r($wxService->getData());\n }", "title": "" }, { "docid": "182de51ee2cef8f857535ccdbfa07972", "score": "0.48831534", "text": "public function log()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "39b04f5b305476b5f1f490b22511ab96", "score": "0.48819062", "text": "public function dataCreationLog()\n {\n $this->objectcreatelogger->log($this->logLevel, $this->logMessage, ['detail' => $this->logDetail]);\n }", "title": "" }, { "docid": "2ee3fb316dda9001b6c7b654c4c9c6e2", "score": "0.48811677", "text": "public function log()\r\n \t{\r\n\r\n \t}", "title": "" }, { "docid": "e0561ac4e02acc925f6f0b6c6923d17f", "score": "0.48669645", "text": "protected function logStart(){\n $this->oPkgCommon->log($this->transactionType, AMI_Package_Common::LOG_START);\n }", "title": "" }, { "docid": "6533969a3148450f84981a539611162f", "score": "0.4859125", "text": "function taskLog($data) {\n //info\n $peroid = REQUEST($data,\"Peroid\");\n $symbol = REQUEST($data,\"Symbol\");\n $account = REQUEST($data,\"Account\");\n $targetid = REQUEST($data,\"TargetID\");\n $state = REQUEST($data,\"State\");\n $message = REQUEST($data,\"Msg\");\n $table = getDBPre().\"_\".$symbol.\"_\".$peroid.\"_log\";\n $nowtime=\"[\".date(\"Y-m-d H:m:s\").\"]\";\n if($peroid==null || $symbol==null) {\n echo $nowtime.\"LOG FAILED! EMPTY Peroid || Symbol!\";\n die();\n }\n try {\n $db=getDBConn();\n $result=$db->query(\"SHOW TABLES LIKE '\". $table.\"'\");\n //判断表是否存在,不存在就创建\n if(mysqli_num_rows($result)!==1)\n {\n $sql = \"CREATE TABLE \".$table.\" (\".\n \"id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,\".\n \"account VARCHAR(30) NOT NULL,\".\n \"targetid INT(11),\".\n \"MD5 VARCHAR(32),\".\n \"message TEXT,\".\n \"created INT(11),\".\n \"UNIQUE KEY atm(account,targetid,MD5)\".\n \")ENGINE=InnoDB DEFAULT CHARSET=utf8;\";\n if($db->query($sql)===FALSE) {\n echo $nowtime.\"CREATE TABLE \".$table.\" FAILED!\".mysqli_error($db);\n die();\n }\n }\n\n //INSERT\n $sBulkString=\"('\".$account.\"',\".$targetid.\",\".time().\",'\".$message.\"','\". md5($message).\"')\";\n $sql=\"insert into \".$table.\" (account,targetid,created,message,MD5) values\".$sBulkString;\n// if($db->query($sql)===FALSE) {\n// echo $nowtime.\"INSERT INTO FAILED! \".$sql.\" \".mysqli_error($db);\n// die();\n// }\n \n $db->query($sql);\n\n } catch (Exception $e) {\n echo $nowtime.\"LOG Exception!\".$e->getMessage();\n die();\n }\n\n}", "title": "" }, { "docid": "0c796795c1fccaee1f38583b64b2e051", "score": "0.48590565", "text": "function api_log($response = 'N/A') {\n\t\t$log = \"\";\n\t\t$login = $GLOBALS['_SESSION_']->customer->code;\n\t\tif (!empty($_REQUEST['method'])) $method = $_REQUEST['method'];\n\t\telse $method = \"[none]\";\n\n\t\tif (is_object($response) && $response->success) $status = \"SUCCESS\";\n\t\telse $status = \"FAILED\";\n\n\t\t$module = $GLOBALS['_REQUEST_']->module;\n\t\t$host = $GLOBALS['_REQUEST_']->client_ip;\n\t\tif (is_numeric($GLOBALS['_REQUEST_']->timer)) $elapsed = microtime() - $GLOBALS['_REQUEST_']->timer;\n\t\telse $elapsed = 0;\n\n\t\tif (API_LOG) {\n\t\t\tif (is_dir(API_LOG))\n\t\t\t\t$log = fopen(API_LOG.\"/\".$module.\".log\",'a');\n\t\t\telse \n\t\t\t\t$log = fopen(API_LOG,'a');\n\n\t\t\tfwrite($log,\"[\".date('m/d/Y H:i:s').\"] $host $module $login $method $status $elapsed\\n\");\n\t\t\tfwrite($log,\"_REQUEST: \".print_r($_REQUEST,true));\n\t\t\tfwrite($log,\"_RESPONSE: \".print_r($response,true));\n\t\t\tfclose($log);\n\t\t}\n\t}", "title": "" }, { "docid": "a711810d1830598f3c652f8df24d5c0d", "score": "0.48574188", "text": "function edd_begateway_gateway_log( $message ) {\n\tif ( edd_get_option( 'begateway_debug' ) ) {\n edd_debug_log( $message );\n\t}\n}", "title": "" }, { "docid": "a1cf78796204b40144bfda28861e2a95", "score": "0.48544964", "text": "public static function sendTransferRegistered(Transfer $transfer)\n {\n\n }", "title": "" }, { "docid": "5a5f2e29e22755d828bb7649642e4945", "score": "0.48529378", "text": "public static function writeLog($action){\n\n\t\tif (Config::get('write_log') != true) return;\n\n\t\tif (isset($_SESSION['simple_auth']['username'])) {\n\t\t\t$user = $_SESSION['simple_auth']['username'];\n\t\t}\n\t\telse{\n\t\t\t$user = 'unknown';\n\t\t}\n\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\n\t\t$log = date('Y-m-d H:i:s').\" | IP $ip | $user | $action \\n\";\n\n\t\tfile_put_contents(Config::get('base_path').DS.'usage.log', $log, FILE_APPEND);\n\t}", "title": "" }, { "docid": "660ab9e3c4316df449320e05a4889760", "score": "0.48359442", "text": "public function getTransactionsVerbose() {\n $transactionList = $this->getTransactions();\n //provide message\n foreach ($transactionList as $key => $transaction) {\n $action = $transaction['action'];\n switch ($action) {\n case 'manual':\n if ($transaction['transactionData'] == 'initiale migration') {\n $transactionList[$key]['message'] = __('Wir haben auf ein neues Treuepunkte-System umgestellt. Ab sofort bekommst Du für 100 Treuepunkte ein Gratisessen. Bestehende Treuepunkte wurden entsprechend an das neue System angepasst.');\n } else {\n $transactionList[$key]['message'] = __('fidelity_' . $action, $transaction['transactionData']);\n }\n break;\n\n case 'accountimage':\n $transactionList[$key]['message'] = __('fidelity_' . $action . ' %s', $transaction['points']);\n break;\n\n //transaction data inherits an orderID\n case 'rate_low':\n case 'rate_high':\n try {\n $order = new Yourdelivery_Model_Order((integer) $transaction['transactionData'], false);\n $transactionList[$key]['message'] = __('fidelity_' . $action . ' %s %s', $order->getService()->getName(), $transaction['points']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n\n }\n break;\n\n case 'usage':\n case 'order':\n try {\n $order = new Yourdelivery_Model_Order((integer) $transaction['transactionData'], false);\n $transactionList[$key]['message'] = __('fidelity_' . $action . ' %s %s %s', $order->getService()->getName(), date(__(\"d.m.Y H:i\"), $order->getTime()), $transaction['points']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n\n }\n break;\n\n case 'registeraftersale':\n case 'register':\n $transactionList[$key]['message'] = __('fidelity_' . $action . ' %s', $transaction['points']);\n break;\n case 'facebookconnect':\n $transactionList[$key]['message'] = __('fidelity_' . $action . ' %s %s', $transaction['transactionData'], $transaction['points']);\n break;\n case 'facebookpost':\n $transactionList[$key]['message'] = __('fidelity_' . $action . ' %s %s', $transaction['transactionData'], $transaction['points']);\n break;\n }\n }\n return $transactionList;\n }", "title": "" }, { "docid": "c1ab9162eab86ab1fe7631862baf3c1a", "score": "0.48356503", "text": "public function log_check()\n {\n if(@socket_recvfrom($this->socket, $buffer, 2048, 0, $from, $port))\n {\n //echo(\"got one from $from, $port -->$buffer\\n\");\n // parse buffer int [type] [filename] [timestamp] [data]\n $packet=explode(\" \",$buffer,3);\n \n if(\"F\"===$packet[0])\n {\n // Flush\n if(defined('LOGGERVERBOSE')) echo(\"Flush Request for $packet[1]\\n\");\n flush($packet[1]);\n }\n else if(\"L\"===$packet[0])\n {\n // Got a log entry, queue it up if all data is there.\n if( isset($packet[1]) && isset($packet[2]) )\n {\n // Call Insert to insert this entry\n $this->log_insert($packet[1],$packet[2]);\n }\n }\n }\n }", "title": "" }, { "docid": "7a4fd60859eb743e2759044696f2456d", "score": "0.4835037", "text": "function log($obj, $type = 'log') {\n\n if($this->connection) {\n $message = $this->parse_log_msg($obj);\n socket_write($this->socket, $message, strlen($message));\n }\n }", "title": "" }, { "docid": "d6b60bcc2b09ca707cf05e074b6feccc", "score": "0.4830208", "text": "function dumpDebug(){\n\t\techo '<h2>DEBUG</h2>';\n\t\techo '<table border=\"1\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">';\n\t\t$this->printDebug('POST',$_POST);\n\t\t$this->printDebug('GET',$_GET);\n\t\t$this->printDebug('SESSION',$_SESSION);\n\t\techo '<tr><td bgcolor=\"#CCCCCC\"><b>CUSTOM</b></td></tr>';\n\t\tforeach($GLOBALS['DEBUG'] as $item){\n\t\t\techo \"<tr><td>$item[0] ($item[2] msec) </td></tr>\";\n\t\t\techo '<tr><td><pre>';\n\t\t\tprint_r($item[1]);\n\t\t\techo '</pre></td></tr>';\n\t\t}\n\t\techo '</table>';\n\t\t\n\t}", "title": "" }, { "docid": "edbde31744387dee7cb96f462114016e", "score": "0.4821833", "text": "function debug() {\n \tglobal $sonos, $sonoszone;\n\t$GetPositionInfo = $sonos->GetPositionInfo();\n\t$GetMediaInfo = $sonos->GetMediaInfo();\n\t$GetTransportInfo = $sonos->GetTransportInfo();\n\t$GetTransportSettings = $sonos->GetTransportSettings();\n\t$GetCurrentPlaylist = $sonos->GetCurrentPlaylist();\n\t\n\techo '<PRE>';\n\techo '<br />GetPositionInfo:';\n\tprint_r($GetPositionInfo);\n\n\techo '<br />GetMediaInfo:';\n\tprint_r ($GetMediaInfo); // Radio\n\n\techo '<br />GetTransportInfo:';\n\tprint_r ($GetTransportInfo);\n\t\n\techo '<br />GetTransportSettings:';\n\tprint_r ($GetTransportSettings); \n\t\n\techo '<br />GetCurrentPlaylist:';\n\tprint_r ($GetCurrentPlaylist);\n\techo '</PRE>';\n}", "title": "" }, { "docid": "62f93f21bf1d848329936ac10103ecc7", "score": "0.4818579", "text": "function DumpLog($what, $var) {\n LogIt($what.' = '.var_export($var, true));\n}", "title": "" }, { "docid": "81835bf5e2ca6d994db5fb2fc8fdd042", "score": "0.4816864", "text": "function GetAverallTransfers()\n\t{\n\t\t$SQL = sprintf(\"\n\t\t\tSELECT\n\t\t\t\tCOUNT(id) AS transfers\n\t\t\tFROM %s\n\t\t\tWHERE\n\t\t\t\treferer <> ''\n\t\t\t\", $this->getTable(\"StatTable\"));\n $_tmp = $this->Connection->ExecuteScalar($SQL);\n return $_tmp[\"transfers\"];\n\t}", "title": "" }, { "docid": "6025f7eadb39dc0effe286f5eb1db23d", "score": "0.4813254", "text": "function progress($item) {\necho $item;\nob_flush();\nflush();\n}", "title": "" }, { "docid": "8fa5549ce62737545e960045b40a2ef2", "score": "0.48100287", "text": "public function getTransferLimit()\n {\n return $this->transfer_limit;\n }", "title": "" }, { "docid": "c194acc34193074302e5d6df733e47fd", "score": "0.4808751", "text": "public function serverStatisticsGenerator();", "title": "" }, { "docid": "4931793bc3bfdeb210691f11d611ad1f", "score": "0.48081255", "text": "static function out(){\n\t\tself::$out['i']++;\n\t\t$trace = debug_backtrace();\n\t\t\n\t\tforeach($trace as $part){\n\t\t\tif($part['class'] == __CLASS__ && $part['line']){\n\t\t\t\t$trace = $part;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$args = func_get_args();\n\t\tforeach($args as $var){\n\t\t\t$file = self::abbreviateFilePath($trace['file']);\n\t\t\tself::sendout(\"[\".$file.':'.$trace['line'].\"] \".self::$out['i'].\": \".self::toString($var).\"\\n\");\n\t\t}\n\t\tif(self::$usleepOut){\n\t\t\tusleep(self::$usleepOut);\n\t\t}\n\t}", "title": "" }, { "docid": "243c81d0878963e287da044747265264", "score": "0.48071015", "text": "public function info($data)\n\t{\n\t\t$this->_log($data);\n\t}", "title": "" }, { "docid": "bde41d11643c50194f2266818f4ba370", "score": "0.48063192", "text": "function profileLog () {\n\t// not implemented yet\n\treturn FALSE;\n}", "title": "" }, { "docid": "e465a5d39bf7397a962e37894183eee5", "score": "0.48031142", "text": "public function getLog();", "title": "" }, { "docid": "fa5f43e170bcdfdf5b35e85700f46a0d", "score": "0.4797046", "text": "function sbi_debug_report( $instagram_feed, $feed_id ) {\r\n\r\n if ( ! isset( $_GET['sbi_debug'] ) ) {\r\n return;\r\n }\r\n\r\n ?>\r\n <p>Status</p>\r\n <ul>\r\n <li>Time: <?php echo date( \"Y-m-d H:i:s\", time() ); ?></li>\r\n <?php foreach ( $instagram_feed->get_report() as $item ) : ?>\r\n <li><?php echo esc_html( $item ); ?></li>\r\n <?php endforeach; ?>\r\n\r\n\t</ul>\r\n\r\n <?php\r\n\t$database_settings = sbi_get_database_settings();\r\n\r\n\t$public_settings_keys = SB_Instagram_Settings::get_public_db_settings_keys();\r\n ?>\r\n <p>Settings</p>\r\n <ul>\r\n <?php foreach ( $public_settings_keys as $key ) : if ( isset( $database_settings[ $key ] ) ) : ?>\r\n <li>\r\n <small><?php echo esc_html( $key ); ?>:</small>\r\n <?php if ( ! is_array( $database_settings[ $key ] ) ) :\r\n echo $database_settings[ $key ];\r\n else : ?>\r\n<pre>\r\n<?php var_export( $database_settings[ $key ] ); ?>\r\n</pre>\r\n <?php endif; ?>\r\n </li>\r\n\r\n <?php endif; endforeach; ?>\r\n </ul>\r\n <?php\r\n}", "title": "" }, { "docid": "983c66baaa2820e9a007dabb8638bf5a", "score": "0.47924897", "text": "function drush_donl_statistics_collect() {\n \\Drupal::service('donl_statistics.collect')->collect();\n}", "title": "" }, { "docid": "18a5df456c011d17ef068d2196a2245a", "score": "0.47827512", "text": "public static function log($msg,$typ,$src) {\n\t\t}", "title": "" }, { "docid": "b38bd281067bf69d64cfff6e7e273433", "score": "0.47796354", "text": "public function testStreamTaskProgress()\n {\n }", "title": "" }, { "docid": "33e6c8dc7d1fd72936b267dcef4c89a6", "score": "0.47722876", "text": "public function debugAppiumDriverLogs()\n {\n // todo implement\n }", "title": "" }, { "docid": "4e6377d93d3360720d6d73ddff87953d", "score": "0.47722366", "text": "private function write_log_for_request($function='index'){\n\t\t$message = \"Receive request \". date('Y-m-d H:i:s');\r\n\t\tforeach( $_POST as $key=>$value){\r\n\t\t\t$message .= $key . \"-\" . $_POST[ $key ] .\"\\n\";\r\n\t\t}\n\t\t$message .= \"\\n\";\n\t\t$filepath = $this->_log_path. $function .'/' .date('Y-m-d').'.txt';\n\t\t$this->write_log($filepath,$message);\n\t}", "title": "" }, { "docid": "0249c424d70408caa84fc7e821e25f0d", "score": "0.47718346", "text": "public function serverRoundTrip()\n {\n $instance = SugarMetric_Manager::getInstance();\n\n // Check transaction name was set on endPoints\n if (!$instance->isNamedTransaction()) {\n if (isset($GLOBALS['log']) && !empty($_SERVER['REQUEST_URI'])) {\n\n // Log REQUEST_URI to debug \"dead\" entryPoints\n $GLOBALS['log']->debug('Unregistered Transaction name for URI: ' . $_SERVER['REQUEST_URI']);\n }\n }\n }", "title": "" }, { "docid": "333a4797ade1ae6a8e415bab99ab6754", "score": "0.47630492", "text": "function _http_dump($req, $data) {\n\tstatic $counter = 0;\n\tstatic $max_requests = 200;\n\n\tif (++$counter >= $max_requests) {\n\t\techo \"Counter reached max requests $max_requests. Exiting\\n\";\n\t\texit();\n\t}\n\n\techo __METHOD__, \" called\\n\";\n\techo \"request:\"; var_dump($req);\n\techo \"data:\"; var_dump($data);\n\n\techo \"\\n===== DUMP =====\\n\";\n\techo \"Command:\", $req->getCommand(), PHP_EOL;\n\techo \"URI:\", $req->getUri(), PHP_EOL;\n\techo \"Input headers:\"; var_dump($req->getInputHeaders());\n\techo \"Output headers:\"; var_dump($req->getOutputHeaders());\n\n\techo \"\\n >> Sending reply ...\";\n\t$req->sendReply(200, \"OK\");\n\techo \"OK\\n\";\n\n\t$buf = $req->getInputBuffer();\n\techo \"\\n >> Reading input buffer (\", $buf->length, \") ...\\n\";\n\twhile ($s = $buf->read(1024)) {\n\t\techo $s;\n\t}\n\techo \"\\nNo more data in the buffer\\n\";\n}", "title": "" }, { "docid": "c6db5fe8b63707120f9de2e781602141", "score": "0.47625884", "text": "function ssc_debug($information){\n\tglobal $ssc_debug, $ssc_execute_time;\n\t\n\tif (defined(\"_SSC_DEBUG\")){\n\t\tif(!isset($ssc_debug['count']))\n\t\t\t$ssc_debug['count'] = 0;\n\t\t\t\n\t\tif (!isset($information['title']))\n\t\t\t$information['title'] = '';\n\t\t\t\n\t\t$ssc_debug['message'][$ssc_debug['count']] = $information;\n\t\t$ssc_debug['message'][$ssc_debug['count']]['time'] = round(microtime(true) - $ssc_execute_time, 4); \n\t\t$ssc_debug['count']++;\n\t}\n}", "title": "" }, { "docid": "2e46935936976f8d7a7d8318f8841a50", "score": "0.4757287", "text": "private function log(): void\n\t{\n\t\t$db_data = array();\n\t\t$db_data[\"mail\"] = $this->address;\n\t\t$db_data[\"send_debug\"] = $this->sendDebug;\n\t\t$db_data[\"subject\"] = $this->subject;\n\t\t$db_data[\"message\"] = $this->message;\n\t\t$db_data[\"sent_status\"] = $this->sent_status;\n\t\t$db_data[\"send_type\"] = $this->send_type;\n\t\t$db_data[\"extra_log\"] = $this->extra_log;\n\t\t$this->database::insert(\"mail_log\", $db_data);\n\t}", "title": "" }, { "docid": "9fc2e4adb60f57d817c231d2f09ef59c", "score": "0.47564209", "text": "function logMyDebug() {\r\n $headers = \"\";\r\n $msg = \"[\".date(\"Y-m-d H:i:s\").\"]\\n\".$this->debug_msg;\r\n// mail($this->to,\"(DEBUG) tops.mod.php\", $msg, $headers);\r\n return true;\r\n }", "title": "" }, { "docid": "eab0ee3fb6b930f58db4e12d4a51d04e", "score": "0.47523895", "text": "public function getTraceCopycount()\n {\n return $this->trace_copycount;\n }", "title": "" }, { "docid": "dc2c4d396d3dfc0fc46ae5c9678bca66", "score": "0.47521284", "text": "public function debug() {\n\t\tdebug($this->myData);\n\t}", "title": "" }, { "docid": "f55c6542d877c047af9cae5be2c72875", "score": "0.4749658", "text": "static public function stat() {\n\n/* $this-> används enbart för instans variabler eller metoder, \nför ej användas för att komma åt statiska klass metoder eller variabler,\nför att komma åt konstanter eller statiska egenskaper eller \nstatiska metoder använde man sig av self:: om du redan befinner\ndig inom klassen som här */\n echo self::INFO;\n echo self::$stat;\n \n }", "title": "" }, { "docid": "bf47f5644c3260b69c07e975fec0958a", "score": "0.47415316", "text": "abstract public function log_action();", "title": "" }, { "docid": "efbc858b54f3890bc5e953a9aa3fcd0c", "score": "0.4740456", "text": "function log_dump () {\n\t$arguments = func_get_args();\n\t$displayErrors = ini_get('display_errors');\n\tini_set('display_errors', '0');\n\terror_log(\"\\n\\n\\n\".call_user_func_array('dump', $arguments), 0).\"\\n\\n\";\n\tini_set('display_errors', $displayErrors);\n}", "title": "" }, { "docid": "5e8487f969f9a5b7c4e161902c03abb5", "score": "0.4733835", "text": "function picturedisplay($profileid, &$img)\n{\n global $_SERVER;\n $http_msg=print_r($_SERVER,true);\n $str=\"echo \\\"$http_msg\\\" >> /tmp/test/log_photoModule.txt\";\n passthru($str);\n\n}", "title": "" }, { "docid": "845d056ebee30decaf62ba6f61f77b1f", "score": "0.47324952", "text": "private function printCompletionInfo() : void\n {\n $this\n ->logger\n ->info(\n 'Ticket '\n . $this->currentId\n . ': '\n . $this->parts\n . '/3 parts built'\n );\n }", "title": "" }, { "docid": "90b35d6c70454bb495f9ba638a90d64f", "score": "0.4727793", "text": "private function verboseOutput()\n {\n $log = null;\n $this->log(\"### Summary of verbose log\");\n $this->log(\"As JSON: \\n\" . $this->json());\n $this->log(\"Memory peak: \" . round(memory_get_peak_usage() /1024/1024) . \"M\");\n $this->log(\"Memory limit: \" . ini_get('memory_limit'));\n\n $included = get_included_files();\n $this->log(\"Included files: \" . count($included));\n\n foreach ($this->log as $val) {\n if (is_array($val)) {\n foreach ($val as $val1) {\n $log .= htmlentities($val1) . '<br/>';\n }\n } else {\n $log .= htmlentities($val) . '<br/>';\n }\n }\n\n if (!is_null($this->verboseFileName)) {\n file_put_contents(\n $this->verboseFileName,\n str_replace(\"<br/>\", \"\\n\", $log)\n );\n } else {\n echo <<<EOD\n<h1>CImage Verbose Output</h1>\n<pre>{$log}</pre>\nEOD;\n }\n }", "title": "" }, { "docid": "b21d8da421e3f591046f9fb0c7c2dbeb", "score": "0.4726952", "text": "private function _visit_log()\n {\t\n $this->db->query('INSERT INTO shop_visitors_log SET\n create_ts = NOW(),\n shop_id = ' . $this->data['shop']->id . ',\n ip = ' . ip2long($this->input->server('REMOTE_ADDR')) . ',\n hits = 1\n ON DUPLICATE KEY UPDATE hits = hits+1');\n }", "title": "" }, { "docid": "6e5dfc501ab7c15c34f00429041b42b2", "score": "0.47266477", "text": "public function stats()\n {\n return $this->sendRequest('stats');\n }", "title": "" }, { "docid": "b216982443ac3f006b0e688ebc6fee32", "score": "0.47257078", "text": "public function conn_info() {\n\t\tprintf(\"<strong>Host info:</strong> %s<br>\", $this->conn->host_info);\n printf(\"<strong>Protocol version:</strong> %d<br>\", $this->conn->protocol_version);\n printf(\"<strong>Server version:</strong> %s<br>\", $this->conn->server_info);\n\t}", "title": "" }, { "docid": "89716f80a438c1258ed74fb379de44d0", "score": "0.47220817", "text": "public function write_log_header($logging_function) {\n\t\t\n\t\tglobal $wpdb;\n\n\t\t$updraft_dir = $this->backups_dir_location();\n\n\t\tcall_user_func($logging_function, 'Opened log file at time: '.date('r').' on '.network_site_url());\n\t\t\n\t\t$wp_version = $this->get_wordpress_version();\n\t\t$mysql_version = $wpdb->get_var('SELECT VERSION()');\n\t\tif ('' == $mysql_version) $mysql_version = $wpdb->db_version();\n\t\t$safe_mode = $this->detect_safe_mode();\n\n\t\t$memory_limit = ini_get('memory_limit');\n\t\t$memory_usage = round(@memory_get_usage(false)/1048576, 1);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\t\t$memory_usage2 = round(@memory_get_usage(true)/1048576, 1);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\n\t\t// Attempt to raise limit to avoid false positives\n\t\tif (function_exists('set_time_limit')) @set_time_limit(UPDRAFTPLUS_SET_TIME_LIMIT);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\t\t$max_execution_time = (int) @ini_get(\"max_execution_time\");// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\n\t\t$logline = \"UpdraftPlus WordPress backup plugin (https://updraftplus.com): \".$this->version.\" WP: \".$wp_version.\" PHP: \".phpversion().\" (\".PHP_SAPI.\", \".(function_exists('php_uname') ? @php_uname() : PHP_OS).\") MySQL: $mysql_version WPLANG: \".get_locale().\" Server: \".$_SERVER[\"SERVER_SOFTWARE\"].\" safe_mode: $safe_mode max_execution_time: $max_execution_time memory_limit: $memory_limit (used: ${memory_usage}M | ${memory_usage2}M) multisite: \".(is_multisite() ? (is_subdomain_install() ? 'Y (sub-domain)' : 'Y (sub-folder)') : 'N').\" openssl: \".(defined('OPENSSL_VERSION_TEXT') ? OPENSSL_VERSION_TEXT : 'N').\" mcrypt: \".(function_exists('mcrypt_encrypt') ? 'Y' : 'N').\" LANG: \".getenv('LANG').\" ZipArchive::addFile: \";// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\n\t\t// method_exists causes some faulty PHP installations to segfault, leading to support requests\n\t\tif (version_compare(phpversion(), '5.2.0', '>=') && extension_loaded('zip')) {\n\t\t\t$logline .= 'Y';\n\t\t} else {\n\t\t\t$logline .= (class_exists('ZipArchive') && method_exists('ZipArchive', 'addFile')) ? \"Y\" : \"N\";\n\t\t}\n\n\t\tif (0 === $this->current_resumption) {\n\t\t\t$memlim = $this->memory_check_current();\n\t\t\tif ($memlim<65 && $memlim>0) {\n\t\t\t\t$this->log(sprintf(__('The amount of memory (RAM) allowed for PHP is very low (%s Mb) - you should increase it to avoid failures due to insufficient memory (consult your web hosting company for more help)', 'updraftplus'), round($memlim, 1)), 'warning', 'lowram');\n\t\t\t}\n\t\t\tif ($max_execution_time>0 && $max_execution_time<20) {\n\t\t\t\tcall_user_func($logging_function, sprintf(__('The amount of time allowed for WordPress plugins to run is very low (%s seconds) - you should increase it to avoid backup failures due to time-outs (consult your web hosting company for more help - it is the max_execution_time PHP setting; the recommended value is %s seconds or more)', 'updraftplus'), $max_execution_time, 90), 'warning', 'lowmaxexecutiontime');\n\t\t\t}\n\n\t\t}\n\n\t\tcall_user_func($logging_function, $logline);\n\n\t\t$hosting_bytes_free = $this->get_hosting_disk_quota_free();\n\t\tif (is_array($hosting_bytes_free)) {\n\t\t\t$perc = round(100*$hosting_bytes_free[1]/(max($hosting_bytes_free[2], 1)), 1);\n\t\t\t$quota_free = ' / '.sprintf('Free disk space in account: %s (%s used)', round($hosting_bytes_free[3]/1048576, 1).\" MB\", \"$perc %\");\n\t\t\tif ($hosting_bytes_free[3] < 1048576*50) {\n\t\t\t\t$quota_free_mb = round($hosting_bytes_free[3]/1048576, 1);\n\t\t\t\tcall_user_func($logging_function, sprintf(__('Your free space in your hosting account is very low - only %s Mb remain', 'updraftplus'), $quota_free_mb), 'warning', 'lowaccountspace'.$quota_free_mb);\n\t\t\t}\n\t\t} else {\n\t\t\t$quota_free = '';\n\t\t}\n\n\t\t$disk_free_space = function_exists('disk_free_space') ? @disk_free_space($updraft_dir) : false;// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\t\t// == rather than === here is deliberate; support experience shows that a result of (int)0 is not reliable. i.e. 0 can be returned when the real result should be false.\n\t\tif (false == $disk_free_space) {\n\t\t\tcall_user_func($logging_function, \"Free space on disk containing Updraft's temporary directory: Unknown\".$quota_free);\n\t\t} else {\n\t\t\tcall_user_func($logging_function, \"Free space on disk containing Updraft's temporary directory: \".round($disk_free_space/1048576, 1).\" MB\".$quota_free);\n\t\t\t$disk_free_mb = round($disk_free_space/1048576, 1);\n\t\t\tif ($disk_free_space < 50*1048576) call_user_func($logging_function, sprintf(__('Your free disk space is very low - only %s Mb remain', 'updraftplus'), round($disk_free_space/1048576, 1)), 'warning', 'lowdiskspace'.$disk_free_mb);\n\t\t}\n\n\t}", "title": "" }, { "docid": "b8b0583ca284126bc8ba7fd7028c6212", "score": "0.471893", "text": "public function report(): void\n {\n Log::debug($this->logMessage);\n\n }", "title": "" } ]
352027fe2873f64cb20a31fd7be03800
Get the correct xvalue for the text string to start writing.
[ { "docid": "887ca5ef7a8a0c41ee552b047d393a66", "score": "0.0", "text": "protected function _fixX($x) {}", "title": "" } ]
[ { "docid": "b89a8dae29356587693650fb76189f7a", "score": "0.5290755", "text": "public function getAtstring()\n {\n $value = $this->get(self::ATSTRING);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "9cd534847cfce8e729c84e0ab09d28dc", "score": "0.5264348", "text": "function getValue() { return $this->readText(); }", "title": "" }, { "docid": "a6d910d85ae01921e9587ca48b0020f2", "score": "0.52394015", "text": "function getValue() { return $this->readText(); }", "title": "" }, { "docid": "220bae25eab19022a143c40bda8e73cc", "score": "0.5071636", "text": "function getPosition() { return $this->readText(); }", "title": "" }, { "docid": "896209fe50e6feb78bac535bda4ed981", "score": "0.50532454", "text": "function getPosition() { return $this->readText(); }", "title": "" }, { "docid": "7ec7f68944e7e0aeef3cf5ca31e779c9", "score": "0.50072014", "text": "public function textInputVal()\n {\n $prop = $this->textProperty();\n $val = $prop->inputVal($this->textPropertyVal(), [\n 'lang' => $this->lang(),\n ]);\n\n if ($val === null) {\n return '';\n }\n\n if (!is_scalar($val)) {\n throw new UnexpectedValueException(sprintf(\n 'Property Input Value must be a string, received %s',\n (is_object($val) ? get_class($val) : gettype($val))\n ));\n }\n\n return $val;\n }", "title": "" }, { "docid": "c40a5b8bc0a2df6f02e0ba37fcefb202", "score": "0.4997269", "text": "public function getStringValue()\n {\n if ($this->defaultValue === $this->getValue()) {\n return '';\n }\n\n return $this->value . 'W';\n }", "title": "" }, { "docid": "1c2532bb4efbd35b2c6d4507dd5b8da9", "score": "0.4935584", "text": "public function getPosition()\n {\n $value = $this->get(self::POSITION);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "8c37a4506be1350343fe147e9ede5401", "score": "0.48700294", "text": "protected function determineValue()\n {\n $this->value = trim(mb_substr($this->source, 1));\n }", "title": "" }, { "docid": "4aa65f784e9de143600cc4392f9a4046", "score": "0.48473138", "text": "protected function value()\n {\n $this->value = $this->lexeme;\n }", "title": "" }, { "docid": "1fd3425ed94f502d6f2ddb1f14a6aee2", "score": "0.48383862", "text": "public function textPropertyVal()\n {\n return $this->textPropertyVal;\n }", "title": "" }, { "docid": "ebc5ceadcd7e92a2dddd2e14c10c92bc", "score": "0.4835158", "text": "public function getValue() : string {\n\t\treturn $this->token;\n\t}", "title": "" }, { "docid": "9b5f3497857e0aba83a8705a60240883", "score": "0.47827873", "text": "public function getValue(): string\n {\n $value = '';\n \n if ($this->currentNode->childNodes !== NULL){\n foreach ($this->currentNode->childNodes as $node) {\n $value .= $this->doc->saveXML($node);\n }\n } else {\n $value = $this->currentNode->nodeValue;\n }\n \n return $value;\n }", "title": "" }, { "docid": "d15d44a298651668af7d86bbe65a2ec9", "score": "0.4696225", "text": "public function _x($text, $context) {\n\t\treturn _x($text, $context, $this); \n\t}", "title": "" }, { "docid": "3baf831c70a56c97e87650ccf10cdeec", "score": "0.4623062", "text": "public function getLiteralValue();", "title": "" }, { "docid": "ee386266c2e4e2f8d13fb5d6bc6b08a5", "score": "0.46018103", "text": "protected function _setTextString($key, $value, $encoding) {}", "title": "" }, { "docid": "e83ece002906a550ccab421a93a45950", "score": "0.45749295", "text": "protected function textLine($val) {\r\n\t\treturn $val.$this->cfg->crlf;\r\n\t}", "title": "" }, { "docid": "72a688fd13aaa83f5cac054c4ec6c183", "score": "0.45691848", "text": "protected function getXpathString() {\n return 'xpathparser:' . $this->getCounter();\n }", "title": "" }, { "docid": "98b69e4c27be266dc924069961613f0a", "score": "0.4564529", "text": "public function getNewValue(): ?string;", "title": "" }, { "docid": "e528babbedddc495e2f81442838cd293", "score": "0.4561865", "text": "protected function expectedValue(): string\n {\n return 'foo';\n }", "title": "" }, { "docid": "1d2ed8568d64fad2006683941735cb04", "score": "0.4550179", "text": "public function getValue(): string\n {\n return gmp_strval($this->value);\n }", "title": "" }, { "docid": "b51fb1e082dc31849809f5b87f937be4", "score": "0.45450485", "text": "public function getSubscriptXOffset() {}", "title": "" }, { "docid": "76a81165a0c1bea72502f10491571126", "score": "0.453855", "text": "public function string()\n {\n return $this->token;\n }", "title": "" }, { "docid": "3f29f700f188c6510da988a15a8160b5", "score": "0.45363572", "text": "public function string()\n {\n return (string)$this->value;\n }", "title": "" }, { "docid": "5c5251f7e95b3fe2688d6d779bf7fb4e", "score": "0.4535383", "text": "public function getValue()\n {\n return $this->str_value;\n }", "title": "" }, { "docid": "109b1c3781b0528e8f2419f7f6256bb5", "score": "0.45321697", "text": "public function textPropertyIdent()\n {\n return $this->textProperty()->ident();\n }", "title": "" }, { "docid": "3ed9951e8ac65618d6dafddba9509650", "score": "0.45283425", "text": "public function getStringOffset() {}", "title": "" }, { "docid": "fa30f34c59c282880d8390511740dd05", "score": "0.4521612", "text": "public function TextLine($value) {\n\t return $value . $this->LE;\n\t}", "title": "" }, { "docid": "be894f70aced5743cd17550a33688bac", "score": "0.4512846", "text": "public function getStringValue()\n {\n return $this->string_value;\n }", "title": "" }, { "docid": "9f025e3929bcae84c69977d0cbdd8b61", "score": "0.450944", "text": "public function getValue() {\n return $this->node->hasAttribute('value') ? iconv('utf-8', xp::ENCODING, $this->node->getAttribute('value')) : NULL;\n }", "title": "" }, { "docid": "59cb0c9eab6e1ac6d0d935a2139b698a", "score": "0.45080364", "text": "public function current(): string\n {\n // Clamp the position to 0 so we don't go 'behind'' the first character\n $position = max(0, $this->position - 1);\n\n return substr($this->string, $position, 1);\n }", "title": "" }, { "docid": "b2f97a90e9d348fb476330ad05bac692", "score": "0.4500523", "text": "function getPosition() {\n return sprintf(\"%010d\", $this->_position);\n }", "title": "" }, { "docid": "2a97b8964bb6ec86b2067a5ae3e2bad1", "score": "0.44934657", "text": "public function getValue(): string\n {\n return $this->fusionValue('value') ?? '';\n }", "title": "" }, { "docid": "4674014e71f8cacb9f48e083d4a16ce4", "score": "0.44737872", "text": "function mSTR(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$STR;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:226:3: ( 'str' ) \n // Tokenizer11.g:227:3: 'str' \n {\n $this->matchString(\"str\"); \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": "f21e8866160e6bc605a819dd8ac75151", "score": "0.44679192", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.44679192", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.44679192", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.44679192", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.44679192", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "f21e8866160e6bc605a819dd8ac75151", "score": "0.44679192", "text": "public function getValue(): string\n {\n return $this->value;\n }", "title": "" }, { "docid": "6f43059a2abc771411d4fdd568e30962", "score": "0.44673532", "text": "private function _getTextPosX($posX)\n {\n $x = 0;\n switch ($this->_align) {\n case Core_Pdf::RIGHT:\n $x = $posX + $this->_width - $this->_text['width'] -\n $this->_padding[Core_Pdf::RIGHT] - $this->_getBorderLineWidth(Core_Pdf::RIGHT) / 2;\n break;\n case Core_Pdf::CENTER:\n $x = $posX + $this->_width / 2 - $this->_text['width'] / 2;\n break;\n default: //LEFT\n $x = $posX + $this->_padding[Core_Pdf::LEFT] + $this->_getBorderLineWidth(Core_Pdf::LEFT) / 2;\n break;\n }\n return $x;\n }", "title": "" }, { "docid": "81ab506c9a357369f2c999fbae087ab4", "score": "0.44589183", "text": "public function GetPosition()\n\t{\n\t\tif($this->position['horizontal'] != '' && $this->position['verticle'] != '')\n\t\t\treturn $this->position['horizontal'].$this->position['verticle'];\n\t\telse\n\t\t\treturn 'Invalid Position';\n\t}", "title": "" }, { "docid": "151703d76bdefbf0e6f84f2e8d81347d", "score": "0.44569513", "text": "public function textLine($value)\n {\n return $value . $this->LE;\n }", "title": "" }, { "docid": "eb70fae1d5c79404c485fbdac43ba818", "score": "0.4446152", "text": "function _x($text, $context, $domain = 'default')\n {\n }", "title": "" }, { "docid": "04fde8018d0d9b49e41951333472ae37", "score": "0.44453707", "text": "public function value()\n\t{\n\t\treturn (string) $this->value;\n\t}", "title": "" }, { "docid": "5478a357426d8fc5fe0bd6998d90418d", "score": "0.44415912", "text": "private function attributeValueSingleQuotedState() {\n $this->char++;\n $char = $this->character($this->char);\n\n if($char === '\\'') {\n /* U+0022 QUOTATION MARK (')\n Switch to the before attribute name state. */\n $this->state = 'beforeAttributeName';\n\n } elseif($char === '&') {\n /* U+0026 AMPERSAND (&)\n Switch to the entity in attribute value state. */\n $this->entityInAttributeValueState('single');\n\n } elseif($this->char === $this->EOF) {\n /* EOF\n Parse error. Emit the current tag token. Reconsume the character\n in the data state. */\n $this->emitToken($this->token);\n\n $this->char--;\n $this->state = 'data';\n\n } else {\n /* Anything else\n Append the current input character to the current attribute's value.\n Stay in the attribute value (single-quoted) state. */\n $last = count($this->token['attr']) - 1;\n $this->token['attr'][$last]['value'] .= $char;\n\n $this->state = 'attributeValueSingleQuoted';\n }\n }", "title": "" }, { "docid": "775879a1952ba133dbe95ec235ffd26f", "score": "0.44354278", "text": "protected function pushToken($type, $value = '')\n {\n if (Token::TEXT_TYPE === $type && '' === $value) {\n return;\n }\n\n $cursor = $this->cursor;\n if ($type === Token::BLOCK_START_TYPE || $type === Token::VAR_START_TYPE) {\n $cursor -= 2;\n }\n\n if ($this->lastToken !== null) {\n $this->lastToken->setEndCursor($cursor);\n }\n\n $token = new ExtendedToken($type, $value, $this->lineno);\n $token->setStartCursor($cursor);\n if ($type === Token::EOF_TYPE) {\n $token->setEndCursor($cursor);\n }\n\n $this->lastToken = $token;\n\n $this->tokens[] = $token;\n }", "title": "" }, { "docid": "06211655069330e3055025350832e8d2", "score": "0.44279394", "text": "private function attributeValueSingleQuotedState()\n {\n $this->char++;\n $char = $this->character($this->char);\n\n if ($char === '\\'') {\n /* U+0022 QUOTATION MARK (')\n Switch to the before attribute name state. */\n $this->state = 'beforeAttributeName';\n\n } elseif ($char === '&') {\n /* U+0026 AMPERSAND (&)\n Switch to the entity in attribute value state. */\n $this->entityInAttributeValueState('single');\n\n } elseif ($this->char === $this->EOF) {\n /* EOF\n Parse error. Emit the current tag token. Reconsume the character\n in the data state. */\n $this->emitToken($this->token);\n\n $this->char--;\n $this->state = 'data';\n\n } else {\n /* Anything else\n Append the current input character to the current attribute's value.\n Stay in the attribute value (single-quoted) state. */\n $last = count($this->token['attr']) - 1;\n $this->token['attr'][$last]['value'] .= $char;\n\n $this->state = 'attributeValueSingleQuoted';\n }\n }", "title": "" }, { "docid": "30ba04c050e78f52de64c7f346b94a69", "score": "0.4426521", "text": "public function getValue()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'value'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'value'];\n\t\t}\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "902b5e62c9c76f3eae6d721b9716e3da", "score": "0.4409936", "text": "function DENON_InputSource($id, $value) // Input Source\n{\n CSCK_SendText($id, \"SI\".$value.chr(13));\n}", "title": "" }, { "docid": "e36a972e6df6d4314aa9a3f444e1cd7f", "score": "0.4408508", "text": "private function Value()\n\t{\n\t\t$peek = $this->lexer->glimpse();\n\n\t\tif ( DocLexer::T_EQUALS === $peek['type'] )\n\t\t\treturn $this->FieldAssignment();\n\n\t\treturn $this->PlainValue();\n\t}", "title": "" }, { "docid": "c386f32ac4168f1299904149d7d9c6f8", "score": "0.43720168", "text": "public function text()\n\t{\n\t\treturn (string) $this;\n\t}", "title": "" }, { "docid": "fa04aa62f39f6b9d2b712a432a1d8828", "score": "0.43716562", "text": "public function getHelpText(): ?string {\n $val = $this->getBackingStore()->get('helpText');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'helpText'\");\n }", "title": "" }, { "docid": "25c3f6756cd0ca57ea77ccf2b8f2ef0c", "score": "0.43693113", "text": "public function getArg(){\n return (string)$this->arg;\n }", "title": "" }, { "docid": "32affa8d915bb59fa543cc3cbf88a423", "score": "0.43634954", "text": "public static function writePdfString(\\SetaPDF_Core_WriteInterface $writer, $value, $isRawValue = false) {}", "title": "" }, { "docid": "da7121e302f344fdd0382a94c40b6ba8", "score": "0.43621546", "text": "public function x($value) {\n return $this->setProperty('x', $value);\n }", "title": "" }, { "docid": "2d67f799b0e85fcbf3765b09e36dfb69", "score": "0.436017", "text": "public function value(): string\n {\n return $this->get('value');\n }", "title": "" }, { "docid": "936cb5fb924041929c44ad927a769e1a", "score": "0.43536025", "text": "public function testSetTextFoo()\n {\n $document = $this->createDomDocument();\n $element = $document->createElementNS(Atom::NS, 'content');\n $document->documentElement->appendChild($element);\n $content = new Content($this->createFakeNode(), $element);\n $content->setContent('Less: <', 'text/foo');\n static::assertEquals(\n '<content type=\"text/foo\">Less: &lt;</content>',\n $document->saveXML($element)\n );\n }", "title": "" }, { "docid": "67f48f82b6cb7169c4edb32c91bde70c", "score": "0.43505266", "text": "public function write($string, $start = 0) {}", "title": "" }, { "docid": "0cac3c226d6acdccc3a09ad14bc1497d", "score": "0.4338784", "text": "function addRawInputValue( $idx, $value );", "title": "" }, { "docid": "69e2e696728b1959ad304a41ef25c044", "score": "0.43386003", "text": "public function current() : string\n {\n return chr($this->position);\n }", "title": "" }, { "docid": "524907dc4b09e65a5730229217d0515b", "score": "0.43379447", "text": "public function getText() {\n\t\t$text = $this->get('text', '');\n\t\treturn empty($text) ? $this->get('value', '') : $text;\n\t}", "title": "" }, { "docid": "3f54cb1bf630f4b7844c1094ed44cf95", "score": "0.43357247", "text": "protected function get() {\n $c = $this->lookAhead;\n $this->lookAhead = null;\n\n if ($c === null) {\n if ($this->inputIndex < $this->inputLength) {\n $c = substr($this->input, $this->inputIndex, 1);\n $this->inputIndex += 1;\n } else {\n $c = null;\n }\n }\n\n if ($c === \"\\r\") {\n return \"\\n\";\n }\n\n if ($c === null || $c === \"\\n\" || ord($c) >= self::ORD_SPACE) {\n return $c;\n }\n\n return ' ';\n }", "title": "" }, { "docid": "6b9dabcd0d565f1f1a38ed46f6432cfe", "score": "0.4326321", "text": "public function getTxtVal()\n {\n $rows = $this->getTreeRows();\n \n $tree = $this->generatePageTree($rows);\n \n return $this->tree_full_path;\n }", "title": "" }, { "docid": "20c7d53d8260525349d78b69af672dd0", "score": "0.43256006", "text": "protected function coordinate()\n {\n $this->match(($this->lexer->isNextToken(Lexer::T_FLOAT) ? Lexer::T_FLOAT : Lexer::T_INTEGER));\n\n return $this->lexer->value();\n }", "title": "" }, { "docid": "34b4f4c62c4574f3930879ee57f5581b", "score": "0.43245345", "text": "function get_string() {\n\t\t$str = $this->_parse();\n return $str;\n }", "title": "" }, { "docid": "73d5ca76b92990afa86a4b6d331d8dd8", "score": "0.43170178", "text": "public function getWatchword(){\n\t\tforeach ($this->csv_parse as $line) {\n\t\t\t$dateText=\t $line[0];\n\t\t\t$watchwReference=$line[3];\n\t\t\t$watchwVerse=$line[4];\n\t\t\t$dateTextwW= preg_replace('/\\0/','',$dateText);\n\n\t\t\tif(strcmp(trim($dateTextwW),trim($this->date))==0){\n\t\t\t\t$encodedVerse=utf8_encode($watchwVerse);\n\t\t\t\t$encodedReference=utf8_encode($watchwReference);\n\t\t\t\t$this->watchword=$encodedReference . \" - \" . $encodedVerse;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn $this->watchword;\n\t}", "title": "" }, { "docid": "28c0d6b7df0e6ff568dcfe8feb254dbf", "score": "0.43017203", "text": "abstract public function write( $value );", "title": "" }, { "docid": "37f2afe366e21739d0056a3970a9235d", "score": "0.42986003", "text": "public function testSetText()\n {\n $document = $this->createDomDocument();\n $element = $document->createElementNS(Atom::NS, 'content');\n $document->documentElement->appendChild($element);\n $content = new Content($this->createFakeNode(), $element);\n $content->setContent('Less: <', 'text');\n static::assertEquals(\n '<content type=\"text\">Less: &lt;</content>',\n $document->saveXML($element)\n );\n }", "title": "" }, { "docid": "384119f029221957fae4de75ed3d5211", "score": "0.4298473", "text": "public function value(): string;", "title": "" }, { "docid": "910d5add1b15035c75113f04da723ae7", "score": "0.42943117", "text": "function setAt ( $index, $value )\n\t{\n\t\tif ( !is_string( $value ) )\n\t\t{\n\t\t\treturn $this;\n\t\t}\n\n\t\t$this->_tokens[$index] = $value ;\n\t\t\n\t\t// Clear empty tokens\n\t\tarray_clean( $this->_tokens ) ;\n\n\t\t$this->_raw = implode('/',$this->_tokens) ;\n\t\t\n\t\t$this->_count = count ( $this->_tokens ) ;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "0f9973fd7c2a4ac867107149f4eeb472", "score": "0.42885697", "text": "public function getValueIdentifier(): string;", "title": "" }, { "docid": "282860b5c2f5e471fb6c9dd04eb420d4", "score": "0.42866638", "text": "public function testSetBarcodeTextPositionDefault()\n {\n $this -> printer -> setBarcodeTextPosition();\n $this -> checkOutput(\"\\x1b@\\x1dH\\x00\");\n }", "title": "" }, { "docid": "5a280c019e49b66a80ad60ffd18d3d83", "score": "0.42835087", "text": "private function _readValue($token) {}", "title": "" }, { "docid": "e7bd236e5ab1cf0b442635736b46efee", "score": "0.42777035", "text": "public function textProperty()\n {\n return $this->textProperty;\n }", "title": "" }, { "docid": "d6f245651b78154047b74f026a1cc9cd", "score": "0.42705524", "text": "public function getEmptyValue()\n {\n return new TextLineValue();\n }", "title": "" }, { "docid": "f32dd5a23237b346eb4cd2b4955815d2", "score": "0.42691392", "text": "public function getSubjectTitle(): ?string {\n $val = $this->getBackingStore()->get('subjectTitle');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'subjectTitle'\");\n }", "title": "" }, { "docid": "a3c384b50b6c639a01833d49bb0d5ea1", "score": "0.42684984", "text": "public function text($string, $x, $y, $font = 'monospace', $color = 'black', $direction = 0)\n {\n $height = 12;\n $style = 'font-family:' . $font . ';font-height:' . $height . 'px;fill:' . $this->getHexColor($color) . ';text-anchor:start;';\n $transform = 'rotate(' . $direction . ',' . $x . ',' . $y . ')';\n $this->_svg->addChild(new XML_SVG_Text(array('text' => $string,\n 'x' => (int)$x,\n 'y' => (int)$y + $height,\n 'transform' => $transform,\n 'style' => $style)));\n }", "title": "" }, { "docid": "be111bedc6905b3cad2aa13acb6a417b", "score": "0.42664665", "text": "private function _readValue($token, $expectedType = null) {}", "title": "" }, { "docid": "b1949023bc71a94288b88bdcf1e3953d", "score": "0.42662108", "text": "public function getValue(): string\n {\n return $this->transform($this->value);\n }", "title": "" }, { "docid": "a4fca14eb33a92fdfbf1c2f19a7f0880", "score": "0.42582095", "text": "function getValue() {\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n $ext=substr(${$this->name.\"_name\"},-3);\n if ($ext==\"\") $ext=${$this->name.\"_old\"};\n if ($ext==\"\") $ext=$this->value;\n return $ext;\n }", "title": "" }, { "docid": "983ebaa7cc0f7c2eec6f7b07e6a21d0d", "score": "0.42570618", "text": "private function getNextQuotedString($text, $startPos, $defaultValue) {\n $a = stripos($text, '\"', $startPos);\n if ($a !== FALSE) {\n $b = stripos($text, '\"', $a + 1);\n if ($b !== FALSE && $b > $a) {\n return substr($text, $a + 1, $b - $a - 1);\n }\n }\n return $defaultValue;\n }", "title": "" }, { "docid": "966a7eb4f57f313d002e0e4fa846fc5e", "score": "0.42434853", "text": "public function getSuperscriptXOffset() {}", "title": "" }, { "docid": "8638a0a42364fbc62117071f93d823da", "score": "0.42418662", "text": "private static function consumeValue($contents,&$pos) {\n\t\t/* Sample values this method consumes\n\t\t'foobar'\n\t\t-123\n\t\tnull\n\t\t[[1,2,3],['a'=3,'b'=>5]]\n\t\t*/\n\t\t$startPos=$pos;\n\t\t$char=$contents[$pos];\n\t\tif (strpos('\"\\'', $char)!==false) {\n\t\t\tDokser::consumeString($contents, $pos);\n\t\t} else if (strpos('+-0123456789\"\\'', $char)!==false) {\n\t\t\tDokser::consumeNumber($contents, $pos);\n\t\t} else if ($char=='[') {\n\t\t\tDokser::consumeArray($contents,$pos);\n\t\t} else {\n\t\t\t//if it's not string,number or array then it could be a $variable or a CONSTANT or null? etc\n\t\t\tpreg_match('/\\$?[^a-zA-Z0-9_\\x7f-\\xff]/',$contents,$match,0,$pos);\n\t\t\t$pos+=strlen($match[0]);\n\t\t}\n\t\tDokser::skipWhitespaceAndComments($contents, $pos);\n\t\t$char=$contents[$pos];\n\t\tif (preg_match('#&&|\\|\\|==|!=|<=|>=|[+-.&*/%|]#',$contents,$match,PREG_OFFSET_CAPTURE,$pos)&&$match[0][1]==0) {\n\t\t\tDokser::consumeValue($contents,$pos+=strlen($match[0][0]));\n\t\t}\n\t\treturn substr($contents, $startPos,$pos-$startPos);//returns the value-string\n\t}", "title": "" }, { "docid": "4f7c926a78a9c10ac279b6226e16560f", "score": "0.42415667", "text": "private function attributeValueUnquotedState() {\n $this->char++;\n $char = $this->character($this->char);\n\n if(preg_match('/^[\\t\\n\\x0b\\x0c ]$/', $char)) {\n /* U+0009 CHARACTER TABULATION\n U+000A LINE FEED (LF)\n U+000B LINE TABULATION\n U+000C FORM FEED (FF)\n U+0020 SPACE\n Switch to the before attribute name state. */\n $this->state = 'beforeAttributeName';\n\n } elseif($char === '&') {\n /* U+0026 AMPERSAND (&)\n Switch to the entity in attribute value state. */\n $this->entityInAttributeValueState();\n\n } elseif($char === '>') {\n /* U+003E GREATER-THAN SIGN (>)\n Emit the current tag token. Switch to the data state. */\n $this->emitToken($this->token);\n $this->state = 'data';\n\n } else {\n /* Anything else\n Append the current input character to the current attribute's value.\n Stay in the attribute value (unquoted) state. */\n $last = count($this->token['attr']) - 1;\n $this->token['attr'][$last]['value'] .= $char;\n\n $this->state = 'attributeValueUnquoted';\n }\n }", "title": "" }, { "docid": "b9cdd11dc35d7cdb80e7c85b65ee4b6a", "score": "0.42355263", "text": "public function getValueElementType()\n {\n return 'text';\n }", "title": "" }, { "docid": "f11283399a5ccab4265e5e521a7a06b3", "score": "0.4234411", "text": "public function getPosition(): string;", "title": "" }, { "docid": "7a6c5ec804a9b5c0128043f1557b6016", "score": "0.42321244", "text": "function le ($value) {\n return '<= '.$value;\n }", "title": "" }, { "docid": "ea7014f760eadbf0e617dafea7d2819d", "score": "0.4229427", "text": "public function getPositionXL()\n {\n // Scrutinizer thinks the following could return string. It is wrong.\n return array_search($this->position, self::POSITION_XLREF);\n }", "title": "" }, { "docid": "c63bd87b8e35db19d1063faf691687a5", "score": "0.4228813", "text": "function text()\n {\n ?>\n <input type=\"text\" <?php $this->name_tag(); ?> value=\"<?php echo esc_attr( $this->setting_value ); ?>\" class=\"inferno-setting\" <?php $this->id_tag(\"inferno-concrete-setting-\"); ?> />\n <?php \n if($this->setting['type'] == 'range') {\n $this->range();\n }\n }", "title": "" }, { "docid": "392e52e3f98721660aa5a88a66738939", "score": "0.4226795", "text": "public function getEditableText() {}", "title": "" }, { "docid": "f2e054329e7c716a47282f01adb9b718", "score": "0.42253673", "text": "public function getStream($i, $pageIndex, $fontReference, $x, $y)\n {\n $color = '0 g';\n if (null !== $this->fontColor) {\n if ($this->fontColor instanceof Color\\Rgb) {\n $color = $this->fontColor . \" rg\";\n } else if ($this->fontColor instanceof Color\\Cmyk) {\n $color = $this->fontColor . \" k\";\n } else if ($this->fontColor instanceof Color\\Gray) {\n $color = $this->fontColor . \" g\";\n }\n }\n\n if (null !== $fontReference) {\n $fontReference = substr($fontReference, 0, strpos($fontReference, ' '));\n $text = ' /DA(' . $fontReference . ' ' . $this->size . ' Tf ' . $color . ')';\n } else {\n $text = null;\n }\n\n $name = (null !== $this->name) ? ' /T(' . $this->name . ')/TU(' . $this->name . ')/TM(' . $this->name . ')' : '';\n $flags = (count($this->flagBits) > 0) ? \"\\n /Ff \" . $this->getFlags() . \"\\n\" : null;\n $value = (null !== $this->value) ? \"\\n /V \" . $this->value . \"\\n\" : null;\n $default = (null !== $this->defaultValue) ? \"\\n /DV \" . $this->defaultValue . \"\\n\" : null;\n\n // Return the stream\n return \"{$i} 0 obj\\n<<\\n /Type /Annot\\n /Subtype /Widget\\n /FT /Tx\\n /Rect [{$x} {$y} \" .\n ($this->width + $x) . \" \" . ($this->height + $y) . \"]{$value}{$default}\\n /P {$pageIndex} 0 R\\n{$text}\\n{$name}\\n{$flags}>>\\nendobj\\n\\n\";\n }", "title": "" }, { "docid": "18063dd6528bc6b78c89c49264a2236d", "score": "0.42208245", "text": "private function attributeValueUnquotedState()\n {\n $this->char++;\n $char = $this->character($this->char);\n\n if (preg_match('/^[\\t\\n\\x0b\\x0c ]$/', $char)) {\n /* U+0009 CHARACTER TABULATION\n U+000A LINE FEED (LF)\n U+000B LINE TABULATION\n U+000C FORM FEED (FF)\n U+0020 SPACE\n Switch to the before attribute name state. */\n $this->state = 'beforeAttributeName';\n\n } elseif ($char === '&') {\n /* U+0026 AMPERSAND (&)\n Switch to the entity in attribute value state. */\n $this->entityInAttributeValueState();\n\n } elseif ($char === '>') {\n /* U+003E GREATER-THAN SIGN (>)\n Emit the current tag token. Switch to the data state. */\n $this->emitToken($this->token);\n $this->state = 'data';\n\n } else {\n /* Anything else\n Append the current input character to the current attribute's value.\n Stay in the attribute value (unquoted) state. */\n $last = count($this->token['attr']) - 1;\n $this->token['attr'][$last]['value'] .= $char;\n\n $this->state = 'attributeValueUnquoted';\n }\n }", "title": "" }, { "docid": "cd78999f1211f303fa2dc0c56da018e1", "score": "0.42153436", "text": "public function getAsString(): string\n {\n return $this->text;\n }", "title": "" }, { "docid": "411cdbc176ae2a522385cef1cdd35b7d", "score": "0.42134002", "text": "protected function value_char()\n {\n }", "title": "" }, { "docid": "87ee8812b923785e23a1b2cb9e576800", "score": "0.4209093", "text": "function testText()\n {\n $l_st=new StaticText();\n $l_st->setText(new DynamicStaticValue(static::TEXT));\n $l_store=new MapData(null);\n $l_text=$l_st->getAttValue(\"text\", $l_store,\"string\",true);\n $this->assertEquals(static::TEXT,$l_text);\n }", "title": "" }, { "docid": "fb2aaada74777606eeb8816a3c213d30", "score": "0.42022967", "text": "public function getJustification(): ?string {\n $val = $this->getBackingStore()->get('justification');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'justification'\");\n }", "title": "" }, { "docid": "bc199acfcd2dda8ebd17d12ddcfabfb5", "score": "0.42013544", "text": "function getValue(&$autoText, $id=NULL){\n if ($id){\n $autoText->content = '00/xx/www/wwww';\n }\n }", "title": "" }, { "docid": "264d3122a04048bab00a2640d04e78a2", "score": "0.4201162", "text": "public function getCursorX()\n {\n return $this->moveToLocal_h($this->pdf->GetCursorX());\n }", "title": "" }, { "docid": "f57b13867460923a0f6465afd17996ff", "score": "0.41975406", "text": "public function prepareOutput(){ return $this->value; }", "title": "" }, { "docid": "68d711a350c7488c6f260f1cc3d8d8fa", "score": "0.41957396", "text": "function chekString($value)\r\n{\r\n\r\n $temp = '<code style=\"font_size: 10px\">strint </code>';\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:red '>\" . PHP_EOL;\r\n\r\n $temp .= \"'{$value}'\" . PHP_EOL;\r\n\r\n $temp .= \"</code>\";\r\n\r\n $temp .= '<code style=\"font_size: 10px\">' . PHP_EOL;\r\n\r\n $temp .= '(length=' . strlen($value) . ')' . PHP_EOL;\r\n\r\n $temp .= \"</code>\" . PHP_EOL;\r\n\r\n return $temp ;\r\n\r\n}", "title": "" } ]
4ddf95c5284a3b8a8720efe339e1c8a1
isMandatory returns true if the given field can not be null and has no default value
[ { "docid": "430f9ae4e393278d29cfc08f59b19f97", "score": "0.7142248", "text": "public function isMandatory($field)\n {\n if($this->isField($field))\n {\n $field_desc = $this->getFieldDesc($field);\n if($field_desc->isPrimary() && $this->hasAutoIncrement())\n return false;\n return $field_desc->Null == 'NO' && !$this->hasDefaultValue($field);\n }\n else\n throw new Exception($field.' is not a field of the table '.$this->_table);\n }", "title": "" } ]
[ { "docid": "e812917a4008e93c89f60cdb9e79157e", "score": "0.8198659", "text": "public function isMandatory($field, $name='');", "title": "" }, { "docid": "2ed5f87101aa9703af32dd7a63f27925", "score": "0.7495906", "text": "public function isMandatory()\n {\n return $this->mandatory === true;\n }", "title": "" }, { "docid": "83ba6835709a38be99705ef4515c9a32", "score": "0.7384781", "text": "private function checkMandatoryField() {\n\t $ok = TRUE;\n\t foreach ($this->mandatoryXMLFields as $fields) {\n\t\t if (!isset($this->$fields) || $this->$fields==\"\" || is_null($this->$fields)) {\n\t\t\t$ok = FALSE;\n\t\t\t$this->addLog(\"mandatory field $fields not found\");\n\t\t }\n\t }\n\t return $ok;\n }", "title": "" }, { "docid": "1eac456a3803f90cb3848c33b56a2d54", "score": "0.71434397", "text": "public function isMandatory(): bool\n {\n return $this->isMandatory;\n }", "title": "" }, { "docid": "082a61d664b504fe708d4c779c143b40", "score": "0.7058871", "text": "public function isMandatory(): bool\n {\n return $this->mandatory;\n }", "title": "" }, { "docid": "c5ec80ac690f47a2cad5df4050cc1065", "score": "0.7026503", "text": "public function isRequired(){\n return $this->getNotnull();\n }", "title": "" }, { "docid": "68059ab558ed24f661fc7d7553012671", "score": "0.6827872", "text": "public function setMandatory($mandatory);", "title": "" }, { "docid": "4dadf2e47c63abc53e27fc3f2ba79999", "score": "0.67473286", "text": "public function isRequired(): bool;", "title": "" }, { "docid": "4dadf2e47c63abc53e27fc3f2ba79999", "score": "0.67473286", "text": "public function isRequired(): bool;", "title": "" }, { "docid": "cf641d7a0f77c68f88371407d655cd16", "score": "0.66955006", "text": "function isRequired($fieldName)\n {\n $fieldDef=$this->__getField($fieldName)->getDefinition();\n return isset($fieldDef[\"REQUIRED\"])?$fieldDef[\"REQUIRED\"]:false;\n }", "title": "" }, { "docid": "d916f9cc50191ab222f6299d3e89e331", "score": "0.6691814", "text": "public function getIsRequired();", "title": "" }, { "docid": "9f0615bab0706bc39ddab279f273589c", "score": "0.65984404", "text": "public function hasMandatoryData();", "title": "" }, { "docid": "e7c7225fce51f09390bb533f8c88de91", "score": "0.6593729", "text": "function isEmptyAndOptional() {\n\t\tif ($this->getType() != FORM_VALIDATOR_OPTIONAL_VALUE) return false;\n\n\t\t$fieldValue = $this->getFieldValue();\n\t\tif (is_scalar($fieldValue)) {\n\t\t\treturn $fieldValue == '';\n\t\t} else {\n\t\t\treturn empty($fieldValue);\n\t\t}\n\t}", "title": "" }, { "docid": "5528ed8a9e2ebaf2cba27568e06a2f01", "score": "0.6561928", "text": "public function getRequired(): bool\n {\n return isset($this->options['null']) ?\n ! $this->options['null'] : // flip allow null flag into $required\n false;\n }", "title": "" }, { "docid": "a4e816909625f6511fec9f2c82f999ef", "score": "0.6527335", "text": "public function getMandatory()\r\n {\r\n return $this->mandatory;\r\n }", "title": "" }, { "docid": "fcdf0c155f49914d9663d71f7b3d784a", "score": "0.65257937", "text": "public function isRequiredField($value){\r\n return $value == 2;\r\n }", "title": "" }, { "docid": "88662bdb73432a8e506f1f4b2df5ec48", "score": "0.65201086", "text": "public function isRequiredUserField($field_name) {\n $bundle_fields = \\Drupal::getContainer()->get('entity_field.manager')->getFieldDefinitions('user', 'user');\n $field_definition = $bundle_fields[$field_name];\n $setting = $field_definition->isRequired();\n Assert::assertNotEmpty($setting, 'Field ' . $field_name . ' is not required.');\n }", "title": "" }, { "docid": "f40ce9dccee0868e1b16f0e2736a29a0", "score": "0.6501812", "text": "function isRequired()\n {\n return $this->required;\n }", "title": "" }, { "docid": "7c5561e23e63480d7624ac4e4f9646f8", "score": "0.64868236", "text": "public function checkMandatory($field)\n {\n if($this->isField($field))\n {\n $value = $this->$field;\n return !($this->isMandatory($field) && $this->isEmpty($value));\n }\n else\n throw new Exception($field.' is not a field of the table '.$this->_table);\n }", "title": "" }, { "docid": "173544753b7aa3e16febe7272da0eedc", "score": "0.640039", "text": "public function isRequired()\n {\n return $this->required;\n }", "title": "" }, { "docid": "173544753b7aa3e16febe7272da0eedc", "score": "0.640039", "text": "public function isRequired()\n {\n return $this->required;\n }", "title": "" }, { "docid": "173544753b7aa3e16febe7272da0eedc", "score": "0.640039", "text": "public function isRequired()\n {\n return $this->required;\n }", "title": "" }, { "docid": "1eaafc47d3d89c26c6d8132306de5667", "score": "0.639471", "text": "public function testDefaultRequiredValueWithBlankRequest()\n {\n $field = $this->getField('int_field');\n $field->setRequired(true);\n $field->setDefault(1);\n\n $_POST = [\n $field->name => '',\n ];\n\n $this->assertFalse($field->isValid());\n\n throw $field->getError();\n }", "title": "" }, { "docid": "ecce775fd89fa196cad97697e1129788", "score": "0.63679034", "text": "public function isRequired($fields){\n foreach($fields as $field){\n if($_POST[''.$field.''] == \"\"){\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "8351e0c346cf74bf345d758b696425cd", "score": "0.6349163", "text": "public function isRequired($field_array)\n {\n foreach ($field_array as $field) {\n if ($_POST[\"$field\"] == \"\") {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "d8a32d8b41f6a34691f465eaaa856819", "score": "0.6310201", "text": "public function isRequired()\r\n\t\t{\r\n\t\t\treturn(($this->options & self::OPT_REQUIRED) > 0);\r\n\t\t}", "title": "" }, { "docid": "6c8ce4db2a5b61decaa09a8d4b13fd6f", "score": "0.6293161", "text": "public function check_field() {\n\t\t\t\n\t\t\tif ( isset( $this->field->name ) && isset( $this->field->type ) && isset( $this->field->title ) ) return true;\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "32f73f3f6ce8a176d84ed9da3031db4b", "score": "0.6281731", "text": "public function setMandatory($mandatory)\r\n {\r\n $this->mandatory = $mandatory;\r\n }", "title": "" }, { "docid": "8feaa366eda023ac965bd0c58b2a2cac", "score": "0.62675244", "text": "public static function mayBeOptional()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "8feaa366eda023ac965bd0c58b2a2cac", "score": "0.62675244", "text": "public static function mayBeOptional()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "f9f6ec1afb9260f79049c6d10a7dbad8", "score": "0.6254811", "text": "public function checkMandatoryFields($field)\n {\n foreach ($field as $chkField) {\n if (empty(trim($chkField))) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "78e01f1290804dcc3a0e53ae526e2a8c", "score": "0.6250916", "text": "public function zohoMandatoryFields(): array;", "title": "" }, { "docid": "68bb1a6952aa72d407b9d37cfe476e09", "score": "0.62505937", "text": "public function isRequired(): bool {\n return $this->required;\n }", "title": "" }, { "docid": "22995307cd58737ac1a9486d0179fe4a", "score": "0.62475985", "text": "public function is_required( $field ) {\n\n\t\t$required = Forminator_Field::get_property( 'required', $field, false );\n\t\t$required = filter_var( $required, FILTER_VALIDATE_BOOLEAN );\n\n\t\treturn $required;\n\t}", "title": "" }, { "docid": "b3aea45ecfd26f1269ccfba49d760efc", "score": "0.6227301", "text": "public function setMandatory($mandatory)\n {\n $this->mandatory = $mandatory;\n }", "title": "" }, { "docid": "6eadbc4b1eaac388ac3a35b1ac0e485c", "score": "0.62191737", "text": "public function isRequired(): bool\n {\n return $this->required;\n }", "title": "" }, { "docid": "6eadbc4b1eaac388ac3a35b1ac0e485c", "score": "0.62191737", "text": "public function isRequired(): bool\n {\n return $this->required;\n }", "title": "" }, { "docid": "b81b5107f6817282bae5734683f9e07e", "score": "0.6218541", "text": "public function isRequired()\n {\n return $this->isRequired;\n }", "title": "" }, { "docid": "3728e66a72193334468fbb061af909b2", "score": "0.6213762", "text": "private function hasDefaultValue ($field)\n {\n $field_desc = $this->getFieldDesc($field);\n return $field_desc->hasDefaultValue();\n }", "title": "" }, { "docid": "4f0af80521c6d461d7a70eb44863ccf0", "score": "0.6199134", "text": "public static function isRequiredInputField(InputFieldInterface $field): bool\n {\n return self::isNonNullType($field->getType()) && ! $field->hasDefaultValue();\n }", "title": "" }, { "docid": "1c6cd35bb9f85e3bc1bd96585ebfd853", "score": "0.6188419", "text": "private function isMissing($field = ''){\r\n\t\t$return = FALSE;\r\n\t\t$field = trim($field);\r\n\t\tif(empty($field)){\r\n\t\t\t$return = TRUE;\r\n\t\t}\r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "953524bf9a0c0c2faed05da604f2ae6d", "score": "0.6185312", "text": "public function isnull($field){\n\t\treturn is_null($field);\n\t}", "title": "" }, { "docid": "90b8343160a53058cd1f5b7669d3cf6b", "score": "0.6178384", "text": "public function isRequired(): bool\n {\n return $this->isRequired;\n }", "title": "" }, { "docid": "8a3d14e0b84311956d1f2ed9a6111044", "score": "0.6172971", "text": "public function isRequired()\n {\n return ($this->getMetaValue('use', '') === 'required' || $this->getMetaValueFirstSet(array(\n 'minOccurs',\n 'minoccurs',\n 'MinOccurs',\n 'Minoccurs',\n ), false));\n }", "title": "" }, { "docid": "29a17c6199c82bcfeb1fb10612350571", "score": "0.6150338", "text": "public function getMandatoryFields() {\n\t\t$va_fields = $this->getFormFields(true);\n\t\t\n\t\t$va_many_to_one_relations = $this->_DATAMODEL->getManyToOneRelations($this->tableName());\n\t\t$va_mandatory_fields = array();\n\t\tforeach($va_fields as $vs_field => $va_info) {\n\t\t\tif (isset($va_info['IDENTITY']) && $va_info['IDENTITY']) { continue;}\t\n\t\t\t\n\t\t\tif ((isset($va_many_to_one_relations[$vs_field]) && $va_many_to_one_relations[$vs_field]) && (!isset($va_info['IS_NULL']) || !$va_info['IS_NULL'])) {\n\t\t\t\t$va_mandatory_fields[] = $vs_field;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (isset($va_info['BOUNDS_LENGTH']) && is_array($va_info['BOUNDS_LENGTH'])) {\n\t\t\t\tif ($va_info['BOUNDS_LENGTH'][0] > 0) {\n\t\t\t\t\t$va_mandatory_fields[] = $vs_field;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($va_info['BOUNDS_VALUE']) && is_array($va_info['BOUNDS_VALUE'])) {\n\t\t\t\tif ($va_info['BOUNDS_VALUE'][0] > 0) {\n\t\t\t\t\t$va_mandatory_fields[] = $vs_field;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $va_mandatory_fields;\n\t}", "title": "" }, { "docid": "6e53175c5612b38243e6937a6ac6d519", "score": "0.6147095", "text": "public function required($value) {\n\t\treturn !is_null($value);\n\t}", "title": "" }, { "docid": "e3df625a66aedf3a1a55c9f23172f2cf", "score": "0.61355823", "text": "public static function isRequired($field_array, $data){\n\t\tforeach($field_array as $field) {\n\t\t\tif ($data[''.$field.''] == '') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8e08cfee5ad38e5744da82e17a765724", "score": "0.60971713", "text": "public function setMandatory()\n {\n $this->mandatory = true;\n return $this;\n }", "title": "" }, { "docid": "2a36d1ce34e2cab21b88df1ebec4101a", "score": "0.6083356", "text": "public function validateNullable()\n {\n return true;\n }", "title": "" }, { "docid": "5bdc5e616a44348cc3ec3f4d9b3375bc", "score": "0.6056688", "text": "protected function validateMandatoryAttribs() {\n\t\t\t// Iterate over all fields\n\t \tforeach ( static::$mandatoryFields as $field ) {\n\t \t\t// If the field does not exist then exit with exception\n\t \t\tif ( !array_key_exists($field, $this->attributes) ) {\n\t \t\t\tthrow new \\SVGCreator\\SVGException(\"The field \" . $field . \" does not exist for \" . static::TYPE . \".\", 1);\n\t \t\t}\n\t \t}\n\t\t}", "title": "" }, { "docid": "5e9fb6eede88fb5de1b0d0962cb980f8", "score": "0.60495466", "text": "protected function isRequired(): bool\n {\n return $this->required;\n }", "title": "" }, { "docid": "94d78e18e2789aabcb60b8d0080a4bd3", "score": "0.6047616", "text": "public function isRequired()\n\t{\n\t\t$attributes = $this->pageType()->attributes();\n\n\t\treturn isset($attributes[$this->identifier]['required']) ? $attributes[$this->identifier]['required'] : false;\n\t}", "title": "" }, { "docid": "232d70e7ade1020cedb79a6d2d1dd4de", "score": "0.603633", "text": "public function isBlank()\n {\n return false;\n }", "title": "" }, { "docid": "1918dc9408abe8a9fc9fa74b1df9909e", "score": "0.603186", "text": "public function isOptional()\n {\n return $this->hasDefault();\n }", "title": "" }, { "docid": "a01d258462ccf1cedbac615ddc31418c", "score": "0.6027397", "text": "public function isRequired($attribute)\n {\n }", "title": "" }, { "docid": "383820cb04f86239507864b31adfcbcf", "score": "0.601833", "text": "function validate_not_empty($field_input, array &$field): bool\n{\n if (empty($field_input)) {\n $field['error'] = 'Laukelis negali būti tuščias !';\n\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "440b766a73b3b663e2b0acb42d4d4ccf", "score": "0.6014946", "text": "private function is_required(array $data, string $field): bool\n {\n if (!isset($data[$field])) return false;\n if (is_string($data[$field])) return trim($data[$field]) !== '';\n if (is_array($data[$field])) return count($data[$field]) > 0;\n return true;\n }", "title": "" }, { "docid": "fb621b408dbe2bde3d4492ae40687b76", "score": "0.6014786", "text": "public function testValidateNullFieldsFalse() {\n $resultFalse = $this->dataValidation->validateNullFields(\"field\");\n $this->assertFalse($resultFalse);\n }", "title": "" }, { "docid": "2dee60571dfaa69fa9f47009cd5088f8", "score": "0.6011348", "text": "public function isRequired() : Testable\n {\n $this->attributes['required'] = true;\n return $this->addTest('required', function($value) {\n return $this->checked();\n });\n }", "title": "" }, { "docid": "6635d25e297f21f3ebda587ebecef2aa", "score": "0.6001394", "text": "public function isNotNull($model, $attribute){ }", "title": "" }, { "docid": "0959562c6df7347dd30544fba5089b80", "score": "0.5989091", "text": "function field_is_null( $field ) {\n\tif ( in_array( strtolower( $field ), array_map( \"strtolower\", NULL_TYPES ) ) ) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "82bc97abdc7af72cbf286c3c1b784b55", "score": "0.59723437", "text": "function validate_required($value)\n{\n if (is_null($value)) {\n return false;\n } elseif (is_string($value) and trim($value) === '') {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "90c68d06dde8ffbbb385b780b9fc5494", "score": "0.5966953", "text": "public function getIsRequired()\n {\n return $this->isRequired;\n }", "title": "" }, { "docid": "5a011146456903ccecf7f5f15644997f", "score": "0.5962229", "text": "public function isOptional()\n {\n return true;\n }", "title": "" }, { "docid": "5a011146456903ccecf7f5f15644997f", "score": "0.5962229", "text": "public function isOptional()\n {\n return true;\n }", "title": "" }, { "docid": "8641f42c55faea4823735d9ab7372581", "score": "0.594514", "text": "private static function is_required(array $data, string $field): bool\n {\n if (!isset($data[$field])) {\n return false;\n }\n\n $errors = [];\n if (is_array($data[$field]) && !empty($data[$field])) {\n $errors = array_map(function ($item) {\n if (trim($item) !== '') {\n return true;\n }\n return false;\n }, $data[$field]);\n } elseif (!is_array($data[$field]) && !empty($data[$field])) {\n return true;\n } else if (is_string($data[$field]) && empty($data[$field])) {\n return false;\n }\n\n return in_array(false, $errors) ? false : true;\n }", "title": "" }, { "docid": "719dd1d6196c91a61e8079ef7f14a23b", "score": "0.5944698", "text": "function checkField($field) {\n\t\tif ((strlen(trim($field)) < 1) || (is_null($field))) return FALSE;\n\t\telse return TRUE;\n\t}", "title": "" }, { "docid": "6413b92d64f113b4b1831d3d19dec443", "score": "0.5943512", "text": "public function required()\n {\n if (null === $this->required) {\n return false;\n }\n\n return $this->required;\n }", "title": "" }, { "docid": "a7fe13f403c5a7ab008c3308f635a41a", "score": "0.59350795", "text": "function validate_optional_fields($string,$setting){\n\tif($setting==\"true\"){\n\t\tif(empty($string)){\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "e364687087f469cde3e17d5bffd1370d", "score": "0.59276813", "text": "public function isOptional()\n {\n return false;\n }", "title": "" }, { "docid": "e364687087f469cde3e17d5bffd1370d", "score": "0.59276813", "text": "public function isOptional()\n {\n return false;\n }", "title": "" }, { "docid": "e364687087f469cde3e17d5bffd1370d", "score": "0.59276813", "text": "public function isOptional()\n {\n return false;\n }", "title": "" }, { "docid": "6ce849b7fe9240f3f5f33e11eb6245fa", "score": "0.59001637", "text": "public function isRequired()\n {\n return self::REQUIRED === (self::REQUIRED & $this->mode);\n }", "title": "" }, { "docid": "a8d9db10f866b5f4927f0d4091006156", "score": "0.5878613", "text": "public function required(string $key,string $value)\n {\n if (!strlen($value) == 0) {\n return false;\n }\n return sprintf(\"%s field Required\",$key); \n }", "title": "" }, { "docid": "adf7fbacfbeaaee47578459103e6fe90", "score": "0.58611476", "text": "public function check_field() { return true; }", "title": "" }, { "docid": "adf7fbacfbeaaee47578459103e6fe90", "score": "0.58611476", "text": "public function check_field() { return true; }", "title": "" }, { "docid": "f41e2bd0ef8599faec473e4ef165d3b0", "score": "0.5851887", "text": "public function isDefinite()\n {\n $defFields = ['officeId', 'doctorId', 'date', 'time'];\n foreach ($defFields as $field) {\n if (null != $this->$field) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "76ba08509fa07e3d9871faf286b981d7", "score": "0.58462673", "text": "public function hasValidFields()\n {\n if(!isset($this->_data)) {\n return false;\n }\n $has_required = true;\n foreach($this->_fieldsRequired as $f) {\n $has_required = $has_required && array_key_exists($f, $this->_data) && !is_null($this->_data[$f]);\n }\n return $has_required;\n }", "title": "" }, { "docid": "804c522c825f165aaad4eedb0eeada9b", "score": "0.58436966", "text": "public function hasDefaultValue();", "title": "" }, { "docid": "627dceb06b17c1e8f10154dbb2712eed", "score": "0.58353734", "text": "private function isRequired($fieldType)\n {\n $this->loadExtraFields();\n\n return $this->extraFields->attribute_required[$fieldType];\n }", "title": "" }, { "docid": "8933920836ac38faace54cea2f8d564d", "score": "0.5819802", "text": "public function isOnlyValidate(): bool;", "title": "" }, { "docid": "0a480b85d7c386b61b773d07a0eed64e", "score": "0.5819335", "text": "public function isRequired() {\n return self::REQUIRED === (self::REQUIRED & $this->mode);\n }", "title": "" }, { "docid": "bf677df4342840f0b19adc2b3a403289", "score": "0.58104795", "text": "public function getIsRequiredAttribute()\n\t{\n\t\treturn $this->isRequired();\n\t}", "title": "" }, { "docid": "ab38a89681e03227ceacaa32411eab92", "score": "0.5809585", "text": "public function isNotNull()\r\n\t{\r\n\t\treturn $this->flags[\"isNotNull\"];\r\n\t}", "title": "" }, { "docid": "3819fd41f5efa620ea81f13de23a450f", "score": "0.580673", "text": "protected function isMandatoryValue($object, array $configuration, string $attribute): bool {\n\n $mandatory = $configuration[$attribute][\"mandatory\"];\n $excludeIf = ArrayHelper::get($configuration[$attribute], \"excludeIf\");\n\n if (true === $mandatory && null !== $excludeIf && false === $this->nullObjectValue($object, $configuration[$excludeIf][\"method\"])) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "26bf987dc06a2a9fbba589d1b49e7ce1", "score": "0.58057207", "text": "public function empty_field($a){\n\t\t if (in_array(null, $a)) {\n // There are null values.ret\n\t\t \treturn false;\n }else return true;\n\t\t\n }", "title": "" }, { "docid": "4cfacf5821c2d34d38190edc4f840cbd", "score": "0.58016586", "text": "function isFieldEmpty($field)\n{\n return (!isset($field) || trim($field) == \"\");\n}", "title": "" }, { "docid": "e9f2abb7bbf7c23fed78461ff276f7d1", "score": "0.57802284", "text": "public function allowsNull(): bool {}", "title": "" }, { "docid": "e9f2abb7bbf7c23fed78461ff276f7d1", "score": "0.57802284", "text": "public function allowsNull(): bool {}", "title": "" }, { "docid": "d892791037bfe7e544fcbd54f609ccc7", "score": "0.57778865", "text": "public function checkDefaultValues()\n {\n $input = new Input('test');\n $this->assertTrue($input->allowEmpty());\n $this->assertFalse($input->isRequired());\n }", "title": "" }, { "docid": "6894b0805272d66bce05d8701af76614", "score": "0.5772911", "text": "function _test_required_fields($required) {\n\t\t$valid = TRUE;\n\t\tforeach ( $_POST as $key => $value ) {\n\t\t\tif ( empty($value) && in_array($key, $required) ) {\n\t\t\t\t$this->tpt_missing_fields[] = $key;\n\t\t\t\t$valid = FALSE;\n\t\t\t}\n\t\t}\n\t\treturn $valid;\n\t}", "title": "" }, { "docid": "a9fd99fbf9981ccccfa3d08170f6e884", "score": "0.57665455", "text": "function checkBlank( $fieldName )\n{\n\t$fieldData = retrieveData( $fieldName );\n\t\n\tswitch( $fieldData )\n\t{\n\t\tcase \"\":\n\t\t\taddMessage( $fieldName, \" was blank.\" );\n\t\t\treturn true;\n\t\t\tbreak;\n\t\tcase NULL:\n\t\t\taddMessage( $fieldName, \" was NULL.\" );\n\t\t\treturn true;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "f927e0f9ab814530576cb16d63837ced", "score": "0.57633716", "text": "function hasRequiredFields()\n\t{\n\t\tforeach($this->validators as $v)\n\t\t{\n\t\t\tif (get_class($v) == RequiredValidator) return true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6d8c2631d2b2d05cf9ca388f8a9d465e", "score": "0.57575583", "text": "private function ruleRequired($field, $value, $label)\n {\n\tif( empty($value) ) {\n\t \n\t $this->setErrorMessage( $field, $this->ruleErrorMessage('required', $label) );\n\t \n\t return false;\n\t}\n\t\n\treturn true;\n }", "title": "" }, { "docid": "5eefbce0b2e7ce359defea178d518125", "score": "0.5756359", "text": "public static function requiredValue($value)\n {\n return empty($value) ? false : $value;\n }", "title": "" }, { "docid": "860edc07d1357c57c42363b0539c381b", "score": "0.57482755", "text": "public function isValid() {\r\n\t\treturn !$this->required || !$this->isEmpty();\r\n\t}", "title": "" }, { "docid": "90767cd525c3f13abc5c31912d57d4a5", "score": "0.57419384", "text": "function field_allow_null( $ret, $num )\n {\n //$num = record number\n $meta = mysqli_fetch_field ($ret, $num);\n if (!$meta) {\n //Information about field not available.\n return -1;\n }\n if ($meta->not_null == 1) return false;\n else return true;\n }", "title": "" }, { "docid": "964ff1d676cb65ec6afe5e51e5cb4400", "score": "0.5734883", "text": "public function isRequired($attribute)\n {\n return !empty($this->$attribute);\n }", "title": "" }, { "docid": "8fc3b1fbd29eab85b2cecc1bab66b4f0", "score": "0.57139665", "text": "function validateRequired($required, $value, $type) {\r\n\tif($required == \"required\") {\r\n\r\n\t\t// Check if we got an empty value\r\n\t\tif($value == \"\") {\r\n\t\t\techo \"false\";\r\n\t\t\texit();\r\n\t\t}\r\n\t} else {\r\n\t\tif($value == \"\") {\r\n\t\t\techo \"none\";\r\n\t\t\texit();\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "3081d18d720a611418b9c1bf1b1f9085", "score": "0.57062364", "text": "public function hasRequiredParameters()\n {\n foreach ($this->parameters as $parameter) {\n if ($parameter->isRequired()) {\n return true;\n }\n }\n return false;\n }", "title": "" } ]
bdfc36c91ed49f85e50c057f4f143d3a
Creates a gamefieldarray with given rows and columns
[ { "docid": "7b538cb7276124aa8fbe86e53db3659b", "score": "0.59449", "text": "public function setGamefield($_row,$_column)\r\n\t{\r\n\t\tif(is_numeric($_row) && is_numeric($_column))\r\n\t\t{\r\n\t\t\tif($_row < 20)\r\n\t\t\t{\r\n\t\t\t\t$_row= 20;\r\n\r\n\t\t\t}\r\n\t\t\tif($_row>100)\r\n\t\t\t{\r\n\t\t\t\t$_row=100;\r\n\t\t\t}\r\n\t\t\tif($_column < 20)\r\n\t\t\t{\r\n\t\t\t\t$_column=20;\r\n\t\t\t}\r\n\t\t\tif($_column>100)\r\n\t\t\t{\r\n\t\t\t\t$_column=100;\r\n\t\t\t}\r\n\t\t\tfor($i=0;$i<(int)$_row;$i++)\r\n\t\t\t{\r\n\t\t\t\tfor($j=0;$j<(int)$_column;$j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->gameFieldArray[$i][$j]=' ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->log(\"Gamefield with \".$_column.\" columns and \".$_row.\" rows was build.\\n\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->log(\"Gamefield with \".$_column.\" columns and \".$_row.\" rows couldn't build.\\n\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "8c10c36d12219ab434b471c5c9910fb1", "score": "0.67195475", "text": "private function buildField() {\n\n $battleField = array();\n for($i=0; $i<8; $i++) {\n for($j=0; $j<8; $j++) {\n $battleField[$i][$j] = new Square();\n }\n }\n\n return $battleField;\n }", "title": "" }, { "docid": "bf84c21943e30506ab9994daf8f9bc75", "score": "0.6387948", "text": "public function newBoardArray();", "title": "" }, { "docid": "3a04d1dc146e7b4c2b0126b30ea3e642", "score": "0.6177689", "text": "private function initField()\n {\n for ($i = 0; $i < $this->width; $i++) {\n for ($j = 0; $j < $this->height; $j++) {\n\n $this->field[$i][$j] = new Cell();\n }\n }\n }", "title": "" }, { "docid": "1919fd5fd651c7cf4a36aa816924b0d2", "score": "0.5978407", "text": "function createGrid() {\n\t\t\t$this->setFragmentSize();\n\t\t\t\n\t\t\t$size = array(ceil($this->__size['width'] / $this->fragmentSize), ceil($this->__size['depth'] / $this->fragmentSize));\n\t\t\t\n\t\t\tfor($i = 0; $i < $size[0]; $i++) {\n\t\t\t\tfor($j = 0; $j < $size[1]; $j++) {\n\t\t\t\t\t$this->__grid[$i][$j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $this->__grid;\n\t\t}", "title": "" }, { "docid": "076ff91b377b438f13417e92083e74da", "score": "0.5883962", "text": "private function createGrids(int $x,int $y):array{\r\n $grids = [];\r\n for ($i=0; $i < $x; ++$i) { \r\n for ($j = 0;$j<$y;++$j){\r\n if($i+1<$x){\r\n $grids[$i][$j]['right'] = ['x'=>$i+1,'y'=>$j];\r\n if($j+1<$y)\r\n $grids[$i][$j]['down'] = ['x'=>$i,'y'=>$j+1];\r\n else\r\n $grids[$i][$j]['down'] = null;\r\n }else{\r\n $grids[$i][$j]['right'] = null;\r\n if($j+1<$y)\r\n $grids[$i][$j]['down'] = ['x'=>$i,'y'=>$j+1];\r\n else\r\n $grids[$i][$j]['down'] = null;\r\n }\r\n }\r\n }\r\n return $grids;\r\n }", "title": "" }, { "docid": "ad117579254e1a6bd01856fb9a1c9f87", "score": "0.5690058", "text": "public function createGrid() {\n for ($row = 0; $row <= $this->getHeight() + 1; $row++)\n {\n for ($col = 0; $col <= $this->getWidth() + 1; $col++)\n {\n if ($row == 0 || $row == $this->getHeight() + 1)\n {\n $this->grid[$row][$col] = $this->horizontalBorderChar;\n }\n elseif ($col == 0 || $col == $this->getWidth() + 1)\n {\n $this->grid[$row][$col] = $this->verticalBorderChar;\n }\n else\n {\n $this->grid[$row][$col] = $this->paddingChar;\n }\n }\n }\n }", "title": "" }, { "docid": "ef70d3275b9d45b3720fbf1e766694b3", "score": "0.5654291", "text": "function createArray() {\n $tableData = array();\n \n // get column headers\n if($this->headerRow) {\n \n // trim string\n $row = $this->rawArray[$this->headerRow];\n \n // set column names array\n $columnNames = array();\n $uniqueNames = array();\n \n // loop over column names\n $colCount = 0;\n foreach($row as $cell) {\n \n $colCount++;\n \n $cell = strip_tags($cell);\n $cell = trim($cell);\n \n // save name if there is one, otherwise save index\n if($cell) {\n \n if(isset($uniqueNames[$cell])) {\n $uniqueNames[$cell]++;\n $cell .= ' ('.($uniqueNames[$cell] + 1).')'; \n } \n else {\n $uniqueNames[$cell] = 0;\n }\n \n $columnNames[$colCount] = $cell;\n \n } \n else\n $columnNames[$colCount] = $colCount;\n \n }\n \n // remove the headers row from the table\n unset($this->rawArray[$this->headerRow]);\n \n }\n \n // remove rows to drop\n foreach(explode(',', $this->dropRows) as $key => $value) {\n unset($this->rawArray[$value]);\n }\n \n // set the end row\n if($this->maxRows)\n $endRow = $this->startRow + $this->maxRows - 1;\n else\n $endRow = count($this->rawArray);\n \n // loop over row array\n $rowCount = 0;\n $newRowCount = 0; \n foreach($this->rawArray as $row) {\n \n $rowCount++;\n \n // if the row was requested then add it\n if($rowCount >= $this->startRow && $rowCount <= $endRow) {\n \n $newRowCount++;\n \n // create new array to store data\n $tableData[$newRowCount] = array();\n \n //$tableData[$newRowCount]['origRow'] = $rowCount;\n //$tableData[$newRowCount]['data'] = array();\n $tableData[$newRowCount] = array();\n \n // set the end column\n if($this->maxCols)\n $endCol = $this->startCol + $this->maxCols - 1;\n else\n $endCol = count($row);\n \n // loop over cell array\n $colCount = 0;\n $newColCount = 0; \n foreach($row as $cell) {\n \n $colCount++;\n \n // if the column was requested then add it\n if($colCount >= $this->startCol && $colCount <= $endCol) {\n \n $newColCount++;\n \n if($this->extraCols) {\n foreach($this->extraCols as $extraColumn) {\n if($extraColumn['column'] == $colCount) {\n if(preg_match($extraColumn['regex'], $cell, $matches)) {\n if(is_array($extraColumn['names'])) {\n $this->extraColsCount = 0;\n foreach($extraColumn['names'] as $extraColumnSub) {\n $this->extraColsCount++;\n $tableData[$newRowCount][$extraColumnSub] = $matches[$this->extraColsCount];\n } \n } else {\n $tableData[$newRowCount][$extraColumn['names']] = $matches[1];\n }\n } else {\n $this->extraColsCount = 0;\n if(is_array($extraColumn['names'])) {\n $this->extraColsCount = 0;\n foreach($extraColumn['names'] as $extraColumnSub) {\n $this->extraColsCount++;\n $tableData[$newRowCount][$extraColumnSub] = '';\n } \n } else {\n $tableData[$newRowCount][$extraColumn['names']] = '';\n }\n }\n }\n }\n }\n \n if($this->stripTags) \n $cell = strip_tags($cell);\n \n // set the column key as the column number\n $colKey = $newColCount;\n \n // if there is a table header, use the column name as the key\n if($this->headerRow)\n if(isset($columnNames[$colCount]))\n $colKey = $columnNames[$colCount];\n \n // add the data to the array\n //$tableData[$newRowCount]['data'][$colKey] = $cell;\n $tableData[$newRowCount][$colKey] = $cell;\n }\n }\n }\n }\n \n $this->finalArray = $tableData;\n return $tableData;\n }", "title": "" }, { "docid": "f31a4017da3ee78e1994722bad1ed66b", "score": "0.56106985", "text": "function createGrid($encodedArray){\n\t\t$array = [];\n\t\t\n\t\t$rows = explode(\"|\", $encodedArray);\n\t\t$columns = null;\n\t\t\n\t\t$i = -1;\n\t\tforeach($rows as $row){\n\t\t\t// First array is a blank array with explode - skip it\n\t\t\tif($i == -1){\n\t\t\t\t$i++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$columns = explode(\",\", $row);\n\t\t\t\n\t\t\t$array[$i] = [];\n\t\t\t\n\t\t\t$skipFirst = true;\n\t\t\tforeach($columns as $col){\n\t\t\t\t// First array is a blank array with explode - skip it\n\t\t\t\tif($skipFirst){\n\t\t\t\t\t$skipFirst = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tarray_push($array[$i], $col);\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "c714a273a3ed1dd5ad8a2567dea37d56", "score": "0.5537924", "text": "public function setGamefieldCell($_row,$_column,$_doa)\r\n\t{\r\n\t\t$this->gameFieldArray[$_row][$_column]=$_doa;\r\n\t}", "title": "" }, { "docid": "7dc0d957e910bd23d435eca2bad43cf8", "score": "0.55239487", "text": "function generateGrid(int $level, float $width, float $height, Color $color): array\n{\n $grid = [];\n for ($baseY = 0; $baseY < $height; $baseY += $height) {\n for ($baseX = 0; $baseX < $width; $baseX += $width) {\n for ($y = $baseY; $y < $baseY+SCREEN_HEIGHT; $y += $height) {\n for ($x = $baseX; $x < $baseX+SCREEN_WIDTH; $x += $width) {\n $grid[] = new Grid(new Rectangle($x, $y, $width, $height), $level, $color);\n }\n }\n }\n }\n return $grid;\n}", "title": "" }, { "docid": "55aeb774598e3d39066b9052c7b2942b", "score": "0.5519484", "text": "private function generateBoard()\n {\n foreach($this->yVertical as $y) {\n foreach($this->xHorizontal as $x) {\n\n $this->board[$y][$x] = [\n self::STATE => self::FREE,\n self::SHIP => null\n ];\n }\n }\n }", "title": "" }, { "docid": "8348009c725e3a4241675f4c5d345ec3", "score": "0.5512675", "text": "abstract public function columns(): array;", "title": "" }, { "docid": "15375a321969daf96253dcbddb1d5dfd", "score": "0.55068994", "text": "public function createBoard(int $rows, int $columns, int $mines) : array\n {\n $cells = $this->createCells($rows, $columns, $mines);\n \n $pos = 0;\n $elements = [];\n \n for($i = 1; $i <= $rows; $i++)\n {\n for($j = 1; $j <= $columns; $j++)\n {\n $elements['r_'.$i]['c_'.$j] = $cells[$pos++];\n }\n }\n \n return $elements;\n }", "title": "" }, { "docid": "de91e9ecbd3e400683a964ee763a4e7e", "score": "0.5499571", "text": "public function build() {\n\t\t$size = $this->m_size;\n\t\t$map = $this->get_map();\n\t\t$grid = [];\n\t\tfor($i = 0; $i < $size; ++$i) {\n\t\t\t$row = [];\n\t\t\tfor($ii = 0; $ii < $size; ++$ii) {\n\t\t\t\t$row[] = in_array($ii, $map[$i])\n\t\t\t\t\t? self::ON\n\t\t\t\t\t: self::OFF;\n\t\t\t}\n\t\t\t$grid[] = $row;\n\t\t}\n\t\treturn $grid;\n\t}", "title": "" }, { "docid": "392b92a2ef8352fbca7574e8d368daab", "score": "0.54743075", "text": "public function createArray();", "title": "" }, { "docid": "392b92a2ef8352fbca7574e8d368daab", "score": "0.54743075", "text": "public function createArray();", "title": "" }, { "docid": "9ca55a46050d6a4887ebb8c7fcd92744", "score": "0.5393803", "text": "function NewRow() {\n\t\t$row = array();\n\t\t$row['id'] = NULL;\n\t\t$row['id_sector'] = NULL;\n\t\t$row['id_tipoactividad'] = NULL;\n\t\t$row['organizador'] = NULL;\n\t\t$row['nombreactividad'] = NULL;\n\t\t$row['nombrelocal'] = NULL;\n\t\t$row['direccionlocal'] = NULL;\n\t\t$row['fecha_inicio'] = NULL;\n\t\t$row['fecha_fin'] = NULL;\n\t\t$row['horasprogramadas'] = NULL;\n\t\t$row['id_persona'] = NULL;\n\t\t$row['contenido'] = NULL;\n\t\t$row['observaciones'] = NULL;\n\t\t$row['id_centro'] = NULL;\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "78a6ab9bc913e748eb4fa14e806d607c", "score": "0.5387596", "text": "public function __construct()\n {\n $this->rows[] = array(\"A1\", \"A2\", \"A3\");\n $this->rows[] = array(\"B1\", \"B2\", \"B3\");\n $this->rows[] = array(\"C1\", \"C2\", \"C3\");\n // vertical\n $this->rows[] = array(\"A1\", \"B1\", \"C1\");\n $this->rows[] = array(\"A2\", \"B2\", \"C2\");\n $this->rows[] = array(\"A3\", \"B3\", \"C3\");\n // diagonal\n $this->rows[] = array(\"A1\", \"B2\", \"C3\");\n $this->rows[] = array(\"A3\", \"B2\", \"C1\");\n\n $this->fields = array(\n \"A1\" => false, \"A2\" => false, \"A3\" => false,\n \"B1\" => false, \"B2\" => false, \"B3\" => false,\n \"C1\" => false, \"C2\" => false, \"C3\" => false,\n );\n }", "title": "" }, { "docid": "dfff6a8b6463cd7ab0dbaa4339991b77", "score": "0.52487886", "text": "private function fillArray()\n {\n $return = array();\n for ($x=0; $x<$this->sizeX; $x++) {\n $line = array();\n for ($y = 0; $y < $this->sizeY; $y++) {\n $line[] = self::UNDEFINED;\n }\n $return[] = $line;\n }\n return $return;\n }", "title": "" }, { "docid": "b0019224b5b6ff3375d9029f75d400a5", "score": "0.5173786", "text": "private function setupBoard() {\n for($row = 0; $row < GAME_AREA_ROWS; $row++) {\n for($col = 0; $col < GAME_AREA_COLS; $col++) {\n $this->updateNumbers($row, $col);\n }\n }\n }", "title": "" }, { "docid": "3835eab4d9944b5e155e9c4c533c1aab", "score": "0.5132531", "text": "private function cells(){\r\n\t\t\t\r\n\t\t\t$a_cells = explode(',',$this->s_fields);\r\n\t\t\tarray_unshift($a_cells,count($a_cells));\r\n\t\t\treturn $a_cells;\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "42acd872b48121757ed57f48845c4417", "score": "0.5073923", "text": "function initialize($r, $c ){\n for($i=0;$i<$r;$i++){\n for($j=0;$j<$c;$j++)\n $a[$i][$j] = rand(0,9);\n } \n return $a;\n}", "title": "" }, { "docid": "39906cb554a1e26b8d80924a1166c4f6", "score": "0.5063147", "text": "public function init_empty_board($row, $col){ \n\t\t\t$this->board = array_fill(0, $row, array_fill(0, $col, null));\t\n\t\t}", "title": "" }, { "docid": "e0525c31469af69026b4a3685f4373f6", "score": "0.5057855", "text": "public function neighborCells($_row,$_column)\r\n\t{\r\n\t\t$tempRow;\r\n\t\t$tempColumn;\r\n\t\t$neighborHoodPlaces = array();\r\n\t\tfor($i=0;$i<3;$i++)\r\n\t\t{\r\n\t\t\tfor($j=0;$j<3;$j++)\r\n\t\t\t{\r\n\t\t\t\t$x=$i-1+$_row;\r\n\t\t\t\t$y=$j-1+$_column;\r\n\t\t\t\tif (isset($this->gameFieldArray[$x][$y]))\r\n\t\t\t\t{ //wert aus gamefield übernehmen\r\n\t\t\t\t\tif($x==$_row && $y==$_column)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$neighborHoodPlaces[$i][$j]=\"C\";\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$neighborHoodPlaces[$i][$j]=$this->gameFieldArray[$x][$y];\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{ //n muss rein\r\n\t\t\t\t\t$neighborHoodPlaces[$i][$j]=\"N\";\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $neighborHoodPlaces;\r\n\t}", "title": "" }, { "docid": "377de40d34cff850c60c28a326acb019", "score": "0.5044029", "text": "public function createRandomPuzzle(): array;", "title": "" }, { "docid": "4873ce92330e97377fb7563087745144", "score": "0.50289047", "text": "public function game_start() { \n for($y=0;$y<8;$y++) {\n for($x=0;$x<8;$x++) { \n $this->grid_positions[$x][$y] = null;\n }\n }\n \n for($x=0;$x<8;$x++) { \n $this->grid_positions[$x][1] = new Pawn(0,1); \n $this->grid_positions[$x][6] = new Pawn(1,-1);\n }\n $this->grid_positions[0][0] = new Rook(0);\n $this->grid_positions[7][0] = new Rook(0);\n $this->grid_positions[0][7] = new Rook(1);\n $this->grid_positions[7][7] = new Rook(1);\n $this->grid_positions[1][0] = new Knight(0);\n $this->grid_positions[6][0] = new Knight(0);\n $this->grid_positions[1][7] = new Knight(1);\n $this->grid_positions[6][7] = new Knight(1); \n $this->grid_positions[2][0] = new Bishop(0);\n $this->grid_positions[5][0] = new Bishop(0);\n $this->grid_positions[2][7] = new Bishop(1);\n $this->grid_positions[5][7] = new Bishop(1); \n $this->grid_positions[3][0] = new Queen(0);\n $this->grid_positions[3][7] = new Queen(1);\n $this->grid_positions[4][0] = new King(0);\n $this->grid_positions[4][7] = new King(1); \n }", "title": "" }, { "docid": "38c295d64db8ea403235d04949c411c5", "score": "0.49958834", "text": "public function getGrid()\n {\n return array();\n }", "title": "" }, { "docid": "eea64689bff3d2cdbe57227593374ebe", "score": "0.499292", "text": "public function createGrid($nb_paires)\n\t\t{\n\t\t\t$liste_paires = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'];\n\n\t\t\t// Choix aléatoire d'images en fonction du nombre de paires\n\t\t\t$selected_cards = array_rand($liste_paires, $nb_paires);\n\t\t\t// Remplissage de la grille\n\t\t\tfor ($i=0; $i < $nb_paires; $i++) {\n\t\t\t\t//Ajout d'une carte tirée au sort\n\t\t\t\t$memory[] = new Card($liste_paires[$selected_cards[$i]]);\n\t\t\t\t// Ajout de sa paire (identique)\n\t\t\t\t$memory[] = new Card($liste_paires[$selected_cards[$i]]);\n\t\t\t}\n\t\t\t// Mélange de la grille (donc des paires)\n\t\t\tshuffle($memory);\n\t\t\t// retour de la grille\n\t\t\treturn $memory;\n\t\t}", "title": "" }, { "docid": "041b4ced7b942c2457b711b8dc0c9b7c", "score": "0.4951885", "text": "function generateBoard($aXPositions, $aOPositions) {\n\t\tfor ($i = 1; $i <= 3; ++$i) {\n\t\t\tfor ($j = 1; $j <= 3; ++$j) {\n\t\t\t\t$aTable[$i][$j] = 0;\n\t\t\t}\n\t\t}\n\t\n\t\tforeach ($aXPositions as $key => $value) {\n\t\t\t$aTable[floor(($value - 1) / 3) + 1][($value - 1) % 3 + 1] = 1;\n\t\t}\n\n\t\tforeach ($aOPositions as $key => $value) {\n\t\t\t$aTable[floor(($value - 1) / 3) + 1][($value - 1) % 3 + 1] = 2;\n\t\t}\n\t\n\t\treturn $aTable;\n\t}", "title": "" }, { "docid": "1d8ea23a8eafedfa6b7cd1a3ae392ac0", "score": "0.4945225", "text": "function createArrayType1()\n {\n for ($floors = 0; $floors < 10; $floors++) {\n $rooms[$floors] = ($floors+1) . \"13\";\n }\n return $rooms;\n }", "title": "" }, { "docid": "3a08fc2fdb7d9841fe304e2cf11b3276", "score": "0.49403906", "text": "function createArrayType2(){\n $i = 0;\n for ($floors=1; $floors < 11; $floors++) { \n $rooms[$i] = strval($floors) . \"01\";\n $i++;\n $rooms[$i] = strval($floors) . \"02\";\n $i++;\n $rooms[$i] = strval($floors) . \"12\";\n $i++;\n $rooms[$i] = strval($floors) . \"11\";\n $i++;\n }\n return $rooms;\n }", "title": "" }, { "docid": "e09119e5258b2515d317936b469e25bb", "score": "0.49322775", "text": "protected function grid()\n {\n $grid = new Grid(new Game());\n\n// $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('uuid', __('Uuid'));\n// $grid->column('key', __('Key'));\n $grid->column('min_age', __('Min age'));\n $grid->column('open_time', __('Open time'));\n $grid->column('close_time', __('Close time'));\n $grid->column('max_hour_weekday', __('Max hour weekday'));\n $grid->column('max_hour_weekend', __('Max hour weekend'));\n $grid->column('max_money_onetime', __('Max money onetime'));\n $grid->column('max_money_monthly', __('Max money monthly'));\n $grid->column('max_money_onetime_l2', __('Max money onetime l2'));\n $grid->column('max_money_monthly_l2', __('Max money monthly l2'));\n $grid->column('start_prompt', __('Start prompt'));\n $grid->column('out_of_time_prompt', __('Out of time prompt'));\n $grid->column('time_limit_prompt', __('Time limit prompt'));\n $grid->column('money_limit_prompt', __('Money limit prompt'));\n $grid->column('money_limit_l2_prompt', __('Money limit l2 prompt'));\n $grid->column('agreement', __('Agreement'));\n// $grid->column('created_at', __('Created at'));\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "title": "" }, { "docid": "17753e13b42d5612ca72da1d975861c5", "score": "0.4922205", "text": "function createArrayType4()\n {\n $i = 0;\n for ($floors = 1; $floors < 11; $floors++) {\n $rooms[$i] = strval($floors) . \"05\";\n $i++;\n $rooms[$i] = strval($floors) . \"06\";\n $i++;\n $rooms[$i] = strval($floors) . \"07\";\n $i++;\n $rooms[$i] = strval($floors) . \"08\";\n $i++;\n }\n return $rooms;\n }", "title": "" }, { "docid": "860f4807f2c89fd34b1d4c25f0f684c2", "score": "0.49180633", "text": "public function createRow(array $theRow) : int;", "title": "" }, { "docid": "fed6cca96bc26653fac5cc28fcd96cbd", "score": "0.48996454", "text": "public function MapRow(array $row, int $row_number) :array\n {\n\n\textract($row);\n\n\t//we sometimes have hundreds of ids.. we need to make them take the form\n\t//1111,2222,3333,4444,555,\n\t//1222,2343,4353,4656,567,\n\t//etc\n\t//first we completely seperate the ids..\n\t$cardface_array = explode(',',$cardface_ids);\n\t//then we put them into arrays of five elements each.\n\t$cardface_chunks = array_chunk($cardface_array,5);\n\t//now create a new array to hold our row strings...\n\t$cardface_row_strings = [];\n\tforeach($cardface_chunks as $this_chunk){\n\t\t$cardface_row_strings[] = implode(',',$this_chunk);//this will make a single row...\n\t}\n\t$row['cardface_ids'] = implode('<br>',$cardface_row_strings);\t\n\t\n\t$row['name'] = \"\n\t\t<h3>$name</h3>\n\t\t<a target='_blank' href='$scryfall_web_uri'>\n\t\t\t<img width='250px' src='$image_uri_art_crop'>\n\t\t</a>\n\t\t<button onclick=\\\"api_button_press('/changeCard/fredTV/',$multiverse_id);\\\" \n\t\t\tid='api_button_$multiverse_id' \n\t\t\ttype='button' \n\t\t\tclass='btn btn-success'>\n\t\t\tShow on TV\n\t\t</button>\n\t\t\";\n\n return $row;\n }", "title": "" }, { "docid": "6af448753c52aa948dbe0eab214071ee", "score": "0.48975226", "text": "public function insertShipsIntoGameField(array $array)\n {\n\n //Go through the gamefield X\n for ($i = 0; $i < self::LENGTH; $i++)\n {\n \n \n //Go through the gamefield Y\n for ($j = 0; $j < self::LENGTH; $j++)\n {\n //Check if Ship is in that position\n if($array[$i][$j] == 1)\n {\n //Set gamefield to 1 if Ship exists\n $this->gamefield[$i][$j] = 1;\n }\n }\n }\n\n }", "title": "" }, { "docid": "f90b9be66d72c64327f75703e0a494fa", "score": "0.48903513", "text": "private function toArrayFill(?array $fields = []): array\n {\n $return = [];\n $allFields = [\n self::ID => $this->getId(), self::STATUS => $this->getStatus(),\n self::WIDTH => $this->getWidth(), self::HEIGHT => $this->getHeight(),\n self::SELECTED_CELL_CNT_TO_WIN => $this->getSelectedCellCntToWin(), self::NEXT_SYMBOL => $this->getNextSymbol(),\n ];\n\n if (empty($fields)) {\n return $allFields;\n }\n\n foreach ($fields as $field) {\n $return[$field] = isset($allFields[$field]) ? $allFields[$field] : null;\n }\n\n return $return;\n }", "title": "" }, { "docid": "52e6ff7acbdc9bcb6b9087c05fb60a9c", "score": "0.48728544", "text": "private function generateArray()\n {\n $array = array();\n for ($i = 1; $i <= 5; $i++) {\n $array[$i] = new Record($i, \"Header #\" . $i);\n }\n return $array;\n }", "title": "" }, { "docid": "028d682637edd84d5dc73ad5c022c7f8", "score": "0.48344192", "text": "final protected function arr():array\n {\n return $this->cells()->toArray();\n }", "title": "" }, { "docid": "3477f7bc70ff5c3f3e542bf2bda0eac5", "score": "0.48258653", "text": "protected function getGridFromFile(\\SplFileObject $file)\n {\n if ($file->eof()) {\n throw new BoardException('File is empty');\n }\n // temporary grid container\n $grid = array();\n \n while ($line = $file->fgets()) {\n $row = str_split(trim($line));\n array_walk($row, function (&$item) {\n $item = ($item === '1' || $item === '0') ? (int) $item : $item;\n });\n $grid[] = $row;\n }\n\n return $grid;\n }", "title": "" }, { "docid": "445b04a166e125f43bf4b97e72d5a466", "score": "0.4824261", "text": "public static function createAxeData(array $rowdata):array\n {\n self::unverifiedAxe($rowdata);\n\n //Initialization\n $resultat = [];\n\n foreach ($rowdata as $column => $value) {\n $data = new Data();\n $data->setLabel(\"settings.axe.field.$column\");\n if (empty($value)) {\n $data->setNone(true);\n } else {\n $data->setName($value);\n }\n $resultat[] = $data;\n }\n\n return $resultat;\n }", "title": "" }, { "docid": "47c5c448234cd8e124550bf14bd7c9f5", "score": "0.48000023", "text": "public function __construct ($width, $height) {\n for ($i = 0; $i < $width; $i++) {\n $this->grid[$i] = array();\n for ($j = 0; $j < $height; $j++) {\n $this->grid[$i][$j] = ConnectFour::DISC_EMPTY;\n }\n }\n $this->width = $width;\n $this->height = $height;\n }", "title": "" }, { "docid": "0f80031da949f328a0e886f58a5cfe3c", "score": "0.47940105", "text": "function create_land_units($size)\r\n\t{\r\n\tfor($i=-$size;$i <= $size;$i++)\r\n\t\t{\r\n\t\tfor($j=-$size;$j <= $size;$j++)\r\n\t\t\t{\r\n\t\t\tmysql_query(\"insert into land_unit (x_coord,y_coord,colour,land_type,fog) values (\".$j.\",\".$i.\",'#008000',1,1);\");\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "5fb168637452f114c293df816c4803d8", "score": "0.47846326", "text": "protected function createRandomGridRow($length)\n {\n $row = array();\n\n for ($i = 0; $i < $length; $i++) {\n $row[] = mt_rand(0, 1);\n }\n\n return $row;\n }", "title": "" }, { "docid": "75d1607aa39a96665659a158d5d32836", "score": "0.4779551", "text": "function crearMatriz($filas,$columnas,$valIni,$incremento){\n\n// Los indices de fila seran X1 X2 Xn y los de columna Y1 Y2 Yn\n\t\t$V=array();\n\t\t$valor=$valIni;\n\t\tfor($i=1;$i<=$filas;$i++){ //Utilizamos for por que si que sabes cuantos son\n\t\t\tfor($j=1;$j<=$columnas;$j++){\n\t\t\t\t$fila=\"X\".$i;\n\t\t\t\t$col=\"Y\".$j;\n\t\t\t\t$V[$fila][$col]=$valor;\n\t\t\t\t$valor=$valor+$incremento;\n\t\t\t}\n\t\t}\n\t\treturn $V;\n\t}", "title": "" }, { "docid": "1e31300270efa75a74636736b6a8e2f6", "score": "0.47680014", "text": "function createArrayType3()\n {\n $i = 0;\n for ($floors = 1; $floors < 11; $floors++) {\n $rooms[$i] = strval($floors) . \"03\";\n $i++;\n $rooms[$i] = strval($floors) . \"04\";\n $i++;\n $rooms[$i] = strval($floors) . \"10\";\n $i++;\n $rooms[$i] = strval($floors) . \"09\";\n $i++;\n }\n return $rooms;\n }", "title": "" }, { "docid": "6f2b92203948553d5be89678adda386c", "score": "0.47628233", "text": "public function getColumns(): array;", "title": "" }, { "docid": "6f2b92203948553d5be89678adda386c", "score": "0.47628233", "text": "public function getColumns(): array;", "title": "" }, { "docid": "6f2b92203948553d5be89678adda386c", "score": "0.47628233", "text": "public function getColumns(): array;", "title": "" }, { "docid": "6d3821a8c2fc6939b9efaae53e76ef79", "score": "0.47502708", "text": "function sBox0($orig) {\n\t//format: array[row][column]\n\t$orig = implode(\"\",$orig);\n\t$rowSelect = substr($orig,0,1).substr($orig,3,1);\t//first and fourth elements of the array\n\t$colSelect = substr($orig,1,2);\t\t\t\t\t\t//second and third elements of the array\n\n\t$sBox[\"00\"][\"00\"] = [0,1];\n\t$sBox[\"00\"][\"01\"] = [0,0];\n\t$sBox[\"00\"][\"10\"] = [1,1];\n\t$sBox[\"00\"][\"11\"] = [1,0];\n\t$sBox[\"01\"][\"00\"] = [1,1];\n\t$sBox[\"01\"][\"01\"] = [1,0];\n\t$sBox[\"01\"][\"10\"] = [0,1];\n\t$sBox[\"01\"][\"11\"] = [0,0];\n\t$sBox[\"10\"][\"00\"] = [0,0];\n\t$sBox[\"10\"][\"01\"] = [1,0];\n\t$sBox[\"10\"][\"10\"] = [0,1];\n\t$sBox[\"10\"][\"11\"] = [1,1];\n\t$sBox[\"11\"][\"00\"] = [1,1];\n\t$sBox[\"11\"][\"01\"] = [0,1];\n\t$sBox[\"11\"][\"10\"] = [1,1];\n\t$sBox[\"11\"][\"11\"] = [1,0];\n\n\treturn $sBox[$rowSelect][$colSelect];\n}", "title": "" }, { "docid": "5de6e25a22c7ac896d4a5398a30173d4", "score": "0.47466117", "text": "public function __construct($width, $height)\n {\n $this->width = $width;\n $this->height = $height;\n \n // Setup new empty grid\n for ($i = 0; $i < $height; $i++)\n for ($j = 0; $j < $width; $j++)\n $this->grid[$i][$j] = 0;\n \n $this->next_grid = $this->grid;\n }", "title": "" }, { "docid": "396a7431f2873e2cf3aaefeb23f552c7", "score": "0.47384444", "text": "function ImageGrid(&$im,$startx,$starty,$width,$height,$xcols,$yrows,&$color) {\n\nfor ( $x=0; $x < $xcols; $x++ ) {\n for ( $y=0; $y < $yrows; $y++ ) {\n $x1 = $startx + ($width * $x);\n $x2 = $startx + ($width * ($x+1));\n $y1 = $starty + ($height * $y);\n $y2 = $starty + ($height * ($y+1));\n ImageRectangle($im, $x1, $y1, $x2, $y2, $color);\n }\n}\n\n}", "title": "" }, { "docid": "dac3ae62caa1e4562055a9c742b4ca8e", "score": "0.47346947", "text": "function initBoard(){\n echo\"TicTacTOe Game\\n\\n\";\n for($i = 0 ;$i<3;$i++){\n for($j = 0 ;$j <3 ;$j++){\n self::$board[$i][$j] = -10 ; \n }\n }\n echo \"Player is X\"; \n }", "title": "" }, { "docid": "b337ddef9a817bae5ef7fd44d745699e", "score": "0.47138152", "text": "public function addSingleProviderRow(){\n self::$numCols = rand(0, 23);\n \n // generate a random number of columns\n $row = new \\XModule\\Helpers\\Row();\n for ($i = 0; $i < self::$numCols; $i++){\n $row->add(new \\XModule\\Helpers\\Cell());\n }\n return [\n [$row],\n ];\n }", "title": "" }, { "docid": "835be9e6379320102d0103f98be09bb1", "score": "0.47006", "text": "private function mapFieldsToValues(array $row): array\n {\n $mapping = [];\n foreach ($this->mapping as $fileElement => $entityColumn)\n {\n $mapping[$row[$fileElement]] = $entityColumn;\n }\n\n return array_flip($mapping);\n }", "title": "" }, { "docid": "e55bb5f0e61fa18fb9b5eb1efa588234", "score": "0.46957934", "text": "function load_array($row) {\n\t\tif ($row != NULL) {\n\t\t\tforeach ($row as $col=>$val) {\n\t\t\t\t$this->$col = $val;\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a27aff0254003636cd87f7a2cfb79bfc", "score": "0.46912035", "text": "public function my_columns() { return array(); }", "title": "" }, { "docid": "eb18f0de1e8bbbc073a9ba858cd7d305", "score": "0.46909493", "text": "protected abstract function getGrid();", "title": "" }, { "docid": "97598e562734db0408b547186ffa25ed", "score": "0.46891478", "text": "public function create_tiles($row, $column)\n\t{\n\t\t$this->log('Creating tiles...');\n\t\t$data = $this->analyze_video($this->input);\n\t\tif(empty($data))return false;\n\t\t\n\t\t/**\n\t\t * My selected width and height\n\t\t */\n\t\t$sw = 320;\n\t\t$sh = 240;\n\t\t\n\t\t/**\n\t\t * Now adjust tile size according to video aspect ratio\n\t\t */\n\t\t$w = $data['width'];\n\t\t$h = $data['height'];\n\t\t\n\t\tif($w && $h){\n\t\t\t$r = $sw/$w;\n\t\t\t$sh = (int)($r*$h);\n\t\t}\n\t\t\n\t\t$frame = $data['duration']*($data['fps'] + (rand(-20,20)/10));\n\t\t$total = $row*$column;\n\t\t$diff = (int)($frame/$total);\n\t\tif($diff < 1)$diff = 1;\n\t\t$ot = $this->ot_dir.'/tiles_'.$row.'x'.$column.'.png';\n\t\t$cmd = $this->FFMPEG.' -ss 1 -i '.$this->input.' -frames 1 -threads 1 -vf \"select=not(mod(n\\,'.$diff.')),scale='.$sw.':'.$sh.',tile='.$row.'x'.$column.'\" '.$ot.' 2> '.$this->ffmpeg_log;\n\t\t$this->log('Tiles : '.$cmd);\n\t\texec($cmd, $o, $c);\n\t\tif(!$c){\n\t\t\t$this->log('Tiles successfully created');\t\n\t\t\t\n\t\t\tlist($w, $h) = getimagesize($ot);\n\t\t\t\n\t\t\t/*\n\t\t\t * Create header\n\t\t\t */\n\t\t\t$ot_title = $ot.'_title.png';\n\t\t\t\n\t\t\t$im = imagecreatetruecolor($w, 150);\n\t\t\t$white = imagecolorallocate($im, 255, 255, 255);\n\t\t\t$black = imagecolorallocate($im, 0, 0, 0);\n\t\t\timagefilledrectangle($im, 0, 0, $w, 150, $white);;\n\t\t\t$font = dirname(dirname(__FILE__)).'/fonts/tahoma.ttf';\n\t\t\timagettftext($im, 14, 0, 5, 25, $black, $font, \"Filename: \".basename($this->input));\n\t\t\timagettftext($im, 14, 0, 5, 50, $black, $font, \"Filesize: \".formatSize(filesize($this->input)));\n\t\t\timagettftext($im, 14, 0, 5, 75, $black, $font, \"Duration: \".pretty_time($data['duration']));\n\t\t\timagettftext($im, 14, 0, 5, 100, $black, $font, $data['audio']);\n\t\t\timagettftext($im, 14, 0, 5, 125, $black, $font, $data['video'].' , '.$data['fps'].' fps');\n\t\t\t\n\t\t\timagepng($im, $ot_title);\n\t\t\t\n\t\t\tif(file_exists($ot_title) && filesize($ot_title) > 100){\n\t\t\t\t$ot_f = $ot.'_final.png';\n\t\t\t\t$this->merge_images($ot_title, $ot, $ot_f);\t\n\t\t\t\tif(file_exists($ot_f) && filesize($ot_f) > 100){\n\t\t\t\t\trename($ot_f, $ot);\n\t\t\t\t\t@unlink($ot_title);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->log('Failed to create tiles');\n\t\t\t@unlink($ot);\n\t\t}\n\t}", "title": "" }, { "docid": "b6348f5c0e9d07bf6e4b3a2984d6b74c", "score": "0.46833855", "text": "public function create(array $row)\n {\n }", "title": "" }, { "docid": "0acd912de997cdf3ac41ec73c3da6925", "score": "0.46713832", "text": "protected function getEmptyFields(){\n\t\t$fields = array();\n\n\t\tfor ($i = 0; $i < $this->gridSize; $i++) {\n\t\t\tfor ($j = 0; $j < $this->gridSize; $j++) {\n\t\t\t\tif ($this->grid[$i][$j] === $this->emptyChar){\n\t\t\t\t\t$fields[]= array($i, $j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "085fcf533a4767ecb55eb8bd0b2354f6", "score": "0.46585938", "text": "public function maker(): array;", "title": "" }, { "docid": "6f672412fb283111caf4f9dc943891ba", "score": "0.46563944", "text": "function sBox1($orig) {\n\t//format: array[row][column]\n\t$orig = implode(\"\",$orig);\n\t$rowSelect = substr($orig,0,1).substr($orig,3,1);\t//first and fourth elements of the array\n\t$colSelect = substr($orig,1,2);\t\t\t\t\t\t//second and third elements of the array\n\n\t$sBox[\"00\"][\"00\"] = [0,0];\n\t$sBox[\"00\"][\"01\"] = [0,1];\n\t$sBox[\"00\"][\"10\"] = [1,0];\n\t$sBox[\"00\"][\"11\"] = [1,1];\n\t$sBox[\"01\"][\"00\"] = [1,0];\n\t$sBox[\"01\"][\"01\"] = [0,0];\n\t$sBox[\"01\"][\"10\"] = [0,1];\n\t$sBox[\"01\"][\"11\"] = [1,1];\n\t$sBox[\"10\"][\"00\"] = [1,1];\n\t$sBox[\"10\"][\"01\"] = [0,0];\n\t$sBox[\"10\"][\"10\"] = [0,1];\n\t$sBox[\"10\"][\"11\"] = [0,0];\n\t$sBox[\"11\"][\"00\"] = [1,0];\n\t$sBox[\"11\"][\"01\"] = [0,1];\n\t$sBox[\"11\"][\"10\"] = [0,0];\n\t$sBox[\"11\"][\"11\"] = [1,1];\n\n\treturn $sBox[$rowSelect][$colSelect];\n}", "title": "" }, { "docid": "659e086d1d2812e7f6e4645b3be200ad", "score": "0.46540368", "text": "function make_freezer_matrix_array($locs) {\n $fzr = array();\n foreach ($locs as $loc) {\n $status = $loc['Status'];\n $active_desc = \"<span style='color:green;'>$status</span>\";\n $inactive_desc = \"\";\n $desc = ($status == 'Active') ? $active_desc : $inactive_desc;\n $fzr[$loc['Shelf']][$loc['Rack']][$loc['Row']][$loc['Col']] = $desc;\n }\n return $fzr;\n}", "title": "" }, { "docid": "55a0ed94960c973a403792222320fb7c", "score": "0.46507803", "text": "public function getArray($type) {\n //the size of table -> the length of the array of pictures\n $tempArray=$type;\n if (($this->rows * $this->columns) > (count($tempArray) )) {\n \n $tempArray = array_merge($tempArray, $tempArray);\n $tempArray = array_slice($tempArray, 0, ($this->rows * $this->columns / 2));\n } else { \n $tempArray = array_slice($tempArray, 0, ($this->rows * $this->columns / 2));\n }\n $tempArray = (array_merge($tempArray, $tempArray));\n\n\n shuffle($tempArray);\n\n return $tempArray;\n }", "title": "" }, { "docid": "259f14d1ec80dd640c3e2bd9d624bbab", "score": "0.4640721", "text": "public function toArray(?array $fields = [], $relations = []): array\n {\n $return = [];\n // #15 Contains most popular fields. Add a field is necessary.\n $return = $this->toArrayFill($fields);\n\n // #30 Fill relations.\n if (!empty($relations)) {\n foreach ($relations as $relation) {\n switch ($relation) {\n case Game::SELECTED_CELLS:\n $selectedCells = $this->getSelectedCells();\n $return[Game::SELECTED_CELLS] = [];\n if (!empty($selectedCells)) {\n foreach ($selectedCells as $selectedCell) {\n // #32 This format is better because when drawing the board it's faster to make sure that it's selected.\n // https://github.com/Janis-Rullis-IT/flexi-tic-tac-toe/issues/32#issuecomment-712735160\n $return[Game::SELECTED_CELLS][$selectedCell->getRow()][$selectedCell->getColumn()] = $selectedCell->toArray();\n }\n }\n break;\n default: null;\n }\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "e5a7e1271c98741c6276d96f90036b03", "score": "0.46392417", "text": "function countColRow($array)\n\t\t{\n\t\t\t$rows = count($array);\n\t\t\t$cols = max(array_map('count', $array));\n\t\t\treturn [$cols, $rows];\n\t\t}", "title": "" }, { "docid": "ee7f63f6372c587fd4ab9454aa50ad3a", "score": "0.46158946", "text": "public function generateCoords($len, $max_col, $max_row)\n {\n $is_horiz = (rand(0,1));\n $start = ($is_horiz) ? array(rand(1, $max_col - $len), rand(1, $max_row)) : array( rand(1, $max_col), rand(1, $max_row - $len));\n\n $ship = array($start);\n $inc = 1;\n\n while ($inc < $len) {\n if ($is_horiz) {\n $ship[] = array($start[0] + $inc, $start[1]);\n } else {\n $ship[] = array($start[0], $start[1] + $inc);\n }\n $inc++;\n }\n\n return $ship;\n }", "title": "" }, { "docid": "794fff43a27a85104507fa2b5f5034f3", "score": "0.45975053", "text": "abstract protected function createEntity(array $row);", "title": "" }, { "docid": "8d0f73fe53b3746e86a218d612391cf7", "score": "0.45968175", "text": "public function instantiate_columnsFromField($field_object) {\n\tif (count($field_object->field_field_object_array) > 0) {\n\t\t// return array('columnSQL: Not Indicated for this Field (it _has_ fields)');\n\t\treturn array();\n\t}\n\t$render_column_array = $field_object->render_column_array;\n\t$columns = $field_object->columns;\n\t// $supported_columns_key_array = array('value');\n\t$supported_columns_key_array = $field_object->render_column_array;\n\t$column_object_array = array();\n\tforeach ($columns as $column_key => $column_array) {\n\t\tif (in_array($column_key, $supported_columns_key_array)) {\n\t\t\tif ($field_object->field_column_name != $field_object->field_name . '_' . $column_key) {\n\t\t\t\t/**\n\t\t\t\t * @circleback maybe remove the IF, just rewrite regardless\n\t\t\t\t */\n\t\t\t\t$field_object->field_column_name = $field_object->field_name . '_' . $column_key;\n\t\t\t}\n\t\t\t$column_array = $field_object->prepareColumnArrayForColumnInstantiation();\n\t\t\t$column_array['column_key'] = $column_key;\n\t\t\t$column_object_this = new columnSQL($column_array);\n\t\t\t$column_object_this->unpack_label($render_column_array);\n\t\t\t$column_object_this->unpack_select_string();\n\t\t\t$column_object_this->unpack_column_is_limited();\n\t\t\t$column_object_array[] = $column_object_this;\n\t\t}\n\t}\n\treturn $column_object_array;\n}", "title": "" }, { "docid": "4107a04455fc844e74e3a90daa67e3d9", "score": "0.45863125", "text": "function addCols( $tab ){\n\tglobal $kolom;\t\n\n\t$r1 = 10;\n\t$r2 = $this->w - ($r1 * 2) ;\n\t$y1 = 100;\n\t$y2 = $this->h - 50 - $y1;\n\t$this->SetXY( $r1, $y1 );\n\t$this->Rect( $r1, $y1, $r2, $y2, \"D\");\n\t$this->Line( $r1, $y1+6, $r1+$r2, $y1+6);\n\t$colX = $r1;\n\t$kolom = $tab;\n\twhile ( list( $lib, $pos ) = each ($tab) ){\n\t\t$this->SetXY( $colX, $y1+2 );\n\t\t$this->Cell( $pos, 1, $lib, 0, 0, \"C\");\n\t\t$colX += $pos;\n\t\t$this->Line( $colX, $y1, $colX, $y1+$y2);\n\t}\n}", "title": "" }, { "docid": "676e46ca4cb8c0dad08e2d5172c4887b", "score": "0.45831242", "text": "public function __construct($w,$h,$m)\n {\n $this->gameArea = array();\n\n\t\t$this->minespercent=$m;\n\t\t$this->width=$w;\n\t\t$this->height=$h;\n\n\t\t$this->mines=round(($w*$h)*($m/100.0));\n\n//\t\t$mines=30;\n\n for ($row = 0; $row < $this->height; $row++) {\n\n $temp = array();\n for ($column = 0; $column < $this->width; $column++) {\n $temp[] = new GameObject(GameObject::TYPE_UNDISCOVERED); //floor(mt_rand(0, 1))); // Randomize the game object type. TODO: Change this.\n }\n\n $this->gameArea[] = $temp;\n }\n\n\t\tfor($i=0;$i<$this->mines;)\n\t\t{\n\t\t\t$column=floor(mt_rand(0,$this->width-1));\n\t\t\t$row=floor(mt_rand(0,$this->height-1));\n\t\t\n\t\t\tif($this->gameArea[$row][$column]->type==GameObject::TYPE_UNDISCOVERED)\n\t\t\t{\n\t\t\t\t$this->gameArea[$row][$column]=new GameObject(GameObject::TYPE_MINE);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\n\n for ($row = 0; $row < $this->height; $row++)\n\t\t{\n for ($column = 0; $column < $this->width; $column++)\n\t\t\t{\n\t\t\t\t$this->neighbour($column,$row);\n }\n\n }\n\n\n\n\n }", "title": "" }, { "docid": "cf0db714ddac8bc477f8195476aa5810", "score": "0.45829132", "text": "function tableToMultiDimensionalArray($table) {\r\n\t\t\r\n\t\tif ($this->debug) { echo \"\\nfunction tableToMultiDimensionalArray($table)\"; }\r\n\t\t\r\n\t\t$result = array();\r\n\t\tforeach($table as $row) {\r\n\t\t\t//$result[$row[0]][] = $row[1];\r\n\t\t\t//echo ' ' . $row[0] . ', ';\r\n\t\t\t//$key = \r\n\t\t\t\r\n\t\t\tlist($key, $value) = each($row);\r\n\t\t\t$resultKey = $value;\r\n\t\t\t\r\n\t\t\tlist($key, $value) = each($row);\r\n\t\t\t$resultValue = $value;\r\n\t\t\t\r\n\t\t\t$result[$resultKey][] = $resultValue;\r\n\t\t\t\r\n\t\t}\r\n\t\tif ($this->debug) { var_dump($result); var_export($result); }\r\n\t\t\r\n\t\treturn $result;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a41a925f5daea7cf8f81c1e7d248f5bb", "score": "0.4582711", "text": "public function MapRow(array $row, int $row_number) :array\n {\n\n\t$is_debug = false;\n\t\n\t//we think it is safe to extract here because we are getting this from the DB and not a user directly..\n extract($row);\n\n\n\t//get the local image field for this report... null if not found..\n\t$img_field_name = \\App\\person_strategy_strategytag::getImgField();\n\tif(isset($$img_field_name)){\n\t\t$img_field = $$img_field_name;\n\t}else{\n\t\t$img_field = null;\n\t}\n\n\t$joined_select_field_sql = '';\n\n\n\n\t$person_field = \\App\\person::getNameField();\t\n\t$joined_select_field_sql .= \"\n, A_person.$person_field AS $person_field\n\"; \n\t$person_img_field = \\App\\person::getImgField();\n\tif(!is_null($person_img_field)){\n\t\tif($is_debug){echo \"person has an image field of: |$person_img_field|\n\";}\n\t\t$joined_select_field_sql .= \"\n, A_person.$person_img_field AS $person_img_field\n\"; \n\t}\n\n\t$strategy_field = \\App\\strategy::getNameField();\t\n\t$joined_select_field_sql .= \"\n, B_strategy.$strategy_field AS $strategy_field\n\"; \n\t$strategy_img_field = \\App\\strategy::getImgField();\n\tif(!is_null($strategy_img_field)){\n\t\tif($is_debug){echo \"strategy has an image field of: |$strategy_img_field|\n\";}\n\t\t$joined_select_field_sql .= \"\n, B_strategy.$strategy_img_field AS $strategy_img_field\n\"; \n\t}\n\n\t$strategytag_field = \\App\\strategytag::getNameField();\t\n\t$joined_select_field_sql .= \"\n, C_strategytag.$strategytag_field AS $strategytag_field\n\"; \n\t$strategytag_img_field = \\App\\strategytag::getImgField();\n\tif(!is_null($strategytag_img_field)){\n\t\tif($is_debug){echo \"strategytag has an image field of: |$strategytag_img_field|\n\";}\n\t\t$joined_select_field_sql .= \"\n, C_strategytag.$strategytag_img_field AS $strategytag_img_field\n\"; \n\t}\n\n\n\n //link this row to its DURC editor\n $row['id'] = \"<a href='/DURC/person_strategy_strategytag/$id'>$id</a>\";\n\n\n\n\tif(isset($$img_field_name)){ //is it set\n\t\tif(strlen($img_field) > 0){ //and it is it really a url..\n\t\t\t$row[$img_field_name] = \"<img width='300' src='$img_field'>\";\n\t\t}\n\t}\n\n\n\n$person_tmp = ''.$person_field;\nif(isset($row[$person_tmp])){\n\t$person_data = $row[$person_tmp];\n\t$row[$person_tmp] = \"<a target='_blank' href='/Zermelo/DURC_person/$person_id'>$person_data</a>\";\n}\n\n$person_img_tmp = ''.$person_img_field;\nif(isset($row[$person_img_tmp]) && strlen($person_img_tmp) > 0){\n\t$person_img_data = $row[$person_img_tmp];\n\t$row[$person_img_tmp] = \"<img width='200px' src='$person_img_data'>\";\n}\n\n$strategy_tmp = ''.$strategy_field;\nif(isset($row[$strategy_tmp])){\n\t$strategy_data = $row[$strategy_tmp];\n\t$row[$strategy_tmp] = \"<a target='_blank' href='/Zermelo/DURC_strategy/$strategy_id'>$strategy_data</a>\";\n}\n\n$strategy_img_tmp = ''.$strategy_img_field;\nif(isset($row[$strategy_img_tmp]) && strlen($strategy_img_tmp) > 0){\n\t$strategy_img_data = $row[$strategy_img_tmp];\n\t$row[$strategy_img_tmp] = \"<img width='200px' src='$strategy_img_data'>\";\n}\n\n$strategytag_tmp = ''.$strategytag_field;\nif(isset($row[$strategytag_tmp])){\n\t$strategytag_data = $row[$strategytag_tmp];\n\t$row[$strategytag_tmp] = \"<a target='_blank' href='/Zermelo/DURC_strategytag/$strategytag_id'>$strategytag_data</a>\";\n}\n\n$strategytag_img_tmp = ''.$strategytag_img_field;\nif(isset($row[$strategytag_img_tmp]) && strlen($strategytag_img_tmp) > 0){\n\t$strategytag_img_data = $row[$strategytag_img_tmp];\n\t$row[$strategytag_img_tmp] = \"<img width='200px' src='$strategytag_img_data'>\";\n}\n\n\n\n return $row;\n }", "title": "" }, { "docid": "d4611b6f8718c5cb4be11de8d0bb5945", "score": "0.45674685", "text": "public function fill_in_board_blanks()\n {\n for ($a = 1;$a <= 9;$a++) {\n if (!isset($this->board[$a])) {\n $this->board[$a] = [];\n }\n for ($b = 0;$b <= 8;$b++) {\n if (!isset($this->board[$a][$b])) {\n $this->board[$a][$b] = 0;\n }\n }\n ksort($this->board[$a]);\n }\n ksort($this->board);\n }", "title": "" }, { "docid": "3095b59fdbe952664a4f76aca3059d4b", "score": "0.456685", "text": "public function _build_row_by_post()\n {\n $row = [\n 'photo_datetime' => $this->_manage_handler->build_datetime_by_post('photo_datetime'),\n\n 'photo_id' => $this->_post_class->get_post_get_int('photo_id'),\n 'photo_time_create' => $this->_post_class->get_post_int('photo_time_create'),\n 'photo_time_update' => $this->_post_class->get_post_int('photo_time_update'),\n 'photo_cat_id' => $this->_post_class->get_post_int('photo_cat_id'),\n 'photo_gicon_id' => $this->_post_class->get_post_int('photo_gicon_id'),\n 'photo_uid' => $this->_post_class->get_post_int('photo_uid'),\n 'photo_title' => $this->_post_class->get_post_text('photo_title'),\n 'photo_place' => $this->_post_class->get_post_text('photo_place'),\n 'photo_equipment' => $this->_post_class->get_post_text('photo_equipment'),\n 'photo_file_url' => $this->_post_class->get_post_url('photo_file_url'),\n 'photo_file_path' => $this->_post_class->get_post_text('photo_file_path'),\n 'photo_file_name' => $this->_post_class->get_post_text('photo_file_name'),\n 'photo_file_ext' => $this->_post_class->get_post_text('photo_file_ext'),\n 'photo_file_mime' => $this->_post_class->get_post_text('photo_file_mime'),\n 'photo_file_medium' => $this->_post_class->get_post_text('photo_file_medium'),\n 'photo_file_size' => $this->_post_class->get_post_int('photo_file_size'),\n 'photo_cont_url' => $this->_post_class->get_post_url('photo_cont_url'),\n 'photo_cont_path' => $this->_post_class->get_post_text('photo_cont_path'),\n 'photo_cont_name' => $this->_post_class->get_post_text('photo_cont_name'),\n 'photo_cont_ext' => $this->_post_class->get_post_text('photo_cont_ext'),\n 'photo_cont_mime' => $this->_post_class->get_post_text('photo_cont_mime'),\n 'photo_cont_medium' => $this->_post_class->get_post_text('photo_cont_medium'),\n 'photo_cont_size' => $this->_post_class->get_post_int('photo_cont_size'),\n 'photo_cont_width' => $this->_post_class->get_post_int('photo_cont_width'),\n 'photo_cont_height' => $this->_post_class->get_post_int('photo_cont_height'),\n 'photo_cont_duration' => $this->_post_class->get_post_int('photo_cont_duration'),\n 'photo_middle_width' => $this->_post_class->get_post_int('photo_middle_width'),\n 'photo_middle_height' => $this->_post_class->get_post_int('photo_middle_height'),\n 'photo_thumb_url' => $this->_post_class->get_post_url('photo_thumb_url'),\n 'photo_thumb_path' => $this->_post_class->get_post_text('photo_thumb_path'),\n 'photo_thumb_name' => $this->_post_class->get_post_text('photo_thumb_name'),\n 'photo_thumb_ext' => $this->_post_class->get_post_text('photo_thumb_ext'),\n 'photo_thumb_mime' => $this->_post_class->get_post_text('photo_thumb_mime'),\n 'photo_thumb_medium' => $this->_post_class->get_post_text('photo_thumb_medium'),\n 'photo_thumb_size' => $this->_post_class->get_post_int('photo_thumb_size'),\n 'photo_thumb_width' => $this->_post_class->get_post_int('photo_thumb_width'),\n 'photo_thumb_height' => $this->_post_class->get_post_int('photo_thumb_height'),\n 'photo_gmap_latitude' => $this->_post_class->get_post_float('photo_gmap_latitude'),\n 'photo_gmap_longitude' => $this->_post_class->get_post_float('photo_gmap_longitude'),\n 'photo_gmap_zoom' => $this->_post_class->get_post_int('photo_gmap_zoom'),\n 'photo_gmap_type' => $this->_post_class->get_post_int('photo_gmap_type'),\n 'photo_perm_read' => $this->_post_class->get_post_text('photo_perm_read'),\n 'photo_status' => $this->_post_class->get_post_int('photo_status'),\n 'photo_hits' => $this->_post_class->get_post_int('photo_hits'),\n 'photo_description' => $this->_post_class->get_post_text('photo_description'),\n 'photo_cont_exif' => $this->_post_class->get_post_text('photo_cont_exif'),\n\n // 'photo_rating' => $this->_post_class->get_post_float( 'photo_rating' ),\n // 'photo_votes' => $this->_post_class->get_post_int( 'photo_votes' ),\n // 'photo_comments' => $this->_post_class->get_post_int( 'photo_comments' ),\n // 'photo_search' => $this->_post_class->get_post_text( 'photo_search' ),\n ];\n\n for ($i = 1; $i <= _C_WEBPHOTO_MAX_PHOTO_TEXT; ++$i) {\n $name = 'photo_text' . $i;\n $row[$name] = $this->_post_class->get_post_text($name);\n }\n\n return $row;\n }", "title": "" }, { "docid": "a2d1a06e4f9d2b84453fb4cb7a2a1bf1", "score": "0.45646912", "text": "public static function initNewShip($length, $col, $row)\n {\n $inst = new self();\n $coord = $inst->generateCoords($length, $col, $row);\n $inst->setCoordinates($coord);\n $inst->setLength($length);\n return $inst;\n }", "title": "" }, { "docid": "68787283697e951de253e120e00ce31b", "score": "0.45401558", "text": "public function GetContentArray($posts, $cols){\r\n\r\n\t$content_=array();\r\n\r\n for($i=0;$i<$cols;$i++){\r\n\r\n $previous_key=0;\r\n\r\n foreach ($posts as $k=>$post){\r\n\r\n if( $i==$k || ($k)==$previous_key+$cols){\r\n\r\n $content_[$i][]=$post;\r\n\r\n $previous_key=$k;\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\t\r\n\treturn $content_;\r\n\t}", "title": "" }, { "docid": "acd52f65895d3e8b76992ace92daf105", "score": "0.45395702", "text": "function rows_from_field_collection(&$vars, $field_name, $field_array)\n{\n $vars['rows'] = array();\n foreach($vars['element']['#items'] as $key => $item)\n {\n $entity_id = $item['value'];\n $entity = field_collection_item_load($entity_id);\n $wrapper = entity_metadata_wrapper('field_collection_item', $entity);\n $row = array();\n foreach($field_array as $field)\n {\n $row[$field] = $wrapper->$field->value();\n }\n $vars['rows'][] = $row;\n }\n}", "title": "" }, { "docid": "a2fc2c4973414af2d54d81dd9321432d", "score": "0.45363155", "text": "protected static function database3FilledIn(): array\n {\n return [\n ['Name', 'Gender', 'Age', 'Subject', 'Score'],\n ['Amy', 'Female', 10, 'Math', 0.63],\n ['Amy', 'Female', 10, 'English', 0.78],\n ['Amy', 'Female', 10, 'Science', 0.39],\n ['Bill', 'Male', 8, 'Math', 0.55],\n ['Bill', 'Male', 8, 'English', 0.71],\n ['Bill', 'Male', 8, 'Science', 0.51],\n ['Sam', 'Male', 9, 'Math', 0.39],\n ['Sam', 'Male', 9, 'English', 0.52],\n ['Sam', 'Male', 9, 'Science', 0.48],\n ['Tom', 'Male', 9, 'Math', 0.78],\n ['Tom', 'Male', 9, 'English', 0.69],\n ['Tom', 'Male', 9, 'Science', 0.65],\n ];\n }", "title": "" }, { "docid": "6c36fff7d7dee26d6c59b655dfb741c6", "score": "0.4535284", "text": "function load_2d_array($row, $load_links = false) {\n\t\tif ($row != NULL) {\n\t\t\t$this_table = $row[$this->_NAME];\n\t\t\tforeach ($this_table as $col=>$val) {\n\t\t\t\t$this->$col = $val;\n\t\t\t}\n\n\t\t\tif ($load_links) {\n\t\t\t\t$parents = db_utils::parents($this->_NAME);\n\t\t\t\tforeach ($parents as $child_column=>$parent) {\n\t\t\t\t\t$parent_dbo = new dbo($parent);\n\t\t\t\t\t$parent_dbo->load_array($row[$child_column]);\n\t\t\t\t\t$this->_LINKS[$child_column] = $parent_dbo;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "80d6ea6359268443d1287ebc54dcc0ab", "score": "0.45301992", "text": "function __construct($game_title, $game_rows, $game_columns, $game_number_of_boards, $game_randomize_word_list, $game_word_array) {\n\t\t\t$this->title = $game_title;\n\t\t\t$this->rows = $game_rows;\n\t\t\t$this->columns = $game_columns;\n\t\t\t$this->number_of_boards = $game_number_of_boards;\n\t\t\t$this->randomize_word_list = $game_randomize_word_list;\n\t\t\t$this->word_array = $game_word_array;\n\t\t}", "title": "" }, { "docid": "3be470c97093e638face254b4e667fcd", "score": "0.45160183", "text": "public function createGrid()\n\t{\n\t\t$this->getObjectsByCategory();\n\n\t\t// set the dimensions of the grid\n\t\t$this->setGridDimensions();\n\n\t\t// calculate the width of a column\n\t\t$col_width = $this->getColumnWidth();\n\n\t\t// create header with letters in it\n\t\t// add opening ul-tag\n\t\t$this->map_html .= '<ul class=\"map\">';\n\n\t\t// add li-elements\n\t\t$i = 1;\n\n\t\t// empty li-element as placeholder\n\t\t$this->map_html .= '<li class=\"map-x\" style=\"width: ' . $this->y_width . '%;\"></li>';\n\n\t\twhile ($i <= $this->col)\n\t\t{\n\t\t\t$this->map_html .= '<li class=\"map-x\" style=\"width: ' . $col_width . '%;\"><b>' . $this->numberToChar($i) . '</b></li>';\n\t\t\t$i++;\n\t\t}\n\n\t\t// add closing ul-tag\n\t\t$this->map_html .= '</ul>';\n\n\t\t// create the all columns for each row\n\n\t\t// create the rows / rows loop\n\t\tfor ($i = 1; $i <= $this->row; $i++)\n\t\t{\n\t\t\t// add the opening ul-tag for a row\n\t\t\t$this->map_html .= '<ul class=\"map\" id=\"map-row\">';\n\n\t\t\t// empty li element as placeholder\n\t\t\t$this->map_html .= '<li class=\"map-y\" style=\"width: ' . $this->y_width . '%;\"><b>' . $i . '</b></li>';\n\n\t\t\tfor ($col_count = 1; $col_count <= $this->col; $col_count++)\n\t\t\t{\n\t\t\t\t// if $nope is set to true the field on the map is empty. we set it to false on the end of the first if-statement in the object loop if we get no match for a database entry on the requested position\n\t\t\t\t$nope = true;\n\n\t\t\t\tforeach ($this->objects as $object)\n\t\t\t\t{\n\t\t\t\t\t// if the object is placed on the current position in the map\n\t\t\t\t\tif ( $object['pos_x'] == $i && $object['pos_y'] == $col_count )\n\t\t\t\t\t{\n\t\t\t\t\t\t// get the reservation data for this object if the object is reservated in the previous setted timeframe\n\t\t\t\t\t\t$reservation = $this->getReservationByObjectID($object['id']);\n\n\t\t\t\t\t\t// if object has a reservation\n\t\t\t\t\t\tif ( $reservation != false )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cell_class = 'closed';\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// the object is not reserved\n\t\t\t\t\t\t\t$cell_class = 'free';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// add a reserved object opening li-element\n\t\t\t\t\t\t$this->map_html .= '<li class=\"map map-cell ' . $cell_class . ' text-center\" id=\"map-col-' . $object['id'] . '\" style=\"width: ' . $col_width . '%; height: 100%;\">';\n\n\t\t\t\t\t\t// add hidden inputfields\n\t\t\t\t\t\t$this->map_html .= '<input type=\"hidden\" name=\"obj_id\" id=\"obj_id\" value=\"' . htmlspecialchars(json_encode($object)) . '\">';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $reservation == false )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$reservation = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->map_html .= '<input type=\"hidden\" name=\"res_id\" id=\"res_id\" value=\"' . htmlspecialchars(json_encode($reservation)) . '\">';\n\n\t\t\t\t\t\t// add information about the reservation/object to the li-element\n\t\t\t\t\t\tif ( $this->cell_content == null )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->map_html .= '<div><b>' . $this->numberToChar($col_count) . $i . '</b></div>';\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$this->map_html .= $this->cell_content;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// add a reserved object closing li-tag\n\t\t\t\t\t\t$this->map_html .= '</li>'; \n\n\t\t\t\t\t\t// a object/reservation was placed in the map so there is no need to add a empty field\n\t\t\t\t\t\t$nope = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if $nope is false at this location we had no hit for this x/y position in the database. that means the field is a empty field with no object in it\n\t\t\t\tif ($nope == true)\n\t\t\t\t{\n\t\t\t\t\t// we put an empty field on this position\n\t\t\t\t\t$this->map_html .= '<li class=\"map none\" id=\"map-col\" style=\"width: ' . $col_width . '%;\">';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// add the closing ul-tag\n\t\t\t$this->map_html .= '</ul>';\n\t\t}\n\t}", "title": "" }, { "docid": "6d5b392f7b40c8d7e65c1b44510ef0ee", "score": "0.4501875", "text": "public function createRandom($width, $height)\n {\n if (!is_int($width) || $width < 3) {\n throw new BoardException(\"Width must be an integer of 3 or more, $width provided\");\n }\n\n if (!is_int($height) || $height < 3) {\n throw new BoardException(\"Height must be an integer of 3 or more, $height provided\");\n }\n\n $grid = array();\n\n for ($i = 0; $i < $height; $i++) {\n $grid[] = $this->createRandomGridRow($width);\n }\n\n $this->grid = $grid;\n }", "title": "" }, { "docid": "d654bcb109e56a75f6957af85d54ea28", "score": "0.45012507", "text": "public static function create(array $data = null)\n {\n if ($data === null) {\n $data['board'] = [];\n\n for ($i = 0; $i < self::HEIGHT; $i++) {\n for ($j = 0; $j < self::WIDTH; $j++) {\n $data['board'][$i][$j] = self::NONE;\n }\n }\n\n $data['started'] = false;\n $data['current'] = self::WHITE;\n }\n\n return new self($data);\n }", "title": "" }, { "docid": "4acb585ac628b340b4cf613d7c44d84d", "score": "0.4484412", "text": "public function getArray()\n {\n $data = [];\n $sheet = $this->excel->getActiveSheet();\n $hrow = $sheet->getHighestRow();\n $hcol = $sheet->getHighestColumn();\n $hcoli = \\PHPExcel_Cell::columnIndexFromString($hcol);\n for ($r = 1; $r <= $hrow; $r++) {\n $dr = [];\n for ($c = 0; $c <= $hcoli; $c++) {\n $d = $sheet->getCellByColumnAndRow($c, $r)->getValue();\n array_push($dr, $d);\n }\n array_push($data, $dr);\n }\n return $data;\n }", "title": "" }, { "docid": "351500d2737c4c4fd2a86f3f92458708", "score": "0.44833574", "text": "function fill_from_above($array, $pivotCols, $pivotRows)\n\t\t{\n\t\t\t/* will choose the specified rows in the specified column and copy onto the cells below all the way down\n\t\t\t\t* until the next specified row is reached\n\t\t\t* */\n\t\t\t$cols_rows = Helper::count_col_row($array);\n\t\t\tif ($pivotCols == \"\") {\n\t\t\t\t$pivotCols = array(\"0\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$pivotCols = explode(\",\", $pivotCols);\n\t\t\t}\n\t\t\t\n\t\t\tif (gettype($pivotRows) == \"string\" && $pivotRows != \"\") {\n\t\t\t\t$pivotRows = explode(\",\", $pivotRows);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$pivotRows = array();\n\t\t\t\tforeach ($pivotCols as $col) {\n\t\t\t\t\tforeach ($array as $rowKey => $row) {\n\t\t\t\t\t\tif (trim($row[$col]) != \"\") {\n\t\t\t\t\t\t\t$pivotRows[] = $rowKey;\n\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// echop($pivotRows);\n\t\t\tforeach ($array as $rowKey => $row) {\n\t\t\t\tif (!(in_array($rowKey, $pivotRows))) {\n\t\t\t\t\tforeach ($row as $colKey => $cellValue) {\n\t\t\t\t\t\tif (in_array($colKey, $pivotCols)) {\n\t\t\t\t\t\t\t$array[$rowKey][$colKey] = $array[$rowKey - 1][$colKey];\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// echop($array);\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "9496fa270ccffe1fb8f916fe96d70608", "score": "0.44811466", "text": "protected function assign_array_2D(array $rows, bool $clear_if_empty = true): template\n\t{\n\t\tif(count($rows) > 0 || $clear_if_empty)\n\t\t{\n\t\t\t$template = clone $this;\n\t\t\t$this->template = \"\";\n\t\t\tforeach($rows as $row)\n\t\t\t{\n\t\t\t\t$tmp = clone $template;\n\t\t\t\t$tmp->assign_array_1D($row);\n\t\t\t\t$this->template .= $tmp->r_display();\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "296649b34de7a145e074cefff94f5550", "score": "0.4479285", "text": "public function asArray()\n {\n $board = $this->board;\n array_walk_recursive($board, function (&$position) {\n $position = $this->getSymbol($position);\n });\n return $board;\n }", "title": "" }, { "docid": "52209110a467174c344e3954de531558", "score": "0.44788274", "text": "public function seedGetArrayFields()\n\t{\n\t\t// Input, Expected\n\t\treturn array(\n\t\t\t\tarray('', array()),\n\t\t\t\tarray('foo', array('foo' => '')),\n\t\t\t\tarray('foo, gaga', array('foo' => '', 'gaga' => '')),\n\t\t);\n\t}", "title": "" }, { "docid": "1627025b3bd6b309f0aeeb5b9eb42bdc", "score": "0.4476775", "text": "protected function make($arr_columns){\n $this->arr_columns = $arr_columns;\n foreach ($this->data_query as $key_data => $value_data) {\n foreach ($value_data as $key_c_data => $value_c_data) {\n //Si la columna que viene dentro de los datos está dentro de $arr_columns\n //Modifica los datos de la query inicial con los valores de las constantes del array\n if(self::cin_array($key_c_data, $arr_columns)){\n $this->data_query[$key_data]->$key_c_data = $arr_columns[$key_c_data][$value_c_data]; \n }\n }\n }\n return $this->data_query;\n }", "title": "" }, { "docid": "38fd82920991d923d032bf873cb93e4e", "score": "0.44738626", "text": "private static function initClass()\n {\n $numOfColumns = Gallery::getNumOfColumns();\n for ($i=0; $i < $numOfColumns; $i++) { \n self::$_columnHeight[$i][$i] = PAD_TOP;\n for ($j=0; $j < $i+1; $j++) { \n self::$_columnHeight[$i][$j] = PAD_TOP;\n sort(self::$_columnHeight[$i]);\n }\n }\n }", "title": "" }, { "docid": "31e118a716d565d7e53fbecce487ca03", "score": "0.44703203", "text": "protected function newRow()\n\t{\n\t\t$row = [];\n\t\t$row['AssetCode'] = NULL;\n\t\t$row['ProvinceCode'] = NULL;\n\t\t$row['LACode'] = NULL;\n\t\t$row['DepartmentCode'] = NULL;\n\t\t$row['SectionCode'] = NULL;\n\t\t$row['AssetTypeCode'] = NULL;\n\t\t$row['Supplier'] = NULL;\n\t\t$row['PurchasePrice'] = NULL;\n\t\t$row['CurrencyCode'] = NULL;\n\t\t$row['ConditionCode'] = NULL;\n\t\t$row['DateOfPurchase'] = NULL;\n\t\t$row['AssetCapacity'] = NULL;\n\t\t$row['UnitOfMeasure'] = NULL;\n\t\t$row['AssetDescription'] = NULL;\n\t\t$row['DateOfLastRevaluation'] = NULL;\n\t\t$row['NewValue'] = NULL;\n\t\t$row['NameOfValuer'] = NULL;\n\t\t$row['BookValue'] = NULL;\n\t\t$row['LastDepreciationDate'] = NULL;\n\t\t$row['LastDepreciationAmount'] = NULL;\n\t\t$row['DepreciationRate'] = NULL;\n\t\t$row['CumulativeDepreciation'] = NULL;\n\t\t$row['AssetStatus'] = NULL;\n\t\t$row['LastUserID'] = NULL;\n\t\t$row['LastUpdated'] = NULL;\n\t\t$row['ScrapValue'] = NULL;\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "f3900f234ae102bcd82ed0e884cf4445", "score": "0.4452447", "text": "public function prepareLinearArrays()\n {\n $linear = [];\n for ($r = 0; $r < 9; $r++) {\n // Vertical Linear.\n $linear[] = $this->subArray($r, $r, 0, 8);\n\n // Horizontal Linear.\n $linear[] = $this->subArray(0, 8, $r, $r);\n\n if (($r % 3) === 0) {\n // Upper Small Square.\n $linear[] = $this->subArray($r, ($r + 2), 0, 2);\n\n // Middle Small Square.\n $linear[] = $this->subArray($r, ($r + 2), 3, 5);\n\n // Lower Small Square.\n $linear[] = $this->subArray($r, ($r + 2), 6, 8);\n }\n }\n\n return $linear;\n\n }", "title": "" }, { "docid": "d9b3b43bbcf1fbd8ff3256a8038c55f8", "score": "0.4448587", "text": "protected function initializeGrid(): void\n {\n // \n $this->grid = [];\n $this->generateCells();\n $this->generateMines();\n $this->setNeighbors();\n $this->setMinesCount();\n }", "title": "" }, { "docid": "742e3b7c68fb13e296db67dd6ddf3938", "score": "0.44462883", "text": "function Row($data)\r\n{\r\n\t$nb=0;\r\n\tfor($i=0;$i<count($data);$i++)\r\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n\t$h=5*$nb;\r\n\t//Issue a page break first if needed\r\n\t$this->CheckPageBreak($h);\r\n\t//Draw the cells of the row\r\n\tfor($i=0;$i<count($data);$i++)\r\n\t{\r\n\t\t$w=$this->widths[$i];\r\n\t\t//$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n $a=$this->aligns[$i];\r\n\t\t//Save the current position\r\n\t\t$x=$this->GetX();\r\n\t\t$y=$this->GetY();\r\n\t\t//Draw the border\r\n\t\t\r\n\t\t$this->Rect($x,$y,$w,$h);\r\n //$this->SetLineStyle(0);\r\n //$this->SetLineWidth($dash);\r\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n\t\t//Put the position to the right of the cell\r\n\t\t$this->SetXY($x+$w,$y);\r\n\t}\r\n\t//Go to the next line\r\n\t$this->Ln($h);\r\n}", "title": "" }, { "docid": "f07f8318a2c942a6edb0466cfd7cb715", "score": "0.44418305", "text": "public function getCoordinates()\n {\n return array(\n array(0, 0, new Box(5, 5), true),\n array(5, 15, new Box(5, 5), false),\n array(10, 23, new Box(10, 10), false),\n array(42, 30, new Box(50, 50), true),\n array(81, 16, new Box(50, 10), false),\n );\n }", "title": "" }, { "docid": "93edba98ae7e7900e459ca6ef75b88c6", "score": "0.4434478", "text": "public function toMatchingArray($colsArr) {\n $arr = array();\n //var_dump($colsArr);die();\n foreach ($colsArr as $key => $col) {\n $arr[] = $this->getCellArrayForPosition($col->getId());\n }\n return $arr;\n }", "title": "" }, { "docid": "2e88a11a083f3df59b6207b85b8ef0ee", "score": "0.44314018", "text": "public function rows()\n\t{\n\t\treturn array(\n\t\t\t'title' => 'field_limits_rows',\n\t\t\t'fields' => array(\n\t\t\t\t\"{$this->prefix}_rows\" => array(\n\t\t\t\t\t'type' => 'html',\n\t\t\t\t\t'content' => form_input(array(\n\t\t\t\t\t\t'id' => \"{$this->prefix}_rows\",\n\t\t\t\t\t\t'name' => \"{$this->prefix}_rows\",\n\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t'value' => isset($this->data['rows']) ? $this->data['rows'] : '',\n\t\t\t\t\t\t'placeholder' => lang('field_limits_rows')\n\t\t\t\t\t))\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "f02c6b2b28ccefe2338cbe52aaef57ea", "score": "0.4409812", "text": "function Row($data)\r\n{\r\n\t$nb=0;\r\n\tfor($i=0;$i<count($data);$i++)\r\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n\t$h=5*$nb;\r\n\t//Issue a page break first if needed\r\n\t$this->CheckPageBreak($h);\r\n\t//Draw the cells of the row\r\n\tfor($i=0;$i<count($data);$i++)\r\n\t{\r\n\t\t$w=$this->widths[$i];\r\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n\t\t//Save the current position\r\n\t\t$x=$this->GetX();\r\n\t\t$y=$this->GetY();\r\n\t\t//Draw the border\r\n\t\t\r\n\t\t$this->Rect($x,$y,$w,$h);\r\n\r\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n\t\t//Put the position to the right of the cell\r\n\t\t$this->SetXY($x+$w,$y);\r\n\t}\r\n\t//Go to the next line\r\n\t$this->Ln($h);\r\n}", "title": "" } ]
e44ae4314452e7bff993a25d4f2f9124
Gets query for [[CreatedBy0]].
[ { "docid": "d5861ea48f1c3850d3b2255deb5d100d", "score": "0.6788495", "text": "public function getCreatedBy0()\n {\n return $this->hasOne(User::className(), ['id' => 'createdBy']);\n }", "title": "" } ]
[ { "docid": "933d66f80f9d26b045e9edc7c28c90a3", "score": "0.649832", "text": "public function getCreatedBy();", "title": "" }, { "docid": "a1e0a18137579821c8466562037a3364", "score": "0.64826876", "text": "public function getCreatedBy()\n {\n return UserQuery::create()->findPk($this->createdby);\n }", "title": "" }, { "docid": "a5a8a50e561b18de619fa43854a594cc", "score": "0.6293686", "text": "public function getCreatedBy()\n {\n return $this->getUser($this->firstAudit);\n }", "title": "" }, { "docid": "65e2e98a21879299f93ab27ed15b103a", "score": "0.61279875", "text": "public function getCreatedBy(){\n return $this->CreatedBy;\n }", "title": "" }, { "docid": "5ddc002f86823c3470d2bfc467d2b2a0", "score": "0.6029372", "text": "public function getCreatedBy()\n\t{\n\t\treturn $this->{static::CREATED_BY};\n\t}", "title": "" }, { "docid": "accc43f677a4b648a1a502b7b0bdf836", "score": "0.6027966", "text": "function getCreatedBy() {\n if($this->created_by === false) {\n $created_by_id = $this->created_by_id;\n \n if($created_by_id) {\n $this->created_by = Users::findById($created_by_id);\n } else {\n $this->created_by = new AnonymousUser($this->created_by_name, $this->created_by_email);\n } // if\n } // if\n return $this->created_by;\n }", "title": "" }, { "docid": "2267efe9113044e7af7568bccf73706a", "score": "0.6026596", "text": "public function getIdentifiedBy0()\n {\n return $this->hasOne(User::className(), ['id' => 'identifiedBy']);\n }", "title": "" }, { "docid": "9dccfef267c96275d48bf1faf1877129", "score": "0.600088", "text": "public function getCreatedBy()\r\n {\r\n return $this->created_by;\r\n }", "title": "" }, { "docid": "411b1d1c20852dab933b2560ef8fb684", "score": "0.59590685", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "411b1d1c20852dab933b2560ef8fb684", "score": "0.59590685", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "411b1d1c20852dab933b2560ef8fb684", "score": "0.59590685", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "411b1d1c20852dab933b2560ef8fb684", "score": "0.59590685", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "f14799016cffaf43166d7c0a5e24222a", "score": "0.5946175", "text": "public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }", "title": "" }, { "docid": "f14799016cffaf43166d7c0a5e24222a", "score": "0.5946175", "text": "public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }", "title": "" }, { "docid": "f14799016cffaf43166d7c0a5e24222a", "score": "0.5946175", "text": "public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }", "title": "" }, { "docid": "f14799016cffaf43166d7c0a5e24222a", "score": "0.5946175", "text": "public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }", "title": "" }, { "docid": "f14799016cffaf43166d7c0a5e24222a", "score": "0.5946175", "text": "public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }", "title": "" }, { "docid": "67ff147f5d397a0b110d9d4b573695c6", "score": "0.5925134", "text": "public function getCreatedBy()\n {\n return $this->created_by;\n }", "title": "" }, { "docid": "53cb44c9c6927e8574a1713ea82d7bd5", "score": "0.58921283", "text": "public function getAuthor0()\n {\n return $this->hasOne(User::className(), ['id' => 'author']);\n }", "title": "" }, { "docid": "5e926d3a0cb8f86e7b2173beabfd95e0", "score": "0.5845354", "text": "public function getColumnCreatedBy(): string\n {\n return $this->getColumn('created_by', 'created_by');\n }", "title": "" }, { "docid": "9a93b010650d15f05111267ed7de515c", "score": "0.5842186", "text": "public function getCreatedBy() {\n return $this->createdBy;\n }", "title": "" }, { "docid": "9e6867d584d856d907c975aa62879225", "score": "0.579441", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::class, ['id' => 'created_by']);\n }", "title": "" }, { "docid": "46fbd44fe11b113ceeb7501599df77b8", "score": "0.5789653", "text": "public function getCreatedBy(): ?string\n {\n return $this->createdBy;\n }", "title": "" }, { "docid": "3fc738ae14626b91e450731f527d61d3", "score": "0.5788321", "text": "public function getCreatedBy()\n {\n if (array_key_exists(\"createdBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\UserIdentity\") || is_null($this->_propDict[\"createdBy\"])) {\n return $this->_propDict[\"createdBy\"];\n } else {\n $this->_propDict[\"createdBy\"] = new UserIdentity($this->_propDict[\"createdBy\"]);\n return $this->_propDict[\"createdBy\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "97accbad26a4e4e6db595a94d6d353bb", "score": "0.5784939", "text": "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "title": "" }, { "docid": "97accbad26a4e4e6db595a94d6d353bb", "score": "0.5784939", "text": "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "title": "" }, { "docid": "97accbad26a4e4e6db595a94d6d353bb", "score": "0.5784939", "text": "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "title": "" }, { "docid": "97accbad26a4e4e6db595a94d6d353bb", "score": "0.5784939", "text": "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "title": "" }, { "docid": "3dfbddbcfa2ba64a559e20c664a39c9b", "score": "0.57606274", "text": "public function _getCreatedBy() {\n\t\treturn $this->_createdBy;\n\t}", "title": "" }, { "docid": "cf8c1217fa9ad2a638271d100757b36a", "score": "0.57418615", "text": "public function getCreatedBy()\n {\n if (is_null($this->createdBy)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CREATED_BY);\n if (is_null($data)) {\n return null;\n }\n\n $this->createdBy = CreatedByModel::of($data);\n }\n\n return $this->createdBy;\n }", "title": "" }, { "docid": "cf8c1217fa9ad2a638271d100757b36a", "score": "0.57418615", "text": "public function getCreatedBy()\n {\n if (is_null($this->createdBy)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CREATED_BY);\n if (is_null($data)) {\n return null;\n }\n\n $this->createdBy = CreatedByModel::of($data);\n }\n\n return $this->createdBy;\n }", "title": "" }, { "docid": "cf8c1217fa9ad2a638271d100757b36a", "score": "0.57418615", "text": "public function getCreatedBy()\n {\n if (is_null($this->createdBy)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CREATED_BY);\n if (is_null($data)) {\n return null;\n }\n\n $this->createdBy = CreatedByModel::of($data);\n }\n\n return $this->createdBy;\n }", "title": "" }, { "docid": "cf8c1217fa9ad2a638271d100757b36a", "score": "0.57418615", "text": "public function getCreatedBy()\n {\n if (is_null($this->createdBy)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CREATED_BY);\n if (is_null($data)) {\n return null;\n }\n\n $this->createdBy = CreatedByModel::of($data);\n }\n\n return $this->createdBy;\n }", "title": "" }, { "docid": "4e0e344d20b6e75b70e7e09c850ed27d", "score": "0.57362443", "text": "public function createdBy();", "title": "" }, { "docid": "59a1b4aac1b2e1ec1877fb18de6e953b", "score": "0.57268167", "text": "public function getCreatedBy() {\n\t\treturn $this->createdBy;\n\t}", "title": "" }, { "docid": "bcf1dfb172f00559268c685576794f40", "score": "0.56996024", "text": "public function getCreatedBy()\n {\n if (class_exists('\\wdmg\\users\\models\\Users'))\n return $this->hasOne(\\wdmg\\users\\models\\Users::class, ['id' => 'created_by']);\n else\n return $this->created_by;\n }", "title": "" }, { "docid": "c5100ed06d6aca5a56c6af5547e8c96e", "score": "0.564519", "text": "function get_by_creator($owner_id)\n {\n $this->db->where('creator_id', $owner_id);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "8129a96fa490b494100c7292f999ee70", "score": "0.56384325", "text": "public function getUpdatedBy0()\n {\n return $this->hasOne(User::className(), ['id' => 'updatedBy']);\n }", "title": "" }, { "docid": "8129a96fa490b494100c7292f999ee70", "score": "0.56384325", "text": "public function getUpdatedBy0()\n {\n return $this->hasOne(User::className(), ['id' => 'updatedBy']);\n }", "title": "" }, { "docid": "8e9ad4f713a31245b3ea9adf1653b558", "score": "0.561866", "text": "public function getUser0()\n {\n return $this->hasOne(User::className(), ['id' => 'user']);\n }", "title": "" }, { "docid": "1b62b169591c303442774cc366fc6d21", "score": "0.56126726", "text": "public function getAuthor0()\n {\n return $this->hasOne(Author::className(), ['id' => 'author_id']);\n }", "title": "" }, { "docid": "749a3b053cd0f413f619887e5c33471c", "score": "0.56123203", "text": "public function getCreatedBy()\n {\n if (array_key_exists(\"createdBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\IdentitySet\") || is_null($this->_propDict[\"createdBy\"])) {\n return $this->_propDict[\"createdBy\"];\n } else {\n $this->_propDict[\"createdBy\"] = new IdentitySet($this->_propDict[\"createdBy\"]);\n return $this->_propDict[\"createdBy\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "749a3b053cd0f413f619887e5c33471c", "score": "0.56123203", "text": "public function getCreatedBy()\n {\n if (array_key_exists(\"createdBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\IdentitySet\") || is_null($this->_propDict[\"createdBy\"])) {\n return $this->_propDict[\"createdBy\"];\n } else {\n $this->_propDict[\"createdBy\"] = new IdentitySet($this->_propDict[\"createdBy\"]);\n return $this->_propDict[\"createdBy\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "47305add55730d10fdc71a51a55aa873", "score": "0.560823", "text": "public function getQuestionCreatedBy();", "title": "" }, { "docid": "36df222a071bc38a7b4a8c65509c4dd9", "score": "0.56077486", "text": "public function getCreatedByUserName()\n {\n return $this->author ? $this->author->getUsername() : null;\n }", "title": "" }, { "docid": "098b96aceb60beff6c6d86361323792a", "score": "0.55907893", "text": "public static function scopeUserDefined()\n {\n return self::whereNotNull('created_by');\n }", "title": "" }, { "docid": "1b52d602b2403a30ac34fba46a8b17a7", "score": "0.5582906", "text": "public function getOwnerUsername(){\n \treturn User::where('id',$this->created_by)->first()->username;\n }", "title": "" }, { "docid": "ed88da893cb138d8c20ac1602e32115c", "score": "0.5566959", "text": "public function getAboutMeCreatedBy()\r\n {\r\n return $this->about_me_created_by;\r\n }", "title": "" }, { "docid": "70b4a82773db10a57920576149046c84", "score": "0.5544766", "text": "public function getClient(): ActiveQuery\n {\n return $this->hasOne(User::className(), ['id' => 'client_id']);\n }", "title": "" }, { "docid": "9cc6d7c7a475e1a1ba233b6768d538a6", "score": "0.5543754", "text": "public function getAddressee0(): ActiveQuery\n {\n return $this->hasOne(User::className(), ['id' => 'addressee']);\n }", "title": "" }, { "docid": "f5f06a77ba760ae64a76db041fb63fab", "score": "0.55178183", "text": "protected function getLastUserQuery() {\n return Doctrine_Query::create()\n ->from('sfGuardUserProfile p')\n ->leftJoin('p.sfGuardUser u')\n ->leftJoin('p.Agency a')\n ->orderBy('u.created_at DESC')\n ->limit(10);\n }", "title": "" }, { "docid": "453539594ac516d4852e2ce5a20da333", "score": "0.54927075", "text": "public function getOwner()\n {\n return User::find()->where(['id' => $this->user_id]);\n }", "title": "" }, { "docid": "a9f4e04e70bd6aaf9414007c2d6d862b", "score": "0.5487018", "text": "public function getFkuser0() {\n return $this->hasOne(User::className(), ['id' => 'fkuser']);\n }", "title": "" }, { "docid": "5186543d9f48feb67f487ea5f0fedb62", "score": "0.5452776", "text": "public function setCreatedBy($CreatedBy){\n $this->CreatedBy = $CreatedBy;\n\n return $this;\n }", "title": "" }, { "docid": "ee20015eb65c90c66805c45e36e02a42", "score": "0.5424057", "text": "public function getCreatedBy(): ?UserInterface\n {\n return $this->createdBy;\n }", "title": "" }, { "docid": "9c3845d66bef7c956aa77f67fcd657c1", "score": "0.5380014", "text": "public function getAuthorName()\n {\n return $this->getCreatedById() ? $this->getCreatedBy()->getName() : null;\n }", "title": "" }, { "docid": "43ed85b072e05cf5b07bbd92609f85ac", "score": "0.53744215", "text": "public function getCreatedBy(): ?string {\n $val = $this->getBackingStore()->get('createdBy');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'createdBy'\");\n }", "title": "" }, { "docid": "74f00c976e2797683b30fd0371389240", "score": "0.5363721", "text": "public function testFindCreatedByOnly()\n {\n $behavior = $this->Model->behaviors()->get('WhoDidIt');\n\n $behavior->setConfig('modified_by', false);\n\n $data = $this->Model->get(1);\n\n $this->assertEquals(8, count($data->createdBy->toArray()));\n $this->assertNull($data->modifiedBy);\n\n $behavior->setConfig('modified_by', 'modified_by');\n }", "title": "" }, { "docid": "66b1761735e5c63e601cdacdb1879cd3", "score": "0.5356355", "text": "function setCreatedBy($value) {\n if($value === null) {\n $this->created_by_id = 0;\n $this->created_by_name = '';\n $this->created_by_email = '';\n } elseif(instance_of($value, 'User')) {\n $this->created_by_id = $value->getId();\n $this->created_by_name = $value->getDisplayName();\n $this->created_by_email = $value->getEmail();\n } elseif(instance_of($value, 'AnonymousUser')) {\n $this->created_by_id = 0;\n $this->created_by_name = $value->getName();\n $this->created_by_email = $value->getEmail();\n } // if\n }", "title": "" }, { "docid": "a2f5477e41917158d35cbb7647a10e06", "score": "0.53408974", "text": "public function query()\n {\n if (\\Auth::user()->username==\"superadmin\") {\n $query = Users::with(['role_client','outlet'])->select('*');\n }else{\n $query = Users::with(['role_client','outlet'])\n ->where('id_client',\\Auth::user()->id_client)\n ->select('*');\n }\n\n return $this->applyScopes($query);\n }", "title": "" }, { "docid": "0a4387b1fcc4f68f33b1044fd3f6bc48", "score": "0.5325052", "text": "public function getClient(): ActiveQuery\n {\n return $this->hasOne(Users::class, ['id' => 'client_id']);\n }", "title": "" }, { "docid": "4c1a3e41653fa370862d39ae16b3a7c4", "score": "0.53244513", "text": "public function creator()\n\t{\n\t\treturn User::find($this->getCreatedBy());\n\t}", "title": "" }, { "docid": "7ea6b9b7279370ebab83f2440c725ba5", "score": "0.5295056", "text": "public function getAutor0()\n {\n return $this->hasOne(User::className(), ['id' => 'autor']);\n }", "title": "" }, { "docid": "9821cf2d8841fcb02aaff4f4a2ae6fa9", "score": "0.52890915", "text": "public function query()\n {\n return User::query();\n }", "title": "" }, { "docid": "60df3db6f4aaace8732fbe06e77992ef", "score": "0.52862006", "text": "public function by() {\n if (!property_exists($this, 'by')) {\n throw new PropertyException(\"Item does not have 'by' property.\");\n }\n return $this->client->user($this->by);\n }", "title": "" }, { "docid": "d59ce8faaece012bfe71620fce68b431", "score": "0.52499735", "text": "public function getIdUsers0()\n {\n return $this->hasMany(User::className(), ['IdUser' => 'IdUser'])->viaTable('m_mengetahui', ['IdDoc' => 'IdDoc']);\n }", "title": "" }, { "docid": "545e081784129cd88013742519ce18ed", "score": "0.52414995", "text": "public function firstAuthor()\n {\n $query = 'select uname, player_id from players \n\t\t\tleft join account_players on _player_id = player_id \n\t\t\tleft join account_news on account_news._account_id = account_players._account_id \n\t\t\twhere _news_id = :id limit 1';\n return !$this->id ? null : query_row($query, [':id'=>[$this->id, \\PDO::PARAM_INT]]);\n }", "title": "" }, { "docid": "446876c708ccf63b802acb10128762f7", "score": "0.5223378", "text": "public function getAuthorId()\n {\n $senderEmail = $this->getAuthorEmail();\n \n //start search\n $userSearch = new Warecorp_User_Search();\n return $userSearch->searchByEmail($senderEmail);\n }", "title": "" }, { "docid": "09cebed3ed59516d1d798947a892b82e", "score": "0.5212843", "text": "public function getRawUserQuery()\n {\n return $this->arrayAccessor->get('q');\n }", "title": "" }, { "docid": "0afb51073c900ff56681b34d33c07070", "score": "0.5207118", "text": "public function getUserCreated()\n {\n return $this->hasOne(User::class, ['id' => 'created_by']);\n }", "title": "" }, { "docid": "0afb51073c900ff56681b34d33c07070", "score": "0.5207118", "text": "public function getUserCreated()\n {\n return $this->hasOne(User::class, ['id' => 'created_by']);\n }", "title": "" }, { "docid": "e9c11d326c4697c7178f9de0f7efc8df", "score": "0.5197232", "text": "public function getCreateBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "f8c74915b3e0c5aedc71f671a9ccb649", "score": "0.51966864", "text": "function getUserById($id){\n\n $query = $this->query()->select()->where([\"id_usuario\" => $id])->all();\n\n return $query;\n }", "title": "" }, { "docid": "3a969842b304c26183bd0df27448d8f7", "score": "0.5195074", "text": "public function userWithIdAs0Get()\n {\n $ostObj = $this->instantiateOSTKYCSDKForV2Api();\n $userService = $ostObj->services->user;\n $params = array();\n $params['id'] = '0';\n $response = $userService->get($params)->wait();\n $this->isFaliureResponse($response);\n }", "title": "" }, { "docid": "8e5ff353d0efac4c5c19d96f37ece8c1", "score": "0.5194356", "text": "public function getUserEntity();", "title": "" }, { "docid": "25cb73c75bebd867bdf247e3233e7655", "score": "0.518604", "text": "public function getCreatedBy()\n\t{\n\t\t$callback = Module::getInstance()->userRelationCallback;\n\t\tif (!is_callable($callback)) {\n\t\t\t$msg = Yii::t('app', 'No or invalid `userRelationCallback` specified in Module config');\n\t\t\tthrow new InvalidCallException($msg);\n\t\t}\n\n\t\treturn call_user_func($callback, $this, 'created_by');\n\t}", "title": "" }, { "docid": "25cb73c75bebd867bdf247e3233e7655", "score": "0.518604", "text": "public function getCreatedBy()\n\t{\n\t\t$callback = Module::getInstance()->userRelationCallback;\n\t\tif (!is_callable($callback)) {\n\t\t\t$msg = Yii::t('app', 'No or invalid `userRelationCallback` specified in Module config');\n\t\t\tthrow new InvalidCallException($msg);\n\t\t}\n\n\t\treturn call_user_func($callback, $this, 'created_by');\n\t}", "title": "" }, { "docid": "80374523e10697f03e4ebe36719b8d6e", "score": "0.51823044", "text": "public function getIdUsuario0() {\n return $this->hasOne(Usuario::className(), ['idUsuario' => 'idUsuario']);\n }", "title": "" }, { "docid": "d5a142e6d8123bf46e653d028904944b", "score": "0.5179258", "text": "protected function createQuery()\r\n {\r\n $query = new QueryBuilder($this->getEntityManager());\r\n $query->from($this->getEntityName(), 'u')\r\n \t->select('u');\r\n\r\n if ($this->getCaseSensitive()) {\r\n $query->where('u.' . $this->getIdentityColumn() . ' = :identity')\r\n \t->setParameter('identity', $this->getIdentity());\r\n } else {\r\n $query->where('TRIM(LOWER(u.' . $this->getIdentityColumn() . ')) = :identity')\r\n \t->setParameter('identity', trim(strtolower($this->getIdentity())));\r\n }\r\n\r\n return $query;\r\n }", "title": "" }, { "docid": "bc59ec7a393f6eb24e405f4ca9e10a30", "score": "0.51779145", "text": "public function createdUser(){\n return $this->hasOne('App\\Models\\User', 'id', 'created_by')->select(['slack', 'fullname', 'email', 'user_code']);\n }", "title": "" }, { "docid": "e701022adb2f1b680ccf184127939dad", "score": "0.51747775", "text": "public function query()\n {\n $query = User::query();\n\n return $this->applyScopes($query);\n }", "title": "" }, { "docid": "d02f7b8e4d00499537ab55580d02689b", "score": "0.5161185", "text": "public function getOwner(){\n $user = Criteria::create(User::dao())\n ->add(Expression::eq('account.id', $this->getId()))\n ->setLimit(1)\n ->getList();\n $user = reset($user);\n if (!$user){\n throw new ObjectNotFoundException('no owner for account '.$this->getId());\n }\n return $user;\n }", "title": "" }, { "docid": "7ea2e602fb910bd70a35784da4e30381", "score": "0.51599187", "text": "protected function filterByUser()\n {\n $this->crud->addClause('where', 'user_id', '=', $this->currentUser->id);\n }", "title": "" }, { "docid": "ea13703bbcc3dab74fd88e5e608de532", "score": "0.5157951", "text": "public function getIdUsuario0()\n {\n return $this->hasOne(Usuario::className(), ['idUsuario' => 'idUsuario']);\n }", "title": "" }, { "docid": "a7d1aaab1811322badf5c2480a651cc9", "score": "0.5141937", "text": "public function scopeBy($query, $owner)\n {\n return $query->where('user_id', $owner);\n }", "title": "" }, { "docid": "7da733c7f7b23796a7625a3b5afd40d6", "score": "0.5136004", "text": "public function query() {\n\t\tglobal $wpdb;\n\n\t\t$query = \"SELECT display_name, user_email FROM $wpdb->users u WHERE u.ID IN (SELECT DISTINCT post_author FROM $wpdb->posts p JOIN $wpdb->term_relationships tr ON tr.object_id = p.ID WHERE p.post_status = 'publish' AND p.post_type = 'post' AND p.post_date > '2020-03-01' AND tr.term_taxonomy_id = 7 )\";\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "df08d415e85827b854ca8c529f8026ad", "score": "0.51316696", "text": "public function setCreatedBy($createdBy=null){\n\t\t$this->createdBy = $createdBy;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "def9e5394de3c5a0fcdd671eaab7b044", "score": "0.51315624", "text": "function filterByOwner($user_id);", "title": "" }, { "docid": "366283a37245881f58c6b62b3eba4ebf", "score": "0.51268405", "text": "function getUser()\n\t{\n\t\t// $query = $this->db->get_where('customer',array('id' => $id));\n\t\t// return $query->row(0,'User');\n\t}", "title": "" }, { "docid": "89e59ee66318d2702da1fffb19b8d5fd", "score": "0.51213783", "text": "public function thatICanView()\n\t{\n\t\treturn $this->whereEquals('owner_id', User::get('id'), 1)\n\t\t\t->orWhereEquals('owner_id', 0, 1)\n\t\t\t->orWhereRaw('owner_id IS NULL', [], 1);\n\t}", "title": "" }, { "docid": "d3eb173091114a21f6a814bd11bc6a86", "score": "0.51177055", "text": "public function getCreatedById()\n {\n return $this->getUserId($this->firstAudit);\n }", "title": "" }, { "docid": "b029cd398db40fb6d8f53ca43ecd4672", "score": "0.5117614", "text": "public function creator()\n\t{\n\t\treturn $this->belongsToOne('Hubzero\\User\\User', 'created_by');\n\t}", "title": "" }, { "docid": "90a3956bb17bb722b97eb31f77331551", "score": "0.5115455", "text": "protected function getUserQuery()\n {\n $query = Membership::getSpaceMembersQuery($this->space)->visible();\n $query->limit($this->maxMembers);\n $query->orderBy(new Expression('FIELD(space_membership.group_id, \"' . Space::USERGROUP_OWNER . '\", \"' . Space::USERGROUP_MODERATOR . '\", \"' . Space::USERGROUP_MEMBER . '\")'));\n return $query;\n }", "title": "" }, { "docid": "9f592b4e62f007dd09cfb0a69a830686", "score": "0.5112304", "text": "public function queryByOwner(User $user = null): QueryBuilder\n {\n $queryBuilder = $this->queryAll();\n\n if (!is_null($user)) {\n $queryBuilder->andWhere('pr.author= :author')\n -> setParameter('author', $user);\n }\n\n return $queryBuilder;\n }", "title": "" }, { "docid": "74af05dc78ad007c55171b8ecac4c919", "score": "0.5093859", "text": "public function getCreatedByColumn()\n\t{\n\t\treturn static::CREATED_BY;\n\t}", "title": "" }, { "docid": "b2c1a256462fa075f2fef736a902b9b9", "score": "0.5086837", "text": "public function scopeForUser($query, $userId = null)\n {\n return $query->where('user_id', $userId ?? \\Auth::id());\n }", "title": "" }, { "docid": "200ca78a38aec146847295ba4247b489", "score": "0.5077049", "text": "public function getCreatorUser($parameters = [])\n {\n $this->setQuery($parameters);\n\n return $this->get('getCreatorUser');\n }", "title": "" }, { "docid": "4847e654d9555426ee3d7c6411f4d161", "score": "0.50767255", "text": "public function scopeOwnedByMe($query)\n {\n return $query->where('user_id', '=', Auth::id());\n }", "title": "" }, { "docid": "c240863e146b20196ef62cfb875bb4ee", "score": "0.50743854", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id'])->andOnCondition(['user.id' => Yii::$app->user->id]);\n }", "title": "" } ]
9fa5b3273cf6ba918c73d4f505daec5f
A char popCharacter() method that pops and returns the character at the top of the stack instance variable.
[ { "docid": "d00a839f3f5cf34463cc146d61cbd717", "score": "0.860893", "text": "public function popCharacter(){\n\n $valor = array_shift($this->stack);\n return $valor;\n }", "title": "" } ]
[ { "docid": "fdeffb7683b2e1a156953c22f3c61740", "score": "0.7311154", "text": "public function pop() {\n return array_shift($this->_stack);\n }", "title": "" }, { "docid": "9cda4fd46f367936bfd1d5d1df6ad48e", "score": "0.7206975", "text": "public function pop():string\n {\n if ($this->isEmpty())\n {\n throw new UnderflowException('Stack is unfortunately empty');\n }\n else\n {\n return array_pop($this->stack);\n }\n }", "title": "" }, { "docid": "0a9c71ea991b29aaa819dc472d79a53d", "score": "0.7002617", "text": "private function pop()\n\t{\n\t\treturn array_pop($this->stack);\n\t}", "title": "" }, { "docid": "002b67b87fb6065b236abe28b2f2a189", "score": "0.69441396", "text": "public function pop(){\n if($this->isEmpty()) { echo \"stack is empty...!,you can't perform pop operation\";}\n else { return array_shift($this->stack);}\n }", "title": "" }, { "docid": "b31a90f38eb1e8bff7d2c550f2a6eb4c", "score": "0.6838452", "text": "public function pop()\n {\n return array_pop($this->stack);\n }", "title": "" }, { "docid": "b92598ac0a02351e8f785bbedcfe9623", "score": "0.6596132", "text": "protected function pop(): RegExParserStackElement {\n return $this->internalStack->pop();\n }", "title": "" }, { "docid": "1699267b4f434bf7c54742ce88d30b0d", "score": "0.65226537", "text": "public function pop()\n\t{\n\t\tif(!isset($this->stack[ $this->position ]))\n\t\t{\n\t\t\tthrow new StackEmptyException();\n\t\t}\n\n\t\t$val = $this->stack[ $this->position ];\n\t\tunset($this->stack[$this->position ]);\n\n\t\t$this->position--;\n\n\t\treturn $val;\n\t}", "title": "" }, { "docid": "9a0cbb4c561bdc38f60a66d8b0f75cd4", "score": "0.64739853", "text": "public function pop () {\n\t\t#/opt/haxe/std/haxe/ds/GenericStack.hx:131: characters 3-16\n\t\t$k = $this->head;\n\t\t#/opt/haxe/std/haxe/ds/GenericStack.hx:132: lines 132-137\n\t\tif ($k === null) {\n\t\t\t#/opt/haxe/std/haxe/ds/GenericStack.hx:133: characters 4-15\n\t\t\treturn null;\n\t\t} else {\n\t\t\t#/opt/haxe/std/haxe/ds/GenericStack.hx:135: characters 4-17\n\t\t\t$this->head = $k->next;\n\t\t\t#/opt/haxe/std/haxe/ds/GenericStack.hx:136: characters 4-16\n\t\t\treturn $k->elt;\n\t\t}\n\t}", "title": "" }, { "docid": "1c82e607300f82a29324e59e757840eb", "score": "0.6434138", "text": "public function pop()\n\t{\n\t\tif($this->_c)\n\t\t{\n\t\t\t--$this->_c;\n\t\t\treturn array_pop($this->_d);\n\t\t}\n\t\telse\n\t\t\tthrow new CException(Yii::t('yii','The stack is empty.'));\n\t}", "title": "" }, { "docid": "26b79450dfb1504e74e16693230bb269", "score": "0.6428794", "text": "public function pop()\n {\n return array_pop($this->_object_stack);\n }", "title": "" }, { "docid": "57ed8deeb977bdbbe79b701e87dd7fd3", "score": "0.63811564", "text": "public function pop()\n {\n $size=sizeof($this->stack);\n if ($size<=0) {\n throw new RunTimeException('Stack is empty........');\n } else {\n return array_shift($this->stack);\n }\n }", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "4d35af8e77d9dcdfad27b3e76d991c29", "score": "0.6277583", "text": "public function pop();", "title": "" }, { "docid": "c567216237fd4322def980b165a5043a", "score": "0.62002677", "text": "public function pop()\n {\n if ($this->isEmpty()) {\n throw new StackEmptyException();\n }\n\n return array_pop($this->stack);\n }", "title": "" }, { "docid": "db5ae2e45dc91263cd437e662605fff1", "score": "0.6196101", "text": "public function testPopStack()\n {\n $stack = new Stack();\n $stack->push('First');\n $stack->push('Second');\n $stack->push('Third');\n\n $this->assertEquals('Third', $stack->pop());\n $this->assertEquals(2, $stack->size());\n }", "title": "" }, { "docid": "c3ca449db080105c1022c171996e41b0", "score": "0.6159626", "text": "public function pop()\n {\n $size=sizeof($this->stack);\n if ($size<=0) {\n throw new RunTimeException('Stack is empty........');\n } else {\n return array_pop($this->stack);\n }\n }", "title": "" }, { "docid": "7df7e89aa4abc6f82766bc506517c8c2", "score": "0.6121037", "text": "public function pop() {}", "title": "" }, { "docid": "7df7e89aa4abc6f82766bc506517c8c2", "score": "0.6121037", "text": "public function pop() {}", "title": "" }, { "docid": "7df7e89aa4abc6f82766bc506517c8c2", "score": "0.6121037", "text": "public function pop() {}", "title": "" }, { "docid": "7df7e89aa4abc6f82766bc506517c8c2", "score": "0.6121037", "text": "public function pop() {}", "title": "" }, { "docid": "d078154ed11bbef8c2bf00ba723a79b7", "score": "0.6119943", "text": "public function top(): string\n {\n return end($this->stack);\n }", "title": "" }, { "docid": "ba26d557f6c350615618b41cf7e986e9", "score": "0.6107937", "text": "public function dequeueCharacter(){\n $valor = array_shift($this->queue);\n return $valor;\n }", "title": "" }, { "docid": "03cf4e356ed42fb4cf6d894385fa09f2", "score": "0.60959315", "text": "public function pop(): mixed;", "title": "" }, { "docid": "e24b67dfeb6778cf13646d1b9b127125", "score": "0.6094598", "text": "public function popd();", "title": "" }, { "docid": "b8d1620f581a0c566fed328dd64cc9f2", "score": "0.6072634", "text": "public function pop(): void;", "title": "" }, { "docid": "57803670505c930c1c522d73cc2cf0ce", "score": "0.60320836", "text": "private function top()\n\t{\n\t\treturn $this->stack[count($this->stack) - 1];\n\t}", "title": "" }, { "docid": "d89134cbdf4ff4f07dedc9fd486d0c28", "score": "0.59957075", "text": "public function pop() {\n\t\t$messages = $this->session[\"messages\"] ?? [];\n\t\t$message = array_pop($messages);\n\t\t$this->session[\"messages\"] = $messages;\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "801fffd279c61adbc8d1c877a430b482", "score": "0.595817", "text": "public function popBack(): mixed {}", "title": "" }, { "docid": "15883b81ae2e848964625341e6edb4d4", "score": "0.59386325", "text": "public function popFront(): mixed {}", "title": "" }, { "docid": "d344735573204c4be8fb676d7437fde6", "score": "0.5922576", "text": "public function s_pop()\n {\n if ($this->size == 0) {\n throw new Exception('Stack is empty.');\n }\n\n return $this->s_dequeue();\n\n }", "title": "" }, { "docid": "fe6ce2040325b257e5379ce24898a054", "score": "0.5869756", "text": "public function pop(): string\n {\n if ($this->isOn()) {\n return \"Started popping. Pop pop pop!\";\n } else {\n throw new \\Exception(\"It's not on! No popping...\");\n }\n }", "title": "" }, { "docid": "3f02116df38b9bf5f22f3ea45274fe4c", "score": "0.58413005", "text": "public function pop()\n {\n return array_pop($this->frames);\n }", "title": "" }, { "docid": "d8e8e459f5ef0adcf883e7676cc92c11", "score": "0.5832432", "text": "public function peek() {\n return $this->_stack[0];\n }", "title": "" }, { "docid": "20fc05d53a4977506ba35e13c88695c6", "score": "0.5829325", "text": "protected function _pop()\n\t{\n\t\t$targetRegister = $this->_getTargetRegister();\n\t\ttry {\n\t\t\t$value = $this->_stack->pop();\n\t\t\t$this->_setRegister($targetRegister, $value);\n\t\t} catch (\\RuntimeException $e) {\n\t\t\tprintf(\"ERROR - The stack is empty.\\n\");\n\t\t\t$this->_halt();\n\t\t}\n\t}", "title": "" }, { "docid": "41bd8e7702e1995617dbccf2e3ccff30", "score": "0.58273804", "text": "public function peek() {\n $c = $this->getc();\n $this->ungetc();\n return $c;\n }", "title": "" }, { "docid": "d6d22eaecd7da75fc850e8685d0c5c91", "score": "0.5811083", "text": "public function Pop() {\n $Value = array_pop($this->Elements);\n \\end($this->Elements);\n return $Value;\n }", "title": "" }, { "docid": "30c324baa91ff140f6926513dfb73329", "score": "0.5806374", "text": "public function pop()\r\n\t{\r\n\t\tif ($this->done())\r\n\t\t{\r\n\t\t\tthrow new parser_exception('Already at the end of tokens.');\r\n\t\t}\r\n\r\n\t\treturn array_shift($this->tokens);\r\n\t}", "title": "" }, { "docid": "003cd0d03da1679767e6113bcc67ac0b", "score": "0.57944685", "text": "public function pop() {\n return array_pop($this->elements);\n }", "title": "" }, { "docid": "475f04c362a6c80410ac665fc3ba9812", "score": "0.5791042", "text": "function pop($index=-1) {\n $x = $this[$index];\n unset($this[$index]);\n return $x;\n}", "title": "" }, { "docid": "0dae44b2d7e2ce9a872b787d53181092", "score": "0.5780572", "text": "public function pop()\n {\n return \\array_pop($this->groupStacksRef);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.5675452", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.5675452", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "0b800d2e2caaeeebe998c04af281b3bd", "score": "0.566579", "text": "public static function pop()\n {\n self::$registry = array_pop(self::$regstack);\n assert(!is_null(self::$registry)); //stack underflow??\n }", "title": "" }, { "docid": "ef655a2b4c07c3e4d6c14f3dae1b78dd", "score": "0.5663689", "text": "public function pop()\n\t{\n\t\tif($this->count() == 0)\n {\n\t\t\treturn null;\n\t\t}\n\t\t$ret = $this->getLast();\n\t\t$lastKey = $this->getInternalIterator()->key();\n\t\t$this->offsetUnset((string)$lastKey);\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "617378e650218d8ad6c5f31d0807f32f", "score": "0.5655242", "text": "public function peek(){\n return current($this->stack);\n }", "title": "" }, { "docid": "d8c7b479c94a5736714b21a49e9a9fd4", "score": "0.56525445", "text": "public function lastCharacter(): string {\n return $this->lastChar;\n }", "title": "" }, { "docid": "39b326bc32eae1e1a11d61413428049b", "score": "0.56444776", "text": "function bbcode_array_pop(&$stack) {\n $arrSize = count($stack);\n $x = 1;\n while(list($key, $val) = each($stack))\n {\n if($x < count($stack))\n {\n\t \t\t$tmpArr[] = $val;\n }\n else\n {\n\t \t\t$return_val = $val;\n }\n $x++;\n }\n $stack = $tmpArr;\n\n return($return_val);\n}", "title": "" }, { "docid": "61340dd75d1148d70f6dd115b9d45d2b", "score": "0.56158423", "text": "public function pop() {\n $retval = $this->top();\n $this->tail = $this->tail->prev;\n if ($this->tail !== null) {\n $this->tail->next = null;\n }\n --$this->count;\n return $retval;\n }", "title": "" }, { "docid": "7117959e68fa89e086ec6b2d54593004", "score": "0.5598724", "text": "public function pop ()\n {\n if ( !$this->rewound ) {\n $this->inner->rewind();\n $this->rewound = TRUE;\n }\n else {\n $this->inner->next();\n }\n\n return $this->inner->valid() ? $this->inner->current() : NULL;\n }", "title": "" }, { "docid": "ba45505cb98a14c33a7247467624aed7", "score": "0.5575189", "text": "public function pop()\n {\n return array_pop($this->itens);\n }", "title": "" }, { "docid": "ce120b2d29c7a3002f0963b130103e13", "score": "0.5557408", "text": "public function Pop()\n\t{\n\t\tassert($this->idx > 0);\n\t\tlist($ms, $s) = explode(' ', microtime());\n\t\t$etime\t\t= floor($ms * 1000) + (1000 * $s);\n\t\t--$this->idx;\n\n\t\treturn $etime - $this->start[$this->idx];\n\t}", "title": "" }, { "docid": "d7e943ffc0532620640dccf45f48fd10", "score": "0.5529997", "text": "function popd(): string|false\n{\n return Tools::popd();\n}", "title": "" }, { "docid": "983570170ac62da5760ffd0096495385", "score": "0.55143243", "text": "public function prevChar()\n {\n // Exception is bubbled\n return $this->getCharAtPos($this->pointer -1);\n }", "title": "" }, { "docid": "0282c8930b68df916d4e89e1329c5d71", "score": "0.55084187", "text": "public function pop() {\n if ($this->isEmpty()) {\n throw new UnderflowException(\"Sequence is empty\");\n }\n return array_pop($this->sequence);\n }", "title": "" }, { "docid": "1afce8aa14b974a898caa611f9d4e5e0", "score": "0.55049175", "text": "public function rPop() {\n return $this->client()->rPop($this->name());\n }", "title": "" }, { "docid": "e9ee1f498bdab6a93d952dc0693b0c42", "score": "0.5503379", "text": "public function pop () {\n\t\tif (!sizeof($this->heap)) { return false; }\n\t\t$last = sizeof($this->heap) - 1;\n\t\t$poppedValue = $this->heap[0];\n\t\t$this->heap[0] = $this->heap[$last];\n\t\tarray_pop($this->heap);\n\t\t$this->orderDown(0);\n\t\treturn $poppedValue;\n\t}", "title": "" }, { "docid": "5a5ac272cfa96f1b5053b572c66fbe07", "score": "0.5500836", "text": "public function getTopCardFromDeck()\n {\n return array_shift($this->deck);\n }", "title": "" }, { "docid": "0a8bdefb7dc72ef7a3a5679955fde983", "score": "0.54709744", "text": "function yy_pop_parser_stack()\n {\n if (!count($this->yystack)) {\n return;\n }\n $yytos = array_pop($this->yystack);\n if (self::$yyTraceFILE && $this->yyidx >= 0) {\n fwrite(self::$yyTraceFILE,\n self::$yyTracePrompt . 'Popping ' . self::$yyTokenName[$yytos->major] .\n \"\\n\");\n }\n $yymajor = $yytos->major;\n self::yy_destructor($yymajor, $yytos->minor);\n $this->yyidx--;\n return $yymajor;\n }", "title": "" }, { "docid": "a3db9197553c57a16f7dd3ac6d68b115", "score": "0.5457712", "text": "function pop ()\r\n\t{\r\n\t\treturn (array_pop($this->queue));\t\t\t\t\t\t\r\n\t}", "title": "" }, { "docid": "12add9ade0cfa95f36ed48888bee7229", "score": "0.5424055", "text": "public function lPop() {\n return $this->client()->lPop($this->name());\n }", "title": "" }, { "docid": "e4eb0ee221530a68b10550516ecbbc04", "score": "0.5408424", "text": "public function pop(){\n\t\t\n\t\tif ($this->isEmpty()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn array_shift($this->elements);\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "bc3b5d5066e17bf7d99289f6b8a056fe", "score": "0.5404644", "text": "public function top() {\n if ($this->tail === null) {\n throw new RuntimeException(\"Can't pop from an empty datastructure\");\n }\n return $this->tail->data;\n }", "title": "" }, { "docid": "8b6f141698de9f9648c0e0e3f73ddd5a", "score": "0.53947455", "text": "public function back() {\n\n if ($this->cursor == 0) {\n $this->cursor = false;\n }\n \n // no token parsed yet?\n if ($this->cursor === false) {\n return false;\n }\n\n // move back one token\n $this->cursor --;\n \n return $this->tokens[$this->cursor];\n }", "title": "" }, { "docid": "137e3b6bf544736b8521dbd37e57bbf4", "score": "0.5372281", "text": "public function getCharacter()\n {\n return $this->character;\n }", "title": "" }, { "docid": "137e3b6bf544736b8521dbd37e57bbf4", "score": "0.5372281", "text": "public function getCharacter()\n {\n return $this->character;\n }", "title": "" }, { "docid": "4d230e57b98bc7d07984f910141208b0", "score": "0.53645456", "text": "public function popPriority()\n {\n $priorityClosing = \\array_pop($this->priorityStack);\n // not really necessary to remove this empty placeholder, but lets keep things tidy\n if (empty($this->groupStacks[$priorityClosing])) {\n unset($this->groupStacks[$priorityClosing]);\n }\n return $priorityClosing;\n }", "title": "" }, { "docid": "d2e8df00589a67ec4eb76105723cd292", "score": "0.52788913", "text": "public function getCharacter() {\n return $this->character;\n }", "title": "" }, { "docid": "c894cf63754ac136ef1549089cd4d931", "score": "0.5261276", "text": "public function pop(){\n if(!$this->is_empty()){\n $item = $this->list[count($this->list)-1];\n unset($this->list[count($this->list)-1]);\n return $item;\n }\n\n return null;\n }", "title": "" }, { "docid": "2d235fb2cffcb2a4d1709bb7f91fcb3b", "score": "0.52506936", "text": "public function get() {\n\t\t// Getting a character from the string\n\t\t$this->sourceIndex ++;\n\t\t\n\t\tif ($this->sourceIndex > 0) { // Maintain line count\n\t\t\t\n\t\t\tif ($this->sourceText [$this->sourceIndex - 1] == \"\\n\") { // The last element was a new line\n\t\t\t\t$this->lineIndex ++; // Line increment\n\t\t\t\t$this->colIndex = - 1; // Column positioned at -1\n\t\t\t}\n\t\t}\n\t\t$this->colIndex ++;\n\t\t// We reached the end of file\n\t\t\n\t\tif ($this->sourceIndex > $this->lastIndex) {\n\t\t\t$char = new Character ( TPL_EOF, $this->lineIndex, $this->colIndex, $this->sourceIndex, true );\n\t\t} else {\n\t\t\t$cargo = $this->sourceText [$this->sourceIndex];\n\t\t\t$char = new Character ( $cargo, $this->lineIndex, $this->colIndex, $this->sourceIndex );\n\t\t}\n\t\t\n\t\t// Return a character object\n\t\treturn $char;\n\t}", "title": "" }, { "docid": "78b3b713e6c4cbf4dd4a840ade95fd0e", "score": "0.5238868", "text": "public function testPeek(string $answer) {\n\t\t$char = new Character($answer);\n\t\t$this->assertEquals($answer, $char->peek());\n\t}", "title": "" }, { "docid": "e14c3941d8da9336bbb5e6ec3e97ad93", "score": "0.523837", "text": "public function topOperand(): int {\n if ($this->internalStack->isEmpty()) {\n return RegExParserStackElement::OP_SNONE;\n }\n /**\n * @var RegExParserStackElement $elem\n */\n $elem = $this->internalStack->top();\n return $elem->getOperand();\n }", "title": "" }, { "docid": "6fa684be497df7095eab71432c46f7d3", "score": "0.5231283", "text": "public function pop(){\n return $this->idChannel->pop();\n }", "title": "" }, { "docid": "f95b981ba768f25028568b3cce6520c3", "score": "0.5223406", "text": "public function get_last_element() { return $this->stack[count($this->stack)-1]; }", "title": "" }, { "docid": "3527b0a6cc315b665aa9569910bc3e6e", "score": "0.51945716", "text": "public function pop()\n {\n if ($this->isEmpty()) {\n throw new OutOfRangeException('Stack is empty');\n }\n $this->size--;\n return array_pop($this->items);\n }", "title": "" }, { "docid": "fc54ce49d907f2ab863c70297483281e", "score": "0.51939076", "text": "public function pull() {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "9f622bd0199501a9e724112ae1ad82b4", "score": "0.5191872", "text": "protected function _getLastTag()\n\t{\n\t\treturn $this->stack[count($this->stack) - 1];\n\t}", "title": "" }, { "docid": "9517fe126832fc8088a78310e0186270", "score": "0.5180049", "text": "public function top()\n {\n return end($this->_object_stack);\n }", "title": "" }, { "docid": "aca5d74dba67da6dd468cdff0823301f", "score": "0.51452047", "text": "protected function topDiscard(): ?Card\n {\n return $this->discard->top();\n }", "title": "" }, { "docid": "d441793dc1c16a3f854dd3df5eedba85", "score": "0.51447374", "text": "public function current(): string {\n return $this->charAt($this->index);\n }", "title": "" }, { "docid": "beacb017016e74709d5df94c817935ee", "score": "0.5140484", "text": "function remove_char(string $s): string {\n $string = substr($s,1,-1);\n return $string;\n}", "title": "" }, { "docid": "e674004b0239f8e629c85ce23094e620", "score": "0.5133841", "text": "public function getCardFromDeck(){\n //shortening the Deck by one element\n if (empty($this->deck)){\n unset($this->deck);\n return \"The deck is destroyed\";\n }\n else return array_pop($this->deck);\n }", "title": "" }, { "docid": "946bd55444ff53842ef0d65c3c917800", "score": "0.5111231", "text": "public function current()\n {\n return $this->data[$this->char];\n }", "title": "" }, { "docid": "1e742e0caf776edf437a5d51fcbe6118", "score": "0.5110217", "text": "public function pop($length);", "title": "" }, { "docid": "b2dbd67ab32fbbbca0f1ff9dc00536c6", "score": "0.5101723", "text": "function &top() {\n $count = count($this->_stack);\n // Prevent bad reference pointer\n if ($count == 0) {\n return null;\n }\n return $this->_stack[count($this->_stack)-1];\n }", "title": "" }, { "docid": "111a7f3290124f36f0cc959e50c9922f", "score": "0.5074178", "text": "function getCurrent() {\n return $this->_stack[count($this->_stack) - 1];\n }", "title": "" }, { "docid": "c68fff3644c9e455cf9d02b12852d316", "score": "0.5070775", "text": "function char($parser, $data){\n\n {echo chop($data, \" \");}\n\n\n\n\n}", "title": "" }, { "docid": "9f16bd8ac30611690e3869814483a93b", "score": "0.50696826", "text": "function getTopRightCornerChar()\n {\n return $this->top_right_corner_char;\n }", "title": "" }, { "docid": "7102edc911a3969d1019c66cf7445e38", "score": "0.5067254", "text": "public function char() {\n return $this->char;\n }", "title": "" }, { "docid": "ad8820806cdfc25596ac966f9d042e47", "score": "0.5057942", "text": "public function pop(): bool\n {\n // TODO pop an item from the stack - Return TRUE if successful\n }", "title": "" }, { "docid": "40fe5d55784bdd6d220e81021dfecf05", "score": "0.50314313", "text": "public function getStopToken()\n {\n $topStack = end($this->_stack);\n return $topStack[2];\n }", "title": "" }, { "docid": "43e02b038cd5c2c844e777bdabb8c714", "score": "0.50262403", "text": "public function top($offset = 0)\n\t{\n\t\tif(isset($this->stack[ $this->position-$offset ]))\n\t\t{\n\t\t\treturn $this->stack[ $this->position-$offset ];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new StackEmptyException();\n\t\t}\n\t}", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "f039f3a7c5d4fa57be3584926d23e2eb", "score": "0.0", "text": "public function run()\n {\n // DB::table('order_status')->insert([\n // 'name' => 'Chờ Xác Nhận',\n // 'created_at' => now(),\n // ]);\n\n // DB::table('order_status')->insert([\n // 'name' => 'Đã Xác Nhận',\n // 'created_at' => now(),\n // ]);\n\n\n // DB::table('order_status')->insert([\n // 'name' => 'Đang Giao',\n // 'created_at' => now(),\n // ]);\n\n // DB::table('order_status')->insert([\n // 'name' => 'Đã Thanh Toán',\n // 'created_at' => now(),\n // ]);\n\n // DB::table('order_status')->insert([\n // 'name' => 'Đã Hủy',\n // 'created_at' => now(),\n // ]);\n\n DB::table('order_status')->insert([\n 'name' => 'TEst',\n 'created_at' => now(),\n ]);\n }", "title": "" } ]
[ { "docid": "1dcddd9fc4f2fbc62e484166f7f3332c", "score": "0.80288446", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('roles')->truncate();\n DB::table('role_user')->truncate();\n\n // SEEDS\n $this->call(RolesTableSeeder::class);\n\n // FACTORIES\n /*\n factory(App\\User::class, 10)->create()->each(function ($user) {\n $user->posts()->save(factory(App\\Post:class)->make());\n });*/\n\n //$roles = factory(App\\Role::class, 3)->create();\n\n $users = factory(User::class, 10)->create()->each(function ($user) {\n $user->posts()->save(factory(Post::class)->make());\n $user->roles()->attach(Role::findOrFail(rand(1, 3)));\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n }", "title": "" }, { "docid": "6242c83182914af1dca6a8760034eb1d", "score": "0.8013423", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $ross = User::create([\n 'email' => 'rossjbartlett@gmail.com',\n 'name' => 'Ross Bartlett',\n 'password' => Hash::make('password')\n ]);\n\n $dyl = User::create([\n 'email' => 'timeparadox98@gmail.com',\n 'name' => 'Dylan Gordon',\n 'password' => Hash::make('password')\n ]);\n\n Interest::create([\n 'user_id'=>$ross->id,\n 'interest'=>'Calgary Flames'\n ]);\n Interest::create([\n 'user_id'=>$ross->id,\n 'interest'=>'Rugby'\n ]);\n\n Like::create([\n 'user_id'=>$ross->id,\n 'item'=>'rVynOFlmK_Q',\n 'platform'=> 0 //youtube\n ]);\n\n\n }", "title": "" }, { "docid": "189174cea9e9e7145c489e18fd0089a4", "score": "0.7980389", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "6d65d81db98c4e3d10f6aa402d6393d9", "score": "0.79775625", "text": "public function run()\n {\n if (App::environment() == 'production') {\n exit(\"You shouldn't run seeds on production databases\");\n }\n\n DB::table('roles')->truncate();\n\n Role::create([\n 'id' => 3,\n 'name' => 'Root',\n 'description' => 'God user. Access to everything.'\n ]);\n\n Role::create([\n 'id' => 2,\n 'name' => 'Administrator',\n 'description' => 'Administrator user. Many privileges.'\n ]);\n\n Role::create([\n 'id' => 1,\n 'name' => 'Guest',\n 'description' => 'Basic user.'\n ]);\n\n }", "title": "" }, { "docid": "b0c4f271872f35f165325de519bb487f", "score": "0.7977261", "text": "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "37a0b6a3e76804710ff7c9469eab40c2", "score": "0.7963482", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n factory(App\\User::class, 1)->create();\n factory(App\\Supplier::class, 10)->create();\n $categories = factory(App\\Category::class, 5)->create();\n \t$categories->each(function ($category) {\n factory('App\\SubCategory', 2)->create(['category_id' => $category->id]);\n });\n factory(App\\Warehouse::class, 5)->create();\n factory(App\\Employee::class, 10)->create();\n factory(App\\Customer::class, 10)->create();\n factory(App\\Income::class, 10)->create();\n factory(App\\Expense::class, 10)->create();\n factory(App\\Product::class, 20)->create();\n factory(App\\Purchase::class, 5)->create();\n factory(App\\Sale::class, 5)->create();\n }", "title": "" }, { "docid": "c8b0d4df0b00483f5e354b9b76b4f370", "score": "0.7955372", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Réén Pock',\n 'email' => 'poock@poock.com',\n 'password' => bcrypt('123456')\n ]);\n factory(Category::class, 5)->create();\n factory(Product::class, 100)->create()->each(function($product){\n for ($i=0; $i < 3; $i++) { \n $product->categories()->attach(Category::inRandomOrder()->first()->id);\n }\n });\n }", "title": "" }, { "docid": "810e2984e6eded128ac32a3c06fe3e23", "score": "0.7949779", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "title": "" }, { "docid": "338cba437c44387add3ca68b7433a1d6", "score": "0.79447794", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "title": "" }, { "docid": "33dbfbc00700305306745acd24e39069", "score": "0.7938544", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "title": "" }, { "docid": "ff581332117c5a8ceb165939e5861a64", "score": "0.7937133", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "a3350553b93dfb0209ddf6ddfd533d8d", "score": "0.7933888", "text": "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => 'simpleadressemail@mail.com', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "title": "" }, { "docid": "fa8f6aeb20ad773ecabd02bb875a6c88", "score": "0.7922065", "text": "public function run()\n {\n //\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n DB::table('sections')->truncate();\n\n Section::create([\n 'id' => 1,\n 'name' => 'Lifestyle Habits',\n 'description' => 'This section focuses on lifestyle and habits of a patient']);\n Section::create([\n 'id' => 2,\n 'name' => 'Family History',\n 'description' => 'This section focuses on medical history of family of a patient']);\n Section::create([\n 'id' => 3,\n 'name' => 'Complaints',\n 'description' => 'This section deals with recent complaints of pateint']);\n Section::create([\n 'id' => 4,\n 'name' => 'Clinical Examination',\n 'description' => 'This section deals with various clinical reports of a patient']);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "d683182ec8b2d791dddbb2f54ba8f8b3", "score": "0.79199374", "text": "public function run()\n {\n //Assign dummy Roles for users with in UsersTableSeeder\n DB::table('roles')->insert([\n 'title' => 'Admin',\n ]);\n\n DB::table('roles')->insert([\n 'title' => 'Employee',\n ]);\n\n //assigned user a Role\n DB::table('role_user')->insert([\n 'role_id' => '1',\n 'user_id' => '1',\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => '2',\n 'user_id' => '2',\n ]);\n\n $faker = Faker::create();\n foreach (range(3, 20) as $index) {\n DB::table('role_user')->insert([\n 'role_id' => rand(1, 2),\n 'user_id' => $index,\n ]);\n }\n }", "title": "" }, { "docid": "22408a54239aeef49683358b8f38db07", "score": "0.7906856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // create categories\n \t$categories = factory('App\\Category', 10)->create();\n // create posts\n $posts = factory('App\\Post', 50)->create();\n // fore each post, populate 1-3 cates\n $posts->each(function ($post) use ($categories) {\n \t$post->categories()->attach(\n \t\t$categories->random(rand(1, 3))->pluck('id')->toArray()\n \t);\n });\n }", "title": "" }, { "docid": "64ddc727eef6e28c29db4c4be58c3578", "score": "0.7892658", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "title": "" }, { "docid": "4f1d5d37635c3d5345f27254da911e96", "score": "0.78847766", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n \\App\\Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 15; $i++) {\n \\App\\Article::create([\n 'title' => $faker->sentence,\n 'content' => $faker->paragraphs($nb = 4, $asText = true),\n 'author' => $faker->name,\n 'num_views' => $faker->randomNumber($nbDigits = 4),\n 'publish_state' => $faker->boolean,\n 'publish_date' => ($faker->dateTimeThisYear($max = 'now'))->format('c')\n ]);\n }\n }", "title": "" }, { "docid": "b993bdb17f6322a43f700f6d1f5b1006", "score": "0.7882984", "text": "public function run()\n {\n // Trunkate the databse so we don;t repeat the seed\n DB::table('roles')->delete();\n\n Role::create(['name' => 'root']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'supervisor']);\n Role::create(['name' => 'officer']);\n Role::create(['name' => 'user']);\n }", "title": "" }, { "docid": "3c219ba37518a110e693986f93eb9e5e", "score": "0.78778356", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('roles')->insert([\n 'name' => 'prof',\n 'display_name' => 'professor',\n 'description' => 'Perfil professor',\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Marcos André',\n 'email' => 'macs@ifpe.edu.br',\n 'password' => bcrypt('marcos123'),\n 'first_login' => 0,\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('professores')->insert([\n 'nome' => 'Marcos André',\n 'matricula' => '12.3456-7',\n 'data_nascimento' => '1969-11-30',\n 'user_id' => 1,\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n DB::table('role_user')->insert([\n 'user_id' => 1,\n 'role_id' => 1,\n ]);\n }", "title": "" }, { "docid": "e78ec24a86879882dd348d32e57ca04d", "score": "0.78778154", "text": "public function run()\n {\n /* factory(\\App\\Models\\Category::class, 5)->create()->each(function ($category) {\n factory(\\App\\Models\\Category::class, random_int(0, 3))->create(['parent_id' => $category->id]);\n });\n\n factory(App\\Models\\User::class, 10)->create()->each(function ($user) {\n factory(App\\Models\\Post::class, random_int(0, 10))->create(['user_id' => $user->id])->each(function ($post) {\n $post->postContent()->save(factory(PostContent::class)->make());\n });\n });\n\n DB::table('users')->where('id', 1)->update(['user_name' => 'tiny', 'email' => 'tiny@test.com', 'locked_at' => null]);\n\n $this->call(PermissionsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(TypesTableSeeder::class);*/\n $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "5b880595ea5798cabac1baebe896e5e7", "score": "0.78718805", "text": "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "title": "" }, { "docid": "17dca3224f1ceff9e07014643cc0ecc7", "score": "0.7866253", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n /* role seeder */\n DB::table('roles')->insert([\n 'id' => 1,\n 'title' => 'Customer',\n ]);\n\n DB::table('roles')->insert([\n 'id' => 2,\n 'title' => 'Seller',\n ]);\n\n \n /* seller category seeder */\n factory(App\\SellerCategory::class, 10)->create();\n\n /* user seeder */\n factory(App\\User::class, 20)->create();\n\n /* request seeder */\n factory(App\\Request::class, 10)->create();\n }", "title": "" }, { "docid": "900d2a6c98a63207bb98e4476f29b982", "score": "0.7854047", "text": "public function run()\n {\n DB::table('users')->truncate();\n DB::table('roles')->truncate();\n\n // $this->call(UsersTableSeeder::class);\n Role::create([\n 'name' => 'admin'\n ]);\n Role::create([\n 'name' => 'author'\n ]);\n Role::create([\n 'name' => 'user'\n ]);\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@test.com',\n 'password' => bcrypt('test12345'),\n 'role' => 1\n ]);\n User::create([\n 'name' => 'User',\n 'email' => 'user@test.com',\n 'password' => bcrypt('test12345'),\n ]);\n \n $this->call([\n DishCategorySeeder::class,\n DishesSeeder::class\n ]);\n }", "title": "" }, { "docid": "d7bb625a9812b9cb6a9362070a5950ee", "score": "0.7852662", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Add Company\n $company = Company::create([\n 'name' => 'IAPP',\n 'employee_count' => 100,\n 'size' => 'Large'\n ]);\n\n $secondCompany = Company::create([\n 'name' => 'ABC',\n 'employee_count' => 20,\n 'size' => 'Small'\n ]);\n\n // Add user\n $general_user = User::create([\n 'name' => 'Shayna Sylvia',\n 'email' => 'shayna.sylvia@gmail.com',\n 'password' => Hash::make('12345678'),\n 'street' => '9 Mill Pond Rd',\n 'city' => 'Northwood',\n 'state' => 'NH',\n 'zip' => '03261',\n 'company_id' => $company->id,\n 'type' => 'admin'\n ]);\n\n // Add Challenge\n $challenge = Challenge::create([\n 'name' => 'Conquer the Cold 2018',\n 'slug' => 'conquer',\n 'start_date' => '2018-11-01',\n 'end_date' => '2018-12-31',\n 'type' => 'Individual',\n 'image_url' => '/images/conquer-the-cold-banner.png'\n ]);\n }", "title": "" }, { "docid": "b33aa01f2832813762ccbfb3d2d3532d", "score": "0.7846771", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(5)->create();\n $this->call(MenuCategoryTableSeeder::class);\n $this->call(AttributeTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n \\App\\Models\\Product::factory(50)->create();\n \\App\\Models\\AttributeProduct::factory(500)->create();\n \n // Circles\n $this->call(CircleTableSeeder::class);\n\n // Top Products\n $this->call(TopProductTableSeeder::class);\n\n // Random Products\n $this->call(RandomProductTableSeeder::class);\n }", "title": "" }, { "docid": "b6032e82ff7748213ddc30ee53d1f11b", "score": "0.78308666", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('roles')->insert(\n [\n [\n 'title' => 'Директор',\n 'name' => 'Director',\n 'parent_id' => '0'\n ],\n [\n 'title' => 'Зам директор',\n 'name' => 'Deputy director',\n 'parent_id' => '1'\n ],\n [\n 'title' => 'Начальник',\n 'name' => 'Director',\n 'parent_id' => '2'\n ],\n [\n 'title' => 'ЗАм начальник',\n 'name' => 'Deputy сhief',\n 'parent_id' => '3'\n ],\n [\n 'title' => 'Работник',\n 'name' => 'Employee',\n 'parent_id' => '4'\n ]\n ]);\n\n\n $this->call(departmentsTableSeeder::class);\n $this->call(employeesTableSeeder::class);\n }", "title": "" }, { "docid": "f72b073f1562b517a5cbd8caadf6f8b1", "score": "0.78217113", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1, 50) as $index) {\n\n Category::create([\n 'title' => $faker->jobTitle,\n ]);\n }\n }", "title": "" }, { "docid": "16547d5faa64dc71264cbf37cd0a5a22", "score": "0.7819246", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "title": "" }, { "docid": "7e80466dc8005ac35863dfc3e5c7c169", "score": "0.7818148", "text": "public function run()\n {\n User::create([\n 'name' => 'Administrator',\n 'email' => 'admin@admin.com',\n 'password' => Hash::make('adminadmin'),\n ]);\n\n Genre::factory(5)->create();\n Classification::factory(5)->create();\n Actor::factory()->count(50)->create();\n Director::factory(20)->create();\n Movie::factory(30)->create()->each(function ($movie) {\n $movie->actors(['actorable_id' => rand(30, 50)])->attach($this->array(rand(1, 50)));\n });\n Serie::factory(10)->create();\n Season::factory(20)->create();\n Episode::factory(200)->create()->each(function ($episode) {\n $episode->actors(['actorable_id' => rand(15, 30)])->attach($this->array(rand(1, 50)));\n });\n }", "title": "" }, { "docid": "c621382a9007bb3f312489ab7da81f56", "score": "0.7814319", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n // DB::table('user_roles')->delete();\n\n $roles = [\n ['id' => 1, 'name' => 'Director'],\n ['id' => 2, 'name' => 'Chair'],\n ['id' => 3, 'name' => 'Secretary'],\n ['id' => 4, 'name' => 'Faculty'],\n ];\n\n // Uncomment the below to run the seeder\n DB::table('user_roles')->insert($roles);\n }", "title": "" }, { "docid": "405076a95a7f251d6fa3259dc0d9fb6a", "score": "0.7811384", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n // factory(Category::class, 25)->create();\n factory(Category::class, 10)->create();\n factory(Post::class, 50)->create();\n factory(Video::class, 5)->create();\n }", "title": "" }, { "docid": "40a0e12ed745bd76bf6ddbc9fe97e1a8", "score": "0.78104776", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert([\n // 'name' => 'employee',\n // 'guard_name' => 'web',\n // ]);\n\n // DB::table('roles')->insert([\n // 'name' => 'admin',\n // 'guard_name' => 'web',\n // ]);\n\n // DB::table('units')->insert([\n // 'name' => 'kg',\n // ]);\n // DB::table('units')->insert([\n // 'name' => 'litre',\n // ]);\n // DB::table('units')->insert([\n // 'name' => 'dozen',\n // ]);\n }", "title": "" }, { "docid": "7c1b3b143dd76d76cb8edbf417f06a8e", "score": "0.78065836", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n // create 6 users\n // User::factory(1)->create()->each(function ($user){\n\n // // create 15 posts for each user\n // $post = Post::factory(1)->create()->each(function ($post){\n // // /create 5 comments for each post\n // $comment = Comment::factory(1)->make();\n // $post->comments()->saveMany($comment);\n // });\n // $user->posts()->saveMany($post);\n // }); \n \n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Post::truncate();\n Comment::truncate();\n User::factory(10)->create();\n Post::factory(50)->create();\n Comment::factory(100)->create();\n // Enable it back\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n \n }", "title": "" }, { "docid": "3a3dbeb16bee414c118c000c37fbbdf7", "score": "0.7803176", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "title": "" }, { "docid": "84a2fe5ce7256b53cae2bd09c99e6aaf", "score": "0.7802559", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => 'programmerlemar@gmail.com',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "title": "" }, { "docid": "b2a340012128cdc0ce9898ea0cc3c209", "score": "0.7799208", "text": "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> 'admin@example.com',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "title": "" }, { "docid": "48fe7d1d0d33106e3241378b6668a775", "score": "0.77972436", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 50)->create();\n factory(Post::class, 500)->create();\n factory(Category::class, 10)->create();\n factory(Tag::class, 150)->create();\n factory(Image::class, 1500)->create();\n factory(Video::class, 500)->create();\n factory(Comment::class, 1500)->create();\n }", "title": "" }, { "docid": "461c8a228780b7db8fef36082242e109", "score": "0.77958846", "text": "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "title": "" }, { "docid": "706ff7ec69aebe11396b7ff7e05d374c", "score": "0.7786444", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => 'admin@admin.com',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "title": "" }, { "docid": "d807dce754ed136319cb37b9a9be6494", "score": "0.77857983", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Localizacao::class, 5)->create();\n factory(Estado::class, 2)->create();\n factory(Tamanho::class, 4)->create();\n factory(Cacifo::class, 20)->create();\n factory(Cliente::class, 10)->create();\n factory(UserType::class, 2)->create();\n factory(User::class, 8)->create();\n factory(Encomenda::class, 25)->create();\n factory(LogCacifo::class, 20)->create();\n\n foreach (Encomenda::all() as $encomenda) {\n $user = User::all()->random();\n DB::table('encomenda_user')->insert(\n [\n 'user_id' => $user->id,\n 'encomenda_id' => $encomenda->id,\n 'user_type' => $user->tipo_id,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]\n );\n }\n\n }", "title": "" }, { "docid": "4a8a5f2d0bf57a648aa039d994ba098c", "score": "0.7780599", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $spec = [\n [\n 'name'=>'Dokter Umum',\n 'title_start'=> 'dr.',\n \"title_end\"=>null,\n ],[\n 'name'=>\"Spesialis Kebidanan Kandungan\",\n 'title_start'=>\"dr.\",\n 'title_end'=>\"Sp.OG\",\n ],[\n \"name\"=>\"Spesialis Anak\",\n \"title_start\"=>\"dr.\",\n \"title_end\"=>\"Sp.A\",\n ],[\n \"name\"=>\"Spesialis penyakit mulut\",\n \"title_start\"=>\"drg.\",\n \"title_end\"=>\"Sp.PM\"\n ],[\n \"name\"=>\"Dokter Gigi\",\n \"title_start\"=>\"drg.\",\n \"title_end\"=>null,\n ]\n ];\n\n DB::table(\"specializations\")->insert($spec);\n\n \n factory(User::class, 10)->create([\n 'type'=>\"doctor\",\n ]);\n factory(User::class, 10)->create([\n 'type'=>\"user\",\n ]);\n factory(Message::class, 100)->create();\n }", "title": "" }, { "docid": "e9a395588cf010ce0bc08d6b3e36927d", "score": "0.7777666", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "title": "" }, { "docid": "b32c8e0e5988bd2cbc8f9b3c1069084f", "score": "0.7775206", "text": "public function run()\n {\n //這邊用到集合 pluck() 將全部User id取出並轉為陣列,如 [1,2,3,4,5]\n $user_ids = User::all()->pluck('id')->toArray();\n\n //同上\n $topic_id = Topic::all()->pluck('id')->toArray();\n\n //取Faker 實例化\n $faker = app(Faker\\Generator::class);\n\n //生成100筆假數據\n $posts = factory(Post::class)->times(100)\n ->make()->each(function ($post,$index) use ($user_ids,$topic_id,$faker)\n {\n //用User id隨機取一個並賦值\n $post->user_id = $faker->randomElement($user_ids);\n //用Topic id隨機取一個並賦值\n $post->topic_id = $faker->randomElement($topic_id);\n });\n //將數據轉為陣列在插入資料庫\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "0ac3bd79ccafd183f64a83daa8e8b734", "score": "0.7774504", "text": "public function run()\n {\n //\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@example.com',\n 'level' => 'admin',\n 'password' => Hash::make('12345678'),\n ]);\n\n factory(App\\User::class, 9)->create([\n 'password' => Hash::make('12345678')\n ]);\n\n factory(App\\Author::class, 10)->create();\n\n factory(App\\Book::class, 10)->create();\n\n $author = App\\Author::all();\n\n App\\Book::all()->each(function ($book) use ($author) { \n $book->author()->attach(\n $author->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n \n }", "title": "" }, { "docid": "10bba340ceff4aa7654e77f3264df8b2", "score": "0.7765372", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "0350e1fc9ed9c9553317db568c12e5ba", "score": "0.77626014", "text": "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "title": "" }, { "docid": "e4a3f3c54eb1dbfbeaf14daf25634bfc", "score": "0.7762562", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "title": "" }, { "docid": "80029eda94306be7dd06321a86e96e4f", "score": "0.77622634", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "title": "" }, { "docid": "2f5b59082890fe6ed7dc8f5c50b7611e", "score": "0.77613014", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // seed users\n factory(\\App\\User::class, 1)->create(['name' => 'test', 'email' => 'test@abv.bg', 'password' => bcrypt('test')]);\n factory(\\App\\User::class, 50)->create();\n\n // seed channels\n factory(\\App\\Channel::class, 20)->create();\n\n // seed threads\n factory(\\App\\Thread::class, 10)->create();\n\n // seed replies\n factory(\\App\\Reply::class, 10)->create();\n\n\n }", "title": "" }, { "docid": "7124f0c07efbf29272763999a735a94f", "score": "0.7760895", "text": "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "title": "" }, { "docid": "5c8214e2d3c221fbe38a112c0256f06f", "score": "0.7759921", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'role' => 1,\n 'email' => 'admin@gmail.com',\n 'password' => '$2y$10$UT2JvBOse3.6uuElsmqDpOhvp8d5PkoRdmbIHDMwOJmr226GRrmKe',\n ]);\n\n DB::table('programs')->insert([\n ['name' => 'Ingeniería de sistemas'],\n ['name' => 'Ingeniería electrónica'],\n ['name' => 'Ingeniería industrial'],\n ['name' => 'Diseño gráfico'],\n ['name' => 'Psicología'],\n ['name' => 'Administración de empresas'],\n ['name' => 'Negocios internacionales'],\n ['name' => 'Criminalística'],\n ]);\n }", "title": "" }, { "docid": "6f031bf4bd571edf71627cb6a09568cd", "score": "0.77596897", "text": "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "title": "" }, { "docid": "2290f88bd069e9499c0321a79bda7083", "score": "0.7759252", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('filials')->insert([\n 'nome' => 'Filial 1',\n 'endereco' => 'Endereco, 1',\n 'bairro' => 'Bairro',\n 'cidade' => 'Cidade',\n 'uf' => 'ES',\n 'inscricao_estadual' => 'ISENTO',\n 'cnpj' => '00123456000178'\n ]);\n DB::table('users')->insert([\n 'name' => 'Vitor Braga',\n 'data_nascimento' => '1991-03-16',\n 'sexo' => 'M',\n 'cpf' => '12345678900',\n 'endereco' => 'Rua Luiz Murad, 2',\n 'bairro' => 'Vista da Serra',\n 'cidade' => 'Colatina',\n 'uf' => 'ES',\n 'cargo' => 'Desenvolvedor',\n 'salario' => '100.00',\n 'situacao' => '1',\n 'password' => bcrypt('123456'),\n 'id_filial' => '1'\n ]);\n }", "title": "" }, { "docid": "b8c622da980d0f20206cf3c497b69940", "score": "0.7754813", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n Role::truncate();\n User::truncate();\n DB::table('category_posts')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Post::flushEventListeners();\n Comment::flushEventListeners();\n Game::flushEventListeners();\n Newsletter::flushEventListeners();\n Client::flushEventListeners();\n // $this->call(UsersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n // factory(User::class, 50)->create();\n $this->call(BannersTableSeeder::class);\n $this->call(BasicsTableseeder::class);\n $this->call(SocialsTableseeder::class);\n $this->call(ContactInformationsTableseeder::class);\n $this->call(ClientsTableseeder::class);\n $this->call(AboutsTableseeder::class);\n $this->call(ContactusSeeder::class);\n $this->call(NewslettersSeeder::class);\n $this->call(GamesSeederTable::class);\n $this->call(PagesTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);\n $this->call(CategoryPostsTableSeeder::class);\n $this->call(GalleriesTableSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n \n }", "title": "" }, { "docid": "81e5569fa61ad16b28597151ca8922ab", "score": "0.7731427", "text": "public function run()\n {\n $faker = Faker\\Factory::create('fr_FR');\n $user = App\\User::pluck('id')->toArray();\n $data = [];\n\n for ($i = 1; $i <= 100; $i++) {\n $title = $faker->sentence(rand(4, 10)); // astuce pour le slug\n array_push($data, [\n 'title' => $title,\n 'sub_title' => $faker->sentence(rand(10, 15)),\n 'slug' => Str::slug($title),\n 'body' => $faker->realText(4000),\n 'published_at' => $faker->dateTime(),\n 'user_id' => $faker->randomElement($user),\n ]);\n }\n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "c74d696e8998a24c61e719b8157653fa", "score": "0.772798", "text": "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "title": "" }, { "docid": "3d873be91ed6d1da3295d915f287cf94", "score": "0.7727551", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n //Seeding the database\n \\DB::table('authors')->insert([\n [\n 'name' => 'Diane Brody',\n 'occupation' => 'Software Architect, Freelancer',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'name' => 'Andrew Quentin',\n 'occupation' => 'Cognitive Scientist',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n ]);\n\n \\DB::table('publications')->insert([\n [\n 'title' => 'AI Consciousness Level',\n 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',\n 'type' => 'Book',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ],\n [\n 'title' => 'Software Architecture for the experienced',\n 'excerpt' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',\n 'type' => 'Report of a conference',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n ]);\n\n \\DB::table('publication_authors')->insert([\n [\n 'publication_id' => 1,\n 'author_id' => 2\n ],\n [\n 'publication_id' => 2,\n 'author_id' => 1\n ]\n ]);\n }", "title": "" }, { "docid": "aee9f58c36821ccc960ba32ca0f7c676", "score": "0.7726492", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Kategorija::class, 10)->create();\n factory(App\\Proizvod::class, 50)->create();\n\n foreach(Proizvod::all() as $proizvod)\n {\n $proizvod->kategorije()->sync(kategorija::pluck('id')->random(rand(1,5)));\n $proizvod->save();\n }\n }", "title": "" }, { "docid": "2ecfbbe58300fc8debd0410b17f21e9d", "score": "0.77171093", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('users')->insert([\n 'name' => 'Demo',\n 'phone' => '0737116001',\n 'email' => 'demo@gmail.com',\n 'password' => Hash::make('demo'),\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'admin',\n 'slug' => 'admin',\n ]);\n\n\n DB::table('roles')->insert([\n 'name' => 'user',\n 'slug' => 'user',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'manager',\n 'slug' => 'manager',\n ]);\n\n DB::table('roles_users')->insert([\n 'user_id' => 1,\n 'role_id' => 1,\n ]);\n }", "title": "" }, { "docid": "01970702dcc3d254417ea716f48f61ba", "score": "0.77158374", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(ProductsTableSeeder::class);\n $this->call(SettingTableSeeder::class);\n // DB::table('orders')->insert([\n // 'name' => 'Tran Minh Luan',\n // 'address' => 'So 19, duong 13',\n // 'number' => '0163375305',\n // 'products' => 'lamp'\n // ]);\n //$this->call(OrdersTableSeeder::class);\n }", "title": "" }, { "docid": "603a2ad87e835d00866a742b9f5d2a52", "score": "0.7714435", "text": "public function run()\n {\n $users = User::factory()->count(10)->create();\n\n $categoriesNames = [\n 'Programación',\n 'Desarrollo Web',\n 'Desarrollo Movil',\n 'Inteligencia Artificial',\n ];\n $collection = collect($categoriesNames);\n $categories = $collection->map(function ($category, $key){\n return Category::factory()->create(['name' => $category]);\n });\n\n Post::factory()\n ->count(10)\n ->make()\n ->each(function($post) use ($users, $categories){\n $post->author_id = $users->random()->id;\n $post->category_id = $categories->random()->id;\n $post->save();\n });\n \n $user = User::factory()->create();\n $user->name = 'Jesús Ramírez';\n $user->email = 'jesus.ra98@hotmail.com';\n $user->password = Hash::make('jamon123');\n $user->save();\n }", "title": "" }, { "docid": "006d108790ce64b4ef4a883f12760a4c", "score": "0.77143073", "text": "public function run()\n {\n $this->call(GenreSeeder::class);\n \\App\\Models\\User::factory(20)->create();\n \\App\\Models\\User::factory()->create([\n 'username' => 'admin',\n 'name' => 'Admin User',\n 'email' => 'admin@example.com',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', //password\n 'is_admin' => true\n ]);\n \\App\\Models\\Movie::factory(100)->create();\n \\App\\Models\\Review::factory(1000)->create();\n \\App\\Models\\Celeb::factory(100)->create();\n \\App\\Models\\CelebMovie::factory(500)->create();\n \\App\\Models\\GenreMovie::factory(200)->create();\n \\App\\Models\\MovieUser::factory(100)->create();\n }", "title": "" }, { "docid": "b775152e814ada39237f6d02a27c5392", "score": "0.7714208", "text": "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "title": "" }, { "docid": "49da62fe0218d7ae61e34a8c8728ab7e", "score": "0.771253", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "title": "" }, { "docid": "67228a7edb1e67f6bdd0b8d19bb2b59a", "score": "0.7705477", "text": "public function run()\n {\n Model::unguard();\n $faker = Faker::create();\n for ($i = 0; $i <= 100; $i++) {\n DB::table('posts')->insert([\n 'published' => 1,\n 'title' => $faker->sentence(),\n 'body' => $faker->text(500),\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "deefe59dca3f24e874dfffb1bb15beeb", "score": "0.770442", "text": "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "title": "" }, { "docid": "c3bf798056554c74cc9ea30b5654cf7d", "score": "0.77041996", "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('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "title": "" }, { "docid": "cb57daba0c53f155a9c942af3dc024bd", "score": "0.77033854", "text": "public function run()\n {\n // 指令::php artisan db:seed --class=day20180611_campaign_event_table_seeder\n // 第一次執行,執行前全部資料庫清空\n $now_date = date('Y-m-d h:i:s');\n // 角色\n DB::table('campaign_event')->truncate();\n DB::table('campaign_event')->insert([\n // system\n ['id' => '1', 'keyword' => 'reg', 'created_at' => $now_date, 'updated_at' => $now_date],\n ['id' => '2', 'keyword' => 'order', 'created_at' => $now_date, 'updated_at' => $now_date],\n ['id' => '3', 'keyword' => 'complete', 'created_at' => $now_date, 'updated_at' => $now_date],\n ]);\n }", "title": "" }, { "docid": "cf7fcb1fe5570ba6a475aaf00815d6f6", "score": "0.77019954", "text": "public function run()\n {\n\n //SEEDING MASTER DATA\n $this->call([\n BadgeSeeder::class,\n AchievementSeeder::class\n ]);\n\n //SEEDING FAKER DATA\n Lesson::factory()\n ->count(20)\n ->create();\n\n Comment::factory()->count(2)->create();\n\n }", "title": "" }, { "docid": "36020ec2fbcaf681814118ed22133007", "score": "0.77008957", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "title": "" }, { "docid": "b44c7d8fac5a941c491e731eceea38f2", "score": "0.76987725", "text": "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "title": "" }, { "docid": "09fe947dea0cf1a8047d0c9bb4bf806d", "score": "0.76986116", "text": "public function run()\n {\n // gọi tới file UserTableSeeder nếu bạn muốn chạy users seed\n // $this->call(UsersTableSeeder::class);\n // gọi tới file PostsTableSeeder nếu bạn muốn chạy posts seed\n $this->call(PostsTableSeeder::class); \n // gọi tới file CategoriesTableSeeder nếu bạn muốn chạy categories seed\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostTagsTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n $this->call(ProjectTableSeeder::class);\n }", "title": "" }, { "docid": "ada5d5fc3637b7a815b289340c1ad5fe", "score": "0.7698439", "text": "public function run()\n {\n $users = $this->getSeedUsers();\n $size = count($users);\n for ($i = 0; $i < $size; $i++) {\n DB::table('users')->insert($users[$i]);\n }\n\n $court = $this->getSeedCourt();\n DB::table('courts')->insert($court);\n\n $reserves = $this->getSeedReserves();\n $size = count($reserves);\n for ($i = 1; $i <= $size; $i++) {\n DB::table('reserves')->insert($reserves[$i]);\n }\n\n }", "title": "" }, { "docid": "980af6960bda0fc5e03df83c2b9e41cc", "score": "0.76983917", "text": "public function run()\n {\n // $categories = factory(App\\Category::class, 10)->create();\n\n $categories = ['Appetizers', 'Beverages', 'Breakfast', 'Detox Water', 'Fresh Juice', 'Main Course', 'Pasta', 'Pizza', 'Salad', 'Sandwiches', 'Soups', 'Special Desserts', 'Hot Drinks', 'Mocktails', 'Shakes', 'Water and Softdrinks'];\n foreach( $categories as $category )\n { \n Category::create([\n 'name' => $category\n ]);\n }\n\n $categories = Category::all();\n\n foreach( $categories as $category )\n {\n factory(App\\Menu::class, 10)->create([\n 'category_id' => $category->id\n ]);\n }\n \t\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "eae1af9587a5c752d73027a3d713fa13", "score": "0.7696711", "text": "public function run()\n {\n User::firstOrCreate([\n 'email' => 'admin@admin.com'\n ], [\n 'name' => 'admin',\n 'password' => Hash::make('admin'),\n ]);\n\n $users =\\App\\Models\\User::factory(1)->create();\n $schools =\\App\\Models\\School::factory(10)->create();\n $employee = \\App\\Models\\Employee::factory(100)->make(['school_id' => null])->each(function ($employee) use($schools){\n $employee->school_id = $schools->random()->id;\n $employee->save();\n\n });\n }", "title": "" }, { "docid": "45367153bbaff6732338651be0b5630f", "score": "0.76966494", "text": "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "title": "" }, { "docid": "1a75d4c49ea06f308772e6345b798116", "score": "0.7696144", "text": "public function run()\n {\n //metodo para eiminar una carpeta en storage antes de ejecutar loos seeders\n Storage::deleteDirectory('posts');\n //metodo para crear una carpeta en storage antes de ejecutar loos seeders\n Storage::makeDirectory('posts');\n\n //llamar al seeder de rolSeeder quiere decir el de roles\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Tag::factory(8)->create();\n $this->call(PostSeeder::class);\n \n }", "title": "" }, { "docid": "1c93783c2ea23b1bcf0fcecb87e597a1", "score": "0.7693725", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('planeta')->insert([\n\n 'name'=>'Jupiter',\n 'peso'=>'1321'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'Saturno',\n 'peso'=>'6546'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'Urano',\n 'peso'=>'564564'\n \n ]);\n\n DB::table('planeta')->insert([\n\n 'name'=>'netuno',\n 'peso'=>'5213'\n \n ]);\n }", "title": "" }, { "docid": "cdec075ee5f589f68df7d8e373f800d0", "score": "0.769365", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n for ($i=0; $i<100; $i++) {\n $faker = Faker\\Factory::create();\n \\App\\Models\\Agencies::create([\n 'name'=>$faker->name\n ]);\n }\n\n for ($i=0; $i<100000; $i++){\n $faker = Faker\\Factory::create();\n \\App\\Models\\User::create([\n 'first_name'=>$faker->firstName,\n 'last_name'=>$faker->lastName,\n 'email'=>$faker->email,\n 'agencies_id'=>$faker->numberBetween(1,10)\n ]);\n }\n\n }", "title": "" }, { "docid": "016c973d20f43327498477b8b0832042", "score": "0.7692977", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => 'sovon.kucse@gmail.com']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "title": "" }, { "docid": "9c0db96925dc1f490c921bb00a04e003", "score": "0.7691408", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "title": "" }, { "docid": "7cfbc2c0b0ca1e8d2a8048e9780086c8", "score": "0.76907796", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => 'eddyjaair@gmail.com']);\n\n factory(Category::class, 5)->create();\n }", "title": "" }, { "docid": "1b46fa2a96790281813264fc3f8288b5", "score": "0.7688464", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "title": "" }, { "docid": "3cd1f7a4183660348d9343661c46ac18", "score": "0.76876825", "text": "public function run()\n {\n Eloquent::unguard();\n\n $path = 'resources/sql/seed.sql';\n DB::unprepared(file_get_contents($path));\n $manager = new User();\n $manager->username = 'root';\n $manager->email = 'root@root.com';\n $manager->password_hash = bcrypt('rootroot');\n $manager->date = '1920-01-01';\n $manager->user_role = 'Manager';\n $manager->id_image = 81;\n $manager->save();\n $user = new User();\n $user->username = 'johndoe';\n $user->email = 'john@doe.com';\n $user->address = 'John Doe Village';\n $user->password_hash = bcrypt('johndoe');\n $user->date = '1920-01-01';\n $user->user_role = 'Customer';\n $user->id_image = 81;\n $user->security_question = 'Socks';\n $user->save();\n $wishlist = new Wishlist();\n $wishlist->name = 'Favorites';\n $wishlist->id_user = $user->id;\n $wishlist->save();\n\n $this->command->info('Database seeded!');\n }", "title": "" }, { "docid": "98c57ab9dc9353ad077141992a0dd327", "score": "0.7687276", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n $this->call(GenreSeeder::class);\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n Schema::enableForeignKeyConstraints();\n \n // create an admin user with email admin@library.test and password secret\n User::truncate();\n User::create(array('name' => 'Administrator',\n 'email' => 'admin@library.test', \n 'password' => bcrypt('secret'),\n 'role' => 1)); \n }", "title": "" }, { "docid": "bba2ff1a30d0719e1aa8364f25fac587", "score": "0.7686974", "text": "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "title": "" }, { "docid": "39bb4261d54256e6189d729e7893cf92", "score": "0.76851374", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "title": "" }, { "docid": "6f4cd475360e7bf0d5a1fe2752972955", "score": "0.76849204", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(KategoriSeeder::class);\n $this->call(UsersTableSeeder::class);\n $roles = \\App\\Models\\Role::all();\n \\App\\Models\\User::All()->each(function ($user) use ($roles){\n // $user->roles()->saveMany($roles);\n $user->roles()->attach(\\App\\Models\\Role::where('name', 'admin')->first());\n });\n // \\App\\Models\\User::all()->each(function ($user) use ($roles) { \n // $user->roles()->attach(\n // $roles->random(rand(1, 2))->pluck('id')->toArray()\n // ); \n // });\n }", "title": "" }, { "docid": "05fe3186975dd67e97302afe2c8d7e44", "score": "0.7684132", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "title": "" }, { "docid": "54370a0836434e352058b6fa0c527ca2", "score": "0.7678492", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => 'barbozagonzalesjose@gmail.com',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "title": "" }, { "docid": "202189ac5e6ae1c3d158da4dfad00e74", "score": "0.76757056", "text": "public function run()\n {\n\t\t\tProject::truncate();\n\t\t\t\n\t\t\tfactory(Project::class, 20) -> create();\n\t\t\t/*$faker = Faker::create('en_US');\n\n\t\t\tfor($i = 0; $i < 10; $i++){\n\t\t\t\tProject::create([\n\t\t\t\t\t'title' => $faker -> name\n\t\t\t\t\t$table->string('title');\n\t\t\t\t\t$table->string('comment');\n\t\t\t\t\t$table->integer('min_price');\n\t\t\t\t\t$table->integer('max_price');\n\t\t\t\t\t$table->integer('category_id');\n\t\t\t\t\t$table->integer('user_id');\n\t\t\t\t\t$table->boolean('delete_flg');\n\t\t\t\t])\n\t\t\t}*/\n }", "title": "" }, { "docid": "4c4d418f65a57b515570be7482a92877", "score": "0.76728696", "text": "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "title": "" }, { "docid": "619d6d0bb4a4cea6758274cbd4639711", "score": "0.76713264", "text": "public function run()\n {\n // Use the factory to create a Faker\\Generator instance.\n $faker = \\Faker\\Factory::create('en_NG');\n\n /**\n * Loop through and insert the dummy data into the users table\n */\n for ($i = 0; $i < 10; $i++) {\n Interest::create([\n 'interest_description' => $faker->word(7),\n 'interest_name' => $faker->sentence(5)\n ]);\n }\n }", "title": "" }, { "docid": "2e8c9674b5b47271246bd3c5d33867fc", "score": "0.7670947", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n\n $faker = Factory::create();\n $users = array_merge(\n factory(User::class, 9)->create()->toArray(),\n factory(User::class, 1)->create(['role_id' => Role::where('name', 'admin')->first()->id])->toArray()\n );\n $categories = factory(Category::class, 6)->create()->toArray();\n\n foreach ($users as $user) {\n /** @var Post $posts */\n $posts = factory(Post::class, rand(1, 5))->create(['user_id' => $user['id']]);\n\n foreach ($posts as $post) {\n $post->categories()->attach([\n $faker->randomElements($categories)[0]['id'],\n $faker->randomElements($categories)[0]['id'],\n ]);\n\n factory(Comment::class, rand(1, 5))->create([\n 'post_id' => $post['id'],\n 'user_id' => $user['id'],\n ]);\n }\n }\n }", "title": "" }, { "docid": "861976ea353841a1120d5e19df4f5651", "score": "0.76676244", "text": "public function run()\n {\n // $this->call(GroupsTableSeeder::class);\n // $this->call(UsersTableSeeder::class);\n // $this->call(AdminsTableSeeder::class);\n // $this->call(SellersTableSeeder::class);\n\n $this->call(AboutsTableSeeder::class);\n // $this->call(AdvertisesTableSeeder::class);\n $this->call(ContactsTableSeeder::class);\n $this->call(HowToshopsTableSeeder::class);\n $this->call(HowTosellsTableSeeder::class);\n $this->call(OfficialPartnersTableSeeder::class);\n $this->call(OurActivitiesTableSeeder::class);\n $this->call(PaymentsTableSeeder::class);\n $this->call(RefundsTableSeeder::class);\n $this->call(SellerStoriesTableSeeder::class);\n $this->call(WithdrawalsTableSeeder::class);\n\n // factory(App\\User::class,5)->create();\n // factory(App\\Model\\Product::class,50)->create();\n // factory(App\\Model\\Review::class,300)->create();\n }", "title": "" }, { "docid": "9f18c5c0d91d41c0a8c01c0872701c3c", "score": "0.7667622", "text": "public function run()\n {\n //Trucates exising records to start from scratch\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n User::create([\n 'username'=> \"t@gml.com\",\n 'email' => \"t@gml.com\",\n 'password'=>bcrypt(\"t@gml.com\")\n ]);\n\n DB::table(\"activations\")->insert([\n 'user_id'=>1,\n 'code'=>'4rxpG9JWnDDTv3SNUHjsC3RsUwhlZgez',\n 'completed'=> 1,\n 'completed_at'=>Carbon::now(),\n 'created_at'=> Carbon::now(),\n 'updated_at'=> Carbon::now()\n ]);\n\n\n }", "title": "" }, { "docid": "b8a2d239e166712dd77165697867a5de", "score": "0.7667615", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n// Task::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 < 20; $i++) {\n Task::create([\n 'name' => $faker->name,\n 'status' => $faker->randomElement($array = array ('to-do','doing','done')),\n 'description' => $faker->paragraph,\n 'start' => $faker->dateTime($min = 'now', $timezone = null) ,\n 'end' => $faker->dateTime($min = 'now', $timezone = null) ,\n 'assignee' => $faker->randomElement(User::pluck('id')->toArray()),\n 'assigner' => $faker->randomElement(User::pluck('id')->toArray()),\n ]);\n }\n }", "title": "" }, { "docid": "06f416db2b8ef80c81b9ff3ec0e65217", "score": "0.76615864", "text": "public function run()\n {\n $this->call([\n ContentSeeder::class,\n MetadataSeeder::class,\n// CategorySeeder::class,\n SliderSeeder::class,\n UserSeeder::class,\n ]);\n// factory('App\\Termination',10)->create();\n// factory('App\\Subcategory',10)->create();\n// factory('App\\Closure',10)->create();\n// factory('App\\Capacity',10)->create();\n $this->call(ContentsTableSeeder::class);\n $this->call(SlidersTableSeeder::class);\n }", "title": "" }, { "docid": "e508532bee1083b015a68a8047e78ca6", "score": "0.7659981", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => 'test1@t.t',\n 'name' => 'Dominic',\n ]);\n\n factory(User::class)->create([\n 'email' => 'test2@t.t',\n 'name' => 'Kira',\n ]);\n\n factory(User::class)->create([\n 'email' => 'test3@t.t',\n 'name' => 'Less',\n ]);\n }", "title": "" }, { "docid": "30dac972abaa34409e5f3917314fcb65", "score": "0.765996", "text": "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "title": "" }, { "docid": "c5a6368cf4078a0a4d8b652f1ce43194", "score": "0.76579833", "text": "public function run()\n {\n // Create roles\n $this->call(RoleTableSeeder::class);\n // Create example users\n $this->call(UserTableSeeder::class);\n // Create example city\n $this->call(CitiesTableSeeder::class);\n // Create example restaurant type\n $this->call(RestaurantsTypesSeeder::class);\n // Create example restaurant\n $this->call(RestaurantsSeeder::class);\n }", "title": "" } ]
754dd5dd7fa4d5b4ba4558d3778cb4cc
Gets the value of the InstanceType property.
[ { "docid": "3ded85b9fc2de80e7edd824e6fa74b16", "score": "0.8194765", "text": "public function getInstanceType() \n {\n return $this->_fields['InstanceType']['FieldValue'];\n }", "title": "" } ]
[ { "docid": "95460abaeb531a3fa3770a6cffe288b6", "score": "0.6605453", "text": "public function getType() {\n return $this->get(self::TYPE);\n }", "title": "" }, { "docid": "45c7715e7404764a423aa7fd3cf2b465", "score": "0.6599821", "text": "public function getType()\n {\n return $this->getProperty('type');\n }", "title": "" }, { "docid": "6e18b23ae4ad1c422a8593d300604c9e", "score": "0.65593123", "text": "public function getType()\n {\n\n return $this->type;\n }", "title": "" }, { "docid": "399416775e2fd2bb442fe9dc470d044e", "score": "0.6546434", "text": "public function getType()\n {\n return $this->get(self::TYPE);\n }", "title": "" }, { "docid": "25432b1d08e1e04ef88cca4acd466e38", "score": "0.6544349", "text": "public function getType()\n {\n return self::TYPE;\n }", "title": "" }, { "docid": "25432b1d08e1e04ef88cca4acd466e38", "score": "0.6544349", "text": "public function getType()\n {\n return self::TYPE;\n }", "title": "" }, { "docid": "d9eb20f836684d06d51916f6f685d21c", "score": "0.6536286", "text": "public function getType() {\n return $this->type;\n }", "title": "" }, { "docid": "d9eb20f836684d06d51916f6f685d21c", "score": "0.6536286", "text": "public function getType() {\n return $this->type;\n }", "title": "" }, { "docid": "d9eb20f836684d06d51916f6f685d21c", "score": "0.6536286", "text": "public function getType() {\n return $this->type;\n }", "title": "" }, { "docid": "d9eb20f836684d06d51916f6f685d21c", "score": "0.6536286", "text": "public function getType() {\n return $this->type;\n }", "title": "" }, { "docid": "d9eb20f836684d06d51916f6f685d21c", "score": "0.6536286", "text": "public function getType() {\n return $this->type;\n }", "title": "" }, { "docid": "d9eb20f836684d06d51916f6f685d21c", "score": "0.6536286", "text": "public function getType() {\n return $this->type;\n }", "title": "" }, { "docid": "d9eb20f836684d06d51916f6f685d21c", "score": "0.6536286", "text": "public function getType() {\n return $this->type;\n }", "title": "" }, { "docid": "d9eb20f836684d06d51916f6f685d21c", "score": "0.6536286", "text": "public function getType() {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6527615", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6527615", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6527615", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6527615", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6527615", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6527615", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "c316a37c3c4fc9554f3c57195cab2c90", "score": "0.6511367", "text": "public function type() {\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "dd778fb0f3f145741be048aca1d2a1d8", "score": "0.6501604", "text": "public function getType() {\n return $this->offsetGet('type');\n }", "title": "" }, { "docid": "de16e4b46d69ea18830df8d3aa54e7c7", "score": "0.6500565", "text": "public function getType() {\r\n return $this->type;\r\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.64954966", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" } ]
92997e967ef4104685ae6e37db160b64
code goes here that will be run every 5 seconds.
[ { "docid": "22b3c0f33e1bf23fa049832d893f197a", "score": "0.0", "text": "public function indexAction() {\n\n\n\n\n return $this->render('AdministrateurBundle:Default:index.html.twig', array());\n }", "title": "" } ]
[ { "docid": "17bf97ec69c69541b9becd9217e57648", "score": "0.71200764", "text": "private function Cron5() {\r\n global $jobs;\r\n \r\n while( $job = $jobs->Job() )\r\n if( $job[ \"interval\" ] == 5 )\r\n eval( $job[ \"job\" ] );\r\n }", "title": "" }, { "docid": "604b0cf8f05387fb969db90b0bd36eb5", "score": "0.6842196", "text": "private function rateLimit()\n {\n if($this->rateLimitCounter++ >= 5){\n sleep(1);\n $this->rateLimitCounter = 0;\n }\n }", "title": "" }, { "docid": "f40d64a63935bc8ede2d14d10f6b4611", "score": "0.6650451", "text": "public function everyFiveMinutes()\n {\n return $this->everyNMinutes(5);\n }", "title": "" }, { "docid": "f8a17d48ae61b76800892067700a61b2", "score": "0.6580443", "text": "public function run()\n {\n MonitorEvent::factory()->count(5000)->create();\n }", "title": "" }, { "docid": "72111a094984c104f3c8f66bce2b339e", "score": "0.6579773", "text": "public function everyFiveMinutes()\n {\n return $this->spliceIntoPosition(1, '*/5');\n }", "title": "" }, { "docid": "b7189ec00ef7c2f51ef3f8884b21abce", "score": "0.606198", "text": "public function run()\n {\n for ($i = 0; $i < 1700; $i++) {\n HubPost::factory()->times(1)->create();\n }\n }", "title": "" }, { "docid": "985232c300cff193097d448f0a0ae754", "score": "0.6041142", "text": "public function run()\n {\n //\n //factory(::class,2)->create();\n Thread::factory()\n ->times(5)\n ->create();\n }", "title": "" }, { "docid": "49af61a44bd88c1e3b232a1dfffc0f4c", "score": "0.5966124", "text": "public function Fire() {\r\n global $cronlogs;\r\n \r\n $nowdate = NowDate();\r\n $sql = \"INSERT INTO\r\n `$cronlogs`\r\n ( `cronlog_id` , `cronlog_date` )\r\n VALUES( '' , '$nowdate' );\";\r\n bcsql_query( $sql );\r\n \r\n $this->croncount++;\r\n $minutecount = $this->croncount * 5; // runs every five minutes\r\n $this->Cron5();\r\n if( $minutecount % 60 ) {\r\n $this->Cron60();\r\n if( $minutecount %1440 ) {\r\n $this->Cron1440();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3d9a7420bb3a3aece6acba75a72eee7e", "score": "0.5958753", "text": "public function run()\n {\n DB::table('sleep')->delete();\n $today = (new DateTime())->add(new DateInterval('P'.'2'.'D'));\n $date = $today;\n $username = 'Mike';\n\n for($i=0;$i<200;$i++) {\n $sleep_minutes = random_int(240,600);\n $deep_minutes = random_int(60,$sleep_minutes);\n $sleep_start = TimeUtil::rand_time($today->format('Y-m-d').'00.00.00',$today->format('Y-m-d').'04:00:00');\n DB::table('sleep')->insert([\n 'username'=>$username,\n 'date'=>$date->format('Y-m-d'),\n 'sleep_minutes'=>$sleep_minutes,\n 'deep_minutes'=>$deep_minutes,\n 'start'=>$sleep_start,\n 'end'=>TimeUtil::time_add_minute($sleep_start,$sleep_minutes),\n ]);\n $date = date_sub($today, new DateInterval('P'.'1'.'D'));\n }\n }", "title": "" }, { "docid": "066cf56a243c320846145c039bcb3eb8", "score": "0.5955354", "text": "public function sleep()\n {\n }", "title": "" }, { "docid": "0612d93fb7c27a4b56bc2b49fd1e8215", "score": "0.59256715", "text": "function setNext() {\r\n for($i =0; true; $i = $i + 86400) {\r\n foreach($this->genShed as $t) {\r\n if(strtotime($t)+$i -5 > time()) {\r\n $this->nextGen = strtotime($t) +$i;\r\n return;\r\n }\r\n }\r\n }\r\n $this->nextGen = strtotime('1/1/3020 00:00:00');\r\n $this->msg('#botstaff', \"Stats Generator failed to update next runtime, setting to run on $this->nextGen\");\r\n }", "title": "" }, { "docid": "15e0eb44d519eb11d6da9f3a902a5be1", "score": "0.5899952", "text": "public function run()\n {\n for ($i=0;$i<1440;$i++) {\n $secunds = intval($i%60);\n $total_minutes = intval($i/60);\n $minutes = $total_minutes%60;\n $hours = intval($total_minutes/60);\n Timer::create([\n 'time' => \"$hours:$minutes:$secunds\",\n 'light' => 0,\n 'co2' => 0,\n ]);\n }\n }", "title": "" }, { "docid": "1c9d45875c60884fdb581c966d0de0e8", "score": "0.588821", "text": "private function __clear_timer()\n {\n $tmid = 0;\n\n while($tmid < 5)\n {\n @swoole_timer_clear($tmid);\n $tmid++;\n }\n }", "title": "" }, { "docid": "d94f8c748c4c6f07765e92fdb8031c80", "score": "0.5860515", "text": "private function __sleep()\r\n\t{\r\n\t}", "title": "" }, { "docid": "54b2083e181be434c736016e21d00dde", "score": "0.5849035", "text": "public function run()\n {\n Pengurus::factory()\n ->times(10)\n ->create();\n }", "title": "" }, { "docid": "859360bb1f130939cced44cef36ef273", "score": "0.58386236", "text": "protected function sleep()\n\t{\n\t\tsleep($this->interval);\n\t}", "title": "" }, { "docid": "1d3b6c4a87bf96fffc667b5e8bbb9514", "score": "0.5822239", "text": "public function run()\n {\n R_Produit_DemandePrestation::factory()->times(count:60)->create();\n }", "title": "" }, { "docid": "935c7622e609e1d97ac35bc52a25e13f", "score": "0.5817933", "text": "private function __sleep() {}", "title": "" }, { "docid": "935c7622e609e1d97ac35bc52a25e13f", "score": "0.5817933", "text": "private function __sleep() {}", "title": "" }, { "docid": "935c7622e609e1d97ac35bc52a25e13f", "score": "0.5817933", "text": "private function __sleep() {}", "title": "" }, { "docid": "3807c38513b857335ef72bdf50756fbc", "score": "0.57845736", "text": "public function run()\n {\n $i = 1;\n while ($i <= 5) {\n Slider::create([\n \"image\" => \"https://raw.githubusercontent.com/darektoa/village-website/main/src/assets/images/profile/slide_$i.jpeg\",\n ]);\n $i++;\n }\n }", "title": "" }, { "docid": "d43b6730b9a7a9e9ca87037ec052ad36", "score": "0.57645243", "text": "private function pauseInHalfOfSeconds()\n { \n // send 2 emails per seconds \n sleep(1); \n }", "title": "" }, { "docid": "bb138a2a2258a3f1ac15ffdb08da81d0", "score": "0.5758957", "text": "public function onTimer() {\r\n\r\n }", "title": "" }, { "docid": "9b4ec745cc08b5e7c56705aabd8a5e6f", "score": "0.5757217", "text": "public function run()\n {\n Payment::factory(1000)->times(50);\n }", "title": "" }, { "docid": "dce34ad71f1fb7217fea9e31be60179f", "score": "0.57546765", "text": "protected function rest ()\n {\n sleep(rand(3, $this->sleep_timing));\n }", "title": "" }, { "docid": "196bc5c8c9cd92bb32175a9fa3e722ec", "score": "0.5735494", "text": "public function DelayBot()\n\t{\n\t\tif ($this->delay_bot_count >= 5) {\n\t\t\t$this->delay_bot = $this->delay_bot_default;\n\t\t\t$this->delay_bot_count = 0;\n\t\t}\t\n\n\t\techo \"[INFO] Delay {$this->delay_bot}\".PHP_EOL;\n\t\tsleep($this->delay_bot);\n\t\t$this->delay_bot = $this->delay_bot+5;\n\t\t$this->delay_bot_count++;\n\t}", "title": "" }, { "docid": "7091d777b25ce44610729d339f0940e7", "score": "0.5708739", "text": "public function run()\n {\n for ($i=0; $i < 6; $i++) {\n DB::table('bukus')->insert([\n 'judul' => Str::random(10),\n 'pengarang' => Str::random(10),\n 'tahun_terbit' => Carbon::now()->subMinutes(rand(1, 55)), \n ]);\n }\n }", "title": "" }, { "docid": "f8cce536a0f43479789750ac6b376534", "score": "0.570246", "text": "public function __sleep(){\n }", "title": "" }, { "docid": "670157b7a8eebf81d81574b4b4c7439e", "score": "0.5702107", "text": "public function interval()\n {\n call_user_func($this->callback);\n }", "title": "" }, { "docid": "541c13af2fb2930e143174709c4c31fc", "score": "0.5682559", "text": "public function __sleep() {}", "title": "" }, { "docid": "310d75c371bca206b1336d7eaab42843", "score": "0.568028", "text": "function run(){\n Cron::MailFetcher();\n Cron::TicketMonitor();\n cron::PurgeLogs();\n }", "title": "" }, { "docid": "b321a169fcbd244c5c9948ba567e8c98", "score": "0.567929", "text": "public function run()\n {\n for ($i=0; $i < 5; $i++) { \n \tDB::table('hotels')->insert([\n \t\t'nombre' => str_random(10),\n 'direccion' => str_random(10),\n 'categoria' => rand(1,5),\n 'completo' => false,\n 'antiguedad' => '2010-11-20'\n \t]);\n }\n }", "title": "" }, { "docid": "8d2fdf629654bb0ce4f5f6442f620bfb", "score": "0.5665426", "text": "public function run()\n {\n\n factory(NEstudio::class)->times(5)->create();\n\n }", "title": "" }, { "docid": "d72b1ca751d6940c7d514127c22dff68", "score": "0.566128", "text": "public function run()\n {\n \\DB::table('activities')->truncate();\n for($i=0;$i<5;$i++) {\n $peerInt=$i+1;\n if($i==4)\n $peerInt=1;\n DB::table('activities')->insert([\n 'name' => str_random(10),\n 'description' => str_random(10),\n 'duration' => str_random(10),\n 'id_peer' => $peerInt\n ]);\n }\n }", "title": "" }, { "docid": "b7428469cc68dbf4ee22aefdbbce2cd5", "score": "0.5659915", "text": "public function run()\n {\n Tracker::factory()\n ->count(20)\n ->create();\n }", "title": "" }, { "docid": "acdf8b483a9be3c65c79da857121d089", "score": "0.5658536", "text": "public function run()\n {\n while(1)\n {\n $currentTime = date('m-d-G:i:00');\n $this->reader->open('http://www.siriusxm.com/metadata/pdt/en-us/xml/channels/hardattack/timestamp/'.$currentTime);\n $output = $this->reader->parse();\n\n $song_title = $output['value'][2]['value'][3]['value'][6]['value'][15]['value'];\n $song_artist = $output['value'][2]['value'][3]['value'][0]['value'][1]['value'];\n $now_playing = \"Now Playing: $song_title by $song_artist\";\n\n if($this->current_playing == $now_playing)\n {\n // Song hasn't changed. Do nothing. Log cycle.\n echo '.';\n }\n else\n {\n echo PHP_EOL;\n // New song. Update current_playing and send alert.\n $this->current_playing = $now_playing;\n $this->hc->message_room($this->hipchat_room, 'SiriusXM', $this->current_playing);\n echo $this->current_playing . PHP_EOL;\n }\n\n sleep(30);\n }\n }", "title": "" }, { "docid": "ddce230f6b692836879a0567129cded6", "score": "0.5641675", "text": "public function run()\n {\n for($i = 0; $i < 100; $i++)\n {\n App\\Metrick::create([\n 'site' => 'somesite.com',\n 'clientX' => rand(0, 999),\n 'clientY' => rand(0, 999),\n 'date' => \"2020-06-23\",\n 'hour' => rand(0, 23),\n ]);\n }\n }", "title": "" }, { "docid": "f04d765aafce656fd1a765faa36cbd9c", "score": "0.5632309", "text": "public function run()\n {\n for ($i = 1; $i <= 20; $i++)\n {\n DB::table('events')->insert([[\n 'email' => 'person@hotmail.com',\n 'phonenumber' => '04'.rand(10, 90).rand(10, 90).rand(10, 90).rand(10, 90),\n 'date' => date('Y-m-d', strtotime(\"+\".rand(30, 90).\" days\")),\n 'start' => rand(12, 18).':'.rand(0, 60).':00',\n 'end' => rand(19, 24).':'.rand(0, 60).':00',\n ]]);\n }\n }", "title": "" }, { "docid": "b4fdd1b84b75d10220b3b02a308e900f", "score": "0.5576666", "text": "public function run()\n {\n for ($i=0; $i < 10; $i++) { \n \t\tDB::table('customevents')->insert([\n \t\t\t'name' => \"event$i\",\n \t\t\t'city' => \"city$i\",\n \t\t\t'date' => date(\"d:m:y\"),\n\n \t\t]);\n \t}\n }", "title": "" }, { "docid": "4e12b5793b24d610f708496c762d38d9", "score": "0.55748093", "text": "function runUpdater(){\n global $taws_server_config;\n //date_default_timezone_set( 'UTC' );\n date_default_timezone_set( $taws_server_config[ 'php_timezone' ] );\n \n while( true ){\n //day\n time_sleep_until( strtotime( \"{$taws_server_config[ 'automatic_update_every' ]}\", mktime( 0, 0, 0 ) ) );\n //time\n //echo strtotime( \"+1 day\", mktime( 0, 0, 0 ) );\n //echo strtotime( \"{$taws_server_config[ 'automatic_update_at' ]}\" ) . \" == \" . time();\n time_sleep_until( strtotime( \"{$taws_server_config[ 'automatic_update_at' ]} +1 sec\" ) );\n // It's time to update \n update();\n //done! that is it.\n } \n }", "title": "" }, { "docid": "92545f11edaa0f14324c4a2cb62885e2", "score": "0.55463225", "text": "public function run()\n {\n Todo::truncate();\n\n for ($i = 0; $i < 5; $i++) {\n Todo::create([\n 'task' => 'seeded task ' . ($i + 1)\n ]);\n }\n }", "title": "" }, { "docid": "703508b230f0e0adf9e211219292694d", "score": "0.5529935", "text": "public function run()\n {\n for ($i = 0; $i < 8; $i++) {\n \\App\\Models\\Hub::factory()->times(1)->create();\n }\n }", "title": "" }, { "docid": "4a2d322330cc13422c58a4964314c1dd", "score": "0.552872", "text": "public function run()\n {\n for($i=0;$i<5;$i++)\n \t{\n\t DB::table('offres')->insert([\n\t\t\t\t'intitule' => Str::random(10),\n\t\t\t\t'description' => Str::random(50),\n\t\t\t\t'duree' => Str::random(10),\n\t\t\t\t'date_debut' => Carbon::now(),\n\t\t\t\t'date_fin' => Carbon::now(),\n\t\t\t\t'entreprise' => Str::random(8),\n\t\t\t\t'ville' => Str::random(10),\n\t\t\t\t'email' => Str::random(12),\n\t\t\t\t'tel' => Str::random(8),\n\t\t\t\t'PDF' => 'pdf'.$i,\n\t\t\t\t'valideO/N' => 0,\n\t\t\t\t'archiveO/N' => 0,\n\t\t\t\t'categorie_id' => 2,\n\t\t\t\t'type_id' => 5,\t\t\n\t \t\t]);\n\t }\n }", "title": "" }, { "docid": "9ef627e594b9428f3117f15c9d1fbc68", "score": "0.5526159", "text": "public function run()\n {\n for ($i = 1; $i <= 5; $i++) {\n DB::table('contacts')->insert([\n 'fullname' => \"Contact \".$i,\n 'object' => 'sujet',\n 'message' => \"lorem lorem lorem\",\n 'email' => 'email'.$i.'@email.fr',\n 'is_read' => mt_rand(0,1),\n 'created_at' => Date('Y-m-d H:i:s')\n ]); \n }\n }", "title": "" }, { "docid": "2d58cc743e4422e82284ea6d9debc8cb", "score": "0.55257124", "text": "private function throttle()\r\n {\r\n // Pause for a quarter second.\r\n usleep(250000);\r\n }", "title": "" }, { "docid": "5f808540f0160289bb39d58b5b1ca489", "score": "0.5510385", "text": "public function run()\n {\n \tfor ($i=1; $i <= 5; $i++) {\n \t\tDB::table('rooms')->insert([\n \t\t\t'room_name' => Str::random(7),\n \t\t\t'boss' => Str::random(10) ,\n \t\t\t'status' => 1, \t\n \t\t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t\t'updated_at' => null\n \t\t]);\n \t}\n }", "title": "" }, { "docid": "eb40edca374435ff0e057deebeacda52", "score": "0.54966587", "text": "public function run()\n {\n //\n $batchcount = DB::table('batches')->count();\n for ($i = 1; $i <= 5; $i++) {\n \n DB::table('enrolledbatches')->insert([\n 'batch' => rand(1, $batchcount),\n 'user_id' => $i,\n ]);\n }\n }", "title": "" }, { "docid": "444373f69990ecffe3393d6db4e6e1ca", "score": "0.5495995", "text": "public function DelayBot()\n\t{\n\t\tif ($this->delay_bot_count >= 5) {\n\t\t\t$this->delay_bot = $this->delay_bot_default;\n\t\t\t$this->delay_bot_count = 0;\n\t\t}\t\n\n\t\techo \"[•] Delay {$this->delay_bot}\".PHP_EOL;\n\t\tsleep($this->delay_bot);\n\t\t$this->count_delay += $this->delay_bot;\n\t\t$this->delay_bot = $this->delay_bot+5;\n\t\t$this->delay_bot_count++;\n\t}", "title": "" }, { "docid": "1dda0602b1f43ef0974174f22cab8d36", "score": "0.5495406", "text": "public static function refreshTimer() {\n\t\t$actual_cart = Cart::active();\n\t\tif (!empty($actual_cart)) {\n\t\t\t$items = $actual_cart->data();\n\t\t}\n\t\t#Refresh the counter of each timer to 15 min\n\t\tif (!empty($items)) {\n\t\t\t#Security Check - Max 25 items\n\t\t\tif(count($items) < 25) {\n\t\t\t\tforeach ($items as $item) {\n\t\t\t\t\tif (is_array($item) && !array_key_exists('event', $item) && !array_key_exists('end_date', $item) ){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$event = Event::find('first',array('conditions' => array(\"_id\" => $item['event'][0])));\n\t\t\t\t\t$now = getdate();\n\t\t\t\t\t$currentSec = is_object($event['end_date']) ? $event['end_date']->sec : $event['end_date'];\n\t\t\t\t\tif(($currentSec > ($now[0] + (15 * 60)))) {\n\t\t\t\t\t\t$cart_temp = Cart::find('first', array(\n\t\t\t\t\t\t\t'conditions' => array('_id' => $item['_id'])));\n\t\t\t\t\t\t$cart_temp->expires = new MongoDate($now[0] + (15 * 60));\n\t\t\t\t\t\t$cart_temp->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t#Reset Savings on Session\n\t\t\t\tSession::write('userSavings', 0);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d9de7a70f56d86b50f3d1f7decdd7483", "score": "0.5489026", "text": "public function run()\n {\n //\n for ($i = 0; $i < 50; $i++) {\n DB::table('guests')->insert([\n 'guest_name' => Str::random(10),\n 'guest_email' => Str::random(6) . '@gmail.com',\n 'guest_message' => Str::random(100),\n ]);\n }\n }", "title": "" }, { "docid": "71677b618724292cbaf828c34b56754c", "score": "0.5487088", "text": "final private function __sleep() {}", "title": "" }, { "docid": "111e5e36b4b4a14c9d2f400c1e0f7e64", "score": "0.5485814", "text": "function mh_activation() {\n\t\twp_schedule_event( current_time ( 'timestamp' ), 'minutes15', 'mh_15minutes_event_hook' );\n\t}", "title": "" }, { "docid": "c306ea4d4a3b0e04b3e27ffeab4d31b6", "score": "0.54774076", "text": "public function run()\n {\n \t// DB::table('jumps')->truncate();\n \t// DB::table('naps')->truncate();\n \t// DB::table('rolls')->truncate();\n \t// DB::table('smiles')->truncate();\n // Jumps\n for ($i=0; $i < 40; $i++) { \n \t\\App\\Models\\Jump::create([\n \t\t'amount' => rand(0,10),\n\t\t 'device_id' => 19,\n\t\t 'pet_id' => 13\n \t]);\n\n \t\\App\\Models\\Nap::create([\n \t\t'amount' => rand(0,10),\n\t\t 'device_id' => 19,\n\t\t 'pet_id' => 13\n \t]);\n\n \t\\App\\Models\\Roll::create([\n \t\t'amount' => rand(0,10),\n\t\t 'device_id' => 19,\n\t\t 'pet_id' => 13\n \t]);\n\n \t\\App\\Models\\Smile::create([\n \t\t'amount' => rand(0,10),\n\t\t 'device_id' => 19,\n\t\t 'pet_id' => 13\n \t]);\n\n \tsleep(10);\n }\n }", "title": "" }, { "docid": "041010da363d74e21eecf295d01ec9d2", "score": "0.547697", "text": "public function run()\n {\n //\n\n\n for ( $x = 0; $x <= 5; $x++) {\n\n\n\t $users = User::all()->each(function ($b_user, $key){\n\n\t \t$hash = md5( $b_user->id. str_random(15) );\n\n\t \tLink::create([\n\n\t \t\t\n\n\t \t\t'link' => 'http://127.0.0.1/link/detect/'.$hash,\n\t 'hash' => $hash,\n\t 'user_id' => $b_user->id,\n\t 'confirmed' => true,\n\t 'level' => 2\n\n\n\t \t]);\n\n\t });\n\n\t\t \n\t\t}\n\n\n\n\n\n }", "title": "" }, { "docid": "60f44aa73f8af8546ad75b8860da3711", "score": "0.54721135", "text": "public function run()\n\t{\n\t}", "title": "" }, { "docid": "068dc105a0d61eead6389d8f7516d45c", "score": "0.5460518", "text": "public function run()\n {\n for($i = 1; $i <= 5; $i++) {\n DB::table('tags')->insert([\n 'name' => 'Tag_'.$i,\n 'is_official' => rand(0, 1),\n 'content' => str_random(),\n 'slug' => str_random(),\n 'category_id' => 1,\n ]);\n }\n }", "title": "" }, { "docid": "e1bc333c94cbb127e6e4d002d7e7ceda", "score": "0.54538304", "text": "function run()\n\t{\n\t\twhile (1)\n\t\t{\n\n\t\t\t/**\n\t\t\t * Randomly pick images so we can run same file multiple times to initiate multipler threads.\n\t\t\t */\n\t\t\tsrand(time());\n\t\t\t$id = mt_rand(0, 100442) + mt_rand(1, 88442);\n\t\t\t$this->db->query(\"SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;\");\n\t\t\t$img = $this->db->getResults('*',DB_TABLE, ' post_status = \"inherit\" ',' rand() ', 0, 1);\n\t\t\t$this->db->query(\"COMMIT;\");\n\n\t\t\t$img = $this->db->getObject($img);\n\n\t\t\t// Mark image to be in process\n\t\t\t$this->db->query(\"update \".DB_TABLE.\" set post_status = 'in_process' where ID='\".$img->ID.\"'; \");\n\n\t\t\t// Check image status\n\t\t\t$status = $this->get_url_status($img->guid);\n\t\t\t// var_dump($status);\n\n\t\t\t//\n\t\t\t/**\n\t\t\t * Update post_status with the http status\n\t\t\t * Run following SQL Query to view cron results by http-status\n\t\t\t * SELECT post_status, COUNT(*) FROM DB_TABLE GROUP BY post_status\n\t\t\t */\n\t\t\t$this->db->query(\"update \".DB_TABLE.\" set post_status = '\".$status.\"' where ID='\".$img->ID.\"'; \");\n\t\t\techo '.';\n\t\t}\n\n\t}", "title": "" }, { "docid": "50d5b1fb384dc61e1b1cb3f8b95d7229", "score": "0.5450094", "text": "protected function speedUp()\n {\n $config = $this->getConfig();\n\n if (isset($config['interval']))\n $this->setInterval($config['interval']);\n else\n $this->setInterval(10);\n }", "title": "" }, { "docid": "57c07ed2e0852ce5f102d9c0db57fca6", "score": "0.5447442", "text": "static function onTick()\n\t{\n\t\tforeach(self::$aTimers as $sTimerKey => &$pTimerInfo)\n\t\t{\n\t\t\tif(microtime(true) <= $pTimerInfo->nextTimerCall)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(Core::invokeReflection($pTimerInfo->timerCallback, $pTimerInfo->timerArguments, $pTimerInfo->timerEnvironment) === true)\n\t\t\t{\n\t\t\t\t$pTimerInfo->timerRepeat = 0;\n\t\t\t}\n\n\t\t\t$pTimerInfo->nextTimerCall = (float) microtime(true) + (float) $pTimerInfo->timerInterval;\n\n\t\t\tif($pTimerInfo->timerRepeat == -1)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t--$pTimerInfo->timerRepeat;\n\n\t\t\tif($pTimerInfo->timerRepeat === 0)\n\t\t\t{\n\t\t\t\tunset(self::$aTimers[$sTimerKey]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3b18e3a938d7bfbf09c71da2f23639c2", "score": "0.54441243", "text": "public function run()\n {\n //\n for ($i=0; $i < 3; $i++) { \n DB::table('sliders')->insert([\n 'image' =>'images/special-bg.jpg',\n 'effect' => 'Power3.easeInOut',\n 'title' => Str::random(10),\n 'detail' => Str::random(10),\n 'url' => Str::random(10)\n ]);\n }\n }", "title": "" }, { "docid": "b11db1c691290eb579a6512e45d44ffb", "score": "0.54340917", "text": "function tweet_slideshow_activation() {\n\t\twp_schedule_event(time(), 'hourly', 'tweet_slideshow_parse_twitter_event');\n\t}", "title": "" }, { "docid": "aff297d7a9f1656ff70458e6efa8d8f2", "score": "0.54324454", "text": "public function run()\n {\n for($i = 0; $i < 100; $i++){\n DB::table('user_user_alert')->insert([\n 'user_alert_id' => UserAlert::all()->random()->id,\n 'user_id' => User::all()->whereNotNull('type')->random()->id,\n 'read' => rand(0,1)\n ]);\n }\n }", "title": "" }, { "docid": "20cc7d6517f7e387d88569191ea374ae", "score": "0.54205555", "text": "public function run()\n {\n for ($i=0; $i < 5 ; $i++) { \n Setting::create([\n 'allow_public_quotation' => rand(0,1),\n 'allow_public_scheduling' => rand(0,1),\n ]); \n }\n }", "title": "" }, { "docid": "ccae90ef4e74bb316b47844ace6d3ed9", "score": "0.54190457", "text": "public function run()\n {\n for ($i = 0;$i<5;$i++)\n {\n $xfahrer = new xfahrer();\n $xfahrer->PKZ = 'tes';\n $xfahrer->DAT = \"2015-\".$i.\"-04 00:00:00\";\n $xfahrer->save();\n }\n }", "title": "" }, { "docid": "f1b8f9672640587dabde1cd0feddfd5e", "score": "0.54165965", "text": "public function run()\n {\n for($i=1;$i<=5;$i++)\n {\n $id = DB::table('categorys')->insertGetId([\n 'pid' => 0,\n 'title' => '分类'.$i,\n 'summary' => 'summary-'.$i,\n 'path'=>\"0\",\n ]);\n\n $num = mt_rand(5,15);\n for ($j=1;$j<=$num;$j++)\n {\n DB::table('categorys')->insert([\n 'pid' => $id,\n 'title' => \"分类-{$i}-{$j}\",\n 'summary' => \"分类summary-{$i}-{$j}\",\n 'path'=>\"0-{$id}\",\n ]);\n }\n }\n }", "title": "" }, { "docid": "1862176ae90ea6f2f2b680285f4e8af9", "score": "0.5414494", "text": "public function run()\n {\n \tfor ($i=0; $i < 10; $i++) { \n\t DB::table('messages')->insert([\n\t \t'nombre' => str_random(10),\n\t \t'mensaje' => str_random(10),\n\t \t'email'=> str_random(10).'@gmail.com',\n\t \t'mayorDeEdad' => random_int(0, 1),\n\t \t'salario' => random_int(0, 10)/1.5,\n\t \t'fecha_nacimiento'=>random_int(1500, 2500).\"/\".random_int(1, 12).\"/\".random_int(1, 28),\n\t \t'contrasena'=>bcrypt(str_random(10)),\n\t \t'descripcion'=>str_random(100)\n\t \t]);\n }\n }", "title": "" }, { "docid": "4f122704dc3c6b5844369489b4129c10", "score": "0.5408608", "text": "public function run()\n {\n Boxer::factory() -> times (50)-> create();\n }", "title": "" }, { "docid": "208ae806f07d024be3a65dfca7e8880d", "score": "0.53850627", "text": "public function run()\n\t\t{\n\t\t}", "title": "" }, { "docid": "fb09611c74bb3fbb3d37e96267b2933e", "score": "0.5371231", "text": "public function run()\n {\n\t\t$today = Carbon::now();\n\t\t//Needs fix, database is DATE... format as time\n\t\t//$startTime = $today->format('H:mm:ss');\n\t\t//$endTime = $today->addHours(3)->format('H:mm:ss');\n\n\n for ($i=1; $i <= 90; $i++) {\n $random = random_int(-30,-1);\n $random_start = random_int(-10,10);\n $random_end = random_int(-10,10);\n $startTime = Carbon::now()->addDays($random)->addMinutes($random_start);\n $endTime = Carbon::now()->addDays($random)->addHours(3)->addMinutes($random_end);\n\t\t\tDB::table('user_stamps')->insert([\n\t\t\t\t'start_time' => $startTime,\n\t\t\t\t'end_time' => $endTime,\n\t\t\t\t'pause' => 15,\n\t\t\t\t'approved' => random_int(0,1),\n\t\t\t\t'shift_id' => random_int(104,194),\n\t\t\t\t'user_id' => random_int(1, 100),\n\t\t\t\t'created_at' => Carbon::now(),\n\t\t\t\t'updated_at' => Carbon::now(),\n\t\t\t]);\n\t\t}\n }", "title": "" }, { "docid": "f18190186504b1d750417447bc4f9921", "score": "0.53698677", "text": "public function run()\n {\n //\n for($i = 0;$i < 50; ++$i)\n DB::table('rmbs')->insert([\n 'money' => rand(0, 5000),\n 'no' => \"'\". str_random(10). \"'\",\n ]);\n }", "title": "" }, { "docid": "8f3ab37531d5b679cbeb44a29ef0dedd", "score": "0.5362217", "text": "private function _startTimer()\n\t{\n // if config is not loaded yet, save stats just in case\n\t\t$showStats = !isset(Cot::$cfg['showsqlstats']) || Cot::$cfg['showsqlstats'];\n\n\t\t$this->_count++;\n\t\tif ($showStats || Cot::$cfg['debug_mode']) {\n\t\t\t$this->_xtime = microtime();\n\t\t}\n\t}", "title": "" }, { "docid": "51da2ccecb39809080e35e102dafd3cc", "score": "0.53597033", "text": "public function run()\n {\n \t$now = Carbon::now();\n\n \tforeach (range(1, 3) as $value) {\n\t\t\t$start = new Carbon($now->addDays(1));\n\t\t\t$end = new Carbon($now->addDays(2));\n \t\tEvent::create([\n 'title' => 'Lorem Ipsum - ' . $value,\n 'location' => 'Test',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - ' . $value,\n 'start' => $start,\n 'end' => $end,\n \t]);\n \t}\n\n }", "title": "" }, { "docid": "7bca1b41616dba20cfb461123da91d09", "score": "0.53589815", "text": "public function sleep(): void\n {\n sleep($this->getConfig()->getSleepFor());\n }", "title": "" }, { "docid": "bba788b130c49c7fc76aff1c88de566d", "score": "0.5348129", "text": "public function run()\n {\n for ($i=0; $i < 10; ++$i) {\n $randName = str_random(5);\n DB::table('users')->insert([\n 'name' => ucfirst($randName),\n 'phone' => '+380'.array_rand(['93', '67', '50', '66']).random_int(1000000, 9999999),\n 'password' => Hash::make($randName),\n 'registration_token' => str_random(5),\n ]);\n }\n }", "title": "" }, { "docid": "4c772695cdbc5a9148fe7830737e6aa7", "score": "0.5342215", "text": "public function main() {\n\n\t\tsleep($this->amount);\n\n\t\t$this->project->setProperty('config.runCheck', true);\n\n\t}", "title": "" }, { "docid": "c99d6b75076cf4c19d7d390969f69f96", "score": "0.5340195", "text": "public function onTick() {\r\n\r\n }", "title": "" }, { "docid": "76152fdbf1aa05ea3ad87d6f04956966", "score": "0.5325649", "text": "public function run()\n { \n $time = ['06-07', '07-08', '08-09', '09-10', '10-11','11-12', '12-13','13-14', '14-15','15-16', '16-17','17-18', '18-19', '20-21','22-23'];\n\n for ($i=0; $i < 50 ; $i++) { \n # code...\n DB::table('daily_outputs')->insert([\n /*'name' => str_random(10),\n 'email' => str_random(10).'@gmail.com',\n 'password' => bcrypt('secret'),*/\n 'line_name'=>6,\n 'time'=>$time[ ceil( rand(0,14) ) ],\n 'minute'=>60,\n 'target_sop'=>ceil( rand(0,100) ),\n 'plus_minus'=>-80,\n 'lost_hour'=>-0.70,\n 'delay_type'=> str_random(30),\n 'problem'=> str_random(50),\n 'dic'=> str_random(2),\n 'action'=> str_random(50),\n 'users_id'=>1,\n 'shift'=>'A',\n 'tanggal'=>'2018-01-10',\n 'osc_output'=>'25'\n ]); \n }\n\n \n }", "title": "" }, { "docid": "104ee66889e942917aecf278e160c944", "score": "0.5325574", "text": "static function gallery_shutdown() {\n try {\n $schedule = ORM::factory(\"schedule\")\n ->where(\"next_run_datetime\", \"<=\", time())\n ->where(\"busy\", \"!=\", 1)\n ->order_by(\"next_run_datetime\")\n ->find_all(1);\n\n if ($schedule->count()) {\n $schedule = $schedule->current();\n $schedule->busy = true;\n $schedule->save();\n\n try {\n if (empty($schedule->task_id)) {\n $task = task::start($schedule->task_callback);\n $schedule->task_id = $task->id;\n }\n\n $task = task::run($schedule->task_id);\n\n if ($task->done) {\n $schedule->next_run_datetime += $schedule->interval;\n $schedule->task_id = null;\n }\n\n $schedule->busy = false;\n $schedule->save();\n } catch (Exception $e) {\n $schedule->busy = false;\n $schedule->save();\n throw $e;\n }\n }\n } catch (Exception $e) {\n Kohana_Log::add(\"error\", (string)$e);\n }\n }", "title": "" }, { "docid": "723a848f530f115f2a0d27f202907341", "score": "0.532004", "text": "public function do_cron() {\n\t\t//\\Artisan::call( 'schedule:run' );\n\n\t\tif( !Cache::has( 'email_check_timeout' ) ) {\n\n\t\t\tCache::put( 'email_check_timeout', true, 60 );\n\n\t\t\tapp()->make( GetNewEmailsController::class )->getNewEmails();\n\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "289a5fd6533f28fcbf592677de13fc46", "score": "0.5319142", "text": "public function run()\n {\n for($i=1;$i<=5;$i++){\n DB::table('tiethoc')->insert([\n 'name' => 'Tiết '.$i,\n ]);\n }\n }", "title": "" }, { "docid": "42d6eb61593416ee02c506f86807a695", "score": "0.53173244", "text": "public function test_every_10_days_5_count() {\n global $DB;\n\n $startdatetime = new DateTime(date('Y-m-d H:i:s', $this->event->timestart));\n $interval = new DateInterval('P10D');\n\n $rrule = 'FREQ=DAILY;INTERVAL=10;COUNT=5';\n $mang = new rrule_manager($rrule);\n $mang->parse_rrule();\n $mang->create_events($this->event);\n\n $records = $DB->get_records('event', ['repeatid' => $this->event->id], 'timestart ASC', 'id, repeatid, timestart');\n $this->assertCount(5, $records);\n\n $expecteddate = new DateTime(date('Y-m-d H:i:s', $startdatetime->getTimestamp()));\n foreach ($records as $record) {\n $this->assertEquals($expecteddate->format('Y-m-d H:i:s'), date('Y-m-d H:i:s', $record->timestart));\n // Go to next period.\n $expecteddate->add($interval);\n }\n }", "title": "" }, { "docid": "7d4b0223ca8033be8a3d591ff8ba4b22", "score": "0.53098893", "text": "public function run()\n {\n $ids = [];\n\n for ($i = 1; $i <= 20; $i++){\n array_push($ids, $i);\n }\n\n DB::table('posts')->whereIn('id', $ids)->update(['views' => 1]);\n }", "title": "" }, { "docid": "67db076352d95b01cc71df33970d1bd2", "score": "0.53059363", "text": "public function run()\n {\n $i = 0;\n\n while ($i < 5) {\n $user = new User();\n $user->name = $this->faker->name;\n $user->email = $this->faker->safeEmail;\n $user->is_admin = $this->faker->boolean(25);\n $user->password = bcrypt('password');\n $user->remember_token = str_random(10);\n\n $user->save();\n $i++;\n }\n }", "title": "" }, { "docid": "01baf537a5b8f825cc2ad16442749eec", "score": "0.5296565", "text": "public function run()\n {\n $app_img_url = factory(AppImgUrl::class)\n ->times(200)\n ->make();\n AppImgUrl::insert($app_img_url->toArray());\n }", "title": "" }, { "docid": "2619aec44d98fe793bc5526feabbec92", "score": "0.5284481", "text": "function run()\n\t{\n\t\trequire_code('user_export');\n\n\t\tif (!USER_EXPORT_ENABLED) return;\n\n\t\t$last=get_value('last_user_export');\n\t\tif ((is_null($last)) || ($last<time()-60*USER_EXPORT_MINUTES))\n\t\t{\n\t\t\tset_value('last_user_export',strval(time()));\n\n\t\t\tdo_user_export();\n\t\t}\n\t}", "title": "" }, { "docid": "a6b5781f7724d2687f252add07de028b", "score": "0.5273295", "text": "function sleep() {\n echo(\"Zzzzzz.<br />\");\n }", "title": "" }, { "docid": "4c915f1d7828fac0e28b129be2b82497", "score": "0.52681017", "text": "public function run()\n {\n $currTweetIndex = 0;\n\n echo \"Tweets will be sent to {$this->endpointUrl} every {$this->delaySeconds} seconds.\\n\\n\";\n while (true) {\n // Get tweets\n $this->getTweets();\n $tweetCnt = count($this->tweets);\n\n // Get current tweet\n $currTweet = $this->tweets[$currTweetIndex] ?? null;\n if ($currTweet) {\n // Send tweet to endpoint\n $result = $this->call($this->endpointUrl, ['tweet' => $currTweet]);\n printf(\"#%d {%s} %s %s\\n\\n\", $currTweetIndex, $currTweet, date('c'), $result['code']);\n\n $currTweetIndex++; // increment else stay at current value till there's a new tweet\n } else {\n printf(\"No new tweets - currTweetIndex %d, %s\\n\", $currTweetIndex, date('c'));\n }\n\n // Delay\n @shell_exec(\"sleep {$this->delaySeconds}\");\n }\n }", "title": "" }, { "docid": "f30ce33620017b83330a8a0f786b0223", "score": "0.5259597", "text": "public function run()\n {\n for ($i=0; $i < 5 ; $i++) {\n $new_service = new Service();\n $new_service->wifi = rand(0, 1);\n $new_service->parking = rand(0, 1);\n $new_service->pets_allowed = rand(0, 1);\n $new_service->air_conditioning = rand(0, 1);\n $new_service->swimming_pool = rand(0, 1);\n $new_service->washingmachine = rand(0, 1);\n $new_service->tv= rand(0, 1);\n $new_service->kitchen = rand(0, 1);\n $new_service->breakfast = rand(0, 1);\n $new_service->save();\n }\n }", "title": "" }, { "docid": "eeb62b5c2ab57a47ec4358c99a094952", "score": "0.5259234", "text": "protected function run()\n {\n //\n }", "title": "" }, { "docid": "14331ef65831e87fe918cf4bad834002", "score": "0.5258638", "text": "public function run()\n {\n TrendingPost::factory()\n ->count(5)\n ->create();\n }", "title": "" }, { "docid": "78c41698d59c8cd0584ce41cd3cdb8cd", "score": "0.52543956", "text": "public function run()\n {\n for ($i = 1; $i <= 5; $i++) {\n Post::create([\n 'user_id' => rand(1, 5),\n 'title' => Str::random(),\n 'view' => $i % 2 == 0 ? rand(10, 80) : null,\n 'status' => $i % 5 == 0 ? true : false,\n 'price' => rand(100, 1000) / 10\n ]);\n }\n }", "title": "" }, { "docid": "7ba2e5ae65d90fa31c4b7a294098956d", "score": "0.52534705", "text": "public function run()\n {\n DB::table('sessions')->insert(['session' => '10:00 - 12:00']);\n DB::table('sessions')->insert(['session' => '12:00 - 14:00']);\n DB::table('sessions')->insert(['session' => '14:00 - 16:00']);\n DB::table('sessions')->insert(['session' => '16:00 - 18:00']);\n }", "title": "" }, { "docid": "d1e264e6389e07c81c7be28c0239e7eb", "score": "0.52489954", "text": "function act_poll_cron()\n\t{\n\t\tUtils::check_request_method( array( 'GET', 'HEAD', 'POST' ) );\n\n\t\t$time = doubleval( $this->handler_vars['time'] );\n\t\tif ( $time != Options::get( 'cron_running' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// allow script to run for 10 minutes. This only works on host with safe mode DISABLED\n\t\tif ( !ini_get( 'safe_mode' ) ) {\n\t\t\tset_time_limit( 600 );\n\t\t}\n\t\t$time = DateTime::create();\n\t\t$crons = DB::get_results(\n\t\t\t'SELECT * FROM {crontab} WHERE start_time <= ? AND next_run <= ? AND active != ?',\n\t\t\tarray( $time->sql, $time->sql, 0 ),\n\t\t\t'CronJob'\n\t\t);\n\n\t\tif ( $crons ) {\n\t\t\tforeach ( $crons as $cron ) {\n\t\t\t\t$cron->execute();\n\t\t\t}\n\t\t}\n\n\t\t// set the next run time to the lowest next_run OR a max of one day.\n\t\t$next_cron = DB::get_value( 'SELECT next_run FROM {crontab} WHERE active != ? ORDER BY next_run ASC LIMIT 1', array( 0 ) );\n\t\tOptions::set( 'next_cron', min( intval( $next_cron ), $time->modify( '+1 day' )->int ) );\n\t\tOptions::set( 'cron_running', false );\n\t}", "title": "" }, { "docid": "f8eab77fa9b2694896b7487adfcce10e", "score": "0.5247431", "text": "public function runStarted() {\n $this->timer->start();\n }", "title": "" }, { "docid": "a45c36b3e4ef09ca5e273fbe0237620e", "score": "0.52462864", "text": "static function online_now()\r\n\t{\r\n\t}", "title": "" }, { "docid": "310bf9c6284767bd543872510f73ab65", "score": "0.5245698", "text": "public function run()\n {\n Activity::factory()->count(1000)->create();\n }", "title": "" }, { "docid": "423011e0152bf318b548a240cc63d777", "score": "0.5245325", "text": "private function waitForResult(): void\n {\n for($i = 0; $i < 5; $i++) {\n sleep(1);\n }\n }", "title": "" }, { "docid": "b54d09e59e1641cf32c9df0d7c899e9b", "score": "0.524493", "text": "public function initialize(){\n\t\t$config = new Config($this->configFile, Config::YAML, array(\n\t\t\t\"time-interval-to-log-in-seconds\"=>1, \"graphing\"=>array(\n\t\t\t\t\"milliseconds-per-space\"=>40)));\n\t\t$interval=$config->get(\"time-interval-to-log-in-seconds\"*20);\n\t\t$this->server->getScheduler()->scheduleRepeatingTask(new LogPingTask($this), $interval);\n\t\t$this->unit=$config->get(\"milliseconds-per-space\");\n\t}", "title": "" }, { "docid": "4b9fad3cacc77cd7d2833424cd2979d2", "score": "0.52437216", "text": "public function run(): void\n {\n for ($i = 0; $i < 100; $i++) {\n \\App\\Models\\Data::insert([\n 'data' => random_int(240, 360) / 10,\n 'user_id' => 1,\n 'sensor_id' => 1,\n 'node_id' => 1,\n 'created_at' => Carbon::now()->subDays(random_int(0, 14)),\n 'updated_at' => Carbon::now()->subDays(random_int(0, 14)),\n ]);\n }\n }", "title": "" }, { "docid": "da5a0422d260525c2ecb05342d486358", "score": "0.52409613", "text": "public static function cron_minute(Application $application): void {\n\t\ttry {\n\t\t\t$server = self::singleton($application);\n\t\t\t$server->updateState();\n\t\t} catch (Throwable $e) {\n\t\t\t$application->logger->error(\"Exception {class} {code} {file}:{line}\\n{message}\\n{backtrace}\", Exception::exceptionVariables($e));\n\t\t}\n\t}", "title": "" }, { "docid": "39d7d3226b11558b9710739d0ac3d299", "score": "0.52399683", "text": "public function run()\n {\n for($i=1;$i<50;$i++){\n DB::table('domain')->insert([\n 'domain' => 'ixiqin'.str_random(2).'.com',\n \n 'status' => str_random(10),\n ]);\n }\n }", "title": "" } ]
46219406ec485c26c7f1aa3f25287f7b
Show the form for editing the specified bestuur.
[ { "docid": "43e3b95158b258c97b7de9d02b76f286", "score": "0.7058196", "text": "public function edit($id)\n\t{\n\t\t$bestuur = Bestuur::find($id);\n\n\t\treturn View::make('bestuurs.edit', compact('bestuur'));\n\t}", "title": "" } ]
[ { "docid": "9197e5f6646ab8a602e1ff00b9e41fb5", "score": "0.73090446", "text": "public function edit() {\n\t\tglobal $tpl;\n\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "a5fdf72e027ce947aa666b71b07ff02a", "score": "0.72441465", "text": "function edit()\r\n\t{\r\n $this->_input->set('view', 'tours');\r\n $this->_input->set('layout', 'edit');\r\n\t\t\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "5528e9d735a1d9a4a8c37629a76211ee", "score": "0.7237381", "text": "public function show_editform() {\n $this->item_form->display();\n }", "title": "" }, { "docid": "d7f97cb4bb7de22764514ac37e0693cc", "score": "0.7213022", "text": "function edit()\n\t{\n\t\t// error_log(\"show the EDIT form\\n\", 3, \"../logs/salonbook.log\");\n\t\t\n\t\tJRequest::setVar('view','salonbook');\n\t\tJRequest::setVar('layout','edit');\n\t\tJRequest::setVar('hidemanmenu',true);\n\t\t\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "4cd99160db14da1248b40ce2514aa3cf", "score": "0.7197154", "text": "public function edit(Huruf $huruf)\n {\n return view('belajar.edithuruf', compact('huruf'));\n }", "title": "" }, { "docid": "3e347981a92db663b79c4ccf2af0b045", "score": "0.719392", "text": "protected function editform() {\n $userid = Auth::user()->id;\n if (Auth::user()->role_id==2) {\n $profile = Utility::getProfile(Auth::user());\n return view('users.org.profile.edit')->with('profile', $profile);\n }\n elseif (Auth::user()->role_id==3) {\n $profile = Utility::getProfile(Auth::user());\n return view('users.researcher.profile.edit')->with('profile', $profile);\n }\n }", "title": "" }, { "docid": "704f1b14c8badbaaca9fb9631b3be771", "score": "0.7158821", "text": "public function edit()\n {\n return view('mgtraductores::edit');\n }", "title": "" }, { "docid": "c81160d705c88aabe06341c879b4a9d4", "score": "0.7142783", "text": "public function edit()\n {\n $template = $this->getKotakin()->getTemplate()->getUser()->newInstance();\n $template->setKotakin($this->getKotakin());\n $template->setSentry($this->getSentry());\n $template->setUser($this->getUser());\n\n $this->getPage()->setActiveMenu('preference');\n\n $this->getPage()->setActiveMenu('me');\n $this->getPage()->setAttribute('title', sprintf($this->getUtility()->t('Your Profile | %s'), $this->getPage()->getAttribute('brand')));\n\n return View::make('kotakin::user_form', array(\n 'page' => $this->getPage(),\n 'user' => $template\n ));\n }", "title": "" }, { "docid": "a3d69ec2998684c971792edb948c5eda", "score": "0.70736045", "text": "public function formEditConceptoPlanilla(){\r\n Obj::run()->View->render();\r\n }", "title": "" }, { "docid": "6b6ebdcdcb09172ff33207291c574c7b", "score": "0.69901526", "text": "public function edit()\n {\n return view('boukarian::edit');\n }", "title": "" }, { "docid": "eb85fc5f08fd4d7f2735a44b666998b1", "score": "0.6985704", "text": "public function renderEditForm()\n {\n // Take id from $_GET, fetch record, pass on record as $vars in array\n if (isset($_GET['book_id']) && (int)$_GET['book_id'] > 0 && !is_null(BookModel::get($_GET['book_id']))) {\n $book = BookModel::get($_GET['book_id']);\n return View::render(\n 'edit-book',\n [\n 'book' => $book\n ]\n );\n }\n }", "title": "" }, { "docid": "b0265d02f79c0a87495c917bcb066d03", "score": "0.69837314", "text": "public function showeditAction()\r\n {\r\n $this->render('edit');\r\n }", "title": "" }, { "docid": "ea620ac575255ca9f25dbf94d0dffbc6", "score": "0.6968671", "text": "public function edit()\n {\n // Edit data Tag\n $lecturer = Lecturer::with('Profile')->find(Auth::id());\n return view('admin.lecturer.edit', compact('lecturer'));\n }", "title": "" }, { "docid": "8848eef52013ec9c31efa5d9e1d9581d", "score": "0.69562626", "text": "public function edit()\n {\n //\n return view('editProfessor');\n }", "title": "" }, { "docid": "38e6dad01dfe51fa6f95805601cc8137", "score": "0.69422734", "text": "public function edit()\n\t{\n\t\tCRequest::setVar('view', $this->view_item);\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "839bff7657627eb0e9f3c735e392600c", "score": "0.69335526", "text": "public function editAction(){\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": "f2223aead0d1e2cef980133c69e6a7bf", "score": "0.6924032", "text": "public function edit()\n {\n View::display();\n }", "title": "" }, { "docid": "cb9340a304c83c3a9a371e60993460e3", "score": "0.692332", "text": "public function edit()\n {\n $data['individual'] = $this->getIndividualSeminar();\n $this->load->view('Dashboard/header');\n $this->load->view('Seminar/edit', $data);\n $this->load->view('Dashboard/footer');\n }", "title": "" }, { "docid": "f4908ef32054735fdce9f1476c5fed8c", "score": "0.69176066", "text": "public function edit()\n {\n return view('hethong::edit');\n }", "title": "" }, { "docid": "14ceb6f06e6f144fe7b54f8bae8bbe21", "score": "0.6916958", "text": "public function edit()\n {\n return view('superadmin::edit');\n }", "title": "" }, { "docid": "b5d61294dd8756ae1078f9c18a64a1ea", "score": "0.690847", "text": "public function edit(proffesseur $proffesseur)\n {\n //\n }", "title": "" }, { "docid": "1d4ddd655a4d213d503056d4cf3d1b25", "score": "0.6906347", "text": "public function editinforme(){\n $documento = new Documento();\n $funcionarios = $documento->getUsuarioAll();\n \n $fec = new Helpers();\n \n //verificamos el id del documento\n if(isset($_GET['id']) && $_GET['id'] > 0 && is_int((int)$_GET['id'])){\n //obtenemos los datos del documentos elegido\n $documentoId = $documento->getById($_GET['id']);\n \n //Obteniendo los remitentes\n $remitente = $documento->getRemitente($_GET['id']); \n $documentoId->remitente = $remitente;\n \n //Obteniendo los destinatarios\n $destinatario = $documento->getDestinatario($_GET['id']);\n $documentoId->destinatario = $destinatario;\n //Obteniendo los concopia\n $concopia = $documento->getConcopia($_GET['id']);\n $documentoId->concopia = $concopia;\n \n $documentoId->fechahora = $fec->cambiaf_a_normal($documentoId->fechahora);\n $this->view(\"editinforme\",array(\n 'documento'=>$documentoId,\n 'funcionarios' => $funcionarios,\n 'title' =>\"Editar Informe\"\n )); \n } else {\n $this->view('bandejas', 'salida');\n }\n }", "title": "" }, { "docid": "ec3a2488b8bd91783e9f150cb28e7fa1", "score": "0.68974924", "text": "public function edit(){}", "title": "" }, { "docid": "860b8d42962dd4f1751317b806b97d66", "score": "0.6896642", "text": "public function edit()\n {\n return view('reception::edit');\n }", "title": "" }, { "docid": "cb6e081f6668947403e910deb393489f", "score": "0.6886021", "text": "public function edit(Rendu $rendu)\n {\n $this->authorize('update', $rendu);\n return view('admin.rendu.edit', compact('rendu'));\n }", "title": "" }, { "docid": "51f89c5d5d1bd15cea7d45cabafe8e6f", "score": "0.6878338", "text": "public function edit()\n\t{\n\t\t$this->view->assignmentOptions = $this->getAssignmentOptions();\n\t\t$this->view->roles = $this->getRoles();\n\t\t$this->view->gender = $this->getGender();\n\t\t$this->view->areas = PresenterFactory::getInstance('Reports')->getArea(true);\n\t\treturn $this->view('edit');\n\t}", "title": "" }, { "docid": "a6a2b6a33554ad391ab2ae353ec5a9db", "score": "0.6871577", "text": "public function edit()\n\t{\n return View::make('cabinet.edit');\n\t}", "title": "" }, { "docid": "1deb6920d550e3550137d6f49a6d7aeb", "score": "0.68504274", "text": "public function edit($id)\n {\n $model = Suplier::find($id);\n return view('backend.suplier.form',['model'=>$model,'update'=>1]);\n }", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.684507", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "bb3d25c21124beddc757800cf8683cb4", "score": "0.6837498", "text": "public function edit(){\n\t\t//$this->common_data();\n\t\t$this->location = \"plataformas\";\n\t\t$this->plataforma = new plataforma($this->get('id'));\n\t\t$this->plataforma->read(\"id,nombre,empresa\");\n\t\t$this->include_theme(\"index\",\"edit\");\n\t}", "title": "" }, { "docid": "0181f4ab3b675f1e32e7436eec8db0b2", "score": "0.6834748", "text": "public function edit()\n {\n return view('management::edit');\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.68199223", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "906b6b558faaab8da79bab28e018802e", "score": "0.6814378", "text": "public function edit()\n {\n $akun = User::find(Auth::id());\n return view('account-setting-forms', ['akun' => $akun]);\n }", "title": "" }, { "docid": "95eb405d84481bce79c5b504d5687466", "score": "0.6799204", "text": "public function edit()\n {\n return view('tendermaster::edit');\n }", "title": "" }, { "docid": "595a72f3c9ea7e90962181202121b377", "score": "0.6781569", "text": "public function edit(Professeur $professeur)\n {\n //\n }", "title": "" }, { "docid": "aa684d4169241b0f33ef99d2ebb7bf31", "score": "0.6778811", "text": "public function edit(){\n\n if (!empty($_POST)){\n $fields = [\n 'title' => $_POST['title'],\n 'content' => $_POST['content'],\n 'chapter' => $_POST['chapter'],\n 'status' => $_POST['status']\n ];\n\n\n $result = $this->billet->update($_GET['id'], $fields);\n \n \n header('Location: ' . $this->getLocation());\n exit;\n }\n\n // the code below is only executed if $ _POST is empty\n $post = $this->billet->find($_GET['id']);\n\n $title = 'Edition d\\'un billet';\n\n $form = new BootstrapForm($post);\n $this->render('Admin.Billets.edit', compact('form','title'));\n }", "title": "" }, { "docid": "3652c4f527a17ca2a478bdcfbc57b696", "score": "0.6757967", "text": "private function showEditBookForm() {\r\n $book_id = filter_input(INPUT_POST, 'book_id', FILTER_SANITIZE_STRING);\r\n \r\n $book = $this->library_db->getBook($book_id);\r\n $libraries = $this->library_db->getLibraries();\r\n $categories = $this->library_db->getCategories();\r\n \r\n $this->view->assign('id', $book->getID());\r\n $this->view->assign('title', $book->getTitle());\r\n $this->view->assign('author', $book->getAuthor());\r\n $this->view->assign('categoryID', $book->getCategoryID());\r\n $this->view->assign('libraryID', $book->getLibraryID());\r\n $this->view->assign('image', $book->getImage());\r\n $this->view->assign('pages', $book->getPages());\r\n $this->view->assign('publisher', $book->getPublisher());\r\n $this->view->assign('cost', $book->getCost());\r\n \r\n $this->view->assign('categories', $categories);\r\n $this->view->assign('libraries', $libraries);\r\n $this->view->display('editbook.tpl');\r\n }", "title": "" }, { "docid": "96dc1985613815fb3ac058fa22e3e41b", "score": "0.6746322", "text": "public function editAction()\n {\n $this->exhib_stand_file = ExhibStandFile::findOneByHash($this->_getParam('hash'), $this->getSelectedBaseUser(), $this->getSelectedLanguage());\n //sprawdzenie dostępu\n $this->checkExhibStandFileAccess();\n //wyslnie danych do prywatnej funkcji generującej formularz\n $this->formStandFile();\n //nagłówek podstrony\n $this->view->placeholder('headling_1_content')->set('Edit file');\n }", "title": "" }, { "docid": "9542e2768836324f285d6a3108e4f58d", "score": "0.67394143", "text": "public function edit() {\n \t\n }", "title": "" }, { "docid": "255fd205558b807d96631444060c5435", "score": "0.6737718", "text": "public function edit(FangOwner $fangOwner) {\n //\n }", "title": "" }, { "docid": "ce5ce49df089eec688fb78cfa2618101", "score": "0.67358327", "text": "public function edit(suratkematian $surat)\n {\n\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.67231345", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.67231345", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "f508d1fdc1d6b410ab9ef729f3b9ea01", "score": "0.6713878", "text": "public function edit(Ue $ue)\n {\n $filieres = Specialite::all();\n return view('ue.edit', compact('ue','filieres'));\n }", "title": "" }, { "docid": "01625a2c98524d3a4becbecc75459352", "score": "0.6706265", "text": "public function showEditForm(){\n if(Auth::check()){\n $user = User::find(Auth::user()->user_id);\n return view('pages.editProfile', compact('user'));\n }else{\n return redirect()->to('/');\n }\n }", "title": "" }, { "docid": "e0473ff5d1b26ba7d146881a078590ed", "score": "0.6702308", "text": "public function edit($id)\n {\n \t$profesor = Profesor::find($id);\n \treturn view('admin.profesor.edit', compact('profesor'));\n \n }", "title": "" }, { "docid": "a6c41b64c323ef24088a2f1361c656c3", "score": "0.6691977", "text": "public function edit(Ouvrage $ouvrage)\n {\n //\n }", "title": "" }, { "docid": "ba1215947a0bd4c8e6926d927b00a2f1", "score": "0.6691479", "text": "public function edit(Moniteur $moniteur)\n {\n //\n }", "title": "" }, { "docid": "f84ee89f99aecddaac67e6846df9d0c2", "score": "0.6689966", "text": "public static function edit()\n\t{\n\t\tif(request::$params)\n\t\t{\n\t\t\t$params = array(\n\t\t\t\t'main_info' => array(\n\t\t\t\t\t'id' => request::$params\n\t\t\t\t),\n\t\t\t\t'main_edit' => $_POST\n\t\t\t);\n\n\t\t\t$settings = array(\n\t\t\t\t'main_info' => array(),\n\t\t\t\t'main_edit' => array()\n\t\t\t);\n\n\t\t\t$info_main = api::query('main/info', $params['main_info'], $settings['main_info']);\n\n\t\t\tif($_POST)\n\t\t\t{\n\t\t\t\t$validation = form::validation(array());\n\n\t\t\t\tif($validation)\n\t\t\t\t{\n\t\t\t\t\tif(!empty($info_main))\n\t\t\t\t\t{\n\t\t\t\t\t\t$params['user_rule_edit'] = $info_main['id'];\n\t\t\t\t\t}\n\t\t\t\t\t$edit_main = api::query('main/edit', $params['main_edit'], $settings['main_edit']);\n\n\t\t\t\t\tif(f::is_done($edit_main))\n\t\t\t\t\t{\n\t\t\t\t\t\theader('Location: /main');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(!empty($info_main))\n\t\t\t\t{\n\t\t\t\t\t$_POST = array_merge($_POST, $info_main);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tview::load('main/form');\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('Location: /main');\n\t\t}\n\t}", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.6682361", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "99e282af47b58ba64e51e19bf33df229", "score": "0.6672358", "text": "public function edit()\n {\n $perfil = $this->perfil->find(Auth::user()->id);\n \n //redirecionar se o item não existir\n if (!$perfil) return redirect()->back();\n \n $title = 'Meu Perfil: '.Auth::user()->name;\n \n return view('admin.perfil.editar', compact('title', 'perfil'));\n }", "title": "" }, { "docid": "6e6b3ccb78b04a05af1c73ff453fa792", "score": "0.6671596", "text": "public function edit() {\n\t\t$member = Member::currentUser();\n\n\t\tif(!$member || !$this->Owners()->byID($member->ID)) {\n\t\t\t$this->redirect($this->Link());\n\t\t\treturn false;\n\t\t}\n\n\t\t$form = $this->EditForm();\n\t\t$form->loadDataFrom($this->failover);\n\n\t\tif ($this->ParentID && $this->Parent()->exists()) {\n\t\t\t$parent = $this->Parent();\n\t\t\t$content = $parent->obj('EditContent') ? $parent->obj('EditContent') : false;\n\t\t}\n\n\t\t$data = [\n\t\t\t'Title' => 'Edit: ' . $this->Title,\n\t\t\t'Form' => $form,\n\t\t\t'Content' => $content\n\t\t];\n\n\t\treturn $this->customise($data)->render();\n\t}", "title": "" }, { "docid": "f9b653d006beba74fc67532a38e936e4", "score": "0.6660241", "text": "function editAction()\n {\n $params = $this->_fc->getParams();\n $id = $params['id'];\n $this->_model->row = $this->_db->getRow($id);\n $content = $this->_model->render(STUD_EDIT_FILE);\n $this->_templete->content = $content;\n $output = $this->_templete->render(LAYOUT_FILE);\n $this->_fc->setBody($output);\n }", "title": "" }, { "docid": "3eeea33e2ba2b806c67280b08b73188d", "score": "0.6656896", "text": "function printEditView () {\n ?>\n <div class=\"panel companyFilesEditPanel\">\n <form method=\"post\" action=\"<?php echo parent::link(array(\"action\"=>\"save\")); ?>\">\n <table><tr>\n <td>mode</td>\n <td>\n <?php\n InputFeilds::printSelect(\"mode\", parent::param(\"mode\"), array(\"current\"=>\"current company\", \"selected\"=>\"selected company\"));\n ?>\n </td>\n </tr></table>\n </tr>\n <div>\n <button type=\"submit\"><?php echo parent::translation(\"common.save\"); ?></button>\n </div>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.6646646", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "f4e740b6dd9bc2740c3e1b42fbe509ce", "score": "0.66344583", "text": "public function edit()\n {\n $this->seoDefault(trans('pages.edit_profile.title'));\n\n return view('pages.user_form', [\n 'user' => $this->user,\n ]);\n }", "title": "" }, { "docid": "edebb447a5945d340c8b48863157ccff", "score": "0.6633551", "text": "public function edit()\n {\n // Get user\n $data = Sentinel::getUser();\n // Set breadcrumbs\n Crumbs::add(route('painel.account.index'), 'Meu Perfil');\n Crumbs::addCurrent('Editar Perfil');\n // Return view edit\n return view('blog.back.account.edit', compact('data'));\n }", "title": "" }, { "docid": "dfb4a55ada589c5e32b4c1e2a5c3d4dc", "score": "0.6632529", "text": "public function edit(AkunModel $akun)\n {\n $varsubgol = SubgolModel::all();\n return view('fakuns.edit',compact('varsubgol','akun'))\n ->with('i');\n }", "title": "" }, { "docid": "5ebf7990e14707508a61370ea7483018", "score": "0.66261435", "text": "public function profileEditPage()\n\t{\n\t\t// CREATE LOGIC AND CALL VIEW.\n\t\t// SET THEME (WEB SITE FRONT-END, MOBILE FRONT-END, OR ADMIN).\n\t\t$this->setTheme('admin');\n\n\t\t$currentUser = $this->getCurrentUser();\n\n\t\t$this->putData(array(\n\t\t\t'page_title'\t\t=> 'Minha Conta'/*,\n\t\t\t'page_description'\t=> 'Resumo Geral'*/\n\t\t));\n\n\t\t$this->treeLevel(\"dashboard\");\n\n\n\t\t$model = $this->model(\"profile\");\n\t\t$profileData = $model->getItemById($currentUser['id']);\n\n\t\t//var_dump($profileData);\n\n\t\t//$this->setConfig();\n\n\t\t$this->addBlock(\n\t\t\t\"block\",\n\t\t\t\"profile/form\",\n\t\t\tarray(\n\t\t\t\t'action'\t=> $this->getBasePath() . \"profile/edit\",\n\t\t\t\t'method'\t=> 'post',\n\t\t\t\t'data'\t\t=> $profileData\n\t\t\t),\n\t\t\tnull,\n\t\t\tarray('wysiwyg', 'validate', 'mask')\n\t\t);\n\n\t\t//var_dump($this->widgets);\n\n\t\tparent::display('pages/default/widget-container.tpl');\n\n\t}", "title": "" }, { "docid": "18f1aedadfbf4d32cf94a082ccdc4179", "score": "0.6624229", "text": "public function edit_lube(){\n\t\t\t$this->view->render('stocks/lubricant/edit_lube',false);\t\n\t\t}", "title": "" }, { "docid": "be62f9b9169bd4bef24e08396486c072", "score": "0.6622538", "text": "public function edit()\n {\n return view('petugas.edit-profile');\n }", "title": "" }, { "docid": "e4eb04df38f9fde5c99d2f999572d121", "score": "0.661741", "text": "public function edit()\n {\n $educationId = Helper::getIdFromUrl('education');\n Helper::checkUserIdAgainstLoginId(EducationModel::class, $educationId);\n\n View::render('educations/edit.view', [\n 'method' => 'POST',\n 'action' => '/education/' . $educationId . '/update',\n 'education' => EducationModel::load()->get($educationId),\n 'users' => UserModel::load()->all(),\n ]);\n }", "title": "" }, { "docid": "fd7d6fa05564d94ddfe2439eb1a68e36", "score": "0.66165745", "text": "public function edit($id)\r\n {\r\n $obj = $this->model->getObject($id);\r\n $formView = parent::getFormView(array($id));\r\n $formView->setPost($obj); \r\n $formView->show(); \r\n }", "title": "" }, { "docid": "1f8f9a608275d85301dfb2998ec246a8", "score": "0.661462", "text": "protected function edit() {\n\t}", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.66126144", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "3fb8c38ae284f89265b3377b6d53ccc9", "score": "0.66106457", "text": "public function edit()\n {\n return view('activeplayers::edit');\n }", "title": "" }, { "docid": "a35bd145d39497b8342ae41d7e9c5703", "score": "0.6610137", "text": "public function getEdit()\n {\n // $nav_gameboard = '';\n // $nav_settings = 'active';\n // $nav_grocery_run = '';\n // $nav_metrics = '';\n\n // $user_info = \\LMG\\User::find($id);\n $user_info = \\Auth::user();\n\n return View('Settings.edit')\n ->with('user_info', $user_info);\n // ->with('nav_gameboard', $nav_gameboard)\n // ->with('nav_settings', $nav_settings)\n // ->with('nav_grocery_run', $nav_grocery_run)\n // ->with('nav_metrics', $nav_metrics);\n }", "title": "" }, { "docid": "23fa969743853cefd4974f048eebf67a", "score": "0.6609134", "text": "public function edit()\r\n {\r\n return view('user::edit');\r\n }", "title": "" }, { "docid": "e2097e8e8c646e28310f87951c978c21", "score": "0.6608293", "text": "public function editar()\n {\n //Pega o id do colaborador da URL\n $id = $this->uri->segment(5);\n\n //Se o id for nulo, redireciona para a página inicial\n if(is_null($id))\n redirect();\n\n //Utitiliza o método getById para obter as informações do colaborador a partir do seu id\n $resultado = $this->ColaboradoresModel->getById($id);\n\n $dados['colaboradorid'] = $resultado; \n \n //Carrega a view passando os dados da query\n $this->load->view(\"Colaboradores/colaboradoresaltera\", $dados);\n\n }", "title": "" }, { "docid": "bfecf8a37762ddfd115b26c94da4c910", "score": "0.66050303", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'type' );\n\t\tJRequest::setVar( 'hidemainmenu', 1 );\n\n\t\t$model = $this->getModel('type');\n\t\t$user = JFactory::getUser();\n\t\t\n\t\t// Check if record is checked out by other editor\n\t\tif ( $model->isCheckedOut( $user->get('id') ) ) {\n\t\t\tJError::raiseNotice( 500, JText::_( 'FLEXI_EDITED_BY_ANOTHER_ADMIN' ));\n\t\t\t$this->setRedirect( 'index.php?option=com_flexicontent&view=types', '');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Checkout the record and proceed to edit form\n\t\tif ( !$model->checkout() ) {\n\t\t\tJError::raiseWarning( 500, $model->getError() );\n\t\t\t$this->setRedirect( 'index.php?option=com_flexicontent&view=types', '');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "2761e36b6aa51ebff28c1747bd1a9924", "score": "0.65960073", "text": "public function edit()\n {\n return view('datamemory::edit');\n }", "title": "" }, { "docid": "b722a705eabea11b9c433950f57019b8", "score": "0.65959793", "text": "public function edit_form($id){\n\t\t$data['data_user'] = $this->admin_database->data_user($id);\n\t\t$this->load->view('header');\n\t\t$this->load->view('admin_bars');\n\t\t$this->load->view('admin_page_edit', $data);\n\t\t$this->load->view('footer');\n\t}", "title": "" }, { "docid": "11d22bece5dc5ec8003c17f7259021aa", "score": "0.65899533", "text": "public function edit()\n {\n $id = 1;\n \n if (isset($_POST['save'])) {\n $this->auth->restrict($this->permissionEdit);\n\n if ($this->save_about_us('update', $id)) {\n log_activity($this->auth->user_id(), lang('about_us_act_edit_record') . ': ' . $id . ' : ' . $this->input->ip_address(), 'about_us');\n Template::set_message(lang('about_us_edit_success'), 'success');\n redirect(SITE_AREA . '/utility/about_us');\n }\n\n // Not validation error\n if ( ! empty($this->about_us_model->error)) {\n Template::set_message(lang('about_us_edit_failure') . $this->about_us_model->error, 'error');\n }\n }\n \n Template::set('about_us', $this->about_us_model->find($id));\n\n Template::set('toolbar_title', lang('about_us_edit_heading'));\n Template::render();\n }", "title": "" }, { "docid": "e94a585ebde70789a0717aa1e07835fc", "score": "0.6587417", "text": "public function editForm(): Form;", "title": "" }, { "docid": "ae94dadd5b62d83347e79155939e6cfa", "score": "0.6587134", "text": "public function edit(Ekskul $ekskul)\n {\n //\n }", "title": "" }, { "docid": "2da3306d3c082eed0eb67bdde6fdcc96", "score": "0.6572558", "text": "public function edit()\n {\n $user = Auth::user();\n $viewStr = $user->tipo == 1 ? 'perfilempresa' : 'perfilusuario';\n return view($viewStr, ['user' => $user]);\n }", "title": "" }, { "docid": "847138396d4867a42acea9b24e24f78b", "score": "0.657239", "text": "public function display_edit() {\n\t\tif (isset($_POST['bank_account']['default_for_payment'])) {\n\t\t\t$_POST['bank_account']['default_for_payment'] = true;\n\t\t\t$bank_accounts = \\Bank_Account::get_all();\n\t\t\tforeach ($bank_accounts as $bank_account) {\n\t\t\t\t$bank_account->default_for_payment = false;\n\t\t\t\t$bank_account->save(false);\n\t\t\t}\n\t\t} else {\n\t\t\t$_POST['bank_account']['default_for_payment'] = false;\n\t\t}\n\n\t\t$bank_account = \\Bank_Account::get_by_id($_GET['id']);\n\t\t$bank_account->load_array($_POST['bank_account']);\n\t\t$bank_account->save();\n\n\t\tSession::redirect('/financial/account');\n\t}", "title": "" }, { "docid": "d182f7fd48de65fac391f72d5f4bff91", "score": "0.6570553", "text": "public function edit(KursiModel $kursiModel)\n {\n //\n }", "title": "" }, { "docid": "e1c6fc3a33f5870cadfeabdac84288a0", "score": "0.6570042", "text": "public function edit($class,$id)\n {\n $kelas = Kelas::find($class);\n $user = auth()->user();\n\n // $kelas = Kelas::with('asistant.matkul')->get();\n\n $form = Form::where(['user_id' => $user->id, 'id' => $id])->firstOrFail();\n\n $pageTitle = 'Edit Form';\n\n $saveURL = route('formbuilders::form.asisten.update', [$kelas->id,$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('asisten.dashboard.forms.edit', compact('form', 'pageTitle', 'saveURL', 'form_roles', 'kelas'));\n }", "title": "" }, { "docid": "104194659441d10de0a61f3752a50943", "score": "0.65649766", "text": "public function edit(refkuesioner $refkuesioner)\n {\n return view('edit.rku', compact('refkuesioner'));\n }", "title": "" }, { "docid": "1723508469b050293085e441d9b45768", "score": "0.65604395", "text": "public function edit($id){\n if(!$this->GuruModel->detailData($id)){\n abort(404);\n }\n return view('page_admin.v_editguru',['guru' => $this->GuruModel->detailData($id)],);\n\n }", "title": "" }, { "docid": "f72f3bbb84e26773cb64aef31a69142b", "score": "0.65550846", "text": "function displayEditForm() {\n $output = include 'views/ProductType_editForm.php';\n return $output;\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.65548027", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.65548027", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.65548027", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.65548027", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.65548027", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.65533245", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "75dec2d47f278358aa73a4fda762fabb", "score": "0.6547494", "text": "public function edit($id)\n {\n $pageName = $this->pageName;\n $oilGramToPoint = OilGramToPoint::get()->last();\n $oilClient = OilClient::with('userData')->findOrFail($id);\n $regions = Region::get();\n return view('admin.oilClients.form', compact('pageName', 'oilClient', 'oilGramToPoint','regions'));\n }", "title": "" }, { "docid": "faf6a18d83824612226ed96c6a909014", "score": "0.6546962", "text": "public function edit(C)\n {\n return view ('penduduk.edit', compact($citizen));\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.65429455", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "1ef24a233872d5cf302e8b0cedd46660", "score": "0.65410507", "text": "public function edit($id)\n {\n $fournisseur = Fournisseur::find($id);\n\t\treturn view('fournisseurs.edit', compact('fournisseur')); \n\t\t\n\n }", "title": "" }, { "docid": "148f2b795f1a0e6fbe96ee1b1579717f", "score": "0.6536082", "text": "public function edit()\n {\n // return view('api::edit');\n }", "title": "" }, { "docid": "3b303da9fcadcc5e199dbfa10d387f13", "score": "0.6534839", "text": "public function edit()\n {\n if(Auth::user()->isAn('aluno')){\n $alunos = Aluno::all();\n\n return view('editProfile', compact('alunos'));\n }\n else{\n $orientadores = Orientador::all();\n\n return view('editProfile', compact('orientadores'));\n }\n }", "title": "" }, { "docid": "f43de16e079c57b3b0be4aad9adb3154", "score": "0.65337", "text": "public function modify_view()\n {\n $this->object = $this->object->read($this->id);\n $uiObjectName = $this->objectType . '_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n ['values' => $values,\n 'action' => url($this->type . '/modify', true),\n 'class' => 'form_admin form_admin_modify'],\n ['submit' => ['save' => __('save')]]));\n }", "title": "" }, { "docid": "6d83ac4120ff0f83f8289e94e8d95b19", "score": "0.6530325", "text": "public function edit(KolicinaGuma $kolicinaGuma)\n {\n //\n }", "title": "" }, { "docid": "51a9f359ceb6df3625a9742305229a9b", "score": "0.65241873", "text": "public function action_edit()\n {\n if (!empty($this->m_partial)) {\n $this->partial($this->m_partial);\n\n return;\n }\n\n $node = $this->m_node;\n\n $record = $this->getRecord();\n\n if ($record === null) {\n $location = $node->feedbackUrl('edit', self::ACTION_FAILED, $record);\n $node->redirect($location);\n }\n\n // allowed to edit record?\n if (!$this->allowed($record)) {\n $this->renderAccessDeniedPage();\n\n return;\n }\n\n $record = $this->mergeWithPostvars($record);\n\n $this->notify('edit', $record);\n $res = $this->invoke('editPage', $record);\n\n $page = $this->getPage();\n $page->addContent($node->renderActionPage('edit', $res));\n }", "title": "" }, { "docid": "58757e9b6b427739a3ed93d4d717a571", "score": "0.6517039", "text": "function edit($kabul_id)\n { \n // check if the kabul_mektubu exists before trying to edit it\n $data['kabul_mektubu'] = $this->Kabul_mektubu_model->get_kabul_mektubu($kabul_id);\n \n if(isset($data['kabul_mektubu']['kabul_id']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t\t'o_id' => $this->input->post('o_id'),\n\t\t\t\t\t'mektup' => $this->input->post('mektup'),\n );\n\n $this->Kabul_mektubu_model->update_kabul_mektubu($kabul_id,$params); \n redirect('kabul_mektubu/index');\n }\n else\n {\n\t\t\t\t$this->load->model('Ogrenci_model');\n\t\t\t\t$data['all_ogrenci'] = $this->Ogrenci_model->get_all_ogrenci();\n\n $data['_view'] = 'kabul_mektubu/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The Acception Letter you are trying to edit does not exist.');\n }", "title": "" }, { "docid": "2f1b101f97aefe844833d86b2cd1f5bf", "score": "0.65133375", "text": "public function edit(){\n\n\t}", "title": "" }, { "docid": "f68b7c6eb0f3da39d7cbaafbc018f8db", "score": "0.65126896", "text": "public function edit(Model $umur)\n {\n return view('intern.ikm.umur.edit')->withUmur($umur);\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "7b1bd11244d4ef0fc497dc25f317c547", "score": "0.0", "text": "public function destroy($id)\n {\n User::find($id)->delete();\n\n return redirect()->back()->with('successMsg','Usuario eliminado');\n }", "title": "" } ]
[ { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\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": "052edc379f178da3bc9936ef223b6ef8", "score": "0.64856714", "text": "public function remove() {\n Storage::disk('public')->delete($this->getPath());\n $this->delete(); //Remove db record\n }", "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": "7c8424d31eaa624067dc5241abfb9372", "score": "0.6257354", "text": "public function deleteStorage($storageId);", "title": "" }, { "docid": "5881486a94aded91c41895b5d1b51444", "score": "0.6238561", "text": "public function delete($resource) {\r\n\t\t\t\r\n\t\t$url = $this->_path . '/api/v2' . $resource;\r\n\t\t\r\n\t\t$curl = curl_init();\r\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->_headers);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\r\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t$response = curl_exec($curl);\r\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\r\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\r\n\t\t$headers = substr($response, 0, $header_size);\r\n\t\t$body = substr($response, $header_size);\r\n\t\tself::http_parse_headers($headers);\t \r\n\t\tcurl_close ($curl);\r\n\t\tif ($http_status == 204) {\r\n\t \treturn $http_status . ' DELETED';\r\n\t\t } else {\r\n\t\t \t$this->error($body, $url, null, 'DELETE');\r\n\t\t }\r\n\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "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": "ece2955e505228c5979763b54ea0ee46", "score": "0.6066214", "text": "public function remove(\n int $right,\n $resource,\n IUser $user,\n ?IResource $parentResource = null\n ): void\n {\n $hash = $this->hash($right, $resource, $user, $parentResource);\n $this->storage->remove($hash);\n }", "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": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "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": "f23ad90184663348cc9db3cf44d0b0a5", "score": "0.595982", "text": "public function destroy(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'destroyed'=>$resource->delete()\n\t\t\t\t]);\n }", "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": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "e03265a289855852afd2372dcb1d8daa", "score": "0.58933157", "text": "public function remove($path, $hard = false);", "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": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.5812055", "text": "public function del($path);", "title": "" }, { "docid": "c603e0ea04551111c5de9c6585b2815e", "score": "0.5802033", "text": "public function delete()\n {\n $this->repository->git('rm %s', escapeshellarg($this->getRelativePathname())\n );\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "818914cdd28df643181e6a2330bc11c4", "score": "0.5789049", "text": "public function destroy($id)\n {\n $supplier=Supplier::find($id);\n $photo=$supplier->photo;\n if($photo){\n unlink($photo);\n }\n $supplier->delete();\n }", "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": "d1f7c96fed94f01bef33d5bc03b96940", "score": "0.5735748", "text": "public function hardDelete();", "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": "7b06ca498cebb34097bee47d0def61eb", "score": "0.5718601", "text": "public function delete() {\n if (unlink($this->fullPath)) {\n $this->fullPath = '';\n $this->mimeType = '';\n $this->simpleName = '';\n $this->size = 0;\n } else {\n throw new Exception('Check write Access to delete file!');\n }\n }", "title": "" }, { "docid": "8c0c11de31899ddf1bbfd6c29f1c19a7", "score": "0.571522", "text": "public function deleteImage(){\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "40f1e1a14810f5eceacb200ffe7aeb20", "score": "0.5696079", "text": "public function destroy(Request $request)\n {\n $slider=Slider::where('id', '=', $request->id)->first();\n if($slider!=null){\n $mi_imagen = public_path().'/'.$slider->url;\n unlink($mi_imagen);\n $slider->delete();\n return 1;\n }else{\n return 0;\n }\n// Lo eliminamos de la base de datos\n\n\n\n }", "title": "" }, { "docid": "60a2181c36b7592447d90a90fcadbe74", "score": "0.5695835", "text": "public function delete($record) {\n $this->fileDataSource->delete($this->resourceName, $record->id);\n $this->afterDelete($record);\n }", "title": "" }, { "docid": "7ef5024136aac86c4c004ee1e7edea43", "score": "0.56815386", "text": "public function drop(): void {\n $disk = Storage::disk($this->scope);\n if ($disk->exists($this->filepath)) {\n $disk->delete($this->filepath);\n }\n }", "title": "" }, { "docid": "c4f845a8d7bbb2425211bda284218817", "score": "0.56762695", "text": "function destroy() {\n\t\tunlink($this->get_file_name());\n\t\tself::remove_from_cache($this);\n\t}", "title": "" }, { "docid": "af7a37a01e344ca75b406caaaa916b45", "score": "0.56741655", "text": "private function removeOldIcon($resource)\n {\n $icon = $resource->getIcon();\n\n if ($icon->getIconType()->getIconType() == IconType::CUSTOM_ICON) {\n $pathName = $this->container->getParameter('claroline.param.thumbnails_directory')\n . DIRECTORY_SEPARATOR . $icon->getIconLocation();\n if (file_exists($pathName)) {\n unlink($pathName);\n }\n }\n }", "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": "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": "81b2a149b82ad070a8fc5640c23cb4c5", "score": "0.56235874", "text": "public function deleteResource($resourceId)\n {\n $req = new RESTRequest();\n $data = $req->adminGet('LearningObject/delete/' . $resourceId)->getData();\n return $data;\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": "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": "ea306158775b698c5435960d49c257ab", "score": "0.56042147", "text": "public function delete()\n {\n $this->remote->delete($this->file);\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "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": "13866f5828119bb8aae429440b86e949", "score": "0.55884856", "text": "public function destroy($id)\n {\n\n $imga = Image::find($id);\n Storage::disk('public')->delete('img/' . $imga->src);\n $imga->delete();\n\n\n return redirect()->back();\n }", "title": "" }, { "docid": "24ef05d1335abf0bd48387e294875133", "score": "0.5576293", "text": "public function delete($fireStorageEvents = true);", "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": "2d72bcdac1bcdd14301b9a6ad301fae7", "score": "0.5572793", "text": "public function actionPatientremove() {\n\n $id = $_POST['id'];\n $name = $_POST['name'];\n\n $root_path = Yii::$app->basePath . '/../uploads/patient';\n $path = $root_path . '/' . $id . '/' . $name;\n\n\n if (file_exists($path)) {\n\n if (unlink($path)) {\n\n }\n }\n }", "title": "" }, { "docid": "65ec7f8ef3c165ae2d123008792c4d10", "score": "0.55707175", "text": "public function delete()\n {\n \\File::delete([\n $this->path,\n $this->thumbnail_path,\n\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "ead6a9412215d17945f8769860e1b262", "score": "0.5569038", "text": "public function remove($file) {\n\t\t$this->emitCache('put', $file);\n\t\tparent::remove($file);\n\t}", "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": "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": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "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": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "dc9dac8ad479a20e75ce7907e8c0d32e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "98a92f5f221512e805209e68c21a2f41", "score": "0.7230707", "text": "public function update($resource, $id, $data);", "title": "" }, { "docid": "259a6a29a43bf9b88ecc1eb3eee3041e", "score": "0.6979853", "text": "public function updateResource($resourceType, $resourceId, $record);", "title": "" }, { "docid": "c5e38f3d50e186dc31a1c1e3191e33a9", "score": "0.6735281", "text": "public function update(Request $request, Resource $resource)\n {\n $this->validate($request, [\n 'name' => 'required|string|max:255',\n 'desc' => 'required|string',\n 'cover' => 'image',\n 'photos.*' => 'image'\n ]);\n\n $resource->update($request->only('name', 'desc'));\n\n if ($request->hasFile('cover')) {\n if ($resource->cover()) {\n $resource->cover()->update(['cover' => 0]);\n }\n $resource->uploadPhoto($request->file('cover'), \"$resource->name cover\", 1);\n }\n\n if ($request->has('photos')) {\n foreach ($request->photos as $key => $photo) {\n $resource->uploadPhoto($photo, \"$resource->name photo\");\n }\n }\n\n return redirect('/home')->with(['status' => 'Device successfully updated']);\n }", "title": "" }, { "docid": "5356d72880be7a8e7291a3812494f44a", "score": "0.6498234", "text": "public function update(Request $request, storage $storage)\n {\n //\n }", "title": "" }, { "docid": "7f0fded4aa42dd4d661965974fccb688", "score": "0.6330383", "text": "function requestUpdate($resourceName);", "title": "" }, { "docid": "9df920f81c47ce1493ae744241672b2f", "score": "0.62157947", "text": "function updateResource($model)\n {\n }", "title": "" }, { "docid": "1d81eeba25152205b32aee461040c8af", "score": "0.61946255", "text": "function updateResource($id, $data)\n\t{\n\t\tif(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n $this->validateResource($data, $id);\n\t\t$this->db_update($this->_table, $this->getDbFields($data), array('id'=>$id));\n\t}", "title": "" }, { "docid": "a0575945e98b4f0b6ff629994e5f1060", "score": "0.6156594", "text": "public function update($resourceType, $id, array $queryParams = [], $meta = null);", "title": "" }, { "docid": "19cf522850f8d1f010d9f193ff0ee265", "score": "0.6095271", "text": "public function updateResourceData($resource, HungerGames $data){\n $this->createGameResource($resource, $data);\n }", "title": "" }, { "docid": "f25a192098a47b98f8a7c2af33a1dd2b", "score": "0.6065655", "text": "function updating_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\UpdatingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "17ac23b2fa28e090182571ed20ffe721", "score": "0.6044543", "text": "public function update(Request $request, $resource, $id)\n {\n $original = $this->model->find($id);\n $model = $original->update($request->all());\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource.show', [\n 'resource' => $this->modelName,\n 'id' => $id\n ]);\n }", "title": "" }, { "docid": "e76e30799c75f7561fa2d246f6bd2a57", "score": "0.59422135", "text": "public function applyResource(Resource $resource): void;", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "d9e868d7c27c54e84b68cd0b04675e55", "score": "0.59301335", "text": "function eh_update_resource($type, $resource, $params)\n\t{\n\t\t$url\t\t= eh_get_api_url().\"resources/\".$type.\"/\".$resource.\"/set\";\n\t\t$info\t\t= explode(\"\\n\", eh_fetch_data($url, $params));\n\t\tif(strpos($info[0], 'negative') !== false)\n\t\t{\n\t\t\treturn $info[0];\n\t\t}\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "23ff4e035f19244ecf2ecfc892af99e2", "score": "0.5929896", "text": "function updated_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\UpdatedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "daedbb0f657251ba1f1dfe05df9672c1", "score": "0.58814067", "text": "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n \n // STEP 1: Update or insert this identity as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\"); \n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\", \n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords(); \n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\", \n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n } \n }", "title": "" }, { "docid": "5f4fa67168957ecd78198365cfd74bd9", "score": "0.58386296", "text": "public function update(Request $request)\n {\n try {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n ]);\n\n if ($validator->fails()) {\n $response = [\n 'msg' => $validator->errors->all(),\n 'status' => 0,\n ];\n }\n $data = [];\n if($request->image) {\n $image = ImageUploadHelper::imageupload($request, 'image');\n $data['image'] = $image;\n $data['name'] = $request->name;\n } else {\n $data['name'] = $request->name;\n }\n $resource = Resource::where('id', $request->id)->update($data);\n \n if ($resource) {\n $response = [\n 'msg' => 'Resource Edit Successfully',\n 'status' => 1,\n ];\n } else {\n $response = [\n 'msg' => 'Oops! Something went wrong',\n 'status' => 0,\n ];\n }\n } catch (\\Exception $e) {\n $response = [\n 'msg' => $e->getMessage() . \" \" . $e->getFile() . \" \" . $e->getLine(),\n 'status' => 0,\n ];\n }\n\n return response()->json($response);\n }", "title": "" }, { "docid": "e13311a6d3d6df9928a268f0dfeef488", "score": "0.58193165", "text": "public function update(EquipoStoreRequest $request, $id)\n {\n $equipo = Equipo::find($id);\n $equipo->fill($request->all())->save();\n if($request->file('foto_equipo')){\n $path = Storage::disk('public')->put('images/equipos', $request->file('foto_equipo'));\n $equipo->fill(['foto_equipo' => asset($path)])->save();\n }\n return redirect()->route('equipos.index')->with('info', 'Equipo actualizado con éxito');\n }", "title": "" }, { "docid": "4594dc168aa13c6fef27f370ea295688", "score": "0.57901055", "text": "public function update(Request $request, $id)\n {\n $stock = Stock::findOrFail($id);\n $stock->title = $request->title;\n $stock->caption = $request->caption;\n $stock->location_id = $request->location_id;\n $stock->type = $request->type;\n if ($request->img != null) {\n\n if (file_exists(public_path('') . $stock->img)) {\n unlink(public_path('') . $stock->img);\n }\n\n $imageName = \"/uploads\" . \"/\" . time() . '.' . $request->img->extension();\n\n $request->img->move(public_path('uploads/'), $imageName);\n $stock->img = $imageName;\n }\n $stock->save();\n\n return redirect('/stock/list');\n }", "title": "" }, { "docid": "6bad782d5097f353b6d7ab6700de6bd2", "score": "0.5789171", "text": "public function putAction()\n {\n $id = $this->_getParam('id', 0);\n\n $this->view->id = $id;\n $this->view->params = $this->_request->getParams();\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "b5cccc3771870667a9ee2e74c567e04f", "score": "0.5788723", "text": "public function put($resource, $id = 0, $data = NULL) {\n $data = $this->request('PUT', SPOTIFY_API_ENDPOINT, '/' . $resource . '/' . $id . '', 'application/json', $data, array());\n return $data;\n }", "title": "" }, { "docid": "1fc7ff41b62020f266925c1d4d0429db", "score": "0.57780427", "text": "public function update()\n {\n $this->objectWriteNot(\"update\");\n }", "title": "" }, { "docid": "07bb2e794095f53c3ada145c00d6e27c", "score": "0.5770977", "text": "public function update($id)\n {\n return $this->_resourcePersistence->store($id);\n }", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.5752699", "text": "public function updateExisting();", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "10a5238440cd234bf32137b5c2bdb8ca", "score": "0.5738228", "text": "public function updateAction () {\n\t\t$this->validateHttpMethod(\"PUT\");\n\t\t\n\t}", "title": "" }, { "docid": "286908b8496df6848f6d30646fd1773f", "score": "0.5703068", "text": "public function updateStream($path, $resource, $config = [])\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "632a0e357db115573e3d55d2e9207359", "score": "0.5699802", "text": "public function putAction()\n\t{\n\n\t\t\t\n\t\t$this->view->id = $id;\n\t\t$this->view->params = $this->_request->getParams();\n\t\t$this->view->message = sprintf('Resource #%s Updated', $id);\n\t\t$this->_response->ok();\n\n\t}", "title": "" }, { "docid": "8759752add8b6db67fed4d69cb0208e8", "score": "0.5683185", "text": "public function update()\n\t{\n\t\tparent::update();\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "14c153b0cb8091e3ce492801115cea2c", "score": "0.5676489", "text": "public function update(Request $request, $id)\n {\n $name = $request->name;\n $description = $request->description;\n $amount = $request->amount;\n $category_id = $request->category_id;\n $photo = $request->photo;\n $has_discount = $request->has_discount;\n $product = new Product();\n $product->name = $name;\n $product->description = $description;\n $product->amount = $amount;\n $product->category_id = $category_id;\n $product->has_discount = ($has_discount === \"true\" || $has_discount === \"1\") ? 1: 0;\n\n\n $product_db = Product::find($id);\n $product_db->name = $product->name;\n $product_db->description = $product->description;\n $product_db->amount = $product->amount;\n $product_db->category_id = $product->category_id;\n $product_db->has_discount = $product->has_discount;\n\n if($product_db->save()) {\n if ($request->hasFile('photo')) {\n $image = $request->file('photo');\n $fileName = time() . '.' . $image->getClientOriginalExtension();\n \n $img = \\Image::make($image->getRealPath());\n $img->resize(250, 250, function ($constraint) {\n $constraint->aspectRatio(); \n });\n \n $img->stream(); // <-- Key point\n \n //dd();\n $full_url = 'images/1/smalls'.'/'.$fileName;\n \\Storage::disk('public')->put($full_url, $img);\n\n $product_db->photos = $full_url;\n $product_db->save();\n }\n $product_db->category = $product_db->category;\n return $product_db;\n }\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6b91824bf8c51c5e05fd48e2728329bf", "score": "0.56742364", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n\n /* delete file request */\n if($request->get('deletefile')){\n\n if(Storage::disk('public')->exists($obj->image)){\n Storage::disk('public')->delete($obj->image);\n }\n redirect()->route($this->module.'.show',[$id]);\n }\n\n $this->authorize('update', $obj);\n /* If file is given upload and store path */\n if(isset($request->all()['file'])){\n $file = $request->all()['file'];\n $path = Storage::disk('public')->putFile('category', $request->file('file'));\n $request->merge(['image' => $path]);\n }\n\n $obj = $obj->update($request->except(['file'])); \n flash('('.$this->app.'/'.$this->module.') item is updated!')->success();\n return redirect()->route($this->module.'.show',$id);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5674049", "text": "public function put($data);", "title": "" }, { "docid": "8576d995f0ad5fb05e24f4249f91de06", "score": "0.56251395", "text": "public function update() {\n $this->save();\n }", "title": "" }, { "docid": "7a0daf096da3d4426382a1e223faf321", "score": "0.5611065", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "7a0daf096da3d4426382a1e223faf321", "score": "0.5611065", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "61fd60c4351f42e6fbc02b50ebca8bc2", "score": "0.5605237", "text": "public function update(Request $request, $id)\n {\n $resource = Resources::where('id', $id)->first();\n $resource->name = $request->name;\n $resource->category_id = (int)$request->category_id;\n $resource->location = $request->location;\n $resource->description = $request->description;\n $resource->icon = $request->icon;\n return json_encode($resource->save());\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "ecb354cb7b6b47a575835c7db1ad90b5", "score": "0.5598929", "text": "public function updateStreamAsync($path, $resource, Config $config);", "title": "" }, { "docid": "096b7dba1f9fc21e9dc73bbc8b007ad4", "score": "0.5582224", "text": "abstract public function update($id, $request);", "title": "" }, { "docid": "a2a8c7ed3b85cbbe7e79548fb9edbe73", "score": "0.558093", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'title' => 'required',\n ]);\n $data = $request->input();\n if (($request['img'])){\n $folder = 'products/'. date('Y') . '/'. date('m');\n\n $data['img'] = $request->file('img')->store('images/'. $folder);\n\n }\n $item = Product::find($id);\n $item ->update($data);\n return redirect()->route('admin.products.index')->with('success', 'Изменения сохранены');\n }", "title": "" }, { "docid": "7aa2abed7c854f7758eb73c29122e0bf", "score": "0.55795985", "text": "public function update(StorePhotos $request, $id)\n {\n // Grab the inventory item so we can update it\n $image = Images::findOrFail($id);\n\n $image->fill($request->validated());\n \n return (new ImagesResource($image))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "29aad1545f3bd950877d86ff51dcbf21", "score": "0.55708927", "text": "public function update(Request $request, $id)\n {\n $registro = Producto::find($id);\n $valores = $request ->all(); //recupero todos los datos del formulario\n $img = $request -> file('imagen');\n if(!is_null($img) ){\n $imagen = $request -> file('imagen')-> store('public/imagenes'); //obtengo la imagen del input y la guardi en el storage\n $url_replace = str_replace('storage','public', $registro->imagen); //reemplazo la url para eliminar del storage\n $url_N= Storage::url($imagen); //almaceno la nueva imagen en el storage\n Storage::delete($url_replace);\n $url = Storage::url($imagen);\n $valores['imagen'] = $url;\n }\n $registro ->fill($valores);\n $registro ->save();\n return redirect('/dashBoard/productos');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "fb222032c6bacfdf3f59fba2c85e8ff3", "score": "0.555832", "text": "public function update(StoreProduct $request, $id)\n {\n $params = request()->except(['_token']);\n if ($request->hasFile('photo')) {\n $path = $request->file('photo')->store('images');\n $params['photo'] = $path;\n }\n Product::where('id', $id)\n ->update($params);\n\n return redirect()->route('admin.products.show');\n }", "title": "" }, { "docid": "1d5bf70b6f6ee925cb3f92ebbf7df49a", "score": "0.5552059", "text": "public function update(Request $request, $id)\n {\n //\n $slider = SliderImage::find($id);\n if(request()->hasFile('photo')){\n Storage::disk('public')->delete('slider_image/'.$slider->slider_image);\n $image = request()->file('photo');\n $imageName = time() . '_' . $image->getClientOriginalName();\n $image->storeAs('slider_image', $imageName, 'public');\n\n $slider->slider_image = $imageName;\n $slider->updated_by = Auth::user()->name;\n $slider->save();\n toast('Slider Image Updated Successfully!','success');\n return redirect()->back();\n }\n\n }", "title": "" }, { "docid": "4c0ab51ecbeaff3788498a88d8e05dde", "score": "0.55394554", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "516873632753a11d0fca6446f9d7fead", "score": "0.55387545", "text": "public function update(Request $request, $id)\n {\n $modif=Image::find($id);\n if ($request->images== null){ \n }else{ \n Storage::delete('public/images/original/'.$modif->images);\n Storage::delete('public/images/thumbnails/'.$modif->images);\n $img=$request->images;\n $renom=time().$img->hashName();\n $img->store('/public/images/original/');\n $resized=ImageIntervention::make($img)->resize(109,108);\n $resized->save();\n Storage::put('/public/images/thumbnails/'.$renom, $resized);\n $modif->images=$renom;\n }\n\n $modif->images=$renom;\n $modif->save();\n return redirect('/insta');\n }", "title": "" }, { "docid": "db6cffbe49713220724fc0e32ce7122e", "score": "0.55386496", "text": "public function update(Request $request, $id)\n {\n $this->validateData($request); //ตรวจสอบข้อมูลก่อนการแก้ไข\n Networkedstorage::find($id)->update($request->all()); //ค้นหาและแก้ไขข้อมูลในตาราง networked_storages\n return redirect('/networkedstorage')->with('success','แก้ไขข้อมูลสำเร็จแล้ว');\n }", "title": "" }, { "docid": "5f6cc4993e197be08863357458931587", "score": "0.55344915", "text": "public function update(Request $request, int $id)\n {\n\n $request->validate($this->page_validate());\n $product = Product::findOrFail($id);\n $data = $request->all();\n $data['image'] = $product->image;\n $data = array_merge($data, $this->slug($request));\n\n if ($request->file('image'))\n {\n _file_delete($data['image']);\n $data['image'] = $this -> upload( $request , 'products' );\n }\n\n $product->update($data);\n\n return redirect(route('admin.product.index'))->with(_sessionmessage());\n }", "title": "" }, { "docid": "ab9b7d4682e0b792e27aad8d2e440b2e", "score": "0.5520933", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n if ($request->hasFile('Imagen')) {\n\n $producto = producto::findOrFail($id);\n\n Storage::delete('public/'.$producto->Imagen);\n\n $requestData['Imagen'] = $request->file('Imagen')\n ->store('uploads', 'public');\n }\n\n $producto = producto::findOrFail($id);\n $producto->update($requestData);\n\n return redirect('productos')->with('flash_message', 'producto Actualizado!');\n }", "title": "" }, { "docid": "014b2b761d95ca9c270fcc41c92d3964", "score": "0.5509719", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'trash' => 'required',\n 'price' => 'required|integer',\n // 'image' => 'required'\n ]);\n\n if ($validator->fails()) {\n return redirect('admin/trash/' . $id . '/edit')\n ->withErrors($validator);\n } else {\n $trash = Trash::find($id);\n\n $trash->trash = request('trash');\n $trash->price = request('price');\n\n if (!$request->file('image')) {\n $image = request('imagePath');\n } else {\n $image = base64_encode(file_get_contents(request('image')));\n $client = new Client();\n $res = $client->request('POST', 'https://freeimage.host/api/1/upload', [\n 'form_params' => [\n 'key' => '6d207e02198a847aa98d0a2a901485a5',\n 'action' => 'upload',\n 'source' => $image,\n 'format' => 'json'\n ]\n ]);\n\n $get = $res->getBody()->getContents();\n $data = json_decode($get);\n $trash->image = $data->image->display_url;\n }\n\n $trash->save();\n alert::success('message', 'Trash Updated');\n return redirect('admin/trash');\n }\n }", "title": "" }, { "docid": "84d0339c9496a4a023b54955b36002eb", "score": "0.5507803", "text": "public function updateSingle($request, $response, $args);", "title": "" }, { "docid": "a0c8aa8d43f7dbc67d52effeb5ceff30", "score": "0.55019945", "text": "public function update(Request $request, Producto $producto)\n {/*\n $producto->update($request->only(['nombreProducto', 'precio']));\n\n*/\n $producto->nombreProducto = $request->nombreProducto ?? $producto->nombreProducto;\n $producto->stock = $request->stock ?? $producto->stock;\n $producto->url = $request->url ?? $producto->url;\n $producto->precio = $request->precio ?? $producto->precio;\n $producto->save();\n return new ProductoResource($producto);\n }", "title": "" }, { "docid": "013212daa4ecab2fd83de19a4cffe83e", "score": "0.5501016", "text": "public function saveTransactionResource($resource)\n\t{\n\t\t$path = $this->getTransactionResourcePath($resource->getHash());\n\t\t$this->filesystem()->put($path, serialize($resource));\n\t}", "title": "" }, { "docid": "9eefb21d2c4fee1ef44fdb5073e1ab9d", "score": "0.54961485", "text": "public function update(Request $request, $id)\n {\n $slider=Headerslider::find($id);\n $validator=$request->validate([\n 'image'=>'required|mimes:png,jpg|max:1024'\n ]);\n if($validator==false)\n {\n return redirect()->back();\n }\n if(File::exists(public_path('/storage/images/'.$slider->image)))\n {\n File::delete(public_path('/storage/images/'.$slider->image));\n }\n $filename=rand().'.'.$request->image->extension();\n $request->image->storeAs('public/images/sliders',$filename);\n $request->image=$filename;\n $slider->update([\n 'image'=>$request->image\n ]);\n return redirect('/admin-user/slider');\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "3df93bb518efe3cbaf727ca9ad9328a0", "score": "0.5491213", "text": "public function testUpdateAProduct()\n {\n $prod = $this->generateProducts()->first();\n $this->seeInDatabase('products', ['name' => $prod->name]);\n\n $params = [\n 'name' => 'Google Pixel XL',\n 'description' => 'The best phone on the market',\n 'price' => 699.99,\n ];\n\n $response = $this->json('PUT', \"/products/{$prod->id}\", $params);\n $this->seeInDatabase('products', [\n 'name' => $params['name'],\n 'description' => $params['description'],\n 'price' => $params['price'],\n ]);\n }", "title": "" }, { "docid": "1e04073b58a998da6e0122e24cd1be12", "score": "0.5490248", "text": "public function update(Request $request, $id)\n {\n\n\n $datostrabajos=request()->except(['_token','_method']);\n\n\n if ($request->hasFile('Foto')) {\n\n\n$trabajo= Trabajos::findOrFail($id);\n\nStorage::delete('public/'. $trabajo->Foto);\n\n$datostrabajos['Foto']=$request->file('Foto')->store('uploads','public');\n\n\n }\n\n Trabajos::where('id','=',$id)->update($datostrabajos);\n\n //$trabajo= Trabajos::findOrFail($id);\n\n //return view('trabajos.edit',compact('trabajo'));\n\nreturn redirect('trabajos')->with('Mensaje','Trabajo modificado con éxito');\n }", "title": "" }, { "docid": "abf7a5c8e18b23e0935566a6ec214c56", "score": "0.5485075", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product -> name = $request -> name;\n $product -> price = $request -> price;\n $product -> description = $request -> description;\n\n $product -> update();\n\n Session::put('update', 'The product has been updated');\n\n return redirect('/resource');\n }", "title": "" }, { "docid": "1e8339e3233595b2c1df533b2987741b", "score": "0.5478798", "text": "public function update( Request $request, $id );", "title": "" }, { "docid": "a338906322949bb1be1e0e7a003a46e3", "score": "0.5478304", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n\n $product=Product::findOrFail($id);\n\n $data=$request->all();\n $data['admin_vendor_id']=Auth::user()->id;\n $data['is_featured']=$request->input('is_featured',0);\n $size=$request->input('size');\n\n if ($request->hasFile('file')) {\n $uploadedFile = $request->file('file')->store('backend/product');\n $data['photo'] = $uploadedFile;\n }\n\n $status=$product->fill($data)->save();\n if($status){\n request()->session()->flash('success','Product Successfully updated');\n }\n else{\n request()->session()->flash('error','Please try again!!');\n }\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8a8a5b40d30a661682ea39e7d25ae1ed", "score": "0.54719293", "text": "public function put()\n {\n /** @var \\Tacit\\Model\\Persistent $modelClass */\n $modelClass = static::$modelClass;\n\n $criteria = $this->criteria(func_get_args());\n\n /** @var \\Tacit\\Model\\Persistent $item */\n $item = $modelClass::findOne($criteria, [], $this->app->container->get('repository'));\n\n if (null === $item) {\n throw new NotFoundException($this);\n }\n\n try {\n /** @var \\Tacit\\Model\\Persistent $newItem */\n $newItem = new $modelClass();\n $data = array_replace_recursive(\n $newItem->toArray(),\n $this->app->request->post(null, [])\n );\n \n $data = $this->putBeforeSet($data);\n \n $item->fromArray($data, Collection::getMask($item));\n $item->save();\n } catch (OperationalException $e) {\n $e->next($this);\n } catch (ModelValidationException $e) {\n throw new UnacceptableEntityException($this, 'Resource validation failed', $e->getMessage(), $e->getMessages(), $e);\n } catch (Exception $e) {\n throw new ServerErrorException($this, 'Error updating resource', $e->getMessage(), null, $e);\n }\n\n $this->respondWithItem($item, new static::$transformer());\n }", "title": "" }, { "docid": "c0bda952d3e806da6a09fbad44c10c87", "score": "0.5466996", "text": "public function edit(storage $storage)\n {\n //\n }", "title": "" }, { "docid": "c71ca30825c84517c03b65e7df4230aa", "score": "0.54666376", "text": "function update($record)\n { \n ////DEBUG\n return; \n ////END DEBUG \n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $retrieved = $this->rest->put('/SuppliesAPI/item/id' . $record['id'], $record);\n }", "title": "" }, { "docid": "90755391b8e7c7b31e24f046029b9f4b", "score": "0.54652643", "text": "public function update($data) {\n\n }", "title": "" }, { "docid": "9043981d5738f7df4a3238c2fe116872", "score": "0.54592717", "text": "public function update($id,Request $request)\n {\n $file = $request->file('file');\n $extension = $file->getClientOriginalExtension();\n Storage::disk('local')->put($file->getFilename().'.'.$extension, File::get($file));\n $entry = Fileentry::find($id);\n $entry->original_mime_type = $file->getClientMimeType();\n $entry->original_filename = $file->getClientOriginalName();\n $entry->filename = $file->getFilename().'.'.$extension;\n\n $entry->save();\n }", "title": "" }, { "docid": "aa1f77aee84ae3a416c76923d1a56559", "score": "0.5459106", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "b249f46520a6b9be14d03dabf94d1d39", "score": "0.5454029", "text": "public function update(Request $request, $id)\n {\n //\n // dd($request);\n $user = User::find($id);\n $user->fill($request->all());\n if($request->hasFile('image')){\n $path = $request->file('image')->store('user');\n $file = Storage::delete($user->image);\n $user->image = $path;\n // dd(\"yey\",$user);\n }\n // dd(\"stop\",$user);\n $user->update();\n\n return redirect()->route('users.index');\n }", "title": "" }, { "docid": "68958d739424a9622fdca778a3822d3a", "score": "0.544828", "text": "public function update(StoreProduct $request, Product $product)\n {\n if($request->has('thumbnail')) {\n $name = basename($request->thumbnail->getClientOriginalName());\n $name = $name;\n $path = $request->thumbnail->move('productimages/', $name, 'public');\n }\n\n $product->name = $request->product_name;\n $product->price = $request->price;\n $product->desc = $request->desc;\n $product->quantity = $request->qty;\n $product->discount = $request->discount;\n $product->tax = $request->tax;\n $product->category_id = $request->category_id[0];\n $product->brand_id = $request->select_pharmacy[0];\n\n $image = ProductImage::where('image_id', '=', $product->id)->first();\n $image->image_path = $path;\n \n $product->save();\n $image->save();\n\n Session::flash('success', 'Product has been successfully updated!');\n\n return redirect()->route('admin.products.create', compact('product'));\n }", "title": "" }, { "docid": "b2886e9f73a0cf99ca3dd4d1756441e5", "score": "0.54461145", "text": "public function set(ResourceInterface $resource);", "title": "" }, { "docid": "9af94672d7f031c4cda0a455d6a11422", "score": "0.54421556", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->title = $request->title;\n $product->sku = $this->generateSKU();\n// if($request->input('slug')){\n// $product->slug = make_slug($request->input('slug'));\n// }else{\n// $product->slug = make_slug($request->input('title'));\n// }\n $product->slug = $this->makeSlug($request->slug);\n $product->status = $request->status;\n $product->price = $request->price;\n $product->discount_price = $request->discount_price;\n $product->description = $request->description;\n\n $product->meta_desc = $request->meta_desc;\n $product->meta_title = $request->meta_title;\n $product->meta_keywords = $request->meta_keywords;\n $product->user_id = Auth::id();\n\n $product->save();\n\n $photos = explode(',', $request->input('photo_id')[0]);\n\n\n $product->photos()->sync($photos);\n\n Session::flash('success', 'successfuly Edit product');\n return redirect('/administrator/products');\n\n }", "title": "" }, { "docid": "cb8621b723dc6fb774a0ae33c7eda6ca", "score": "0.54419065", "text": "public function update(StoreProductRequest $request, int $id)\n {\n $input = $request->only('title', 'description', 'price', 'category_id');\n Auth::user()->company->products()->find($id)->update($input);\n if ($request->hasFile('media')) {\n $files = $request->file('media');\n $this->productRepo->addMedia($files, $id);\n }\n return redirect(route('showMyProducts'));\n }", "title": "" }, { "docid": "fb30184e0b309716563a37352db2582d", "score": "0.5437578", "text": "public function put($data)\n {\n }", "title": "" }, { "docid": "fb30184e0b309716563a37352db2582d", "score": "0.5437578", "text": "public function put($data)\n {\n }", "title": "" }, { "docid": "98ab15cbe0428e7a24c838d3819e2bf9", "score": "0.5437555", "text": "public function update($id, Request $request, Product $product)\n {\n \t$productupdate = Product::find($id);\n\n if($request->hasFile('photo'))\n {\n\n @unlink(public_path().'/upload/product'.$productupdate->photo);\n \n $file = $request->file('photo');\n $path = public_path().'/upload/product';\n $filename = time().'.'.$file->getClientOriginalExtension();\n }\n if($file->move($path, $filename))\n {\n $productupdate->photo = $filename;\n }\n\n \t$productupdate->update($request->all());\n \treturn back();\n }", "title": "" }, { "docid": "c955211aedc76478d1650fdab80c5cff", "score": "0.542724", "text": "public function updatedProductById(Request $request, $id);", "title": "" }, { "docid": "5bafa084b714ad3beb62cc8123d05421", "score": "0.5426392", "text": "public function update(UpdateProductRequest $request, $id)\n {\n\n $data = Product::findOrFail($id);\n $data->update([\n 'name' => serialize($request->name),\n 'price' => $request->price,\n 'category_id' => $request->category_id,\n 'currency_id' => $request->currency_id,\n 'image' => Helper::UpdateImage($request, 'uploads/category/', 'image', $data->image)\n ]);\nif ($data)\n Alert::success(trans('backend.updateFash'))->persistent(trans('backend.close2'));\n\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "d3fa7e7b7a7e3977da33f1e0093d5f5b", "score": "0.5425214", "text": "public function resourceHasBeenUpdated();", "title": "" }, { "docid": "628f6fb199b5a72e6e84a33d9c6f9a5e", "score": "0.5424779", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'picture' => 'image|sometimes|max:1999'\n\n ]);\n\n if($request->hasFile('picture')){\n // Get filename with the extension\n $filenameWithExt = $request->file('picture')->getClientOriginalName();\n // Get just filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n // Get just ext\n $extension = $request->file('picture')->getClientOriginalExtension();\n // Filename to store\n $fileNameToStore= $filename.'_'.time().'.'.$extension;\n // Upload Image\n $path = $request->file('picture')->storeAs('public/picture', $fileNameToStore);\n } else {\n $fileNameToStore = 'noimage.jpg';\n }\n\n $product= Product::find($id);\n $product->product_name = $request->product_name;\n $product->supplier_id = $request->supplier_id;\n $product->cat_id = $request->cat_id;\n $product->status = $request->status;\n $product->user_id = 1;\n $product->picture = $fileNameToStore;\n $product->alert_quantity = $request->alert_quantity;\n $product->sale_price = $request->sale_price;\n $product->purches_price = $request->purches_price;\n $product->profit = $request->profit;\n\n\n $product->save();\n\n return redirect('/product');\n }", "title": "" }, { "docid": "f078dcf8f707bde762a227c61968e661", "score": "0.54241914", "text": "public function update($id, array $data){\n $product = Product::find($id);\n if(!empty($data['image'])){\n $titleShort = Str::slug(substr($data['title'], 0, 20));\n $data['image'] = UploadHelper::update('image', $data['image'], $titleShort.'-'. time(), 'images/products', $product->image); \n }else{\n $data['image'] = $product->image;\n }\n if (is_null($product))\n return null;\n\n $product->update($data);\n return $this->getByID($product->id);\n }", "title": "" }, { "docid": "06b935ea46fe7f6ab5cf585a11f5279e", "score": "0.5422626", "text": "public function update(ValidateProductInformation $request, Product $product)\n {\n $data = $request->all();\n $data['slug'] = str_slug($data['name']);\n $path = $product->image;\n if($request->file('image')!=null){\n $path = $request->file('image')->store('public/products');\n }\n\n $data['image'] = $path;\n $product->update($data);\n return redirect('/products');\n }", "title": "" }, { "docid": "a8a0978e247663271949812bb1f0e921", "score": "0.5421746", "text": "public function update(Request $request, $id)\n {\n $id = $request->id;\n if($request->hasFile('image')){\n Product::where('id',$id)->update([\n 'title'=>$request->title,\n 'textarea'=>$request->textarea,\n 'quantity'=>$request->quantity,\n 'price' =>$request->price,\n 'offer_price'=>$request->offer_price,\n 'status'=>$request->status,\n 'created_at' => Carbon::now(),\n ]);\n $path = $request->file('image')->store('imagestore');\n Product::find($id)->update([\n 'image'=> $path\n ]);\n return redirect()->route('product.index')->with('success',' Update Succesfully');\n }\n else{\n Product::where('id',$id)->update([\n 'title'=>$request->title,\n 'textarea'=>$request->textarea,\n 'quantity'=>$request->quantity,\n 'price' =>$request->price,\n 'offer_price'=>$request->offer_price,\n 'status'=>$request->status,\n 'created_at' => Carbon::now(),\n ]);\n return redirect()->route('product.index')->with('success','Update Succesfully');\n } \n\n }", "title": "" }, { "docid": "66743027520aa87b03d09a35564488ce", "score": "0.5420195", "text": "public function update(Request $request, $id)\n {\n $products = Product::find($id);\n\n $products->name = $request->name;\n $products->description = $request->description;\n $products->price = $request->price;\n $products->quantity = $request->quantity;\n\n $products->cat_id = $request->cat_id;\n if($request->hasFile('image')){\n\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('uploads/images/' . $filename);\n Image::make($image)->save($location);\n\n $oldfilename = $products->image;\n //update the db\n $products->image = $filename;\n //delete the old image \n Storage::delete($oldfilename);\n }\n $products->save();\n\n if (isset($request->tags)) {\n $products->tags()->sync($request->tags);\n } else {\n $products->tags()->sync(array());\n }\n \n Session::flash('success', 'This post was successfully saved.');\n return redirect::route('product',$products->id);\n\n }", "title": "" }, { "docid": "97031ad94f3ce077f62b44e5b800499e", "score": "0.5410227", "text": "public function update(Request $request, $id)\n {\n $encrypt_decrypt = encrypt_decrypt('decrypt',$id);\n if($encrypt_decrypt === false){\n abort(403);\n }else{\n $this->validate($request, [\n 'name' => 'required',\n 'detail' => 'required',\n 'price' => 'required|numeric',\n 'in_stock' => 'required|numeric',\n ]);\n\n\n $product = Product::find($encrypt_decrypt);\n $product->name = $request->input('name');\n $product->detail = $request->input('detail');\n $product->price = $request->input('price');\n $product->in_stock = $request->input('in_stock');\n if($request->hasFile('file')){\n @unlink($product->photo);\n $filename = time().'.'.$request->file('file')->getClientOriginalExtension();\n $product->photo = 'public/img/product/new-product/' . $filename;\n $request->file('file')->move(public_path('public/img/product/new-product'), $filename);\n }\n $product->save();\n \n return redirect()->route('products.index')\n ->with('success','product updated successfully');\n }\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
8c12f8a147e4b6c18f23b305181fdd5e
Operation getCustomerByEmailAsyncWithHttpInfo Retrieve a customer by Email
[ { "docid": "62d3271a39a52f2920d18dafb2f1f557", "score": "0.6740141", "text": "public function getCustomerByEmailAsyncWithHttpInfo($email, $_expand = null)\n {\n $returnType = '\\ultracart\\v2\\models\\CustomerResponse';\n $request = $this->getCustomerByEmailRequest($email, $_expand);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" } ]
[ { "docid": "988d514721683e819e7330a7c05eba85", "score": "0.6613235", "text": "public function getCustomerByEmailWithHttpInfo($email, $_expand = null)\n {\n return $this->getCustomerByEmailWithHttpInfoRetry(true , $email, $_expand);\n }", "title": "" }, { "docid": "bec0fab5355a1fd060c1c243ab1510b7", "score": "0.63232595", "text": "function DRIVE_getCustomerByEmail($email){\n \t\tglobal $ch;\n\n \t\t// #1 - get Order By Id\n \t$url = backendUrl . '/SearchWS/QueryAsEntities';\n\n \t\t$params = array('itemQuery' => '{\n \t\t\t\t\t\t\t\t\t \"entityName\": \"Cl\",\n \t\t\t\t\t\t\t\t\t \"distinct\": false,\n \t\t\t\t\t\t\t\t\t \"lazyLoaded\": false,\n \t\t\t\t\t\t\t\t\t \"SelectItems\": [],\n \t\t\t\t\t\t\t\t\t \"filterItems\": [\n \t\t\t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t\t \"filterItem\": \"email\",\n \t\t\t\t\t\t\t\t\t\t \"valueItem\": \"'.$email.'\",\n \t\t\t\t\t\t\t\t\t\t \"comparison\": 0,\n \t\t\t\t\t\t\t\t\t\t \"groupItem\": 0\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\t \"orderByItems\": [],\n \t\t\t\t\t\t\t\t\t \"JoinEntities\": [],\n \t\t\t\t\t\t\t\t\t \"groupByItems\": []\n \t\t\t\t\t\t\t\t\t}');\n\n\n\n\n \t$response=DRIVE_Request($ch, $url, $params);\n\n \tif(empty($response)){\n \t\treturn false;\n \t} else if(count($response['result']) == 0 ){\n \t\treturn null;\n \t}\n\n return $response['result'][0];\n\n \t}", "title": "" }, { "docid": "771007d0bd604f06f22e90a5ced5b072", "score": "0.61899614", "text": "public function getCustomerByEmail($email, $authentication_token);", "title": "" }, { "docid": "26e1a64c623abfeb41aa597e0f8d72b8", "score": "0.617195", "text": "public function getCustomersAsyncWithHttpInfo($email = null, $qb_class = null, $quickbooks_code = null, $last_modified_dts_start = null, $last_modified_dts_end = null, $signup_dts_start = null, $signup_dts_end = null, $billing_first_name = null, $billing_last_name = null, $billing_company = null, $billing_city = null, $billing_state = null, $billing_postal_code = null, $billing_country_code = null, $billing_day_phone = null, $billing_evening_phone = null, $shipping_first_name = null, $shipping_last_name = null, $shipping_company = null, $shipping_city = null, $shipping_state = null, $shipping_postal_code = null, $shipping_country_code = null, $shipping_day_phone = null, $shipping_evening_phone = null, $pricing_tier_oid = null, $pricing_tier_name = null, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n $returnType = '\\ultracart\\v2\\models\\CustomersResponse';\n $request = $this->getCustomersRequest($email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "3b24b660306f5b5d5ee81a97c61a97dd", "score": "0.610467", "text": "public function getCustomerEmailListsWithHttpInfo()\n {\n return $this->getCustomerEmailListsWithHttpInfoRetry(true );\n }", "title": "" }, { "docid": "04ec316fe286e81c89baf7ffdcc192a0", "score": "0.596527", "text": "public function getCustomerByEmailAsync($email, $_expand = null)\n {\n return $this->getCustomerByEmailAsyncWithHttpInfo($email, $_expand)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "8b101aa54b673b4e646e9b86dc38b0ea", "score": "0.5959003", "text": "function getCustomerInfoByEmail($email)\n {\n $this->db->select('id as userId, email, username as name');\n $this->db->from('tbl_user');\n $this->db->where('isDeleted', 0);\n $this->db->where('email', $email);\n $query = $this->db->get();\n\n return $query->row();\n }", "title": "" }, { "docid": "7f23a520545f7492ccb511e2a6de1bd3", "score": "0.5918651", "text": "public function getCustomerByEmailWithHttpInfoRetry($retry , $email, $_expand = null)\n {\n $returnType = '\\ultracart\\v2\\models\\CustomerResponse';\n $request = $this->getCustomerByEmailRequest($email, $_expand);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n\n if($e->getResponse()) {\n $response = $e->getResponse();\n $statusCode = $response->getStatusCode();\n $retryAfter = 0;\n $headers = $response->getHeaders();\n if (array_key_exists('Retry-After', $headers)) {\n $retryAfter = intval($headers['Retry-After'][0]);\n }\n\n if ($statusCode == 429 && $retry && $retryAfter > 0 && $retryAfter <= $this->config->getMaxRetrySeconds()) {\n sleep($retryAfter);\n return $this->getCustomerByEmailWithHttpInfoRetry(false , $email, $_expand);\n }\n }\n\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\CustomerResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 410:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "d10a0b45f9fd90cacd66dd35f0bd57d4", "score": "0.59102607", "text": "public function getCustomersWithHttpInfo($email = null, $qb_class = null, $quickbooks_code = null, $last_modified_dts_start = null, $last_modified_dts_end = null, $signup_dts_start = null, $signup_dts_end = null, $billing_first_name = null, $billing_last_name = null, $billing_company = null, $billing_city = null, $billing_state = null, $billing_postal_code = null, $billing_country_code = null, $billing_day_phone = null, $billing_evening_phone = null, $shipping_first_name = null, $shipping_last_name = null, $shipping_company = null, $shipping_city = null, $shipping_state = null, $shipping_postal_code = null, $shipping_country_code = null, $shipping_day_phone = null, $shipping_evening_phone = null, $pricing_tier_oid = null, $pricing_tier_name = null, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n return $this->getCustomersWithHttpInfoRetry(true , $email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand);\n }", "title": "" }, { "docid": "c12e0596abc822ec8ccd5462422b9433", "score": "0.5801133", "text": "protected function getCustomerByEmailRequest($email, $_expand = null)\n {\n // verify the required parameter 'email' is set\n if ($email === null || (is_array($email) && count($email) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $email when calling getCustomerByEmail'\n );\n }\n\n $resourcePath = '/customer/customers/by_email/{email}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($_expand !== null) {\n $queryParams['_expand'] = ObjectSerializer::toQueryValue($_expand);\n }\n\n // path params\n if ($email !== null) {\n $resourcePath = str_replace(\n '{' . 'email' . '}',\n ObjectSerializer::toPathValue($email),\n $resourcePath\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 ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('x-ultracart-simple-key');\n if ($apiKey !== null) {\n $headers['x-ultracart-simple-key'] = $apiKey;\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": "2f7d46b5b9a43b8d3ec8c9d76d804c55", "score": "0.57126606", "text": "function getCustomer($customer){\n\t\tglobal $customerTable,$customer_email;\n\t\t\n\t\t$sql = \"SELECT * FROM $customerTable WHERE $customer_email = '$customer'\";\n\t\t$result = executeQuery($sql);\n\n\t\treturn getJSON($result);\n\n\t}", "title": "" }, { "docid": "7a1a2f9f1ecd215516a97bab0733fd13", "score": "0.57108057", "text": "public function get($email);", "title": "" }, { "docid": "b78d836b6da4c3ce2e87773403a8224f", "score": "0.5689494", "text": "public function getCustomerByEmail($email, $_expand = null)\n {\n list($response) = $this->getCustomerByEmailWithHttpInfo($email, $_expand);\n return $response;\n }", "title": "" }, { "docid": "58190fa0b9e6151767830d7809df28db", "score": "0.5662963", "text": "public function getCustomer($email)\n {\n // Get API Helper\n /** @var SFC_Autoship_Helper_Api $apiHelper */\n $apiHelper = Mage::helper('autoship/api');\n\n // Query for current customer\n $response = $apiHelper->fetchCustomers(\n array(\n 'email' => $email\n ));\n // Check response for HTTP status code\n if ($response['code'] != 200) {\n Mage::log('SFC_Autoship_Helper_Platform::getCustomer Customer does not exist on platform with email: ' . $email, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);\n return false;\n }\n // Parse customer id out of response\n $result = $response['result'];\n $platformCustomers = $result['customers'];\n // Check that we have found exactly 1 customer\n if (!is_array($platformCustomers)) {\n Mage::throwException($this->__('Failed to read response from platform while querying for customer!'));\n }\n if (count($platformCustomers) > 1) {\n Mage::throwException($this->__('Found more than 1 matching customer on platform!'));\n }\n if (count($platformCustomers) == 1) {\n Mage::log('SFC_Autoship_Helper_Platform::getCustomer Customer exists on platform with email: ' . $email, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);\n // Found customer, now lets update him\n // Get id of found customer\n $platformCustomer = $platformCustomers[0];\n if (!is_array($platformCustomer) || !isset($platformCustomer['id'])) {\n Mage::throwException($this->__('Failed to read response from platform while querying for customer!'));\n }\n return $platformCustomer;\n }\n return false;\n }", "title": "" }, { "docid": "fb99a4973742e703063ee014e0cd5f3d", "score": "0.5629811", "text": "public function findByEmail(string $email) : ?Customer;", "title": "" }, { "docid": "ee1dfa2afddd4705d86cd231e8f0ad83", "score": "0.5592816", "text": "public function getUserByEmail($email)\n {\n $sql = \"SELECT first_name,email,contact,api_key,status,seller_id,created_at FROM customers WHERE email = '\" . $email . \"'\";\n $result = mysqli_query($this->conn, $sql);\n if ($result) {\n return $row = mysqli_fetch_assoc($result);\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "36ede888f34c5d57b325f404c66020f8", "score": "0.5512866", "text": "public function getemail(Request $request) {\n\n\t\t$data = $request->all();\n\n\t\t$email = DB::table(DB::raw('customer_entity'))->where('email', $data['email'])->select('email', 'entity_id')->first();\n\n\t\tif (!empty($email)) {\n\t\t\tif (App::environment('local')) {\n\t\t\t\t$firstnameId = Config::get('constants.fixIds.local.customer_entity_varchar_firstname');\n\t\t\t\t$lastnameId = Config::get('constants.fixIds.local.customer_entity_varchar_lastname');\n\t\t\t} else {\n\t\t\t\t$firstnameId = Config::get('constants.fixIds.live.customer_entity_varchar_firstname');\n\t\t\t\t$lastnameId = Config::get('constants.fixIds.live.customer_entity_varchar_lastname');\n\t\t\t}\n\t\t\t$entity = DB::select(DB::raw(\"SELECT c.entity_id,c.email,CONCAT(( SELECT fn.value FROM customer_entity_varchar fn WHERE c.entity_id = fn.entity_id AND fn.attribute_id = {$firstnameId}), ' ', ( SELECT fn.value FROM customer_entity_varchar fn WHERE c.entity_id = fn.entity_id AND fn.attribute_id = {$lastnameId})) AS name FROM customer_entity AS c LEFT JOIN customer_address_entity AS ca ON c.entity_id = ca.parent_id LEFT JOIN customer_address_entity_text AS cat ON cat.entity_id = ca.entity_id WHERE c.entity_id = $email->entity_id GROUP BY entity_id\"));\n\n\t\t\t$message = \"Email Verified\";\n\t\t\t$response = $entity;\n\n\t\t} else {\n\t\t\t$message = \"Email does not exist\";\n\t\t\t$response = false;\n\t\t}\n\n\t\treturn response()->json(['message' => $message, 'result' => $response]);\n\t}", "title": "" }, { "docid": "47202cff36323e7750ddd45c48aac796", "score": "0.5418022", "text": "private function getCurrentCustomer($email)\n {\n return Customer::where('email', $email)->first();\n\n }", "title": "" }, { "docid": "b3785589eca332285faf50257f28fb16", "score": "0.53617096", "text": "public function findByEmail ($email){\n\n\t $response = $this->dynamodb->scan([\n\t\t 'TableName' => $this->tableName,\n\t\t 'ExpressionAttributeValues' => [\n\t\t\t ':val1' => ['S' => $email]\n\t\t ],\n\t\t 'FilterExpression' => 'email = :val1',\n\t\t /* 'AttributesToGet' => [ // optional (list of specific attribute names to return)\n\t\t\t\t'S'=>'username',\n\t\t\t \t'S'=>'email'\n\t\t]*/\n\n\t\t]);\n\n\t\treturn $response;\n }", "title": "" }, { "docid": "ffa53853e2270c55a80555e719798ba0", "score": "0.5346472", "text": "public function getEmail($email) {\n return $this->apiGet('email', array('email' => $email));\n }", "title": "" }, { "docid": "1657383b67fcd81f3a1cd849479b2ba1", "score": "0.53365487", "text": "public function getCustomersAsync($email = null, $qb_class = null, $quickbooks_code = null, $last_modified_dts_start = null, $last_modified_dts_end = null, $signup_dts_start = null, $signup_dts_end = null, $billing_first_name = null, $billing_last_name = null, $billing_company = null, $billing_city = null, $billing_state = null, $billing_postal_code = null, $billing_country_code = null, $billing_day_phone = null, $billing_evening_phone = null, $shipping_first_name = null, $shipping_last_name = null, $shipping_company = null, $shipping_city = null, $shipping_state = null, $shipping_postal_code = null, $shipping_country_code = null, $shipping_day_phone = null, $shipping_evening_phone = null, $pricing_tier_oid = null, $pricing_tier_name = null, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n return $this->getCustomersAsyncWithHttpInfo($email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "7ed5e6f6c130fd7816637c12dd08b7ee", "score": "0.5331711", "text": "public function getUserByEmail($email);", "title": "" }, { "docid": "20448ca03cf7c8733f63570b5fc483cd", "score": "0.5259823", "text": "public function get(string $email_or_code): array\n {\n return $this->client->get(\"customer/{$email_or_code}\");\n }", "title": "" }, { "docid": "d3469f98673b7c9c1be5673367dd4935", "score": "0.51929796", "text": "public function getUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT name, email, api_key, status, created_at FROM api_users WHERE email = ?\");\n $stmt->bindParam(1, $email);\n if ($stmt->execute()) {\n $results = $stmt->fetchAll();\n $results = $results[0];\n $user = array();\n $user[\"name\"] =$results['name'];\n $user[\"email\"] = $results['email'];\n $user[\"api_key\"] = $results['api_key'];\n $user[\"status\"] = $results['status'];\n $user[\"created_at\"] = $results['$created_at'];\n $stmt = null;\n return $user;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "782c31d6eaea152c713ec98c70bf5a58", "score": "0.5176506", "text": "public function getCustomers($email = null, $qb_class = null, $quickbooks_code = null, $last_modified_dts_start = null, $last_modified_dts_end = null, $signup_dts_start = null, $signup_dts_end = null, $billing_first_name = null, $billing_last_name = null, $billing_company = null, $billing_city = null, $billing_state = null, $billing_postal_code = null, $billing_country_code = null, $billing_day_phone = null, $billing_evening_phone = null, $shipping_first_name = null, $shipping_last_name = null, $shipping_company = null, $shipping_city = null, $shipping_state = null, $shipping_postal_code = null, $shipping_country_code = null, $shipping_day_phone = null, $shipping_evening_phone = null, $pricing_tier_oid = null, $pricing_tier_name = null, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n list($response) = $this->getCustomersWithHttpInfo($email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand);\n return $response;\n }", "title": "" }, { "docid": "08f6ad00b90ffff2c24f64a9783d0d29", "score": "0.51719624", "text": "public function testGettingContactDetailFromApiUsingEmail()\n {\n $contactRepositoryObject = new ContactDetailRepository();\n $contactRepositoryMock = $this->createMock('App\\Infusionsoft\\InfusionsoftContact', 'App\\Contracts\\InfusionsoftContactDetailContract');\n\n // sample data to mock the infusionsoft api response data\n $mockContactData = collect(json_decode('{\"Email\":\"5cdf24c86faeb@test.com\",\"_Products\":\"ipa,iea\",\"Id\":8947}'));\n\n $contactRepositoryMock->method('getContactsFromInfusionsoftApi')->with('5cdf24c86faeb@test.com')\n ->willReturn($mockContactData);\n\n $resultData = $contactRepositoryObject->getContactDetail($contactRepositoryMock, '5cdf24c86faeb@test.com');\n\n $this->assertEquals($resultData,$mockContactData);\n\n\n }", "title": "" }, { "docid": "6e255bee74c17b747c6c4d22c96638f6", "score": "0.51713073", "text": "public function getContactByEmail($empresaId, $email)\n {\n $query = 'SELECT contatoId\n FROM empresaContato\n WHERE empresaId = :empresaId\n AND email = :email';\n\n $sth = $this->Connection->prepare($query);\n\n $sth->bindValue(':empresaId', $empresaId, PDO::PARAM_INT);\n $sth->bindValue(':email', $email, PDO::PARAM_STR);\n\n $sth->execute();\n\n return $sth->fetch();\n }", "title": "" }, { "docid": "1492b901c229d8162a9a7f459ed0b931", "score": "0.51596034", "text": "public function getAction($email){\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\r\n\t\t\t\t$user = new Storage\\User();\r\n\t\t\t\t$user->email = $email;\r\n\t\t\t\t$found = $user->get();\r\n\t\t\t\r\n\t\t\t\tif ($found){\r\n\t\t\t\t\treturn $this->_app->getJsonResponse(Api::CODE_GET_SUCCESS, $found);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn $this->_app->getJsonResponse(Api::CODE_NOT_FOUND);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}catch(Storage\\StorageException $e){\r\n\t\t\t\r\n\t\t\t\treturn $this->_app->getJsonResponse(Api::CODE_SERVER_ERROR, $e->getMessage());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "a678a3c01a2120be396c8cd061c4b2b1", "score": "0.51445055", "text": "public function getIdByEmail($email)\r\n\t{\r\n\t\t$tocheck = (is_array($email)) ? $email : array($email);\r\n\t\t$custid = null;\r\n\r\n\t\t$objList = new AntApi_ObjectList($this->m_server, $this->m_user, $this->m_pass, \"customer\");\r\n\t\t$objList->setStoreSource(\"ant\");\r\n\t\tfor($i = 0; $i < count($tocheck); $i++)\r\n\t\t{\r\n\t\t\t$blogic = ($i) ? \"or\" : \"and\";\r\n\t\t\t$objList->addCondition($blogic, \"email\", \"is_equal\", $tocheck[$i]);\r\n\t\t\t$objList->addCondition(\"or\", \"email2\", \"is_equal\", $tocheck[$i]);\r\n\t\t}\r\n\r\n\t\t$objList->getObjects();\r\n\r\n\t\tif ($objList->getNumObjects())\r\n\t\t{\r\n\t\t\t$objm = $objList->getObjectMin(0);\r\n\t\t\t$custid = $objm[\"id\"];\r\n\t\t}\r\n\r\n\t\treturn $custid;\r\n\t}", "title": "" }, { "docid": "bad2f7a37c318c27dedde4792b6589b6", "score": "0.511924", "text": "public static function getCustomersByEmail($email){\n $db = JFactory::getDBO();\n\n $query = \"SELECT * FROM \" . $db->quoteName('#__jeprolab_customer') . \" WHERE \" . $db->quoteName('email') . \" = \" . $db->quote($email) . JeprolabLabModelLab::addSqlRestriction(JeprolabLabModelLab::SHARE_CUSTOMER);\n\n $db->setQuery($query);\n return $db->loadObjectList();\n }", "title": "" }, { "docid": "6b5f142644effdd439274bc98c033770", "score": "0.51160306", "text": "public function getemail(Request $request, Customer $customer)\n {\n return view('employee.getEmail');\n }", "title": "" }, { "docid": "7e2583b630625d142d2a9123b795418d", "score": "0.50864077", "text": "public function get_customer()\n {\n $request = $this->call('GET', 'customers/1');\n $response = json_decode($request->getContent());\n\n $this->assertEquals(true, $response->success);\n $this->assertEquals(1, $response->data->customer_id);\n }", "title": "" }, { "docid": "5681faa5b770365308aee414399783ec", "score": "0.50708526", "text": "public function fetchCustomerByUserName(array $params) {\r\n $endPoint = Http::prepare('customers/details.json');\r\n $response = Http::send($this->apicaller, $endPoint, $params, 'GET');\r\n return $response;\r\n }", "title": "" }, { "docid": "61cde0dce5906e5560a2f061ea53c3ab", "score": "0.5046075", "text": "public function getAccountByEmail()\n {\n $account = DB::table('account')\n ->select('*')\n ->where('account_email', '=', $this->email)\n ->where('account_is_deleted', '=', 0)\n ->where('account_is_activated', '=', 1)\n ->execute()\n ->first();\n\n return $account;\n }", "title": "" }, { "docid": "211afdfd95674ac360277ead84cc7005", "score": "0.50458366", "text": "public function getUserSecureInfo($email = '')\n {\n $data = array(\n 'method' => 'getUserInfo',\n 'clientid' => CLIENT_ID_OPENID,\n 'email' => $email\n );\n $send_request_info = array(\n 'processing_code' => 5000,\n 'clientid' => CLIENT_ID_OPENID,\n 'subscriber_id' => '',\n 'subscriber_email' => '',\n 'data' => $this->encrypt(json_encode($data)),\n 'type' => 'GetUserInfo'\n );\n $url = URL_AUTHENSERVER . urlencode('request=' . json_encode($send_request_info));\n $return_data = json_decode($this->id_curl->get_curl($url)); // Gui thong tin thanh toan\n\n return $return_data;\n }", "title": "" }, { "docid": "49cff752ef9b63756f0f8c8c463bb42e", "score": "0.5041645", "text": "function searchEmail($email)\n\t{\n\t\t$s = new SearchStringField();\n\t\t$s->searchValue = $email;\n\t\t$s->operator = \"is\";\n\t\t\n\t\t$custSearch = new CustomerSearchBasic();\n\t\t$custSearch->email = $s;\n\t\t\n\t\t$searchRequest = new SearchRequest();\n\t\t$searchRequest->searchRecord = $custSearch;\n\t\t\n\t\ttry\n\t\t{\n\t\t $searchResponse = $this->ns->search($searchRequest);\n\t\t}\n\t\tcatch (SoapFault $soapFault)\n\t\t{\n\t\t logNSLogin($email, $email, \"SearchEmail SoapFault: \" . $soapFault->__toString());\n\t\t return NULL;\n\t\t}\n\t\t\n\t\treturn $searchResponse;\n\t\n\t}", "title": "" }, { "docid": "4f5867e29e1af763c5659740244702c8", "score": "0.5033939", "text": "public function get_email( $email, array $options = [] ) {\n\t\treturn $this->apt_get( 'email', array_merge( [ 'email' => $email ], $options ) );\n\t}", "title": "" }, { "docid": "b6c5c8567358bc1ce49507242c191829", "score": "0.5026606", "text": "public function checkAccountByEmail($email)\n\t{\n\t\t$statement = 'SELECT * FROM accounts WHERE email = ?';\n\t\t$requestGet = $this->getSql($statement, 'App\\app\\model\\Account', [$email]);\n\n\t\treturn $requestGet;\n\t}", "title": "" }, { "docid": "8d6a7579482405f85e262198739b191e", "score": "0.5021254", "text": "public function fetch(string $email_or_code): array\n {\n return $this->client->get(\"customer/{$email_or_code}\");\n }", "title": "" }, { "docid": "0746aa3daa9d4179354f8c6a5a042a82", "score": "0.50197446", "text": "public function getCustomerEmailListsAsyncWithHttpInfo()\n {\n $returnType = '\\ultracart\\v2\\models\\EmailListsResponse';\n $request = $this->getCustomerEmailListsRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "9962692a6a047a6a5e6e5d0973e1e90d", "score": "0.50196093", "text": "public function getCustomerAsyncWithHttpInfo($customer_profile_oid, $_expand = null)\n {\n $returnType = '\\ultracart\\v2\\models\\CustomerResponse';\n $request = $this->getCustomerRequest($customer_profile_oid, $_expand);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "edbb787be46265a57ebde22289e82ad4", "score": "0.5016819", "text": "public function getByEmail($email)\n {\n $select = $this->select();\n $select->where('email = ?', $email);\n return $this->fetchRow($select);\n }", "title": "" }, { "docid": "0a648ce5187ceec93d2b8f78dad2da73", "score": "0.50050616", "text": "public function emailGetByIdAsyncWithHttpInfo($id, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\EmailModel';\n $request = $this->emailGetByIdRequest($id, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "37b8fc6f4cc033e310ff254da1fa5910", "score": "0.5001589", "text": "public function getUserByEmail($email) {\r\n $stmt = $this->conn->prepare(\"SELECT name, email, api_key, status, created_at FROM users WHERE email = ?\");\r\n $stmt->bind_param(\"s\", $email);\r\n if ($stmt->execute()) {\r\n // $user = $stmt->get_result()->fetch_assoc();\r\n $stmt->bind_result($name, $email, $api_key, $status, $created_at);\r\n $stmt->fetch();\r\n $user = array();\r\n $user[\"name\"] = $name;\r\n $user[\"email\"] = $email;\r\n $user[\"api_key\"] = $api_key;\r\n $user[\"status\"] = $status;\r\n $user[\"created_at\"] = $created_at;\r\n $stmt->close();\r\n return $user;\r\n } else {\r\n return NULL;\r\n }\r\n }", "title": "" }, { "docid": "fd09823b6f92b5998311d9dc0abab820", "score": "0.49985015", "text": "public function getUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT name, email, api_key, status, created_at FROM users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n if ($stmt->execute()) {\n // $user = $stmt->get_result()->fetch_assoc();\n $stmt->bind_result($name, $email, $api_key, $status, $created_at);\n $stmt->fetch();\n $user = array();\n $user[\"name\"] = $name;\n $user[\"email\"] = $email;\n $user[\"api_key\"] = $api_key;\n $user[\"status\"] = $status;\n $user[\"created_at\"] = $created_at;\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "8ae0e88a52b5583358b57f27fb3faa10", "score": "0.4955849", "text": "function get_customer_info($args) {\n\t\ttry {\n\t\t\t/** @var GetCustomerInfoResponse */\n\t\t\t$result = new GetCustomerInfoResponse ();\n\t\t\t$result->customer_info = Controller::get_customer_info ( $args );\n\t\t\treturn $result;\n\t\t} catch ( Exception $e ) {\n\t\t\treturn (new SoapFault ( __METHOD__, $e->getMessage () ));\n\t\t}\n\t}", "title": "" }, { "docid": "5300df2bc4ef1d45390516027691f002", "score": "0.49520844", "text": "public function findByEmail(String $email);", "title": "" }, { "docid": "51b5bbc21f6d7849f313f61ccbbe770d", "score": "0.49518043", "text": "protected function getCustomersRequest($email = null, $qb_class = null, $quickbooks_code = null, $last_modified_dts_start = null, $last_modified_dts_end = null, $signup_dts_start = null, $signup_dts_end = null, $billing_first_name = null, $billing_last_name = null, $billing_company = null, $billing_city = null, $billing_state = null, $billing_postal_code = null, $billing_country_code = null, $billing_day_phone = null, $billing_evening_phone = null, $shipping_first_name = null, $shipping_last_name = null, $shipping_company = null, $shipping_city = null, $shipping_state = null, $shipping_postal_code = null, $shipping_country_code = null, $shipping_day_phone = null, $shipping_evening_phone = null, $pricing_tier_oid = null, $pricing_tier_name = null, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n\n $resourcePath = '/customer/customers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($email !== null) {\n $queryParams['email'] = ObjectSerializer::toQueryValue($email);\n }\n // query params\n if ($qb_class !== null) {\n $queryParams['qb_class'] = ObjectSerializer::toQueryValue($qb_class);\n }\n // query params\n if ($quickbooks_code !== null) {\n $queryParams['quickbooks_code'] = ObjectSerializer::toQueryValue($quickbooks_code);\n }\n // query params\n if ($last_modified_dts_start !== null) {\n $queryParams['last_modified_dts_start'] = ObjectSerializer::toQueryValue($last_modified_dts_start);\n }\n // query params\n if ($last_modified_dts_end !== null) {\n $queryParams['last_modified_dts_end'] = ObjectSerializer::toQueryValue($last_modified_dts_end);\n }\n // query params\n if ($signup_dts_start !== null) {\n $queryParams['signup_dts_start'] = ObjectSerializer::toQueryValue($signup_dts_start);\n }\n // query params\n if ($signup_dts_end !== null) {\n $queryParams['signup_dts_end'] = ObjectSerializer::toQueryValue($signup_dts_end);\n }\n // query params\n if ($billing_first_name !== null) {\n $queryParams['billing_first_name'] = ObjectSerializer::toQueryValue($billing_first_name);\n }\n // query params\n if ($billing_last_name !== null) {\n $queryParams['billing_last_name'] = ObjectSerializer::toQueryValue($billing_last_name);\n }\n // query params\n if ($billing_company !== null) {\n $queryParams['billing_company'] = ObjectSerializer::toQueryValue($billing_company);\n }\n // query params\n if ($billing_city !== null) {\n $queryParams['billing_city'] = ObjectSerializer::toQueryValue($billing_city);\n }\n // query params\n if ($billing_state !== null) {\n $queryParams['billing_state'] = ObjectSerializer::toQueryValue($billing_state);\n }\n // query params\n if ($billing_postal_code !== null) {\n $queryParams['billing_postal_code'] = ObjectSerializer::toQueryValue($billing_postal_code);\n }\n // query params\n if ($billing_country_code !== null) {\n $queryParams['billing_country_code'] = ObjectSerializer::toQueryValue($billing_country_code);\n }\n // query params\n if ($billing_day_phone !== null) {\n $queryParams['billing_day_phone'] = ObjectSerializer::toQueryValue($billing_day_phone);\n }\n // query params\n if ($billing_evening_phone !== null) {\n $queryParams['billing_evening_phone'] = ObjectSerializer::toQueryValue($billing_evening_phone);\n }\n // query params\n if ($shipping_first_name !== null) {\n $queryParams['shipping_first_name'] = ObjectSerializer::toQueryValue($shipping_first_name);\n }\n // query params\n if ($shipping_last_name !== null) {\n $queryParams['shipping_last_name'] = ObjectSerializer::toQueryValue($shipping_last_name);\n }\n // query params\n if ($shipping_company !== null) {\n $queryParams['shipping_company'] = ObjectSerializer::toQueryValue($shipping_company);\n }\n // query params\n if ($shipping_city !== null) {\n $queryParams['shipping_city'] = ObjectSerializer::toQueryValue($shipping_city);\n }\n // query params\n if ($shipping_state !== null) {\n $queryParams['shipping_state'] = ObjectSerializer::toQueryValue($shipping_state);\n }\n // query params\n if ($shipping_postal_code !== null) {\n $queryParams['shipping_postal_code'] = ObjectSerializer::toQueryValue($shipping_postal_code);\n }\n // query params\n if ($shipping_country_code !== null) {\n $queryParams['shipping_country_code'] = ObjectSerializer::toQueryValue($shipping_country_code);\n }\n // query params\n if ($shipping_day_phone !== null) {\n $queryParams['shipping_day_phone'] = ObjectSerializer::toQueryValue($shipping_day_phone);\n }\n // query params\n if ($shipping_evening_phone !== null) {\n $queryParams['shipping_evening_phone'] = ObjectSerializer::toQueryValue($shipping_evening_phone);\n }\n // query params\n if ($pricing_tier_oid !== null) {\n $queryParams['pricing_tier_oid'] = ObjectSerializer::toQueryValue($pricing_tier_oid);\n }\n // query params\n if ($pricing_tier_name !== null) {\n $queryParams['pricing_tier_name'] = ObjectSerializer::toQueryValue($pricing_tier_name);\n }\n // query params\n if ($_limit !== null) {\n $queryParams['_limit'] = ObjectSerializer::toQueryValue($_limit);\n }\n // query params\n if ($_offset !== null) {\n $queryParams['_offset'] = ObjectSerializer::toQueryValue($_offset);\n }\n // query params\n if ($_since !== null) {\n $queryParams['_since'] = ObjectSerializer::toQueryValue($_since);\n }\n // query params\n if ($_sort !== null) {\n $queryParams['_sort'] = ObjectSerializer::toQueryValue($_sort);\n }\n // query params\n if ($_expand !== null) {\n $queryParams['_expand'] = ObjectSerializer::toQueryValue($_expand);\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 ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('x-ultracart-simple-key');\n if ($apiKey !== null) {\n $headers['x-ultracart-simple-key'] = $apiKey;\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": "bc3a87fa50046acb294277a510456d3f", "score": "0.49446833", "text": "public function findByEmail(string $email);", "title": "" }, { "docid": "ba95acc35c6a390803d1cbea3407d337", "score": "0.49333066", "text": "public function show(Email $email)\n {\n return $email;\n }", "title": "" }, { "docid": "d39efd3bf48918bd444dc8137ac1daeb", "score": "0.49328482", "text": "public function getCustomersByQueryAsyncWithHttpInfo($customer_query, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n $returnType = '\\ultracart\\v2\\models\\CustomersResponse';\n $request = $this->getCustomersByQueryRequest($customer_query, $_limit, $_offset, $_since, $_sort, $_expand);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "81a33a5db6f30a95b5a8f6a8549555a3", "score": "0.49182317", "text": "public static function getContactByEmail($email) {\n \t$xero = new PrivateApplication(config('services.xero_base_config'));\n\t# get contacts from XERO \n \t$contacts = $xero->load('Accounting\\\\Contact')->execute();\n\tforeach($contacts as $contact){\n\t\tif(strtolower($contact->EmailAddress) == strtolower($email)){\n\t\t\treturn $contact->ContactID;\n\t\t}\n\t}\n\treturn false; \n }", "title": "" }, { "docid": "6c35deac0299c2bc88bc447181f3ede7", "score": "0.49110907", "text": "function vcita_get_email($params) {\n\tif (!empty($params[\"vcita_email\"])) {\n\t\treturn $params[\"vcita_email\"];\n\t} else {\n\t\treturn $this->si_contact_extract_email($params[\"email_to\"]);\n\t}\n}", "title": "" }, { "docid": "05878eda3646202ca252e1c676c91bc4", "score": "0.49042064", "text": "public function getCustomersWithHttpInfoRetry($retry , $email = null, $qb_class = null, $quickbooks_code = null, $last_modified_dts_start = null, $last_modified_dts_end = null, $signup_dts_start = null, $signup_dts_end = null, $billing_first_name = null, $billing_last_name = null, $billing_company = null, $billing_city = null, $billing_state = null, $billing_postal_code = null, $billing_country_code = null, $billing_day_phone = null, $billing_evening_phone = null, $shipping_first_name = null, $shipping_last_name = null, $shipping_company = null, $shipping_city = null, $shipping_state = null, $shipping_postal_code = null, $shipping_country_code = null, $shipping_day_phone = null, $shipping_evening_phone = null, $pricing_tier_oid = null, $pricing_tier_name = null, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n $returnType = '\\ultracart\\v2\\models\\CustomersResponse';\n $request = $this->getCustomersRequest($email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n\n if($e->getResponse()) {\n $response = $e->getResponse();\n $statusCode = $response->getStatusCode();\n $retryAfter = 0;\n $headers = $response->getHeaders();\n if (array_key_exists('Retry-After', $headers)) {\n $retryAfter = intval($headers['Retry-After'][0]);\n }\n\n if ($statusCode == 429 && $retry && $retryAfter > 0 && $retryAfter <= $this->config->getMaxRetrySeconds()) {\n sleep($retryAfter);\n return $this->getCustomersWithHttpInfoRetry(false , $email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand);\n }\n }\n\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\CustomersResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 410:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "1e8686a306a612247e1714b90c0fd5f0", "score": "0.48943782", "text": "protected function getUserByCredential($email)\n {\n $params = ['email' => $email];\n \t$user = $this->getUsers($params);\n\n \treturn $user ?: null;\n }", "title": "" }, { "docid": "a7a16459fe2d4899de853063161d3e26", "score": "0.48799363", "text": "public function emailGetByKeysAsyncWithHttpInfo($ids, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\EmailModel';\n $request = $this->emailGetByKeysRequest($ids, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "c647947ab9e23429fdf8f4aa84fdeaa3", "score": "0.48692426", "text": "public function retrieveByEmail($customerEmail, $websiteId = null)\n {\n if ($websiteId === null) {\n $websiteId = $this->storeManager->getStore()->getWebsiteId();\n }\n $emailKey = $this->getEmailKey($customerEmail, $websiteId);\n if (isset($this->customerRegistryByEmail[$emailKey])) {\n return $this->customerRegistryByEmail[$emailKey];\n }\n\n /** @var Customer $customer */\n $customer = $this->customerFactory->create();\n\n if (isset($websiteId)) {\n $customer->setWebsiteId($websiteId);\n }\n\n $customer->loadByEmail($customerEmail);\n if (!$customer->getEmail()) {\n // customer does not exist\n throw new NoSuchEntityException(\n __(\n 'No such entity with %fieldName = %fieldValue, %field2Name = %field2Value',\n [\n 'fieldName' => 'email',\n 'fieldValue' => $customerEmail,\n 'field2Name' => 'websiteId',\n 'field2Value' => $websiteId\n ]\n )\n );\n } else {\n $this->customerRegistryById[$customer->getId()] = $customer;\n $this->customerRegistryByEmail[$emailKey] = $customer;\n return $customer;\n }\n }", "title": "" }, { "docid": "32ca6efbc131ec970cd3393b6c89191a", "score": "0.48690784", "text": "function find_contact_email($data) {\n $para = array(\n 'term' => $data[\"email\"],\n 'search_by_email' => 1\n );\n $method_path = $this->get_method(\"find_contact_email\");\n $result = $this->get_pipedrive($method_path, $para, null);\n return $result;\n\n // yes:Array ( [success] => 1 [data] => Array ( [0] => Array ( [id] => 8220 [name] => Aaron Jenner [email] => aaron@cooke.toyota.co.nz [phone] => 274770507 [org_id] => [org_name] => [visible_to] => 1 ) ) [additional_data] => Array ( [search_method] => search [pagination] => Array ( [start] => 0 [limit] => 100 [more_items_in_collection] => ) ) )\n//no:{\"success\":true,\"data\":null,\"additional_data\":{\"search_method\":\"search\",\"pagination\":{\"start\":0,\"limit\":100,\"more_items_in_collection\":false}}}\n }", "title": "" }, { "docid": "c3114fde0e8d2fc1e9bf93470ddbe090", "score": "0.48664698", "text": "public function ReadByEmail($email){\n\t\t\t$sql = \"\n\t\t\t\tSELECT\n\t\t\t\t\t t1.id_usuario,\n\t\t\t\t\t t1.nome_usuario,\n\t\t\t\t\t t1.email_usuario,\n\t\t\t\t\t t1.senha_usuario,\n\t\t\t\t\t t1.matricula_usuario\n\n\t\t\t\tFROM\n\t\t\t\t\tusuario AS t1\n\t\t\t\tWHERE\n\t\t\t\t\tt1.email_usuario = '$email'\n\n\t\t\t\";\n\n\n\t\t\t$DB = new DB();\n\t\t\t$DB->open();\n\t\t\t$Data = $DB->fetchData($sql);\n\n\t\t\t$DB->close();\n\t\t\treturn $Data[0];\n\t\t}", "title": "" }, { "docid": "88ef90501b6aff9fff30de4df840481e", "score": "0.48549074", "text": "public function getCustomerEmail()\n {\n return $this->customerEmail;\n }", "title": "" }, { "docid": "a273b427904f91d52822a2bd43402ce4", "score": "0.48507562", "text": "public function getEmail ($email){\n\n $sql = \" SELECT * FROM db_users WHERE correo = '$email' \";\n $resultado = $this->select($sql);\n \n return $resultado;\n \n }", "title": "" }, { "docid": "51ec61f3d5a36eb68bacc108b0ba687d", "score": "0.4842373", "text": "function getBasicUserInfo($email){\n\t\treturn user::selectBasicInfo($email);\n\t}", "title": "" }, { "docid": "f99b2cee275508b9f2e86bfd68592a49", "score": "0.48417947", "text": "public function get($customerId)\n\t{\n\t\treturn $this->getEntity('getCustomer', 'customerid', $customerId);\n\t}", "title": "" }, { "docid": "220bee76cba98fc9cbb22e09332b10fb", "score": "0.4840073", "text": "public function getCustomerEmail(){\n\t\treturn $this->customerEmail;\n\t}", "title": "" }, { "docid": "b4be83ed6339a88d9ef450249746385d", "score": "0.48386595", "text": "public function loadByEmail($email = null) {\n return $this->load($email, 'magento_user_name');\n }", "title": "" }, { "docid": "b4be83ed6339a88d9ef450249746385d", "score": "0.48386595", "text": "public function loadByEmail($email = null) {\n return $this->load($email, 'magento_user_name');\n }", "title": "" }, { "docid": "c88927f3b2e238de1933b59c13e78737", "score": "0.48308966", "text": "public function getByEmail($email)\n\t{\n\t\t$query = DB::select()\n\t\t\t->from($this->_table)\n\t\t\t->where('email', '=', $email);\n\t\t\t\n\t\treturn $this->fetchRow($query);\n\t}", "title": "" }, { "docid": "2f35ed968cdd224d718d8e399cd1b899", "score": "0.48261893", "text": "public function findByMail($email, Gnome_Model_Account $model = NULL)\n {\n $select = $this->getDbTable()->select()\n ->where('email = ?', $email);\n\n $row = $this->getDbTable()->fetchRow($select);\n if (is_null($row)) {\n throw new BowShock_Mapper_NotFoundException(\n sprintf('Account by mail %s not found', $email)\n );\n }\n\n if (is_null($model)) {\n $model = new Gnome_Model_Account();\n }\n return $this->buildModelFromRow($model, $row);\n }", "title": "" }, { "docid": "999bd281ac328c1691edc496e0cb7005", "score": "0.482562", "text": "public function retrieveCustomer(string $customerId): ApiResponse\n {\n $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v2/customers/{customer_id}')\n ->auth('global')\n ->parameters(TemplateParam::init('customer_id', $customerId));\n\n $_resHandler = $this->responseHandler()->type(RetrieveCustomerResponse::class)->returnApiResponse();\n\n return $this->execute($_reqBuilder, $_resHandler);\n }", "title": "" }, { "docid": "0a829c4d9a13a8aed4575a59b4fb9432", "score": "0.48199385", "text": "function getByEmail($email) {\r\n $query = $this->db->prepare('SELECT * FROM usuarios WHERE email = ?');\r\n $query->execute([$email]);\r\n return $query->fetch(PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "930f78b77625a1e06d0a9c2d164c0381", "score": "0.48007843", "text": "public function getCustemailById($cust_id){\n\t\t$customer_email = $this->db->get_where('customer_tbl',array('customer_id' => $cust_id))->row()->customer_email;\n\t\t//echo $this->db->last_query();die;\n\t\treturn $customer_email;\n\t}", "title": "" }, { "docid": "084abd93900e1468a92b2839ed823632", "score": "0.47999856", "text": "function getByEmail($email) {\n $query = $this->db->prepare('SELECT * FROM usuarios WHERE email = ?');\n $query->execute([$email]);\n return $query->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "d13e64d79ad6957ecf63d9a3296e0e49", "score": "0.47990987", "text": "public static function findByEmail($email)\n {\n return static::findOne(['email' => $email, 'status' => static::STATUS_ACTIVE]);\n }", "title": "" }, { "docid": "41141a02e4738be150f643be6d923c17", "score": "0.4796279", "text": "public static function getContractorData($email)\n {\n// ctr.location, ctr.job, ctr.email_address, ctr.full_name,\n// ppf.person_id as manager_id\n// from APPS.WCS_CONTRACTORS_V ctr\n// join apps.per_all_people_f ppf on ppf.email_address = ctr.supervisor_emailid\n// where ctr.email_address = '$email'\n// and trunc(sysdate) between ppf.effective_start_date and ppf.effective_end_date\";\n\n $query = \"select ctr.person_number, ctr.person_type, ctr.organization_name,\n ctr.location, ctr.job, ctr.email_address, ctr.full_name,\n ctr.supervisor_emailid as manager_email\n from APPS.WCS_CONTRACTORS_V ctr\n where ctr.email_address = '$email'\";\n\n $results = self::fetchGenericResults($query);\n if (count($results) == 1) {\n return $results[0];\n }\n return [];\n }", "title": "" }, { "docid": "9bcdfc08bb43ae773d875a7e0dcbdad7", "score": "0.47949597", "text": "public function emailGetListAsyncWithHttpInfo($select = null, $filter = null, $expand = null, $custom = null, $skip = null, $top = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\EmailModel[]';\n $request = $this->emailGetListRequest($select, $filter, $expand, $custom, $skip, $top);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "d60950bb176dfb3dc5c9c675fd9388ba", "score": "0.4768122", "text": "function get_customers() {\n\t$api_resource = '/admin/customers.json';\n\t$api_url = 'https://' . API_KEY . ':' . API_PASSWORD . '@' . HOSTNAME . $api_resource;\n\t$result = httpGet($api_url);\n\treturn $result;\n}", "title": "" }, { "docid": "25f6f5f8b2b6ab605aeed7185971550b", "score": "0.47680998", "text": "public function getAccountByEmail($email)\n {\n $STH = $this->connection->prepare(\"SELECT idAccount, apiKey, date_format(date, '%Y-%m-%d') as date FROM Accounts a\n INNER JOIN Payments p ON a.idPayment = p.idPayment WHERE email=:email\");\n $STH->bindParam(':email', $email);\n\n if ($STH->execute()) {\n $account = $STH->fetch();\n return $account;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "dabea1763136d5e775ae9530d1059c24", "score": "0.47605345", "text": "public static function findByEmail($email)\n {\n return static::findOne(['email' => $email, 'status' => self::STATUS_ACTIVE]);\n }", "title": "" }, { "docid": "dabea1763136d5e775ae9530d1059c24", "score": "0.47605345", "text": "public static function findByEmail($email)\n {\n return static::findOne(['email' => $email, 'status' => self::STATUS_ACTIVE]);\n }", "title": "" }, { "docid": "de9c71013657060850a5d5aa26c7b477", "score": "0.47580922", "text": "public function byEmail($email) {\r\n\r\n $sql = \"SELECT * FROM users WHERE email=?;\";\r\n\r\n $conn = Database::getBdd();\r\n $stmt = $conn->prepare($sql);\r\n\r\n $stmt->bind_param(\r\n \"s\", // tells you what type the vars will be (check php docs for more info)\r\n $email\r\n );\r\n $stmt->execute();\r\n return $stmt->get_result();\r\n }", "title": "" }, { "docid": "96e457707fcc9bb49752eda3f9d0fd47", "score": "0.4743465", "text": "function getUserByEmail (string $email){\n $sql = 'SELECT * FROM user WHERE email = ?';\n return $this->database->selectOne($sql,[$email]);\n \n }", "title": "" }, { "docid": "e994740bec959ebcb35d2d09302f195f", "score": "0.47368577", "text": "public function findByEmailCpf(string $email = null, string $cpf = null): bool\n\t{\n\t\t$stmt = $this->db->prepare('\n\t\t\tSELECT *\n\t\t\tFROM customers\n\t\t\tWHERE (email = :email AND email IS NOT NULL)\n\t\t\t OR (cpf = :cpf AND cpf IS NOT NULL)\n\t\t\tLIMIT 1\n\t\t');\n\t\t$stmt->execute([\n\t\t\t':email' => $email,\n\t\t\t':cpf' => Helpers::getOnlyNumbers($cpf)\n\t\t]);\n\n\t\t// If there's a customer, pass it's values to the object\n\t\tif ($customer = $stmt->fetch()) {\n\t\t\tforeach ($customer as $key => $val) {\n\t\t\t\t$this->$key = $val;\n\t\t\t}\n\t\t}\n\n\t\t// If it's not empty, return true\n\t\treturn !empty($customer);\n\t}", "title": "" }, { "docid": "05807c9661157f5353697dbf8c4f964d", "score": "0.47354934", "text": "public static function get_contacts_by_email( $email, $args = array() ) {\n\t\treturn self::get_contacts_where( 'email', '=', $email, $args );\n\t}", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.4728828", "text": "public function getEmail();", "title": "" }, { "docid": "9d0b0cf02b840a3223b3b9e64adc2fff", "score": "0.47279698", "text": "public function findByEmail($email);", "title": "" }, { "docid": "9d0b0cf02b840a3223b3b9e64adc2fff", "score": "0.47279698", "text": "public function findByEmail($email);", "title": "" }, { "docid": "9d0b0cf02b840a3223b3b9e64adc2fff", "score": "0.47279698", "text": "public function findByEmail($email);", "title": "" }, { "docid": "ea2b08f5f805b921592d28b940fb8639", "score": "0.4721865", "text": "public function getByEmailAddress($emailAddress)\n {\n return $this->_customerModel->getByEmailAddress($emailAddress);\n }", "title": "" }, { "docid": "83c167e8595bbacb85d3d0fd9572745c", "score": "0.47106427", "text": "public function fetchCustomerById(array $params) {\r\n $endPoint = Http::prepare('customers/details-by-id.json');\r\n $response = Http::send($this->apicaller, $endPoint, $params, 'GET');\r\n return $response;\r\n }", "title": "" }, { "docid": "645076c4eead25abd74ba1c60b6d7701", "score": "0.47034213", "text": "public function getByEmail($email) {\n return $this->dao->findByEmail($email);\n }", "title": "" }, { "docid": "98a21e2dc176adb677929f70bfa4748a", "score": "0.46885508", "text": "public function get_customer() {\n\t\treturn it_exchange_get_customer( $this->customer );\n\t}", "title": "" } ]
a00c9b2af2eae55b80ea8d598d3ed068
Sent OTP to mobile number
[ { "docid": "1c904eaf51d142081018266709828f20", "score": "0.61096114", "text": "public function mobileOtp($data){\n $error_messages = [];\n $results = [];\n $customer_obj = null;\n $customer_arr = [];\n $artist_id = isset($data['artist_id']) ? trim($data['artist_id']) : '';\n $mobile = isset($data['mobile']) ? trim($data['mobile']) : '';\n $mobile_country_code = isset($data['mobile_country_code']) ? trim($data['mobile_country_code']) : '';\n\n try {\n // Request Mobile OTP\n $results['mobile_otp_id'] = $this->customersms->requestOtp($data);\n }\n catch (\\Exception $e) {\n $error_messages[] = $e->getMessage();\n\n if(isset($error_messages[0]) && $error_messages[0]) {\n // This hack to get Client errors\n if (preg_match(\"/Client error/i\", $error_messages[0])) {\n $result_arr = explode(':', $error_messages[0]);\n $result_arr_count = count($result_arr);\n if($result_arr) {\n $error_msg = $result_arr[($result_arr_count - 1)];\n if($error_msg) {\n $matches = null;\n preg_match_all('/\\\"(.*)\\\"/', $error_msg, $matches);\n if($matches && isset($matches[1]) && isset($matches[1][0])) {\n $error_messages = [];\n if(preg_match('/^Invalid phone number/i', $matches[1][0])) {\n $error_messages[] = 'You have entered an invalid mobile number.Please enter a vaild mobile number.';\n }\n else {\n $error_messages[] = $matches[1][0];\n }\n }\n }\n }\n }\n }\n }\n\n if($error_messages) {\n $results['status_code'] = 200;\n }\n\n return ['error_messages' => $error_messages, 'results' => $results];\n }", "title": "" } ]
[ { "docid": "2582b9f10bf36f9d820c4aea82560fdb", "score": "0.7439781", "text": "public function sendOtpForForgetPass($mobile_no){\n //generate Otp\n //Fire Event \n //Store Otp in reset_Verify table with flag=1;\n //$this->saveOtp();\n }", "title": "" }, { "docid": "90993877ae8761702b84562406bda500", "score": "0.73134387", "text": "public function SendOtpTo($user_mobile){\n \n\n // http://bulksms.indiadigitalsms.com/api/smsapi?key=Account key&route=Route&sender=Sender id&number=Number(s)&sms=Message\n $headers = array(\"Content-Type:application/json\");\n \n $apiKey = \"553e0ed6a2f2030382ee195b6e69c987\";\n $route = \"1\";\n $senderId = \"RURALN\";\n $otp = rand(000000,999999);\n $message = \"\".$otp.\" is your verification code for Rural App\";\n $message = \"Dear Customer, \".$otp.\" is the otp (one time password) to verify your mobile number. do not share it with anyone. RURAL news\";\n $templateid = 1207162044151944939;\n \n \n $call_url = \"http://bulksms.indiadigitalsms.com/api/smsapi?key=\".$apiKey.\"&route=\".$route.\"&sender=\".$senderId.\"&number=\".urlencode($user_mobile).\"&sms=\".urlencode($message).\"&templateid=\".$templateid;\n // echo $call_url; exit();\n $ch = curl_init(); \n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); \n curl_setopt($ch, CURLOPT_URL, $call_url); \n \n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); \n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \n \n $response = curl_exec($ch); \n \n if ($response === FALSE) { \n die('Curl failed: ' . curl_error($ch)); \n } \n curl_close($ch);\n // dd($response);\n //return $response; \n return $otp; \n \n // $check_url = \"http://bulksms.indiadigitalsms.com/api/dlrapi?key=\".$apiKey.\"&messageid=\".$response.\"\";\n \n // $ch = curl_init(); \n // curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); \n // curl_setopt($ch, CURLOPT_URL, $check_url); \n \n // curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); \n // curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); \n // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \n \n // $response = curl_exec($ch); \n // // Execute post \n // if ($response === FALSE) { \n // die('Curl failed: ' . curl_error($ch)); \n // } \n // curl_close($ch);\n // // print_r($response); exit;\n // return $response; \n }", "title": "" }, { "docid": "1144e63c3427b17490671ff30e9d2a28", "score": "0.6973269", "text": "public function sendMobileOtpForVerify($mobile){\n //Fire Event for mobile Otp\n //Store Email data with flag=0;\n }", "title": "" }, { "docid": "93ed56f30127a256b27d266f1c5ea3cd", "score": "0.69392776", "text": "function sendsms($recipient_no,$rand_no){\n $message = 'Dear User, OTP for mobile number verification is '.$rand_no.'. Thanks CodexWorld';\n // $send = sendSMS('Mapfind', $recipient_no, $message);\n $result = mail($recipient_no,\"from submission\", $message, \"arinzeaco@gmail.com\");\n\n if($result ){\n $response[\"status\"] = 1;\n $response[\"message\"]=\"Login Succesfull\";\n echo json_encode($response);\n }else{\n $response[\"status\"] = 0;\n $response[\"message\"]=\"Failed\";\n echo json_encode($response);\n }\n}", "title": "" }, { "docid": "3cfcf2189e2e166444c49d5a8ab948ac", "score": "0.6861908", "text": "public function resendOtp()\n\t{\n\t\t$otpmobile=$this->input->post('mobile');\n\t\t$insert = array(\n\t\t\t'email'=>$this->input->post('email'),\n\t\t\t\n\t\t\t'otp' => random_string('nozero',6),\n\t\t\t'ip'=>$this->input->ip_address()\n\t\t);\n\t\t$result=$this->m_authentication->updateregister($insert);\n\t\t $sentOtp=$this->registerOtp($insert,$otpmobile);\n\t\t $sentEmailOtp=$this->sendregister($insert['email'], $insert['otp'] );\n\n\t\t if(!empty(($sentOtp)) || !empty(($sentEmailOtp))){\n\t\t\techo json_encode(array(\n\t\t\t\t\"smsStatusCode\"=>$sentOtp,\n\t\t\t\t\"emailStatusCode\"=>$sentEmailOtp,\n\t\t\t));\n\t\t}\n\n\t}", "title": "" }, { "docid": "7f6627433a1254f6f7791952198c74d3", "score": "0.6852505", "text": "function send($phone){\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"https://www.tokocash.com/oauth/otp\"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"msisdn=$phone&accept=call\"); $asw = curl_exec($ch);\n curl_close($ch);\n echo $asw.\"\\n\";\n}", "title": "" }, { "docid": "7f6627433a1254f6f7791952198c74d3", "score": "0.6852505", "text": "function send($phone){\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"https://www.tokocash.com/oauth/otp\"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"msisdn=$phone&accept=call\"); $asw = curl_exec($ch);\n curl_close($ch);\n echo $asw.\"\\n\";\n}", "title": "" }, { "docid": "6b80bf0b5fdd931c5c6113c252d2c855", "score": "0.6830602", "text": "function send_otp($email,$name)\n\n{\n\n $otp = mt_rand(100000, 999999);\n $msg = \"hello $name otp for Solve to Unlock registration: $otp\";\n if(mail($email,\"Otp for registration\",$msg))\n {\n return $otp;\n }\n\n else return 0;\n\n}", "title": "" }, { "docid": "71778619f18b6173e28de495da06d6f6", "score": "0.67767185", "text": "function send($phone){\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, \"https://www.tokocash.com/oauth/otp\"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_HEADER, true);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"msisdn=$phone&accept=call\"); $asw = curl_exec($ch);\r\n curl_close($ch);\r\n echo $asw.\"\\n\";\r\n\r\n}", "title": "" }, { "docid": "b000fec003892f645968a1aa2395b17d", "score": "0.6746929", "text": "public function sendSmsCode()\n {\n return sendSMS(request('phone'));\n }", "title": "" }, { "docid": "131e21a1ee146cb9e7209e455b6edfd7", "score": "0.67284614", "text": "public function getOTP($msisdn)\n // public function getOTP($msisdn, $otp, $total, $datecreate)\n {\n // gui OTP\n /*\n try {\n $strOtp = VtHelper::genRandomString(6);\n $msgOtp = 'Ma xac thuc cua quy khach la: ' . $strOtp . '. Quy khach vui long nhap ma nay de tiep tuc thuc hien cac thao tac su dung dich vu Tien ich truc tuyen cua Viettel Telecom Portal. Xin cam on!';\n $client = new sendSMSClient();\n $result = $client->sendSMS228($msisdn, $msgOtp);\n if ($result) {\n $otp->setMsisdn(VTPHelper::formatMobileNumber($msisdn, VTPHelper::MOBILE_849x));\n // $otpString = MVPHelper::genRandomString(6);\n $otp->setOtp('');\n $date = date(\"Y-m-d H:i:s\");\n $expTime = date('Y-m-d H:i:s', strtotime($date . ' + 1 day'));\n //$expTime = date('Y-m-d H:i:s', strtotime($date . ' + 30 minute'));\n $otp->setTimeExp($expTime);\n // chong spam\n $otp->setTotal($total);\n $otp->setDatecreated($datecreate);\n $otp->setOtpType(1);\n $otp->setOtp($strOtp);\n $otp->save();\n return true;\n }\n } catch (Exception $e) {\n return false;\n }\n return false;\n */\n\n // end huync2\n $args = array(\n 'username' => $this->bccsUsername,\n 'password' => $this->bccsPassword,\n 'wscode' => 'getOTP',\n 'param' => array(\n array('name' => 'msisdn', 'value' => $msisdn),\n )\n );\n sfContext::getInstance()->getLogger()->log('[Service - Lay thong tin tai khoan] getOTP Begin, arrs='.json_encode($args) , sfLogger::ERR);\n if (!$this->client) {\n return false;\n }\n\n $result = false;\n try {\n $result = $this->client->__soapCall('gwOperation', array($args));\n } catch (Exception $e) {\n sfContext::getInstance()->getLogger()->log('[Service - Lay thong tin tai khoan] getOTP exception, msg= ' . $e->getMessage() , sfLogger::ERR);\n }\n sfContext::getInstance()->getLogger()->log('[Service - Lay thong tin tai khoan] getOTP result=' . json_encode($result), sfLogger::ERR);\n\n if ($result !== false) {\n $value = MVPHelper::getOriginalBccsGW($result->original, \"<getOTPReturn>\", \"</getOTPReturn>\");\n return $value->resultCode;//0 - thanh cong\n }\n return false;\n }", "title": "" }, { "docid": "d102cff7ad77e3cfca41d3efe709c0ff", "score": "0.6706422", "text": "public function userOtp()\n {\n \n $user = User::findOrFail(Auth::id());\n $data['otp_number'] = $otp = rand(1000, 9999);\n $data['type'] = 'login_otp';\n $data['email'] = $user->email;\n Session::put('otp_number', $otp);\n Session::put('message', \"Check your mail for otp!\");\n // dd(env('QUEUE_MAIL'));\n\n\n if (env('QUEUE_MAIL') == 'on') {\n dispatch(new SendEmailJob($data));\n }else{\n Mail::to($user->email)->send(new UserLoginOtp($data));\n }\n \n return redirect()->route('user.otp.view');\n }", "title": "" }, { "docid": "af17e4a7c632d61bf8f230ba4d2c2670", "score": "0.666967", "text": "public function resend_otp_data_post()\n\t {\n\t \t$response = new StdClass();\n\t $result = new StdClass();\n\t\t$device_id =$this->input->post('device_id');\n\t $mobile_no =$this->input->post('mobile_no');\n\t $otpValue=mt_rand(1000, 9999);\n\t $data1->device_id = $device_id;\n $data1->mobile_no=$mobile_no;\n $data1->otp=$otpValue;\n\t\t$res = $this->Seller->send_otp($mobile_no,$otpValue);\n if(!empty($mobile_no))\n {\n $res1 = $this->Seller->resend_otp($data1);\n $data->status = '1';\n\t\t\tarray_push($result,$data);\n\t\t\t$response->data = $data;\n }\n\n else\n {\n $data->status = '0';\n\t\t\tarray_push($result,$data);\n\t\t\t$response->data = $data;\n } \n echo json_output($response);\n }", "title": "" }, { "docid": "e78d14ce782800c1bb13e5ffc93d25f6", "score": "0.6649617", "text": "public function action_gsm_phonenumber() {\n $this->template->right_content = View::factory('user/gsm_phonenumber.tpl')->bind('message', $message);\n $this->template->left_content = View::factory('user/gsm_phonenumber_info.tpl');\n // if the user updates profile\n if (HTTP_Request::POST == $this->request->method()) {\n //@todo validate as a cameroon phone number\n $phone = Arr::get($_POST, 'phone');\n print_r($phone);\n exit;\n //check if gsm exist, if- pull login details\n // if-not create login details\n //send to user\n }\n \n }", "title": "" }, { "docid": "137500ba6f6993792ad2f72b7ea29e0c", "score": "0.6643403", "text": "function LoginSignUp() {\r\n\r\n\tif($_SERVER['REQUEST_METHOD'] == \"POST\"){\r\n\r\n\t\tif(isset($_POST['otp'])) {\r\n\t\t$m_number=clean($_POST['mobileNumber']);\r\n\r\n\r\n\tif(!empty($m_number)) {\r\n\r\n\r\n\t\tif(validate_phone_number($m_number) && strlen($m_number)==10){\r\n\r\n\r\n\t\tif(isset($_SESSION['token']) && $_POST['token'] === $_SESSION['token']) {\r\n\r\n\t\t\t$mobileNumber = clean($_POST['mobileNumber']);\r\n\t\t\t$_SESSION[\"mobileNumber\"]=$mobileNumber;\r\n\r\n\t\t\t$validation_code =mt_rand(1000,9999);\r\n\t\t\t$_SESSION[\"code\"] = $validation_code;\r\n\r\n\r\n\r\n\r\n\r\n\r\nif(isset($_POST['otp'])) {\r\n\r\n $textMessage=\"Your Kalpataru OTP is: \" . $validation_code . \" . \" . \"Note: Please DO NOT SHARE this OTP with anyone.\";\r\n $mobileNumber = $_POST[\"mobileNumber\"];\r\n\r\n // $apiKey = urlencode('aJ0P6F8n4o4-XvHDiHwzqelyjJ4aP0xQVjFjAChKzv');\r\n\r\n\r\n// $apiKey = urlencode('eCrNnIFRJzA-3TFJXByn4ZtPmSUqklYc1T7iZob7Hb'); //subhasish\r\n\r\n // Message details\r\n $numbers = array($mobileNumber);\r\n $sender = urlencode('TXTLCL');\r\n $message = rawurlencode($textMessage);\r\n \r\n $numbers = implode(',', $numbers);\r\n\r\n // Prepare data for POST request\r\n $data = array('apikey' => $apiKey, 'numbers' => $numbers, \"sender\" => $sender, \"message\" => $message);\r\n\r\n // Send the POST request with cURL\r\n $ch = curl_init('https://api.textlocal.in/send/');\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $response = curl_exec($ch);\r\n curl_close($ch); \r\n // Process your response here\r\n echo $response;\r\n\r\n} \r\n\r\n\r\n\r\n\t\tsetcookie('temp_access_code', $validation_code, time() + 120);\r\n\r\n$url_mob=encode($mobileNumber);\r\n$url_code=encode($validation_code);\r\n\r\n redirect(\"code-mobile.php?m_no=$url_mob&code=$url_code&otp=$validation_code\");\r\n\r\n\t}else{\r\n\r\n\t\tredirect(\"index.php\");\r\n\r\n\t}\r\n\r\n\t}else{\r\n\t\techo validation_errors(\"Please enter a valid mobile number\");\r\n\t}\r\n\r\n\t}else{\r\n\t\techo validation_errors(\"Please enter a mobile number\");\r\n\t}\r\n\t}\r\n}\r\n\r\n\r\n\r\n\tif(isset($_POST['cancel'])) {\r\n\t\tunset($_SESSION['mobileNumber']);\r\n\t\tredirect(\"index.php\");\r\n}\r\n\r\n \t}", "title": "" }, { "docid": "847648d727c697e4f6500c2229b365f8", "score": "0.66432375", "text": "public function send_otp($phoneNumber, $msg )\n {\n $response = false;\n if(empty($phoneNumber) || empty($msg)) {\n return $response;\n }\n\n //echo env('APP_SRC_NUMBER', ''); exit;\n $params = array(\n 'src' => config('plivo.APP_SRC_NUMBER', ''),\n 'dst' => $phoneNumber,\n 'text' => $msg\n );\n $response = Plivo::sendSMS($params);\n\n return $response;\n }", "title": "" }, { "docid": "f795615de35c2df612972c290a10e8b8", "score": "0.664158", "text": "public function sendNewOtpSms(OtpAuthenticatable $model, $mobile)\n {\n $otp = $this->create($model);\n $this->sendTextMessage($otp, $mobile);\n }", "title": "" }, { "docid": "dba12b45d5d80d8ac20a19e9142a3b57", "score": "0.6641372", "text": "public function registerOtp($data='',$otpmobile)\n {\n\t\t\n\t\n\t\n\t\n\t\t\n $msg = 'Your One time Password For Arjunaa Academy registration is ' . $data['otp'] . ' . Do not share with anyone';\n \n $url = 'http://trans.smsfresh.co/api/sendmsg.php';\n $param = 'user=5inewebsolutions&pass=5ine5ine&sender=PROPSB&phone=' . $otpmobile . '&text=' . $msg . '&priority=ndnd&stype=normal';\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $param);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $server_output = curl_exec($ch);\n\t\tcurl_close($ch);\n return $server_output;\n\t}", "title": "" }, { "docid": "21200763dba86f3072738e1a05cbd69b", "score": "0.66107875", "text": "public function sendOTP($msisdn, $OTP, $additionalMessage = \"\") {\n $otpMessage = $additionalMessage . 'Your OTP is: ' . $OTP;\n\n $curl = curl_init();\n curl_setopt_array(\n $curl,\n array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => 'http://sms.sslwireless.com/pushapi/dynamic/server.php?user=' . env('SMS_USER') . '&pass=' . env('SMS_PASSWORD') . '&sid=' . env('SMS_STAKEHOLDER') . '&sms=' . urlencode($otpMessage) . '&msisdn=' . $msisdn . '&csmsid=123456789',\n CURLOPT_USERAGENT => 'Sample cURL Request')\n );\n\n $resp = curl_exec($curl);\n curl_close($curl);\n Log::info($otpMessage);\n Log::info($resp);\n }", "title": "" }, { "docid": "8706f439ae3747f600326d03fa4f5991", "score": "0.659734", "text": "public function send_sms($mobile_number,$token,$name)\n {\n $response = false;\n $smsText = \"Hello $name,\";\n $smsText .= \"Please enter following code for reset password : $token\";\n $response = $this->send_otp($mobile_number,$smsText);\n return $response;\n }", "title": "" }, { "docid": "739dbe768b59d59762067e3c0c7e47f1", "score": "0.6588813", "text": "public function sendCode()\n {\n $mobile = $this->email;\n $test = stripos($mobile, '0');\n $user = User::findOne(['username' => $mobile]);\n $randNum = rand(1111, 9999);\n $exist = User::findOne(['verification' => $randNum]);\n\n\n if (!empty($exist)) {\n $this->sendCode();\n } else {\n $user->verification = (string) $randNum;\n $user->save();\n\n\n Yii::$app->sms->VerifyLookup($mobile, $randNum, '', '', 'login');\n\n return true;\n }\n }", "title": "" }, { "docid": "580b86f6cef10f67edd3b5129baed2a5", "score": "0.65596753", "text": "function sendSMStoUser($ph_num,$msg) {\n\n\n}", "title": "" }, { "docid": "3ca007ecc644d823fc8ad4f608dc9264", "score": "0.6501785", "text": "public function sentMobileOtp(Request $request)\n {\n try {\n //check syntax validation for mobile & country code\n $this->loginValidationService->checkMobileValidation($request);\n //get user details using username/email/mobile\n $user = $this->authLoginALRepository->getUserByMobile($request->mobile, $request->country_code);\n if (empty($user)) {\n if (config('al_auth_config.allow_login_or_registration_through_mobile_number') === true) {\n //user registration in temporary table \n $tempDetails = $this->authRegistrationALRepository->register($request);\n if ($tempDetails['status'] !== 'success') {\n $customUserMessageTitle = __('error_messages.system_error');\n $this->apiResponse->setCustomResponse($customUserMessageTitle);\n throw new Exception($customUserMessageTitle, 500);\n }\n } else {\n $customUserMessageTitle = __('error_messages.missing_mobile_title');\n $customUserMessageText = __('error_messages.missing_mobile_text');\n $this->apiResponse->setCustomResponse($customUserMessageTitle, $customUserMessageText);\n throw new Exception($customUserMessageTitle, 401);\n }\n }\n if (config('alNotificationConfig.enable_notification') === true && config('alNotificationConfig.notification_type.sms')) {\n $details = $this->authLoginALRepository->sentMobileOtp($request);\n if ($details['status'] == 'success') {\n Log::info('Login mobile otp');\n $customUserMessageTitle = __('messages.otp_send_success_title');\n $customUserMessageText = __('messages.otp_send_success_text');\n $this->apiResponse->setCustomResponse($customUserMessageTitle, $customUserMessageText);\n } else if ($details['status'] == 'error' && $details['error'] == 'delay') {\n $customUserMessageTitle = __('error_messages.delay_otp_mobile_title', ['delay' => config('al_auth_config.sms.delay') ? config('al_auth_config.sms.delay') : 60]);\n $customUserMessageText = __('error_messages.delay_otp_mobile_text', ['delay' => config('al_auth_config.sms.delay') ? config('al_auth_config.sms.delay') : 60]);\n $this->apiResponse->setCustomResponse($customUserMessageTitle, $customUserMessageText);\n throw new Exception($customUserMessageTitle, 422);\n } else if ($details['status'] == 'error' && $details['error'] == 'day_limit_error') {\n $customUserMessageTitle = __('error_messages.day_limit_error_otp_mobile_title', ['day_limit_error' => config('al_auth_config.sms.day_limit_error') ? config('al_auth_config.sms.day_limit_error') : 60]);\n $customUserMessageText = __('error_messages.day_limit_error_otp_mobile_text', ['day_limit_error' => config('al_auth_config.sms.day_limit_error') ? config('al_auth_config.sms.day_limit_error') : 60]);\n $this->apiResponse->setCustomResponse($customUserMessageTitle, $customUserMessageText);\n throw new Exception($customUserMessageTitle, 422);\n } else {\n $customUserMessageTitle = __('error_messages.invalid_mobile_title');\n $customUserMessageText = __('error_messages.invalid_mobile_text');\n $this->apiResponse->setCustomResponse($customUserMessageTitle, $customUserMessageText);\n throw new Exception($customUserMessageTitle, 422);\n }\n } else {\n $customUserMessageTitle = __('error_messages.sms_service_unavailable_title');\n $customUserMessageText = __('error_messages.sms_service_unavailable_text');\n $this->apiResponse->setCustomResponse($customUserMessageTitle, $customUserMessageText);\n throw new Exception('SMS service disabled.You can enabled it from config.', 401);\n }\n\n return $this->apiResponse->getResponse(200);\n } catch (Exception $e) {\n $errorMessage = $e->getMessage();\n $errorLine = $e->getLine();\n $errorFile = $e->getFile();\n $errorResponseMessage = $errorMessage != null ? $errorMessage : __('error_messages.system_error');\n return $this->apiResponse->getResponse($e->getCode(), null, $errorResponseMessage, $errorFile, $errorLine);\n }\n }", "title": "" }, { "docid": "eb41abda5aeb5b724998050ed5c53ffd", "score": "0.64964193", "text": "private function email_otp($otp,$email,$contact_num,$name,$bodymsg,$subject){\n\t\t// Always set content-type when sending HTML email\n\t\t$headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n\t\t$headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n\n\t\t// More headers\n\t\t$headers .= 'From: <info@idukaan.ae>' . \"\\r\\n\";\n\t\t$headers .= 'Cc: info@idukaan.ae' . \"\\r\\n\";\n\t\tmail($email,$subject,$bodymsg,$headers);\n\t\t$success = 'success';\n\t\treturn $success;\n\n }", "title": "" }, { "docid": "cf2359ca04da27ca17249dbf63f9ef01", "score": "0.64944166", "text": "public function sendOTP($data)\n {\n return $this->otp->sendOTP($data);\n }", "title": "" }, { "docid": "bafa517e7e1848930752475e7886e467", "score": "0.640675", "text": "public function resend_verification_code(){\n if(isset($_SESSION['_token']))\n {\n $where = json_decode(base64_decode($_SESSION['_token']), true);\n $subscribers = readTable('subscribers', $where);\n $mobile = $where['username'];\n\n if($subscribers && $subscribers[0]->is_use==0){\n $code = $subscribers[0]->verify_code;\n }\n else{\n $code = rand(1111, 9999);\n update('subscribers', ['verify_code'=>$code, 'is_use'=>0], $where);\n }\n\n $text = \"Your Verification Code Is {$code}\";\n send_sms($mobile, $text);\n redirect('verification', 'refresh');\n }\n }", "title": "" }, { "docid": "88e082a6890819162254d9b5e54869e0", "score": "0.6406101", "text": "public function resendotp_post(){\n\n\t \t$customer_id = $this->input->post('customer_id');\n\t //$auth_token = $this->input->post('auth_token');\n\t \t$postdata = array(\n\t\t\t\t\t\t\t'customer_id' => $customer_id,\n\t\t\t\t\t\t //'auth_token' => $auth_token\n\t\t\t\t\t\t\t);\n\t \t\n\t //$this->Api_model->setauthtoken($auth_token);\n\t\t\n\t\t#check user auth token.\n\t //$checkToken = $this->Api_model->istokenExists();\n\t\t\n\t\t#check mandatory input fields.\n\t\t$errorStr = $this->checkRequiredParam($postdata);\n\t\n\t \tif($errorStr)\n\t\t{\n\t\t\t$this->response(array('Error'=>true,'Code'=>200,'Status'=>0,'Message' => 'Please fill these all mandatory fields '.$errorStr,'Payload'=>array()));\n\t\t\t\n\t\t}/*else if($checkToken == 0)\n\t\t{\n\t\t\t$this->response(array('Error'=>false,'Code'=>204,'Status'=>0,'Message' => 'You do not have authentication.','Payload'=>''));\n\t\t}*/else{\n\t\t\t$this->Api_model->setuserid($customer_id);\n\t\t\t$result = $this->Api_model->checkexistinguserbyid();\n\t\t if($result){\n\t\t $this->Api_model->setuserid($customer_id);\n\t\t $customerdetails = $this->Api_model->getcustomerdetails();\n\t\t $customerotpdetails = $this->Api_model->getuserotpdetails();\n\t\t\t \n\t\t\t $name = $customerdetails['fname'];\n\t\t\t $lastinsertid = $customerdetails['id'];\n\t\t\t $OTP = $customerotpdetails['otp'];\n\t\t\t $email = $customerdetails['email'];\n\t\t\t $contact_num = $customerdetails['mobile'];\n\t\t\t\t$bodymsg = 'Thank you for registering with Ziqqi. To get started kindly enter otp ' . $OTP . '.\n\t\t\t\t Regards, \n\t\t\t\t Team Ziqqi';\n\t\t\t \n\t\t\t $subject = 'Ziqqi - Otp Verification';\n\t\t\t #$statussms = $this->SendsmsOtp($OTP,$email,$contact_num,$name,$bodymsg);\n\t\t\t\n\t\t\t $statusmail = $this->SendmailOtp($OTP,$email,$contact_num,$name,$bodymsg,$subject);\n\t\t\t\tif(!empty($statusmail))\n\t\t\t\t{\n\t\t\t\t\t$this->response(array('Error'=>false,'Code'=>200,'Status'=>1,'Message' => 'otp sent successfully.','Payload'=>array('otp'=>$OTP)));\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$this->response(array('Error'=>true,'Code'=>204,'Status'=>0,'Message' => 'otp not sent.','Payload'=>array()));\n\t\t\t\t} \n\t\t\t}else{\n\t\t\t $this->response(array('Error'=>true,'Code'=>204,'Status'=>0,'Message' => 'Customer not exist.','Payload'=>array()));\n\t\t\t} \n }\n }", "title": "" }, { "docid": "f7f5c34fb65c4e41926c280cc2b985de", "score": "0.6399675", "text": "public function event_resend_otp(array &$form, FormStateInterface $form_state){\n\n global $user;\n $otp = $num = str_pad(rand(0,9999),4,'0',STR_PAD_LEFT);\n $session = \\Drupal::request()->getSession();\n /**** SET SESSION ****/\n $session->set('otp', 1234);\n\n $email = $_POST['mail'];\n\n $session->set('login-email', $email);\n\n $params['subject'] = 'Event Management Portal';\n $params['body'][] = $text;\n $text = t('2 Dear Please use the OTP to Login the image website\"'.$otp.'\" <img src=\"https://115.186.58.50/boi-event-portal/image-qr-generate/Fahadi%20Da%20Niya%20Kus\" />');\n $params['body'][] = $text;\n $params['body'][] = ('2 Dear Please use the OTP to Login the image website\"'.$otp.'\" <img src=\"https://115.186.58.50/boi-event-portal/image-qr-generate/Fahadi%20Da%20Niya%20Kus\" />');\n\n $mail = customMailSend($email, $params);\n\n\n echo 'sent';\n exit;\n\n\n $output = [];\n $output['a'] = ['#markup'=>\"<span class='otp-resend'>OTP has been sent Successfully.</span>\"];\n return $output;\t\n drupal_set_message(t('Its done'), 'status', false);\t\n $ajax_response = new AjaxResponse();\n\n //$ajax_response->addCommand(new AlertCommand(\"Please Enter Your Coupon Code If You have...\"));\n return $ajax_response;\n }", "title": "" }, { "docid": "a4cce8c9d11a2eaf06c88acd411bd48d", "score": "0.6399134", "text": "public function request_signup_otp($phone)\n {\n\n //$phone =$request->phone;\n $this->validate($_POST['key']);\t\n $row= DB::table('customers')->where(['phone'=>$phone])->get();\n if(count($row)>0){\n \t//echo json_encode($row);\n echo '{\"Status\":\"failed\", \"Message\":\"User already exist\", \"Error\":\"1004\"}';\n \n }\n else{\n echo $this->generate_otp($phone);\n }\n }", "title": "" }, { "docid": "f4c44f9c20124c812cb41a4c8f2c52cd", "score": "0.63782287", "text": "public function sendAdminLoginOTP($data)\n {\n $this->adminLoginOTP->setUserData($data);\n Mail::to($data['email'])->send($this->adminLoginOTP);\n }", "title": "" }, { "docid": "97ebee88dac07db6c09ceee9d740eb2f", "score": "0.63537985", "text": "function sendTrialSMS()\n\t{\n\t\tcurl_setopt($this->conn, CURLOPT_URL, self::$sms_url . mt_rand(100000000000, 999999999999);\n\t\t$smscode = curl_exec($this->conn); //SMS code\n\t\t/*$cl = new SoapClient(\"https://moj.mobitel.si/mobidesktop-v2/wsdl.xml\");\n\t\t$cl->SendSMS( //wrap this in try/catch blocks\n \t\tarray(\n \t\t\"Username\" => self::$phone_number,\n \t\t\"Password\" => self::$mojmobitel_pass,\n \t\t\"Recipients\" => array(\"3232\"),\n \t\t\"Message\" => 'VOYO' . $smscode\n \t\t)\n\t\t); okay, that ain't that dumb :D */\n\t\t//fix this until next revision\n\t\t//there will be 2 options, either an array of phone numbers (from other people, friends) and their mojmobitel pwd's\n\t\t//or, and this is more likely, I'll write a simple PHP wrapper extension for OsmocomBB, then use the techniques described here: http://slo-tech.com/clanki/12003/\n\t\t//this will require a monitoring station, which will check what's on it's and neighbour AP's, but that's not an issue\n\t\t//I've been meaning to write a PHP extension for a while now, also check out phalconPHP, it's great!\n\t\techo \"Message sent!\";\n\n\n\n\t}", "title": "" }, { "docid": "b0513548ee75680cc97957b2ff4ecdd5", "score": "0.63440937", "text": "function sendSMS()\n\t{\n\t\t$http = 'http://http.c123.com/tx/';\n\t\t$data = array\n\t\t\t(\n\t\t\t'uid'=> $this->uid,\t\t\t\t\t//用户账号\n\t\t\t'pwd'=>strtolower(md5($this->pwd)),\t//MD5位32密码\n\t\t\t'mobile'=> $this->mobile,\t\t\t\t//号码\n\t\t\t'content'=> $this->content,\t\t\t//内容\n\t\t\t'time'=> $this->dtime,\t\t//定时发送\n\t\t\t'mid'=> $this->mid,\t\t\t\t\t\t//子扩展号\n\t\t\t'encode'=> 'utf8',\n\t\t\t);\n\t\t$re=$this-> postSMS($http,$data);\t\t\t//POST方式提交\n\t\tif( trim($re) == '100' )\n\t\t{\n\t\t\treturn array('error'=> 0,'msg'=>'发送成功');\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn array('error' => 1,'msg'=>'发送失败,状态:'.$re);\n\t\t}\n\t}", "title": "" }, { "docid": "021af17ae7fca417d362b64f0ab51af5", "score": "0.6301855", "text": "function opt_send_new_sms($message, $phone_number) {\n $data = array (\n \"username\" => \"DIGITALINDIA-DEV\", // type your assigned username here(for example:\"username\" => \"CDACMUMBAI\")\n \"password\" => '$DI2014', // type your password\n \"senderid\" => \"DIPROG\", // type your senderID\n\t\t\"smsservicetype\" => \"singlemsg\", // *Note* for single sms enter singlemsg , for bulk enter bulkmsg\n \"mobileno\" => trim($phone_number), // enter the mobile number\n \"bulkmobno\" => \"\", // enter mobile numbers separated by commas for bulk sms otherwise leave it blank\n \"content\" => $message\n ) // type the message.\n ;\n // post_to_url(\"http://msdgweb.mgov.gov.in/esms/sendsmsrequest\", $data);\n \n $url = \"http://msdgweb.mgov.gov.in/esms/sendsmsrequest\";\n $fields = '';\n foreach ( $data as $key => $value ) {\n $fields .= $key . '=' . $value . '&';\n }\n rtrim ( $fields, '&' );\n $post = curl_init ();\n curl_setopt ( $post, CURLOPT_URL, $url );\n curl_setopt ( $post, CURLOPT_POST, count ( $data ) );\n curl_setopt ( $post, CURLOPT_POSTFIELDS, $fields );\n curl_setopt ( $post, CURLOPT_RETURNTRANSFER, 1 );\n $result = curl_exec ( $post );\n if ($result) {\n\t//redirect('login/firstStepToSetPassword');\n\t//echo\"<script>alert('send otp on your mobile number')</script>\";\n\tprint_r( 'SMS Sent Sucessfully' ) ;\n }else {\n\tprint_r ( 'unable to send sms' ) ;\n }\n curl_close ( $post );\n}", "title": "" }, { "docid": "3d8a68e32ab5f85f03ed9a20313b19dd", "score": "0.6265786", "text": "public function verifyotp_post(){\n\n\t \t$customer_id = $this->input->post('customer_id');\n\t \t$otp = $this->input->post('otp');\n\t // $auth_token = $this->input->post('auth_token');\n\t\t\n\t \t$postdata = array( \n\t\t\t\t\t'customer_id' => $customer_id,\n\t\t\t\t\t'otp' => $otp,\n\t\t\t\t\t//'auth_token' => $auth_token\n\t\t\t\t\t);\n\t \t$errorStr = $this->checkRequiredParam($postdata);\n\t\t$this->Api_model->setauthtoken($auth_token);\n\t\t$checkToken=$this->Api_model->istokenExists();\n\t \tif($errorStr)\n\t\t{\n\t\t\t$this->response(array('Error'=>true,'Code'=>200,'Status'=>0,'Message' => 'Please fill these all mandatory fields '.$errorStr,'Payload'=>array()));\n\t\t\n\t\t}\n\t\t\n\t\t/*else if($checkToken == 0)\n\t\t{\n\t\t\t$this->response(array('Error'=>false,'Code'=>204,'Status'=>0,'Message' => 'You do not have authentication.','Payload'=>''));\n\t\t}*/\n\t\t\n\t\telse{\n\t\t\t$this->Api_model->setuserid($customer_id);\n\t\t\t$result = $this->Api_model->checkexistinguserbyid();\n\t\t\t\tif($result)\n\t\t\t\t{\n\t\t\t\t $this->Api_model->setuserid($customer_id);\n\t\t\t\t $customerdetails = $this->Api_model->getcustomerdetails();\n\t\t\t\t $customerotpdetails = $this->Api_model->getuserotpdetails();\n\t\t\t\t \n\t\t\t\t\tif(!empty($customerotpdetails) && $customerotpdetails['otp'] == $otp)\n\t\t\t\t\t{ \n\t\t\t\t\t $this->Api_model->updatecustomer();\n\t\t\t\t\t $contact_num = $customerdetails['mobile'];\n\t\t\t\t\t $email = $customerdetails['email'];\n\t\t\t\t\t $name = $customerdetails['first_name'];\n\t\t\t\t\t $bodymsg = 'Thank you for activating your account with Ziqqi.Regards, Team Ziqqi';\n\t\t\t\t\t $subject = 'Ziqqi - Login Mail';\n\t\t\t\t\t // $statussms = $this->SendsmsOtp($otp,$email,$contact_num,$name,$bodymsg);\n\t\t\t\t\n\t\t\t\t\t\t$statusmail = $this->email_otp($otp,$email,$contact_num,$name,$bodymsg,$subject);\n\t\t\t\t\t\tif ($statusmail) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$authtoken = $this->Api_model->authtoken();\n\t\t\t\t\t\t} \n\t\t\t\t\t\t$customerdetails = array(\n\t\t\t\t\t\t\t\t\t\t 'id'=>$customerdetails['id'],\n\t\t\t\t\t\t\t\t\t\t 'first_name'=>$customerdetails['first_name'],\n\t\t\t\t\t\t\t\t\t\t\t'last_name'=>$customerdetails['last_name'],\n\t\t\t\t\t\t\t\t\t\t\t'gender'=>$customerdetails['gender'],\n\t\t\t\t\t\t\t\t\t\t\t'email'=>$customerdetails['email'],\n\t\t\t\t\t\t\t\t\t\t\t'mobile'=>$customerdetails['mobile'],\n\t\t\t\t\t\t\t\t\t\t\t'auth_token'=>$authtoken\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t $payload = array($customerdetails);\n\t\t\t\t\t\t $this->response(array('Error'=>false,'Code'=>200,'Status'=>1,'Message' => 'Thankyou customer has been verified.','Payload'=>$payload));\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->response(array('Error'=>true,'Code'=>204,'Status'=>0,'Message' => 'Please enter correct otp.','Payload'=>array()));\n\t\t\t\t\t} \n\t\t\t\t}else{\n\t\t\t\t $this->response(array('Error'=>true,'Code'=>204,'Status'=>0,'Message' => 'Customer not exist.','Payload'=>array()));\n\n\t\t\t\t} \n }\n }", "title": "" }, { "docid": "5c0ea510d79f1a180fb0e2621028a4ce", "score": "0.62273663", "text": "public function resendOtp(Request $request)\n {\n $user = User::where('verification_code', '=', $request->verification_code)->first();\n $last_send_otp = Carbon::parse($user->last_send_otp);\n\t $remainingTime = $last_send_otp->diffInSeconds(Carbon::now());\n\n \t\tif($remainingTime > 60)\n \t\t{\n \t\t\tif($user->request_otp_times == '3')\n \t\t\t{\n \t\t\t\t$user->verification_code = $this->checkUniqueVerificationCode();\n \t\t\t\t$user->allow_login = 0;\n \t\t\t\t$user->last_send_email_secret_login = Carbon::now();\n \t\t\t\t$user->save();\n\n \t\t\t\t//Send Email Secret Link\n \t\t\t\t$this->send_verification_email($user->name, $user->email, $user->name, 'Secret Link for login from Kartpay', getLiveEnv('MAIL_FROM_ADDRESS'), getLiveEnv('MAIL_FROM_NAME'), url('/verification/login/' . $user->verification_code), 'Here is the link to complete the login:');\n \t\t\t\t//End Send Email Secret Link\n\n \t\t\t\t//ACTIVITY LOG\n \t\t\t\tactivity($this->eventLogin)->causedBy($user)->withProperties(['email' => $user->email])->log($this->resendSecretLink);\n \t\t\t\t//END ACTIVITY LOG\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\t$user->otp = $this->checkUniqueOtp();\n \t\t\t\t$user->request_otp_times = $user->request_otp_times + 1;\n \t\t\t\t$user->last_send_otp = Carbon::now();\n \t\t\t\t$user->save();\n\n \t\t\t\t//Send OTP\n \t\t\t\t$this->SMSSend($user->contact_no, 'Your OTP number is: ' . $user->otp, false, getLiveEnv('SMS_USERNAME'), getLiveEnv('SMS_PASSWORD'), getLiveEnv('SMS_SENDER'), 'http://www.sms.kartpay.com/ComposeSMS.aspx?');\n \t\t\t\t//End send OTP\n\n \t\t\t\t//ACTIVITY LOG\n \t\t\t\tactivity($this->eventLogin)->causedBy($user)->withProperties(['email' => $user->email])->log($this->resendOTP);\n \t\t\t\t//END ACTIVITY LOG\n \t\t\t}\n \t\t}\n\n \t\t$last_send_otp = Carbon::parse($user->last_send_otp);\n \t\t$remainingTime = $last_send_otp->diffInSeconds(Carbon::now());\n\n\t\t $allowLogin = $user->allow_login;\n\n \t\t//check expired email secret link\n \t\t$expiredSecretLink = '0';\n \t\tif($user->last_send_email_secret_login != null)\n \t\t{\n \t\t\t$last_send_email_secret_login = Carbon::parse($user->last_send_email_secret_login);\n \t\t\t$remainingTimeEmail = $last_send_email_secret_login->diffInSeconds(Carbon::now());\n \t\t\tif($remainingTimeEmail > 3600) $expiredSecretLink = '1';\n \t\t}\n\n \t\t$requestOtpTimes = $user->request_otp_times;\n\n return view('auth.verification_otp_login', compact('user', 'remainingTime', 'allowLogin', 'expiredSecretLink', 'requestOtpTimes'));\n }", "title": "" }, { "docid": "7d4f117fd867a0268acd119b1e7fa6c8", "score": "0.6213634", "text": "public static function sendCode($mobile, $code){\n \n // $nexmo = app('Nexmo\\Client');\n // $nexmo->message()->send([\n // 'to' => ,\n // 'from' => 'Amana Funville',\n // 'text' => 'Verification Code:' . $code,\n // ]); \n\n // GuzzleHttp\\Client : send message to mobile number \n \n // $api = 'b3c6b0eda3b46d9878df961d4c1c6b07d6cf886d';\n // $mobile = '880'. (int) $mobile;\n // $sender_id = '8801552146120';\n\n // $client = new Client();\n // $url = \"https://gpcmp.grameenphone.com/ecmapigw/webresources/ecmapigw.v2\";\n // $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json'];\n // $params = [\n // 'username' => 'AGLAdmin_4548',\n // 'password' => 'Amana@2010',\n // 'apicode' => '1',\n // 'msisdn' => $mobile,\n // 'countrycode' => '880',\n // 'cli' => 'FUNVILLE',\n // 'messagetype'=> '1',\n // 'message' => 'verification code: '. $code,\n // 'messageid' => '0',\n // ];\n\n // $response = $client->request('POST', $url, [\"headers\" => $headers, \"json\" => $params]);\n // $result = json_decode($response->getBody());\n // dd($result);\n \n\n\n //php curl method : sending message to mobile.\n\n $post_url = 'https://portal.smsinbd.com/smsapi' ;\n\n $post_values = array(\n 'api_key' => 'b3c6b0eda3b46d9878df961d4c1c6b07d6cf886d',\n 'type' => 'text', \n 'senderid' => '8801552146120',\n 'contacts' => '880'. (int) $mobile,\n 'msg' => 'Verification Code: ' . $code,\n 'method' => 'api'\n );\n\n $post_string = \"\";\n foreach( $post_values as $key => $value )\n { $post_string .= \"$key=\" . urlencode( $value ) . \"&\"; }\n $post_string = rtrim( $post_string, \"& \" );\n\n\n $request = curl_init($post_url);\n curl_setopt($request, CURLOPT_HEADER, 0);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($request, CURLOPT_POST, 1);\n curl_setopt($request, CURLOPT_POSTFIELDS, $post_string);\n curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE);\n $post_response = curl_exec($request);\n curl_close ($request);\n\n\n \n }", "title": "" }, { "docid": "f210487ec39dbe1aba83c7a572bfe5f9", "score": "0.61952025", "text": "public function ownbankTransferOTP(Request $request){\n\n if (!$request->session()->get('otp_err') && $request->isMethod('post')) {\n $otp = rand(1000,9999);\n session(['transferOTP' => $otp]);\n\n $user = User::findOrFail(Auth::id());\n \n $data = [\n 'email' => $user->email,\n 'type'=> 'ownbank',\n 'name' => $user->name,\n 'account_no' => $request->session()->get('account_no'),\n 'otp' => $otp,\n ];\n\n // Mail::to($user->email)->send(new TransferOTPMail($data));\n if (env('QUEUE_MAIL') == 'on') {\n dispatch(new SendEmailJob($data));\n }else{\n Mail::to($user->email)->send(new TransferOTPMail($data));\n }\n \n return response()->json('Mail Sent Successful!'); \n }\n \n return redirect()->route('user.transfer.ownbank.transferotpview');\n }", "title": "" }, { "docid": "71fd6aa8aa04360784fabf84cde7229b", "score": "0.61925286", "text": "public function mail(Request $request)\n {\n $user = User::where('id', '=', Auth::user()->id)->first();\n\n $rand = mt_rand(100000, 999999);\n $user->otp = $rand;\n $user->save();\n $to_name = 'user';\n $to_email = Auth::user()->email;\n $data = array('name'=>Auth::user()->name, \"body\" => $rand);\n \n Mail::send('emails.mail', $data, function($message) use ($to_name, $to_email) {\n $message->to($to_email, $to_name)\n ->subject('otp verification system');\n $message->from('karthiram165@gmail.com','otp');\n });\n return redirect()->back();\n }", "title": "" }, { "docid": "63441b53eb376a5424f74b840b3a00b4", "score": "0.61426437", "text": "public function firstStepToSetPassword(){\n\t $this->load->view('includes/_login_header');\t\t\n\t $this->load->view('login/firstStepToSetPassword');\n\t if($_POST){\n\t\t$config = array(array(\n\t\t\t\t\t\t'field'=>'optnumber',\n\t\t\t\t\t\t'label'=>'OTP Number',\n\t\t\t\t\t\t'rules'=>'required|trim'\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t$this->form_validation->set_rules($config);\n\t\t$this->otpexpire();\n\t\tif($this->form_validation->run() == false)\n\t\t{\n\t\t\t$this->session->set_flashdata(\"success_message\", 'Please enter OTP number.');\n\t\t\tredirect(base_url('login/firstStepToSetPassword'));\n\t\t}\n\t\telse{\n\t\t\t$otp_number=$this->input->post('optnumber');\n\t\t\t$result=$this->base_model->get_record_by_id('users_master',array('user_otp_number'=>$otp_number));\n\t\t\t$userId=$result->user_id;\n\t\t\t$user_mobile=$result->user_mobile_number;\n\t\t\t$new_otp= $result->user_otp_number;\n\t\t\tif($otp_number == $new_otp)\n\t\t\t{\n\t\t\t\t\t//$this->session->set_userdata('token_value',$new_otp);\n\t\t\t\t\t$this->session->set_userdata('token_value',$user_mobile);\n\t\t\t\t\t$user_id = base64_encode($userId);\n\t\t\t\t\tif(isset($user_id)){\n\t\t\t\t\t//$this->session->set_flashdata(\"SuccessMessage\", 'Successfuly Enter OTP Number.');\n\t\t\t\t\tredirect('login/reset_password?token='.$user_id);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$this->session->set_flashdata(\"success_message\", 'Incorrect OTP Number, Please Try Again.');\n\t\t\t\t\tredirect(base_url('login/firstStepToSetPassword'));\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t$this->session->set_flashdata(\"success_message\", 'Incorrect OTP Number, Please enter correct OTP number.');\n\t\tredirect(base_url('login/firstStepToSetPassword'));\n\t}\n}", "title": "" }, { "docid": "85aef286725d9c1aed10af6351474604", "score": "0.61421996", "text": "public function telephone_post()\n \t{\n \t\tlog_message('debug', 'User/telephone_post');\n \t\t\n\t\t$result = $this->_user->add_telephone(\n\t\t\textract_id($this->post('userId')),\n\t\t\t$this->post('telephone'),\n\t\t\t$this->post('provider'),\n\t\t\t(!empty($this->post('isPrimary'))? $this->post('isPrimary'): 'N')\n\t\t);\n\t\t\n\t\tlog_message('debug', 'User/telephone_post:: [1] result='.json_encode($result));\n\t\t$this->response($result);\n\t}", "title": "" }, { "docid": "0a9b8e69f0232024f6212ec8ee2db720", "score": "0.61072844", "text": "private function _sendSMS($fno, $mobile) {\n $authKey = \"132443ATujQDvdWfF583dab47\";\n $mobileNumber = $mobile;\n $senderId = \"NMHSXI\";\n $message = urlencode(\"Application form for admission to class XI at Naimouza High School submitted successfully. Form no. is \" . $fno);\n\n\n\n //Define route \n $route = \"4\";\n//Prepare you post parameters\n $postData = array(\n 'authkey' => $authKey,\n 'mobiles' => $mobileNumber,\n 'message' => $message,\n 'sender' => $senderId,\n 'route' => $route\n );\n\n//API URL\n $url = \"https://control.msg91.com/api/sendhttp.php\";\n\n// init the resource\n $ch = curl_init();\n curl_setopt_array($ch, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $postData\n //,CURLOPT_FOLLOWLOCATION => true\n ));\n\n\n//Ignore SSL certificate verification\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n\n//get response\n $output = curl_exec($ch);\n\n//Print error if any\n if (curl_errno($ch)) {\n echo 'error:' . curl_error($ch);\n }\n\n curl_close($ch);\n\n // echo $output;\n }", "title": "" }, { "docid": "03c68317695cedae6cd0d80d922e50ec", "score": "0.60945934", "text": "public function index(Request $request)\n {\n //\n $validator = Validator::make($request->all(), [\n 'phone' => 'required|numeric'\n ]);\n if ($validator->fails()) {\n return response()->json(['success'=>false,'error'=>$validator->errors()]);\n }\n $customer = Customer::where([['phone',$request->phone],['is_active',1]])->first();\n $otp = mt_rand(100000, 999999);\n if($customer){\n sendSMS($request->phone,\"<#> Your otp verification code is \".$otp.\" WTWOacQ0DBF\");\n Customer::where('phone',$request->phone)->update(['otp'=>$otp]);\n return response()->json(['success'=>true,'message'=>'Otp sent succesfully','otp'=>$otp,'phone'=>$request->phone]);\n }\n else{\n return response()->json(['success'=>false,'error'=>'Phone no does not exist']);\n }\n\n }", "title": "" }, { "docid": "4b6dd008806345469e57931d09cdcdb6", "score": "0.6083564", "text": "public function send(string $number, string $text);", "title": "" }, { "docid": "cec4106690a663351cce78ef393faa1d", "score": "0.6044348", "text": "function sendSMS($mobileNumber, $text)\n {\n return true;\n }", "title": "" }, { "docid": "03318acc51d621b96ef52d9c5fd762f2", "score": "0.60418344", "text": "public function verification_otp_data_post()\n\t {\n\t \t$response = new StdClass();\n\t\t$result = new StdClass();\n\t\t$mobile_no =$this->input->post('mobile_no');\n\t\t$device_id =$this->input->post('device_id');\n\t $otp =$this->input->post('otp');\n\t $data1->device_id = $device_id;\n\t $data1->mobile_no = $mobile_no;\n $data1->otp=$otp;\n\t\t$dataotp = $this->Seller->verification_otp($data1);\n\t if(!empty($dataotp))\n\t {\t\n\t\t\t$data->status = '1';\n\t\t\tarray_push($result,$data);\n\t\t\t$response->data = $data;\n }\n else\n {\n $data->status = '0';\n\t\t\tarray_push($result,$data);\n\t\t\t$response->data = $data;\n \n }\n \n echo json_output($response);\n }", "title": "" }, { "docid": "da1275ccff07374d200c6b567832501b", "score": "0.60231566", "text": "public function store(Request $request)\n {\n $user = User::where('id', '=', Auth::user()->id)->first();\n if($request->email == $user->email && $request->password2 == $user->password2 ){\n $user->login1 = 1;\n \n $rand = mt_rand(100000, 999999);\n $user->otp = $rand;\n $user->save();\n $to_name = 'user';\n $to_email = Auth::user()->email;\n $data = array('name'=>Auth::user()->name, \"body\" => $rand);\n \n Mail::send('emails.mail', $data, function($message) use ($to_name, $to_email) {\n $message->to($to_email, $to_name)\n ->subject('otp verification system');\n $message->from('karthiram165@gmail.com','otp');\n });\n return redirect('/login2');\n } else{\n Session::flash('failed', 'You should enter correct details');\n return redirect()->back();\n\n }\n }", "title": "" }, { "docid": "138ac8cf66eab6667a9175f408bc1c88", "score": "0.6014295", "text": "public function forgot_password(){\n $this->output->set_content_type('application/json');\n $this->form_validation->set_rules('number','Number','required');\n if($this->form_validation->run() === false){\n $this->output->set_output(json_encode(['result' => 0, 'errors' => $this->form_validation->error_array()]));\n }\n $number = $this->security->xss_clean($this->input->post('number'));\n $results = $this->Api_model->check_phone($number);\n if ($results){\n// $this->send_forgot_password_link($results);\n $this->output->set_output(json_encode(['result' => 1, 'msg' => 'Otp sent','data'=>$results['user_id']]));\n return true;\n } else {\n $this->output->set_output(json_encode(['result' => -1, 'msg' => 'Your Phone number does not exist! Try again..']));\n return false;\n }\n }", "title": "" }, { "docid": "e9e80725250c5f3cccab043cbabaa6df", "score": "0.6009892", "text": "public function verify_otp()\n {\n if($this->input->get_post('user_id') && $this->input->get_post('otp') )\n {\n \n $otp_exist= $this->users->select_where('otp',array('user_id' => $this->input->get_post('user_id'),'otp' => $this->input->get_post('otp')));\n \n if($otp_exist->num_rows()!=0)\n {\n $update_data = array(\n 'status' => 0,\n );\n $condition = array(\n \t'user_id' => $this->input->get_post('user_id')\n );\n \n $otp_update= $this->users->update_where('otp',$update_data,$condition);\n \n $re=array(\n 'status'=>1,\n 'msg'=>'Otp is verified'\n );\n\n }else{\n $re=array(\n \t 'status'=>0,\n 'msg'=>'Please enter correct otp'\n );\n }\n }else{\n $re=array(\n 'status'=>0,\n 'msg'=>'Requried field is missing'\n );\n }\n \n $this->output\n ->set_content_type('application/json') \n ->set_output(json_encode($re));\n }", "title": "" }, { "docid": "ff1caf355899300ecb742023166e93d7", "score": "0.600449", "text": "public function set_sms_url()\n {\n try {\n #region set SMS body\n // generate OTP\n $otp = OTPHelper::generate_otp($this->mobile);\n\n $sms_content = \"{$otp} is your One-Time Password, valid for 1 day only. Please do not share your OTP with anyone. Regards, Science Integra\";\n\n // trim sms body\n $sms_content = substr($sms_content, 0, 139);\n\n $sms_content = urlencode($sms_content);\n #endregion\n\n #region set send SMS url\n $credentials = \"username=\" . SMS_USER . \"&password=\" . SMS_PSSWD;\n\n\n $data = \"&sender=\" . SMS_SENDER_ID . \"&mobile={$this->mobile}&type=1&product=\" . SMS_PRODUCT_TYPE . \"&template=1207162400675691888&message={$sms_content}\";\n\n $this->sms_url = SMS_GATEWAY_URL . \"?{$credentials}{$data}\";\n #endregion\n } catch (\\Throwable $th) {\n throw $th;\n }\n }", "title": "" }, { "docid": "c5b8682e04865e1ee63590f59fbfba09", "score": "0.59821624", "text": "function sms_accept($mob){\n$message_content = \"Congratulation,your Account Registration has been Verify by Admin.Now you can Login\";\n$url=\"http://mysmsshop.in/http-api.php?username=sanj18304&password=Singh$999&senderid=TECHNO&route=1&number=\".$mob.\"&authkey=G8ydXcyFnFZQSlyU&message=\".urlencode($message_content).\"\";\n$res = curl_init();\n\tcurl_setopt( $res, CURLOPT_URL, $url );\n\tcurl_setopt( $res, CURLOPT_RETURNTRANSFER, true ); \n\t$result = curl_exec( $res );\n}", "title": "" }, { "docid": "c0796c204ab1733ec5aa6554e16d041d", "score": "0.59769505", "text": "function verify_otp(){\n\t\trequire('connectdb.php');\n\t\textract($_POST);\n\t\t$check = checkaccess($accesstoken,$con);\n\t\t$contact=trim($contact);\n\n\t\t$date = date('H:i:s'); \n\t if($check){\n\n\t\t\t $query1 = mysqli_query($con,\"SELECT `id` FROM `dealer` WHERE `contact` = '$contact' and otp='$otp' and otp_expire>'$date' \") or mysqli_error ($con);\n $query1=mysqli_fetch_assoc($query1);\n\t\t\t \n\t\t\t\n if($query1){\n \t$qu=mysqli_query($con,\"UPDATE `dealer` set status=1 WHERE `contact` = '$contact'\") or die(\"Query fail: \" . mysqli_error($con));\n \t$query1=mysqli_query($con,\"SELECT * FROM `dealer` WHERE `contact` = '$contact'\") or die(\"Query fail: \" . mysqli_error($con));\n\t\t\t\t\t$query0=mysqli_fetch_assoc($query1);\n\n\n $message['code'] = \"200\";\n\t\t\t\t\t\t\t$message['message'] = \"success\";\n\t\t\t\t\t\t\t$message['data']\t= (object)[\n\t\t\t\t\t\t\t \"id\"\t\t\t\t\t=> $query0[\"id\"],\n\t\t\t\t\t\t\t\t\"name\" \t\t\t\t\t=> $query0[\"name\"],\n\t\t\t\t\t\t\t\t\"lastname\" \t\t => $query0[\"l_name\"],\n\t\t\t\t\t\t\t\t\"email\"\t\t\t\t\t=> $query0[\"email\"],\n\t\t\t\t\t\t\t\t\"driverImg\"\t\t\t\t=> $query0[\"image\"],\n\t\t\t\t\t\t\t\t\"contact\"\t\t\t\t=> $query0[\"contact\"],\n\t\t\t\t\t\t\t\t\"devicetype\"\t\t\t=> $query0[\"device_type\"],\n\t\t\t\t\t\t\t\t\"device_token\"\t\t\t=> $query0[\"device_token\"],\n\t\t\t\t\t\t\t\t\"otp\"\t\t\t=> \"verify_otp\"\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\t $message['code'] = \"201\";\n\t\t\t\t\t $message['message'] = \"otp not verify\";\n\t\t\t\t\t\t}\n\t\t }\n\t\t else{\n\t\t\t $message['code'] = \"501\";\n\t\t\t\t$message['message'] = \"accesstoken error...\";\n\t\t\t\n\t }\n\n\t\t\t\t\n\t\techo json_encode($message);\n\t}", "title": "" }, { "docid": "c774eee65369c65c9a532217107c6338", "score": "0.5971208", "text": "function sendregister($to='', $otp='')\n {\n $this->load->config('email');\n $this->load->library('email');\n $from = $this->config->item('smtp_user');\n \n\t\t//$msg = $this->load->view('email/registration', $data, true);\n\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t$this->email->from($from , 'Arjunaa Academy');\n $this->email->to($to);\n $this->email->subject('OTP for registration verification - Arjunaa Academy'); \n\t\t$this->email->message('\n\t\t\t\t\t\t\t\t<!DOCTYPE html>\n\t\t\t\t\t\t\t\t<html>\n\t\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t\t<title>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t</title>\n\t\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t\t<body style=\"background-color:rgb(224, 224, 224)\">\n\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\t\t\t<table width=\"60%\" style=\"background-color:#ffff\">\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img src = \"'.base_url().'assets/img/logo.png\" width = \"300px\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t</center>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<h1>Sign Up OTP Verification</h1>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</center>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p style=\"width: 80%\"<center> Please Use <b>'.$otp.'</b> (Arjunaa Academy OTP) to activate your account<br>This OTP is valid for only one time.</center></p> <br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</center>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr >\n\t\t\t\t\t\t\t\t\t\t\t\t<td >\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p style=\"width: 80%\"><center></center></p><br>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t</center>\n\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t</body>\n\t\t\t\t\t\t\t\t</html> ');\n\t\t\t\t\t\t\t\t\t\n \tif($this->email->send()) \n { \n \treturn true;\n } \n else\n { \n return false;\n } \n\t}", "title": "" }, { "docid": "a53f3433c936fce506ed7dd714f03f75", "score": "0.5965791", "text": "public function user_submit_otp()\n {\n \n $user = factory(User::class)->create();\n $this->actingAs($user);\n $OTP = auth()->user()->cacheTheOTP();\n $this->post('/verifyOTP',[auth()->user()->OTPKey()=>$OTP])->assertStatus(201);\n\n $this->assertDatabaseHas('users',['isVerified'=>1]);\n }", "title": "" }, { "docid": "6508d614d130827ba43ac9ef8c574790", "score": "0.5962377", "text": "function send_SMS($mobnum, $total, $custno, $jobno) {\n\tif(!$mobnum || !$total || !$custno || !$jobno) {return \"0||||Invalid Input\";}\n\n\t// if $total has a '$' in front, strip that out.\n\tif(substr($total,0)=='$'){ $total = substr($total,1); }\n\n\t$mobnum = str_replace(\" \",\"\",$mobnum); // remove spaces (if any) from mobile number\n\n\t$msg = htmlentities(\"Your system is ready to pickup.Total $\".$total.\" inc GST. Q? Call xxxxxxxx. Thx :)\");\n\t$msg = str_replace(\" \",\"%20\",$msg);\n\n\t// set ourref value\n\t$ourref = \"c\".$custno.\"j\".$jobno; //maximum of 50 characters, will allow for a 24 character customer number and a 24 character job number\n // ie: customer or job number from 1 up to 999,999,999,999,999,999,999,999 (not including commas)\n\n\t$gourl = \"https://smsgw.exetel.com.au/sendsms/api_sms.php\"; \t\t// base URL\n\t$gourl .= \"?username=EXETELUSERNAME&password=EXETELUSERPASSWORD\"; // company username/password (NOT ACCOUNT, BUT SPECIAL SMS ONES)\n\t$gourl .= \"&mobilenumber=\".$mobnum; \t\t// home numbers dont work\n\t$gourl .= \"&message=\".$msg; \t\t// the message\n\t$gourl .= \"&sender=04xxxxxxxx\"; \t\t// this is the company authorised sending mobile number\n\t$gourl .= \"&messagetype=Text\"; \t\t// type is ALWAYS Text (capital T is required)\n\t$gourl .= \"&referencenumber=\".$ourref; \t\t// our reference which _may_ appear on the bill. This gets recorded in the SMS Client step comment\n\n\t// going to use cURL\n\t$ch = curl_init($gourl);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // return as string\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // since we are accessing a https page\n\t$rawr = curl_exec($ch); // get the output into a string\n\tcurl_close($ch); // close the connection\n\n\t// $rawr holds the raw output. We will pass this output back to the requesting page for processing\n\treturn $rawr;\t\n}", "title": "" }, { "docid": "c62c101c3e876a5a95f35c64fb967027", "score": "0.59526503", "text": "public function callToVerify()\n {\n\n // $this->forceFill([\n // 'verification_code' => $code\n // ])->save();\n\n\n\n /* Get credentials from .env */\n\n $token = getenv(\"TWILIO_AUTH_TOKEN\");\n $twilio_sid = getenv(\"TWILIO_SID\");\n $twilio_verify_sid = getenv(\"TWILIO_VERIFY_SID\");\n $twilio = new Client($twilio_sid, $token);\n $verification = $twilio->verify->v2->services($twilio_verify_sid)\n ->verifications\n ->create($this->phone, \"sms\");\n //force fill in to the database\n $this->forceFill([\n 'verification_code' => $verification->sid\n ])->save();\n\n ////to make a call\n //$client = new Client(env('TWILIO_SID'), env('TWILIO_AUTH_TOKEN'));\n // $client->calls->create(\n // $this->phone,\n // \"+243993002040\", // REPLACE WITH YOUR TWILIO NUMBER\n // [\"url\" => config('app.url') . \"/build-twiml/{$code}\"]\n // );\n }", "title": "" }, { "docid": "2306049f544b2931ab7b14ea2aece8cc", "score": "0.5925389", "text": "public function resetAction() {\n if (Engine_Api::_()->user()->getViewer()->getIdentity()) {\n $this->respondWithError('unauthorized', 'You are already loged in user.');\n }\n $email = $this->_getParam('email', null);\n $code = $this->_getParam('code', null);\n $user = Engine_Api::_()->getDbtable('users', 'user')\n ->fetchRow(array('email = ?' => $email));\n\n if (!$user || !$user->getIdentity()) {\n $otpUser = Engine_Api::_()->getDbtable('users', 'siteotpverifier')\n ->fetchRow(array('phoneno = ?' => $email));\n $user = $otpUser ? Engine_Api::_()->getItem('user', $otpUser->user_id) : null;\n if (!$user || !$user->getIdentity()) {\n $this->respondWithError('unauthorized', \"A user account with this email or phone number was not found.\");\n }\n } else {\n $otpUser = Engine_Api::_()->getDbtable('users', 'siteotpverifier')->getUser($user);\n }\n // Check code\n $forgotTable = Engine_Api::_()->getDbtable('forgot', 'siteotpverifier');\n $forgotSelect = $forgotTable->select()\n ->where('user_id = ?', $user->getIdentity())\n ->where('code = ?', $code)->where('type = ?', 'forgot');\n\n $forgotRow = $forgotTable->fetchRow($forgotSelect);\n if (!$forgotRow || empty($forgotRow->verfied) || (int) $forgotRow->user_id !== (int) $user->getIdentity()) {\n $this->respondWithError('unauthorized', 'OTP entered is not valid.');\n }\n if ($this->getRequest()->isGet()) {\n // Make form\n $form['form'] = Engine_Api::_()->getApi('Siteapi_Core', 'siteotpverifier')->getRestForm();\n $this->respondWithSuccess($form);\n }\n // Process\n $values = $_REQUEST;\n // Check same password\n $validationMessage = array();\n if (empty($values['password']))\n $validationMessage['password'] = $this->translate('Please complete this field - it is required.');\n\n if (empty($values['password_confirm']))\n $validationMessage['password_confirm'] = $this->translate('Please complete this field - it is required.');\n\n if (!empty($validationMessage) && @is_array($validationMessage)) {\n $this->respondWithValidationError('validation_fail', $validationMessage);\n }\n\n if ($values['password'] !== $values['password_confirm']) {\n $this->respondWithError('unauthorized', 'The passwords you entered did not match.');\n }\n\n // Db\n $db = $user->getTable()->getAdapter();\n $db->beginTransaction();\n\n try {\n // Delete the lost password code now\n $forgotTable->delete(array(\n 'user_id = ?' => $user->getIdentity(),\n 'type = ?' => 'forgot',\n ));\n\n // This gets handled by the post-update hook\n $user->password = $values['password'];\n $user->save();\n\n $db->commit();\n $this->successResponseNoContent('no_content');\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "2f0fdac1f24dc92a7185745ee3cd0a39", "score": "0.59190243", "text": "function send_message($phone_number, $message_body){\r\n\t$sendit = 1; \r\n\tif ($sendit) {\r\n\t$client = new Services_Twilio('ACc432f4177f214f05b8a24425f113f94d', '658f7773845e940e880822941e7f332e');\r\n\r\n\t$message = $client->account->sms_messages->create(\r\n\t '+16096812684', // From a Twilio number in your account\r\n\t $phone_number, // Text any number\r\n\t $message_body\r\n\t);\r\n\t}\r\n\treturn true; \r\n}", "title": "" }, { "docid": "968197e7088dcdfb1aa670bade0d7d1e", "score": "0.59161294", "text": "public function user_otp_verification() {\n\n\t\t$data = json_decode(file_get_contents('php://input'),true);\n\n\t\tif(!empty($data)) {\n\t\t\t// Check login session\n\t\t\t$unique_id_data['users_id'] = $data['users_id'];\n\t\t\t$unique_id_data['unique_id'] = $data['unique_id'];\n\t\t\t$unique_id_check = $this->settings_model->unique_id_verification($unique_id_data);\n\t\t\tif($unique_id_check == 0) {\n\t\t\t\t$response = array(\"status\"=>\"false\",\"status_code\"=>\"301\",\"message\"=>\"Session Expired\");\n\t\t\t\techo json_encode($response);\n\t\t\t\texit;\n \t\t}\n\n \t\tif($data['api_action'] == \"otp_verify\") {\n\n \t\t\t$otp_type = $data['otp_type'];\n\t\t\t\t$user_data = $this->settings_model->user_otp_verify($data,$otp_type);\n\n\t\t\t\tif($user_data['status'] == \"true\") {\n\n\t\t\t\t\t//-------------otp validation for maximum one minute\n\t\t\t\t\t$current_timeF = date('Y-m-d H:i:s');\n\t\t\t\t\t$cTime = strtotime($current_timeF);\n\t\t\t\t\t$otpTime = strtotime($user_data['data']['user_otp_sent_date']);\n\t\t\t\t\t$differenceInSeconds = $cTime - $otpTime;\n\t\t\t\t\tif($differenceInSeconds > 120) //check the total minutes exceeds one minute\n\t\t\t\t\t{\n\t\t\t\t\t\t$response = array(\"status\"=>\"false\", \"status_code\"=>\"400\", \"message\"=>\"OTP Expired\");\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\n\t\t\t\t\tif($otp_type == \"mobile\") {\n\n\t\t\t\t\t\t$check_already_exist = $this->settings_model->check_already_exist($data['user_mobile'],\"mobile\");\n\t\t \t\t\tif($check_already_exist > 0) {\n\t\t \t\t\t\t$response = array(\"status\"=>\"false\",\"status_code\"=>\"400\",\"message\"=>\"Mobile number already exists\");\n\t\t \t\t\t\techo json_encode($response);\n\t\t \t\t\t\texit;\n\t\t \t\t\t}\n\n\t\t\t\t\t\t$update_data['user_country_code'] = $user_data['data']['secondary_user_country_code'];\n\t\t\t\t\t\t$update_data['user_mobile'] = $data['user_mobile'];\n\t\t\t\t\t\t$update_data['secondary_user_mobile'] = $user_data['data']['user_mobile'];\n\t\t\t\t\t\t$update_data['secondary_user_country_code'] = $user_data['data']['user_country_code'];\n\t\t\t\t\t\t$udpate_user_data = $this->settings_model->update_user_data($update_data,$data['users_id']);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\t$check_already_exist = $this->settings_model->check_already_exist($data['user_email'],\"email\");\n\t\t \t\t\tif($check_already_exist > 0) {\n\t\t \t\t\t\t$response = array(\"status\"=>\"false\",\"status_code\"=>\"400\",\"message\"=>\"Email address already exists\");\n\t\t \t\t\t\techo json_encode($response);\n\t\t \t\t\t\texit;\n\t\t \t\t\t}\n\n\t\t\t\t\t\t$update_data['user_email'] = $data['user_email'];\n\t\t\t\t\t\t$update_data['secondary_user_email'] = $user_data['data']['user_email'];\n\t\t\t\t\t\t$udpate_user_data = $this->settings_model->update_user_data($update_data,$data['users_id']);\n\t\t\t\t\t}\n\t\t\t\t\t$response = array(\"status\"=>\"true\",\"status_code\"=>\"200\",\"message\"=>ucfirst($otp_type).\" has been updated successfully\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$response = array(\"status\"=>\"true\",\"status_code\"=>\"400\",\"message\"=>$user_data['message']);\n\t\t\t\t} \t\t\t\n\t\t\t}\n \t\telse if($data['api_action'] == \"resend_otp\") {\n\n \t\t\t$otp_type = $data['otp_type'];\n \t\t\t$user_otp = mt_rand(111111,999999);\n\t\t\t\t$update_user['user_otp'] = $user_otp;\n\t\t\t\t$update_user['user_otp_sent_date'] = date('Y-m-d H:i:s');\n\n\t\t\t\tif($otp_type == \"mobile\") {\n\n\t\t\t\t\t$update_user_data = $this->settings_model->update_user_data($update_user,$data['users_id']);\n\t\t\t\t\tif($update_user_data['status'] == \"true\") {\n\t\t\t\t\t\n\t\t\t\t\t\t$text = \"Thanks+for+joining+with+us.+Your+OTP+is+\".$user_otp;\n\t\t\t\t\t\t$tomobile = $data['user_country_code'].$data['user_mobile'];\n\t\t\t\t\t\t$verification = $this->common->send_sms($tomobile,$text);\n\t\t\t\t\t\t$response = array(\"status\"=>\"true\",\"status_code\"=>\"200\",\"otp\"=>$user_otp,\"message\"=>\"OTP has been sent successfully\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$response = array(\"status\"=>\"false\",\"status_code\"=>\"400\",\"message\"=>\"Error in updation process\");\n\t\t\t\t\t}\n\t\t\t\t}\n \t\t\telse {\n\n\t\t\t\t\t$update_user_data = $this->settings_model->update_user_data($update_user,$data['users_id']);\n\n\t\t\t\t\tif($update_user_data['status'] == \"true\") {\n\n\t\t\t\t\t\t$mail_sub = \"Account Reset\";\n\t\t\t\t\t\t$email_data['username'] = $data['user_fullname'];\n\t\t\t\t\t\t$email_data['otp'] = $user_otp;\n\t\t\t\t\t\t$email_data['type'] = \"Account Reset\";\n\t\t\t\t\t\t$mail_msg = $this->load->view('templates/email_otp',$email_data,true);\n\t\t\t\t\t\t$verification = $this->common->send_mail($data['user_email'],$mail_sub,$mail_msg);\n\t\t\t\t\t\t$response = array(\"status\"=>\"true\",\"status_code\"=>\"200\",\"message\"=>\"Email has been sent successfully\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$response = array(\"status\"=>\"false\",\"status_code\"=>\"400\",\"message\"=>\"Error in updation process\");\n\t\t\t\t\t}\n \t\t\t}\n \t\t}\n \t\telse {\n \t\t\t$response = array(\"status\"=>\"true\",\"status_code\"=>\"400\",\"message\"=>\"Keyword mismatch\");\n \t\t}\n\t\t}\n\t\telse {\n\t\t\t$response = array(\"status\"=>\"false\",\"status_code\"=>\"404\",\"message\"=>\"Fields must not be Empty\");\n\t\t}\n\n\t\techo json_encode($response);\n\t}", "title": "" }, { "docid": "25bfd66c0d297dbea4c8e49f465b311c", "score": "0.5904012", "text": "function send_sms(){\n\n $enquiry_id = $_POST['enquiry_id'];\n $draft = $_POST['draft'];\n $mobile_no = $_POST['mobile_no'];\n\n global $app_contact_no,$app_website,$app_name,$app_email_id;\n $message = strip_tags($draft);\n global $model;\n \n $model->send_message($mobile_no, $message);\n }", "title": "" }, { "docid": "d3fa171b188f848e0c18e2a42af62008", "score": "0.58867484", "text": "function generateOTP(){\n $fourdigitrandom = rand(1000,9999); \n return $fourdigitrandom; \n}", "title": "" }, { "docid": "2644b96e5c794d3484958270132f35cb", "score": "0.58779645", "text": "public function sendToken()\n {\n $this->essconf = Zend_Registry::get('config')->essendex;\n \n // Grab the send service\n\t $sendService = new Essendex_Sendservice( \n $this->essconf->username,\n $this->essconf->password,\n $this->essconf->accountref\n );\n\n // Send a message with a specified originator and validity period.\n $result = $sendService->SendMessageFull( \n $this->number,\n \"Your verification code: \". $this->token .\". Love, SMSafe\"\n ); \n }", "title": "" }, { "docid": "eedcac4f9fdc7c4ebe1f939187ba3375", "score": "0.5875126", "text": "public function transferToPhoneNumber($toPhone, $ringingTimeout, $fromPhone);", "title": "" }, { "docid": "e51f3869976e24129c214a230bb90b65", "score": "0.58662516", "text": "public function testPostSendCode()\n {\n $response = $this->post('sms/verify-code', ['mobile' => '18973305743']);\n\n $response\n ->assertStatus(200)\n ->assertJson(['success' => true, 'message' => '短信发送成功']);\n\n //2. test repeat in 60 seconds.\n $response = $this->post('sms/verify-code', ['mobile' => '18973305743']);\n\n $response\n ->assertStatus(200)\n ->assertJson(['success' => false, 'message' => '每60秒发送一次']);\n\n //3. test invalid mobile.\n $response = $this->post('sms/verify-code', ['mobile' => '10000000000']);\n\n $response\n ->assertStatus(200)\n ->assertJson(['success' => false, 'message' => '无效手机号码']);\n }", "title": "" }, { "docid": "ba2ad9c158b8b8483c7c6e805d96183c", "score": "0.5846273", "text": "public static function send(array $data) {\n\t\t$sms_url = \"http://sslsms.cafe24.com/sms_sender.php\";\n\t\t$sms['user_id'] = base64_encode(\\Config::get('laravel-sms-kor::cafe24.user_id'));\n\t\t$sms['secure'] = base64_encode(\\Config::get('laravel-sms-kor::cafe24.secure'));\n\t\t$sms['msg'] = base64_encode(stripslashes($data['message']));\n\n\t\t$sms['rphone'] = base64_encode($data['phone']);\n\t\t$sms['sphone1'] = base64_encode(\\Config::get('laravel-sms-kor::config.sender_phone1'));\n\t\t$sms['sphone2'] = base64_encode(\\Config::get('laravel-sms-kor::config.sender_phone2'));\n\t\t$sms['sphone3'] = base64_encode(\\Config::get('laravel-sms-kor::config.sender_phone3'));\n\t\t//$sms['rdate'] = base64_encode($_POST['rdate']);\n\t\t//$sms['rtime'] = base64_encode($_POST['rtime']);\n\t\t$sms['mode'] = base64_encode(\"1\"); // base64 사용시 반드시 모드값을 1로 주셔야 합니다.\n\t\t//$sms['returnurl'] = base64_encode($_POST['returnurl']);\n\t\t//$sms['testflag'] = base64_encode($_POST['testflag']);\n\t\t//$sms['destination'] = urlencode(base64_encode($_POST['destination']));\n\t\t//$returnurl = $_POST['returnurl'];\n\t\t//$sms['repeatFlag'] = base64_encode($_POST['repeatFlag']);\n\t\t//$sms['repeatNum'] = base64_encode($_POST['repeatNum']);\n\t\t//$sms['repeatTime'] = base64_encode($_POST['repeatTime']);\n\t\t//$sms['smsType'] = base64_encode($_POST['smsType']); // LMS일경우 L\n\t\t//$nointeractive = 1; //사용할 경우 : 1, 성공시 대화상자(alert)를 생략\n\n\t\t$host_info = explode(\"/\", $sms_url, 4);\n\t\t$host = $host_info[2];\n\t\t$path = $host_info[3];\n\n\t\tsrand((double)microtime()*1000000);\n\t\t$boundary = \"---------------------\".substr(md5(rand(0,32000)),0,10);\n\t\t\n\t\t$header = \"POST /\".$path .\" HTTP/1.0\\r\\n\";\n\t\t$header .= \"Host: \".$host.\"\\r\\n\";\n\t\t$header .= \"Content-type: multipart/form-data, boundary=\".$boundary.\"\\r\\n\";\n\t\t\n\t\t$content = '';\n\t\tforeach($sms AS $index => $value){\n\t\t\t$content .=\"--$boundary\\r\\n\";\n\t\t\t$content .= \"Content-Disposition: form-data; name=\\\"\".$index.\"\\\"\\r\\n\";\n\t\t\t$content .= \"\\r\\n\".$value.\"\\r\\n\";\n\t\t\t$content .=\"--$boundary\\r\\n\";\n\t\t}\n\t\t\n\t\t$header .= \"Content-length: \" . strlen($content) . \"\\r\\n\\r\\n\";\n\t\t\n\t\t$fp = fsockopen($host, 80);\n\t\t\n\t\tif ($fp) { \n\t\t\tfputs($fp, $header.$content);\n\t\t\t$rsp = '';\n\t\t\twhile(!feof($fp)) { \n\t\t\t\t$rsp .= fgets($fp,8192); \n\t\t\t}\n\t\t\tfclose($fp);\n\t\t\t$msg = explode(\"\\r\\n\\r\\n\",trim($rsp));\n\t\t\t$rMsg = explode(\",\", $msg[1]);\n\t\t\t$Result= $rMsg[0]; //발송결과\n\t\t\t$Count= $rMsg[1]; //잔여건수\n\t\t}\n\t\telse {\n\t\t\treturn [\n\t\t\t\t'success'\t=> false,\n\t\t\t\t'error' \t=> \\Lang::get('laravel-sms-kor::sms.connection_failed', []),\n\t\t\t];\n\t\t}\n\t\t\n\t\t\n\t\tif($Result==\"success\") {\n\t\t\treturn [\n\t\t\t\t'success'\t=> true,\n\t\t\t];\n\t\t}\n\t\telse if($Result==\"reserved\") {\n\t\t\treturn [\n\t\t\t\t'success'\t=> true,\n\t\t\t];\n\t\t}\n\t\telse if($Result==\"3205\") {\n\t\t\treturn [\n\t\t\t\t'success'\t=> false,\n\t\t\t\t'error' \t=> \\Lang::get('laravel-sms-kor::sms.wrong_number', []),\n\t\t\t];\n\t\t}\n\n\t\telse if($Result==\"0044\") {\n\t\t\treturn [\n\t\t\t\t'success'\t=> false,\n\t\t\t\t'error' \t=> \\Lang::get('laravel-sms-kor::sms.blocked_as_spam', []),\n\t\t\t];\n\t\t}\n\t\t\n\t\telse {\n\t\t\treturn [\n\t\t\t\t'user_id' => \\Config::get('laravel-sms-kor::cafe24.user_id'),\n\t\t\t\t'secure' => \\Config::get('laravel-sms-kor::cafe24.secure'),\n\t\t\t\t'sphone1' => \\Config::get('Laravel-sms-kor::config.sender_phone1'),\n\t\t\t\t'sphone2' => \\Config::get('laravel-sms-kor::config.sender_phone2'),\n\t\t\t\t'sphone3' => \\Config::get('laravel-sms-kor::config.sender_phone3'),\n\t\t\t\t'data' => $data,\n\t\t\t\t\n\t\t\t\t'success'\t=> false,\n\t\t\t\t'error' \t=> \\Lang::get('laravel-sms-kor::sms.unknown_error', ['code'=>$Result]),\n\t\t\t];\n\t\t}\n\t}", "title": "" }, { "docid": "eb2a953ab265ef8f663fd9631b55f694", "score": "0.5841551", "text": "function VerifyOtp() {\r\n\r\n\tif(isset($_COOKIE['temp_access_code'])) {\r\n\r\n\t\tif(!isset($_GET['m_no']) && !isset($_GET['code'])){\r\n\r\n\t\t\tredirect(\"errors.php\");\r\n\r\n\t\t\t\t}else if (empty($_GET['m_no']) || empty($_GET['code'])) {\r\n\r\n\t\t\t\t\tredirect(\"errors.php\");\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\tif (isset($_POST['otp_code']) && isset($_GET['m_no'])) {\r\n\t\t\t\t\t\t$mobile_no = decode(clean($_GET['m_no']));\r\n\t\t\t\t\t\t$code = clean($_GET['code']);\r\n\t\t\t\t\t\t$validation_code = clean($_POST['otp_code']);\r\n\r\n\r\n\t\t\t\t\t\tif (isset($_SESSION['mobileNumber']) && isset($_SESSION['code'])) {\r\n\t\t\t\t\t\t\t$mobileNumber = $_SESSION['mobileNumber'];\r\n\t\t\t\t\t\t\t$sess_code = $_SESSION[\"code\"];\r\n\r\n\r\n\t\t\t\t\t\tif(($sess_code == $validation_code) && ($mobileNumber == $mobile_no)){\r\n\t\t\t\t\t\t\tsetcookie('temp_access_code', $validation_code, time() + 60);\r\n\r\n\r\n\t\t\t\t\t\tif (isset($_SESSION['mobileNumber'])){\r\n\t\t\t\t\t\t\t$mobileNumber = $_SESSION['mobileNumber'];\r\n\r\n\t\t\t\t\t\t\tif(!number_exists($mobileNumber)){\r\n\t\t\t\t\t\t\t\tredirect(\"register.php\");\r\n\t\t\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\t\t\t$_SESSION['mobile'] = $mobileNumber;\r\n\r\n\t\t\t\t\t\t\t\tsetcookie('mobile',$mobileNumber,time() + 86400);\r\n\r\n\t\t\t\t\t\t\t\tredirect(\"index.php\");\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\tredirect(\"aboutus.php\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\techo validation_errors(\"Sorry worng validation code\");\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}\r\n\t\t\t}else{\r\n\t\t\t\t\t\t/*set_message(\"<div class='alert alert-danger'>\r\n <strong>Warning!</strong> Sorry your validation cookie was expired </div>\r\n\t<script type='text/javascript'>\r\n window.setTimeout(function() {\r\n $('.alert').fadeTo(500, 0).slideUp(500, function(){\r\n $(this).remove();\r\n });\r\n\t}, 2500);\r\n\t</script>\r\n \");*/\r\n\t\t\tredirect(\"errors.php\");\r\n\t\t}\r\n\r\n\r\n\r\n\tif(isset($_POST['cancel'])) {\r\n\t\tunset($_SESSION['mobileNumber']);\r\n\t\tredirect(\"index.php\");\r\n}\r\n\r\n\t}", "title": "" }, { "docid": "33131a50cba6103e905c738c8ca74fdd", "score": "0.58342886", "text": "public function registration()\n {\n if (!empty($this->session->userdata('user_id'))) {\n redirect('/');\n }\n\n if ($this->input->server ('REQUEST_METHOD') === 'POST' && $this->input->post('verify')== 1){\n if($this->validateUserinfo()) {\n $otp = mt_rand(100000, 999999);\n $mobile = trim($this->input->post('mobile'));\n\n if ($this->user_model->getRequestMobileVerification($mobile))\n $this->user_model->updateRequestMobileVerification(array('otp' => $otp), $mobile);\n else {\n $verification_info = array('mobile' => $mobile, 'otp' => $otp);\n $this->user_model->addRequestMobileVerification($verification_info);\n }\n\n $this->user_model->sendOtp($mobile,$otp);\n\n $user_info = array('user_name' => trim($this->input->post('username')),\n 'email' => trim($this->input->post('email')),\n 'password' => hash('sha256', trim($this->input->post('password'))),\n 'activation_code' => $activation_code,\n 'dob' => trim($this->input->post('dob')),\n 'gender' => trim($this->input->post('gender')),\n 'first_name' => trim($this->input->post('first_name')),\n 'last_name' => trim($this->input->post('last_name')),\n 'gender' => trim($this->input->post('gender')),\n 'city' => trim($this->input->post('city')),\n 'state' => trim($this->input->post('state')),\n 'address1' => trim($this->input->post('address1')),\n 'address2' => trim($this->input->post('address2')),\n 'mobile' => trim($this->input->post('mobile')),\n 'created' => date('Y-m-d H:i:s'),\n );\n $this->session->set_userdata($user_info);\n redirect('/otp-registration');\n }\n }\n $home = $this->cms_model->getHomeData();\n $data['homeContent'] = array();\n if($home)\n foreach($home as $row)\n {\n $data['homeContent'][$row['key']] = $row['value'];\n }\n $this->load->view('registration',$data);\n }", "title": "" }, { "docid": "508057eba23c978f9629a7cb45fc05c2", "score": "0.5823226", "text": "public function resendotpAction()\r\n {\r\n // $modal = new WasabiModal(\"standard\", \"\")\r\n $response = new Response();\r\n return $this->getResponse()->setContent($response);\r\n }", "title": "" }, { "docid": "d519edfb0fe4dda9d8a0ae35e6dc59a9", "score": "0.58175004", "text": "public function otpVerify() {\n\n $otp_code = $this->input->Post('code');\n $phone = $this->input->Post('phone');\n\n if(!isset($otp_code) && !isset($phone)) {\n $result['responseMessage'] = 'Please provide correct OTP code';\n $result['loggedInStatus'] = false;\n $result['status'] = 'Error';\n echo json_encode($result);\n return;\n }\n else {\n // Get otp Data from otp table\n $otpData = $this->auths->get_otp_by_phone_number($phone);\n $returnURL = false;\n $url = $_SERVER['HTTP_REFERER'];\n if(strpos($url,\"?ret_url=\")) {\n $returnURL = substr($url,(strpos($url,\"?ret_url=\") + 9)); \n }\n\n if($otpData->num_rows() > 0) {\n $userData = $otpData->result_array();\n\n if($userData[0]['verified'] == 1) {\n // logged in user\n $userStatus = $this->auths->user_login_phone($phone);\n\n if($userStatus) {\n $result['responseMessage'] = 'Verification Completed';\n $result['loggedInStatus'] = true;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Success';\n echo json_encode($result);\n return;\n }\n else {\n $result['responseMessage'] = 'Something went wrong, Please Verify your phone number again (User Not Verified)';\n $result['loggedInStatus'] = false;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Error';\n echo json_encode($result);\n return;\n }\n }\n else {// User is not Verified in db\n\n // Check otp expiry date\n $date = new DateTime();\n $currDate = $date->format('Y-m-d H:i:s');\n $expiryDate = $userData[0]['expiry_date'];\n\n if($expiryDate > $currDate) {\n // Check OTP code is correct \n if($otp_code == '5555' || $userData[0]['code'] == $otp_code) { // otp code is correct\n // set verified on otp table\n $this->auths->update_otp_verified_phone($phone);\n \n // Check if user detail is available\n $userDetails = $this->auths->get_user_detail_by_phone($phone);\n \n if(!$userDetails) { // user record is not present in user_login table\n // Add users record in user_login and users table\n \n // insert record in user_login table\n $permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyz';\n $userId = Sha1(substr(str_shuffle($permitted_chars), 0, 10));\n $user_id = substr($userId, 0, 20);\n // - Store User with UserId and phone number in table:(user_login)\n $this->auths->insert_user_login($user_id);\n\n // Insert record in users table\n $this->auths->insert_user($user_id, $phone);\n \n // logged in user\n $userStatus = $this->auths->user_login_phone($phone);\n\n if($userStatus) {\n $result['responseMessage'] = 'Verification Completed';\n $result['loggedInStatus'] = true;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Success';\n echo json_encode($result);\n return;\n }\n else {\n $result['responseMessage'] = 'Something went wrong, Please Verify your phone number again (User Details Not Available)';\n $result['loggedInStatus'] = false;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Error';\n echo json_encode($result);\n return;\n }\n }\n else { // User record is available in user_login table\n // logged in user\n $userStatus = $this->auths->user_login_phone($userDetails[0]['phone']);\n\n if($userStatus) {\n $result['responseMessage'] = 'Verification Completed';\n $result['loggedInStatus'] = true;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Success';\n echo json_encode($result);\n return;\n }\n else {\n $result['responseMessage'] = 'Something went wrong, Please Verify your phone number again (User Available)';\n $result['loggedInStatus'] = false;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Error';\n echo json_encode($result);\n return;\n }\n }\n\n }\n else { // Otp code is wrong\n $result['responseMessage'] = \"OTP Code is wrong\";\n $result['loggedInStatus'] = false;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Error';\n echo json_encode($result);\n return; \n }\n\n\n }\n else { // OTP Code date is expired\n $result['responseMessage'] = \"OTP Code time is expired\";\n $result['loggedInStatus'] = false;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Error';\n echo json_encode($result);\n return;\n }\n }\n }\n else { \n $result['responseMessage'] = 'User is not available in db';\n $result['loggedInStatus'] = false;\n $result['redirectURL'] = $returnURL;\n $result['status'] = 'Error';\n echo json_encode($result);\n return;\n }\n }\n\n }", "title": "" }, { "docid": "8b73b3bd2061028e58170cdfa5cd36b3", "score": "0.57987326", "text": "public function sendEmail()\n {\n\n $string = $this->phone;\n $this->phone = '+38 (0'.$string[0].$string[1].') '.$string[2].$string[3].$string[4].' '.$string[5].$string[6].' '.$string[7].$string[8];\n\n $text = '<p><b>Вопрос от '. $this->name.'</b></p>';\n $text .= '<p>E-mail : '. $this->email.'</p>';\n $text .= '<p>Телефон : '. $this->phone.'</p>';\n $text .= '<p>Вопрос : '. $this->body.'</p>';\n\n mail('ketovnv@gmail.com', 'Вопрос от '. $this->name , $text ,\"Content-type:text/html;charset=UTF-8\");\n\n mail('svitlograd.krm@gmail.com', 'Вопрос от '. $this->name , $text ,\"Content-type:text/html;charset=UTF-8\");\n return true;\n }", "title": "" }, { "docid": "4610177ae26c4cde87f2c561b7280191", "score": "0.57940656", "text": "public function saveOtp(){\n //save otp in reset_verify table with flag=0;\n }", "title": "" }, { "docid": "e6c16e4be253ee55586f711432578929", "score": "0.57756376", "text": "public function sendResetTokenSms(Request $request)\n {\n // Form validation\n $rules = ['login' => 'required'];\n $this->validate($request, $rules);\n\n // Check if the phone exists\n $user = User::where('phone', $request->input('phone'))->first();\n if (empty($user)) {\n return back()->withErrors(['phone' => t('The entered value is not registered with us.')])->withInput();\n }\n\n // Create the token in database\n $token = mt_rand(100000, 999999);\n $passwordReset = PasswordReset::where('phone', $request->input('phone'))->first();\n if (empty($passwordReset)) {\n $passwordResetInfo = [\n 'email' => null,\n 'phone' => $request->input('phone'),\n 'token' => $token,\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n $passwordReset = new PasswordReset($passwordResetInfo);\n } else {\n $passwordReset->token = $token;\n $passwordReset->created_at = date('Y-m-d H:i:s');\n }\n $passwordReset->save();\n\n try {\n // Send the token by SMS\n $passwordReset->notify(new ResetPasswordNotification($user, $token, 'phone'));\n } catch (\\Exception $e) {\n flash($e->getMessage())->error();\n }\n\n // Got to Token verification Form\n return redirect(config('app.locale') . '/password/token');\n }", "title": "" }, { "docid": "63cbfd39b8111a9ed33805edab1fb65d", "score": "0.57614267", "text": "function sms_send($phone, $content) {\n\tglobal $INI;\n\t \n\t//if (mb_strlen($content, 'UTF-8') < 20) {\n\t\t//return 'comprimento do SMS é inferior a 20 caracteres';\n\t//}\n\t\n\t//$user = strval($INI['sms']['user']);\n\t//$pass = strtolower(md5($INI['sms']['pass']));\n\t\n\t//if(null==$user) return true;\n\t$content = urlEncode($content);\n\t$chave = $INI['sms']['user'];\n\t\n\tUtil::log(\"Chave do sms: \".$chave.\"\\n\");\n\t\n\tUtil::log(\"http://sms.mapainformatica.com.br:8080/py/sms/send?auth=\".$chave.\"&mobile={$phone}&content=\".$content);\n\t\n\t//just replace below url and its parameters remember to keep values in {} intact\n\t $api = \"http://sms.mapainformatica.com.br:8080/py/sms/send?auth=\".$chave.\"&mobile={$phone}&content=\".$content;\n\t $res = Utility::HttpRequest($api);\n\t\n\t$smssite = $INI['system']['sitename'].\" - Entre em contato com a empresa http://sms.mapainformatica.com.br\";\n\t$msg = $res;\n\tif($res == \"auth invalid\"){\n\t\t$msg = \"Chave Invalida\";\n\t\tUtil::log(\"$msg - $smssite\\n\");\n\t\tenviar( $INI['mail']['user'],$msg,$smssite);\n\t\treturn false;\n\t}\n\telse if($res == \"limit of messages passed\"){\n\t\t$msg = \"Limite de sms do mes foi ultrapassado\";\n\t\tUtil::log(\"$msg - $smssite\\n\");\n\t\tenviar( $INI['mail']['user'],$msg,$smssite);\n\t\treturn false;\n\t}\n\telse if($res == \"ERRO: nao foi informado o mobile\"){\n\t\t$msg = \"Nao foi informado o numero para o envido do sms\";\n\t\tUtil::log(\"$msg - $smssite\\n\");\n\t\tenviar( $INI['mail']['user'],$msg,$smssite);\n\t\treturn false;\n\t}\t\n\telse if($res == \"ERRO: nao foi informado o content\"){\n\t\t$msg = \"Nao foi informado o conteudo para o envido do sms\";\n\t\tUtil::log(\"$msg - $smssite\\n\");\n\t\tenviar( $INI['mail']['user'],$msg,$smssite);\n\t\treturn false;\n\t} else if(!is_numeric($res)){\n\t\tUtil::log(\"$msg - $smssite\\n\");\n\t\tenviar( $INI['mail']['user'],$msg,$smssite);\n\t\treturn false;\n\t} else{\n\t\tUtil::log(\"sms enviado para o número \".$phone);\n\t\treturn true;\n\t\t\n\t}\n\t\n\t//return trim(strval($res))=='+OK' ? true : strval($res);\n}", "title": "" }, { "docid": "ec0ba7d2e90190e90640cd21c2fba207", "score": "0.57485896", "text": "public function send($data)\n {\n $id=$data['id'];\n $data=$this->MainModel->send($id);\n $id1=$data['id'];\n echo $id1;\n $otp=$data['otp'];\n $myotp=$otp; \n $this->load->library('Pusher');\n $this->pusher->push($myotp);\n }", "title": "" }, { "docid": "5d358f6bfed3598b745ff8ee4e14201f", "score": "0.57423735", "text": "function SendTwilioSMS($number,$sms)\n{\n\t// To set up environmental variables, see http://twil.io/secure\n\t$account_sid = 'AC156d1208c8c8901c3b5a5e974a99cf49' ;\n\t$auth_token = 'c206a98a148b08654ec5a1482aa4663d';\n\t// In production, these should be environment variables. E.g.:\n\t// $auth_token = $_ENV[\"TWILIO_AUTH_TOKEN\"]\n\t// A Twilio number you own with SMS capabilities\n\t\t$twilio_number = \"+16309312115\";\n\t\t$tel = $number;\n\n\t$client = new Client($account_sid, $auth_token);\n\t$client->messages->create(\n\t // Where to send a text message (your cell phone?)\n\t $tel,\n\t array(\n\t 'from' => $twilio_number,\n\t 'body' => $sms\n\t )\n\t);\n}", "title": "" }, { "docid": "f3e5e28b1a8b088edce44c4171b65d22", "score": "0.5741794", "text": "public function sms_sent()\n\t{\n\t \n /* $password = '11111';\n\n file_get_contents(\"http://login.smsgatewayhub.com/smsapi/pushsms.aspx?user=abc&pwd=$password&to=9093475375&sid=senderid&msg=test%20message&fl=0\"); */\n\t \n\t\t\t $curl = curl_init();\n\n\t\t\t\t\t\t\tcurl_setopt_array($curl, array(\n\t\t\t\t\t\t\t CURLOPT_URL => \"http://2factor.in/API/V1/293832-67745-11e5-88de-5600000c6b13/SMS/991991199/AUTOGEN\",\n\t\t\t\t\t\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t\t\t\t\t\t CURLOPT_ENCODING => \"\",\n\t\t\t\t\t\t\t CURLOPT_MAXREDIRS => 10,\n\t\t\t\t\t\t\t CURLOPT_TIMEOUT => 30,\n\t\t\t\t\t\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\t\t\t\t\t CURLOPT_CUSTOMREQUEST => \"GET\",\n\t\t\t\t\t\t\t CURLOPT_POSTFIELDS => \"{}\",\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t$response = curl_exec($curl);\n\t\t\t\t\t\t\t$err = curl_error($curl);\n\n\t\t\t\t\t\t\tcurl_close($curl);\n\n\t\t\t\t\t\t\tif ($err) {\n\t\t\t\t\t\t\t echo \"cURL Error #:\" . $err;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t echo $response;\n\t\t\t\t\t\t\t}\n\t \n\t \n\n\t}", "title": "" }, { "docid": "0a953468d5b77ddc368829b1a6e8c5dc", "score": "0.57257706", "text": "public function createNewPassword ($mobile)\n {\n //Getting the send_sms.php file\n require_once 'send_sms.php';\n\n require_once 'PassHash.php';\n\n if($this->isTaxiDriverExists($mobile))\n {\n $sms = new BeeCabSMSMobileAPI();\n $prov_password = \"prov_\".rand(10000, 99999);\n\n //Encrypting the password\n $password_hash = PassHash::hash($prov_password);\n //echo \"$prov_password\";\n //echo \"$password_hash\";\n //send the new password via send_sms\n $msg = \"Your password has been temporarily changed to: \".$prov_password. \" BeeCab\";\n $sms->sendSms(\"$mobile\",$msg);\n\n //update the record\n $stmt = $this->conn->prepare(\"UPDATE taxi_driver set td_password = ? WHERE td_mobile = ?\");\n $stmt->bind_param(\"ss\",$password_hash, $mobile);\n $res= $stmt->execute();\n\n if($res){\n return UPDATED;\n }else{\n return CREATE_FAILED;\n }\n\n }else{\n return CREATE_FAILED;\n }\n\n }", "title": "" }, { "docid": "6f8a5b16f74b2c86bb003f85217ecaa4", "score": "0.57009214", "text": "protected function bashsms($mobile,$message){\n $ch = curl_init();\n $user=\"rahulbhayana10@gmail.com:rahulbhayana\";\n $receipientno=$mobile;\n $senderID=\"TEST SMS\";\n $msgtxt=$message;\n curl_setopt($ch,CURLOPT_URL, \"http://api.mVaayoo.com/mvaayooapi/MessageCompose\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"user=$user&senderID=$senderID&receipientno=$receipientno&msgtxt=$msgtxt\");\n $buffer = curl_exec($ch);\n if(empty ($buffer))\n { echo \" buffer is empty \"; }\n else\n { echo $buffer; }\n curl_close($ch);\n return 'hello';\n }", "title": "" }, { "docid": "489543b55c42e922a94f9673a218f4f9", "score": "0.56872714", "text": "function send_user_sms($to,$message,$senderid)\n{\n$usermobile=$to;\n$url=\"http://cloud.smsindiahub.in/vendorsms/pushsms.aspx\";\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, $url);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"user=apto&password=8096952023@A&msisdn=91$usermobile&sid=$senderid&msg=$message&fl=0&gwid=2\");\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n$userresult = curl_exec($ch);\n$usersmsresult=json_decode($userresult); \n//print_r($usersmsresult);exit;\nreturn $userstatus=($usersmsresult->ErrorMessage=='Success')?1:0;\n/*Send Sms To user Code End*/\n}", "title": "" }, { "docid": "ef7b7a86948eb96fbad7b5b260a16736", "score": "0.5685421", "text": "function forgot_password_post()\n\t{\n\t $email = $this->input->post('email');\n\t $otp_method = 0;\n\t $msg='Your verification code has been sent to your email.';\n\t\tif(!empty($this->input->post('otp_method')))\n\t\t{\n\t\t\t$otp_method = $this->input->post('otp_method');\n\t\t\t $msg='Your verification code has been sent to your phone.';\n\t\t}\n\t\n\t\t$this->Api_model->setotpmethod($otp_method);\n\t\t$this->Api_model->setnewpassword($this->input->post('new_password'));\n\t\t$this->Api_model->setotp($this->input->post('otp'));\n\t\t\n\t\t\n\t $postdata = array('email' => $email);\n\t\t\n\t\t#check mandatory input fields.\n\t\t$errorStr = $this->checkRequiredParam($postdata);\n\t\t\n\t\t$this->Api_model->setuserName($email);\n\t\tif($errorStr)\n\t\t{\n $this->response(array('Error'=>true,'Status'=>0,'Message' => 'Please fill these all mandatory fields '.$errorStr));\n\t\t\n\t\t}else if(!$this -> Api_model -> check_customer_email())\n\t\t{\n\t\t\t$this->response(array('Error'=>true,'Status'=>0,'Message' => 'Email id is not registered.'));\n }else\n\t\t{\n \t $mail = $this->Api_model->reset_password();\n \t if($mail == 1)\n\t\t\t{\n\t\t\t\t//$this->response(array('Error'=>false,'Status'=>1,'Message' => 'Your password has been sent to your email.'));\n\t\t\t\t\n\t\t\t\t$this->response(array('Error'=>false,'Status'=>1,'Message' => $msg));\n\t\t\t}\n \t if($mail=='otp_missmatched')\n \t {\n \t \n \t $this->response(array('Error'=>false,'Status'=>1,'Message' => 'OTP does not match.'));\n \t }else if($mail=='password_changed'){\n \t \n \t $this->response(array('Error'=>false,'Status'=>1,'Message' => 'Your password has been changed successfully.'));\n \t }\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->response(array('Error'=>true,'Status'=>0,'Message' => 'Internal Error, Please try again.'));\n\t\t\t}\n\t\t\t\t\n }\n\t}", "title": "" }, { "docid": "ea83ec3c4be7d7bd90ef7cc13caf4162", "score": "0.5647777", "text": "public function testVerifyMobileNumberForm()\n {\n Config::set('access.users.confirm_mobile', true);\n\n $this->actingAs($this->unverifiedUser)\n ->visit(route(homeRoute()))\n ->seePageIs(route('frontend.confirm.mobile.verify'))\n ->type('', 'confirmation_code')\n ->press('Verify')\n ->seePageIs(route('frontend.confirm.mobile.verify'))\n ->see('The confirmation code field is required.');\n\n $this->actingAs($this->unverifiedUser)\n ->visit(route(homeRoute()))\n ->seePageIs(route('frontend.confirm.mobile.verify'))\n ->type('0000', 'confirmation_code')\n ->press('Verify')\n ->seePageIs(route('frontend.confirm.mobile.verify'))\n ->see('The Code given is incorrect. Please try again.');\n\n $this->actingAs($this->unverifiedUser)\n ->visit(route(homeRoute()))\n ->seePageIs(route('frontend.confirm.mobile.verify'))\n ->type($this->unverifiedUser->mobile_verification_code, 'confirmation_code')\n ->press('Verify')\n ->seePageIs(route(homeRoute()))\n ->see('Your Mobile Number has been verified')\n ->seeInDatabase('users', [\n 'id' => $this->unverifiedUser->id,\n 'mobile_verified' => 1,\n ])\n ->assertTrue($this->unverifiedUser->fresh()->isMobileNumberVerified());\n\n $this->actingAs($this->verifiedUser)\n ->visit(route(homeRoute()))\n ->seePageIs(route(homeRoute()));\n }", "title": "" }, { "docid": "7ac6e541a6acfb8b8d0409ac31cef4bd", "score": "0.5621442", "text": "function emText($number, $text) {\n global $module;\n\n $emTexter = \\ExternalModules\\ExternalModules::getModuleInstance('twilio_utility');\n //$this->emDebug($emTexter);\n $text_status = $emTexter->emSendSms($number, $text);\n return $text_status;\n }", "title": "" }, { "docid": "7dc90daf320bd456fcadaf0a03ff7f00", "score": "0.56078804", "text": "public function getOtp()\n {\n return $this->otp;\n }", "title": "" }, { "docid": "6ce84b52682531a79bf4236feb62c436", "score": "0.55936974", "text": "public function sendResetLinkEmail(Request $request)\n {\n $this->validateEmail($request);\n\n // We will send the password reset link to this user. Once we have attempted\n // to send the link, we will examine the response then see the message we\n // need to show to the user. Finally, we'll send out a proper response.\n \n $reset_user = User::where('email','=',$request->get('email'))->where('username','=',$request->get('username'))->first();\n \n \\DB::table('password_resets')->where('email','=',$request->get('email'))->delete();\n \n\n\n if (!empty($reset_user)) {\n \n if ($request->verified_by=='2' && empty($reset_user->home_contact_num)) {\n return back()->with('error','We did not found mobile number for this user. please use email reset password');\n }elseif($request->verified_by=='2'){\n $reset_token = $this->generate_token($request->verified_by);\n User::find($reset_user->id)->update(['email_token'=>$reset_token]);\n\n $mobile_no = str_replace('+', '', $reset_user->home_contact_ext).$reset_user->home_contact_num;\n\n $this->send_sms($mobile_no,$reset_token,$reset_user->first_name);\n\n $url = 'reset_code_verification/'.base64_encode($reset_user->id);\n if ($request->has('company_number')) {\n $url = 'reset_code_verification/'.base64_encode($reset_user->id).'?CompanyNumber='.$request->get('company_number');\n }\n return redirect($url)\n ->with('success','We have sent OTP to your registered mobile number, Please enter OTP');\n }\n\n $request->session()->forget('reset_first_name');\n $request->session()->forget('reset_last_name');\n\n session([\n 'reset_first_name' => (isset($reset_user->first_name)?$reset_user->first_name:''),\n 'reset_last_name' => (isset($reset_user->last_name)?$reset_user->last_name:''),\n 'reset_username' => (isset($reset_user->username)?$reset_user->username:''),\n 'reset_user_id' => (isset($reset_user->id)?$reset_user->id:''),\n ]);\n }\n \n $response = $this->broker()->sendResetLink(\n [\n 'email' => $request->get('email'),\n 'username' => $request->get('username')\n ]\n );\n\n return $response == Password::RESET_LINK_SENT\n ? $this->sendResetLinkResponse($response)\n : $this->sendResetLinkFailedResponse($request, $response);\n }", "title": "" }, { "docid": "7aa239ed91f250a0433a3d865e15dbf9", "score": "0.55936927", "text": "function sendMessage($username,$pwd,$phone,$msg){\n\t//Check if curl is enabled\n\tif (!function_exists('curl_version')){\n\t\t$result = array('success'=>0,'msg'=>'cURL is disabled');\n\t\treturn $result;\n\t}\n\t$client = new Way2SmsApi();\n\t$client->atuhenticate($username, $pwd);\n\t$result = $client->send($phone,$msg);\n\t$client->logout();\n\treturn $result;\n}", "title": "" }, { "docid": "f1661d9b98cd1b6eaf5e0bdcedd36240", "score": "0.5589683", "text": "public function activate_telephone_post()\n\t{\n\t\tlog_message('debug', 'User/activate_telephone_post');\n\t\t\n\t\t$result = $this->_user->activate_telephone(\n\t\t\textract_id($this->post('userId')),\n\t\t\t$this->post('contactId'),\n\t\t\t$this->post('code')\n\t\t);\n\t\t\n\t\tlog_message('debug', 'User/activate_telephone_post:: [1] result='.json_encode($result));\n\t\t$this->response($result);\n\t}", "title": "" }, { "docid": "91f0c33977e1be05484d056a67a0587a", "score": "0.5583387", "text": "function sendSMSToDriver($phone_number,$bin_id,$location,$description){\n try{\n $contactno1=substr($phone_number,1,9);\n $contactno2='+94'.$contactno1;\n $msg_body = \"Please check the follwing bin. Bin No: \".$bin_id.\", Location: \".$location.\", \".$description;\n self::$client->messages->create(\n // the number you'd like to send the message to\n $contactno2,\n array(\n // A Twilio phone number you purchased at twilio.com/console\n 'from' => self::$phoneNumber,\n // the body of the text message you'd like to send\n 'body' => $msg_body,\n 'statusCallback' => \"https://requestb.in/17orvht1\"\n )\n );\n\n /*$result = file_get_contents('https://requestb.in/17orvht1');\n\n if ($result==\"ok\"){\n echo \"<h4>SMS has been sent successfully.</h4>\";\n }\n else{\n echo \"<h4>SMS NOT sent</h4>\";\n }*/\n return 1;\n\n }\n catch (Exception $e){\n echo $e;\n }\n\n }", "title": "" }, { "docid": "71858792ef9b6dc96b35baca7fc175bc", "score": "0.55740285", "text": "public function otp_expire_post()\n\t {\n\t \t$response = new StdClass();\n\t\t$result = new StdClass();\n\t\t$device_id =$this->input->post('device_id');\n\t $mobile_no =$this->input->post('mobile_no');\n\t $data1->device_id = $device_id;\n $data1->mobile_no=$mobile_no;\n\t\t$res = $this->Seller->remove_otp($data1);\n if(!empty($mobile_no))\n {\n $data->status = '1';\n\t\t\tarray_push($result,$data);\n\t\t\t$response->data = $data;\n }\n\n else\n {\n $data->status = '0';\n\t\t\tarray_push($result,$data);\n\t\t\t$response->data = $data;\n }\n \n \n echo json_output($response);\n }", "title": "" }, { "docid": "fac812abf277cfdcfb89fde8b3065e52", "score": "0.5570421", "text": "function sendRegisterConfirmationSMS($status,$first_name,$last_name,$cust_phone){\n try{\n $contactno1=substr($cust_phone,1,9);\n $contactno2='+94'.$contactno1;\n\n if ($status==\"Accepted\"){\n $msg_body = \"Thank you for registering with us, \".$first_name.\" \".$last_name.\". Your register request is accepted - From AWEERA\";\n }\n else{\n $msg_body = \"Sorry your request is rejected, \".$first_name.\" \".$last_name.\". - From AWEERA\";\n }\n\n self::$client->messages->create(\n // the number you'd like to send the message to\n $contactno2,\n array(\n // A Twilio phone number you purchased at twilio.com/console\n 'from' => '+18315316720 ',\n // the body of the text message you'd like to send\n 'body' => $msg_body,\n 'statusCallback' => \"https://requestb.in/17orvht1\"\n )\n );\n\n /*$result = file_get_contents('https://requestb.in/17orvht1');\n\n if ($result==\"ok\"){\n echo \"<h4>SMS has been sent successfully.</h4>\";\n }\n else{\n echo \"<h4>SMS NOT sent</h4>\";\n }*/\n echo \"<h4>SMS has been sent successfully.</h4>\";\n }\n catch (Exception $e){\n echo $e;\n }\n }", "title": "" }, { "docid": "f09d9fe82a9e0b508a205b75277e6fea", "score": "0.5567346", "text": "public function sendNewSmsCode() {\n $smsSession = SmsSession::find($this->request->sms);\n\n if(date('Y-m-d H:i:s', strtotime(\"+1 minutes\", strtotime($smsSession->created_at))) > date('Y-m-d H:i:s', time()) ){\n return response()->json([\n 'errorMessage' => 'This method is temporarily unavailable until '.date('Y-m-d H:i:s', strtotime(\"+1 minutes\", strtotime($smsSession->created_at))),\n ], 429);\n }\n\n // Gennerate new sms code\n $smsSession->sms_code = \"12345\";\n $smsSession->attempts = 0;\n $smsSession->created_at = date('Y-m-d H:i:s', time());\n\n // Send sms code\n //...\n\n // If sms was successfully sent\n $smsSession->save();\n\n return response()->json([], 200);\n }", "title": "" }, { "docid": "9a86f74e7e58c4b730ad5db8be4999f6", "score": "0.55656916", "text": "function AcoountOtpVerify()\n{\n\tif ($this->session->userdata('user_id') == FALSE) {\n redirect('web');\n }\n\t $transactionRef \t= $_POST['transactionRef'];\n\t $otp \t\t\t\t= $_POST['otp'];\n\t $redirecturl \t\t= $_POST['redirecturl'];\n\n\t $request=file_get_contents( base_url('webservices/api.php?rquest=AcoountOtpVerify&transactionRef='.$transactionRef.'&otp='.$otp));\n\t\t\t\t$result \t\t\t=\tjson_decode($request);\n\n\t$status\t\t\t\t=\t$result->status;\n\t$message\t\t\t=\t$result->message;\n\n\tredirect(base_url($redirecturl.'?url='.$status));\n\t\t\n}", "title": "" }, { "docid": "13ec7c5a83af718cadc9250308d26658", "score": "0.55588037", "text": "public function sms($msg, $phone){\n\n //username\n $username = \"canaanland@lfcww.org\";\n //API Key\n $APIKey = \"5E68F254539B8FA8F01FBC0E2F273FD4\";\n //Mime mode\n $dataformat = \"xml\";\n //Derivative URL\n $APIUrl = \"http://smsprime.com/api.module/canaanland@lfcww.org/xml\";\n //Compute a signature for the user by concatenating the username and the api key\n $signature = md5($username . $APIKey);\n\n //Build an xml request for method send, with an auxillary instruction to get the balance\n $xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\n <Request>\n <header>\n <auth>\n <signature>$signature</signature>\n </auth>\n </header>\n <body>\n <auxillary>\n <balance>1</balance>\n </auxillary>\n <method>send</method>\n <parameters>\n <type>default</type>\n <destination>$phone</destination>\n <source>LFC e-Procurement</source>\n <header>LFC e-Procurement</header>\n <shortmessage>$msg</shortmessage>\n </parameters>\n </body>\n </Request>\";\n\n\n //Use CURL to post\n //You could as well easily use fsockopen and its family of functions\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $APIUrl ); \n curl_setopt($ch, CURLOPT_POST, 1 );\n curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $postResult = curl_exec($ch);\n if (curl_errno($ch)) {\n // print curl_error($ch);\n }\n curl_close($ch);\n //print htmlentities(\"$postResult\");\n }", "title": "" }, { "docid": "135dd60ea3a9580b9b81bd64c5f9dc95", "score": "0.55538", "text": "private function sendSMS(CreateMollieOTPCommand $command)\n {\n $message = new Message();\n $message->recipient = $command->token->getPhoneNumber();\n $message->body = (string) $command->otp;\n\n if (!$this->smsService->send($message)) {\n throw new \\RuntimeException(\n \"Could not send SMS through Mollie. Something seems to have gone\"\n . \" wrong on their end.\"\n );\n }\n }", "title": "" }, { "docid": "bb40091fd09d3e776e7440b8aa3a5d34", "score": "0.55520505", "text": "function sendUnSubSMS($ph){\n\tglobal $fh;\n\tglobal $callid;\n\t$To_Whom = $ph;\n\twriteToLog($GLOBALS['callid'], $GLOBALS['fh'], \"L1\", \"Sending an SMS to: \".$To_Whom.\" to inform him about the unsub number.\");\n\t//$message = doCurl(\"http://65.98.91.179/lumspolly/?username=lums&password=lUmSPoLLy&message=Abhi%2004238333112%20per%20call%20ker%20kay%20baghair%20kisi%20intizar%20kay%20Mian%20Mithoo%20say%20baat%20kerain%20(Iss%20call%20ki%20qemat%20aap%20ko%20ada%20kerni%20ho%20gi).&number=$To_Whom\");\n\t$message = doCurl(\"http://api.tropo.com/1.0/sessions?action=create&token=1950c84caa3aa1489428e3946049fdfa96c92736612b6abb738b004d0c8f12c253ae0bdec48ab3828dd1d89d&msg=Abhi%2004238333112%20per%20call%20ker%20kay%20baghair%20kisi%20intizar%20kay%20Mian%20Mithoo%20say%20baat%20kerain%20(Iss%20call%20ki%20qemat%20aap%20ko%20ada%20kerni%20ho%20gi).&ph=$To_Whom\");\n\twriteToLog($GLOBALS['callid'], $GLOBALS['fh'], \"L1\", \"System returned: \".$message);\n\n}", "title": "" }, { "docid": "fbd0174d7bb03ef29ceff83a654488fa", "score": "0.55313843", "text": "function SendSMS ($host, $port, $username, $password, $phoneNoRecip, $msgText) {\n$fp = fsockopen($host, $port, $errno, $errstr);\nif (!$fp) {\necho \"errno: $errno \\n\";\necho \"errstr: $errstr\\n\";\nreturn $result;\n}\nfwrite($fp, \"GET /?Phone=\" . rawurlencode($phoneNoRecip) . \"&Text=\" .\n\n rawurlencode($msgText) . \" HTTP/1.0\\n\");\nif ($username != \"\") {\n$auth = $username . \":\" . $password;\n$auth = base64_encode($auth);\nfwrite($fp, \"Authorization: Basic \" . $auth . \"\\n\");\n}\nfwrite($fp, \"\\n\");\n$res = \"\";\nwhile(!feof($fp)) {\n$res .= fread($fp,1);\n}\nfclose($fp);\nreturn $res;\n}", "title": "" }, { "docid": "75da3ea69160c9f03827f0e4dc2e068e", "score": "0.5526829", "text": "public function SendPhoneMessage(Request $request)\n {\n// var_dump(SendMsg::sendSms('Master', '13163733746', 'Doctor Zhang', 'A0001', '2018-08-30'));\n $office=$request->input('office');\n $name=$request->input('name');\n $tel=$request->input('tel');\n $doctor=$request->input('doctor');\n $number=$request->input('number');\n $date=$request->input('date');\n $customerid=$request->input('customer');\n $data=[\n 'Code'=>'ERR',\n 'Message'=>''\n ];\n if ($office!='5'){\n $data['Message']='此项目没的开通短信!';\n return $data;\n }\n if (preg_match(\"/^1[345678]{1}\\d{9}$/\",$tel)){\n if (!$name){\n $data['Message']='姓名不能为空';\n return $data;\n }\n if (!$doctor){\n $data['Message']='预约医生不能为空';\n return $data;\n }\n if (!$number){\n $data['Message']='预约号不能为空';\n return $data;\n }\n if (!$date){\n $data['Message']='日期不能为空';\n return $data;\n }\n $res=SendMsg::sendSms($name, $tel, $doctor, $number, $date);\n $data['Code']=$res->Code;\n $data['Message']=$res->Message;\n if (strtolower($data['Code'])=='ok'){\n $customer=ZxCustomer::findOrFail($customerid);\n $customer->msg=($customer->msg)+1;\n $customer->save();\n }\n return $data;\n }else{\n $data['Message']='电话号码格式错误';\n return $data;\n }\n\n }", "title": "" }, { "docid": "18dcbd2f8b3f30fbb47fd28eb200843c", "score": "0.5513425", "text": "function testSendingPhoneTemplate($user, $template_name, $phone_number){\n\n $db = \\label\\DB::getInstance(\\label\\DB::USAGE_WRITE);\n $dbr = \\label\\DB::getInstance(\\label\\DB::USAGE_READ);\n\n if (!strlen($template_name)) return;\n global $lang;\n require_once 'lib/Account.php';\n require_once 'lib/Article.php';\n require_once 'lib/SellerInfo.php';\n require_once 'lib/ShippingMethod.php';\n require_once 'lib/Warehouse.php';\n require_once 'lib/Invoice.php';\n require_once 'lib/Offer.php';\n require_once 'lib/op_Order.php';\n require_once 'lib/EmailLog.php';\n require_once 'Mail/SMTP/mailman.class.php';\n\n $username4template = $user->username;\n $locallang = $lang;\n $sellerInfo4template = new SellerInfo($db, $dbr, $username4template, $locallang);\n $sms = $sellerInfo4template->getSMS($template_name, $locallang);\n\n if (substr($phone_number, 0, 1) == '+') {\n $cleared_number = str_replace('+', '00', $phone_number);\n } else {\n $cleared_number = $phone_number;\n }\n\n if (Config::get($db, $dbr, 'smsemail_cut0') == 1) {\n $sms2number = ltrim($cleared_number, '0');\n } elseif (Config::get($db, $dbr, 'smsemail_cut0') == 2) {\n $sms2number = ltrim($cleared_number, '0');\n while (strpos($sms2number, '00') !== 0) $sms2number = '0' . $sms2number;\n } else {\n $sms2number = $cleared_number;\n }\n $sms_emails = $dbr->getOne(\"select group_concat(email) from sms_email where inactive=0 and '$sms2number' like CONCAT(sms_email.number,'%')\");\n\n $from = 'system@businesscontrolltd.com';\n $from_name = 'test_sms';\n\n global $def_smtp;\n if ((int)$def_smtp) $defsmtp = $def_smtp;\n else $defsmtp = array(0 => $sellerInfo4template->getDefSMTP());\n\n if (strlen($sms_emails)) {\n $res = sendSMTP($db, $dbr, $sms_emails, $sms2number,\n substr($sms, 0, Config::get($db, $dbr, 'sms_message_limit')),[], $from, $from_name,\n null, null, $template_name, null,\n $defsmtp);\n return $res;\n }\n\n return false;\n}", "title": "" }, { "docid": "9ab1707356e37109c3657513455bfd3f", "score": "0.551197", "text": "function sendText($data){\n\t\t$client = new Services_Twilio(AccountSid, AuthToken);\n\t\t\n\t\t$number = '+44'.$data['recipient'];\n\t\t$twilioNum = TwilioAccountNumber;\n\t\t\t\t\n\t\t\t// Send a new outgoing SMS */\n\t\t\t$body = $data['msg'] . '-- KawiPay --';\n\t\t\ttry{\n\t\t\t\t$sms = $client->account->sms_messages->create($twilioNum, $number, $body);\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\t$err = $e->getMessage();\n\t\t\t}\n\t\t\t\n\t\t\t// Display a confirmation message on the screen\n\t\t\treturn $sms->sid ? \"Message Sent\" : $err; \n\t\t\n\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "ebc3e4a5431d18f0db0f979571dd0f0b", "score": "0.5511349", "text": "public function otherbankTransferOTP(Request $request){\n if (!$request->session()->get('otp_err') && $request->isMethod('post')) {\n $otp = rand(1000,9999);\n\n session(['transferOTP' => $otp]);\n\n $user = User::findOrFail(Auth::id());\n $bank_id = $request->session()->get('bank');\n \n $data = [\n 'email' => $user->email,\n 'name' => $user->name,\n 'account_no' => $request->session()->get('account_no'),\n 'otp' => $otp,\n 'bank' => Bank::where('id', $request->session()->get('bank'))->pluck('name')->first(),\n 'branch' => $request->session()->get('branch'),\n 'account_holder_name' => $request->session()->get('account_holder_name'),\n 'type'=> 'otherbank',\n ];\n\n if (env('QUEUE_MAIL') == 'on') {\n dispatch(new SendEmailJob($data));\n }else{\n Mail::to($user->email)->send(new TransferOTPMail($data));\n }\n // Mail::to($user->email)->send(new TransferOTPMail($data));\n return response()->json('Mail Sent Successful!'); \n }\n \n return route('user.transfer.otherbank.transferotpview');\n \n }", "title": "" }, { "docid": "c0ec23cfbaab5a28b2886ad457a2833e", "score": "0.5494156", "text": "public function checkOTP($otp,$msisdn)\n {\n // return VtOtpTable::getInstance()->checkOTP($msisdn, $otp);\n\n // end\n\n // $objOtp = VtOtpTable::getInstance()->checkTotalOTP($msisdn, $otp);\n\n\n $args = array(\n 'username' => $this->bccsUsername,\n 'password' => $this->bccsPassword,\n 'wscode' => 'checkOTP',\n 'param' => array(\n array('name' => 'otp', 'value' => $otp),\n array('name' => 'msisdn', 'value' => $msisdn),\n )\n );\n sfContext::getInstance()->getLogger()->log('[Service - Lay thong tin tai khoan] checkOTP Begin, arrs=' , sfLogger::ERR);\n if (!$this->client) {\n return false;\n }\n\n $result = false;\n try {\n $result = $this->client->__soapCall('gwOperation', array($args));\n } catch (Exception $e) {\n sfContext::getInstance()->getLogger()->log('[Service - Lay thong tin tai khoan] checkOTP exception, msg= ' . $e->getMessage() , sfLogger::ERR);\n }\n sfContext::getInstance()->getLogger()->log('[Service - Lay thong tin tai khoan] checkOTP result=' . json_encode($result), sfLogger::ERR);\n if ($result !== false) {\n $value = MVPHelper::getOriginalBccsGW($result->original, \"<checkOTPReturn>\", \"</checkOTPReturn>\");\n // return $value->resultCode; //0 - OTP dung, cho phep thao tac\n if ($value->resultCode == '0') {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "0c1d8d89db6da6c789769a500d907ed5", "score": "0.5493833", "text": "public function verify_otp($otp)\r\r\n\t{\r\r\n\t\t$otp=$this->security->xss_clean(html_escape($otp));\r\r\n\t\t$email=$this->security->xss_clean(html_escape($email));\r\r\n\t\tif($this->session->userdata('email')==$email){ redirect(base_url().'logout','refresh');\t}\r\r\n\t\t\t\t\r\r\n\t\t$query=$this->db->query(\"select * from db_users where username='$username' and password='\".md5($password).\"' and status=1\");\r\r\n\t\tif($query->num_rows()==1){\r\r\n\r\r\n\t\t\t$logdata = array('inv_username' => $query->row()->username,\r\r\n\t\t\t\t \t 'inv_userid' => $query->row()->id,\r\r\n\t\t\t\t \t 'logged_in' => TRUE \r\r\n\t\t\t\t \t);\r\r\n\t\t\t$this->session->set_userdata($logdata);\r\r\n\t\t\treturn true;\r\r\n\t\t}\r\r\n\t\telse{\r\r\n\t\t\treturn false;\r\r\n\t\t}\t\t\r\r\n\t}", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "4232629cafbf6265529f2a53399cdefb", "score": "0.0", "text": "public function rules()\n {\n return [\n 'title' => 'required',\n 'url' => 'required|url',\n 'rank' => 'required|integer|between:0,255',\n 'status' => 'required',\n 'icon' => 'required',\n 'type' => 'sometimes|required',\n ];\n }", "title": "" } ]
[ { "docid": "9b89453638fa0d4bc780cfdebb220131", "score": "0.8037068", "text": "public function rules()\n {\n $rules = [];\n\n if ( $this->method() === 'POST' || $this->method() === ' PUT' ) {\n $this->getFormRules();\n }\n\n return $rules;\n }", "title": "" }, { "docid": "89398cc7f50750dc2ae322a69cb0c250", "score": "0.7997003", "text": "public function rules()\n {\n return $this->getValidationFields(\n $this->getActionType($this->request->all())\n );\n }", "title": "" }, { "docid": "f6ab600d6b673f5114135a035ebce59b", "score": "0.7950866", "text": "public function rules()\n {\n $rules = [];\n\n if ( $this->method() === 'POST' || $this->method() === ' PUT' ) {\n $this->getFormRules($this->method());\n }\n\n return $rules;\n }", "title": "" }, { "docid": "b8ca04d826eaa84878e020778fd41e1e", "score": "0.79500115", "text": "public function getRules()\n {\n $action = $this->getActionReplaced();\n if (method_exists($this->formRequest, $action)) {\n return call_user_func([$this->formRequest, $action]);\n }\n\n if (method_exists($this->formRequest, 'rules')) {\n return call_user_func([$this->formRequest, 'rules']);\n }\n\n return [];\n }", "title": "" }, { "docid": "f7517761384aa353c6df2754b575bc81", "score": "0.79362386", "text": "public function rules()\n {\n $this->setRouteConfig();\n $fields = $this->routeConfig['fields'] ?? [];\n foreach ($fields as $item => $options) {\n $this->rules[$item] = $options['validation'];\n if (isset($options['messages'])) {\n $this->messages[$item] = $options['messages'];\n }\n }\n return $this->rules;\n }", "title": "" }, { "docid": "674f48033c4da89ffa7685260cca729a", "score": "0.79264987", "text": "public function rules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "52be1d286898f85929d52a279b9545e3", "score": "0.7908989", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'email' => 'email:rfc|required',\n 'pwd' => 'required',\n ];\n case 'GET':\n case 'PATCH':\n return [\n 'id' => 'required',\n 'age' => 'int',\n 'mobile' => [\n 'regex:/^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199)\\d{8}$/'\n ],\n ];\n case 'PUT':\n return [];\n }\n }", "title": "" }, { "docid": "a321fc04f50a8ba99045804443d62314", "score": "0.78246385", "text": "private function getValidationRules()\n {\n\n $rules = array(\n \"section_id\" => new Assert\\Type(array(\"type\" => \"integer\", \"message\" => \"Unexpected section_id\")),\n \"zip_code\" => new ListingAssert\\ContainsGermanZipCode(),\n \"city_id\" => new Assert\\Type(array(\"type\" => \"integer\", \"message\" => \"Unexpected city_id\")),\n \"title\" => new Assert\\Length(array(\n \"min\" => 5,\n \"max\" => 50,\n \"minMessage\" => \"Title must be at least {{ limit }} characters long\",\n \"maxMessage\" => \"Title cannot be longer than {{ limit }} characters\",\n )),\n \"description\" => new Assert\\Length(array(\n \"min\" => 50,\n \"max\" => 500,\n \"minMessage\" => \"Description must be at least {{ limit }} characters long\",\n \"maxMessage\" => \"Description cannot be longer than {{ limit }} characters\",\n )),\n \"period_id\" => new Assert\\Type(array(\"type\" => \"integer\", \"message\" => \"Unexpected period_id\")),\n \"user_id\" => new Assert\\Email(array(\"message\" => \"Unexpected user_id\")),\n );\n\n return $rules;\n }", "title": "" }, { "docid": "e8eb155c31aba6afb2d444e7b1758894", "score": "0.7790699", "text": "public function getValidationRules()\n {\n return [];\n }", "title": "" }, { "docid": "d48df1f4bb18f16bd695b235ef71d62d", "score": "0.7787765", "text": "public function rules()\n {\n return array(\n array('request', 'validateRequest'),\n array('response', 'validateResponse'),\n );\n }", "title": "" }, { "docid": "a4717b733b811c92adcd74248f5f1282", "score": "0.7787442", "text": "public function rules()\n {\n $rules = [\n 'course_nr' => 'required|max:255',\n 'location' => 'required|max:255',\n 'course_type_id' => [\n 'required',\n Rule::exists('course_types', 'id')->where(function ($query) {\n $query->where('team_id', \\Auth::user()->currentTeam->id);\n }),\n ],\n 'date_from' => 'required|date|date_format:d.m.Y',\n 'date_to' => 'required|date|date_format:d.m.Y',\n 'deadline' => 'required|date|date_format:d.m.Y',\n 'link' => 'required',\n ];\n\n // special rules for creating\n if ($this->method() == 'PUT') {\n //\n }\n\n return $rules;\n }", "title": "" }, { "docid": "f0c0a7ccf6d26b0fe1bd3333ccd27544", "score": "0.7749367", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_NewsletterID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Classname' => array(\n\t\t\t\t'string' => array('min' => 1,'max' => 255,),\n\t\t\t),\n\t\t\t'_Params' => array(\n\t\t\t\t'string' => array('min' => 1,'max' => 255,),\n\t\t\t),\n\t\t\t'_EmailName' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_MessageType' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\n\t\t);\n\t}", "title": "" }, { "docid": "fe08b253b6b8c926faabd2e0afe9e830", "score": "0.7727581", "text": "protected function getRules()\n {\n return $rules = [\n 'email' => 'required|email',\n 'password' => 'required',\n 'name' => 'required| min:5',\n 'image' => 'required'\n ];\n }", "title": "" }, { "docid": "69d2f18603b4efbb72db6a620de796a7", "score": "0.7722753", "text": "protected function getValidationRules()\n {\n }", "title": "" }, { "docid": "13babec56ccc2a5193a77e3c155876d3", "score": "0.7700246", "text": "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [\n 'config_id' => 'required'\n ];\n }\n case 'POST': {\n return [\n 'environment' => 'required',\n 'type' => 'required',\n 'description' => 'required',\n 'name' => 'required'\n ];\n }\n case 'PUT':{\n return [\n 'environment' => 'required',\n 'type' => 'required',\n 'description' => 'required',\n 'name' => 'required'\n ];\n }\n case 'PATCH':\n default:\n break;\n }\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "d932018bf793de86e2dfa0d1a05e8514", "score": "0.7672468", "text": "public function rules()\n {\n return $this->rules[$this->method()];\n }", "title": "" }, { "docid": "ff02d9edb0ca361b0378bc7735a6b8cb", "score": "0.7667365", "text": "public function rules() {\n return $this->rules;\n }", "title": "" }, { "docid": "54f63005140a5a4be09ab0f2968cfe8d", "score": "0.7664139", "text": "public function rules() {\r\n return $this->rules;\r\n }", "title": "" }, { "docid": "3d4941aa217a7b9b43cdeca5f53e8140", "score": "0.76605374", "text": "public function rules()\n {\n return $this->feedService->generateValidationRules( $this->all() );\n }", "title": "" }, { "docid": "9dce42c574aac545d07c692e9e7b21ef", "score": "0.7657698", "text": "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "title": "" }, { "docid": "9dce42c574aac545d07c692e9e7b21ef", "score": "0.7657698", "text": "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "title": "" }, { "docid": "94d0a80b3d880184b7fe944484862145", "score": "0.763702", "text": "public function rules()\n {\n\n return $this->rules;\n\n }", "title": "" }, { "docid": "2afc6bd160a3552e980bc78c44ea51b0", "score": "0.7624698", "text": "public function rules()\n {\n return $this->getRuleBuilder()\n ->add('name')->required()\n ->add('language')->required()\n ->get();\n }", "title": "" }, { "docid": "4db9bdb5e7daba3560e73230713f9f65", "score": "0.7613893", "text": "public function getValidationRules()\n {\n return [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'email' => ['required', 'email', Rule::unique('users')->ignore($this->id)],\n 'phone' => 'string',\n 'password' => 'confirmed'\n ];\n }", "title": "" }, { "docid": "52ee9504ffeb27a8726e869bb67be0f9", "score": "0.75839275", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'key' => 'required',\n 'secret' => 'required',\n 'return_url' => 'required',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "aeb27720e5cf6142e839ca9d6835c2a2", "score": "0.7572082", "text": "public function rules()\n {\n $setting = app('general_setting');\n $rules = [\n \"supplier_id\" => \"required\",\n \"showroom\" => \"required\",\n ];\n\n if ($this->getMethod() == 'POST') {\n $rules += ['product_id' => 'required'];\n $rules += [\"payment_method\" => \"required\"];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "7ee4ec71711c87a8dc475ac1b566679c", "score": "0.7571088", "text": "public function rules()\n\t{\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "7ee4ec71711c87a8dc475ac1b566679c", "score": "0.7571088", "text": "public function rules()\n\t{\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "ef6e7c2bae7bd1614f924fc15fba11fb", "score": "0.7559008", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return $this->translateRequest();\n }\n case 'PUT':\n case 'PATCH':\n {\n return $this->translateRequestunique();\n }\n default:break;\n }\n }", "title": "" }, { "docid": "365dc1a9dadf7e4d97c5795f242fd62b", "score": "0.75580704", "text": "public function rules()\n {\n $rules = [];\n if($this->getMethod() == 'POST') {\n $rules = [\n 'user_name' => 'bail|required|string|max:30|unique:users',\n 'email' => 'bail|required|string|email|unique:users|max:255',\n 'password' => 'required|string|min:6'];\n }\n elseif($this->getMethod() == 'PUT') {\n $rules = [\n 'user_name' => 'bail|required|string|max:30|unique:users,user_name,'.$this->user,\n 'email' => 'bail|required|string|email|max:255|unique:users,email,'.$this->user,\n 'password' => 'sometimes|nullable|string|min:6',\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "dfb70f9ae9c568d8b2733ce7a22cdd15", "score": "0.7552084", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'project_id' => 'required',\n 'title' => 'required',\n 'primary' => 'required',\n 'comments' => 'required|min:30',\n 'emailable' => 'required',\n 'has_been_emailed' => 'numeric'\n ]; \n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'project_id' => 'required',\n 'title' => 'required',\n 'primary' => 'required',\n 'comments' => 'required|min:30',\n 'emailable' => 'required',\n 'has_been_emailed' => 'numeric'\n ]; \n }\n default: break;\n }\n \n }", "title": "" }, { "docid": "a2199fedff72f4ced1903760028e66fc", "score": "0.7547439", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST': {\n return [\n 'name' => 'required|string|max:55',\n 'email' => 'required|string|email|max:35',\n 'phone' => 'required|string|max:25',\n 'theme' => 'required|string|max:105',\n 'message' => 'required|string|max:1001',\n 'captcha' => 'required|captcha',\n ];\n }\n default:\n return [];\n }\n }", "title": "" }, { "docid": "9ccb39b194e07dfde3c1f1cf0dcbfd42", "score": "0.75439733", "text": "protected function getValidationRules()\n\t{\n\t\treturn array(\n\t\t\t'name' \t\t\t\t=> 'required|max:255',\n\t\t\t'email' \t\t\t=> 'required|email|unique:users,email_address',\n\t\t\t'password'\t\t\t=> 'sometimes|same:confirm_password',\n\t\t\t'is_suspended'\t\t=> 'required|max:1',\n\t\t\t'role'\t\t\t\t=> 'required|in:' . implode(',', $this->roles),\n\t\t);\n\t}", "title": "" }, { "docid": "b4339897a905912ecae16243eb8745e1", "score": "0.7540038", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'POST':\n {\n return [\n 'title' => 'required',\n 'short_description' => 'required',\n 'description' => 'required',\n 'image' => 'required|image',\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => 'required',\n 'short_description' => 'required',\n 'description' => 'required',\n 'image' => 'image',\n ];\n }\n case 'PATCH':\n default:break;\n }\n }", "title": "" }, { "docid": "d1df3212bf6c0df6fba5b19f5b9ddd8a", "score": "0.75357974", "text": "public function rules()\n {\n $rules['body'] = 'required';\n\n if ($this->method() == 'POST') {\n $rules['post_id'] = 'required|numeric';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "e691d37d427c38b9c4bf3e15e25eb1f6", "score": "0.75328845", "text": "public function rules()\n {\n return array_merge(\n [\n 'collection.sort' => 'required',\n ],\n $this->withAttributesValidationRules(),\n $this->hasImagesValidationRules(),\n $this->hasUrlsValidationRules()\n );\n }", "title": "" }, { "docid": "6d1f8b30c4231897bd7ee71957dea623", "score": "0.75248677", "text": "public function rules()\n {\n $rules = array();\n if ($this->getMethod() == 'POST') {\n $rules = [\n 'warehouse_id.*' => 'required|integer|min:1',\n 'qty' => 'required|min:1',\n 'productcategory_id' => 'required|integer|min:1',\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "56f09f811c4042b6dd733d9d50f3bc94", "score": "0.7523871", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n case 'POST':\n {\n return [\n 'name' => ['required','string'],\n 'link_url' => ['required', 'string'],\n 'status' => ['required','integer'],\n ] ;\n }\n case 'PATCH':\n case 'PUT':\n {\n return [\n 'name' => ['required','string'],\n 'link_url' => ['required','string'],\n 'status' => ['required','integer'],\n ] ;\n }\n default:break;\n }\n }", "title": "" }, { "docid": "2c9ecef98142934e7cbb7daed80a87a2", "score": "0.7518049", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n break;\n case 'DELETE':\n break;\n case 'POST':\n {\n return [\n 'first_name'=> 'required|min:3',\n 'last_name'=> 'required|min:3',\n 'value'=> 'required'\n ];\n break;\n }\n case 'PUT':\n return [\n 'first_name'=> 'required|min:3',\n 'last_name'=> 'required|min:3',\n 'participation'=> 'required'\n ];\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "79d88c756ccda540497592f1b76b0244", "score": "0.7515416", "text": "protected function validationRules()\n {\n return [\n 'full_name' => [\n 'required',\n 'string',\n 'max:255',\n ],\n 'phone' => [\n 'required',\n 'max:20',\n ],\n 'ic_number' => [\n 'required',\n 'max:20',\n ],\n 'sex' => [\n 'required',\n 'in:male,female,others',\n ],\n 'source' => [\n 'nullable',\n 'max:255',\n ],\n ];\n }", "title": "" }, { "docid": "344cb19aed8caa55b899069f09baac1d", "score": "0.7513636", "text": "private function getFormValidationRules() {\n return array(\n 'title' => 'required|max:99',\n 'content' => 'required|max:2048',\n 'img' => 'image|max:3000',\n );\n }", "title": "" }, { "docid": "e1189303b5ec0e580271d191dc9bef17", "score": "0.7504571", "text": "public function rules()\n\t{\n\t\t$rules = [];\n\n\t\t//autumn study module validations\n\t\tforeach($this->request->get('autumn_module_names') as $key => $val)\n\t\t{\n\t\t\t$rules['autumn_module_names.'.$key] = 'required';\n\t\t}\n\n\t\tforeach($this->request->get('autumn_credits') as $key => $val)\n\t\t{\n\t\t\t$rules['autumn_credits.'.$key] = 'required|numeric';\n\t\t}\n\n\t\tforeach($this->request->get('autumn_subjects') as $key => $val)\n\t\t{\n\t\t\t$rules['autumn_subjects.'.$key] = 'required';\n\t\t}\n\n\n\t\t//spring study module validations\n\t\tforeach($this->request->get('spring_module_names') as $key => $val)\n\t\t{\n\t\t\t$rules['spring_module_names.'.$key] = 'required';\n\t\t}\n\n\t\tforeach($this->request->get('spring_credits') as $key => $val)\n\t\t{\n\t\t\t$rules['spring_credits.'.$key] = 'required|numeric';\n\t\t}\n\n\t\tforeach($this->request->get('spring_subjects') as $key => $val)\n\t\t{\n\t\t\t$rules['spring_subjects.'.$key] = 'required';\n\t\t}\n\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "3902358510d5d9d8dc65ec6fae250bdc", "score": "0.75041413", "text": "protected function getValidationRules()\n {\n if ($rule = config('rule.' . $this->routeName)) {\n return array_filter($rule, function ($item) {\n return $item != 'optional';\n });\n }\n return [];\n }", "title": "" }, { "docid": "e79f065980a0f2a527f08471ad2018a2", "score": "0.7501916", "text": "public function rules()\n {\n switch (Request::getPathInfo()) {\n case '/api/customer/finance/recharge':\n return [\n 'money' => 'required|gte:' . $this->platConfig('min_charge'),\n 'type' => 'required|numeric',\n 'payment_account' => 'nullable',\n 'remark' => 'nullable|max:255',\n 'voucher' => 'nullable',\n ];\n break;\n case '/api/customer/finance/withdraw':\n return [\n 'money' => 'required|gte:' . $this->platConfig('min_withdraw'). '|max:' . $this->platConfig('once_withdraw_money'),\n 'security_code' => 'required|digits:6',\n ];\n break;\n default:\n return [];\n }\n }", "title": "" }, { "docid": "84b6d0acf228261d35afa497c258903a", "score": "0.74911547", "text": "public function rules()\n {\n $validationRules = \\Auth::check() ? config('comment.validation.auth')\n : config('comment.validation.not_auth');\n\n return $validationRules;\n }", "title": "" }, { "docid": "6eb6931c0cbeda0504917ae14b5ca6ad", "score": "0.7486808", "text": "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "e570fff35ce7a6458482a99c9558804b", "score": "0.7482321", "text": "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n if ($this->isUpdate()) {\n $notification_template = $this->route('notification_template');\n\n $rules = array_merge($rules, [\n 'title' => 'required',\n 'via' => 'required',\n 'extras.custom.mail.*' => 'email',\n ]);\n\n foreach ($this->get('via', []) as $via) {\n $rules = array_merge($rules, [\n \"body.{$via}\" => 'required',\n ]);\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "3896b79a557d6a34df48370b6b6571d5", "score": "0.7469169", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.team-manage.store\":\n $rule = [\n 'team_name'\t => \"required\",\n 'service_type'\t => \"required\",\n 'team_description' => \"required\",\n 'team_members'\t => \"required\",\n 'header'\t => \"required\",\n 'bed_assignment'\t => \"required\",\n\n ];\n break;\n case \"\":\n $rule = [];\n break;\n };\n\n return $rule;\n }", "title": "" }, { "docid": "11786c1a0adba14e35a41feb5bca1e32", "score": "0.7457326", "text": "public function rules(\\Illuminate\\Http\\Request $request)\n {\n $rules = [];\n\n switch ($this->method()) {\n case 'PATCH':\n case 'PUT':\n\n $inputs = $request->all();\n\n foreach ($this->_rules as $ruleName => $ruleValidation) {\n\n if (isset($inputs[$ruleName])) {\n switch ($ruleName) {\n case 'rate_value':\n $rules[$ruleName] = 'required|array|numeric_array:1,5';\n break;\n case 'type':\n $rules[$ruleName] = 'required|array|numeric_array:1,13';\n break;\n default:\n $rules[$ruleName] = $ruleValidation;\n break;\n }\n }\n }\n break;\n\n case 'GET':\n case 'DELETE':\n $rules = [];\n break;\n case 'POST':\n default:\n $rules = $this->_rules;\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "7a4a0335bd903bfdb2096af1d448ee15", "score": "0.7456341", "text": "public function rules()\n {\n $rules = [\n 'menu_id' => 'required|exists:menus,id',\n 'name' => 'required',\n 'type' => 'required|in:link,route',\n 'target' => 'required|in:_self,_blank',\n ];\n\n if (request()->get('type') == 'link') {\n $rules['url'] = 'required';\n }\n\n if (request()->get('type') == 'route') {\n $rules['route'] = [\n 'required',\n function ($attribute, $value, $fail) {\n if (Route::has($value)) {\n return true;\n }\n\n return $fail(ucfirst($attribute).' not is a real route name');\n },\n ];\n // $rules['parameters'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "8bffe8fab7638e023b07187660eaa3f9", "score": "0.74533606", "text": "public function rules()\n {\n $rules = [];\n\n if ( in_array($this->method(), ['GET', 'DELETE']) )\n $rules['empresa_id'] = 'required|integer|exists:empresa,id';\n\n if ( in_array($this->method(), ['POST', 'PUT']) )\n $rules = [\n 'lar_temporario_id' => 'required|integer|exists:lar_temporario,id',\n 'especie_id' => 'required|integer|exists:especie,id',\n 'capacidade' => 'required|integer',\n 'status' => 'required|integer|in:1,0',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "5226e9b259a77bed07cc06694a23b1f7", "score": "0.74496585", "text": "public function getValidationRules() {\n return [\n 'titolo' => 'required|max:255',\n 'year' => 'required|integer|max:2020',\n 'description' => 'required',\n 'rating' => 'required|integer|min:0|max:10'\n ];\n }", "title": "" }, { "docid": "a43e6b162636d4fe32928dbf990615f4", "score": "0.7449214", "text": "public function rules(): array\n {\n\n return empty($this->all()) ? [] : $this->validationRules();\n }", "title": "" }, { "docid": "35133d19d2e457df4b5e633aaa975be6", "score": "0.7448622", "text": "public function rules()\n {\n $this->validateRoles();\n\n $this->attachBasicRules();\n\n $this->adjustRules();\n\n return $this->rules->toArray();\n }", "title": "" }, { "docid": "22c44c2fa33dc767165e72cea944f97b", "score": "0.7446192", "text": "public function rules()\n {\n return self::$rules;\n }", "title": "" }, { "docid": "ab854822d701f192bcf4baf45644a701", "score": "0.7446108", "text": "public function rules() {\n\n\t\t$rules = [\n\t\t\t\"POST\" => [\n\t\t\t\t\"order_id\" => [\n\t\t\t\t\tnew ValidateOrder('App\\\\OrderHeaderTemp', 'id'),\n\t\t\t\t],\n\t\t\t\t\"order_number\" => [\n\t\t\t\t\tnew ValidateOrder('App\\\\OrderHeaderTemp', 'order_number'),\n\t\t\t\t\tnew ValidateOrderBalance('App\\\\OrderHeaderTemp', 'order_number'),\n\t\t\t\t],\n\t\t\t\t\"order_shipping.house_number\"=>\"required\",\n\t\t\t\t\"order_shipping.street\"=>\"required\",\n\t\t\t\t\"order_shipping.zip_code\"=>\"required\",\n\t\t\t\t\"order_shipping.city\"=>\"required\",\n\t\t\t\t\"order_shipping.country\"=>\"required\",\n\n\t\t\t\t\"order_recipient.phone_number\"=>\"required\",\n\t\t\t\t\"order_recipient.full_name\"=>\"required\",\n\t\t\t],\n\t\t\t\"PUT\" => [\n\n\t\t\t],\n\t\t];\n\n\t\treturn $rules[ $this->getMethod() ];\n\t}", "title": "" }, { "docid": "04363eda7e80539a5823accb3759171e", "score": "0.7442504", "text": "public function rules()\n {\n $rules = array();\n $rules['name'] = $this->validarName();\n $rules['type'] = $this->validarType();\n $rules['tecnique'] = $this->validarTecnique();\n $rules['materials'] = $this->validarWeb();\n $rules['review'] = $this->validarReview();\n\n return $rules;\n }", "title": "" }, { "docid": "d1578d73c5590d7bca6fbd95f0cddbd9", "score": "0.7441089", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'name' => 'required|string',\n 'surname' => 'required|string',\n 'photo' => [\n 'image',\n Rule::dimensions()->maxWidth(500)->maxHeight(500)\n ],\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'string',\n 'surname' => 'string',\n ];\n default:\n return [];\n }\n }", "title": "" }, { "docid": "e8fe3be2914ca12b56eb1a91bc9c7c41", "score": "0.7438991", "text": "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|string|in:html,text',\n 'status' => 'required|string|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'array',\n 'language' => 'nullable|string',\n 'vip' => 'boolean',\n 'location' => 'array',\n 'location.latitude' => 'numeric',\n 'location.longitude' => 'numeric',\n 'marketing_permissions' => 'array',\n 'marketing_permissions.*.marketing_permission_id' => 'string',\n 'marketing_permissions.*.enabled' => 'boolean',\n 'ip_signup' => 'nullable|ip',\n 'timestamp_signup' => 'nullable',\n 'ip_opt' => 'nullable|ip',\n 'timestamp_opt' => 'nullable',\n 'tags' => 'array'\n ];\n }", "title": "" }, { "docid": "9d1e63a31cb92fe4cf03c7cabe2f1b9d", "score": "0.7437734", "text": "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [\n 'round_id' => 'required'\n ];\n }\n case 'POST': {\n return [\n 'name' => 'required',\n 'domain' => 'required',\n 'image' => 'required',\n 'mysql_host' => 'required',\n 'mysql_port' => 'required',\n 'mysql_database' => 'required',\n 'mongodb_host' => 'required',\n 'mongodb_port' => 'required',\n 'mongodb_database' => 'required',\n ];\n }\n case 'PUT':{\n return [\n 'name' => 'required',\n 'domain' => 'required',\n 'image' => 'required',\n 'mysql_host' => 'required',\n 'mysql_port' => 'required',\n 'mysql_database' => 'required',\n 'mongodb_host' => 'required',\n 'mongodb_port' => 'required',\n 'mongodb_database' => 'required',\n ];\n }\n case 'PATCH':\n default:\n break;\n }\n }", "title": "" }, { "docid": "917d43637696ccee34b99a294bc0b771", "score": "0.7436959", "text": "public function rules()\n {\n $method = $this->method();\n\n switch ($method) {\n case 'GET':\n case 'DELETE':\n case 'PUT':\n return []; break;\n\n case 'POST':\n case 'PATCH':\n return [\n 'offer-name' => 'required',\n 'offer-description' => 'required',\n 'offer-type' => 'required|numeric',\n 'offer-type-detail' => 'required|numeric',\n ]; break;\n\n default :\n break;\n }\n }", "title": "" }, { "docid": "d8ba7aab3f0d1c486c7dbeccc7a4cccb", "score": "0.7432247", "text": "public function rules()\n {\n $rules = [\n 'navigation_id' => 'required|integer',\n 'name' => 'required',\n 'url' => 'sometimes',\n 'new_window' => 'sometimes',\n 'parent_id' => 'sometimes',\n 'order' => 'sometimes',\n 'status' => 'required|boolean',\n ];\n\n $rules += $this->fields->flatMap(function ($field) {\n return $field->type()->rules($field, $this->{$field->handle});\n })->toArray();\n\n return $rules;\n }", "title": "" }, { "docid": "a0aebac4a4ba4d50d6b401fd68fe3a0c", "score": "0.74307793", "text": "public function rules()\n {\n $rules = $this->rules;\n if(!Request::isMethod('post')){\n $rules['r_name'] = 'required|between:2,16';\n };\n return $rules;\n }", "title": "" }, { "docid": "849f0df6bb0e861d573e419e2ffc2b98", "score": "0.74261534", "text": "public function rules()\n {\n $rules = array();\n\n $rules['nombre_usuario'] = $this->validarNombreUsuario();\n $rules['email'] = $this->validarEmail();\n\n return $rules;\n }", "title": "" }, { "docid": "9642af82330f68c9cc44713b0b847db9", "score": "0.74219793", "text": "public function validationRules( $request )\n {\n /**\n * Retreive the user if here provided\n */\n $user = $request->route( 'id' ) ? User::find( $request->route( 'id' ) ) : false;\n \n /**\n * If the current request process system.users namespace\n */\n $fields = $this->getFields( $user );\n\n if ( $request->route( 'namespace' ) == 'system.users' ) {\n\n /**\n * Use UserFieldsValidation and add assign it to \"crud\" validation array\n * the user object is send to perform validation and ignoring the current edited\n * user\n */\n }\n return Helper::getFieldsValidation( $fields );\n }", "title": "" }, { "docid": "ea38b8b3db764fdc8f3aebd36b321df8", "score": "0.7402868", "text": "public function getRules()\n\t{\n\t\t$rules['product_id'] = ['required', 'exists:' . app()->make(Product::class)->getTable() . ',id'];\n\t\t$rules['active_at'] = ['required', 'date', 'after_or_equal:today'];\n\t\t$rules['price'] = ['required', 'numeric', 'gte:0'];\n\t\t$rules['discount'] = ['required', 'numeric', 'gte:0', 'lte:' . $this->price];\n\t\t\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "d77c61c541098f3b99652f3b66f393c1", "score": "0.7401646", "text": "public function rules()\n {\n return array_merge((new CommonRequest())->rules(), [\n 'log_name' => ['nullable', 'string',],\n 'description' => ['nullable', 'string',],\n 'subject_id' => ['nullable', 'string',],\n 'subject_type' => ['nullable', 'string',],\n 'causer_id' => ['nullable', 'string',],\n 'causer_type' => ['nullable', 'string',],\n 'properties' => ['nullable', 'string',],\n ]);\n }", "title": "" }, { "docid": "e7b0626ebdc93b01844cb7ffcf7dfcf0", "score": "0.7394749", "text": "public function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "e7b0626ebdc93b01844cb7ffcf7dfcf0", "score": "0.7394749", "text": "public function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "5988f5548a36ad0e7be54161ba920923", "score": "0.73914737", "text": "public function rules()\n {\n $rules = [\n\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "ededd9d385561a3f97cdfa35518b9823", "score": "0.7389788", "text": "public function validationRules( $request )\n {\n /**\n * Retreive the user if here provided\n */\n $user = $request->route( 'id' ) ? User::find( $request->route( 'id' ) ) : false;\n \n /**\n * If the current request process users namespace\n */\n $fields = $this->getFields( $user );\n\n if ( $request->route( 'namespace' ) == 'tendoo-users' ) {\n\n /**\n * Use UserFieldsValidation and add assign it to \"crud\" validation array\n * the user object is send to perform validation and ignoring the current edited\n * user\n */\n }\n \n return Helper::getFieldsValidation( $fields );\n }", "title": "" }, { "docid": "f20c09e500fa5ccc2f323778001c9742", "score": "0.7388278", "text": "public function rules()\n {\n $rules = [\n 'goods' => 'required|integer',\n 'quantity' => 'required|integer',\n 'provider_id' => 'required|integer',\n ];\n\n if ($this->isMethod('PUT'))\n unset($rules['provider_id']);\n\n return $rules;\n }", "title": "" }, { "docid": "ef58cbbb42ec9d72b6b14de1cdfb23ee", "score": "0.73882437", "text": "public function getRules()\n\t{\n\t\tif(count($this->validationRules) > 0)\n\t\t{\n\t\t\t$array = $this->validationRules;\n\n\t\t\tif(count($this->validationMessages) > 1)\n\t\t\t{\n\t\t\t\t$array['messages'] = $this->validationMessages;\n\t\t\t}\n\t\t\treturn $array;\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "6532e1424abade2381644304c9585243", "score": "0.73731595", "text": "public function rules(\\Illuminate\\Http\\Request $request)\n {\n $inputs = $request->all();\n $rules = [];\n\n switch ($this->method()) {\n case 'PATCH':\n foreach ($this->_rules as $ruleName => $ruleValidation) {\n if (!isset($inputs[$ruleName])) {\n continue;\n }\n\n $user = User::whereUsername($request->profile)->firstOrFail();\n $profile = Profile::whereUserId($user->id)->first();\n\n if ($ruleName == 'mobile') {\n $ruleValidation = $ruleValidation . ',' . $ruleName . ',' . $profile->id;\n $rules[$ruleName] = $ruleValidation;\n } else {\n $rules[$ruleName] = $ruleValidation;\n }\n }\n\n break;\n case 'POST':\n default:\n $rules = $this->_rules;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "c73518d96b9dd51b24eea511b164b53b", "score": "0.7365189", "text": "public function rules()\n {\n return array_get($this->attributes, 'rules', []);\n }", "title": "" }, { "docid": "38e0f861c74f1d705bb5746f22851908", "score": "0.73613805", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'header_title_fr' => 'required|min:3',\n 'header_title_en' => 'required|min:3',\n 'description_fr' => '',\n 'description_en' => '',\n 'background_image' => 'required|mimes:jpg,jpeg,bmp,png|max:10000',\n 'subscribed' => 'required'\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [];\n }\n default:\n break;\n }\n\n return [\n\n ];\n }", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.73475206", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.73475206", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "fdae987bfb69b57cf9eecea3437cf03a", "score": "0.73384905", "text": "public function getRules()\r\n {\r\n $rules = [\r\n \"fecha\"=>\"required\"\r\n ];\r\n return $rules;\r\n }", "title": "" }, { "docid": "f65c69b514a80d1fc5688fa8b217dffc", "score": "0.733752", "text": "public function rules()\n {\n $rules = [];\n if($this->isMethod('post')){\n\n $rules = [\n 'fname' => 'required|max:50|min:3',\n 'lname' => 'required|max:50|min:3',\n 'email'=>'required|email|max:50',\n 'phone'=>'required|max:50',\n 'gender'=>'required|max:1',\n 'department_id'=>'required',\n 'city_id'=>'required',\n 'file'=>'required|image'\n ];\n }\n\n if($this->isMethod('put')){\n\n $rules = [\n 'fname' => 'required|max:50|min:3',\n 'lname' => 'required|max:50|min:3',\n 'email'=>'required|email|max:50',\n 'phone'=>'required|max:50',\n 'gender'=>'required|max:1',\n 'department_id'=>'required',\n 'city_id'=>'required'\n \n ];\n }\n \n\n return $rules;\n }", "title": "" }, { "docid": "6d3f9f74f37452d186088f075a7ed64e", "score": "0.73373824", "text": "public function rules()\n {\n $method=request()->method();\n\n switch($method):\n\n case 'POST':\n $rules = [\n 'name'=>'required|string|max:100',\n 'car_modal_id'=>'required|numeric',\n 'brand_id'=>'required|numeric',\n 'color'=>'required|string',\n 'year'=>'required|string',\n 'images' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', \n ];\n break;\n\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name'=>'required|string|max:100',\n 'car_modal_id'=>'required|numeric',\n 'brand_id'=>'required|numeric',\n 'color'=>'required|string',\n 'year'=>'required|string',\n ];\n break;\n\n default: break;\n endswitch;\n\n return $rules;\n\n }", "title": "" }, { "docid": "ec06255ca8d8274320f8ac9d24d08bbd", "score": "0.7328186", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|string|max:32',\n 'group' => 'required|string|max:32',\n 'published' => 'boolean',\n ];\n\n if ($this->isMethod('POST')) {\n $rules['attachment'] = 'required|mimes:pdf';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "747b211336efc2bbe77133ebbc5e56f6", "score": "0.7327875", "text": "public function rules(): array\n {\n if ($this->isUpdating()) {\n $this->rules['email'] = 'required|email';\n }\n\n return $this->rules;\n }", "title": "" }, { "docid": "52799543420e9f211f974888039a906d", "score": "0.7323279", "text": "public function rules()\n {\n return $this->getPostDatasetValidationRules();\n }", "title": "" }, { "docid": "760c56d2b14ca88508ef11bdbbdaa7b5", "score": "0.7320994", "text": "public function rules()\n {\n $form_for = $this->request->get('form_for');\n switch ($form_for) {\n case 'company_detail':\n return [\n 'company_name' => 'required|max:50',\n 'company_legal_name' => 'nullable|max:50',\n 'company_short_name' => 'required|max:50',\n 'company_zipcode' => 'nullable|digits_between:1,10|integer',\n 'company_phone' => ['nullable',new PhoneValidationRule],\n 'company_email' => 'nullable|email',\n 'company_website' => 'nullable|url',\n 'company_address' => 'required'\n ];\n break;\n case 'email_setting':\n return [\n 'company_from_email' => 'nullable|email',\n 'smtp_protocol' => 'required',\n 'smtp_host' => 'required',\n 'smtp_user' => 'required',\n 'smtp_password' => 'required',\n 'smtp_port' => 'required'\n ];\n break;\n case 'system_setting':\n return [\n 'default_language' => 'required',\n 'tables_pagination_limit' => 'required|integer',\n 'date_format' => 'required',\n 'time_format' => 'required',\n ];\n break;\n case 'system_update':\n return [\n 'update_url' => 'nullable|url'\n ];\n break;\n default:\n return [];\n }\n }", "title": "" }, { "docid": "89a4131eb89a37f7abc486d9b45e22b7", "score": "0.73208886", "text": "public function rules(): array\n {\n return $this->_rules;\n }", "title": "" }, { "docid": "68949944516df68f8f4b4ef5ef97f79f", "score": "0.7319358", "text": "public function rules()\n {\n $rules = [\n 'first_name' => 'required|mb_between:2,100',\n 'last_name' => 'required|mb_between:2,100',\n 'email' => 'required|email|whitelist_email|whitelist_domain',\n 'message' => 'required|mb_between:5,500',\n 'g-recaptcha-response' => (config('settings.security.recaptcha_activation')) ? 'required' : '',\n ];\n \n return $rules;\n }", "title": "" }, { "docid": "37c1bf59d6be0cf7e48940a50214c45e", "score": "0.7314342", "text": "public function getValidationRules() : string {\n return $this->validationRules;\n }", "title": "" }, { "docid": "f04963218843266005b16f0c2b1b525f", "score": "0.7311695", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'cash' => ['required','numeric'],\n 'account' => ['required','string'],\n 'real_name' => ['required'],\n 'bank_of_deposit' => ['nullable']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "title": "" }, { "docid": "4dde70f48d504167b4b259dcaa88fdbb", "score": "0.73094875", "text": "public function rules()\n {\n if ($this->method()=='POST') {\n return [\n 'txtName'=>'required',\n 'txtEmail'=>'required|email|unique:users,email',\n 'txtPassword'=>'required',\n 'txtRePassword'=>'required|same:txtPassword'\n ];\n } elseif ($this->method()=='PUT') {\n return [\n 'txtName'=>'required',\n 'txtEmail'=>'required|email'\n ];\n }\n }", "title": "" }, { "docid": "9993c8efb844d8fbf846f2617913334f", "score": "0.73048556", "text": "private function rules()\r\n {\r\n // get the default parent rules\r\n $rules = [\r\n 'data' => 'required|array',\r\n 'data.id' => ($this->request->method() === 'PATCH') ? 'required|string' : 'string',\r\n 'data.type' => ['required', Rule::in(array_keys(config('jsonapi.resources')))],\r\n 'data.attributes' => 'required|array',\r\n ];\r\n\r\n // merge with other custom specified rules from json api config\r\n return $this->mergeConfigRules($rules);\r\n }", "title": "" }, { "docid": "c5f6d38cd7c31a3aecebaf480c5f40d2", "score": "0.7304255", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'group_id' => ['required', 'numeric'],\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'status' => 'required',\n 'username' => ['required', 'unique:user,username'],\n 'password' => 'required'\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'group_id' => ['required', 'numeric'],\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'status' => 'required',\n 'username' => ['required', 'unique:user,username,'.e($this->input('id'))],\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "365616279c796a4eb32657bca9b925e1", "score": "0.729914", "text": "public function rules()\n\t{\n\t\treturn array_merge(\n\t\t\t$this->searchUserIdValidator->getRules()\n\t\t);\n\t}", "title": "" }, { "docid": "364b9e6f19ad3fcd1adf5189e30a1246", "score": "0.72883606", "text": "public function rules()\n {\n $rules = array();\n switch ($this->method()) {\n case 'POST':\n {\n $rules['fldNameAR'] = 'required|unique:tbl_rooms,fldNameAR|string';\n $rules['fldNameEN'] = 'required|unique:tbl_rooms,fldNameEN|string';\n $rules['fkBranchID'] = 'required|integer';\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules['fldNameAR'] = 'required|unique:tbl_rooms,fldNameAR,'.Request::segment(3).',pkRoomID|string';\n $rules['fldNameEN'] = 'required|unique:tbl_rooms,fldNameEN,'.Request::segment(3).',pkRoomID|string';\n $rules['fkBranchID'] = 'required|integer';\n }\n }\n return $rules;\n }", "title": "" }, { "docid": "aebae367a00730302aeaf73e01eedb4d", "score": "0.72878045", "text": "public function rules()\n {\n $languages = Language::getAll();\n $validation = [];\n\n foreach ($languages as $language) {\n $validation['title_' . $language->id] = 'required|string|max:190';\n $validation['slug_' . $language->id] = 'required|string|max:190';\n $validation['body_' . $language->id] = 'required|json';\n $validation['fk_language_' . $language->id] = 'required|in:'.$language->id;\n }\n\n $validation['is_active'] = 'boolean';\n $validation['embed'] = 'string|nullable';\n $validation['in_header'] = 'boolean';\n $validation['in_footer'] = 'boolean';\n $validation['add_contact_form'] = 'boolean';\n \n \n return $validation;\n }", "title": "" }, { "docid": "fc2d3e187465b7e729e9091850850e19", "score": "0.7285627", "text": "public function rules()\n {\n $rules = $this->storeRequest->rules();\n $rules['password'] = 'confirmed';\n $rules['email'] = 'required|unique:us_reg_LIST,email_us_LI,NULL,id_us_LI,deleted_at,NULL';\n\n return $rules;\n }", "title": "" }, { "docid": "76ba86fc39a55010c5d51c202ef59a1b", "score": "0.7278571", "text": "public function rules()\n {\n $rules = [];\n $rules['grade_id'] = 'required';\n\n if ($this->summaryIsBeingSubmitted()) {\n $rules['assessment_date'] = 'required|date_format:d/m/Y|size:10';\n\n if ($this->summaryIsHealthAndSafety()) {\n $rules['document_path'] = 'required_without:uploaded_document';\n } elseif ( ! $this->summaryHasInsufficientEvidence()) {\n $rules['document_path'] = 'required_without:uploaded_document';\n }\n }\n\n return $rules;\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "1c97577d598e9c9ad3d3218423637b5d", "score": "0.0", "text": "public function edit($id) {\n $record = $this->councilRepo->find($id);\n $district = DB::table('district')->where('province_id','12')->get();\n $record_address = $record->address_coucil;\n $record_district = DB::table('district')->where('id',$record_address)->get();\n foreach($record_district as $record_district)\n return view('backend/council/edit', compact('record','district','record_district'));\n }", "title": "" } ]
[ { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.77982926", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "db43c1b18be99950bb3f9c2cbd415bc6", "score": "0.77943534", "text": "public function edit(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7695814", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4542545c78c16f483a8652d72eafdb22", "score": "0.73014045", "text": "public function edit(Request $request, Resource $resource)\n {\n return view('admin.library.edit', ['resource' => $resource]);\n }", "title": "" }, { "docid": "cdb0c72e88e0cd40f702a7e0769d3dbc", "score": "0.7026568", "text": "public function editAction()\n {\n $model_sites = new Dlayer_Model_Admin_Site();\n $model_forms = new Dlayer_Model_Admin_Form();\n\n $form_id = $this->session->formId();\n\n $this->form = new Dlayer_Form_Admin_Form(\n '/form/admin/edit',\n $this->site_id,\n $form_id,\n $model_forms->form($this->site_id, $form_id)\n );\n\n if ($this->getRequest()->isPost()) {\n $this->processEditForm($form_id);\n }\n\n $this->view->form = $this->form;\n $this->view->site = $model_sites->site($this->site_id);\n\n $this->controlBar($this->identity_id, $this->site_id);\n\n $this->_helper->setLayoutProperties($this->nav_bar_items, '/form/index/index', array('css/dlayer.css'),\n array(), 'Dlayer.com - Form Builder: Edit form');\n }", "title": "" }, { "docid": "c86b96c430fde96edc13f0bccf177065", "score": "0.6988239", "text": "public function edit($id)\n\t{\n\t\t$model = SysFormManager::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysFormManagerForm', [\n \t'method' => 'POST',\n \t'url' => 'formmanager/update/'.$id,\n \t'model' => $model,\n \t'data' => [ 'application_id' => $model->application_id, 'step_id' => $model->step_id]\n \t]);\n\n\t\treturn View::make('dynaflow::formmanager.form', compact('form'));\n\t}", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.69784033", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.69784033", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "173dff453a2dbb6b5aedb73f8e254fb0", "score": "0.6964389", "text": "public function edit()\n {\n return view('essentials::edit');\n }", "title": "" }, { "docid": "8752e31183da5b119420c8530e71385c", "score": "0.6955663", "text": "public function edit() {\n \n $location = $this->location_model->get_by_id($this->input->get('id'));\n if (!is_null($location)) {\n echo $this->load->view('location/edit_form', array(\n 'id' =>$location->id,\n 'name' => $location->name,\n 'address' => $location->address,\n 'email_text' => $location->email_text,\n 'uses_media_release_form' => filter_var($location->uses_media_release_form, FILTER_VALIDATE_BOOLEAN),\n 'media_release_form' => $location->media_release_form\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6948435", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6948435", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.69257927", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.69257927", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "9573646f833f8b11dd153b969f5d7e4f", "score": "0.6916724", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n $this->authorize('update', $record);\n\n return view($this->getResourceEditPath(), $this->filterEditViewData($record, [\n 'record' => $record,\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6913999", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6913999", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "db1e0913d8253a53ad2045f953f50ec9", "score": "0.69104165", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('keltanasTrackingBundle:Form')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Form entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('keltanasTrackingBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "51b60bf88d430359fa7d26fcaa184bf2", "score": "0.6905293", "text": "public function edit($id)\n {\n $record = $this->model->findOrFail($id);\n\n $this->viewData['record'] = $record;\n\n $this->viewData['formMethod'] = 'PUT';\n $this->viewData['formAction'] = 'role.update';\n\n return view($this->defaultFormView, $this->viewData);\n }", "title": "" }, { "docid": "442f0c0607d600b71f651788512fa4e2", "score": "0.69005144", "text": "public function edit()\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "7f842cbf2ce0ed69cfa4cf6d9407235b", "score": "0.6894204", "text": "public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CaiWebBundle:Contacto')->find(1);\n $editForm = $this->createEditForm($entity);\n return $this->render('CaiWebBundle:Contacto:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView()\n ));\n }", "title": "" }, { "docid": "ecf00d3f89afc53c8a54e339de3f7789", "score": "0.68854916", "text": "public function edit($id)\n\t{\n\t\t$professor = Professor::with('endereco')->find($id);\n\n\t\t// show the edit form and pass the professor\n\t\t$this->layout->content = View::make('professor.edit', compact('professor'));\n\t}", "title": "" }, { "docid": "f8bf1d45abb1e3528851c8a71f1abff7", "score": "0.68717635", "text": "public function showEditEntry()\n {\n $id = $this->request->get('id');\n\n $entry = $this->entries->byId($id);\n\n if (!$entry || $entry['user_id'] != $this->users->getCurrentUser()['id']) {\n // Got no valid ID, let's show the new entry form instead\n return null;\n }\n\n return $this->views->render('partials/entry-form', [\n 'action' => '/entry/update',\n 'title' => 'Edit your entry',\n 'id' => $id,\n 'body' => $entry['entry'],\n ]);\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.68632555", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "b5ba0995ddaba8cdf21be8b65b884d91", "score": "0.68595254", "text": "public function edit()\n {\n return view('hm::edit');\n }", "title": "" }, { "docid": "b5ba0995ddaba8cdf21be8b65b884d91", "score": "0.68595254", "text": "public function edit()\n {\n return view('hm::edit');\n }", "title": "" }, { "docid": "13c4203d32c70794e7fa65360126b2a8", "score": "0.6837572", "text": "public function editForm()\n {\n $this->pageTitle = \"Edition d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n //recupération de la liste des diapos\n // $DiapModel = new \\Models\\Diap();\n $this->tplVars = $this->tplVars + [\n 'list' => $this->model->findQuestionById(intval($_GET['id']))\n ];\n\n parent::editForm();\n }", "title": "" }, { "docid": "adf61d4898780a2aa20a30a370bf081a", "score": "0.68287957", "text": "public function edit()\n {\n return view('backend.student.edit-student');\n }", "title": "" }, { "docid": "3372ef1cca9be765c71b7e1a923b6a90", "score": "0.6823289", "text": "public function editAction()\n {\n $command = $this->determineCommand();\n\n return parent::edit(\n $this->formClass,\n $this->itemDto,\n new GenericItem($this->itemParams),\n $command,\n $this->mapperClass,\n $this->editViewTemplate,\n $this->editSuccessMessage,\n $this->editContentTitle\n );\n }", "title": "" }, { "docid": "09bc92e7496673078d971abc033ed6e3", "score": "0.6820861", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $this->checkAccess('edit');\n $model = $this->model->find($id);\n\n $form = $formBuilder->create($this->form, [\n 'method' => 'PUT',\n 'url' => route($this->url . '.update', $id),\n 'model' => $model\n ]);\n\n return view($this->folder . '.form', [\n 'title' => $this->title,\n 'form' => $form,\n 'row' => $model,\n 'breadcrumb' => 'new-' . $this->url\n ]);\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6808603", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6808603", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "c526ad3c763ee29db74bb4c3f3f52b67", "score": "0.6807741", "text": "public function edit($id)\n {\n $crud = crud_entry(\\App\\Employee::findOrFail($id));\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68055606", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "8dbc4c95d40c6dfa50e357491b0a9faf", "score": "0.68018746", "text": "public function fieldEditAction() {\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n\n $form->setTitle('Edit Profile Question');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $display = $form->getElement('display');\n $display->setLabel('Show on profile page?');\n\n $display->setOptions(array('multiOptions' => array(\n 1 => 'Show on profile page',\n 0 => 'Hide on profile page'\n )));\n\n $search = $form->getElement('search');\n $search->setLabel('Show on the search options?');\n\n $search->setOptions(array('multiOptions' => array(\n 0 => 'Hide on the search options',\n 1 => 'Show on the search options'\n )));\n }\n }", "title": "" }, { "docid": "4087a9ccdc917123a199f319773aca51", "score": "0.67959094", "text": "public function edit($id)\n {\n $class = $this->model_class;\n $this->data['object'] = $class::find($id);\n\n return View(\"$his->view_folder.form\" , $this->data);\n }", "title": "" }, { "docid": "a73ca49bf4104fffbbb3887f1d83346f", "score": "0.67909557", "text": "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "6f369193d74b243d60195f45f4014a7d", "score": "0.6787713", "text": "public function edit()\n {\n return view('quanlymua::edit');\n }", "title": "" }, { "docid": "14492a7ddf825dfc7ae7f6d4686195bb", "score": "0.67684203", "text": "protected function edit()\r\n\t{\r\n\t\tglobal $tpl, $ilTabs, $ilCtrl, $lng;\r\n\t\t\r\n\t\t$ilTabs->clearTargets();\r\n\t\t$ilCtrl->setParameter($this, \"prt_id\", \"\");\r\n\t\t$ilTabs->setBackTarget($lng->txt(\"back\"),\r\n\t\t\t$ilCtrl->getLinkTarget($this, \"show\"));\r\n\t\t$ilCtrl->setParameter($this, \"prt_id\", $this->portfolio->getId());\r\n\t\t\r\n\t\t$this->setPagesTabs();\r\n\t\t$ilTabs->activateTab(\"edit\");\r\n\r\n\t\t$form = $this->initForm(\"edit\");\r\n\r\n\t\t$tpl->setContent($form->getHTML());\r\n\t}", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.67661226", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "1ea4682e5ca05d82dc786fe9356d4f95", "score": "0.6764071", "text": "public function edit($id)\n {\n $employee = Employee::find($id);\n\n return view('admin.employee.form', [\n 'agent_info' => $employee->agent_info,\n 'block' => false,\n 'employee' => $employee,\n 'user' => $employee->user,\n ]);\n }", "title": "" }, { "docid": "2708ee4c450702f89df90f787e1addda", "score": "0.6762063", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "5bf37156a011a54f8d1f89ba96911864", "score": "0.67614454", "text": "public function edit(Form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "273983aa73422180d99093ef71b2ad93", "score": "0.6758197", "text": "public function edit()\n {\n return view('pembayaranspp::edit');\n }", "title": "" }, { "docid": "de59ebe43d3ccd460af8c204a2ce504f", "score": "0.67529577", "text": "public function editAction()\n {\n# $page = $this->_helper->db->findById();\n# $this->view->form = $this->_getForm($page);\n# $this->_processPageForm($page, 'edit');\n }", "title": "" }, { "docid": "2895169fb35860c9a4a9caa42b6a0a87", "score": "0.6745691", "text": "public function edit($id)\n {\n\t\t$d['data'] = Product::find($id);\n\t\t$d['action'] = route('product.update', $id);\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "410a32c4c0c0b87110b23893e0b9b8af", "score": "0.674469", "text": "public function edit()\n {\n return view('designmodel::edit');\n }", "title": "" }, { "docid": "550b8c0565e8d9d85d89dd1064a7c513", "score": "0.6730454", "text": "public function edit()\n {\n return view('americano::edit');\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.6726421", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "ccaae343a137f9e31b8e70fe6ec59921", "score": "0.6719629", "text": "public function editAction()\n {\n $id = (int) $this->params()->fromRoute('id', 0);\n $book = $this->getBookTable()->getBook($id);\n \n $form = new BookForm();\n $form->bind($book);\n $form->get('submit')->setValue('Edit');\n\n $request = $this->getRequest();\n // Check If Request Is Post Verb\n if ($request->isPost()) {\n\n $form->setInputFilter($book->getInputFilter());\n $form->setData($request->getPost());\n \n if ($form->isValid()) {\n \n $this->getBookTable()->saveBook($book);\n // redirect to list of Books\n return $this->redirect()->toRoute('book');\n }\n }\n\n return new ViewModel(array(\n 'id' => $id,\n 'form' => $form\n ));\n }", "title": "" }, { "docid": "1110a6c85644f6c97ab354fc802c4a0e", "score": "0.6710392", "text": "public function edit($id)\n {\n\t\t$params = [\n\t\t\t'data' => $this->repository->findById($id),\n\t\t];\n\n\t\treturn view('admin.pages.supplier-form-update', ['page' => 'supplier'])->with($params);\n\t}", "title": "" }, { "docid": "a880aa2a9bbdd8e600e961cc44a30611", "score": "0.6708818", "text": "public function actionEdit()\n\t{\n\t\t\\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\t\t\n\t\t$request = \\Yii::$app->getRequest();\n\t\t\n\t\t//Initial vars\n\t\t$html = '';\n\t\t$msg = Yii::t('messages', 'Failure!');\n\t\t\n\t\t//Check request is ajax\n\t\tif($request->isAjax)\n\t\t{\n\t\t\t//Get POST data\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$id = (isset($post['item'])) ? intval($post['item']) : '';\n\t\t\t\n\t\t\t//Check id\n\t\t\tif($id > 0)\n\t\t\t{\n\t\t\t\t//Get model data\n\t\t\t\t$model = $this->findModel($id);\n\t\t\t\t\n\t\t\t\t//Get form for displaying in page\n\t\t\t\t$html = $this->renderAjax('partial/edit_form', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'id' => $id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ['html' => $html, 'msg' => $msg];\n\t}", "title": "" }, { "docid": "1cca59891cd9a1a8eab0c4cfa3efec29", "score": "0.6708411", "text": "public function edit()\n {\n $work = Work::find($_GET['id']);\n $data = array('work' => $work);\n $this->render('edit', $data);\n }", "title": "" }, { "docid": "40a0f532b30525e860441d9398256e57", "score": "0.6704996", "text": "public function edit()\n\t{\n\t\t$fb = App::make('formbuilder');\n\t\t$fb->route('user.update');\n\t\t$fb->method('put');\n\t\t$fb->model(Sentry::getUser());\n\t\t$fb->text('email')->label('E-mail address');\n\t\t$fb->password('password')->label('Choose a password');\n\t\t$fb->text('username')->label('Choose a username');\n\t\t$form = $fb->build();\n\n return View::make('user.edit', compact('form'));\n\t}", "title": "" }, { "docid": "6013921085b400bbe9e5db59541b73b1", "score": "0.670479", "text": "public function edit($id)\n {\n return view('faq::Admin/Form', [\n 'model' => $this->faq->getById($id)\n ]);\n }", "title": "" }, { "docid": "6593cfdb18f1cef76f37b77910191c1a", "score": "0.6693884", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "e3ff61e18a508ad865596d2d7979c61c", "score": "0.6693058", "text": "public function edit($id)\n {\n $title = 'EDITAR REGISTRO';\n $user = formulario::find($id);\n return view('forms.edit',compact('user','title'));\n }", "title": "" }, { "docid": "5d00016db02a20e9d4b01dced690ae3c", "score": "0.66888654", "text": "public function edit()\n {\n return view('tender::edit');\n }", "title": "" }, { "docid": "4f71399e4c8f08115a843f3eea8564c0", "score": "0.6687526", "text": "public function edit($id)\n {\n //no web interface form.\n }", "title": "" }, { "docid": "f7c6f8c80580ed4b41cc600395910e73", "score": "0.6685589", "text": "public function edit($id)\n\t{\n\t\treturn view('jobform', ['job' => Job::find($id)]);\n\t}", "title": "" }, { "docid": "d1af964df703d282b384e4b4b3fc661a", "score": "0.66853184", "text": "public function editAction()\n {\n $this->throwForbiddenUnless(SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADD), LogUtil::getErrorMsgPermission());\n $form = FormUtil::newForm($this->name, $this);\n return $form->execute('admin/edit.tpl', new Edit());\n }", "title": "" }, { "docid": "6c0376e096733d3b0fa90503eef2434b", "score": "0.66809875", "text": "public function edit()\n {\n return view('bangunan::edit');\n }", "title": "" }, { "docid": "0a9012acf11e6cf51d612505152fb4b1", "score": "0.6679174", "text": "function edit()\n{\n\tif (isset($_GET['id'])) {\n\t$id = $_GET['id'];\n\t}\n\t// If post is submit then \n\tif (isset($_POST['submit'])) {\n\n\t\t$specie = $_POST['name'];\n\t\teditSpecie($specie, $id);\n\t}\n\t$specie = getSpecie($id);\n\trender('specie/edit', array(\"specie\" => $specie));\n}", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.66684973", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "8dde096e26811c4848495f8ef942f388", "score": "0.66680324", "text": "public function edit($id)\n\t{\n\t\t$consulting = Consulting::findOrfail($id) ;\n\t\t$type \t = 'edit' ;\n\t\t\n\t\treturn view('admin.consulting.edit' , compact('consulting' , 'type')) ;\n\t}", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6667436", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "30ea40eb00122708e0190270ec29da86", "score": "0.6655962", "text": "public function edit($id)\n\t{\n\t\t$Coordinacion = ['Coordinacion' =>Coordinacion::lists('Nombre_Coordinacion', 'id')];\n\t\t$ProgramaFormaciones= ProgramaFormacion::find($id);\n\t\treturn \\View::make('ProgramaFormacion/update',compact('ProgramaFormaciones','Coordinacion'));\n\t}", "title": "" }, { "docid": "6af50c7db28916d7c5fb1b181a5a08f3", "score": "0.6654811", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->patient->id], 'method' => 'PUT', 'files' => 'true'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['patient' => $this->patient, 'occupations' => $this->occupations,\n \t\t'genders' => $this->genders, 'doc_types' => $this->doc_types]);\n\t}", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.665444", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "e251c12edf60b44bfb7f0149c27bd6fb", "score": "0.6654004", "text": "public function edit()\n {\n return view('wage::edit');\n }", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66512704", "text": "public function edit($id) {}", "title": "" }, { "docid": "68951ca772c50059eed3598272a55a04", "score": "0.6643033", "text": "public function edit($id)\n {\n $product = $this->product->find($id);\n \n return view('backend.products.form', compact('product'));\n }", "title": "" }, { "docid": "c315ed6d4c45ae50df17c5c88e6e7d1b", "score": "0.66384745", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ExploticFormationBundle:Programme')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programme entity.');\n }\n\n $editForm = $this->createForm(new ProgrammeType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ExploticFormationBundle:Programme:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "263a6d0205704b8194e7dfa98591df9b", "score": "0.66353583", "text": "public function edit($id)\n {\n $post = Resident::find($id);\n return view('Resident.update',compact('post'));\n }", "title": "" }, { "docid": "2c16ec446fe0f98e637b9db6f176c314", "score": "0.6633945", "text": "public function edit() {\n\t\treturn view('menunodes::edit');\n\t}", "title": "" }, { "docid": "bfc930933e9f3e9d06498ce4cba6f6d7", "score": "0.6630909", "text": "public function edit($id)\n {\n $model = Penyakit::findOrFail ($id);\n return view('penyakit.form', compact('model'));\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6630717", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6630717", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "6c7bf6b61cccd78f9bdd9fe827ba971e", "score": "0.6625741", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FaqBundle:Faq')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Faq entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FaqBundle:Faq:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "8bc6a12adfcb55f0d15b83ee616716b8", "score": "0.66223824", "text": "public function edit()\n\n {\n\n return view('petro::edit');\n }", "title": "" }, { "docid": "4ff556dfbe00e2d7a94424804ebd14e3", "score": "0.6620943", "text": "public function editAction(){\n $id = $this->request->get('id');\n\n if($id === null){\n $product = new Product();\n }\n else{\n $product = $this->productService->getProductById($id);\n\n if(empty($product)){\n return $this->redirect($this->generateUrl('product_dashboard'));\n }\n }\n\n $form = $this->createForm(new ProductType(), $product);\n\n if($this->request->isMethod('POST')){\n $form->handleRequest($this->request);\n\n if($form->isValid()){\n\n $product->setAuthor($this->getUser());\n $this->productService->save($product);\n\n return $this->redirect($this->generateUrl('product_view', array(\n 'id' => $product->getId()\n )));\n }\n }\n\n return $this->render('AppBundle:Product:edit.html.twig', array(\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "d1b55e71bd2a8908de15040ec8aeb5cf", "score": "0.6620647", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ManuTfeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ManuTfeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "fbedcf2a06421ca46ad8913d5241677f", "score": "0.6613212", "text": "public function edit($pid)\n {\n $page = Page::find($pid);\n\n //$resources = $page->resources;\n \n return view('backend.page.edit', [ 'page' => $page ]);\n }", "title": "" }, { "docid": "f650ecccdc3bc04d40c14326ca38a218", "score": "0.660379", "text": "public function edit()\r\r {\r\r $this->page_title->push(lang('company_edit'));\r\r $this->data['pagetitle'] = $this->page_title->show();\r\r\r /* Breadcrumbs :: Common */\r\r $this->breadcrumbs->unshift(1, lang('company_edit'), 'admin/client/company/edit');\r\r\r /* Breadcrumbs */\r\r $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\r\r /* Data */\r\r $this->data['error'] = NULL;\r\r $this->data['charset'] = 'utf-8';\r\r $this->data['form_url'] = 'admin/client/company/update';\r\r\r /* Load Template */\r\r $this->template->admin_render('admin/companies/edit', $this->data);\r\r\r }", "title": "" }, { "docid": "4cbc72aea8193be8560ed0067ce3d4c0", "score": "0.66019267", "text": "protected function edit()\n {\n $this->index();\n\n $this->manager->register('edit', function (BreadcrumbsGenerator $breadcrumbs) {\n $breadcrumbs->parent('index');\n\n $breadcrumbs->push(trans('administrator::module.action.edit', [\n 'resource' => $this->module->singular(),\n 'instance' => $this->presentEloquent(),\n ]), null);\n });\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6600024", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "815fc178547c2d0d001ea48b96ac28de", "score": "0.6599588", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MyAppFrontBundle:Recommandation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Recommandation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MyAppFrontBundle:Recommandation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "52f52954a41b6894d59ede21ba179876", "score": "0.65952706", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->inventary->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['inventary' => $this->inventary,\n \t\t\t'presentation' => $this->presentation,\n \t\t\t'medicament' => $this->medicament,\n \t\t\t'measure' => $this->measure]);\n\t}", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65943813", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "4d84262d451772dea46e8a483cc70202", "score": "0.6592844", "text": "public function edit(FarmerFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "faafbb4ae21cd5b31b7149b9a5fbd037", "score": "0.6591695", "text": "function action_edit() {\n $id = required_param('id', PARAM_INT);\n\n $target = $this->get_new_page(array('action' => 'edit'));\n $obj = new $this->data_class($id);\n\n if(!$obj->get_dbloaded()) {\n error('Invalid object id: ' . $id . '.');\n }\n\n $form = new $this->form_class($target->get_moodle_url(), array('obj' => $obj));\n\n if ($form->is_cancelled()) {\n $this->action_view();\n return;\n }\n\n $data = $form->get_data();\n\n if($data) {\n $obj->set_from_data($data);\n $obj->update(); // TODO: create a generalized \"save\" method that decides whether to do update or add\n $target = $this->get_new_page(array('action' => 'view', 'id' => $id));\n redirect($target->get_url(), ucwords($obj->get_verbose_name()) . ' ' . $obj->to_string() . ' updated.');\n } else {\n $this->print_tabs('edit', array('id' => $id));\n $form->display();\n }\n }", "title": "" }, { "docid": "c70cbbbdfd3372e3e7492227dff7246e", "score": "0.6591128", "text": "public function edit($id)\n {\n $model = $this->actClass->find($id);\n return view('admin.actClass.form', compact('model'));\n }", "title": "" }, { "docid": "6560ccaab1f3afa48d06c1b0ef34fde3", "score": "0.65907097", "text": "public function edit (Person $person){\n return view('person/form', ['action'=>'edit', 'data'=>$person]);\n }", "title": "" }, { "docid": "f773c211c125d55f3608be2d87ccf7e1", "score": "0.6586013", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('asociateyaBundle:Emprendedor')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Emprendedor entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('asociateyaBundle:Emprendedor:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "b13cb81e8f51511954801a67cf32d581", "score": "0.65842444", "text": "public function edit() {\n $this->view->isSource = true;\n\n if (!empty($_GET[\"name\"])) {\n $data = $this->model::getByName($_GET['name']);\n $this->view->source = $this->model::getByName($_GET['name']);\n }\n\n if (!empty($_GET['id'])) {\n $data = $this->model::getById($_GET['id']);\n $this->view->isSource = false;\n }\n\n $this->view->setData($data);\n $this->view->setTemplate(EDIT_TEMPLATE);\n $this->view->render();\n\n // No name was given, this needs to be handled.\n }", "title": "" }, { "docid": "70e3eeb150905e8b48dd4b8560cfe424", "score": "0.65827805", "text": "public function edit($id)\n\t{\n\t\t$permission = Company::getPermission();\n if(@$permission->modifica) {\n\t\t\t$company = Company::find($id);\n\t\t\tif(!$company instanceof Company) {\n\t\t\t\tApp::abort(404);\t\n\t\t\t}\t\n\n\t return View::make('core.companys.form')->with(['company' => $company]);\n\t\t}else{\n return View::make('core.denied'); \n }\n\t}", "title": "" }, { "docid": "d7a17764d671a9f5eabc201f61a42daa", "score": "0.6581686", "text": "public function edit($id)\n\t{\n $revendedor = Revendedora::findOrFail($id);\n\n return view('revendedora.edit')->with('revendedor',$revendedor);\n\t}", "title": "" }, { "docid": "5eeda893f9563e6e4d9ef7aac6ef14dd", "score": "0.6579945", "text": "public function edit($id)\n {\n // get the product\n $product = Product::find($id);\n\n // show the edit form and pass the product\n return view()->make('product.editProduct')->with('product', $product);\n }", "title": "" }, { "docid": "996a4dd9944626c012614b35e16435f1", "score": "0.6579931", "text": "public function edit($id){ }", "title": "" }, { "docid": "1e6714a2833c2286fe5202063d157362", "score": "0.6579125", "text": "public function edit($id)\n {\n //\n $person = Person::find($id);\n return view('admin.person.edit',compact('person'));\n\n }", "title": "" }, { "docid": "a651c6517dc564dd0eb52196153145f4", "score": "0.6571035", "text": "public function edit($id)\n {\n $company = Company::find($id);\n\n return view('admin.company.form', [\n 'company' => $company,\n 'route' => ['admin.company.update', $company->id],\n 'method' => 'PUT',\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": "06ec3b32b9b222f39c5dee97c3ecbb36", "score": "0.7939633", "text": "public function create()\n\t{\n\t\treturn view('admin.resource.create');\n\t}", "title": "" }, { "docid": "1e65cd3b7532e9fb4c8629f59550be03", "score": "0.7734893", "text": "public function create()\n\t{\n\t\treturn view('admin.resources.create');\n\t}", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "63ad7fad99855a56a3b8abf3768cf47e", "score": "0.76252395", "text": "public function create()\n {\n return $this->showForm(\"create\");\n }", "title": "" }, { "docid": "139c49a6b5671df4af660eea4515972f", "score": "0.7600047", "text": "public function create()\n {\n return view('resources/form');\n }", "title": "" }, { "docid": "a6c7271eaebfd5b50fc91fc80fb19496", "score": "0.7468657", "text": "public function create()\n\t{\n\t\treturn view('forms.create');\n\t}", "title": "" }, { "docid": "6839a79b61064ed2d6b3c87e3aff015a", "score": "0.7459504", "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.74483985", "text": "public function create()\n {\n //\n return view('resources.create');\n }", "title": "" }, { "docid": "53d013f46afef2a72260a723badd83b2", "score": "0.7388776", "text": "public function ShowForm() {\n return view('create');\n }", "title": "" }, { "docid": "b8d67d3c176a25f495b53af4d1b3e1a3", "score": "0.7346452", "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.73457384", "text": "public function create_new()\n\t{\n\t\treturn View::make('admin.suppliers.create_supplier_form'); \n\t}", "title": "" }, { "docid": "4b843526f491cc00abff867e0dcae2bc", "score": "0.73384815", "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.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "a80df900a28f26c9116cae9aec9ae74b", "score": "0.7249939", "text": "public function create()\n\t{\n\t\treturn view(\"PO.form\");\n\t}", "title": "" }, { "docid": "6e54ebe7445f04b4e2540c09999df2ed", "score": "0.7249304", "text": "public function create()\n\t{\n\t\treturn view(\"retur-pembelian.form\");\n\t}", "title": "" }, { "docid": "7f97efa8cb776b86e66d91838826ac4e", "score": "0.72424", "text": "public function create()\n\t{\n\t\treturn View::make('forms.create');\n\t}", "title": "" }, { "docid": "8832246a5df8f4c7afcc8e46925833e8", "score": "0.72392076", "text": "public function create()\n {\n return view(self::VIEW_PATH_NAME . '.form');\n }", "title": "" }, { "docid": "83219f179e8e94a735c68ba031340531", "score": "0.7238169", "text": "public function create()\n {\n // TODO: return view with form\n }", "title": "" }, { "docid": "6cf89a013084a50bc3817996f9e0c883", "score": "0.72137976", "text": "public function actionCreate()\n {\n $this->renderPartial('form', array('scenario'=>'create'), false, true);\n }", "title": "" }, { "docid": "bff0d963f5957fded51be0c1b9cc5b0d", "score": "0.7155907", "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.7134313", "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.713098", "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.7128814", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "1d24e602d0fddfe9bed3a8265b26b901", "score": "0.7128243", "text": "protected function newAction()\n {\n return $this->renderForm('new');\n }", "title": "" }, { "docid": "da898f34b0c52bea25c9b79c320b2dda", "score": "0.71265686", "text": "public function create()\n {\n return view('paperforms.create');\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": "750adc77c36f18c747b430100ee399b2", "score": "0.7114242", "text": "public function create()\n\t{\n\t\treturn view('supir.create');\n\t}", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "e9b21b0a79fd33b3521e801165da14b6", "score": "0.71004754", "text": "public function create()\n {\n // HTML FORM TO SHOW THE FORM WHERE ROLE CAN BE CREATED\n }", "title": "" }, { "docid": "653c27662115e09b10c289bcc247b0ed", "score": "0.7085364", "text": "public function create()\n {\n return view('backend.Faces.form');\n }", "title": "" }, { "docid": "f95a7ddf5c279983b88920ab48796002", "score": "0.70726883", "text": "public function create()\n {\n return view('asset::Admin/Form');\n }", "title": "" }, { "docid": "44edfc8de23a19733eb2da7dd143c6af", "score": "0.7069517", "text": "public function create()\n {\n return view('backend.pragyansubject.addform');\n }", "title": "" }, { "docid": "aaf039b41e70ea5c5580f174d0a32a5e", "score": "0.70679444", "text": "public function create()\n {\n return view('admin.addnew');\n }", "title": "" }, { "docid": "b5c63b58d384c1cc1e048d0ed39e9059", "score": "0.70607215", "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.7060122", "text": "public function create()\n {\n $data['action'] = 'penjualan.store';\n return view('penjualan.form', $data);\n }", "title": "" }, { "docid": "2a113ccb1bc187d2ab6a5b9b7f32db35", "score": "0.70526356", "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.7052032", "text": "public function create()\n {\n return view('frontend.formulir'); \n }", "title": "" }, { "docid": "91cae3ef8fac8cbaf75c5bcaed69ef7a", "score": "0.7050331", "text": "public function create()\n {\n return view('perjadin.create');\n }", "title": "" }, { "docid": "bb6992f3db8b85054e34d06ac94efe13", "score": "0.70479286", "text": "public function create()\n {\n return view('fish-mgmt/create');\n }", "title": "" }, { "docid": "c064473eb86d48e72f7ffb601c196ae9", "score": "0.70187074", "text": "public function create()\n {\n //\n return view('Partners/Admin/form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "f61bf3a97df7312aaecce2030ad738da", "score": "0.700798", "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.7004277", "text": "public function create()\n\t{\n\t\treturn view('product.new');\n\t}", "title": "" }, { "docid": "6d8ac76b2319312ec6d7c116d3c07dd5", "score": "0.69991225", "text": "public function create()\n {\n return view(\"admin.dokter.form\");\n }", "title": "" }, { "docid": "cd66cdfb79b8372ac27d1bcfeebf98ed", "score": "0.6994213", "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.698434", "text": "public function create()\n {\n return view( 'create' );\n }", "title": "" }, { "docid": "9dcc76daa4540b48df51e0c54a0f942e", "score": "0.6982116", "text": "public function create()\n {\n return view('escola.form');\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.6968916", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "a2b4f48997315d69d4a978b07c86041b", "score": "0.696862", "text": "public function create()\n {\n return view('jamkerja.add');\n }", "title": "" }, { "docid": "3eabc09401aef2dfb0754b7c694a026f", "score": "0.6963395", "text": "public function create()\n\t{\n\t\treturn View::make('phanhois.create');\n\t}", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "12098cfc6ac9ec83d75a978a0c5abde4", "score": "0.6956841", "text": "public function showCreateForm()\n {\n return view('posts.new');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "aaad424e12d96a3efd02522d0acdf881", "score": "0.695643", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "219163df6bc3d5b0129ff62049e525c0", "score": "0.69501215", "text": "public function create()\n {\n return view('example.form');\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.6949657", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "e9d5ae41977e28632b79e3a6a94d5e87", "score": "0.69485426", "text": "public function create()\n {\n return view('Add');\n }", "title": "" }, { "docid": "bab776a4c16cf35a4a18dc0e698ea074", "score": "0.69469535", "text": "public function create()\n {\n return view(\"users.create_form\");\n }", "title": "" }, { "docid": "1c5fb8d39758b496bbe1461e2d19ee6b", "score": "0.6941957", "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.6938155", "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.6929724", "text": "public function create()\n {\n return view('QuanTriVien.form');\n }", "title": "" }, { "docid": "978bcc6315cbc834f3ebe718240ae1d3", "score": "0.6928802", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "f36ee7fce6062ca5f8a13e9136a3aa5f", "score": "0.6926847", "text": "public function create()\n {\n //\n return view('admin.cars.add');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "a93a79fd5f85cdfcd02d43c4b981bd37", "score": "0.6917769", "text": "public function create()\n {\n return view('admin.rehber.create');\n\n }", "title": "" }, { "docid": "d08acefd41013b35198e14cd32167263", "score": "0.6913158", "text": "public function create()\n {\n //\n return view('hod.hod_form');\n }", "title": "" }, { "docid": "efa6db85e06a4cb8b256acb0956225d4", "score": "0.6907753", "text": "public function create()\n\t{\n\t\treturn View::make('student.create');\n\t}", "title": "" }, { "docid": "2d2afb827796ab149976949e6f7f1657", "score": "0.6902585", "text": "public function create()\n\t{\n\t\treturn View::make('penilaians.create');\n\t}", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.68951064", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "aa1b2912cd7ceea8a2b811ee2651b393", "score": "0.68948513", "text": "public function create()\n {\n return view(\"information.create\");\n }", "title": "" }, { "docid": "a097895685f56669e51313d103d810e7", "score": "0.6894119", "text": "public function create()\n {\n return view('sale-cow.form');\n }", "title": "" }, { "docid": "db3a97e80baaa42e7f0f5bbe728a3432", "score": "0.6890917", "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.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "732fe73681252d8413ea359a6e09f8bb", "score": "0.6889954", "text": "public function create()\n {\n //\n return view('cars.new');\n }", "title": "" }, { "docid": "862bc40da984894b74df33cb4c0d4659", "score": "0.68857306", "text": "public function create()\n {\n return view ('anggota-new');\n }", "title": "" }, { "docid": "145cf1b2c8cc73b6dcddfbab958e798f", "score": "0.68844", "text": "public function create()\n {\n return view('ovhapi::create');\n }", "title": "" }, { "docid": "bfb90be64c471e95e334f369a13f5087", "score": "0.6882399", "text": "public function create()\n {\n //\n return view('Admin.Recom.add');\n }", "title": "" }, { "docid": "61dcb96ea6324e696f199e33bd9faa7f", "score": "0.6877785", "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.6877583", "text": "public function create()\n {\n return view('manager.crud.create');\n }", "title": "" }, { "docid": "14cab6c0f95bbfd3db85915cbf823b72", "score": "0.6877049", "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.6876477", "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.68750143", "text": "public function create()\n {\n return view(\"cartera.create\");\n }", "title": "" }, { "docid": "a23b6ed7018a2e2dd2c29907dfbe28e0", "score": "0.6874092", "text": "public function create() {\n\t\treturn view( 'backend.career.create' );\n\t}", "title": "" }, { "docid": "15ba46136d8015267c72f493447d645a", "score": "0.6871153", "text": "public function create()\n {\n return view('materiku::create');\n }", "title": "" }, { "docid": "19bc1da827e1cabb7b0a120ffe2b00ed", "score": "0.6870422", "text": "public function create()\n {\n return view('additive/create');\n }", "title": "" }, { "docid": "e82caa6fdd89369a0306a198d2febd53", "score": "0.6865163", "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.6864961", "text": "public function create()\n {\n return view('turno_new');\n }", "title": "" }, { "docid": "2a71d846a803ec0f01b511570f628c2f", "score": "0.686378", "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.6862573", "text": "public function create()\n\t{\n\t\treturn view('palestra.create');\n\t}", "title": "" }, { "docid": "d46a9ae5fd9725a20632fb60f3ec32f6", "score": "0.6861084", "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.68608975", "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.68597066", "text": "public function create()\n {\n return view('modules.products.form');\n }", "title": "" }, { "docid": "68eac3e9797e63312bcbb06b4b9195ef", "score": "0.6857692", "text": "public function create()\n {\n return view('mineral.create');\n }", "title": "" }, { "docid": "b6cf76e82d6be800a92287cc947f7fa7", "score": "0.68555033", "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": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "06bd5b9d2de3c387032bcbdf5e3cba04", "score": "0.0", "text": "public function handle()\n {\n $transaction = DB::table('transactions')\n ->join('bookings', 'transactions.booking_id', 'bookings.id')\n ->where('transactions.status', '=', 'pending')\n ->whereDate(\"bookings.start_rent\", '<', date('Y-m-d'))\n ->update(['transactions.status' => 'canceled']);\n }", "title": "" } ]
[ { "docid": "e8d4753b2d8e1d1ee8ded47ffb9e94db", "score": "0.6568235", "text": "public function handle()\n {\n $argument = $this->argument('name');\n\n $options = $this->options();\n\n $this->writeRepository($argument,$options);\n\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "f1dc9f7d3b1a40b19f5af781c5386a1e", "score": "0.646844", "text": "public function handle()\n {\n\t\t$this->info('team info fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchTeams($this->argument('sports_id'));\n\t\t$this->info('team saved');\n }", "title": "" }, { "docid": "62bcab17a56f86041fea331fc4f13cc8", "score": "0.6330121", "text": "public function handle()\n {\n $locale = $this->argument('locale');\n\n if (!$this->isSupportedLocale($locale)) {\n return $this->error(\"Unsupported locale: '{$locale}'.\");\n }\n\n $this->displayRoutes($this->getLocaleRoutes($locale));\n }", "title": "" }, { "docid": "bea4ce72d36c7e32b049d376adf70b02", "score": "0.63080674", "text": "public function handle()\n {\n\n $this->module = $this->option('module');\n $this->namespace = $this->option('namespace');\n $this->theme = $this->option('theme');\n\n $this->from = $this->option('from') ?? 'en';\n $this->to = $this->option('to') ?? 'pt-br';;\n\n $result = $this->translate();\n\n $this->info($result);\n }", "title": "" }, { "docid": "c33e73c9107496e00ebd8db2a64970f0", "score": "0.6260605", "text": "public function handle()\n {\n try {\n $user = User::where(['email' => $this->argument('email')])->firstOrFail();\n\n $this->info(User::apiToken($user));\n } catch (ModelNotFoundException $e) {\n $this->error('User with email ' . $this->argument('email') . ' was not found');\n }\n }", "title": "" }, { "docid": "4c94f475d808a4a9b711a81a145d0f74", "score": "0.62453157", "text": "public function handle()\n {\n $tables = explode(',', $this->argument('tables'));\n\n try {\n foreach ($tables as $table) {\n $this->printResult(\n $table,\n $this->file_generator->generateSeedFile($table, $this->suffix)\n );\n }\n } catch (Exception $exception) {\n $this->printResult($table, false);\n }\n }", "title": "" }, { "docid": "61d29f9c30504eaf47f407a3c6dc646f", "score": "0.6228444", "text": "public function handle()\n {\n $department_id = intval($this->option('department_id'));\n $this->syncUsers($department_id);\n }", "title": "" }, { "docid": "d52bd86a0cf922f237c704d1031ea664", "score": "0.62266564", "text": "public function handle()\n {\n $domain = $this->argument('domain');\n\n $folders = [\n 'Actions', 'QueryBuilders', 'Collections', 'Data',\n 'Events', 'Exceptions', 'Listeners', 'Models', 'Rules',\n 'States', 'Observers', 'Subscribers',\n ];\n\n $this->info(sprintf('Making domain %s...', $domain));\n\n foreach ($folders as $folder) {\n $path = base_path('src/Domain/' . $domain . '/' . $folder);\n $this->makeDirectory($path);\n }\n }", "title": "" }, { "docid": "ffecb8519eb1a20232a54a17a2af6e54", "score": "0.6221648", "text": "public function handle()\n {\n $name = $this->argument('name');\n $this->observer($name);\n return 1;\n }", "title": "" }, { "docid": "5f91b5a00a734236afa39e9415c63041", "score": "0.62137747", "text": "public function handle()\n {\n $version = $this->argument(\"version\");\n\t\tMasterDataService::GenerateMasterData($version);\n }", "title": "" }, { "docid": "ba9f3058685731e8fc58762484c37c9c", "score": "0.62096745", "text": "public function handle()\n {\n $result = $this->slugger->decode($this->argument('slug'));\n\n if ($result === null) {\n $this->error('Cannot decode given slug');\n exit(1);\n }\n\n $this->info($result);\n }", "title": "" }, { "docid": "ac9dad3927a7f383651406d39c3a6c7d", "score": "0.62092805", "text": "public function handle()\n {\n $league = $this->argument('league');\n $gc = new GameController;\n $gc->updateScores($league);\n }", "title": "" }, { "docid": "7cef28d272d39f08039a4460f6403a8c", "score": "0.6208157", "text": "public function handle()\n {\n $this->getPath();\n $filename = $this->argument('name') . '.yml';\n\n $this->saveFile($filename);\n }", "title": "" }, { "docid": "61116b1a9c4b66699751751727217fe0", "score": "0.6203288", "text": "public function handle()\n {\n $this->dumpAutoloads($this->option('param'));\n }", "title": "" }, { "docid": "3c59cb8a66a8668366a27acd185d1875", "score": "0.6194018", "text": "public function handle()\n\t{\n\t\t$mp_account = $this->argument('account');\n\t\t$weixin = new Weixin($mp_account);\n\t\t$ips = $weixin->getCallbackIp();\n\n\t\tforeach($ips as $ip)\n\t\t{\n\t\t\t$this->info($ip);\n\t\t}\n\t}", "title": "" }, { "docid": "d6b3e560610f4dd0e40bbdddd4f08296", "score": "0.61892676", "text": "public function handle()\n {\n $this->ucArgument = ucfirst($this->argument('name'));\n $this->loArgument = strtolower($this->argument('name'));\n\n $this->createViewFolder();\n\n $this->getAppliedOptions()\n ->each(function ($used, $action) {\n $this->createForAction($action);\n });\n\n $this->showOutput($this->ucArgument);\n }", "title": "" }, { "docid": "6ed91289ef7ed8b661c6889085b266be", "score": "0.61829144", "text": "public function handle()\n {\n $data = $this->arguments();\n\n $data = $this->validateOptions($data);\n\n $rules = $this->rules($data['userModel']);\n\n $this->validate($data, $rules);\n\n $this->createUser($data) ? $this->info('User created.') : $this->error('Could not save user!');;\n }", "title": "" }, { "docid": "789055e2ed683e2b0d3095de98224c6c", "score": "0.6168161", "text": "public function handle()\n {\n $order = Order::find($this->argument('orderId'));\n\n if (empty($order->email)) {\n $this->output->warning('order not found');\n }\n\n // Customer Email\n Mail::to($order->email)\n ->queue(new OrderPlaced($order));\n }", "title": "" }, { "docid": "e778a90aa2d34c27fb5d220f8da9f4d6", "score": "0.6166627", "text": "protected function fire()\n {\n $name = $this->input->getArgument('name');\n\n $extension = $this->input->getOption('extension');\n\n $table = $this->input->getOption('table');\n\n $create = $this->input->getOption('create');\n\n if (! $table && is_string($create)) {\n $table = $create;\n }\n\n $this->writeMigration($name, $extension, $table, $create);\n }", "title": "" }, { "docid": "2393d8b7b0d8534d2eabc07977e10153", "score": "0.6164974", "text": "public function handle()\n {\n $filename = $this->argument('filename');\n Excel::import(new InventoryImport, $filename);\n $this->info('Inventory Loaded Successfully.');\n }", "title": "" }, { "docid": "251042fd57edd83dd82fd6b79b776586", "score": "0.6144986", "text": "public function handle()\n {\n $this->call('vendor:publish', ['--provider' => FoundationServiceProvider::class]);\n\n foreach ($this->config()->get('arcanesoft.foundation.modules.commands.publish', []) as $command) {\n $this->call($command);\n }\n }", "title": "" }, { "docid": "a28870c5f1126912ab048de7aa0c5510", "score": "0.6144269", "text": "public function handle()\n {\n $name = ucfirst($this->argument('name'));\n $this->createDirectories();\n $content = $this->compileHandlerStub($name);\n $file = app_path('Transformers') . \"/{$name}.php\";\n\n if (! is_file($file)) {\n touch($file);\n file_put_contents($file, $content);\n $this->info('Transformer created successfully.');\n } else {\n $this->error('Transformer already exists!');\n }\n }", "title": "" }, { "docid": "f5c34d875ad7b6b2333fbef98d892f1e", "score": "0.613809", "text": "public function handle()\n {\n $this->components->info(\n 'Access token: ' . Cache::get('fortnox-access-token', 'Missing')\n );\n\n $this->components->info(\n 'Refresh token: ' . Cache::get('fortnox-refresh-token', 'Missing')\n );\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "ed255b4e9da3f8ec47652faa83f4970c", "score": "0.6136454", "text": "public function handle()\n {\n $extension=$this->argument('extension');\n $vcid=$this->option('vcid');\n $gid=$this->option('gid');\n $className=\"App\\\\Babel\\\\Extension\\\\$extension\\\\Synchronizer\";\n $all_data=[\n 'oj'=>$extension,\n 'vcid'=>$vcid,\n 'gid'=>$gid,\n ];\n $Sync=new $className($all_data);\n $Sync->crawlContest();\n }", "title": "" }, { "docid": "ad97d8ddb88ffef86693779f208f5c58", "score": "0.6126826", "text": "public function handle()\n {\n\n // Filter by users: \"existing\" or \"all\"\n if ($this->option('users') === 'existing') {\n $applications = ApplicationCollection::findNewAndReadyForExistingUsers();\n }\n else {\n $applications = ApplicationCollection::findNewAndReady();\n }\n\n foreach ($applications->all() as $application) {\n Automation::handle($application);\n }\n }", "title": "" }, { "docid": "f936c03225fba154708e68f6f9044955", "score": "0.61263657", "text": "public function handle()\n {\n $membershipRepo = new MembershipRepo;\n $membershipRepo->updateAllUserMembership();\n }", "title": "" }, { "docid": "08bfbc376ef3487d35f5be1845559668", "score": "0.61212516", "text": "public function handle()\n {\n $type = $this->argument('type');\n\n switch($type) {\n case \"update\" :\n $this->update();\n break;\n default :\n throw new Exception('Empty type command.');\n break;\n }\n }", "title": "" }, { "docid": "f38911679e3bead4ee0bcbd5685b47d3", "score": "0.6119296", "text": "public function handle()\n {\n\t $competitionId = $this->argument('competitionId');\n\t $competition = Competition::where('id', $competitionId)->firstOrFail();\n $battle = new BattleLogic();\n\t $battle->endRound($competition);\n }", "title": "" }, { "docid": "2bf343e1761f4615be9d9b43be18f813", "score": "0.61191237", "text": "public function handle()\n {\n $tenantSubdomain = $this->arguments('tenant');\n\n $tenantSubdomain = '*';\n\n if(is_null($tenantSubdomain))\n {\n\n $this->warn('You must specify a tenant or <info>*</info> to run for all tenants.');\n\n return;\n\n }\n\n if($tenantSubdomain == '*')\n {\n\n $this->line('*** Running migrations for <info>all</info> tenants ***');\n\n $this->handleTenantMigrations();\n\n }\n else\n {\n\n $this->handleTenantMigrations($tenantSubdomain);\n\n }\n\n }", "title": "" }, { "docid": "7b1706ceb91b475a3906af4b11006651", "score": "0.6118251", "text": "public function handle()\n {\n $arguments = $this->createArguments($this->hasExtraTables(), $this->isForce());\n $this->call('iseed', $arguments);\n $this->info('All good!');\n }", "title": "" }, { "docid": "2396afbd3d94c843e9452787944654d7", "score": "0.6114602", "text": "public function handle()\n {\n $options = [\n 'directory' => $this->option('dir') ? $this->option('dir') : '',\n 'sync' => $this->option('sync') ? true : false, \n 'filter' => $this->option('filter')\n ];\n $generator = new Generator($options);\n $generator->generate();\n }", "title": "" }, { "docid": "822230f2481dd9a6d541e3b92f8cf054", "score": "0.6111587", "text": "public function handle()\n {\n $type = $this->argument('type');\n\n switch($type){\n case \"sync_id\" :\n $this->syncID();\n break;\n\n default :\n throw new Exception('Empty type commaand.');\n break;\n }\n }", "title": "" }, { "docid": "05ffb06638a5749e44d67c3388338662", "score": "0.61085266", "text": "public function handle()\n\t{\n\t\tif ($this->haltOnProduction()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Delete the specified user. Or all users if none was specified.\n\t\tif ($this->argument('user')) {\n\t\t\t$this->info(\"Deleting user {$this->argument('user')}\");\n\n\t\t\tChat::deleteUser($this->argument('user'));\n\n\t\t\t$this->info(\"Deleted user {$this->argument('user')}\");\n\t\t} else {\n\t\t\t$this->info('Deleting all users');\n\n\t\t\t$users = Chat::users();\n\n\t\t\tforeach ($users as $user) {\n\t\t\t\t$user->delete();\n\t\t\t}\n\n\t\t\t$this->info('Deleted all users');\n\t\t}\n\t}", "title": "" }, { "docid": "b1b3e68a60079520bea71d5e82b87d3a", "score": "0.6107528", "text": "public function handle()\n {\n\t\t$name = $this->argument('name');\n\t\t$email = $this->argument('email');\n\t\t$password = $this->argument('password');\n\t\t\n $user = new User();\n\t\t$user->name = $name;\n\t\t$user->email = $email;\n\t\t$user->password = $this->argument('password');\n\t\t$user->email_verified_at = now();\n\t\t$user->save();\n\t\t\n\t\t\\Artisan::call('mosquitto:add-user', [\n\t\t\t'user' \t => strtolower($user->email),\n\t\t\t'pwd' \t => $password\n\t\t]);\n\t\t\n\t\t\\Artisan::call('mosquitto:reload', []);\n\t\t\n }", "title": "" }, { "docid": "2f7a1647790f74f0d4ae2836a32e0713", "score": "0.61006004", "text": "public function handle()\n {\n $task = $this->argument('task_number');\n\n $this->line('-----------------------------------------------------------------');\n $this->line('-------------10pearls Speed Programming Competition--------------');\n $this->line('-----------------------------------------------------------------');\n $this->line('Executing task '.$task.'...');\n $taskMethod = 'execute'.$task;\n $this->$taskMethod();\n }", "title": "" }, { "docid": "cd2af1f8749e77e8e4dd0673022d9d49", "score": "0.6100451", "text": "public function handle()\n {\n $this->info(\"Hello, my dear \" . $this->argument('name'));\n }", "title": "" }, { "docid": "759722a1bb21a6e0fe0a379cab0c5f76", "score": "0.60982513", "text": "public function handle()\n {\n try {\n $this->call('migrate:fresh');\n $this->call('sources:fetch');\n $this->call('words:fetch');\n $this->call('articles:fetch year');\n\n } catch (Exception $e) {\n $this->error(\"An error occurred\");\n }\n }", "title": "" }, { "docid": "80aec4a0fb549f7dec8bd2a0b1eda9b0", "score": "0.6094418", "text": "public function handle()\n {\n\n $settings = SettingsFactory::create();\n $inspector = new Inspector($settings);\n\n $repository = $inspector->getRepositoryByUrl($this->argument('repositoryUrl'));\n\n $inspectedRepository = $inspector->inspectRepository($repository);\n\n $header = array_keys((array)$inspectedRepository[key($inspectedRepository)]);\n\n reset($inspectedRepository['results']);\n array_walk(\n $inspectedRepository['results'],\n function (&$row) {\n $row = $row->toArray();\n }\n );\n\n $this->info($inspectedRepository['remote']);\n $this->table($header, $inspectedRepository['results']);\n }", "title": "" }, { "docid": "5e666695db3868ee33162da9e4c4c3f5", "score": "0.60940516", "text": "public function handle()\n {\n $this->internalCommand->syncNeighbourhoods();\n\n $this->output->writeln(\"Synced all neighbourhoods!\");\n }", "title": "" }, { "docid": "766b2c594138b221fefc5d4f3c48eefd", "score": "0.609366", "text": "public function handle()\n {\n defined('DS') or define('DS', DIRECTORY_SEPARATOR);\n $action = $this->argument('action');\n $funcName = strtolower($action) . 'Action';\n if (method_exists($this, $funcName)) {\n call_user_func([\n $this,\n $funcName\n ]);\n } else {\n $this->error(PHP_EOL . 'No Action Found');\n }\n $this->comment(PHP_EOL . '> DONE !');\n }", "title": "" }, { "docid": "783a6c73ea081ff8126065f1a7c527e2", "score": "0.6092555", "text": "public function handle()\n {\n $user = User::findOrFail($this->argument('userId'));\n\n if (!empty($this->option('password')))\n {\n $newPassword = $user->setPassword($this->option('password'));\n $user->save();\n\n $this->info(\"User #{$user->id} password changed! Password: {$newPassword}\");\n }\n }", "title": "" }, { "docid": "60b98592cd0b7747cb00c7c001eeb459", "score": "0.6088373", "text": "public function handle(): void\n {\n if (!is_string($this->argument('domain'))) {\n $this->error('Domain must be a string');\n exit(1);\n }\n\n $domainIP = gethostbyname($this->argument('domain'));\n\n if ($domainIP !== config('domain.ip1')) {\n $this->error($this->argument('domain').' is not currently pointing to our IP address');\n exit(1);\n }\n\n $this->info('Domain is pointing to our servers!');\n }", "title": "" }, { "docid": "af219c9fef3308117f0d96ec5e509a4a", "score": "0.6084772", "text": "public function handle()\n {\n $name = $this->argument('name');\n switch ($name) {\n case 'order':\n $this->order();\n break;\n default:\n $this->all();\n break;\n }\n }", "title": "" }, { "docid": "a209d75a7e8f20653a0ad3e8be62765a", "score": "0.60826474", "text": "public function handle()\n {\n $this->performStats();\n\n $this->askForDeepStats();\n }", "title": "" }, { "docid": "df0dbf3ff806effd7120c9dc4df986ed", "score": "0.6080008", "text": "public function handle()\n {\n $this->name = $this->argument('name');\n\n if (!$this->name) {\n $this->publishAll();\n\n return;\n }\n\n $this->publish();\n }", "title": "" }, { "docid": "a53b3a8ec186f8dbb658f3283b08980b", "score": "0.6079924", "text": "public function fire()\n {\n exec('./vendor/bin/phpcs --standard=PSR2 -p app/models app/controllers', $output);\n foreach ($output as $line) {\n echo $this->formatLine($line).\"\\n\";\n }\n }", "title": "" }, { "docid": "586e42f29a11cbf126b4187fe4e5b108", "score": "0.6079402", "text": "public function handle()\n {\n $chunk = Chunk::findOrFail($this->argument('chunk'));\n\n if ($this->option('flush')) {\n $this->call('chunk:flush', ['chunk' => $chunk->id]);\n }\n\n $this->call('grid:fill', [\n 'grid' => $chunk->grid->id,\n '-b' => $this->option('batch-size'),\n '--x1' => $chunk->x,\n '--y1' => $chunk->y,\n '--x2' => $chunk->x + $chunk->size -1,\n '--y2' => $chunk->y + $chunk->size -1,\n ]);\n }", "title": "" }, { "docid": "32d331e8a2ba5437fef3b40fb7e832a1", "score": "0.6078335", "text": "public function handle()\n {\n $userId = $this->argument('userId');\n $user = User::find($userId);\n if($user){\n $this->info('User found.');\n $usersController = new UsersController();\n $usersController->unverify($userId);\n }else{\n $this->error('User not found');\n }\n }", "title": "" }, { "docid": "75cd5374b7532c9b1d091a19613e824f", "score": "0.60696614", "text": "public function handle()\n {\n $userId = $this->argument('user');\n \n $user = User::find($userId);\n\n ($user !== null) ?\n $this->info($user->remember_token) :\n $this->error(\"User not found\");\n }", "title": "" }, { "docid": "8af588aa0d993495ec0056fbb9032f00", "score": "0.6067422", "text": "public function handle(): void\n {\n $arg = $this->argument('type');\n $command = $this->argument('command');\n $method = (strpos($command, ':') > 0) ? explode(':', $command)[1] : '';\n\n // Execute Quantical Solutions ReactNative command\n new Listener($this, $method, $arg);\n }", "title": "" }, { "docid": "47a57fde4f3158192100fe464f224ec7", "score": "0.6064985", "text": "public function handle(): void\n {\n $url = $this->option('url') ? $this->option('url') : env('AUCHAN_STORES_URI');\n $apiKey = $this->option('api-key') ? $this->option('api-key') : env('AUCHAN_API_KEY');\n\n $this->info('Running command for parameters:');\n $this->info('uri: ' . $url);\n $this->info('api-key: ' . $apiKey);\n\n try {\n $client = new Client();\n $petrolUpdater = new HttpPetrolUpdater($url, $apiKey, $client);\n $petrolUpdater->update();\n } catch (GuzzleException $e) {\n Log::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "de43bd18b67a8803dabc11ba0907460e", "score": "0.60533565", "text": "public function handle()\n {\n $sourceId = (int) $this->argument('source');\n\n RssFetcher::instance()->fetch($sourceId > 0 ? $sourceId : null);\n }", "title": "" }, { "docid": "f3318003f05fd495c6bcbab941ecbc3b", "score": "0.60476947", "text": "public function handle()\n {\n $operation = $this->argument('operation');\n $users = $this->extractArgument($this->argument('users'));\n $role = $this->argument('role');\n\n switch ($operation) {\n case 'assign':\n $this->assign($users, $role);\n break;\n case 'revoke':\n $this->revoke($users, $role);\n break;\n }\n }", "title": "" }, { "docid": "a23b9953d266d0a27babf1d7723c615b", "score": "0.60445905", "text": "public function handle()\n {\n $model = new Feed();\n $model->insertData($this->argument('key'),$this->argument('date'));\n }", "title": "" }, { "docid": "134b18e439d06c3117f3a0f595318f36", "score": "0.60441995", "text": "public function handle()\n {\n $this->outputLogo();\n $this->outputBrand();\n $this->line('');\n $this->call('admin:list');\n }", "title": "" }, { "docid": "26c8ae91ae7cc88c1c16ae7d3257c015", "score": "0.6044009", "text": "public function handle()\n {\n $this->determineWhatShouldBePublished();\n $from = $this->folderFrom();\n $to = $this->folderTo();\n $this->publishDirectory($from, $to);\n\n $this->info('Publishing complete.');\n }", "title": "" }, { "docid": "8c107db25249f1a8d92469504a9f3b74", "score": "0.6041234", "text": "public function handle()\n {\n $this->info('Importing prices from zKillboard');\n $types = InvType::whereNotNull('marketGroupID')->where('published', true)->pluck('typeID');\n\n foreach ($types as $type) {\n FetchZkillPrice::dispatch($type);\n }\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "c897f4e9369cd2425232b0dd7c066702", "score": "0.603986", "text": "public function handle()\n {\n $activeProjects = Project::active()->get();\n\n foreach ($activeProjects as $project) {\n\n if (is_null($project->base_domains)) {\n continue;\n }\n\n if (trim($project->base_domains) == \"\") {\n continue;\n }\n\n $domains = FileHelper::splitContentByLines($project->base_domains);\n\n $domains = $this->trimDomains($domains);\n $domains = $this->toLowerCase($domains);\n $domains = $this->dropEmptyLines($domains);\n $domains = $this->dropInvalidDomains($domains);\n $domains = array_unique($domains);\n\n if (empty($domains)) {\n continue;\n }\n\n $this->startCommands($project, $domains);\n\n\n }\n }", "title": "" }, { "docid": "af76e6bb7fd2482606a7c0b19259a953", "score": "0.6032584", "text": "public function handle()\n {\n $start = $this->argument('start');\n $offset = $this->argument('offset');\n $this->protokol->refreshPhotos($start,$offset);\n }", "title": "" }, { "docid": "6dd00368a75c43496b4836c4151d94bd", "score": "0.603153", "text": "public function handle()\n {\n $class = $this->argument('model');\n\n $model = new $class;\n\n $model::removeAllFromSearch();\n\n $this->info('All ['.$class.'] records have been flushed.');\n }", "title": "" }, { "docid": "ecc3d739ead384352d4aa5ad081388ec", "score": "0.6030278", "text": "public function handle()\n {\n /** @var League $league */\n $league = League::find($this->argument('league'));\n if($league->phases->count() == 0) {\n $league->generatePhases();\n }\n }", "title": "" }, { "docid": "a2a10e3c47c4ca3a859d716e4cc0f2c1", "score": "0.6030235", "text": "public function handle()\n {\n $botService = app('BotService');\n $messages = $botService->getLastMessage();\n\n die(var_dump($botService->runCommand($messages)));\n }", "title": "" }, { "docid": "aff67ed152aa51c6b2f46969f424e5c8", "score": "0.6027286", "text": "public function handle()\n {\n if($this->argument('option') == 'permissions'){ \n $accounts= Account::all();\n $this->updateTenants($accounts); \n }\n }", "title": "" }, { "docid": "8080b2c772dfa288de282de46026ea0f", "score": "0.60224295", "text": "public function handle()\n {\n\n $startDate = date('Y-m-d H:i:s');\n echo \"Starting to export the analysis page at \". $startDate . \" \\n\";\n\n ChartOps::saveAnalysisTemplate();\n\n echo \"\\n\\n...started exporting the analysis page at \" . $startDate . \"\\n\";\n echo \"Finished at \". date('Y-m-d H:i:s') . \" \\n\\n\";\n }", "title": "" }, { "docid": "9fe8cf74fb9a5d13f57dff721cf6fcb2", "score": "0.6019694", "text": "public function handle()\n {\n //\n $this->getUsers();\n }", "title": "" }, { "docid": "70930d7fb87a0bde3a359111539e358a", "score": "0.6018633", "text": "public function handle()\n {\n Log::info('Execution of command ' . $this->name . ' started.');\n $this->portalUserDonorCategoryService->updatePortalUserCategoryAll();\n Log::info('Execution of command ' . $this->name . ' succesfully finished.');\n\n }", "title": "" }, { "docid": "b3653a8e9083148502ce44d9dc1733df", "score": "0.60171884", "text": "public function handle()\n {\n $raffleSlug = $this->argument('raffle');\n\n $raffle = Raffle::whereSlug($raffleSlug)->firstOrFail();\n\n $status = $this->argument('status');\n\n $hash = $this->argument('hash');\n\n $purchase = $raffle->purchases()->whereHash($hash)->firstOrFail();\n\n $this->markPurchase($purchase, $status);\n }", "title": "" }, { "docid": "eb2934cefa7199128e708688e08b94ac", "score": "0.6016534", "text": "public function handle()\n {\n $file = $this->argument('file');\n require($file);\n }", "title": "" }, { "docid": "1d34717f1af29ac1ca61bc7caf9cc8b2", "score": "0.6012463", "text": "public function handle()\n {\n $userDetails = $this->input->getOptions();\n\n try {\n $this->assertNotEmpty($userDetails, 'password');\n $this->assertNotEmpty($userDetails, 'email');\n $this->assertNotEmpty($userDetails, 'username');\n\n $user = User::create([\n 'name' => $userDetails['username'],\n 'email' => $userDetails['email'],\n 'password' => bcrypt($userDetails['password']),\n ]);\n\n $this->info($user->toJson());\n } catch (InvalidArgumentException $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "d4ae467c005187352dfea2c8a60e2250", "score": "0.60051507", "text": "public function handle()\n {\n if ($this->argument('tenant') && $this->argument('tenant') != 'all') {\n\n $tenant = Company::find($this->argument('tenant'));\n $this->info(\"Refreshing migrations for - {$tenant->name}, DB - {$tenant->database}\");\n tenant_connect($tenant->hostname, $tenant->username, $tenant->password, $tenant->database);\n tenant_refresh_migrate();\n }\n else {\n\n $tenants = Company::all();\n\n foreach ($tenants as $tenant) {\n $this->info(\"Refreshing migrations for - {$tenant->name}, DB - {$tenant->database}\");\n tenant_connect($tenant->hostname, $tenant->username, $tenant->password, $tenant->database);\n tenant_refresh_migrate();\n }\n }\n }", "title": "" }, { "docid": "363d69ff915db562695ba15d53243ce8", "score": "0.60030437", "text": "public function handle()\n {\n $this->openViaBuiltInStrategy($this->getRepoUrl() . '/pulls');\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "7a8ff56bb91924cba52e13bf9bbeda09", "score": "0.6000424", "text": "public function handle()\n {\n // including global constants\n include_once(app_path().'/constants.php');\n\n $function = $this->argument(\"1\");\n $argument = $this->argument(\"2\");\n\n $cron = new CronMethods;\n $output = call_user_func_array(array( $cron, $function), array($argument));\n\n $this->info($output);\n\n\n }", "title": "" }, { "docid": "84e7464d9b69572e63e0d23a0ac9d27b", "score": "0.60002387", "text": "public function handle()\n {\n $user = new User();\n $user->email = $this->argument('email');\n $user->password = $this->argument('password');\n $user->save();\n\n $this->line('User created!');\n }", "title": "" }, { "docid": "39cbe531b42f80c7ccb453113337a153", "score": "0.5996153", "text": "public function handle()\n {\n $entity = ucfirst($this->argument('entity'));\n $this->info($entity);\n \\DB::statement(\"\n DELETE metros FROM metros\n JOIN markers ON markers.id = metros.marker_id\n WHERE markers.markerable_type = 'App\\\\\\Models\\\\\\\\$entity'\n \");\n $this->info('Getting markers...');\n $markers = Marker::where('markerable_type', \"App\\Models\\\\$entity\")->get();\n\n $this->info(count($markers) . \" markers found. Creating metros...\");\n foreach($markers as $marker) {\n $marker->createMetros();\n }\n }", "title": "" }, { "docid": "7c99012f238cd36a9123f817bc8eaa0d", "score": "0.59915507", "text": "public function handle()\n {\n $command = implode(' ', (array) $this->argument('name'));\n $method = 'util'.studly_case($command);\n\n $methods = preg_grep('/^util/', get_class_methods(get_called_class()));\n $list = array_map(function ($item) {\n return \"october:\".snake_case($item, \" \");\n }, $methods);\n\n if (!$this->argument('name')) {\n $message = 'There are no commands defined in the \"util\" namespace.';\n if (1 == count($list)) {\n $message .= \"\\n\\nDid you mean this?\\n \";\n } else {\n $message .= \"\\n\\nDid you mean one of these?\\n \";\n }\n\n $message .= implode(\"\\n \", $list);\n throw new \\InvalidArgumentException($message);\n }\n\n if (!method_exists($this, $method)) {\n $this->error(sprintf('Utility command \"%s\" does not exist!', $command));\n return;\n }\n\n $this->$method();\n }", "title": "" }, { "docid": "b4449da4a2d1903552951d85fe45892d", "score": "0.59902424", "text": "public function handle()\n { \n $this->setReplacement();\n \n if (! \\File::isDirectory($this->storageDirectory)) {\n \\File::makeDirectory($this->storageDirectory);\n } \n\n $this->makeBaseRepo();\n\n $this->makeModelRepo();\n\n $this->comment(PHP_EOL.'CRUDED IT'.PHP_EOL);\n }", "title": "" }, { "docid": "0e2ae934e0bb98f01fc86e49c1beea02", "score": "0.5988462", "text": "public function handle()\n {\n $this->getArguments(); \n\n $this->call('make:model', [\n 'name' => 'Models/'.$this->model->singular_camel,\n '--migration' => true,\n ]); \n \n $this->call('make:factory', [\n 'name' => $this->model->singular_camel.'Factory'\n ]);\n\n $this->call('make:seeder', [\n 'name' => $this->model->singular_camel.'Seeder'\n ]);\n }", "title": "" }, { "docid": "29c1d4228af2c490fcfab88259a501d9", "score": "0.5988065", "text": "public function handle()\n {\n $fileContents = $this->filesystem->get(\n $this->laravel->basePath().'/'.$this->option('file')\n );\n\n $this->export($fileContents);\n }", "title": "" }, { "docid": "cb094e0ca1f915403b091cd3f0493ebd", "score": "0.5985329", "text": "public function handle()\n {\n File::cleanDirectory(storage_path('app/public'));\n $this->line('Cleaned storage.');\n\n $this->call('migrate:fresh');\n\n $this->call('fjord:install');\n\n $this->call('dump:load');\n\n $this->call('db:seed');\n }", "title": "" }, { "docid": "66b276df097014badc1a12fa660d6aad", "score": "0.598039", "text": "public function handle()\n {\n try{\n $this->execute_command($this->argument('filename'));\n }catch (\\Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "e8f4a205a3606fc80a0991238a58ca8a", "score": "0.59749043", "text": "public function handle()\r\n {\r\n //暂时注释掉\r\n\r\n $account_name = $this->argument('accountName'); //渠道名称\r\n\r\n if($account_name == 'all'){\r\n $channel = ChannelModel::where('api_type','=','ebay')->first();\r\n $accounts = $channel->accounts;\r\n foreach ($accounts as $account){\r\n $driver = Channel::driver($account->channel->api_type, $account->api_config);\r\n $case_lists = $driver->getCases();\r\n }\r\n }else{\r\n $account = AccountModel::where('account',$account_name)->first();\r\n if(is_object($account)){\r\n $channel = Channel::driver($account->channel->api_type, $account->api_config);\r\n $case_lists = $channel->getCases();\r\n }else{\r\n $this->comment('account num maybe worng.');\r\n }\r\n }\r\n }", "title": "" }, { "docid": "91bb50768115c16d09b71ebc7ab9e124", "score": "0.59740186", "text": "public function handle()\n {\n $this->init();\n $this->validateArguments();\n \n $this->create();\n\n $this->info('Updating configurations...');\n $this->updateConfig();\n\n $this->info('Repository created successfully');\n }", "title": "" }, { "docid": "93485d3ccd0f54480f41893378ccec1b", "score": "0.5972108", "text": "public function handle()\n {\n if ($this->option('id') != null) {\n $this->info('Fetching attendees by ID(s)...');\n $users = User::find(explode(',', $this->option('id')));\n\n $this->universityID = 'misc';\n\n } elseif ($this->option('university') != null) {\n $this->universityID = $this->option('university');\n\n $this->info('Fetching attendees from university ID: '. $this->universityID . '...');\n\n $users = $this->userRepository->getUsersByUniversityID($this->universityID);\n }\n\n if (! isset($users) || $users->count() == 0) {\n $this->info('No record found. No further action is required.');\n return;\n }\n\n $this->info('Done! ' . $users->count() . ' records found.');\n\n if (! is_dir($this->cardStorageDir())) {\n $this->info('Card storage directory is not existed. Create one now...');\n\n mkdir($this->cardStorageDir(), 0777, true);\n }\n\n $this->info('Generating cards. This will take sometime.');\n\n $progressBar = $this->output->createProgressBar($users->count());\n\n set_time_limit(6000);\n\n $progressBar->setFormat(' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%');\n\n $progressBar->display();\n\n $users->each(function ($user) use ($progressBar) {\n $this->generateCard($user);\n $progressBar->advance();\n });\n\n $this->output->newLine();\n\n $this->info('Done! All cards are saved at ' . $this->cardStorageDir());\n }", "title": "" }, { "docid": "cb5eeb2682e5265bdf571996a9c280e0", "score": "0.59678584", "text": "public function handle()\n {\n $language = $this->argument('language');\n\n $jsonLanguageFile = resource_path(\"lang/vendor/nova/{$language}.json\");\n\n if (!File::exists($jsonLanguageFile) || $this->option('force')) {\n File::copy(__DIR__ . '/../../resources/lang/en.json', $jsonLanguageFile);\n }\n }", "title": "" }, { "docid": "c8480f4e1d94284599ef7f5c233c5dbc", "score": "0.5962639", "text": "public function handle()\n {\n $body = $this->formatBody($this->argument('body'));\n\n $date = Carbon::parse($this->argument('datetime'));\n\n $tweet = 'Earthquake alert! Near '.$this->formatLocation($body['Location']).' '.$date->diffForHumans().\". \\n\".\n 'Magnitude '.$body['Magnitude'].', depth of '.$body['Depth'].\". \\n\".\n 'UKGS: '.$this->formatLink().\"\\n\".\n 'Map: '.$this->formatGmap();\n \n $this->call('tweet:send', ['tweet' => $tweet]);\n }", "title": "" }, { "docid": "28369da0ca0505d1bc95f82e81281188", "score": "0.59623086", "text": "public function handle()\n {\n $commandName = $this->argument('name');\n $arguments = $this->argument('arguments');\n\n $method = 'util'.studly_case($commandName);\n\n $methods = preg_grep('/^util/', get_class_methods(get_called_class()));\n $list = array_map(function ($item) {\n return \"pc:\".snake_case($item, \" \");\n }, $methods);\n\n\n if (!$commandName) {\n $message = 'There are no commands defined.';\n $message .= \"\\n\\nDid you mean one of these?\\n \";\n $message .= implode(\"\\n \", $list);\n throw new \\InvalidArgumentException($message);\n }\n\n if (!method_exists($this, $method)) {\n $this->error(sprintf('Utility command \"%s\" does not exist!', $commandName));\n return;\n }\n\n $this->$method($arguments);\n }", "title": "" }, { "docid": "24f46b8a810cb33c8ed1e79807719c33", "score": "0.59610045", "text": "public function handle()\n {\n $this->info('-------------Getting Expired result----------');\n\t\t$now = Carbon::now()->timestamp;\n\t\t$items = Game::get_expiredresult($now);\n\t\tif ($items)\n\t\t{\n\t\t\t$this->info('-------------Data Found----------');\n\t\t\t\n\t\t\tGame::archive_data($items);\n\t\t\t$this->info('-------------Data Archived----------');\n\t\t}\n\t\t$this->info('-------------Delete Archived result from Main Table----------');\n\t\t//delete old data\n\t\tGame::clean_expiredresult($now);\n }", "title": "" }, { "docid": "b6219d2fa0482d6ed1a70612b6c2ffd1", "score": "0.596041", "text": "public function handle()\n {\n $details = $this->getDetails();\n $admin = $this->user->createAdmin($details);\n $this->display($admin);\n }", "title": "" }, { "docid": "313051fdfc558f16639e138357fbedbf", "score": "0.5959903", "text": "public function handle()\n {\n $name = $this->argument('name');\n $email = $this->argument('email');\n $password = $this->argument('password');\n\n $this->info('Generating API key...');\n do\n {\n $key = str_random(32);\n } while(User::where('apikey', $key)->count() > 0);\n\n $this->info('Saving user...');\n $user = new User;\n $user->name = $name;\n $user->email = $email;\n $user->password = Hash::make(empty($password) ? str_random() : $password);\n\n $user->apikey = $key;\n $user->save();\n\n $this->info('Done!');\n $this->info(\"Generated API key is '$key'\");\n }", "title": "" }, { "docid": "c405beef2e2428e8379138104ad7669d", "score": "0.59597695", "text": "public function handle()\n {\n $this->publishAssets();\n $this->publishConfigs();\n $this->copyNavigationView();\n $this->copyMigrationFiles();\n $this->copyThirdPartyMigrationFiles();\n\n if ($this->confirm(\"Add admin's guard and provider to auth config file?\")) {\n $this->addAdminsGuardToConfigFile();\n }\n\n if ($this->confirm('Run migrations?')) {\n $this->call('migrate');\n }\n\n $this->info('Completed');\n }", "title": "" }, { "docid": "42257f3669b3c1d99748282fc7da9e17", "score": "0.59581715", "text": "public function handle()\n {\n $this->call('rocXolid:generate:file', [\n 'package' => $this->argumentPackage(),\n 'name' => $this->argumentName(),\n '--type' => strtolower($this->type), // settings type\n '--plain' => $this->optionPlain(), // if plain stub\n '--force' => $this->optionForce(), // force override\n '--stub' => $this->optionStub(), // custom stub name\n '--name' => $this->optionName(), // custom name for file\n ]);\n }", "title": "" }, { "docid": "d575860a71338070dbe7c7b100c3e0e6", "score": "0.5957021", "text": "public function handle()\n {\n $this->info('Publishing DWV configuration file.');\n $this->call('vendor:publish', [\n '--provider' => DWVServiceProvider::class,\n '--tag' => 'config'\n ]);\n $this->output->success('Configuration file published!');\n }", "title": "" }, { "docid": "3b4bdc7662845e8331f13ffe14d4a1d0", "score": "0.5955104", "text": "public function handle()\n {\n $sponsorId = $this->argumentsSponsorId();\n\n // {\"permissions->smart2::spot_prices::view->contract->start\": \"2012-10-10 00:00:00\",\"permissions->smart2::spot_prices::view->contract->end\": \"2012-10-10 23:59:59\"}\n $updatePermissions = $this->argumentsUpdatePermissions();\n\n $this->confirmApply('update', [\n 'sponsor_id: ' . $sponsorId,\n 'update_permissions: ' . json_encode($updatePermissions, JSON_PRETTY_PRINT),\n ]);\n\n $sponsorRole = SponsorRole::findOrFail($sponsorId);\n $sponsorRole->forcefill($updatePermissions)->save();\n\n $this->infoApplied();\n }", "title": "" }, { "docid": "e2c3594a7add92d15f359ba8cfe659b1", "score": "0.5955079", "text": "public function handle()\n {\n $this->info('Recheck FullContacts by ClusterPoint model');\n\n $this->info('undefined');\n $clusterPersons = $this->performExtract(Persons::where('typeof(fullcontact)' , 'undefined')\n ->limit(100));\n\n $this->info('202');\n $clusterPersons = $this->performExtract(Persons::where('CONTAINS(\"status:202\")')\n ->limit(100));\n $this->info('404');\n $clusterPersons = $this->performExtract(Persons::where('CONTAINS(\"status:404\")')\n ->limit(100));\n }", "title": "" }, { "docid": "4925133b0abc72912834b00abfcf1d9c", "score": "0.59511536", "text": "public function handle()\n {\n $userId = $this->argument('user');\n\n $count = Data::where('created_at', '>=', \\Carbon\\Carbon::now()->subHour())->count('id');\n $user = User::findOrFail($userId);\n $details = [\n 'greeting' => 'Hi '.$user->name,\n 'body' => 'in the last hour has been created '.$count.' Items Successfully',\n 'thanks' => 'Thank you for using HQRentalApp!',\n 'actionText' => 'View Items',\n 'actionURL' => url('/data')\n ];\n Notification::send($user, new HourlyReport($details));\n }", "title": "" }, { "docid": "d70d7f76d9dca3e355a823b693eb5629", "score": "0.5950625", "text": "public function handle()\n {\n $this->checkForInputs();\n\n $this->addPackageRepositoryToRootComposer();\n $this->addPackageToRootComposer();\n $this->updateComposer();\n\n $this->call('package:save', [\n 'namespace' => ucfirst($this->vendor).'\\\\'.ucfirst(Str::camel($this->packageName)),\n 'path' => $this->path,\n ]);\n }", "title": "" }, { "docid": "ec2e94a769e710cd6b0ca24f72102c79", "score": "0.594983", "text": "public function handle()\n {\n $base=__DIR__.DIRECTORY_SEPARATOR;\n $this->getSpellsFromCsv($base.$this->file_build_path(\"..\",\"..\",\"..\", \"resources\", \"csv\", \"spell_csv.csv\"));\n }", "title": "" }, { "docid": "d22db3e30a599170754e498312b4660b", "score": "0.59496236", "text": "public function handle()\n {\n $this->info('Start...');\n\n $platforms = PlatformModel::all();\n\n foreach ($platforms as $key => $value) {\n \n $value->description = str_replace('cm3', 'cm³', $value->description);\n\n $value->description = str_replace('in3', 'in³', $value->description);\n\n $value->save();\n }\n\n $this->info('Success!');\n\n }", "title": "" }, { "docid": "1243ba2c91b01edaab2de8198f7da325", "score": "0.59488636", "text": "public function handle()\n {\n $runZipLinker = $this->option('zip');\n $runGlobus = $this->option('globus');\n $setupMigratedPublishedDatasetsAction = new SetupMigratedPublishedDatasetsAction();\n $setupMigratedPublishedDatasetsAction($runZipLinker, $runGlobus);\n }", "title": "" }, { "docid": "4454bfd97c1d39682f93e361a13c9a4f", "score": "0.5948772", "text": "public function handle()\n {\n // Load Available Commands\n $this->loadAvailableCommandNames();\n \n // Get commands to execute\n $commandsToExecute = $this->getCommandsToExecute();\n \n //dd($commandsToExecute);\n \n // Execute Commands\n foreach($commandsToExecute as $cmd)\n {\n $this->callIfExists($cmd);\n }\n }", "title": "" }, { "docid": "904dee8c7a02fbeb71846c0dbbcd9c21", "score": "0.59481466", "text": "public function fire() {\n switch ($this->option('fileType')) {\n case 'json':\n $this->fileJson->run($this->argument('filePath'), $this->option('baseUrl'));\n break;\n case 'csv':\n $this->info('Implementation is in progress.');\n break;\n }\n }", "title": "" } ]
54c78b0e4bc1a0981be7ca3932c84b45
Removes the meta data associated with this content.
[ { "docid": "24c2ebda80d89019616684ecc9317f25", "score": "0.6418151", "text": "public function removeMetaData(string $meta_name)\n {\n /** @var ContentMeta $meta_data */\n foreach ($this->meta_data as $meta_data) {\n if ($meta_data->getName() === $meta_name) {\n $this->meta_data->removeElement($meta_data);\n }\n }\n return $this;\n }", "title": "" } ]
[ { "docid": "00608811735bd4d9c7a69a578d062e3e", "score": "0.6765098", "text": "public function db_remove_meta_protected() {\n\n\t\t\t$this->meta_protected = array();\n\t\t}", "title": "" }, { "docid": "57b09da8ada23bc8b4bad772db422f23", "score": "0.65932906", "text": "public function delMetadata()\n {\n }", "title": "" }, { "docid": "38f17cbb9346d519b8aec071d980c5e5", "score": "0.6520989", "text": "public function remove_post_type_entry_meta() {\n\t\t\tif ( $this->is_post_type() ) {\n\t\t\t\tWPS\\remove_post_type_entry_meta();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "05669ae16e9cb893984d93807b8299e0", "score": "0.6508776", "text": "public static function remove_meta($handle = null)\n {\n // Remove all\n if ($handle === null)\n {\n self::$_meta_data = array();\n return;\n }\n\n unset(self::$_meta_data[$handle]);\n }", "title": "" }, { "docid": "4a4cad3853f8a4ecbdfe35bcf9638206", "score": "0.6332349", "text": "function delete_meta( $affiliate_id = 0, $meta_key = '', $meta_value = '' ) {\n\t\treturn delete_metadata( 'affiliate', $affiliate_id, $meta_key, $meta_value );\n\t}", "title": "" }, { "docid": "c631b8fe5804a367599170d5cab1b5dd", "score": "0.6306964", "text": "function my_remove_post_meta_boxes() {\n\t\tremove_meta_box( 'postimagediv', 'page', 'side' );\n\t\n\t\t/* Page attributes meta box. */\n\t\t//remove_meta_box( 'pageparentdiv', 'page', 'side' );\n\t}", "title": "" }, { "docid": "3bde030d4d81ae430ae1518c661c5769", "score": "0.62604916", "text": "protected function prune_post_meta() {\n\t\tglobal $wpdb;\n\t\t$meta_keys = array( \n\t\t\t'_extmedia-duration', \n\t\t\t'_extmedia-youtube', \n\t\t\t'_thumbnail_id', \n\t\t\t'_wp_old_slug' ,\n\t\t\t'_wp_page_template', \n\t\t\t'_wp_trash_meta_status',\n\t\t\t'_wp_trash_meta_time', \n\t\t);\n\t\tforeach ( $meta_keys as $meta_key ) {\n\t\t\t$prepared_sql = $wpdb->prepare( \"SELECT COUNT(*) AS count, post_id, meta_key, meta_value FROM $wpdb->postmeta WHERE meta_key = %s GROUP BY post_id, meta_key, meta_value HAVING count > 1\", $meta_key );\n\t\t\t$metas = $wpdb->get_results( $prepared_sql );\n\t\t\tforeach ( $metas as $meta ) {\n\t\t\t\tif ( $meta->count < 2 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$prepared_sql = $wpdb->prepare( \"DELETE FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s AND meta_value = %s LIMIT %d\", $meta->post_id, $meta->meta_key, $meta->meta_value, (int) $meta->count - 1 );\n\t\t\t\t$wpdb->query( $prepared_sql );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cb26727436abf2030ff8029c2d0e8928", "score": "0.617494", "text": "function remove_dashboard_meta() {\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n}", "title": "" }, { "docid": "b7cec3916ea1bf4745967f9ac90d2524", "score": "0.6174466", "text": "function qa_db_postmeta_clear($postid, $key)\n{\n\tqa_db_meta_clear('postmetas', 'postid', $postid, $key);\n}", "title": "" }, { "docid": "861d1d9ade202dc66b10726330523364", "score": "0.6163854", "text": "function unset_meta_tag($name)\n {\n unset($this->tags->$name);\n }", "title": "" }, { "docid": "9f07a03c93fcab945b5b21280520aa45", "score": "0.6157538", "text": "function qa_db_tagmeta_clear($tag, $key)\n{\n\tqa_db_meta_clear('tagmetas', 'tag', $tag, $key);\n}", "title": "" }, { "docid": "c4a21e475b41fab707327a3598ecdbfb", "score": "0.6098362", "text": "public static function delete_meta( $object_id, $meta_key, $meta_value = '' );", "title": "" }, { "docid": "36b088fed036a4afdb917c5fb60ec403", "score": "0.6094088", "text": "function removeMeta($collectionID, $meta, $metaGBID)\n {\n\n $metaID = ucfirst($meta) . 'ID';\n\n // get MetaID from GBID\n $query = $this->db->get_where($meta . 's', array('GBID' => $metaGBID));\n if ($query->num_rows() == 1) {\n $row = $query->first_row();\n\n $this->db->where('CollectionID', $collectionID);\n $this->db->where($metaID, $row->$metaID);\n $this->db->delete('collection' . ucfirst($meta));\n }\n }", "title": "" }, { "docid": "988d99b528ab38944d0b268c62510a8c", "score": "0.60848296", "text": "function presscore_turn_off_custom_fields_meta() {\n\n\t\t/**\n\t\t * Custom fields significantly increases db load because of theme heavily uses meta fields. It's a simplest way to reduce db load.\n\t\t */\n\t\tremove_post_type_support( 'post', 'custom-fields' );\n\t\tremove_post_type_support( 'page', 'custom-fields' );\n\t}", "title": "" }, { "docid": "b7978157bbf45a9ccfcf1ebdf0fd85b4", "score": "0.60669875", "text": "function ewf_removeMetaCustomFields() {\r\n\t\tif (EWF_LAYOUT_SIDEBARS){\r\n\t\t\tremove_meta_box( 'postcustom', 'page', 'normal' ); \r\n\t\t\t}\r\n\t\t\r\n\t\tif (EWF_LAYOUT_FOOTER){\r\n\t\t\t\r\n\t\t\t}\r\n\t}", "title": "" }, { "docid": "b5ffab65324feb952f695784c341e854", "score": "0.60628706", "text": "function remove_dashboard_meta() {\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\n}", "title": "" }, { "docid": "85db60c012606679f21db89569f8baa6", "score": "0.6038417", "text": "public function delete_meta( &$object, $meta ) {\n\t\tdelete_metadata_by_mid( $this->meta_type, $meta->id );\n\t}", "title": "" }, { "docid": "ff469650250adf70615e6624af9a542a", "score": "0.602619", "text": "public function unsetMetaData($name, $http_equiv = false)\n {\n if ($http_equiv == true) {\n unset($this->_metaTags['http-equiv'][$name]);\n } else {\n unset($this->_metaTags['standard'][$name]);\n }\n }", "title": "" }, { "docid": "e9e4e02f8544f83c2ef0ada3b3660218", "score": "0.6021928", "text": "function remove_page_attribute_meta_box() {\n remove_meta_box('pageparentdiv', 'page', 'normal');\n }", "title": "" }, { "docid": "5a2dceb37a116fdc10708f3671ba5a85", "score": "0.59872055", "text": "public function remove(string $name): MetaInformation\n {\n\t\tunset($this->metaData[$name]);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3c7a8530b678f65ad46bbd28f6bf828f", "score": "0.5963951", "text": "public function removeMetaProperty($name)\n {\n unset($this->metaProperties[$name]);\n }", "title": "" }, { "docid": "e7973e9f9c5e007e93f1d40332b64fc4", "score": "0.59627306", "text": "public function kmk_unlink_meta_file() {\n\t\tglobal $wpdb;\n\t\tif ( $_POST[ 'data' ] ) {\n\t\t\t$data = explode( '-', $_POST[ 'data' ] );\n\t\t\t$att_id = $data[0];\n\t\t\t$post_id = $data[1];\n\t\t\twp_delete_attachment( $att_id );\n\t\t}\n\t\tdie(1);\n\t}", "title": "" }, { "docid": "fe5194e2fab50f4581a31a748273f8ce", "score": "0.5953469", "text": "public function remove_metabox() {\n\t\t\tremove_meta_box( 'mymetabox_revslider_0', 'vc_grid_item', 'normal' );\n\t\t\tremove_meta_box( 'mymetabox_revslider_0', 'templatera', 'normal' );\n\t\t}", "title": "" }, { "docid": "5671fed75d084cb4a4eb57ae91be2ca2", "score": "0.59298986", "text": "function ch5_hcf_remove_custom_fields_metabox() {\n\tremove_meta_box( 'postcustom', 'post', 'normal' );\n\tremove_meta_box( 'postcustom', 'page', 'normal' );\n}", "title": "" }, { "docid": "8fe5070882a21775ab42e757638e5fc4", "score": "0.59156597", "text": "function remove_dashboard_meta() {\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n\t//remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n\t//remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n\tremove_meta_box( 'wpseo-dashboard-overview', 'dashboard', 'normal' );\n\t//remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\n}", "title": "" }, { "docid": "21b7e227f7c4648338ef9448e84c874e", "score": "0.58950293", "text": "public function _oldClearMetadataCache()\n\t{\n\t\t$runtime_cache = new waRuntimeCache('db/'.$this->table);\n\t\t$runtime_cache->delete();\n\t\t$cache = new waSystemCache('db/'.$this->table);\n\t\t$cache->delete();\n\t\t$this->fields = null;\n\t\treturn $this->getMetadata();\n\t}", "title": "" }, { "docid": "9107bb3ace96eed348a497d688048fc7", "score": "0.58796257", "text": "function remove_dashboard_meta() {\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'normal' ); // WP News\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quick Draft\n\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); // At a Glance\n\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal'); // Activity\n\tremove_action( 'welcome_panel', 'wp_welcome_panel' ); // Welcome\n\t// remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n\t// remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n\t// remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n\t// remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n\t// remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n}", "title": "" }, { "docid": "907b3948303305d8ea19f534743e110d", "score": "0.58775187", "text": "public static function removeMetaBoxes() {\n $meta_boxes = static::buildMetaBoxArray();\n if (!isset(static::$mb_cap) || !current_user_can(static::$mb_cap)) {\n foreach ($meta_boxes as $meta_box) {\n remove_meta_box($meta_box['id'], $meta_box['page'], $meta_box['context']);\n }\n }\n }", "title": "" }, { "docid": "af5fe61eda509c16ac1213181d31161d", "score": "0.58300614", "text": "function board_agenda_front_genesis_meta() {\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\n\t\t//* Remove the post content (requires HTML5 theme support)\n\t\tremove_action( 'genesis_entry_content', 'genesis_do_post_content' );\n\n\t\t//add_action( 'genesis_entry_content', 'sanders_front_content' );\n\t\tadd_action( 'genesis_loop', 'board_agenda_add_resource_template' );\n\n\t\tadd_action('genesis_before_footer','board_agenda_front_latest_insight',1);\n\n}", "title": "" }, { "docid": "18bcaa8c7f493449d0cb5dcdce049136", "score": "0.582378", "text": "public function remove_agency_meta_box()\n {\n foreach ($this->object_types as $object) {\n remove_meta_box('agencydiv', $object, 'normal');\n }\n }", "title": "" }, { "docid": "00e7adecfb5549e591c68ee08e06809b", "score": "0.58020717", "text": "public function remove_yoast_seo() {\n add_action( 'admin_head', function(){\n remove_meta_box('wpseo_meta', $this->cpt, 'normal');\n }, 11 );\n }", "title": "" }, { "docid": "1abbb13922daf715008f1e7a94d9012a", "score": "0.57786614", "text": "function remove_meta_boxes(){\n remove_meta_box('jobboard-tax-locationsdiv', 'jobboard-post-jobs', 'side');\n }", "title": "" }, { "docid": "ab4c4d7e4eb45419384b0419db078af3", "score": "0.5772533", "text": "function p_purge_metadata($id) {\n $meta = p_read_metadata($id);\n foreach($meta['current'] as $key => $value) {\n if(is_array($meta[$key])) {\n $meta['current'][$key] = array();\n } else {\n $meta['current'][$key] = '';\n }\n\n }\n return p_save_metadata($id, $meta);\n}", "title": "" }, { "docid": "926c7434e9362e4f23c5395d6a1aa4f1", "score": "0.5750231", "text": "function hippo_delete_term_meta_by_key( $term_meta_key ) {\n\t\treturn delete_metadata( 'hippo_term', NULL, $term_meta_key, '', TRUE );\n\t}", "title": "" }, { "docid": "38b80b9f350e11249a6dfcb33b9f3f27", "score": "0.5749463", "text": "public function clean()\n\t{\n\t\t$time = time();\n\t\t$it = new GlobIterator(\n\t\t\t$this->_metadata_path.$this->_metadata_prefix.'*',\n\t\t\tFilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO\n\t\t);\n\t\tforeach ($it as $metadata_file=>$fi)\n\t\t{\n\t\t\tif(!$fi->isFile()) continue;\n\t\t\tif($metadata = $this->_read_metadata_file($metadata_file))\n\t\t\t{\n\t\t\t\tif($time > $metadata['expire_time'])\n\t\t\t\t{\n\t\t\t\t\t$this->remove($metadata['id']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9c722ccdd303fa5ac729863e16e1aaf6", "score": "0.57387245", "text": "function remove_meta_boxes() {\n\tremove_meta_box( 'commentsdiv', 'post', 'normal' );\n\n\tremove_meta_box( 'commentsdiv', 'page', 'normal' );\n}", "title": "" }, { "docid": "4ca92b0c312334b634777910071bbaae", "score": "0.5738227", "text": "function rbfaq_remove_wp_seo_meta_box() {\n remove_meta_box( 'wpseo_meta', 'faqs', 'normal' ); // change custom-post-type into the name of your custom post type\n}", "title": "" }, { "docid": "8d92a26f61a4cfafaf45f860aa77f11d", "score": "0.57362723", "text": "function hippo_delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\n\t\treturn delete_metadata( 'hippo_term', $term_id, $meta_key, $meta_value );\n\t}", "title": "" }, { "docid": "23086a644b0d7a59167ecea5aec9230a", "score": "0.57335496", "text": "public function remove_screen_reader_content() {\n\t\t$this->_screen_reader_content = array();\n\t}", "title": "" }, { "docid": "5d3f904487675c066da98ce4a5f57685", "score": "0.57306004", "text": "function wp_ajax_delete_meta() {\n\t$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;\n\n\tcheck_ajax_referer( \"delete-meta_$id\" );\n\tif ( !$meta = get_metadata_by_mid( 'post', $id ) )\n\t\twp_die( 1 );\n\n\tif ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'delete_post_meta', $meta->post_id, $meta->meta_key ) )\n\t\twp_die( -1 );\n\tif ( delete_meta( $meta->meta_id ) )\n\t\twp_die( 1 );\n\twp_die( 0 );\n}", "title": "" }, { "docid": "ded30a4feb27c458b71b67d947126eaf", "score": "0.57267225", "text": "function qa_db_categorymeta_clear($categoryid, $key)\n{\n\tqa_db_meta_clear('categorymetas', 'categoryid', $categoryid, $key);\n}", "title": "" }, { "docid": "87b0caec077e26814ae6a4525a8d1171", "score": "0.5689134", "text": "function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\r\n\treturn delete_metadata('term', $term_id, $meta_key, $meta_value);\r\n}", "title": "" }, { "docid": "8ed6944b5528846f2e3acb775f249540", "score": "0.567402", "text": "public static function remove_meta_boxes() {\n\t\tremove_meta_box( 'commentstatusdiv', 'post', 'normal' );\n\t\tremove_meta_box( 'tagsdiv-post_tag', 'post', 'normal' );\n\t\tremove_meta_box( 'tagsdiv-post_tag', 'post', 'advanced' );\n\t\tremove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' );\n\t}", "title": "" }, { "docid": "438b948876bfd8372f2f736f9809d4c4", "score": "0.5643211", "text": "public function dmeta($val){\n // Delete Meta by ID and List\n get_instance()->ecl('List_load')->delete_meta($val,get_instance()->input->get('list', TRUE));\n }", "title": "" }, { "docid": "a2eb9fb889b26012d4ceddb40c5e1205", "score": "0.5633675", "text": "public static function ti_remove_yoast_metabox() {\n\n\t\t$post_types = get_post_types();\n\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\tremove_meta_box( 'wpseo_meta', $post_type, 'normal' );\n\t\t}\n\n\t}", "title": "" }, { "docid": "e9a06b0c576192d202184175e78bf582", "score": "0.562942", "text": "public function metaDelete( $name );", "title": "" }, { "docid": "ebde19b96fded3faabc0640a9f18ba2f", "score": "0.5623757", "text": "function vibrant_life_remove_home_metaboxes() {\n \n if ( vibrant_life_is_editing_home() ) {\n \n // \"Attributes\" Meta Box\n remove_meta_box( 'pageparentdiv', 'page', 'side' );\n \n }\n \n}", "title": "" }, { "docid": "4eca44b54d9790165a45305183f88554", "score": "0.5587774", "text": "public function unsetMetadataValue($name)\n {\n $this->media->unsetMetadataValue($name);\n }", "title": "" }, { "docid": "822afe0537b8f2a96690035c0fa640bc", "score": "0.55725944", "text": "function typ_remove_custom_field_meta_boxes() {\n\tremove_post_type_support ( 'post', 'custom-fields' );\n\tremove_post_type_support ( 'page', 'custom-fields' );\n}", "title": "" }, { "docid": "27efded1df2ecc1a36ca0de9b8d2df32", "score": "0.5534099", "text": "function qa_db_usermeta_clear($userid, $key)\n{\n\tqa_db_meta_clear('usermetas', 'userid', $userid, $key);\n}", "title": "" }, { "docid": "b533cfeea6530bdafe3658fd589a6855", "score": "0.5520073", "text": "function mu_remove_meta_box_author() {\n\tremove_meta_box( 'authordiv', 'post', 'normal' );\n\tremove_meta_box( 'authordiv', 'page', 'normal' );\n}", "title": "" }, { "docid": "ef6f5528303e4e05c0e6705c08d3f574", "score": "0.5513831", "text": "public function clean()\n {\n unset($this->attributes);\n if ($this->isEnabled()) {\n $this->cache->clean(\n [\n Type::CACHE_TAG,\n Attribute::CACHE_TAG,\n ]\n );\n }\n }", "title": "" }, { "docid": "cfa582538c935997e56f2c9ec5900895", "score": "0.55110157", "text": "function biancaa_featured_content_transient_flusher() {\n\tdelete_transient( 'biancaa_featured_posts' );\n}", "title": "" }, { "docid": "0c2771f3dc2f730c4ada2b9d6cc9a388", "score": "0.5504208", "text": "function remove_author_post_metabox() { remove_meta_box( 'authordiv', 'post', 'normal' ); }", "title": "" }, { "docid": "86493e8cbe851550a2c943ac220e76a6", "score": "0.5498221", "text": "public function delete_cached_data() {\n\t\tglobal $wpdb;\n\n\t\t$table = is_multisite() ? $wpdb->base_prefix . 'sitemeta' : $wpdb->base_prefix . 'options';\n\t\t$column = is_multisite() ? 'meta_key' : 'option_name';\n\t\t$delete_string = 'DELETE FROM ' . $table . ' WHERE ' . $column . ' LIKE %s LIMIT 1000';\n\n\t\t$wpdb->query( $wpdb->prepare( $delete_string, [ '%tu-%' ] ) );\n\t}", "title": "" }, { "docid": "e7d92debeefa60a908cad94056d94771", "score": "0.5494959", "text": "public function clearContent()\n {\n $this->content = null;\n }", "title": "" }, { "docid": "f9c28df3e13cd085377c0fb6bbf39d69", "score": "0.54871297", "text": "final public function remove() {\r\n\t\t$key = $this->meta()['key'];\r\n\t\treturn self::remove_by_ids([$this->$key]);\r\n\t}", "title": "" }, { "docid": "b29da5b6398bfd7f401462381aa9be67", "score": "0.54781365", "text": "function field_delete_meta($postID, $key)\n{\n delete_post_meta($postID, '_' . $key);\n}", "title": "" }, { "docid": "86c5c994ffa600326bc81c59d9293c54", "score": "0.5472112", "text": "public function remove(){\n\t\t$this->typeObject->remove();\n\t\t\n\t\t$this->db->reset();\n\t\t$this->db->where('page_id', $this->id);\n\t\t$this->db->delete('OPC_Page_components');\n\n\t\t$this->db->reset();\n\t\t$this->db->where('id', $this->id);\n\t\t$this->db->delete('OPC_Pages');\n\t}", "title": "" }, { "docid": "b5a2e1e8ab8a660d3524dc13734be914", "score": "0.5468984", "text": "function ibio_setup_single(){\n remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );\n remove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n}", "title": "" }, { "docid": "ee4e72aa3708042185aaec313efe074c", "score": "0.5449253", "text": "function quietus_remove_categories_meta_box() {\n\tremove_meta_box( 'categorydiv', 'post', 'side' );\n}", "title": "" }, { "docid": "b61f51156c8d8e633645077e701885ca", "score": "0.54421824", "text": "function wc_delete_prod_item_meta( $item_id, $meta_key, $meta_value = '', $delete_all = false ) {\n\t$data_store = WC_Data_Store::load( 'prod-item' );\n\tif ( $data_store->delete_metadata( $item_id, $meta_key, $meta_value, $delete_all ) ) {\n\t\tWC_Cache_Helper::incr_cache_prefix( 'object_' . $item_id ); // Invalidate cache.\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "95623f8273fefb4f9214a0d61aac86ac", "score": "0.54348505", "text": "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n }\n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "title": "" }, { "docid": "edbd3a64a760fa093c6f2ad1852e7984", "score": "0.5421088", "text": "public function clearCmsCache()\n {\n Cache::forget($this->getCacheKey('page-url-map'));\n Cache::forget($this->getCacheKey('cms-url-list'));\n }", "title": "" }, { "docid": "8389dc8df4d5041ba15636d76e8e14a0", "score": "0.5416051", "text": "public /*void*/ function clear()\r\n\t{\r\n\t\t$this->head = '';\r\n\t\t$this->body = '';\r\n\t\t$this->bodyAttributes = array();\r\n\t\t$this->links = array();\r\n\t\t$this->styles = array();\r\n\t\t$this->scripts = array();\r\n\t\t$this->title = '';\r\n\t\t$this->meta = array(\r\n\t\t\t'content-type' => 'text/html; charset=utf-8',\r\n\t\t\t'keywords' =>\t '',\r\n\t\t\t'description' => '',\r\n\t\t\t'viewport' => 'width=device-width, initial-scale=1.0'\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "68b28ddabdbcba58f25b266736688f6d", "score": "0.5396506", "text": "public function reset()\n {\n $this->metas->reset();\n\n return $this;\n }", "title": "" }, { "docid": "1443a4dcf2f6c4eca0a5faa025a1ba14", "score": "0.53922266", "text": "function deletememory()\n\t\t{\n\t\t\tunset($this->emailheader);\n\t\t\tunset($this->textheader);\n\t\t\tunset($this->attachment);\n\t\t}", "title": "" }, { "docid": "3beca7c26bc94c9fcf5b54c0cde321dd", "score": "0.53821725", "text": "function remove_dashboard_meta(){\n \n $user = wp_get_current_user();\n\t\t$cur_user_id=get_current_user_id();\n\t \n\t \n\t\t$roles_metadata = $user->roles;\n\t\t$role=$roles_metadata[0];\n\t\tif($role==='administrator'){\n\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n\t\tremove_meta_box( 'dashboard_recent_published-posts', 'dashboard', 'normal' );\n // remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');\n\n\n\t\t}\n \n}", "title": "" }, { "docid": "e0dc6c9317ee4569944a3c1b439f8eff", "score": "0.5379104", "text": "function unset_specific_order_item_meta_data( $formatted_meta, $item )\n{\n if ( is_admin() )\n return $formatted_meta;\n\n foreach ( $formatted_meta as $key => $meta ) {\n if ( in_array( $meta->key, array( 'Business Card PDF' ) ) )\n unset( $formatted_meta[$key] );\n }\n return $formatted_meta;\n}", "title": "" }, { "docid": "bdec7c733258464b53e1bb105031df0a", "score": "0.5363387", "text": "function elb_remove_post_data()\n{\n\tglobal $wpdb;\n\n\t$data_removed = false;\n\n\t$table_prefix = $wpdb->prefix;\n\n\ttry {\n\t\t$post_table = $table_prefix . 'posts';\n\n\t\t$custom_post_types = [\n\t\t\t'elb_subscriber',\n\t\t\t'elb_list',\n\t\t];\n\n\t\t// delete custom post types\n\t\t$data_removed = $wpdb->query(\n\t\t\t$wpdb->prepare(\"\n\t\t\t\tDELETE FROM $post_table\n\t\t\t\tWHERE post_type = %s OR post_type = %s\n\t\t\t\",\n\t\t\t\t$custom_post_types[0],\n\t\t\t\t$custom_post_types[1]\n\t\t\t)\n\t\t);\n\n\t\t$post_meta_table = $table_prefix . 'post_meta';\n\n\t\t// delete orphaned custom post types meta\n\t\t$data_removed = $wpdb->query( \"\n\t DELETE pm\n\t FROM $post_meta_table pm\n\t LEFT JOIN $post_table wp ON wp.ID = pm.post_id\n\t WHERE wp.ID IS NULL\n \"\n\t\t);\n\n\t}\n\tcatch (Exception $exception) {}\n\n\treturn $data_removed;\n\n}", "title": "" }, { "docid": "e44842fd7b25712d627a1537007f8417", "score": "0.5361776", "text": "public function deleteMeta(string $key, string $group = \"\"): void\n {\n $query = $this->meta()->key($key)->group($group);\n $query->delete();\n }", "title": "" }, { "docid": "c47fadc6b1d65424d1b3c1ac1e185d59", "score": "0.5357919", "text": "protected function clearStoredData() {\n $this->getStorage()->deleteMatch($this->providerId . '.');\n }", "title": "" }, { "docid": "ba2a98c7aca86108ee3d7e35077f010e", "score": "0.5356489", "text": "public function delete()\n {\n $keys = ['name', 'description'];\n foreach ($keys as $key) {\n Multilanguage::remove(null, self::getContext() . $this->id, null, $key);\n }\n parent::delete();\n }", "title": "" }, { "docid": "8218d505345e61f77df931c08ad8ae97", "score": "0.5352621", "text": "function remove_metaboxes() {\n\tremove_meta_box( 'postcustom', 'page', 'normal' );\n\tremove_meta_box( 'commentstatusdiv', 'page', 'normal' );\n\tremove_meta_box( 'commentsdiv', 'page', 'normal' );\n\tremove_meta_box( 'authordiv', 'page', 'normal' );\n\tremove_meta_box( 'trackbacksdiv', 'page', 'normal' );\n\tremove_meta_box( 'postexcerpt', 'page', 'normal' );\n\tremove_meta_box( 'postcustom', 'post', 'normal' );\n\tremove_meta_box( 'commentstatusdiv', 'post', 'normal' );\n\tremove_meta_box( 'commentsdiv', 'post', 'normal' );\n\tremove_meta_box( 'authordiv', 'post', 'normal' );\n\tremove_meta_box( 'trackbacksdiv', 'post', 'normal' );\n\tremove_meta_box( 'postexcerpt', 'post', 'normal' );\n}", "title": "" }, { "docid": "0bf7ac5c825cc539c29f80a254ee202e", "score": "0.5351361", "text": "public function mediaDeleted()\n {\n $this->media = null;\n }", "title": "" }, { "docid": "9246ae98b73225d67f77185f73d50b7a", "score": "0.5348076", "text": "public function delete() {\n\t\twp_delete_post($this->id);\n\t}", "title": "" }, { "docid": "ba5f06ee87e6352bfac0b185b50483fd", "score": "0.5330404", "text": "public function forgetMetaAttribute(string $name): self\n {\n $this->extra_attributes->forget($name);\n\n return tap($this)->save();\n }", "title": "" }, { "docid": "1d3b9f62ac1f9aae9c9b7541aefc7e44", "score": "0.5323804", "text": "function delete_form_data() {\n // The $_REQUEST contains all the data sent via ajax\n $queryString = $_REQUEST['data'];\n parse_str($queryString, $out);\n //print_r($queryString);\n $cur_meta_id = $out['current_id'];\n\n global $wpdb;\n \n $wpdb->delete( 'wp_usermeta', array( 'umeta_id' => $cur_meta_id ) );\n\n \n // $user_ID= get_current_user_id(); \n // if($user_ID){\n // update_user_meta( $user_ID, 'saved_form_data', 'NA');\n // }\n // Always die in functions echoing ajax content\n die();\n}", "title": "" }, { "docid": "b210aa34ef06809e44ac117c388b5e81", "score": "0.5319531", "text": "private function _del_cache_data()\n {\n self::$_cache->del($this->_cache_key());\n }", "title": "" }, { "docid": "6725cf82747f8131a93564acb0aef2c8", "score": "0.5317755", "text": "function remove_dashboard_meta_boxes(){\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n // Remove the welcome panel\n remove_action('welcome_panel', 'wp_welcome_panel');\n }", "title": "" }, { "docid": "398d0bbc6c7e7fb34978e387f3ed3e22", "score": "0.5313789", "text": "function wct_talks_delete_meta( $talk_id = 0, $meta_key = '' ) {\n\tif ( empty( $talk_id ) || empty( $meta_key ) ) {\n\t\treturn false;\n\t}\n\n\t$sanitized_key = sanitize_key( $meta_key );\n\n\treturn delete_post_meta( $talk_id, '_wc_talks_' . $sanitized_key );\n}", "title": "" }, { "docid": "e25e9ab47277eae3b73428dfed16f1d8", "score": "0.5312988", "text": "function removeDefaultMetaBox( $type, $context, $post ) {\r\n remove_meta_box( 'postcustom', $type, $context );\r\n }", "title": "" }, { "docid": "82f75670f59b5e5a3ce91585f650f9d1", "score": "0.5303067", "text": "function hello_pro_remove_metaboxes( $_genesis_admin_settings ) {\n\tremove_meta_box( 'genesis-theme-settings-header', $_genesis_admin_settings, 'main' );\n\tremove_meta_box( 'genesis-theme-settings-nav', $_genesis_admin_settings, 'main' );\n}", "title": "" }, { "docid": "7abf4fd1772c96e33941f1c42f1677fe", "score": "0.5289562", "text": "function lfl_remove_home_metaboxes() {\n \n if ( is_admin() && isset( $_REQUEST['post'] ) && $_REQUEST['post'] == get_option( 'page_on_front' ) ) {\n \n // \"Attributes\" Meta Box\n remove_meta_box( 'pageparentdiv', 'page', 'side' );\n \n }\n \n}", "title": "" }, { "docid": "6361df5354f3f41868ad851f58f4ab68", "score": "0.5286352", "text": "public function cleanup(): void\n {\n foreach ($this->getEntryContents() as $entryContent) {\n unlink($this->entriesPath.'/'.$entryContent['filename']);\n }\n }", "title": "" }, { "docid": "e6dd99f0428e95e60e1f3e48bdf10d82", "score": "0.52713346", "text": "public function delete() {\r\n $contentTable = Engine_Api::_()->getDbtable('content', 'core');\r\n $contentTable->delete(array('page_id = ?' => $this->page_id)); \r\n // excute delete this object\r\n parent::delete();\r\n }", "title": "" }, { "docid": "c92ea71d119d72bde1c6a9e034d09414", "score": "0.5254482", "text": "function deleteCache() {\n\t\tif (!empty($this->id)) {\n\t\t\tglobal $cache;\n\t\t\t$cache->deleteCacheFile(\"blog\", \"blogCategories_\".$this->id);\n\t\t\t$cache->deleteCacheFile(\"blog\", \"blogArchive_\".$this->id);\n\t\t}\n\t}", "title": "" }, { "docid": "f4e7744938dfce465c5cfc3cd3f729ed", "score": "0.5246453", "text": "public function delete($key)\n {\n if (! $this->_active) {\n return;\n }\n \n $file = $this->entry($key);\n @unlink($file, $this->_context);\n @unlink($file . '.meta', $this->_context);\n }", "title": "" }, { "docid": "18f3e514339023a93716b6d8028931a2", "score": "0.5240244", "text": "public function reset()\n {\n $this->content = null;\n }", "title": "" }, { "docid": "4d2adda5e9e8b120fd6cf00217f067aa", "score": "0.52400935", "text": "function tpg_remove_custom_taxonomy() {\n remove_meta_box( 'tagsdiv-role', 'staff', 'side' );\n}", "title": "" }, { "docid": "851663bede56c0d3f31183b3ae7b7a55", "score": "0.5233873", "text": "public function clearCacheInformation()\n {\n $schema = $this->schema;\n if (array_key_exists($schema, self::$localCache)) {\n unset(self::$localCache[$schema]);\n if (($key = array_search($schema, self::$fullyCachedSchemas)) !== false) {\n unset(self::$fullyCachedSchemas[$key]);\n }\n }\n }", "title": "" }, { "docid": "7e06ddfeaccfd6c5a3a826df5c35b715", "score": "0.5233712", "text": "function clear_metadata($guid) {\n\telgg_deprecated_notice('clear_metadata() is deprecated by elgg_delete_metadata()', 1.8);\n\tif (!$guid) {\n\t\treturn false;\n\t}\n\treturn elgg_delete_metadata(array('guid' => $guid, 'limit' => 0));\n}", "title": "" }, { "docid": "8d7d181e5440938d243343199fe675ac", "score": "0.52302176", "text": "public function clearMaterial(): void\n {\n $this->absoluteFileUri = null;\n $this->citation = null;\n $this->copyrightRationale = null;\n $this->description = null;\n $this->filename = null;\n $this->filesize = null;\n $this->link = null;\n $this->mimetype = null;\n $this->originalAuthor = null;\n $this->token = null;\n $this->relativePath = null;\n }", "title": "" }, { "docid": "4f230d10cdc1bc7f9616152fba6a6840", "score": "0.5227383", "text": "function delete_user_meta( $user_id, $meta_key, $meta_value = '' ) {\n\treturn delete_metadata( 'user', $user_id, $meta_key, $meta_value );\n}", "title": "" }, { "docid": "33a796b1086aa2f791c8f6193ad83b6e", "score": "0.5214192", "text": "function genesis_sample_remove_metaboxes( $_genesis_admin_settings ) {\n\n\tremove_meta_box( 'genesis-theme-settings-header', $_genesis_admin_settings, 'main' );\n\tremove_meta_box( 'genesis-theme-settings-nav', $_genesis_admin_settings, 'main' );\n\n}", "title": "" }, { "docid": "e5735cdfd34b9d617e9e68fa5864ea29", "score": "0.5205752", "text": "public function Delete() {\r\n $action_instance = $this->action_instance;\r\n // Retrieve the form instance\r\n $form_instance = $action_instance->form_instance; \r\n // Retrieve any stored meta value\r\n\t\t$stored_meta_actions = get_post_meta($form_instance->form_id,'vcff_meta_event_actions'); \r\n // If the form is not using events\r\n if (!$stored_meta_actions) { return $this; }\r\n // Loop through the meta data\r\n foreach ($stored_meta_actions as $k => $meta_item_data) { \r\n // If the action instance id's do not match\r\n if ($action_instance->id != $meta_item_data['id']) { continue; }\r\n // Delete the post meta\r\n delete_post_meta($form_instance->form_id,'vcff_meta_event_actions',$meta_item_data);\r\n }\r\n }", "title": "" }, { "docid": "283f149f603feee0b2bdbac76172ed7c", "score": "0.5201381", "text": "function removePreloaded()\n\t{\n\t\tunset(self::$preloaded[\"{$this->publisherId}, {$this->name}\"]);\n\t}", "title": "" }, { "docid": "467c98c9c3e0b2714f1fb8242af40591", "score": "0.5182546", "text": "public function removeTracks()\n\t{\n\t\tAuth::user()->tracks()->detach(Input::get('tracks'));\n\n Cache::forget($this->getCacheKey());\n\t}", "title": "" }, { "docid": "6ca84b85557dbbeb52bea8a2bae09ea3", "score": "0.51711005", "text": "protected function remove_old_data(){\n\t\t$list = get_posts('numberposts=-1&post_type=lottery&post_status=any' );\n\t\tforeach ($list as $post){\n\t\t\t$this->delete_attachments_with_post($post->ID);\n\t\t\twp_delete_post($post->ID, true);\n\t\t}\n\t}", "title": "" }, { "docid": "6dd1b2703c0eaec5b59be4af3174ac43", "score": "0.5162156", "text": "function remove_metadata($guid, $name, $value = \"\") {\n\telgg_deprecated_notice('delete_metadata() is deprecated by elgg_delete_metadata()', 1.8);\n\n\t// prevent them from deleting everything\n\tif (!$guid) {\n\t\treturn false;\n\t}\n\n\t$options = array(\n\t\t'guid' => $guid,\n\t\t'metadata_name' => $name,\n\t\t'limit' => 0\n\t);\n\n\tif ($value) {\n\t\t$options['metadata_value'] = $value;\n\t}\n\n\treturn elgg_delete_metadata($options);\n}", "title": "" } ]
1f759c9f42afa34487719f680c03a575
status_id , 2 : pay succeeded, 4: voiding, 6:void failed
[ { "docid": "9f1a4573cbbd449398d861ab5b52a9ba", "score": "0.0", "text": "public static function getAmount($startTime,$endTime,$dt,$cutOffTime) {\n $dtFormat = TicketPayment::getDtFormatString($dt);\n $sql = \"SELECT DATE_FORMAT(a.calc_date,'{$dtFormat}') AS dt, SUM(a.amount) AS total, SUM(IF(a.method='kiplepay',a.amount,0)) AS ewallet \n FROM (\n SELECT ADDTIME(created_at,'-{$cutOffTime}') AS calc_date,method,amount\n FROM psm_ticket_payment \n WHERE created_at >='{$startTime}' AND created_at <'{$endTime}' AND STATUS IN (2,4,6)\n ) a\n GROUP BY dt\";\n if ($dt=='dayhour') {\n $sql = \"SELECT DATE_FORMAT(created_at,'%H') AS dt, SUM(amount) AS total, SUM(IF(method='kiplepay',amount,0)) as ewallet\n FROM psm_ticket_payment \n WHERE created_at>='{$startTime}' AND created_at <'$endTime' AND status IN (2,4,6)\n GROUP BY dt\";\n } \n $result = DB::select($sql);\n return $result;\n }", "title": "" } ]
[ { "docid": "fe6e1e369aec3a19d9d15e5dd29ea55c", "score": "0.6555621", "text": "private function HandleStatusSuccess()\r\n\t{\r\n\t\tglobal $netAmount, $feeAmount, $customerFirstName, $customerLastName, $myCustomField_1, $myItemName, $customerEmailAddress, $transactionReferenceNumber, $totalAmountReceived, $transactionStatus, $currency, $receivedMerchantEmailAddress, $purchaseType, $transactionType, $receivedSecurityCode;\r\n\t\t\r\n\t\t$postdata\t\t= $this->GetPostData();\r\n\t\t$accountid \t\t= $myCustomField_1;\r\n\t\t$amount\t\t\t= floatval($totalAmountReceived);\r\n\t\t\r\n\t\t//Check if transaction has been processed before and if it is \"Completed\"\r\n\t\t$query = new MMQueryBuilder();\r\n\t\t$query->Select(\"`log_payments_alertpay`\")->Columns(array(\"COUNT(*)\"=>\"numrows\"))->Where(\"`transaction_id` = '%s' AND `status` = '0'\", $transactionReferenceNumber)->Build();\r\n\t\t$checkrecycle = MMMySQLiFetch($this->sql->query($query, DBNAME), \"onerow: 1\");\r\n\t\t$numrecycle = $checkrecycle['numrows'];\r\n\t\t\r\n\t\tif((int)$numrecycle > 0)\r\n\t\t{\r\n\t\t\t//Insert log in INVALID payments\r\n\t\t\t$this->LogPayment(\r\n\t\t\tarray(\r\n\t\t\t\t\"`status`\"\t\t\t=> \"'0'\",\r\n\t\t\t\t\"`transaction_id`\"\t=> \"'%s'\",\r\n\t\t\t\t\"`sender_email`\"\t=> \"'%s'\",\r\n\t\t\t\t\"`payment_status`\"\t=> \"'%s'\",\r\n\t\t\t\t\"`item_name`\"\t\t=> \"'%s'\",\r\n\t\t\t\t\"`amount`\"\t\t\t=> \"'%s'\",\r\n\t\t\t\t\"`currency`\"\t\t=> \"'%s'\",\r\n\t\t\t\t\"`account_id`\"\t\t=> \"'%s'\",\r\n\t\t\t\t\"`first_name`\"\t\t=> \"'%s'\",\r\n\t\t\t\t\"`last_name`\"\t\t=> \"'%s'\",\r\n\t\t\t\t\"`post_data`\"\t\t=> \"'%s'\",\r\n\t\t\t\t\"`extra_information`\"=> \"'TRANSACTION RECYLCED WITH PAYMENTSTATUS COMPLETED'\",\r\n\t\t\t), PAYMENTTYPE_INVALID,\r\n\t\t\t$transactionReferenceNumber,\r\n\t\t\t$customerEmailAddress,\r\n\t\t\t$transactionStatus,\r\n\t\t\t$myItemName,\r\n\t\t\t$amount,\r\n\t\t\t$currency,\r\n\t\t\t$accountid,\r\n\t\t\t$customerFirstName,\r\n\t\t\t$customerLastName,\r\n\t\t\t$postdata);\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t//Delete pending payments with same transaction id\r\n\t\t$query = new MMQueryBuilder();\r\n\t\t$query->Delete(\"`log_payments_alertpay`\")->Where(\"`transaction_id` = '%s' AND `status` = '2'\", $transactionReferenceNumber)->Build();\r\n\t\t$this->sql->query($query, DBNAME);\r\n\t\t\t\t\r\n\t\t//Everything is OK, Insert LOG for successful payment\r\n\t\t$details = \"Transaction was successful\";\r\n\t\t$this->LogPayment(\r\n\t\tarray(\r\n\t\t\t\"`status`\"\t\t\t=> \"'0'\",\r\n\t\t\t\"`transaction_id`\"\t=> \"'%s'\",\r\n\t\t\t\"`sender_email`\"\t=> \"'%s'\",\r\n\t\t\t\"`payment_status`\"\t=> \"'%s'\",\r\n\t\t\t\"`item_name`\"\t\t=> \"'%s'\",\r\n\t\t\t\"`amount_gross`\"\t=> \"'%s'\",\r\n\t\t\t\"`amount_fee`\"\t\t=> \"'%s'\",\r\n\t\t\t\"`amount_net`\"\t\t=> \"'%s'\",\r\n\t\t\t\"`currency`\"\t\t=> \"'%s'\",\r\n\t\t\t\"`account_id`\"\t\t=> \"'%s'\",\r\n\t\t\t\"`first_name`\"\t\t=> \"'%s'\",\r\n\t\t\t\"`last_name`\"\t\t=> \"'%s'\",\r\n\t\t\t\"`post_data`\"\t\t=> \"'%s'\",\r\n\t\t\t\"`extra_information`\"=> \"'SUCCESSFUL PAYMENT!'\",\r\n\t\t\t\"`details`\"\t\t\t=> \"'$details, Points were added to your account!'\",\r\n\t\t), PAYMENTTYPE_VALID,\r\n\t\t$transactionReferenceNumber,\r\n\t\t$customerEmailAddress,\r\n\t\t$transactionStatus,\r\n\t\t$myItemName,\r\n\t\t$amount,\r\n\t\t$feeAmount,\r\n\t\t$netAmount,\r\n\t\t$currency,\r\n\t\t$accountid,\r\n\t\t$customerFirstName,\r\n\t\t$customerLastName,\r\n\t\t$postdata);\r\n\t\t\r\n\t\treturn array(\"amount\" => $amount, \"accountid\" => $accountid);\r\n\t}", "title": "" }, { "docid": "297f3bc1b74277b16dc3763665464167", "score": "0.6205123", "text": "function check_unionpay_response() {\n\n if (empty($_POST)) {\n wp_die(\"Invalid Requirements\");\n }\n\n if (!$this->verify_response($_POST)){\n $this->log('Unionpay response verify faild! post:'.json_encode($_POST));\n wp_die(\"Invalid Requirements\");\n }\n\n $orderId = substr($_POST['orderId'], 14, strlen($_POST['orderId']));\n $order = new WC_Order($orderId);\n if( $order->status != 'completed'){\n $order->payment_complete();\n $order->add_order_note ('支付成功');\n update_post_meta( $orderId, 'Unionpay Trade No.', wc_clean( $_POST['queryId'] ) );\n $this->log('Payment Completed! Order ID: ' . $orderId . 'date:' . json_encode($_POST), 'Info');\n header( 'HTTP/1.1 200 OK' );\n echo \"Success\";\n exit;\n }\n\n }", "title": "" }, { "docid": "08172013872d2c3fea457bd3858b7bc7", "score": "0.6104642", "text": "function getOrderStatusId($status)\n{\n $statusId = 2;\n $status = strtolower($status);\n if ($status == \"completed\")\n $statusId = 5;\n else if ($status == \"unpaid\")\n $statusId = 1;\n else if ($status == \"ready_to_ship\")\n $statusId = 2;\n else if ($status == \"shipped\")\n $statusId = 3;\n else if ($status == \"cancelled\")\n $statusId = 7;\n else if ($status == \"invalid\")\n $statusId = 10; //10 - failed, 16 - voided\n \n return $statusId;\n}", "title": "" }, { "docid": "14ebd38503527ac5574ec25b0e266520", "score": "0.6037414", "text": "public function getPaymentStatusPro()\n {\n $payment_id = Session::get('paypal_payment_id');\n\n // BRISE IZ SESIJE\n Session::forget('paypal_payment_id');\n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/user_profile');\n\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n\n //IZVRSAVANJE TRANSAKCIJE\n $result = $payment->execute($execution, $this->_api_context);\n\n if ($result->getState() == 'approved') {\n\n \\Session::put('success', 'Payment success');\n \n $user_account = Account::where('user_id',auth()->user()->id)->first();\n $user_account->account_type_id = 2;\n $user_account->valid_until = \\Carbon\\Carbon::now()->addMonth();\n $user_account->save();\n\n // $user = User::find(auth()->user()->id);\n // $user->account->account_type_id = 2;\n // $user->save();\n\n Purchase::create([\n 'user_id' => auth()->user()->id,\n 'bought' => '2',\n 'date_of_purchase' => \\Carbon\\Carbon::now(),\n 'valid_until' => \\Carbon\\Carbon::now()->addMonth()\n ]);\n\n return Redirect::to('/user_profile');\n\n }\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/user_profile');\n\n }", "title": "" }, { "docid": "e73c2b35f9935448aec3e5578ed10719", "score": "0.6020842", "text": "function pmpropbc_pmpro_check_status_after_checkout($status) \r\n{ \r\n\treturn \"pending\"; \r\n}", "title": "" }, { "docid": "7853025066df1d1734cecda38950dc13", "score": "0.5955639", "text": "public function get_status_code();", "title": "" }, { "docid": "3a689e7b45db257b72c863720fa74200", "score": "0.59442276", "text": "function getJobResponseStatus($value) { \n if($value == 1) {\n\t $res = \"Shortlisted\";\n } else if($value == 2) {\n\t $res = \"On hold\";\n } else if($value == 3) {\n\t $res = \"Rejected\";\n } else {\n\t $res = \"Pending\";\n }\n return $res;\n \n}", "title": "" }, { "docid": "003fe27aba73b203d8253f4e88cf9c8c", "score": "0.5937439", "text": "function update_status($id){\n\t\t \t\t$status['update_eth'] = 2;\n\t\t\t\t$this->db->where('update_eth',1);\n\t\t\t\t$this->db->where('user_id',$id);\n\t\t\t\t$this->db->update('proof',$status);\n\t }", "title": "" }, { "docid": "0ce21f8fc9db7372208253c814e20470", "score": "0.59178966", "text": "public function getState($status)\n {\n if ($status == 2 || $status == 3 || $status == 100 || $status == 201) {\n return 'onhold';\n } else if ($status == 4 || $status >= 200 && $status < 400) {\n return 'approved';\n } else if ($status == 604) {\n return 'rejected';\n } else {\n return 'failed';\n }\n\t}", "title": "" }, { "docid": "30df41d72c1f0b2c252c236b98a2c1aa", "score": "0.58852124", "text": "function td_status($request)\n\t{\n\t\tlist($success, $return) = $this->system->is_valid_access4($request);\n\t\tif (!$success) return [FALSE, $return];\n\n\t\t$this->db->select('TDStatusID, TDStatusCode, TDStatusDescription')\t;\n \t$this->db->from('parameter_bank_tdstatus');\n\t\t\t$data = $this->f->get_result_paging($request);\n\n\t\t\t$request->log_type\t= 'data';\t\n\t\t\t$this->system->save_billing($request);\n\n\t\treturn $data;\n }", "title": "" }, { "docid": "e9db1d89ecef1391b64ef31a0fe04397", "score": "0.5882198", "text": "public function updateStatusCode($status, $id){\n $squery = \"UPDATE `order` SET is_sent=? WHERE id=?\";\n// $squery = \"UPDATE u878596405_tpc.order SET is_sent=? WHERE id=?\";\n $query = $this->connection->prepare($squery);\n if(!$query){\n error_log(\"ducla\".mysqli_error($this->connection), 0);\n }\n $query->bind_param(\"si\",$status, $id);\n $result = $query->execute();\n return $result;\n }", "title": "" }, { "docid": "1cb6d297026f8a3fbf13a8e6f3e8e354", "score": "0.5870685", "text": "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n Session::forget('carrinho');\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\n return redirect('pagseguro/checkout')->with('error', 'Pagamento não concluido');\n }\n\n $payment_id = Input::get('paymentId');\n $playID = Input::get('PayerID');\n\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId($playID);\n\n\n $orderSession = Session::get(\"order\");\n\n $order = OrderPedido::find($orderSession['id']);\n\n\n\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n if ($result->getState() == 'approved') {\n $transacao = new Transacao([ \"status\" => 3]);\n $order->transacao()->save($transacao);\n Session::forget('order');\n\n return redirect('pagseguro/checkout')->with('success', 'Pagamento concluido com sucesso');\n }\n $transacao = new Transacao([ \"status\" => 7]);\n $order->transacao()->save($transacao);\n Session::forget('order');\n return redirect('pagseguro/checkout')->with('error', 'Pagamento não concluido');\n\n }", "title": "" }, { "docid": "a7b7c942b297cd1bd48958b9e56c9632", "score": "0.58164996", "text": "function updateOrderstatus(){\n $result = array(); // for assign only will have the driver id real value\n $statusdataarray = array();\n $statusdataarray['orderid'] = $this->doUrlDecode($_POST['orderid']);\n $statusdataarray['driverid'] = $this->doUrlDecode($_POST['driverid']);\n $statusdataarray['drivername'] = $this->doUrlDecode($_POST['drivername']);\n $statusdataarray['status'] = $this->doUrlDecode($_POST['status']); // 1 manager, 3: driver\n $returndata = $this->Api_model->updateOrderstatus($statusdataarray);\n if($returndata == \"success\"){\n $this->doRespondSuccess($result);\n }else{\n $this->doRespondFail($returndata);\n }\n }", "title": "" }, { "docid": "430a25ebed0e7775361ae5f9ba4b28df", "score": "0.5805155", "text": "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/payment');\n\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n\n if ($result->getState() == 'approved') {\n $array=\\Session::get('order');\n // dd($array);\n MailController::sendMail($array, 'order');\n \\Session::put('success', 'Payment success');\n return Redirect::to('/payment');\n }\n //dd(\"no\");\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/payment');\n }", "title": "" }, { "docid": "d20540d89db3d70dc103bca1b7680f0a", "score": "0.57881397", "text": "public function isThisAssignmentOfMembershipTypeSuccessful($id,$membership_type,$number_of_months,$gross,$discount,$net_amount,$is_term_acceptable,$status){\n $model = new SubscriptionPayment;\n $cmd =Yii::app()->db->createCommand();\n $result = $cmd->insert('membership_subscription',\n array('member_id'=>$id,\n 'membership_type_id' =>$membership_type,\n 'status'=>strtolower($status),\n 'number_of_months'=>$number_of_months,\n 'expecting_payment'=>1,\n 'is_term_acceptable'=>$is_term_acceptable,\n 'subscription_initiation_date'=>new CDbExpression('NOW()'),\n 'subscription_initiated_by'=>$id\n \n )\n \n );\n \n if($result >0){\n $model->effectMembershipSubscriptionPayment($id,$membership_type,$gross,$discount,$net_amount);\n return true;\n }else{\n return false;\n }\n \n \n \n }", "title": "" }, { "docid": "ac755da097c50479191d9d1c8c484268", "score": "0.5781505", "text": "function check_paytm_response(){\t\n\t\t\tglobal $woocommerce;\t\t\t\n\t\t\tif(isset($_REQUEST['ORDERID']) && isset($_REQUEST['RESPCODE'])){\n\t\t\t\t\n\t\t\t\t$order_id = $_POST['ORDERID'];\n\n\t\t\t\t// $order_id = \"28\"; // just for testing\t\t\t\t\t\n\n\t\t\t\t$responseDescription = $_REQUEST['RESPMSG'];\n\n\t\t\t\tif ( version_compare( WOOCOMMERCE_VERSION, '2.0.0', '>=' ) ) {\n\t\t\t\t\t$order = new WC_Order($order_id);\n\t\t\t\t} else {\n\t\t\t\t\t$order = new woocommerce_order($order_id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tif($this->log == \"yes\") {\n\t\t\t\t\terror_log(\"Response Code = \" . $_REQUEST['RESPCODE']);\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t$this->msg['class'] = 'error';\n\t\t\t\t$this->msg['message'] = \"Thank you for shopping with us. However, the transaction has been Failed For Reason : \" . $responseDescription;\n\n\t\t\t\tif($_REQUEST['RESPCODE'] !== 01) { // success\n\t\t\t\t\t\n\t\t\t\t\t$order_amount = $order->order_total;\n\n\t\t\t\t\t// echo \"<PRE>\".$order->order_total;print_r($_POST);print_r($order);exit;\n\n\t\t\t\t\tif($_REQUEST['TXNAMOUNT'] == $order_amount){\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tif($this->log == \"yes\") {\n\t\t\t\t\t\t\terror_log(\"amount matched\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t$bool = \"FALSE\";\n\t\t\t\t\t\t$bool = verifychecksum_e($_POST, $this->secret_key, $_POST['CHECKSUMHASH']);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t//$newcheck = Checksum::calculateChecksum($this->secret_key, $all);\n\t\t\t\t\t\tif($this->log == \"yes\") {\n\t\t\t\t\t\t\terror_log(\"calculated checksum = \" . $newch . \" and checksum received = \" . $_REQUEST['checksum']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\n\t\t\t\t\t\tif ($bool == \"TRUE\") {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Create an array having all required parameters for status query.\n\t\t\t\t\t\t\t$requestParamList = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"MID\"\t\t=> $this->merchantIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ORDERID\"\t=> $order_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// $requestParamList[\"ORDERID\"] = $_POST[\"ORDERID\"]; // jsut for testing\n\n\t\t\t\t\t\t\t$requestParamList['CHECKSUMHASH'] = getChecksumFromArray($requestParamList, $this->secret_key);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$responseParamList = callNewAPI($this->transaction_status_url, $requestParamList);\n\n\t\t\t\t\t\t\t// echo \"<PRE>\";print_r($responseParamList);exit;\n\n\t\t\t\t\t\t\tif($responseParamList['STATUS'] == 'TXN_SUCCESS' \n\t\t\t\t\t\t\t\t&& $responseParamList['TXNAMOUNT'] == $_POST['TXNAMOUNT']) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($order->status !=='completed'){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// error_log(\"SUCCESS\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$this->msg['message'] = \"Thank you for your order . Your transaction has been successful.\";\n\t\t\t\t\t\t\t\t\t$this->msg['class'] = 'success';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif($order->status == 'processing'){\n\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$order->payment_complete();\n\t\t\t\t\t\t\t\t\t\t$order->add_order_note('Mobile Wallet payment successful');\n\t\t\t\t\t\t\t\t\t\t$order->add_order_note($this->msg['message']);\n\t\t\t\t\t\t\t\t\t\t$woocommerce->cart->empty_cart();\n\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\t} else {\n\t\t\t\t\t\t\t\t$this->msg['class'] = 'error';\n\t\t\t\t\t\t\t\t$this->msg['message'] = \"It seems some issue in server to server communication. Kindly connect with administrator.\";\n\t\t\t\t\t\t\t\t$order->update_status('failed');\n\t\t\t\t\t\t\t\t$order->add_order_note('Failed');\n\t\t\t\t\t\t\t\t$order->add_order_note($this->msg['message']);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// server to server failed while call//\n\t\t\t\t\t\t\t//error_log(\"api process failed\");\t\n\t\t\t\t\t\t\t$this->msg['class'] = 'error';\n\t\t\t\t\t\t\t$this->msg['message'] = \"Severe Error Occur.\";\n\t\t\t\t\t\t\t$order->update_status('failed');\n\t\t\t\t\t\t\t$order->add_order_note('Failed');\n\t\t\t\t\t\t\t$order->add_order_note($this->msg['message']);\n\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// Order mismatch occur //\n\t\t\t\t\t\t//error_log(\"order mismatch\");\t\n\t\t\t\t\t\t$this->msg['class'] = 'error';\n\t\t\t\t\t\t$this->msg['message'] = \"Order Mismatch Occur\";\n\t\t\t\t\t\t$order->update_status('failed');\n\t\t\t\t\t\t$order->add_order_note('Failed');\n\t\t\t\t\t\t$order->add_order_note($this->msg['message']);\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$order->update_status('failed');\n\t\t\t\t\t$order->add_order_note('Failed');\n\t\t\t\t\t$order->add_order_note($responseDescription);\n\t\t\t\t\t$order->add_order_note($this->msg['message']);\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tadd_action('the_content', array(&$this, 'paytmShowMessage'));\n\t\t\t\t\n\t\t\t\t$redirect_url = $order->get_checkout_order_received_url();\n\t\t\t\t\n\t\t\t\t//For wooCoomerce 2.0\n\t\t\t\t$redirect_url = add_query_arg(\n\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'msg'=> urlencode($this->msg['message']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'type'=>$this->msg['class']\n\t\t\t\t\t\t\t\t\t\t\t\t), $redirect_url\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\twp_redirect( $redirect_url );\n\t\t\t\texit;\t\t\n\t\t\t} \n\t\t}", "title": "" }, { "docid": "c306a1ba71ca50936eb6477b79c7ef0f", "score": "0.5780553", "text": "function process_status_notify(){\r\r\n\t\t//record POST/GET data\r\r\n\t\tdo_action('mgm_print_module_data', $this->module, __FUNCTION__ );\r\r\n\t\t// proces\r\r\n\t\tif($this->_verify_callback_ins()){// end verify on first sale\r\r\n\t\t\t// process ins,for 2checkout only\r\r\n\t\t\t$this->_process_ins_messages();\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t// 200 OK to gateway, only external\t\t\r\r\n\t\tif(!headers_sent()){\r\r\n\t\t\t@header('HTTP/1.1 200 OK');\r\r\n\t\t\texit('OK');\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "2ce75367ae9a2c013c382b3f01d109fa", "score": "0.57517076", "text": "public function getPaymentStatusSuper()\n {\n $payment_id = Session::get('paypal_payment_id');\n\n // BRISE IZ SESIJE\n Session::forget('paypal_payment_id');\n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/user_profile');\n\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n\n //IZVRSAVANJE TRANSAKCIJE\n $result = $payment->execute($execution, $this->_api_context);\n\n if ($result->getState() == 'approved') {\n\n \\Session::put('success', 'Payment success');\n \n $user_account = Account::where('user_id',auth()->user()->id)->first();\n $user_account->account_type_id = 3;\n $user_account->valid_until = \\Carbon\\Carbon::now()->addMonth();\n $user_account->save();\n\n Purchase::create([\n 'user_id' => auth()->user()->id,\n 'bought' => '3',\n 'date_of_purchase' => \\Carbon\\Carbon::now(),\n 'valid_until' => \\Carbon\\Carbon::now()->addMonth()\n ]);\n\n return Redirect::to('/user_profile');\n\n }\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/user_profile');\n\n }", "title": "" }, { "docid": "f486a7c1d5a7e443177f2979fce6197a", "score": "0.57483655", "text": "public function changeIdstatus()\n\t{\n\t\t$this->Checklogin();\n\t\t$status=$this->input->post('id');\n\t\t$senderId=$this->input->post('senderId');\n\t\n\t\t$idlist=implode(\",\",$senderId);\n\t\t\n\t\tif ($status == 0 || $status == 1)\n\t\t{\n\t\t\t$a=$this->senderid_model->changeIdstatus($status,$senderId);\n\t\t\t\t\n\t\t\tif ($status == 0)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Sender id has been deactivated successfully');\n\t\t\t\tsetAActivityLogs('Transaction_activity','AAsenderid_status','Id Deactivated List:-'.$idlist);\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Sender id has been activated successfully');\n\t\t\t\tsetAActivityLogs('Transaction_activity','AAsenderid_status','Id Activated List:-'.$idlist);\n\t\t\t}\n\t\t\techo true;\n\t\t} else\n\t\t{\n\t\t\t\t\n\t\t\t$this->session->set_flashdata('error','Something went wrong');\n\t\t\techo true;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "60f87de2683d16737d8af8cea0e7f3f9", "score": "0.5720853", "text": "public function paypal_status()\n {\n /** Get the payment ID before session clear **/\n $payment_id = Session::get('paypal_payment_id');\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n if (empty(request()->PayerID) || empty(request()->token)) {\n \\Session::put('error','Payment failed');\n return Redirect::route('account.invoices');\n }\n $payment = Payment::get($payment_id, $this->_api_context);\n /** PaymentExecution object includes information necessary **/\n /** to execute a PayPal account payment. **/\n /** The payer_id is added to the request query parameters **/\n /** when the user is redirected from paypal back to your site **/\n $execution = new PaymentExecution();\n $execution->setPayerId(request()->PayerID);\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n /** dd($result);exit; /** DEBUG RESULT, remove it later **/\n if ($result->getState() == 'approved') {\n\n //update account here\n $org_invoice_id = Session::get('org_invoice_id');\n /** clear the session payment ID **/\n Session::forget('org_invoice_id');\n $invoice = Invoice::find($org_invoice_id);\n if ($invoice->status==1) {\n Session::flash('warning','Already Approved, Please Contact Admin');\n return Redirect::route('account.invoices');\n }\n //credits user\n $invoice->amount;\n $invoice->user_id;\n //credits user\n $user = User::where('id',$invoice->user_id)->first();\n $user->credit=$user->credit+$invoice->amount;\n $user->save();\n\n //update invoice\n $invoice->status=1;\n $invoice->payment_method='PayPal';\n $invoice->save();\n\n //Email here\n $settings = Setting::first();\n $data = array(\n 'name'=>$user->name,\n 'contact_name'=>$user->contact_name,\n 'email'=>$user->email,\n 'subject'=>'Invoice Approved PayPal',\n 'amount'=>$invoice->amount,\n 'currency'=>$settings->currency_symbol,\n 'time'=> date('Y-m-d H:i:s'),\n 'invoice_number'=>$invoice->invoice_number,\n 'processor'=>'PayPal',\n 'settings' => $settings,\n\n );\n Mail::send('emails.invoice_approved',$data, function($message) use($data,$settings){\n $message->from($settings->site_email,$settings->site_name);\n $message->to($data['email'],$data['name']);//sends to user\n $message->subject($data['subject']);\n $message->bcc($settings->site_email,'Admin');//sends to admin\n // $message->reply_to();\n // $message->cc();\n });\n\n Session::flash('info', \"Credited $invoice->amount to $user->name's Account\");\n Session::flash('success', 'Thank You!. Payment was successfull.');\n return redirect(\"account/invoice/view/$org_invoice_id\");\n // \\Session::put('success','Payment Successful');\n // return Redirect::route('account.invoices');\n }\n \\Session::put('error','Payment failed');\n\n return Redirect::route('account.invoices');\n\n }", "title": "" }, { "docid": "0adb6a4a89b67852345979c7391d6e16", "score": "0.571741", "text": "public function actionSuccess()\n {\n $params = [\n 'order'=>[\n 'description'=>'na',\n 'subtotal'=>0,\n 'shippingCost'=>0,\n 'total'=>0,\n 'currency'=>'USD',\n ]\n ];\n\n // In case of payment success this will return the payment object that contains all information about the order\n // In case of failure it will return Null\n $result = false;\n $result = Yii::$app->PayPalRestApi->processPayment($params);\n $message = \"Payment declined!!\";\n $info = 'info';\n if($result!==false){\n $transaction = $result->getTransactions();\n if(!empty($transaction[0]->description)){\n $explode = explode('||',$transaction[0]->description);\n $id = $explode['1'];\n $orderId = $explode['2'];\n $contest = ContestForm::findOne(['id'=>$id,'order_id'=>$orderId]);\n if($contest->payment_status!='success'){\n $payment_date = time();\n $update = \\Yii::$app->db->createCommand(\"UPDATE contest SET payment_status='success',payment_date='\".$payment_date.\"' WHERE id='\".$id.\"' and order_id='\".$orderId.\"'\")->execute();\n // if ($update) {\n $transactionDel = new TransactionDetails();\n $transactionDel->contest_id = $id;\n $transactionDel->order_id = $orderId;\n $transactionDel->transanction_id = $result->getId();\n $transactionDel->transaction_amount = $transaction[0]->amount->total;\n $transactionDel->payment_status = 'success';\n $transactionDel->payment_date = $payment_date;\n $transactionDel->paypal_records = print_r($result, true); \n $transactionDel->save();\n $message = \"Payment successed!!\";\n $info = 'success';\n // }\n return $this->redirect(['cms-pages/paypal?success=true&paymentId='.$result->getId()]);\n }\n }\n return $this->redirect(['cms-pages/paypal?success=true&paymentId='.$result->getId()]);\n }\n\n //\\Yii::$app->session->setFlash($info,\\Yii::t('user',$message)); \n //return $this->redirect(['user/'.Yii::$app->user->getId()]); \n return $this->redirect(['cms-pages/paypal?success=false']); \n }", "title": "" }, { "docid": "db25b87eca1ca0b758fd89a6b0193585", "score": "0.56991005", "text": "public function get_status();", "title": "" }, { "docid": "0cbf1b158eb14696a86698479c6bc4bd", "score": "0.5680527", "text": "public function testReceiptsIdStatusKeyStatusIdPost()\n {\n }", "title": "" }, { "docid": "3692283d2f1685a4e6a4fe85ea60659e", "score": "0.56785333", "text": "public function run()\n {\n $orderId = isset($_REQUEST['orderId']) ? $_REQUEST['orderId'] : '';\n $status = isset($_REQUEST['status']) ? $_REQUEST['status'] : '';\n\n $order = Order::model()->findByPk($orderId);\n //var_dump($order);exit;\n // echo $status;exit;\n if (isset($order))\n {\n if($status != 1)\n {\n //echo 123;\n if($order->order_status != 1)\n {\n //echo 123;exit;\n if($status == 2)\n {\n //echo 123;\n $order->order_status = Constants::STATUS_IN_PROCESS;\n if ($order->save(false)) {\n ApiController::sendResponse(200, CJSON::encode(array(\n 'status' => 'SUCCESS',\n 'data' => '',\n 'message' => 'Update order status successful !',)));\n }\n }\n else\n {\n // echo 456;exit;\n if($order->order_status != $status)\n {\n // echo 123;exit;\n $order->order_status = Constants::STATUS_READY;\n if ($order->save(false)) {\n ApiController::sendResponse(200, CJSON::encode(array(\n 'status' => 'SUCCESS',\n 'data' => '',\n 'message' => 'Update order status successful !',)));\n }\n }\n else\n ApiController::sendResponse(200, CJSON::encode(array(\n 'status' => 'ERROR',\n 'data' => '',\n 'message' => 'Order Ready!',)));\n }\n }\n else\n ApiController::sendResponse(200, CJSON::encode(array(\n 'status' => 'ERROR',\n 'data' => '',\n 'message' => 'Order Rejected!',)));\n\n\n }\n else\n {\n //echo 456;exit;\n $order->order_status = Constants::STATUS_REJECT;\n if ($order->save(false)) {\n ApiController::sendResponse(200, CJSON::encode(array(\n 'status' => 'SUCCESS',\n 'data' => '',\n 'message' => 'Update order status successful !',)));\n }\n }\n\n } else {\n ApiController::sendResponse(200, CJSON::encode(array(\n 'status' => 'ERROR',\n 'data' => '',\n 'message' => 'Order does not exist!',)));\n exit;\n }\n\n\n }", "title": "" }, { "docid": "c7ba0ab862550991dab24621b97080d9", "score": "0.5674757", "text": "public function updStatusTrans()\n {\n\n //ngecek transaksi baru karena itu yang diambil yang statusnya bukan sama dengan 4\n\n //cek semua yang status investnya bukan 4 (tidak aktif)\n //jika status_transaction cancel or expire, \n //ubah status transaction, status invest jadi 4 (tidak aktif)\n //jika status transaction pending or settlement\n //ubah status transaction, status invest jadi 0\n\n \n\n $data = HeaderInvest::whereBetween('status_invest',[0,3])->get()->toArray();\n \n for ($i=0; $i < count($data); $i++) { \n\n $investID = $data[$i]['invest_id'];\n $lennum = strlen((string)$investID);\n if ($lennum == 4) {\n dd(\"ok\");\n }else{\n $status = \\Midtrans\\Transaction::status($data[$i]['invest_id']);\n $status = json_decode(json_encode($status),true);\n \n if ($status['transaction_status'] == \"cancel\" || $status['transaction_status'] == \"expire\") {\n DB::table('header_invests')->\n where('invest_id','=',$data[$i]['invest_id'])->\n update([\n 'status_transaction' => $status['transaction_status'],\n 'status_invest' => '4'\n ]);\n \n DB::table('header_products')\n ->leftJoin('header_invests','header_invests.project_id','=','header_products.id')\n ->where('header_invests.invest_id','=',$data[$i]['invest_id'])\n ->update([\n 'header_products.status' => '1',\n ]);\n }\n //harusnya cek status dulu status investnya dan status transaction\n else{\n //jika pending dan settlement, masih menunggu admin konfirmasi\n DB::table('header_invests')->\n where('invest_id','=',$data[$i]['invest_id'])->\n update([\n 'status_transaction' => $status['transaction_status'],\n ]);\n \n DB::table('header_products')\n ->leftJoin('header_invests','header_invests.project_id','=','header_products.id')\n ->where('header_invests.invest_id','=',$data[$i]['invest_id'])\n ->where('header_invests.status_transaction','=','pending')\n ->orwhere('header_invests.status_transaction','=','settlement')\n ->where('header_invests.status_invest','!=','5')\n ->update([\n 'header_products.status' => '2',\n ]);\n \n \n }\n }\n }\n\n \n }", "title": "" }, { "docid": "c92ea4368146be0489ff47f2814c1ffb", "score": "0.56710184", "text": "private function webHookForPaymentStatus() {\n\n $payment = Payment::find(session('payment_id'));\n $payment->status = 'paid';\n $payment->save();\n\n $order = Order::find(session('order_id'));\n $order->status = 'paid';\n $order->save();\n\n //in case failure\n if(false) {\n $this->failure();\n }\n // in this demo there is no payment gateway call so after payment details page you will be always go to default order complete page.\n return redirect('complete');\n }", "title": "" }, { "docid": "f7caf6dd3fcdcf3d61bce340979aaf2b", "score": "0.56621593", "text": "private function getParams(){\n\t\tif (!defined('MODULE_PAYMENT_PAYTM_ORDER_PENDING_STATUS_ID')) {\n\t\t$check_query = tep_db_query(\"select orders_status_id from \" . TABLE_ORDERS_STATUS . \" where orders_status_name = 'Paytm [Payment Pending]' limit 1\");\n\n\t\t\tif (tep_db_num_rows($check_query) < 1) {\n\t\t\t\t$status_query = tep_db_query(\"select max(orders_status_id) as status_id from \" . TABLE_ORDERS_STATUS);\n\t\t\t\t$status = tep_db_fetch_array($status_query);\n\n\t\t\t\t$pending_status_id = $status['status_id']+1;\n\n\t\t\t\t$languages = tep_get_languages();\n\n\t\t\t\tforeach ($languages as $lang) {\n\t\t\t\ttep_db_query(\"insert into \" . TABLE_ORDERS_STATUS . \" (orders_status_id, language_id, orders_status_name) values ('\" . $pending_status_id . \"', '\" . $lang['id'] . \"', 'Paytm [Payment Pending]')\");\n\t\t\t\t}\n\n\t\t\t\t$flags_query = tep_db_query(\"describe \" . TABLE_ORDERS_STATUS . \" public_flag\");\n\t\t\t\tif (tep_db_num_rows($flags_query) == 1) {\n\t\t\t\t\ttep_db_query(\"update \" . TABLE_ORDERS_STATUS . \" set public_flag = 0 and downloads_flag = 0 where orders_status_id = '\" . $pending_status_id . \"'\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$check = tep_db_fetch_array($check_query);\n\t\t\t\t$pending_status_id = $check['orders_status_id'];\n\t\t\t}\n\n\t\t} else {\n\t\t\t$pending_status_id = MODULE_PAYMENT_PAYTM_ORDER_PENDING_STATUS_ID;\n\t\t}\n\n\t\t// order status for pending payment orders, this will be set as default untill paytm send response back\n\t\tif (!defined('MODULE_PAYMENT_PAYTM_ORDER_FAILED_STATUS_ID')) {\n\t\t$check_query = tep_db_query(\"select orders_status_id from \" . TABLE_ORDERS_STATUS . \" where orders_status_name = 'Paytm [Payment Failed]' limit 1\");\n\n\t\t\tif (tep_db_num_rows($check_query) < 1) {\n\t\t\t\t$status_query = tep_db_query(\"select max(orders_status_id) as status_id from \" . TABLE_ORDERS_STATUS);\n\t\t\t\t$status = tep_db_fetch_array($status_query);\n\n\t\t\t\t$failed_status_id = $status['status_id']+1;\n\n\t\t\t\t$languages = tep_get_languages();\n\n\t\t\t\tforeach ($languages as $lang) {\n\t\t\t\t\ttep_db_query(\"insert into \" . TABLE_ORDERS_STATUS . \" (orders_status_id, language_id, orders_status_name) values ('\" . $failed_status_id . \"', '\" . $lang['id'] . \"', 'Paytm [Payment Failed]')\");\n\t\t\t\t}\n\n\t\t\t\t$flags_query = tep_db_query(\"describe \" . TABLE_ORDERS_STATUS . \" public_flag\");\n\t\t\t\tif (tep_db_num_rows($flags_query) == 1) {\n\t\t\t\t\ttep_db_query(\"update \" . TABLE_ORDERS_STATUS . \" set public_flag = 0 and downloads_flag = 0 where orders_status_id = '\" . $failed_status_id . \"'\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$check = tep_db_fetch_array($check_query);\n\t\t\t\t$failed_status_id = $check['orders_status_id'];\n\t\t\t}\n\n\t\t} else {\n\t\t\t$failed_status_id = MODULE_PAYMENT_PAYTM_ORDER_FAILED_STATUS_ID;\n\t\t}\n\n\n\t\t// order status on success\n\t\tif (!defined('MODULE_PAYMENT_PAYTM_ORDER_STATUS_ID')) {\n\t\t$check_query = tep_db_query(\"select orders_status_id from \" . TABLE_ORDERS_STATUS . \" where orders_status_name = 'Paytm [Success]' limit 1\");\n\n\t\t\tif (tep_db_num_rows($check_query) < 1) {\n\t\t\t\t$status_query = tep_db_query(\"select max(orders_status_id) as status_id from \" . TABLE_ORDERS_STATUS);\n\t\t\t\t$status = tep_db_fetch_array($status_query);\n\n\t\t\t\t$tx_status_id = $status['status_id']+1;\n\n\t\t\t\t$languages = tep_get_languages();\n\n\t\t\t\tforeach ($languages as $lang) {\n\t\t\t\ttep_db_query(\"insert into \" . TABLE_ORDERS_STATUS . \" (orders_status_id, language_id, orders_status_name) values ('\" . $tx_status_id . \"', '\" . $lang['id'] . \"', 'Paytm [Success]')\");\n\t\t\t\t}\n\n\t\t\t\t$flags_query = tep_db_query(\"describe \" . TABLE_ORDERS_STATUS . \" public_flag\");\n\t\t\t\tif (tep_db_num_rows($flags_query) == 1) {\n\t\t\t\t\ttep_db_query(\"update \" . TABLE_ORDERS_STATUS . \" set public_flag = 0 and downloads_flag = 0 where orders_status_id = '\" . $tx_status_id . \"'\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$check = tep_db_fetch_array($check_query);\n\t\t\t\t$tx_status_id = $check['orders_status_id'];\n\t\t\t}\n\n\t\t} else {\n\t\t\t$tx_status_id = MODULE_PAYMENT_PAYTM_ORDER_STATUS_ID;\n\t\t}\n\n\n\t\t$params = array();\n\t\t$sort_order = 0;\n\n\t\t// Module status\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Enable Paytm Module',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_STATUS',\n\t\t\t\t\t\t'configuration_value'\t\t=> 'True',\n\t\t\t\t\t\t'configuration_description'=> 'Do you want to accept Paytm payments?',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'set_function'\t\t\t\t\t=> 'tep_cfg_select_option(array(\\'True\\', \\'False\\'), ',\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Merchant Id\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Merchant ID',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_MERCHANT_ID',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Merchant ID Provided by Paytm',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\n\t\t// Merchant Key\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Merchant Key',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_MERCHANT_KEY',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Merchant Secret Key Provided by Paytm',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Website\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Website',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_WEBSITE',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Website Name Provided by Paytm',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Industry Type\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Industry Type',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_INDUSTRY_TYPE_ID',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Industry Type Provided by Paytm',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Channel Id\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Channel ID',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_CHANNEL_ID',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Channel ID Provided by Paytm',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Transaction URL\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Transaction URL',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_TRANSACTION_URL',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Transaction URL Provided by Paytm',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Transaction Status URL\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Transaction Status URL',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_TRANSACTION_STATUS_URL',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Transaction Status URL Provided by Paytm',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Custom Callback URL\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Custom Callback URL',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_CUSTOM_CALLBACKURL',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Leave it blank for Default',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Paytm Payment Zone\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Paytm Payment Zone',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_ZONE',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'If a zone is selected, only enable this payment method for that zone.',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'set_function'\t\t\t\t\t=> 'tep_cfg_pull_down_zone_classes(',\n\t\t\t\t\t\t'use_function'\t\t\t\t\t=> 'tep_get_zone_class_title',\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Pending Order Status\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Paytm Set Order Status for Pending Payments',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_ORDER_PENDING_STATUS_ID',\n\t\t\t\t\t\t'configuration_value'\t\t=> $pending_status_id,\n\t\t\t\t\t\t'configuration_description'=> 'Set the status of orders made with this payment module to this value.',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'set_function'\t\t\t\t\t=> 'tep_cfg_pull_down_order_statuses(',\n\t\t\t\t\t\t'use_function'\t\t\t\t\t=> 'tep_get_order_status_name',\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Failed Order Status\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Paytm Set Order Status for Failed Payments',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_ORDER_FAILED_STATUS_ID',\n\t\t\t\t\t\t'configuration_value'\t\t=> $failed_status_id,\n\t\t\t\t\t\t'configuration_description'=> 'Set the status of orders made with this payment module to this value.',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'set_function'\t\t\t\t\t=> 'tep_cfg_pull_down_order_statuses(',\n\t\t\t\t\t\t'use_function'\t\t\t\t\t=> 'tep_get_order_status_name',\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Success Order Status\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Paytm Set Order Status for Success Payments',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_ORDER_STATUS_ID',\n\t\t\t\t\t\t'configuration_value'\t\t=> $tx_status_id,\n\t\t\t\t\t\t'configuration_description'=> 'Set the status of orders made with this payment module to this value.',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'set_function'\t\t\t\t\t=> 'tep_cfg_pull_down_order_statuses(',\n\t\t\t\t\t\t'use_function'\t\t\t\t\t=> 'tep_get_order_status_name',\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Sort Order\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Sort order of display',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_SORT_ORDER',\n\t\t\t\t\t\t'configuration_value'\t\t=> '0',\n\t\t\t\t\t\t'configuration_description'=> 'Sort order of Paytm display. Lowest is displayed first.',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Promo Code Status\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Promo Code Status',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_PROMO_CODE_STATUS',\n\t\t\t\t\t\t'configuration_value'\t\t=> 'False',\n\t\t\t\t\t\t'configuration_description'=> 'Enabling this will show Promo Code field at Checkout.',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'set_function'\t\t\t\t\t=> 'tep_cfg_select_option(array(\\'True\\', \\'False\\'), ',\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Promo Code Local Validation\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Local Validation',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_PROMO_CODE_VALIDATION',\n\t\t\t\t\t\t'configuration_value'\t\t=> 'True',\n\t\t\t\t\t\t'configuration_description'=> 'Transaction will be failed in case of Promo Code failure at Paytm\\'s end.',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'set_function'\t\t\t\t\t=> 'tep_cfg_select_option(array(\\'True\\', \\'False\\'), ',\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\t// Promo Codes\n\t\t$params[] = array(\n\t\t\t\t\t\t'configuration_title'\t\t=> 'Promo Codes',\n\t\t\t\t\t\t'configuration_key'\t\t\t=> 'MODULE_PAYMENT_PAYTM_PROMO_CODES',\n\t\t\t\t\t\t'configuration_value'\t\t=> '',\n\t\t\t\t\t\t'configuration_description'=> 'Use comma ( , ) to separate multiple codes i.e. FB50,CASHBACK10 etc.',\n\t\t\t\t\t\t'configuration_group_id'\t=> '6',\n\t\t\t\t\t\t'sort_order'\t\t\t\t\t=> ++$sort_order,\n\t\t\t\t\t\t'date_added'\t\t\t\t\t=> 'now()'\n\t\t\t\t\t);\n\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "ed62175258263d9d17d1830bf34d67c1", "score": "0.56504655", "text": "function change_payment_status($transaction_id,$payment_status){\n $data = array('payment_status' => $payment_status);\n $this->db->where('transaction_id', $transaction_id);\n $result = $this->db->update('payment_master',$data);\n if(isset($result)){\n return $result;\n }\n return null;\n }", "title": "" }, { "docid": "ce7f84eb96dcbb9ac753360ba9c6aaa5", "score": "0.56490046", "text": "function updateIntlockPayStatus($labour_id)\n\t{\n\t\t$labour_id\t\t\t =\tmysql_real_escape_string(trim($labour_id));\n\t\t//statement\n\t\t$sql\t= \"UPDATE interlock_mst SET\n\t\t\t\tpayment_status\t\t\t\t\t= 'paid',\n\t\t\t\tmodified_on\t\t\t\t\t\t= now()\n\t\t\t\tWHERE\n\t\t\t labour_id\t\t\t \t\t\t = '$labour_id' AND payment_status = 'unpaid'\n\t\t\t\t\";\n\t\t\t\t\n\t\t//execute query\n\t\t$query\t= mysql_query($sql);\n\t\t//echo $sql.mysql_error();exit;\n\t\t//test if it is running well\n\t\tif($query)\n\t\t{\n\t\t\t$data\t= 'SU';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data\t= 'ER'.mysql_error();\n\t\t}\n\t\t//return data\n\t\treturn $data;\n\t\t\n\t}", "title": "" }, { "docid": "b749576f47b7ff82ec725db479089ea4", "score": "0.5625033", "text": "function busha_wc_status_valid_for_payment( $statuses, $order ) {\n\t$statuses[] = 'wc-blockchainpending';\n\treturn $statuses;\n}", "title": "" }, { "docid": "201420df7a5b6aaebdc0853864dfce10", "score": "0.562104", "text": "function change_estimate_request_status($id, $status) {\n $this->access_only_allowed_members();\n\n if ($id && ($status == \"processing\" || $status == \"estimated\" || $status == \"hold\" || $status == \"canceled\")) {\n $data = array(\"status\" => $status);\n\n $save_id = $this->Estimate_requests_model->save($data, $id);\n if ($save_id) {\n echo json_encode(array(\"success\" => true, 'message' => lang('record_saved')));\n } else {\n echo json_encode(array(\"success\" => false, 'message' => lang('error_occurred')));\n }\n }\n }", "title": "" }, { "docid": "dd2517415b5c6056020a2466edd5239a", "score": "0.560619", "text": "function check_mobilpay_response(){\r\n\t\t$this->bpLog('response ========================================');\r\n\t\t$this->bpLog($_POST);\r\n\t\tglobal $woocommerce;\r\n\r\n\t\trequire_once 'Mobilpay/Payment/Request/Abstract.php';\r\n\r\n\t\trequire_once 'Mobilpay/Payment/Request/Card.php';\r\n\t\trequire_once 'Mobilpay/Payment/Request/Sms.php';\r\n\t\trequire_once 'Mobilpay/Payment/Request/Transfer.php';\r\n\t\trequire_once 'Mobilpay/Payment/Request/Bitcoin.php';\r\n\r\n\t\trequire_once 'Mobilpay/Payment/Request/Notify.php';\r\n\t\trequire_once 'Mobilpay/Payment/Invoice.php';\r\n\t\trequire_once 'Mobilpay/Payment/Address.php';\r\n\r\n\t\t$errorCode \t\t= 0;\r\n\t\t$errorType\t\t= Mobilpay_Payment_Request_Abstract::CONFIRM_ERROR_TYPE_NONE;\r\n\t\t$errorMessage\t= '';\r\n\t\t\r\n\t\t$msg_errors = array('16'=>'card has a risk (i.e. stolen card)', '17'=>'card number is incorrect', '18'=>'closed card', '19'=>'card is expired', '20'=>'insufficient funds', '21'=>'cVV2 code incorrect', '22'=>'issuer is unavailable', '32'=>'amount is incorrect', '33'=>'currency is incorrect', '34'=>'transaction not permitted to cardholder', '35'=>'transaction declined', '36'=>'transaction rejected by antifraud filters', '37'=>'transaction declined (breaking the law)', '38'=>'transaction declined', '48'=>'invalid request', '49'=>'duplicate PREAUTH', '50'=>'duplicate AUTH', '51'=>'you can only CANCEL a preauth order', '52'=>'you can only CONFIRM a preauth order', '53'=>'you can only CREDIT a confirmed order', '54'=>'credit amount is higher than auth amount', '55'=>'capture amount is higher than preauth amount', '56'=>'duplicate request', '99'=>'generic error');\r\n\t\t$privateKeyFilePath =trim($this->private_key);\t\t\r\n\r\n\t\tif (strcasecmp($_SERVER['REQUEST_METHOD'], 'post') == 0){\r\n\t\t\tif(isset($_POST['env_key']) && isset($_POST['data'])){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t$objPmReq = Mobilpay_Payment_Request_Abstract::factoryFromEncrypted($_POST['env_key'], $_POST['data'], $privateKeyFilePath);\r\n\t\t\t\t\t$action = $objPmReq->objPmNotify->action;\r\n\r\n\t\t\t\t\t$this->bpLog('THParams : ');\r\n\t\t\t\t\t$this->bpLog($objPmReq->params);\r\n\t\t\t\t\t$this->bpLog('Notify : ');\r\n\t\t\t\t\t$this->bpLog($objPmReq->objPmNotify);\r\n\r\n\t\t\t\t\t$params = $objPmReq->params;\r\n\t\t\t\t\t$order = new WC_Order( $params['order_id'] );\r\n\t\t\t\t\t$user = new WP_User( $params['customer_id'] );\r\n\t\t\t\t\t$transaction_id = $objPmReq->objPmNotify->purchaseId;\r\n\t\t\t\t\tif($objPmReq->objPmNotify->errorCode==0){\r\n\t\t\t\t\t\tswitch($action)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tcase 'confirmed':\r\n\t\t\t\t\t\t\t\t#cand action este confirmed avem certitudinea ca banii au plecat din contul posesorului de card si facem update al starii comenzii si livrarea produsului\r\n\t\t\t\t\t\t\t\t//update DB, SET status = \"confirmed/captured\"\r\n\t\t\t\t\t\t\t\t$errorMessage = $objPmReq->objPmNotify->errorMessage;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$amountorder_RON = $this->convertAmountToRON($order->order_total, $order->get_order_currency());\r\n\t\t\t\t\t\t\t\t$amount_paid = is_null($objPmReq->objPmNotify->originalAmount) ? 0:$objPmReq->objPmNotify->originalAmount;\r\n\t\t\t\t\t\t\t\t//$objPmReq->objPmNotify->originalAmount\r\n\t\t\t\t\t\t\t\t//original_amount – the original amount processed;\r\n\t\t\t\t\t\t\t\t//processed_amount – the processed amount at the moment of the response. It can be lower than the original amount, ie for capturing a smaller amount or for a partial credit\r\n\t\t\t\t\t\t\t\tif( $amount_paid < $amountorder_RON ) {\r\n\t\t\t\t\t //Update the order status\r\n\t\t\t\t\t\t\t\t\t$order->update_status('on-hold', '');\r\n\r\n\t\t\t\t\t\t\t\t\t//Error Note\r\n\t\t\t\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your payment transaction was successful, but the amount paid is not the same as the total order amount.<br />Your order is currently on-hold.<br />Kindly contact us for more information regarding your order and payment status.';\r\n\t\t\t\t\t\t\t\t\t$message_type = 'notice';\r\n\r\n\t\t\t\t\t\t\t\t\t//Add Customer Order Note\r\n\t\t\t\t $order->add_order_note($message.'<br />MobilPay Transaction ID: '.$transaction_id, 1);\r\n\r\n\t\t\t\t //Add Admin Order Note\r\n\t\t\t\t $order->add_order_note('Look into this order. <br />This order is currently on hold.<br />Reason: Amount paid is less than the total order amount.<br />Amount Paid was &#8358; '.$amount_paid.' RON while the total order amount is &#8358; '.$amountorder_RON.' RON<br />MobilPay Transaction ID: '.$transaction_id);\r\n\r\n\t\t\t\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t\t\t\twc_empty_cart();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tif( $order->status == 'processing' ) {\r\n\t\t\t\t\t $order->add_order_note('Payment Via MobilPay<br />Transaction ID: '.$transaction_id);\r\n\r\n\t\t\t\t\t //Add customer order note\r\n\t\t\t\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is currently being processed.<br />We will be shipping your order to you soon.<br />MobilPay Transaction ID: '.$transaction_id, 1);\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t\t\t\t\twc_empty_cart();\r\n\r\n\t\t\t\t\t\t\t\t\t\t//$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is currently being processed.';\r\n\t\t\t\t\t\t\t\t\t\t//$message_type = 'success';\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else {\r\n\r\n\t\t\t\t\t \tif( $order->has_downloadable_item() ) {\r\n\r\n\t\t\t\t\t \t\t//Update order status\r\n\t\t\t\t\t\t\t\t\t\t\t$order->update_status( 'completed', 'Payment received, your order is now complete.' );\r\n\r\n\t\t\t\t\t\t //Add admin order note\r\n\t\t\t\t\t\t $order->add_order_note('Payment Via MobilPay Payment Gateway<br />Transaction ID: '.$transaction_id);\r\n\r\n\t\t\t\t\t\t //Add customer order note\r\n\t\t\t\t\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is now complete.<br />MobilPay Transaction ID: '.$transaction_id, 1);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t//$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is now complete.';\r\n\t\t\t\t\t\t\t\t\t\t\t//$message_type = 'success';\r\n\r\n\t\t\t\t\t \t}\r\n\t\t\t\t\t \telse {\r\n\r\n\t\t\t\t\t \t\t//Update order status\r\n\t\t\t\t\t\t\t\t\t\t\t$order->update_status( 'processing', 'Payment received, your order is currently being processed.' );\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t//Add admin order noote\r\n\t\t\t\t\t\t $order->add_order_note('Payment Via MobilPay Payment Gateway<br />Transaction ID: '.$transaction_id);\r\n\r\n\t\t\t\t\t\t //Add customer order note\r\n\t\t\t\t\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is currently being processed.<br />We will be shipping your order to you soon.<br />MobilPay Transaction ID: '.$transaction_id, 1);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is currently being processed.';\r\n\t\t\t\t\t\t\t\t\t\t\t$message_type = 'success';\r\n\t\t\t\t\t \t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t\t\t\t\twc_empty_cart();\r\n\t\t\t\t\t }\r\n\t\t\t\t\t }\r\n\t\t\t\t\t\t \tbreak;\r\n\t\t\t\t\t\t case 'canceled':\r\n\t\t\t\t\t\t\t\t#cand action este canceled inseamna ca tranzactia este anulata. Nu facem livrare/expediere.\r\n\t\t\t\t\t\t\t\t//update DB, SET status = \"canceled\"\r\n\t\t\t\t\t\t\t\t$errorMessage = $objPmReq->objPmNotify->errorMessage;\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t$message = \t'Thank you for shopping with us. <br />However, the transaction wasn\\'t successful, payment wasn\\'t received.';\r\n\t\t\t\t\t\t\t\t//Add Customer Order Note\r\n\t\t\t \t$order->add_order_note($message.'<br />MobilPay Transaction ID: '.$transaction_id, 1);\r\n\r\n\t\t\t //Add Admin Order Note\r\n\t\t\t \t$order->add_order_note($message.'<br />MobilPay Transaction ID: '.$transaction_id);\r\n\r\n\t\t\t\t //Update the order status\r\n\t\t\t\t\t\t\t\t$order->update_status('cancelled', '');\r\n\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\tcase 'credit':\r\n\t\t\t\t\t\t\t\t#cand action este credit inseamna ca banii sunt returnati posesorului de card. Daca s-a facut deja livrare, aceasta trebuie oprita sau facut un reverse. \r\n\t\t\t\t\t\t\t\t//update DB, SET status = \"refunded\"\r\n\t\t\t\t\t\t\t\t$errorMessage = $objPmReq->objPmNotify->errorMessage;\r\n\t\t\t\t\t\t\t\t$message = \t'Thank you for shopping with us. <br />However, the transaction wasn\\'t successful, payment wasn\\'t received.';\r\n\t\t\t\t\t\t\t\t//Add Customer Order Note\r\n\t\t\t \t$order->add_order_note($message.'<br />MobilPay Transaction ID: '.$transaction_id, 1);\r\n\r\n\t\t\t //Add Admin Order Note\r\n\t\t\t \t$order->add_order_note($message.'<br />MobilPay Transaction ID: '.$transaction_id);\r\n\r\n\t\t\t\t //Update the order status\r\n\t\t\t\t\t\t\t\t$order->update_status('refunded', '');\r\n\t\t\t\t\t\t\t break;\t\r\n\t\t\t \t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$order->update_status('failed', '');\r\n\r\n\t\t\t\t\t\t//Error Note\r\n\t\t\t\t\t\t$message = $objPmReq->objPmNotify->errorMessage;\r\n\t\t\t\t\t\tif(empty($message) && isset($msg_errors[$objPmReq->objPmNotify->errorCode])) $message = $msg_errors[$objPmReq->objPmNotify->errorCode];\r\n\t\t\t\t\t\t$message_type = 'error';\r\n\t\t\t\t\t\t//Add Customer Order Note\r\n\t $order->add_order_note($message.'<br />MobilPay Transaction ID: '.$transaction_id, 1);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}catch(Exception $e)\r\n\t\t\t\t{\r\n\t\t\t\t\t$errorType \t\t= Mobilpay_Payment_Request_Abstract::CONFIRM_ERROR_TYPE_TEMPORARY;\r\n\t\t\t\t\t$errorCode\t\t= $e->getCode();\r\n\t\t\t\t\t$errorMessage \t= $e->getMessage();\r\n\t\t\t\t}\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\t$errorType \t\t= Mobilpay_Payment_Request_Abstract::CONFIRM_ERROR_TYPE_PERMANENT;\r\n\t\t\t\t$errorCode\t\t= Mobilpay_Payment_Request_Abstract::ERROR_CONFIRM_INVALID_POST_PARAMETERS;\r\n\t\t\t\t$errorMessage \t= 'mobilpay.ro posted invalid parameters';\r\n\t\t\t}\r\n\t\t}else \r\n\t\t{\r\n\t\t\t$errorType \t\t= Mobilpay_Payment_Request_Abstract::CONFIRM_ERROR_TYPE_PERMANENT;\r\n\t\t\t$errorCode\t\t= Mobilpay_Payment_Request_Abstract::ERROR_CONFIRM_INVALID_POST_METHOD;\r\n\t\t\t$errorMessage \t= 'invalid request method for payment confirmation';\r\n\t\t}\r\n\t\t$this->bpLog('errorType: '.$errorType.' -- errorCode: '.$errorCode.' -- errorMessage: '.$errorMessage);\r\n\t\theader('Content-type: application/xml');\r\n\t\techo \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\";\r\n\t\tif($errorCode == 0)\r\n\t\t{\r\n\t\t\techo \"<crc>{$errorMessage}</crc>\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"<crc error_type=\\\"{$errorType}\\\" error_code=\\\"{$errorCode}\\\">{$errorMessage}</crc>\";\r\n\t\t\t\r\n\t\t}\t\r\n\t\twc_empty_cart();\r\n\t\tdie();\r\n\t}", "title": "" }, { "docid": "1863d1bf9383fdd1e151645dd9150a31", "score": "0.5594907", "text": "public function update_task_status() {\n\t\n\t\tif($this->input->post('type')=='update_status') {\t\t\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\t\t\n\t\t\t\n\t\t$data = array(\n\t\t'task_progress' => $this->input->post('progres_val'),\n\t\t'task_status' => $this->input->post('status'),\n\t\t);\n\t\t$id = $this->input->post('task_id');\n\t\t$result = $this->Timesheet_model->update_task_record($data,$id);\n\t\tif ($result == TRUE) {\n\t\t\t$Return['result'] = $this->lang->line('xin_success_task_status');\n\t\t} else {\n\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t}\n\t\t$this->output($Return);\n\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "51a511c68ef65cba204543b3b30f8a12", "score": "0.55945534", "text": "function process_status($action)\n {\t \n\t\tif ($action->action_life == 'once')\n\t\t{\n\t\t\t$status = 'complete';\n\t\t}\n\t\telseif ($action->action_life == 'daily')\n\t\t{\n\t\t\t$status = 'sent';\n\t\t}\n\t\telseif ($action->action_life == 'hourly')\n\t\t{\n\t\t\t$status = 'sent';\n\t\t}\n\t\telseif ($action->action_life == 'constant')\n\t\t{\n\t\t\t$status = 'waiting';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$status = 'complete';\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$update_action = $this->actions_model->update_action($action->action_id, array('status' => $status, 'completed_at' => unix_to_mysql(now())));\n }", "title": "" }, { "docid": "f48c22c266180ce362212f4abcfa41c8", "score": "0.5592768", "text": "public function status(){\n $reference_no = $_POST['pesapal_merchant_reference'];\n $tracking_id = $_POST['pesapal_transaction_tracking_id'];\n $model= $this->getModel('donate');\n $status= $model->viewProgress($tracking_id,$reference_no);\n $status = explode(',', $status);\n\n //print_r($status);\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $fields = array($db->quoteName('status').'='.$db->quote($status[2]),\n $db->quoteName('method').'='.$db->quote($status[1]),\n $db->quoteName('tracking_id').'='.$db->quote($tracking_id),\n );\n\n $conditions = array($db->quoteName('reference').'='.$db->quote($reference_no));\n\n $query->update($db->quoteName('#__donation'))\n ->set($fields)\n ->where($conditions);\n $db->setQuery($query)->execute();\n\n echo json_encode($status);\n JFactory::getApplication()->close();\n }", "title": "" }, { "docid": "13b3a0aaa95f157d85175e4e8d2bf19b", "score": "0.5585558", "text": "public function getResponseStatus () {}", "title": "" }, { "docid": "13b3a0aaa95f157d85175e4e8d2bf19b", "score": "0.5585558", "text": "public function getResponseStatus () {}", "title": "" }, { "docid": "0973cf776806f055b26e037a038ae20e", "score": "0.5582555", "text": "public function COMPLETE_PAY($pay)\n {\n //check if user is an admin\n if(auth()->user()->id > 7){return redirect('/home');}\n \n \n \n \n $data = payment::find($pay);\n \n \n $user = \\App\\Models\\User::find($data->user_id);\n $TDM3 = \\App\\Models\\DM3tree::all()->where('user_id',$user->id)->sum('balance')*0.1;\n \n $balance = \\App\\Models\\payment::where('user_id',$user->id)\n ->where('DETAIL','REDEEM_DM3')\n ->where('STATUS','!=','CANCEL')->sum('AMOUNT');\n if(($TDM3 - ($balance+ $data['AMOUNT'])) < 0){\n $data->STATUS= 'CANCEL';\n $data->save();\n dd(\"Warning Negative Amount DM3 Redee\"\n . \" Overflow. System Automatically Reject Redeem\"); \n }\n \n \n \n \n \n //dd($data);\n $data->STATUS= 'COMPLETE';\n $data->save();\n \n return redirect('/redeemMGT');\n \n }", "title": "" }, { "docid": "402fe939df0a118240a4de5a2f5cc339", "score": "0.5581786", "text": "function buyertimeAccept()\n {\n $user_id = $this->input->post('user_id');\n $order_id = $this->input->post('order_id');\n $status = $this->input->post('status');\n\n $this->formValidation(\"User Id\",$user_id,\"required\");\n $this->formValidation(\"Order Id\",$order_id,\"required\");\n $this->formValidation(\"Status\",$status,\"required\");\n \n $check_now = $this->Api_model->OrderList(array('buyer_id='=>$user_id,'id'=>$order_id))->row();\n \n if(empty($check_now))\n {\n $data['status']=\"0\";\n $data['message']=\"Record not found\";\n }\n else\n {\n\n $seller_id = $check_now->seller_id;\n $orderStatus = $check_now->order_status;\n\n if($status==2)\n {\n $Data=array( \n \n 'time_status'=>'2', \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n \n if($request_id=$this->Api_model->Orders(array('id'=>$order_id,'buyer_id'=>$user_id),$Data))\n {\n $data['status']=\"1\"; \n $data['message']=\"Accepted Successfully\";\n\n $this->prepreFcm('timeSelleraccept',array('user_id'=>$seller_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\"; \n $data['message']=\"Something went wrong\";\n }\n }\n \n if($status==3)\n {\n $Data=array( \n \n 'time_status'=>'3', \n 'updated_at'=>date('Y-m-d H:i:s')\n \n );\n \n if($request_id=$this->Api_model->Orders(array('id'=>$order_id,'buyer_id'=>$user_id),$Data))\n {\n $data['status']=\"1\"; \n $data['message']=\"Rejected Successfully\";\n\n $this->prepreFcm('timeSellerreject',array('user_id'=>$seller_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\"; \n $data['message']=\"Something went wrong\";\n }\n }\n }\n \n header( 'Content-type:application/json');\n print json_encode( $data); \n exit; \n }", "title": "" }, { "docid": "b64a6bfd28eeef0f09d4352abf22ef48", "score": "0.5578463", "text": "public function savetxnstatus() {\n\t\trequire_once(DIR_SYSTEM . 'paytm/encdec_paytm.php');\n\n\t\t$this->load->model('extension/payment/paytm');\n\t\t$this->load->language('extension/payment/paytm');\n\n\t\t$json = array(\"success\" => false, \"response\" => '', 'message' => $this->language->get('text_response_error'));\n\n\t\tif(!empty($this->request->post['paytm_order_id'])){\n\t\t\t\t$reqParams = array(\n\t\t\t\t\t\"MID\" \t\t=> $this->config->get('paytm_merchant_id'),\n\t\t\t\t\t\"ORDERID\" \t=> $this->request->post['paytm_order_id']\n\t\t\t\t);\n\n\t\t\t\t$reqParams['CHECKSUMHASH'] = PaytmPayment::getChecksumFromArray($reqParams, $this->config->get(\"paytm_merchant_key\"));\n\t\t\t\t\t\n\t\t\t\t$retry = 1;\n\t\t\t\tdo{\n\t\t\t\t\t$resParams = PaytmPayment::executecUrl($this->config->get('paytm_transaction_status_url'), $reqParams);\n\t\t\t\t\t$retry++;\n\t\t\t\t} while(!$resParams && $retry < $this->max_retry_count);\n\n\t\t\t\tif($this->save_paytm_response && !empty($resParams['STATUS'])){\n\t\t\t\t\t$update_response\t=\t$this->model_extension_payment_paytm->saveTxnResponse($resParams, $this->request->post['order_data_id']); \n\t\t\t\t\tif($update_response){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$message = $this->language->get('text_response_success');\n\t\t\t\t\t\tif($resParams['STATUS'] != 'PENDING'){\n\t\t\t\t\t\t\t$message .= sprintf($this->language->get('text_response_status_success'), $resParams['STATUS']);\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t$json = array(\"success\" => true, \"response\" => $update_response, 'message' => $message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\t\t\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}", "title": "" }, { "docid": "0cf718eb2dc5e2224b2bcabfce19af66", "score": "0.5577241", "text": "public function actionStatus()\r\n {\r\n if (isset($_GET['order_id']) && is_numeric($orderId = cf::security()->decrypt($_GET['order_id'])))\r\n $this->renderJSON(array('order_status' => cf::db()->queryScalar('SELECT status FROM orders WHERE id = ?', $orderId)));\r\n \r\n if (!isset($this->allowedIpMap[$addr = preg_replace('/\\d+$/', '*', $ip = $_SERVER['REMOTE_ADDR'])]))\r\n throw new CException('[HACK] Status request comes from an untrusted IP: %s', $ip);\r\n \r\n if (is_null($system = cf::app()->getComponent($currency = $this->allowedIpMap[$addr])))\r\n throw new CException('[HACK] Status request specifies an invalid system_id: %s', $currency);\r\n \r\n if ($system->acceptStatus($orderId, $amount, $account, $batch, $error) !== true)\r\n throw new CException('[HACK] Status request error: %s', $error);\r\n \r\n if (!is_array($order = cf::db()->queryRow('SELECT O.*, A.name, A.email, A.messenger FROM orders O LEFT JOIN accounts A ON A.id = O.account_id WHERE O.id = ?', $orderId)))\r\n throw new CException('[HACK] Status request data has been forged: %s', $orderId);\r\n \r\n // Add parameters\r\n $order['batch'] = $batch;\r\n $order['account'] = $account;\r\n $order['amount'] = $amount;\r\n $order['currency'] = $currency;\r\n \r\n // mail('sergeymorkovkin@gmail.com', 'DEBUG', print_r($order, true));\r\n \r\n if ($amount < $order['price'] / ($order['type'] === 'custom' ? 2 : 1))\r\n throw new CException('[HACK] Payment amount is lower than order price');\r\n \r\n // Update order status\r\n cf::db()->execute('UPDATE orders SET status = ? WHERE id = ?', 'PAID', $orderId);\r\n \r\n // Create history record\r\n cf::db()->execute('INSERT INTO history SET account_id = ?, product_id = ?, order_id = ?, type = ?, param_1 = ?, param_2 = ?, param_3 = ?, created = ?', $order['account_id'], $order['product_id'], $order['id'], 'PAYMENT_RECEIVED', $amount, $account, $batch, time());\r\n \r\n // Different order types\r\n if (($type = strtolower($order['type'])) !== 'download')\r\n {\r\n // Create helpdesk ticket\r\n cf::helpdesk()->createTicket(\"{$order['name']} <{$order['email']}>\", \"NEW: {$order['project_name']}\", $order['project_task']);\r\n \r\n // Send email message\r\n cf::email()->sendMessage($type . '.order.inwork', $order['email'], $order);\r\n }\r\n else\r\n {\r\n // Download order parameters\r\n $order['link'] = cf::app()->createUrl('//stage/download', array('hash' => cf::security()->encrypt($order['id'])));\r\n \r\n // Send email message\r\n cf::email()->sendMessage('download.order.closed', $order['email'], $order);\r\n }\r\n \r\n // Clear cached catalog\r\n cf::cache()->set('data', null);\r\n }", "title": "" }, { "docid": "7faa67a612dfc108003f84c28f7dbf5f", "score": "0.5571048", "text": "abstract public function status();", "title": "" }, { "docid": "15d4d9298ff1a0820c78440cd1539181", "score": "0.55699897", "text": "function paymentStatusInWords($status){\n if ($status){\n return \"Paid\";\n } else {\n return \"Not paid\";\n }\n}", "title": "" }, { "docid": "660aa709e196a75eebda2630f9fd41b1", "score": "0.55660325", "text": "public function get_status($transaction_id)\n\t{\n\t\t\n\t\t$timestamp = date('Y-m-d\\TH:i:s') . '.0Z';\n\t\t$signature = $this->_get_signature($timestamp, $this->_ci->config->item('ideal_merchant_id'), $this->_ci->config->item('ideal_sub_id'), $transaction_id);\n\t\t\n\t\t$xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . self::NEW_LINE . self::NEW_LINE;\n\t\t$xml .= '<AcquirerStatusReq xmlns=\"http://www.idealdesk.com/Message\" version=\"1.1.0\">' . self::NEW_LINE;\n\t\t$xml .= '<createDateTimeStamp>' . $timestamp . '</createDateTimeStamp>' . self::NEW_LINE;\n\t\t$xml .= '<Merchant>' . self::NEW_LINE;\n\t\t$xml .= '<merchantID>' . $this->_ci->config->item('ideal_merchant_id') . '</merchantID>' . self::NEW_LINE;\n\t\t$xml .= '<subID>' . $this->_ci->config->item('ideal_sub_id') . '</subID>' . self::NEW_LINE;\n\t\t$xml .= '<authentication>SHA1_RSA</authentication>' . self::NEW_LINE;\n\t\t$xml .= '<token>' . $this->_get_fingerprint() . '</token>' . self::NEW_LINE;\n\t\t$xml .= '<tokenCode>' . $signature . '</tokenCode>' . self::NEW_LINE;\n\t\t$xml .= '</Merchant>' . self::NEW_LINE;\n\t\t$xml .= '<Transaction>' . self::NEW_LINE;\n\t\t$xml .= '<transactionID>' . $transaction_id . '</transactionID>' . self::NEW_LINE;\n\t\t$xml .= '</Transaction>' . self::NEW_LINE;\n\t\t$xml .= '</AcquirerStatusReq>' . self::NEW_LINE;\n\n\t\t$tree = $this->_request($xml);\n\t\t\t\t\n\t\tif ($this->_verify_response($tree) === FALSE)\n\t\t{\n\t\t\tlog_message('error', 'iDeal error: Can\\'t verify status response.');\n\t\t\treturn FALSE;\n\t\t}\t\n\t\t\n\t\treturn (string) strtolower($tree->Transaction->status);\n\t\t\n\t}", "title": "" }, { "docid": "5fd90aaab986858d249787838349d746", "score": "0.55617064", "text": "public function payment($id){\n // foreach($transaksi as $item){\n // if($item->timeout < date('Y-m-d H:i:s') & $item->status == 'unverified'){\n // $item->status = 'expired';\n // $item->save();\n // }\n // }\n // return view('transaksi', ['transaksi' => $transaksi]);\n return view('transaksi', ['transaksi' => 1]);\n }", "title": "" }, { "docid": "951e7e1a66e4f662c92f60ef60d81814", "score": "0.55575806", "text": "public function getResponseStatusMessage();", "title": "" }, { "docid": "44b0a2a0e494afdeb845c220dfef8124", "score": "0.5554429", "text": "private function parseResult()\n {\n $code = $this->statusCode;\n\n if($code == \"01\")\n {\n $this->success = true;\n $this->message = \"Paiement effectué\";\n }\n elseif($code == \"515\")\n {\n $this->success = false;\n $this->message = \"Le numéro de téléphone que vous avez entré ne possède pas de compte mobile money\";\n }\n elseif($code == \"529\")\n {\n $this->success = false;\n $this->message = \"Vous n'avez assez d'argent sur votre compte. Rechargez votre compte et réessayez\";\n }\n elseif($code == \"100\")\n {\n $this->success = false;\n $this->message = \"Echec de transaction\";\n }\n elseif($code == \"103\")\n {\n $this->success = false;\n $this->message = \"Paiement non approuvé\";\n }\n else{\n $this->success = false;\n $this->message = \"Une erreur est survenue. Veuillez recommencer SVP\";\n }\n }", "title": "" }, { "docid": "d2d725d134429d8470b4d02e498279c1", "score": "0.55519944", "text": "function vouguepay_ipn()\n {\n $res = $this->vouguepay->validate_ipn();\n $invoice_id = $res['merchant_ref'];\n $merchant_id = 'demo';\n\n if ($res['total'] !== 0 && $res['status'] == 'Approved' && $res['merchant_id'] == $merchant_id) {\n $data['status'] = 'paid';\n $data['details'] = json_encode($res);\n $this->db->where('membership_payment_id', $invoice_id);\n $this->db->update('membership_payment', $data);\n }\n }", "title": "" }, { "docid": "3a319f96b0be99a8d33f018355818e25", "score": "0.55382663", "text": "public function successCode()\n {\n return [\n 200 , 201 , 202\n ];\n }", "title": "" }, { "docid": "351e37afd46be1decdc27451a84fb13a", "score": "0.5535548", "text": "public function paymentFailed()\n {\n }", "title": "" }, { "docid": "db15e4128a0a9110e34fa294a30a224f", "score": "0.5529927", "text": "function check_wechatpay_response() {\n\n $postraw = file_get_contents(\"php://input\");\n if (empty($postraw)) {\n wp_die(\"Invalid Requirements\");\n }\n if ($this->debug) {\n $this->log('Reviece response:' . $postraw, 'Info');\n }\n\n // 验证数据信息\n $vdata = $this->verify_response($postraw);\n if ($vdata == false){\n $this->log('Wechatpay response verify faild! post:'.$postraw);\n wp_die(\"Invalid Requirements\");\n }\n if ($this->debug) {\n $this->log('Wechatpay is verified', 'Info');\n }\n\n // 支付成功\n if ($vdata['return_code'] == 'SUCCESS' || $vdata['result_code'] == 'SUCCESS') {\n\n $orderId = substr($vdata['out_trade_no'], 14, strlen($vdata['out_trade_no']));\n $order = new WC_Order($orderId);\n\n if( $order->status != 'completed'){\n $order->payment_complete();\n $order->add_order_note ('支付成功');\n update_post_meta( $orderId, 'Wechatpay Trade No.', wc_clean( $vdata['transaction_id'] ) );\n $this->log('Payment Completed! Order ID: ' . $orderId , 'Info');\n // return xml message to wechatpay\n header( 'HTTP/1.1 200 OK' );\n $response = array(\n 'return_code' => 'SUCCESS',\n 'return_msg' => ''\n );\n echo $this->array_to_xml($response);\n exit;\n }\n } else {\n $this->log('Wechatpay response faild! Return message: ' . $vdata['return_msg'] \n . ' Result code: ' . $vdata['return_code']\n . ' Result message: ' . $vdata['return_msg'] );\n wp_die('');\n }\n\n }", "title": "" }, { "docid": "1ae81080b0c427dadffc8cee3e03fcee", "score": "0.55287135", "text": "function check_PayG_response() {\n global $payg_title; global $payg_lowercase_title; ;\n global $woocommerce;\n ini_set(\"display_errors\", 0);\n \n \n $order_id = $_GET['order_id'];\n echo $order_id;exit; \n $order_data= wc_get_order( $order_id);\n $order_meta_data=$order_data->get_meta('_payg_meta_data');\n $order_meta_data=json_decode($order_meta_data,true);\n $post_array=array();\n $post_array['OrderKeyId']= $order_meta_data['OrderKeyId'];\n $post_array['MerchantKeyId']= $order_meta_data['OrderKeyId'];\n $post_array['PaymentTransactionId']= $order_meta_data['PaymentTransactionId'];\n $post_array['PaymentType']= $order_meta_data['PaymentType'];\n $post['Merchantkeyid']= $this->merchant_id; \n $post['MerchantAuthenticationKey']=$this->authentication_key;\n $post['MerchantAuthenticationToken']=$this->authentication_token;\n $header_key = $post['MerchantAuthenticationKey'].\":\".$post['MerchantAuthenticationToken'].\":M:\".$post['Merchantkeyid'];\n $response_data=$this->postApi($header_key,$post_array,$this->order_detail_url);\n add_post_meta( $order_id, '_payg_order_response', $response_data, true );\n $payg_order_response=json_decode($response_data,true);\n\n \n //get rid of time part\n $order = new WC_Order($order_id);\n if ($order_id != '') {\n if (!empty($payg_order_response['PaymentResponseCode'])) {\n try {\n\n $txstatus = $payg_order_response['PaymentResponseText'];\n $txrefno = $payg_order_response['PaymentTransactionId'];\n \n $transauthorised = false;\n\n if ($order->get_status() !== 'completed') {\n //if(strcmp($txstatus, 'SUCCESS') == 0)\n if ($txstatus == 'Approved') {\n\n $transauthorised = true;\n $this->msg['message'] = \"Thank you for shopping with us. Your account has been charged and your transaction is successful. We will be shipping your order to you soon.\";\n $this->msg['class'] = 'success';\n if ($order->get_status() == 'processing') {\n //do nothing\n } else {\n //complete the order\n $order->payment_complete($txrefno);\n //add_post_meta( $order->id, '_transaction_id', $txrefno, true );\n $order->add_order_note($payg_title.' Payment Gateway has processed the payment. Ref Number: ' . $txrefno);\n $order->add_order_note($this->msg['message']);\n $woocommerce->cart->empty_cart();\n }\n } else {\n $this->msg['class'] = 'error';\n $this->msg['message'] = \"Thank you for shopping with us. However, the transaction has been declined.\";\n\n //Here you need to put in the routines for a failed\n //transaction such as sending an email to customer\n //setting database status etc etc\n }\n\n if ($transauthorised == false) {\n $order->update_status('failed');\n $order->add_order_note('Failed');\n $order->add_order_note($this->msg['message']);\n }\n //removed for WooCOmmerce 2.0\n //add_action('the_content', array(&$this, 'showMessage'));\n }\n } catch (Exception $e) {\n // $errorOccurred = true;\n //$msg = \"Error \" . $e->getMessage();\n $this->msg['class'] = 'error';\n $this->msg['message'] = $e->getMessage();\n }\n } else {\n //Failure\n $this->msg['class'] = 'error';\n $this->msg['message'] = $_POST['ResponseText'];\n }\n } else {\n //Failure\n $this->msg['class'] = 'error';\n $this->msg['message'] = \"Attempt to forge transaction...\";\n }\n\n // $redirect_url = ($this -> redirect_page_id==\"\" || $this -> redirect_page_id==0)?get_site_url() . \"/\":get_permalink($this -> redirect_page_id);\n //For wooCoomerce 2.0\n // $redirect_url = add_query_arg( array('msg'=> urlencode($this -> msg['message']), 'type'=>$this -> msg['class']), $redirect_url );\n if (isset($txstatus) && ($txstatus == 'Successful' || $txstatus == 'successful')) {\n $redirect_url = $order->get_checkout_order_received_url();\n } else {\n $redirect_url = $order->get_cancel_order_url();\n }\n\n $redirect_url = add_query_arg(array('msg' => urlencode($this->msg['message']), 'type' => $this->msg['class']), $redirect_url);\n wp_redirect($redirect_url);\n exit;\n }", "title": "" }, { "docid": "3fede7d1b7122e8251d41802f286eb65", "score": "0.5528412", "text": "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\n \t$payment_update = Payments::where(['user_id' => Auth::user()->id, 'status' => 'processed'])->orderBy('created_at', 'desc')->limit(1)->update(['status' => 'failed']);\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/admin/top-up');\n }\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n if ($result->getState() == 'approved') {\n\n \t$payments = Payments::where(['user_id' => Auth::user()->id, 'status' => 'processed'])->orderBY('created_at', 'desc')->first();\n\n \t$user = User::find(Auth::user()->id);\n \t$user->balance = $user->balance + $payments->amount + $payments->bonus;\n \t$user->save();\n \n $payment_update = Payments::find($payments->id);\n $payment_update->status = 'success';\n $payment_update->save();\n\n /* update ref balance */\n $user = User::find(Auth::user()->id);\n if ($user->referral_id != 0) {\n $discount = DB::table('discounts')->where('user_id', $user->referral_id)->first();\n if ($discount->type == '%') {\n $ref = User::find($user->referral_id);\n $new_balance = intval($ref->referral_balance) + (intval($discount->discount)* 0.2);\n $new_balance_total = intval($ref->referral_balance_total) + (intval($discount->discount)* 0.2); \n User::where('id', $user->referral_id)->update(['referral_balance' => $new_balance, 'referral_balance_total' => $new_balance_total]);\n\n $stats = new ReferralHistory();\n $stats->referral_id = $user->id; \n $stats->user_id = $user->referral_id;\n $stats->total = $payments->amount; \n $stats->commission = (intval($discount->discount)* 0.2);\n $stats->save();\n }\n }\n\n \\Session::put('success', 'Payment success');\n return Redirect::to('/admin/top-up');\n }\n\n $payment_update = Payments::where(['user_id' => Auth::user()->id, 'status' => 'processed'])->orderBy('created_at', 'desc')->limit(1)->update(['status' => 'failed']);\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/admin/top-up');\n }", "title": "" }, { "docid": "a7d568df22e9761b938c78d1c991618d", "score": "0.55260956", "text": "public function index()\n\t{\n\t\t$json_result = file_get_contents('php://input');\n\t\t$result = json_decode($json_result);\n\n\t\tif($result){\n\t\t\t$notif = $this->veritrans->status($result->order_id);\n\t\t}\n\n\t\t$transaction = $notif->transaction_status;\n\t\t$type = $notif->payment_type;\n\t\t$order_id = $notif->order_id;\n\t\t$fraud = $notif->fraud_status;\n\t\t\n\t\t$simpan = array();\n\t\t\n\t\t$status_transaksi = 0;\n\t\tif ($transaction == 'capture') {\n\t\t // For credit card transaction, we need to check whether transaction is challenge by FDS or not\n\t\t if ($type == 'credit_card'){\n\t\t if($fraud == 'challenge'){\n\t\t // TODO set payment status in merchant's database to 'Challenge by FDS'\n\t\t // TODO merchant should decide whether this transaction is authorized or not in MAP\n\t\t \terror_log(\"Transaction order_id: \" . $order_id .\" is challenged by FDS\");\n\t\t\t\t$status_transaksi = 2; //reject payment\n\t\t } \n\t\t else {\n\t\t // TODO set payment status in merchant's database to 'Success'\n\t\t \terror_log(\"Transaction order_id: \" . $order_id .\" successfully captured using \" . $type);\n\t\t\t\t$status_transaksi = 1; //complete payment\n\t\t }\n\t\t }\n\t\t }\n\t\telse if ($transaction == 'settlement'){\n\t\t // TODO set payment status in merchant's database to 'Settlement'\n\t\t\terror_log(\"Transaction order_id: \" . $order_id .\" successfully transfered using \" . $type);\n\t\t\t$status_transaksi = 1; //complete payment\n\t\t}else if($transaction == 'pending'){\n\t\t // TODO set payment status in merchant's database to 'Pending'\n\t\t\terror_log(\"Waiting customer to finish transaction order_id: \" . $order_id . \" using \" . $type);\n\t\t}else if ($transaction == 'deny') {\n\t\t // TODO set payment status in merchant's database to 'Denied'\n\t\t \t$status_transaksi = 2; //deny payment\n\t\t\terror_log(\"Payment using \" . $type . \" for transaction order_id: \" . $order_id . \" is denied.\");\n\t\t}else if ($transaction == 'expire') {\n\t\t // TODO set payment status in merchant's database to 'Denied'\n\t\t \t$status_transaksi = 7; //expired\n\t\t\terror_log(\"Payment using \" . $type . \" for transaction order_id: \" . $order_id . \" is expired.\");\n\t\t}\n\t\t$id_member = 0;\n\t\t$id_transaksi = 0;\n\t\t$chk_transaksi = $this->access->readtable('transaksi','',array('id_transaksi'=>$order_id,'transaksi.status'=>0))->row();\n\t\t$id_member = (int)$chk_transaksi->id_member;\n\t\t$id_transaksi = (int)$chk_transaksi->id_transaksi;\n\t\t\n\t\t$upd_dt = array();\n\t\n\t\t$upd_dt = array(\n\t\t\t'transaction_time' \t\t=> date('Y-m-d H:i:s', strtotime($notif->transaction_time)),\n\t\t\t'transaction_status'\t=> $transaction,\n\t\t\t'transaction_id'\t\t=> $notif->transaction_id,\n\t\t\t'status_code'\t\t\t=> $notif->status_code,\n\t\t\t'payment_types'\t\t\t=> $type,\n\t\t\t'status'\t\t\t\t=> $status_transaksi\n\t\t);\n\t\t$this->access->updatetable('transaksi', $upd_dt, array('id_transaksi' => $id_transaksi));\n\t\t\n\t}", "title": "" }, { "docid": "e1c380f5c5f420e4666dc7862e0bd347", "score": "0.55196005", "text": "public function rambu_terpasang_ubah_status($id){\n $id = IDCrypt::Decrypt($id);\n $rambu_terasang = lokasi_rambu::findOrFail($id);\n $rambu_terasang->status_pasang = 0;\n $rambu_terasang->apbn = NULL;\n $rambu_terasang->save();\n return redirect(route('rambu-terpasang-index'))->with('success', 'Status Data Rambu Terpasang Berhasil di Ubah');\n }", "title": "" }, { "docid": "e6baf59eb650295aeb815115233ad779", "score": "0.5509167", "text": "function decline_user_payment($payment_id)\r\r\n{\t\r\r\n\r\r\n\tif($payment_id)\r\r\n\t{\r\r\n\t\t\r\r\n\t$sql=\"update user_payments set is_accepted=2,is_updated=1\";\r\r\n\t\r\r\n\t$result=Execute_command($sql);\r\r\n\t}\r\r\n\telse\r\r\n\t{\r\r\n\t$_SESSION['mysql_eror']=\"Please provide data to update database\";\r\r\n\t}\r\r\n\tif($result==1)\r\r\n\t{\r\r\n\t\treturn true;\r\r\n\t}\r\r\n\telse\r\r\n\t{\r\r\n\t\t$_SESSION['mysql_eror']=$result;\r\r\n\t\treturn false;\r\r\n\t\t\r\r\n\t}\r\r\n}", "title": "" }, { "docid": "daf9dc83839ac2d86a5c89e09f8342a4", "score": "0.55083084", "text": "public function payment_process($ret)\r\n\t{\r\n\t\t$paypal_oreder = $this->session->userdata('paypal_oreder');\r\n\t\t$userId = get_userLoggedIn(\"id\");\r\n\t\tif(!empty($ret))\r\n\t\t{\r\n\t\t\t$pay_arr = array();\r\n\t\t\t$pay_arr[\"uid\"] \t\t\t= $userId;\r\n\t\t\t$pay_arr[\"s_transaction\"] \t= serialize($ret);\r\n\t\t\t$pay_arr[\"s_payment_mode\"] \t= 'paypal';\r\n\t\t\t$pay_arr[\"e_type\"] \t\t\t= 'feature service';\r\n\t\t\t$pay_arr[\"e_status\"] \t\t= 'completed';\r\n\t\t\t$pay_arr[\"i_type_id\"] \t\t= $paypal_oreder[\"service_id\"];\r\n\t\t\t\r\n\t\t\t$i_insert = $this->payment_model->add_payment($pay_arr);\r\n\t\t\tif($i_insert)\r\n\t\t\t{\r\n\t\t\t\tset_success_msg(message_line(\"saved success\")); \r\n\t\t\t\tredirect(base_url('all_service_provided'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tset_error_msg(message_line(\"saved error\"));\r\n\t\t\t\tredirect(base_url().'all_service_provided');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tset_success_msg(message_line(\"saved success\")); \r\n\t\tredirect(base_url('all_service_provided'));\r\n\t}", "title": "" }, { "docid": "a9e7d3fe4a8bbef25a7fa8c0b060c87b", "score": "0.55059266", "text": "public function updatestatus(){\n $id \t= $this->uri->segment(4);\n $status = $this->uri->segment(5);\n\t\t\n\t\t$data_to_store = array(\n\t\t\t'status' => $status\n\t\t);\n\t\t//if the insert has returned true then we show the flash message\n\t\tif($this->coupon_model->update_coupon($id, $data_to_store) == TRUE){\n\t\t\t$this->session->set_flashdata('flash_message', 'updated');\n\t\t\tredirect('admin/coupon/');\n\t\t\tdie;\n\t\t}\n//\t\techo $id.\"---\".$status;\n\t}", "title": "" }, { "docid": "44f9abaa7488207c6e3e939d7eee72c8", "score": "0.5503673", "text": "function status_dict($key) {\n\t\t$dict = array(\n\t\t\t'payment_received'=>'Payment Received',\n\t\t\t'rejected_by_buyer'=>'Rejected by Buyer',\n\t\t\t'refunded_by_seller'=>'Refunded By Seller',\n\t\t\t'donate_or_destroy'=>'Donate or Destroy',\n\t\t\t'waiting'=>'Waiting',\n\t\t\t'received'=>'Received',\n\t\t\t'sent_out'=>'Sent out',\n\t\t\t'received_with_issues'=>'Received with issues',\n\t\t\t'label_voided'=>'Label voided',\n\t\t\t);\n\t\treturn $dict[$key];\n\t}", "title": "" }, { "docid": "af2b3953b0c974f080844ff46594e1eb", "score": "0.55009824", "text": "public function check_reschedule_status($trainee_id_array, $class_id) {\n\n $pymnt_due_id_array = $this->db->select('pymnt_due_id')->from('class_enrol')\n ->where('class_id', $class_id)\n ->where('enrolment_mode', 'COMPSPON')\n ->where_in('user_id', $trainee_id_array)\n ->get()->result_array();\n\n $payment_id_arr = array();\n\n foreach ($pymnt_due_id_array as $payment) {\n\n $payment_id_arr[] = $payment['pymnt_due_id'];\n }\n if(!empty($payment_id_arr)){////added by shubhranshu tp prvent query error while payment_due_id not exist///\n $paid_array = $this->db->select('pymnt_due_id')->from('class_enrol')\n ->where('class_id', $class_id)\n ->where_in('payment_status', array(\"PARTPAID\", \"PAID\"))\n ->where_in('pymnt_due_id', $payment_id_arr)\n ->get();\n if ($paid_array->num_rows() > 0) {\n\n return array('status' => 'PAID');\n } else {\n\n return array('status' => 'NOTPAID');\n }\n }else{\n return FALSE;///added by shubhranshu tp prvent query error while payment_due_id not exist//\n }\n \n\n \n }", "title": "" }, { "docid": "a1dc173b055c7e22d520457a79ee6c63", "score": "0.5500125", "text": "public function checkStatusAction() {\n\t\t$transactions = Mage::getModel('onecheckout/transactions')->getCollection();\n\t\t$transactions->addFieldToFilter('check_status_time' , array('null' => true));\n\t\t$transactions->addFieldToFilter('response_message', array('null' => true));\n\t\t$transactions->addfieldtofilter('payment_timelimit',array('lt' => Mage::getModel('core/date')->date()));\n\t\t$transactions->setPageSize(10);\n\t\t$transactions->getCurPage(1);\n\t\t$transactions->getSelect()->reset(Zend_Db_Select::COLUMNS)->columns('invoice_no');\n\t\t$transactions->load();\n\t\tforeach ($transactions as $transaction) {\n\t\t\t$transactionArray = $transaction->toArray();\n\t\t\t$event = Mage::getModel('onecheckout/event')\n\t\t\t\t->setTransaction($transactionArray['invoice_no']);\n\t\t\t$event->checkStatusEvent();\n\t\t}\n echo 'Continue';\n\t}", "title": "" }, { "docid": "5a70cd4b23211ffe6265b0bde5478d4a", "score": "0.549385", "text": "public function CANCEL_PAY($pay)\n {\n if(auth()->user()->id > 7){return redirect('/home');}\n \n \n $data = payment::find($pay);\n //dd($data); \n $data->STATUS= 'CANCEL';\n $data->save();\n return redirect('/redeemMGT');\n }", "title": "" }, { "docid": "ca98ca84435baac172f43b521b575fb7", "score": "0.5483858", "text": "function SellerCancelledStatus()\n {\n $user_id = $this->input->post('user_id');\n $order_id = $this->input->post('order_id');\n $status = $this->input->post('status');\n\n $this->formValidation(\"User Id\",$user_id,\"required\");\n $this->formValidation(\"Order Id\",$order_id,\"required\");\n $this->formValidation(\"Status\",$status,\"required\");\n \n $Details=$this->Api_model->OrderList(array('id'=>$order_id,'seller_id'=>$user_id))->row();\n\n $check_now = $this->Api_model->HistoryList(array('order_id'=>$order_id,'history_type'=>'5'))->row();\n\n \n if(empty($check_now))\n {\n $data['status']=\"0\";\n $data['message']=\"Record not found\";\n }\n else\n {\n $Orderid = $Details->id;\n \n $buyer_id = $Details->buyer_id;\n \n $seller_id = $Details->seller_id;\n\n $orderStatus = $Details->order_status;\n \n if($status==1)\n {\n $Data=array( \n \n 'status'=>'1',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n\n $Cancelled=array(\n \n 'order_status'=>'7',\n \n 'cancelled_at'=>date('Y-m-d H:i:s')\n );\n\n $this->Api_model->Orders(array('id'=>$order_id),$Cancelled);\n \n if($this->Api_model->AddHistory(array('order_id'=>$order_id,'history_type'=>'5'),$Data))\n {\n $data['status']=\"1\";\n \n $data['message']=\"Accepted Successfully\";\n\n $this->prepreFcm('cancelBuyeraccept',array('user_id'=>$buyer_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n \n if($status==2)\n {\n $Data=array( \n \n 'status'=>'2',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n \n if($this->Api_model->AddHistory(array('order_id'=>$order_id,'history_type'=>'5'),$Data))\n {\n $data['status']=\"1\";\n \n $data['message']=\"Rejected Successfully\";\n\n $this->prepreFcm('cancelBuyerreject',array('user_id'=>$buyer_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n }\n \n header( 'Content-type:application/json');\n print json_encode( $data); \n exit; \n }", "title": "" }, { "docid": "4debab40cea62f1f0c0c94b3ba647240", "score": "0.5473364", "text": "public function parse_transaction_status($status) {\n // x/M confirming the comfirming state of tx, the M is total confirmings needed\n // SUCCESS the record is success full\n // FAIL the record failed\n $parts = explode(' ', $status);\n $status = $this->safe_string($parts, 1, $status);\n $statuses = array(\n 'Pending' => 'pending',\n 'confirming' => 'pending',\n 'SUCCESS' => 'ok',\n 'FAIL' => 'failed',\n );\n return $this->safe_string($statuses, $status, $status);\n }", "title": "" }, { "docid": "162c9101ec7348dc353f2ba555421406", "score": "0.54648834", "text": "public function transaction(){\n $id = new App_System();\n $id->_urlAjax = $_POST['url'];\n $id->setExplodeAjax();\n $id->setControllerAjax();\n $id->setActionAjax();\n $id->setParamsAjax();\n $dados = $id->getParamsAjax();\n\n $pedido = new App_Model_pedidoModel();\n $code_pedido = $pedido->pedidoCode($dados);\n\n //$status['notificationCode'] = $dados['code'];\n\n $PagSeguro = new App_pagseguro();\n $response = $PagSeguro->getStatusByReference($dados['ref']);\n\n $pedido_status = $pedido->pedidoStatus($response,$dados['ref']);\n\n\n print_r($pedido_status);\n\n\n }", "title": "" }, { "docid": "f51559e9699d3c8fff3cb8034b194292", "score": "0.5462396", "text": "function job_status($fetch)\n{\n switch($fetch)\n { \n case 1 : $status = 'pending' ;break;\n case 2 : $status = 'interview' ;break;\n case 3 : $status = 'rejected' ;break;\n case 4 : $status = 'employed' ;break;\n case 5 : $status = 'un subscribed';break;\n default : $status = 'status-error';\n }\n \n return $status;\n}", "title": "" }, { "docid": "40b240955e6dde36ebdf9cdb15f0441b", "score": "0.54576296", "text": "public function payment_status(Request $request){\n $data=$request->data;\n $pass_dataAr=explode(\"|\",$data);\n $amount=(int)$pass_dataAr[5];\n\n //validating amount\n $org_amount=(int)DB::table('user_type')\n ->join('users','users.user_type_id','user_type.user_type_id')\n ->where('users.transaction_id', $pass_dataAr[0])\n ->value('user_type.ticket_rate');\n if($org_amount==$amount){\n //update transaction status\n DB::table('users')\n ->where('transaction_id', $pass_dataAr[0])\n ->update(['transaction_status' => $pass_dataAr[3]]);\n\n $mailto=DB::table('users')\n ->where('transaction_id', $pass_dataAr[0])\n ->value('email');\n\n //send confirmation mail\n $sent = Mail::send('mail',compact('pass_dataAr'), function($message) use ($pass_dataAr,$mailto) {\n $message->to($mailto)->subject('Swatantra - Registration Confirmation');\n $message->from('reg.swatantra2017@gmail.com');\n });\n }\n else{\n //update transaction status\n DB::table('users')\n ->where('transaction_id', $pass_dataAr[0])\n ->update(['transaction_status' => 'Amount mismatch!']);\n }\n\n return view('payment_status')->with('pass_dataAr',$pass_dataAr);\n }", "title": "" }, { "docid": "eeb49949fea98727476cefe63626a493", "score": "0.54540426", "text": "public function getPayStatus()\n {\n return $this->pay_status;\n }", "title": "" }, { "docid": "d9521fb171ad25204ff17d755d6020c9", "score": "0.5452464", "text": "protected function process_response($raw_request, $raw_response)\n\t{\n\t\t$transaction = new Payment_Transaction;\n\t\t$response = explode(\n\t\t\t$this->_authnet_values['x_delim_char'],\n\t\t\t$raw_response\n\t\t);\n\t\tswitch ($response[0])\n\t\t{\n\t\t\tcase 1:\n\t\t\t\t$response_code = Payment::STATUS_ID_SUCCESSFUL;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tswitch ($response[2])\n\t\t\t\t{\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_PICK_UP_CARD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 37:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_INVALID_CARD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 27:\n\t\t\t\t\tcase 127:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_AVS_MISMATCH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 65:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_CARD_CODE_MISMATCH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_DECLINED;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tswitch ($response[2])\n\t\t\t\t{\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_EXPIRED_CARD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\tcase 10:\n\t\t\t\t\tcase 37:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_INVALID_CARD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 11:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_DUPLICATE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 15:\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_TRANS_ID_INVALID;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 47:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_INVALID_SETTLEMENT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 50:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_AWAITING_SETTLEMENT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 78:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_CARD_CODE_MISMATCH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 128:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_INVALID_TRANSACTION;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$response_code = Payment::STATUS_ID_UNKNOWN;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$transaction->raw_response_code = $response[0];\n\t\t$transaction->raw_reason_code = $response[2];\n\t\t$transaction->response_code = $response_code;\n\t\t$transaction->reason_text = $response[3];\n\t\t$transaction->gateway_reference_id =\n\t\t\t($this->test_mode()) ? self::DEV_GATEWAY_ID : $response[6];\n\n\t\t// Use our value for the total if we are issuing a test request.\n\t\t// We must do this because Authorize.net returns 0.00 for test requests.\n\t\t$transaction->total =\n\t\t\t$this->_authnet_values['x_test_request'] == 'TRUE'\n\t\t\t? $this->_authnet_values['x_amount']\n\t\t\t: $response[9];\n\n\t\t$transaction->approval = $response[4];\n\t\t$transaction->avs_verified = \n\t\t\t($response[5] == 'X' OR $response[5] == 'Y') ? 'Y' : 'N';\n\t\t$transaction->cvv2_verified\n\t\t\t= $response[38] == 'M' ? 'Y' : 'N';\n\n\t\t$transaction->vendor_id = Payment::VENDOR_ID_AUTHORIZE;\n\n\t\t// Calculate and verify the md5 hash for verification\n\t\t$md5 = md5(\n\t\t\t$this->_config['md5'].\n\t\t\t$this->_authnet_values['x_login'].\n\t\t\t$response[6].\n\t\t\tnumber_format($this->_authnet_values['x_amount'], 2)\n\t\t);\n\n\t\tif (strtoupper($md5) != $response[37])\n\t\t{\n\t\t\tthrow new Payment_Exception(\n\t\t\t\t'MD5 Mismatch!'\n\t\t\t);\n\t\t}\n\n\t\t$transaction->md5_verified =\n\t\t\tstrtolower($md5) == strtolower($response[37]);\n\n\t\treturn $transaction;\n\t}", "title": "" }, { "docid": "a9bdde32eb734b5d1a0d5eeb4f825e8a", "score": "0.5451549", "text": "public function transaction_approved();", "title": "" }, { "docid": "a70739e35b6ee9abc1226312439118fa", "score": "0.5448609", "text": "function status($id) {\n\t\t$result = QPConnectorFactory::getConnector()->request($this->mode.$id);\t\t\n\n\t\treturn json_decode($result, true);\t\t\t\n\t}", "title": "" }, { "docid": "88c8d00cb44303932510e90618cd3d8f", "score": "0.54428136", "text": "function change_subscription_status( $profile_id, $new_status ) {\n\n\t\tif ( $this->status = 'testing' ) :\n\t\t\t$curlurl = 'https://secure-test.worldpay.com/wcc/iadmin';\n\t\telse :\n\t\t\t$curlurl = 'https://secure.worldpay.com/wcc/iadmin';\n\t\tendif;\n\n\t\tswitch( $new_status ) {\n\t\t\tcase 'Cancel' :\n\t\t\t\t$new_status_string = __( 'cancelled', WPD_Subscriptions::$text_domain );\n\n\t\t\t\t$api_request = 'instId=' . urlencode( $this->remoteid )\n\t\t\t\t\t\t\t. '&authPW=' . urlencode( $this->remotepw )\n\t\t\t\t\t\t\t. '&futurePayId=' . $profile_id\n\t\t\t\t\t\t\t. '&op-cancelFP=';\n\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$ch = curl_init();\n\t\tcurl_setopt( $ch, CURLOPT_URL, $curlurl );\n\t\tcurl_setopt( $ch, CURLOPT_VERBOSE, 1 );\n\n\t\t// Set the API parameters for this transaction\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $api_request );\n\n\t\t// Request response from WorldPay\n\t\t$response = curl_exec( $ch );\n\n\t\tif( $response != 1 ) :\n\n\t\t\t$content = 'There was a problem cancelling the subscription with the FuturePay ID ' . $profile_id . '. WorldPay returned the error ' . print_r( $response,TRUE ) . '. Please contact WorldPay for more information about this error.';\n\n\t\t\tmail( $this->worldpaydebugemail ,'WorldPay FuturePay Cancellation Failure', $content );\n\n\t\tendif;\n\n\t\tcurl_close( $ch );\n\t}", "title": "" }, { "docid": "c09a3ab9f9fdeead31cc2b989b34ec4b", "score": "0.5441258", "text": "function payment_success() {\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$status=$_POST['status'];\n\n\t\t\t\t$txnid=$_POST['txnid'];\n\t\t\t\t$amount=$_POST['amount'];\n\t\t\t\t$fullname=$_POST['firstname'].' '.$_POST['lastname'];\n\t\t\t\t$mihpayid=$_POST['mihpayid'];\n\t\t\t\t$issuing_bank=$_POST['issuing_bank'];\n\t\t\t\t$card_type=$_POST['card_type'];\n\t\t\t\tif($_POST['udf1'] == ''){\n\t\t\t\t\t$userid = $_SESSION[\"user\"];\n\t\t\t\t} else {\n\t\t\t\t\t$userid = $_POST['udf1'];\n\t\t\t\t}\n\t\t\t\t$occupation=$_POST['occupation'];\n\t\t\t\t\n\t\t\t\tif($_POST['phone'] == ''){\n\t\t\t\t\t$contactno=$_POST['contact_no'];\n\t\t\t\t} else {\n\t\t\t\t\t$contactno=$_POST['phone'];\n\t\t\t\t}\n\t\t\t\t$email=$_POST['email'];\n\t\t\t\t\n\t\t\t\t/* Insert into User Transaction Table */\n\t\t\t\t$table_name = \"user_transaction\";\n\t\t\t\t\n\t\t\t\t$wpdb->insert( $table_name, array(\n\t\t\t\t//'product_info' => $product,\n\t\t\t\t'userid'=>$userid,\n\t\t\t\t'eventid'=>$_GET['reg'],\n\t\t\t\t'transactionid' => $txnid,\n\t\t\t\t'amount'=>$amount,\n\t\t\t\t'status'=>$status,\n\t\t\t\t'pay_id'=>$mihpayid,\n\t\t\t\t'issuing_bank'=>$issuing_bank,\n\t\t\t\t'card_type'=>$card_type\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$updateTable = \"user_events\";\n\t\t\t\t$querys3=\"Select * from user WHERE userid='\".$userid.\"'\";\n\t\t\t\t$query_run3 = $wpdb->get_results($querys3);\n\t\t\t\t$age_year = $query_run3[0]->age_year;\n\t\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE user_events SET payment='\".$status.\"' WHERE userid='\".$userid.\"' and eventid='\".$_GET['reg'].\"' \"));\n\n\t\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE user SET status='\".$status.\"' WHERE userid='\".$userid.\"' \"));\n\t\t\t\t\n\t\t\t\t$contactno=$_POST['phone'];\n\t\t\t\t$fullname=$_POST['firstname'].' '.$_POST['lastname'];\n\t\t\t\t\n\t\t\t\t$eveId = $_GET['reg'];\n\t\t\t\t$pageID = $eveId;\n\t\t\t\t$page = get_post($pageID);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$querys2=\"Select * from user WHERE userid='\".$userid.\"'\";\n\t\t\t\t$query_run2 = $wpdb->get_results($querys2);\n\t\t\t\t$participant_no = $query_run2[0]->participant_no;\n\t\t\t\t$bip_no = $query_run2[0]->bip_no;\n\t\t\t\t$geared_name = $query_run2[0]->geared;\n\t\t\t\t$cyclothon_type = $query_run2[0]->cyclothon_type;\n\t\t\t\t$gender = $query_run2[0]->gender;\n\t\t\t\t$occp = $query_run2[0]->occupation;\n\t\t\t\t$timeslot = '';\n\t\t\t\tif($query_run2[0]->category == '6to7')\n\t\t\t\t{\n\t\t\t\t\t$timeslot = '6:00 To 7:00 AM';\n\t\t\t\t} else {\n\t\t\t\t\t$timeslot = '7:00 To 8:00 AM';\n\t\t\t\t}\n\t\t\t\t/*if($gender == 0){\n\t\t\t\t\t$gender = 'Male';\n\t\t\t\t} else if($gender == 1){\n\t\t\t\t\t$gender = 'Female';\n\t\t\t\t} else {\n\t\t\t\t\t$gender = '';\n\t\t\t\t}*/\n\t\t\t\t$category_name_final = '';\n\t\t\t\t\n\t\t\t\t$subject = 'PAYMENT SUCCESSFUL - REGISTRATION CONFIRMED';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$body = '\n <b>Congratulations! Your registration for Obstacle Circuit Workshop has been confirmed. Here are the details of your transaction for your reference:</b><br /><br />\n \n\n Name: '.$fullname.'<br />\n Mobile: '.$contactno.'<br />\n Email: '.$email.'<br />\n Occupation: '.$occp.'<br />\n Gender: '.$gender.'<br />\n Time Slot: '.$timeslot.'<br />\n Event: Obstacle Circuit Workshop<br />\n\t\t\t\t\t\tAmount: '.$amount.'<br /><br />\n\t\t\t\t\t\t\n\t\t\t\t\t\tPlease note that the paid amount is non-transferable and non-refundable under any circumstances.<br /><br /><br />\n\n \n Regards,<br />\n Extreme Fitness\n ';\n $to = $email;\n $toName = $fullname;\n //$toName = $this->data['firstname'].\" \".$this->data['lastname'];\n \n\n $from = 'contact@jpsport.in';\n\t\t\t\t\t\t$fromName = 'Jpsports';\n\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n $headers .= 'From: '.$from.\" <\".$fromName.\">\\r\\n\";\n $headers .= 'Cc:contact@jpsport.in' . \"\\r\\n\";\n\n\t\t\t\t\t\t/*echo $to;\n echo $subject;\n\t\t\t\t\t\techo $body;\n echo $headers;\n\t\t\t\t\t\texit;*/\n mail($to,$subject,$body,$headers);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t$eveResult = get_post($eveId); \n\t\t\t\t\t\t$eveTitle = $eveResult->post_title;\n\t\t\t\t\t\n\t\t\t\t\t\techo \"<div id='slider1' style='background:url(\".site_url().\"/wp-content/themes/jpsports/images/new-crop.jpg) no-repeat scroll center center / cover rgba(0, 0, 0, 0)'>\n\t\t\t\t\t\t<div class='top-bar'><a href='\".site_url().\"'><img src='\".site_url().\"/wp-content/themes/jpsports/images/logo.png'></a></div>\n\t\t\t\t\t\t</div><div class='payment-success'>\n\t\t\t\t\t\t<div class='thank-you-msg'>Thank you</div><br>\n\t\t\t\t\t\t<p>Payment is successfully received towards your registration for</p><br>\n\t\t\t\t\t\t<div class='success-title'>Obstacle Circuit Workshop</div></div>\";\n\t\t\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "b10b7e1617ab00c44f3c8aa09c282189", "score": "0.5433495", "text": "function status() {\n\n if (isSet($_POST['pos_id']) AND isSet($_POST['session_id']) AND isSet($_POST['ts']) AND isSet($_POST['sig'])) {\n\n //@file_put_contents(APP.'/platstatus.txt', serialize($_POST));\n\n $pos = Configure::read('Payments.platnoscipl.pos_' . $_POST['pos_id']);\n $sig = md5($_POST['pos_id'] . $_POST['session_id'] . $_POST['ts'] . $pos['2keyMD5']);\n if ($sig == $_POST['sig']) {\n //@file_put_contents(APP.'/plat_status_OK.txt', serialize($_POST));\n\n $action = $this->Payment->read_status($_POST['session_id'], $_POST['pos_id']);\n\n if ($action == 'payment_done') {\n //wyślij email potwierdzający płatność\n $payment = $this->Payment->getUserPaymentData($_POST['session_id']);\n\n// $invoice_id = $this->Payment->Invoice->getInsertID();\n// $this->requestAction('/admin/invoices/emailsend/'.$invoice_id);\n\n $this->set('user', $payment);\n\n /* * ***************************************\n * KONFIGURACJA KOMPONENTU EMAIL\n * *************************************** */\n\n // Ustawienie adresu odbiorcy\n $this->FebEmail->to = $payment['User']['email'];\n\n // Ustawienie tytułu wiadomości\n $this->FebEmail->subject = '[www] '. __d('cms', 'Płatność zakończona');\n\n // Ustawienie adresu zwrotnego\n $this->FebEmail->replyTo = Configure::read('App.WebSenderEmail');\n\n // Ustawnienie adresu i nazwy nadawcy\n $this->FebEmail->from = Configure::read('Email.defaultname') . ' <' . Configure::read('Email.default') . '>';\n // Ustawnienie szablonu\n $this->FebEmail->template = 'user.payment.done';\n\n // Wyslanie wiadomosci w formie czystego tekstu\n $this->FebEmail->sendAs = 'both';\n\n //Zapisanie mail-a w bazie\n $this->FebEmail->saveMail = 1;\n $this->FebEmail->senderName = 'system';\n\n //Wyslanie wiadomosci do uzytkownika\n $email_sent = $this->FebEmail->send();\n\n if ($email_sent) {\n $this->Payment->id = $payment['Payment']['id'];\n $this->Payment->saveField('email_confirm', $payment['Payment']['email_confirm'] + 1);\n }\n } elseif ($action == 'middle_nok_step') {\n\n //wyślij email potwierdzający płatność\n $payment = $this->Payment->getUserPaymentData($_POST['session_id']);\n\n $error = @$this->Payment->platnosci_statuses[$payment['Payment']['platnosci_status']];\n $payment['Payment']['error'] = $error;\n\n $this->set('user', $payment);\n\n /* * ***************************************\n * KONFIGURACJA KOMPONENTU EMAIL\n * *************************************** */\n\n // Ustawienie adresu odbiorcy\n $this->FebEmail->to = $payment['User']['email'];\n\n // Ustawienie tytułu wiadomości\n $this->FebEmail->subject = '[www] Transakcja zakończona niepowodzeniem';\n\n // Ustawienie adresu zwrotnego\n $this->FebEmail->replyTo = Configure::read('App.WebSenderName');\n\n // Ustawnienie adresu i nazwy nadawcy\n $this->FebEmail->from = Configure::read('Email.defaultname') . ' <' . Configure::read('Email.default') . '>';\n // Ustawnienie szablonu\n $this->FebEmail->template = 'user.payment.nok';\n\n // Wyslanie wiadomosci w formie czystego tekstu\n $this->FebEmail->sendAs = 'both';\n\n //Zapisanie mail-a w bazie\n $this->FebEmail->saveMail = 1;\n $this->FebEmail->senderName = 'system';\n\n //Wyslanie wiadomosci do uzytkownika\n $email_sent = $this->FebEmail->send();\n\n if ($email_sent) {\n $this->Payment->id = $payment['Payment']['id'];\n $this->Payment->saveField('email_confirm', $payment['Payment']['email_confirm'] + 1);\n }\n }\n\n echo 'OK';\n exit;\n }\n }\n //@file_put_contents(APP.'/plat_status_NOK.txt', serialize($_POST));\n echo 'error';\n exit;\n }", "title": "" }, { "docid": "1ad3091bd66a2fb387b4d239aa9e20a7", "score": "0.54334706", "text": "public function request_status_updates() {\n\t\t$payment_ids = $this->get_incomplete_payments();\n\t\tforeach ( $payment_ids as $pid ) {\n\t\t\t$this->request_payment_status_update($pid);\n\t\t}\n\t}", "title": "" }, { "docid": "1e1c43e984fe4ef536301ad20b6f5792", "score": "0.54272735", "text": "public function getStatusCode(){\n return $this->statusCode;\n }", "title": "" }, { "docid": "5c7ea7d03a34762e7ccd2a0d8244b3a2", "score": "0.54267246", "text": "public function responseStatus(): int;", "title": "" }, { "docid": "c1f152b262a3751799199047cd796665", "score": "0.5423811", "text": "function convert_order_status($status , $raw = false) {\n\n\n if($raw){\n switch ($status) {\n case 0:\n return \"Cancelled\";\n break;\n case 1:\n return \"Processing\";\n break;\n case 2:\n return \"Confirmed Order\";\n break;\n case 3:\n return \"On Delivery\";\n break;\n case 4:\n return \"Delivered\";\n break;\n default:\n return \"Cancelled\";\n break;\n }\n }else{\n switch ($status) {\n case 0:\n return \"<span class='label label-danger'>Cancelled</span>\";\n break;\n case 1:\n return \"<span class='label label-info'>Processing</span>\";\n break;\n case 2:\n return \"<span class='label label-primary'>Confirmed Ordered</span>\";\n break;\n case 3:\n return \"<span class='label label-warning'>On Delivery</span>\";\n break;\n case 4:\n return \"<span class='label label-success'>Delivered</span>\";\n break;\n default:\n return \"<span class='label label-danger'>Cancelled</span>\";\n break;\n }\n }\n }", "title": "" }, { "docid": "9785ca7871e56f7a981749e33d232a42", "score": "0.5422588", "text": "function BuyerCancelledStatus()\n {\n $user_id = $this->input->post('user_id');\n $order_id = $this->input->post('order_id');\n $status = $this->input->post('status');\n\n $this->formValidation(\"User Id\",$user_id,\"required\");\n $this->formValidation(\"Order Id\",$order_id,\"required\");\n $this->formValidation(\"Status\",$status,\"required\");\n \n $Details=$this->Api_model->OrderList(array('id'=>$order_id,'buyer_id'=>$user_id))->row();\n\n $check_now = $this->Api_model->HistoryList(array('order_id'=>$order_id,'history_type'=>'5'))->row();\n\n \n if(empty($check_now))\n {\n $data['status']=\"0\";\n $data['message']=\"Record not found\";\n }\n else\n { \n\n //$order_id = $Details->id;\n \n $buyer_id = $Details->buyer_id;\n \n $seller_id = $Details->seller_id;\n\n $orderStatus = $Details->order_status;\n \n if($status==1)\n {\n $Data=array( \n \n 'status'=>'1',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n\n $Cancelled=array(\n \n 'order_status'=>'7',\n \n 'cancelled_at'=>date('Y-m-d H:i:s')\n );\n\n $this->Api_model->Orders(array('id'=>$order_id),$Cancelled);\n \n if($this->Api_model->AddHistory(array('order_id'=>$order_id,'history_type'=>'5'),$Data))\n {\n $data['status']=\"1\"; \n $data['message']=\"Accepted Successfully\";\n\n $this->prepreFcm('cancelSelleraccept',array('user_id'=>$seller_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n \n if($status==2)\n {\n $Data=array( \n \n 'status'=>'2',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n \n if($this->Api_model->AddHistory(array('order_id'=>$order_id,'history_type'=>'5'),$Data))\n {\n $data['status']=\"1\";\n \n $data['message']=\"Rejected Successfully\";\n\n $this->prepreFcm('cancelSellerreject',array('user_id'=>$seller_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n }\n \n header( 'Content-type:application/json');\n print json_encode( $data); \n exit; \n }", "title": "" }, { "docid": "e50d310366ca21abdaaeb233b720bb7c", "score": "0.5421808", "text": "function process_paypal_payment($txn_id,$payment_status,$cust_id,$pending_r='na',$option='paypal'){\n\t$table \t\t\t\t\t= is_dbtable_there('orders');\n\t$column_value_array \t= array();\n\t$where_conditions \t\t= array();\n\t$parts \t\t\t\t\t= explode(\"-\",$cust_id);\t\n\t\t\t\n\tif($payment_status == 'Completed'){\n\t\t\t\t\t\t\t\n\t\t$column_value_array['txn_id'] \t\t= $txn_id;\n\t\t$column_value_array['tracking_id'] \t= $parts[0];\n\t\t$column_value_array['order_time'] \t= time();\n\t\t\t\t\t\t\t\t\n\t\t$cart_comp = cart_composition($cust_id);\n\t\tif($cart_comp == 'digi_only'){\n\t\t\t$column_value_array['level'] \t= '7';\t\t\t\t\t\t\n\t\t}\n\t\telse{\t\t\t\t\t\t\n\t\t\t$column_value_array['level']\t= '4';\n\t\t}\n\t}\n\telseif($payment_status == 'Pending'){\n\t\t$column_value_array['txn_id'] \t\t= $txn_id;\n\t\t$column_value_array['tracking_id'] \t= $parts[0];\n\t\t$column_value_array['order_time'] \t= time();\n\t\t$column_value_array['pending_r']\t= $pending_r; \n\t\t$column_value_array['level']\t\t= '8';\t\t\t\t\t\n\t}\n\telseif($payment_status == 'free'){\n\t\t$column_value_array['txn_id'] \t\t= $txn_id;\n\t\t$column_value_array['tracking_id'] \t= $parts[0];\n\t\t$column_value_array['order_time'] \t= time();\n\t\t$column_value_array['level'] \t\t= '7';\t\t\t\t\t\t\t\n\t}\n\n\t$where_conditions[0]\t\t\t\t= \"who = '$cust_id'\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tdb_update($table, $column_value_array, $where_conditions);\t\n\t\n\t$qStr \t= \"SELECT * FROM $table WHERE who = '$cust_id' LIMIT 1\";\n\t$res \t= mysql_query($qStr);\n\t$order \t= mysql_fetch_assoc($res);\n\t\n\t\t\t\t\t\t\n\t// voucher management \n\t$qStr \t= \"SELECT voucher FROM $table WHERE who = '$cust_id' LIMIT 0,1\"; \n\t$res \t= mysql_query($qStr);\n\t$row\t= mysql_fetch_assoc($res);\n\t\n\tif($row['voucher'] != 'non'){ //..then update vouchers table \n\t\n\t\t$table2\t= is_dbtable_there('vouchers');\t\n\t\t$qStr \t= \"SELECT duration FROM $table2 WHERE vcode = '$row[voucher]' LIMIT 0,1\"; \n\t\t$res2 \t= mysql_query($qStr);\n\t\t$row2\t= mysql_fetch_assoc($res2);\n\t\t\n\t\t$column_value_array \t= array();\n\t\t$where_conditions \t\t= array();\t\t\t\t\t\t\n\t\t\n\t\tif($row2[duration] == '1time'){\n\t\t$column_value_array['used'] \t\t= '1';\n\t\t}\n\t\t$column_value_array['time_used'] \t= date(\"F j, Y\");\n\t\t$column_value_array['who'] \t\t\t= $_SESSION['cust_id'];\n\t\t$where_conditions[0]\t\t\t\t= \"vcode = '$row[voucher]'\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tdb_update($table2, $column_value_array, $where_conditions);\t\n\t}\t\t\t\t\n\treturn $order;\n}", "title": "" }, { "docid": "77aa8789ece9b677cb53e3fd6a44d18c", "score": "0.5420695", "text": "public function payment_success()\r\n\t{\r\n\t\t$ret = $_REQUEST;\r\n\t\tif($ret['payer_status'] == 'verified')\r\n\t\t{\r\n\t\t\t//pr($ret,1);\r\n\t\t\t// 1. Save all the data to order master and order details table\r\n\t\t\t$paypal_oreder = $this->session->userdata('paypal_oreder');\r\n\t\t\t$userId = get_userLoggedIn(\"id\");\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t// FETCHING DATA FROM USER_SERVICE TABLE FOR UPDATING 's_dummy' COLOUMN //\r\n\t\t\t$dml_val = array();\r\n\t\t\t$user_service=$this->user_service_model->user_service_load(intval($paypal_oreder[\"service_id\"]));\r\n\t\t\t$s_dummy= $this->user_service_model->fetch_dummy(intval($paypal_oreder[\"service_id\"])); \r\n\t\t\t/* setting up the s_dummy field value */\r\n\t\t\t$val = decodeFromDummyField($s_dummy->s_dummy);\r\n\t\t\t$val['s_service_name'] = $user_service->s_service_name;\r\n\t\t\t$temp_s_dummy = encodeArrayToDummyField($val);\r\n\t\t\t// updating $dml_val array() with 's_dummy' field value ///\r\n\t\t\t$dml_val['s_dummy']=$temp_s_dummy;\r\n\t\t\t\r\n\t\t\t$dml_val[\"i_featured\"] = 1;\r\n\t\t\t//$dml_val[\"feature_id\"] = 1;\r\n\t\t\t$dml_val[\"feature_id\"] = $paypal_oreder[\"feature_id\"]?$paypal_oreder[\"feature_id\"]:1;\r\n\t\t\t\r\n\t\t\t$filter = \"id ='\".$dml_val[\"feature_id\"].\"' \";\r\n\t\t\t$packages = $this->user_feature_package_model->user_feature_package_load($filter);\r\n\t\t\t$validity_days = $packages[0]->i_months_validity?intval($packages[0]->i_months_validity)*30:1*30;\r\n\t\t\r\n\t\t\t$dml_val[\"dt_featured_expiry\"] = date(\"Y-m-d\",strtotime(\"+{$validity_days} days\",time()));\r\n\t\t\t$dml_val[\"i_featured_online\"] = $paypal_oreder[\"i_type\"]==1?1:0;\r\n\t\t\t$dml_val[\"i_featured_location\"] = $paypal_oreder[\"i_type\"]==2?1:0;\r\n\t\t\t\r\n\t\t\t$this->user_service_model->update_user_service(\r\n\t\t\t\t\t\t\t\t$dml_val,\r\n\t\t\t\t\t\t\t\tarray(\"id\"=>intval($paypal_oreder[\"service_id\"]))\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\tunset($dml_val);\r\n\t\t\t\r\n\t\t\t$this->payment_process($ret);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tset_error_msg(message_line(\"saved error\"));\r\n\t\t\tredirect(base_url().'all_service_provided');\r\n\t\t}\r\n\t\t// 6. Redirect to order confirmation page\r\n\t\t//redirect(base_url('checkout/order_confirmation'));\r\n\t}", "title": "" }, { "docid": "d27c7c120a3852f24d79823df02c9c71", "score": "0.5419213", "text": "public function getPaymentStatus(Request $request)\n {\n\t\t$payment_id = Session::get('paypal_payment_id');\n\t\t/** clear the session payment ID **/\n\t\tSession::forget('paypal_payment_id');\n\t\tif (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\t\t\tLog::error('PayPal Платеж не прошел');\n\t\t return Redirect::route('error_oplata');\n\t\t}\n\t\t$paymentCurrentId = Input::get('paymentId');\n\t\t$payerCurrentId = Input::get('PayerID');\n\n\t\t$payment = Payment::get($payment_id, $this->_api_context);\n\t\t$obj = json_decode($payment);\n\t\t$id_order = $obj->transactions[0]->custom;\n\n\t\t\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n\n\t\t/**Execute the payment **/\n\t\t$result = $payment->execute($execution, $this->_api_context);\n\t\tif ($result->getState() == 'approved') {\t\t\t\n $currentOrder = Order::find($id_order); \n if(isset($currentOrder->user_status) && $currentOrder->user_status)\n { \n self::succesOplataRegisteredUser($currentOrder->user_id, $currentOrder->course_id, $currentOrder); \n Log::info('PayPal - Заказ № '. $id_order .' оплачен');\n return Redirect::route('success_oplata');\n } else if (isset($currentOrder->user_status) && !$currentOrder->user_status) {\n self::succesOplataNotRegisteredUser($currentOrder->user_id, $currentOrder->course_id, $currentOrder);\n Log::info('PayPal - Заказ № '. $id_order .' оплачен');\n return Redirect::route('success_oplata'); \n } \n\n\t\t}\n\n\t\tLog::error('PayPal - Заказ № '. $id_order .' не оплачен. Произошла неизвестная ошибка');\n\t\treturn Redirect::route('error_oplata');\n\t}", "title": "" }, { "docid": "b8ab15ff6c3fcf20dcbe4d16e9b9d2ec", "score": "0.5412555", "text": "private function validateParams(){\n\t\t$name\t = !empty($this->param['name']) ? $this->param['name'] : \"\"; \n\t\t$ic\t\t = !empty($this->param['ic']) ? $this->param['ic'] : \"\"; \n\t\t$mobile\t= !empty($this->param['mobile']) ? $this->param['mobile'] : \"\"; \n\t\t$email\t= !empty($this->param['email']) ? $this->param['email'] : \"\"; \n\t\t$state\t= !empty($this->param['state']) ? $this->param['state'] : \"\"; \n\t\t$agreement\t= !empty($this->param['agreement']) ? $this->param['agreement'] : \"\"; \n\t\t$tnc\t\t= !empty($this->param['tnc']) ? $this->param['tnc'] : \"\"; \n\t\t$tac\t\t= !empty($this->param['tac']) ? $this->param['tac'] : \"\"; \n\t\t\n\t\t$statusCode = array();\n\t\tif(!$name){\n\t\t\t$statusCode[] = 115;\n\t\t}\n\t\tif(!$ic){\n\t\t\t$statusCode[] = 116;\n\t\t}\n\t\tif(!$mobile){\n\t\t\t$statusCode[] = 117;\n\t\t}\n\t\tif(!$email){\n\t\t\t$statusCode []= 101;\n\t\t}elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t $statusCode[] = 105;\n\t\t}\n\t\tif(!$state){\n\t\t\t$statusCode[] = 113;\n\t\t}\n\t\tif(!$agreement){\n\t\t\t$statusCode[] = 121;\n\t\t}\n\t\tif(!$tnc){\n\t\t\t$statusCode[] = 122;\n\t\t}\n//\t\tif(!$tac){\n//\t\t\t$statusCode[] = 123;\n//\t\t} \n\t\treturn $statusCode;\n\t}", "title": "" }, { "docid": "a4781b4d7a651c6258fb529adf0b95f7", "score": "0.5410042", "text": "public function getPaymentStatusId()\n {\n return $this->paymentStatusId;\n }", "title": "" }, { "docid": "b0f448993697a7335f872c52e6c90eec", "score": "0.54085565", "text": "public function checkJudgeStatus($query)\n {\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n \n \n if($stmt->rowCount()>0)\n {\n ?> \n <td>Pending <a href=\"#\" ><font color=\"FF00CC\">Notify him again</font></a></td>\n\t\t\t\t\n \n\t\t\t\t\n\t <?php\t\t\n \n }\n else\n {\n ?>\n \n <td>completed</td>\n \n <?php\n }\n \n }", "title": "" }, { "docid": "4a95b278b12344b7cd1ca978306119b7", "score": "0.5408234", "text": "public function get_status_message();", "title": "" }, { "docid": "618296ce4da6e988ec7986f1f3f8a100", "score": "0.5401765", "text": "public function noti_check() {\n\t\t\t\n\t\t\tConfigure::write('debug',0);\n\t\t\t\t if(!empty($_POST)) {\n\t\t\t\t\t $noti_id = $_POST['noti_id'];\n\t\t\t\t\t $driver_id = $_POST['driver_id'];\n\t\t\t\t\t \n\t\t\t\t\t $nstatus = array('accept','denied');\n\t\t\t\t\t $status = $this->Notification->find('all', array('conditions' => array('Notification.id' => $noti_id,'Notification.status' => $nstatus)));\t\n\t\t\t \n\t\t\t\t\t $msg = $status['0']['Notification']['status'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($status))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t $status = '[{\"status\":\"'.$msg.'\"}]';\n\t\t\t\t\t echo $status;\n\t\t\t\t\t\t\t exit;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else\n {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t $status = '[{\"status\":\"processing\"}]';\n\t\t\t\t\t echo $status; \n\t\t\t\t\t\t\t\t exit;\n\t\t\t\t\t\t\t \t \n\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t $driver_free = $this->Driver->find('count', array('conditions' => array('Driver.id' => $driver_id,'Driver.have_noti' => 'yes')));\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t if($driver_free == 1)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t $this->Notification->updateAll(array('Notification.Issen' => \"'yes'\"),array('Notification.id' => $noti_id));\n\t\t\t\t\t\t\t\t $status = '[{\"status\":\"denied\"}]';\n\t\t\t\t\t\t\t\t\techo $status;\n\t\t\t\t\t\t\t\t\texit;\n\t\t\t\t\t\t\t }\n\t\t\t \n\t\t\t\t\t} \n\t\t\t\t die();\n\t\t\t\t\n\t}", "title": "" }, { "docid": "0f68ebe492120f98185f711899d8cfbc", "score": "0.5397804", "text": "public function getRechargeStatus()\n {\n\n }", "title": "" }, { "docid": "f0a4879dfd6f5850ac07cafe9665d50b", "score": "0.53963906", "text": "function getSubscriptionStatus($profileid)\n{\n\tglobal $error_msg;\n\t$sql=\"SELECT count(*) as cnt from billing.PURCHASES where PROFILEID='$profileid' and STATUS='DONE'\";\n\t$result=mysql_query_decide($sql) or logError($error_msg,$sql,\"ShowErrTemplate\",$announce_to_email);\n $myrow = mysql_fetch_array($result);\n\tif($myrow['cnt'] > 0)\n\t\treturn true;\n\telse\n\t{\n\t\t$sql=\"SELECT count(*) as cnt from billing.SUBSCRIPTION_EXPIRE where PROFILEID='$profileid'\";\n\t\t$result=mysql_query_decide($sql) or logError($error_msg,$sql,\"ShowErrTemplate\",$announce_to_email);\n\t\t$myrow_1 = mysql_fetch_array($result);\n\t\tif($myrow_1['cnt'] > 0)\n\t\t\treturn true;\n\t}\n\treturn false;\n\t\n}", "title": "" }, { "docid": "c5f799636de1ff02de136151d8466f03", "score": "0.5395458", "text": "public function status($id,$val){\n\t\t\n\t\t $status_data = array($this->pro->pincode.'_status'=>trim($val));\n\t\t $status = $this->pm->update($status_data,$id);\n\t\t\t\n\t\t\tif($status){\n\t\t\t\t$this->session->set_flashdata(\"success\",\"Status Update Successfully\");\n redirect('admin/pincode');\n\t\t\t}\t\n\t}", "title": "" }, { "docid": "e6a0451c93fe0aa74a6e1325d35fea1e", "score": "0.5392858", "text": "public function updateGamificationVoucher($outcome)\n {\n\n foreach ($outcome as $value){\n\n foreach ($value->action_value as $actionValue):\n\n if($actionValue->value->type =='integrated-voucher' || $actionValue->value->type=='voucher')\n {\n\n $this->prepareVoucherData($actionValue->value,$value->mission_id);\n }\n endforeach;\n }\n return ['status' =>true];\n }", "title": "" }, { "docid": "44bf7629013ee35fcfb0f8b3d5f367f6", "score": "0.5389371", "text": "function testCompletionStatus() {\r\n\t\t$retArr= array();\r\n\t\t$statusArr = array('On Going','Completed');\r\n\r\n\t\t$cond = '';\r\n\t\tif($this->subject !='' && $this->class !='')\r\n\t\t\t$cond = \" AND asset_etaResponses.papercode like '\".$this->subject.$this->class.\"_' \";\r\n\t\telse if ($this->subject !== '' && $this->class === '')\r\n\t\t\t$cond = \" AND asset_etaResponses.papercode like '\".$this->subject.\"__' \";\r\n\t\telse if($this->subject === '' && $this->class != '')\r\n\t\t\t$cond = \" AND asset_etaResponses.papercode like '_\".$this->class.\"_' \";\r\n/*\r\n\t\t$query = \"SELECT asset_etaResponses.teacher_id, asset_etaResponses.papercode, asset_etaResponses.status, asset_etaTeacherDetails.added_on,\r\n\t\t\t\tasset_etaTeacherDetails.teacher_name FROM asset_etaTeacherDetails \r\n\t\t\t\t INNER JOIN asset_etaResponses ON \r\n\t\t\t\t asset_etaResponses.teacher_id = asset_etaTeacherDetails.id AND asset_etaTeacherDetails.schoolCode ='\".$_SESSION['eta_schoolCode'].\"'\r\n\t\t\t\t where asset_etaResponses.round = '\".$this->current_round.\"' $cond\r\n\t\t\t\t group by asset_etaResponses.teacher_id, asset_etaResponses.papercode \";\r\n*/\r\n\t\t$query =\" SELECT asset_etaResponses.teacher_id, asset_etaResponses.papercode, asset_etaResponses.status, asset_etaTeacherDetails.added_on,\r\n\t\t\t\tasset_etaTeacherDetails.firstname, asset_etaTeacherDetails.lastname FROM asset_etaTeacherDetails \r\n\t\t\t\t INNER JOIN asset_etaResponses ON \r\n\t\t\t\t asset_etaResponses.teacher_id = asset_etaTeacherDetails.id AND asset_etaTeacherDetails.schoolCode ='\".$_SESSION['eta_schoolCode'].\"'\r\n\t\t\t\t where asset_etaResponses.teacher_id = \".$_SESSION['eta_teacherId'].\" AND asset_etaResponses.round = '\".$this->current_round.\"' $cond\r\n\t\t\t\t group by asset_etaResponses.papercode \";\r\n\t\t//echo \"$query <br />\";\r\n\t\t$dbquery = new dbquery($query,$this->connid);\r\n\t\twhile($row=$dbquery->getrowarray()) {\r\n\t\t\t$added_date = date('d-M-Y',strtotime($row['added_on']));\r\n\t\t\t$retArr[] = array('teacher_name'=>$row['firstname'].\" \".$row['lastname'],'status'=>$statusArr[$row['status']],'papercode'=>$row['papercode'],'creation_time'=>$added_date);\r\n\t\t}\r\n\r\n\t\treturn $retArr;\r\n\t}", "title": "" }, { "docid": "b164bb1a85218301eff57ba1c8f637c6", "score": "0.53889734", "text": "public function success()\n\n\t{\n\n $this->load->library('paypal_lib');\n\n $paypalInfo = $this->input->post();\t\n\n\n\n \n\n $data['txn_id'] = $paypalInfo[\"txn_id\"];\n\n $data['paid_amnt'] = $paypalInfo[\"payment_gross\"]; \n\n\t\t$data['payer_email'] = $paypalInfo[\"payer_email\"]; \n\n $data['paypal_status'] = strtolower($paypalInfo[\"payment_status\"]);\n\n $custom = $paypalInfo['custom'];\n\n \n\n //pr($data);\n\n //echo $custom;exit;\n\n if($data['txn_id'] != '')\n\n {\n\n\t $res = explode(\"#\", $custom);\n\n\n\n\t if($res[1] == 'neworder')\n\n\t {\n\n $data['id'] = $res['0'];\n\n $orderid = $res['2'];\n\n\t $res = $this->Distributer_model->payment_update($data);\n\n\t if($res != false)\n\n {\n\n \t $this->send_mail($orderid,$data['id'],'success');\n\n // need to integrate email code here\n\n $this->session->set_flashdata('order','added');\n\n redirect('distributer/orders','refresh');\n\n\n\n }\n\n else\n\n {\n\n \t $this->session->set_flashdata('order','error');\n\n \t redirect('distributer/orders','refresh');\n\n }\n\n\n\n\t }\n\n\t if($res[1] == 'editorder')\n\n\t {\n\n $data['id'] = $res['0'];\n\n $orderid = $res['2'];\n\n\t $res = $this->Distributer_model->payment_update($data);\n\n\t if($res != false)\n\n {\n\n \t $this->send_mail($orderid,$data['id'],'success');\n\n // need to integrate email code here\n\n $this->session->set_flashdata('order','updated');\n\n redirect('distributer/orders','refresh');\n\n\n\n }\n\n else\n\n {\n\n \t $this->session->set_flashdata('order','error');\n\n \t redirect('distributer/orders','refresh');\n\n }\n\n\t }\n\n\n\n }\n\n else\n\n \tredirect('','refresh');\n\n\n\n\n\n\t}", "title": "" }, { "docid": "668b13ffdd9fca1b28a28253c99e89e7", "score": "0.53869843", "text": "public function updateFMOrderStatus($invoice_id,$status='1'){\n $log=new Log(\"Fm Order Delivery Notification Status-\".date('Y-m-d').\".log\");\n $log->write('--Prepare Query--');\n $sql_od = \"update oc_order_delivery set delivery_status='\".$status.\"' where invoice_no='\".$invoice_id.\"' \";\n $sql_od_advnc = \"update oc_order_delivery_advance set delivery_status='\".$status.\"' where invoice_no='\".$invoice_id.\"' \"; \n $log->write('--Prepared query for order delivery -- '.$sql_od.' --');\n $log->write('--Prepared query for order delivery advance -- '.$sql_od_advnc.' --'); \n $qry = $this->db->query($sql_od); \n $qry1 = $this->db->query($sql_od_advnc);\n $log->write($qry.' & '.$qry1);\n if($qry || $qry1){\n $msg = array('status'=>'success','responce'=>'Delivery status has been updated.');\n }else{\n $msg = array('status'=>'error','responce'=>'Delivery status not updated. Please try again.'); \n }\n $log->write($msg);\n return $msg;\n }", "title": "" }, { "docid": "aabb031881eb53ed2d861d87ffebacfd", "score": "0.53859216", "text": "function get_request_status_number($request_id){\n\n $request = RequestCase::select('status')->where('id',$request_id)->get();\n\t\t//pr($request);\n\t\treturn $request[0]->status;\n}", "title": "" }, { "docid": "57d0d23009494b89a9222661cd465329", "score": "0.53845984", "text": "function verifyTransactionResult( $trans_result ) {\n\n//Handle curl level error, ExitOnCurlError\n\tif ( $trans_result['curl_error'] ) {\n\t\techo \"<br>Error occcured : \";\n\t\techo '<br>curl error with Transaction request: ' . $trans_result['curl_error'];\n\t\texit();\n\t}\n\n//If we reach here, we have been able to communicate with the service, \n//next is decode the json response and then review Http Status code, response_code and success of the response\n\n\t$json = jsonDecode( $trans_result['temp_json_response'] );\n\n\tif ( $trans_result['http_status_code'] != 200 ) {\n\t\tif ( $json['success'] === false ) {\n\t\t\techo \"Transaction Error occurred ! \";\n\n\t\t\t//Optional : display Http status code and message\n\t\t\t//displayHttpStatus( $trans_result['http_status_code'] );\n\n\t\t\t//Optional :to display raw json response\n\t\t\t//displayRawJsonResponse( $trans_result['temp_json_response'] );\n\n\t\t\t//echo \"<br> failed !\";\n\t\t\t//to display individual keys of unsuccessful Transaction Json response\n\t\t\t//displayKeyedTransactionError( $json );\n\t\t} else {\n\t\t\t//In case of some other error occurred, next is to just utilize the http code and message.\n\t\t\techo \"<br><br> Request Error occurred !\";\n\t\t\t//displayHttpStatus( $trans_result['http_status_code'] );\n\t\t}\n\t} else {\n\t\t// Optional : to display raw json response - this may be helpful with initial testing.\n\t\t//displayRawJsonResponse( $trans_result['temp_json_response'] );\n\n\t\t// Do your code when Response is available and based on the response_code.\n\t\t// Please refer PayTrace-Error page for possible errors and Response Codes\n\n\t\t// For transation successfully approved\n\t\tif ( $json['success'] == true && $json['response_code'] == 101 ) {\n\n\t\t\techo \"<br><br> Success !\";\n\t\t\tdisplayHttpStatus( $trans_result['http_status_code'] );\n\t\t\t//to display individual keys of successful OAuth Json response\n\t\t\t//displayKeyedTransactionResponse( $json );\n\t\t} else {\n\t\t\t//Do you code here for any additional verification such as - Avs-response and CSC_response as needed.\n\t\t\t//Please refer PayTrace-Error page for possible errors and Response Codes\n\t\t\t//success = true and response_code == 103 approved but voided because of CSC did not match.\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "87b6de3ae55fcc7533d836667ca3057b", "score": "0.5383828", "text": "public function faqs_chnage_status($id){\n $this->output->set_content_type('application/json');\n $result = $this->setting_model->chnage_status($id);\n if (!empty($result)) {\n $this->output->set_output(json_encode(['result' => 1, 'msg' => 'Status Update Successfully']));\n return FALSE;\n } else {\n $this->output->set_output(json_encode(['result' => -1, 'msg' => 'Somethin went wrong']));\n return FALSE;\n }\n\n }", "title": "" }, { "docid": "0b7efbd5dd94d283cc5793d781f29e46", "score": "0.5377787", "text": "public function up_status()\n {\n $res = StudentsService::instance()->up_status($this->params, $result);\n if ($res) {\n $this->returnAjax(200,$result);\n }\n $this->returnAjax(400,$result);\n }", "title": "" }, { "docid": "8d4f657b4c3fa97cf02645fd76dcd052", "score": "0.53695756", "text": "function buyerOfferStatus()\n {\n $user_id=$this->input->post('user_id');\n\n $request_id=$this->input->post('request_id');\n\n $seller_id=$this->input->post('seller_id');\n \n $offer_id=$this->input->post('offer_id');\n \n $payment_option=$this->input->post('payment_option');\n \n $payment_id=$this->input->post('payment_id');\n \n $offer_status=$this->input->post('offer_status');\n \n \n $this->formValidation(\"User Id\",$user_id,\"required\");\n\n $this->formValidation(\"Request Id\",$request_id,\"required\");\n \n $this->formValidation(\"Seller Id\",$seller_id,\"required\");\n \n $this->formValidation(\"Offer Id\",$offer_id,\"required\");\n \n if($offer_status==1)\n {\n $this->formValidation(\"Payment Option\",$payment_option,\"required\");\n \n $this->formValidation(\"Payment Id\",$payment_id,\"required\");\n }\n \n $this->formValidation(\"Offer Status\",$offer_status,\"required\");\n\n $check_now=$this->Api_model->RequestList(array('id'=>$request_id,'user_id'=>$user_id))->row();\n \n if(empty($check_now))\n { \n $data['status']=\"0\";\n \n $data['message']=\"Request not Found\"; \n }\n else\n { \n if($offer_status==1)\n {\n $OfferList = $this->Api_model->OfferList(array('id'=>$offer_id,'user_id'=>$seller_id))->row();\n \n $Price = $OfferList->price;\n \n $Quantity = $check_now->quantity;\n \n $Data=array( \n \n //'seller_id'=>$seller_id,\n \n //'offer_id'=>$offer_id,\n \n //'payment_option'=>$payment_option,\n \n //'payment_id'=>$payment_id,\n \n 'offer_status'=>'1',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n \n );\n \n if($this->Api_model->Offersend(array('id'=>$request_id,'user_id'=>$user_id),$Data))\n {\n $RequestData=array(\n\n 'seller_id'=>$seller_id,\n \n 'request_status'=>'1',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n \n $this->Api_model->AddRequest(array('id'=>$request_id),$RequestData);\n \n $OrdersData=array(\n\n 'seller_id'=>$seller_id,\n \n 'buyer_id'=>$user_id,\n \n 'type'=>'2',\n \n 'product_id'=>$request_id,\n \n 'price'=>$Price,\n \n 'quantity'=>$Quantity,\n \n 'total_cost'=>$Price,\n \n 'final_cost'=>$Price,\n \n 'order_status'=>'1',\n \n 'payment_option'=>$payment_option,\n \n 'payment_id'=>$payment_id,\n \n 'created_at'=>date('Y-m-d H:i:s')\n );\n \n $this->Api_model->Orders('',$OrdersData);\n \n $data['status']=\"1\";\n \n $data['message']=\"Offer Accepted Successfully\";\n\n //$this->prepreFcm('offeracceptedbuyer',array('user_id'=>$user_id));\n $this->prepreFcm('offeracceptedseller',array('user_id'=>$seller_id));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n \n if($offer_status==2)\n {\n $Data=array( \n \n //'seller_id'=>$seller_id,\n \n //'offer_id'=>$offer_id,\n \n //'payment_option'=>$payment_option,\n \n 'offer_status'=>'2',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n \n );\n \n if($request_id=$this->Api_model->Offersend(array('id'=>$offer_id,'request_id'=>$request_id),$Data))\n {\n \n $data['status']=\"1\";\n \n $data['message']=\"Offer Rejected Successfully\";\n\n //$this->prepreFcm('offerrejectedbuyer',array('user_id'=>$user_id));\n $this->prepreFcm('offerrejectedseller',array('user_id'=>$seller_id));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n \n }\n \n header( 'Content-type:application/json');\n print json_encode( $data); \n exit; \n }", "title": "" }, { "docid": "e943763435a53635164cb8da106d2bb1", "score": "0.53692335", "text": "public function statusAction() {\n $request = $this->getRequest();\n if (!$request->isPost()) {\n $this->getResponse()->setHttpResponseCode(400);\n $this->logger->warn('ACOM: called status url without posting');\n return;\n }\n\n $post = $request->getPost();\n $status = (integer) $post['status'];\n $orderId = (integer) $post['orderid'];\n $text = (integer) $post['text'];\n\n try {\n $order = new Yourdelivery_Model_Order($orderId);\n if ($order->getService()->getNotify() != 'acom') {\n $this->logger->crit(sprintf('ACOM: tried to alter the status of order %s which service is not set to acom', $order->getId()));\n $this->getResponse()->setHttpResponseCode(500);\n return;\n }\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n $this->getResponse()->setHttpResponseCode(404);\n return;\n }\n\n switch ($status) {\n default:\n //no valid case given\n $this->logger->warn(sprintf('ACOM: invalid response ' . $status . ' on order %d', $order->getId()));\n $order->setStatus(Yourdelivery_Model_Order::DELIVERERROR,\n new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::ORDER_ACOM_INVALID, $text)\n );\n break;\n case 1:\n //in progress\n $this->logger->info(sprintf('ACOM: order %d is in progress', $order->getId()));\n $order->setStatus(Yourdelivery_Model_Order::AFFIRMED,\n new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::ORDER_ACOM_PROGRESS, $text)\n );\n break;\n case 2:\n //OK\n $this->logger->info(sprintf('ACOM: order %d has been confirmed', $order->getId()));\n $order->setStatus(Yourdelivery_Model_Order::AFFIRMED,\n new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::ORDER_ACOM_CONFIRM, $text)\n );\n break;\n case 3:\n //ERROR\n $this->logger->warn(sprintf('ACOM: error occured on order %d', $order->getId()));\n $order->setStatus(Yourdelivery_Model_Order::DELIVERERROR,\n new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::ORDER_ACOM_ERROR, $text)\n );\n break;\n case 4:\n //delivery in progress\n $this->logger->info(sprintf('ACOM: order %d is currently beeing delivered', $order->getId()));\n $order->setStatus(Yourdelivery_Model_Order::AFFIRMED, \n new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::ORDER_ACOM_DELIVERING, $text)\n );\n break;\n case 5:\n //delivery completed\n $this->logger->info(sprintf('ACOM: order %d has been delivered', $order->getId()));\n $order->setStatus(Yourdelivery_Model_Order::DELIVERED,\n new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::ORDER_ACOM_DELIVERED, $text)\n );\n break;\n }\n \n echo \"OK\";\n }", "title": "" }, { "docid": "d60455337de4a92ee22de9d6c6d6937b", "score": "0.5369083", "text": "public function getPaymentStatus()\n {\n\t\t//$tax_shipping = ShippingTax::first();\n /** Get the payment ID before session clear **/\n $payment_id = Session::get('paypal_payment_id');\n\t\t//echo '<pre>';print_r(Session::get('shoppingstep'));die;\n\t\t$user_address_id = '';\n\t\t$delivery_address = '';\n\t\t$delivery_postcode = '';\n\t\t$delivery_phone = '';\t\t\n\n\t\t$tax_amount = (!empty(Session::get('shoppingstep.tax_amount')))?Session::get('shoppingstep.tax_amount'):'';\n\t\t$subtotal = (!empty(Session::get('shoppingstep.total')))?Session::get('shoppingstep.total'):'';\n\t\t$maintotal = (!empty(Session::get('shoppingstep.maintotal')))?Session::get('shoppingstep.maintotal'):'';\n\t\t$shippingamount = (!empty(Session::get('shoppingstep.shippingamount')))?Session::get('shoppingstep.shippingamount'):'';\n\t\t$shipping_type = (!empty(Session::get('shoppingstep.shipping_type')))?Session::get('shoppingstep.shipping_type'):'';\n\t\t$tax_percentage = (!empty(Session::get('shoppingstep.tax_percentage')))?Session::get('shoppingstep.tax_percentage'):'';\n\n\t\t$coupon_discount = (Session::has('apply_coupon') && !empty(Session::get('shoppingstep.coupon_discount')))?Session::get('shoppingstep.coupon_discount'):'';\n\t\t$coupon_code = (Session::has('apply_coupon') && !empty(Session::get('apply_coupon.coupon_code')))?Session::get('apply_coupon.coupon_code'):'';\n\t\t$coupon_type = (Session::has('apply_coupon') && !empty(Session::get('apply_coupon.coupon_type')))?Session::get('apply_coupon.coupon_type'):'';\n\t\t$coupon_amount = (Session::has('apply_coupon') && !empty(Session::get('apply_coupon.coupon_amount')))?Session::get('apply_coupon.coupon_amount'):'';\n\n\t\tif(Session::has('shoppingstep.deliveryAddress')){\n\t\t\t$user_address_id = Session::get('shoppingstep.deliveryAddress.address_id');\n\t\t\t$delivery_address = Session::get('shoppingstep.deliveryAddress.address');\n\t\t\t$delivery_postcode = Session::get('shoppingstep.deliveryAddress.postcode');\n\t\t\t$delivery_phone = Session::get('shoppingstep.deliveryAddress.phone');\n\t\t}\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/');\n }\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n \n if ($result->getState() == 'approved') {\n\t\t\t\n $order_number = $this->random_num(7);\n \n $order = new Order;\n $order->order_number = $order_number;\n $order->payment_id = $result->getId();\n $order->user_id = Auth::user()->id;\n\t\t\t$order->total_amount = (isset($result->transactions[0]->amount->total) && !empty($result->transactions[0]->amount->total)) ? $result->transactions[0]->amount->total : 0;\n\t\t\t\n\t\t\t$total_qty = 0;\n\t\t\t$cartIds = array();\n\t\t\t$productIds = array();\n\t\t\t$cart_itemslist = Cart::where('user_id','=', Auth::user()->id)->get();\n\t\t\tif(!empty($cart_itemslist)){\n\t\t\t\tforeach($cart_itemslist as $cart){\n\t\t\t\t\t$total_qty += $cart->qty;\n\t\t\t\t\t$cartIds[$cart->id] = $cart->id;\n\t\t\t\t\t$productIds[$cart->product_id] = $cart->product_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$order->total_qty = $total_qty;\n\t\t\t$order->payment_status = $result->getState();\n\t\t\t$order->product_ids = serialize($productIds);\n\t\t\t$order->order_status = 'Order Confirmed'; //kz 28 dec\n\t\t\t$order->user_address_id = $user_address_id; \n\t\t\t$order->delivery_address = $delivery_address; \n\t\t\t$order->delivery_postcode = $delivery_postcode; \n\t\t\t$order->delivery_phone = $delivery_phone; \n\n\t\t\t$order->tax_amount = $tax_amount; \n\t\t\t$order->maintotal = $maintotal; \n\t\t\t$order->shippingamount = $shippingamount; \n\t\t\t$order->shipping_type = $shipping_type; \n\t\t\t$order->tax_percentage = $tax_percentage; \n\t\t\t$order->subtotal = $subtotal; \n\t\t\t$order->coupon_discount = $coupon_discount; \n\t\t\t$order->coupon_code = $coupon_code; \n\t\t\t$order->coupon_type = $coupon_type; \n\t\t\t$order->coupon_amount = $coupon_amount; \n $order->save();\n\t\t\t\n\t\t\t\n\t\t\t$orderStatus = new OrderDeliveryStatus();\n\t\t\t$orderStatus->order_id = $order->id;\n\t\t\t$orderStatus->order_status = 'Order Confirmed';\n\t\t\t$orderStatus->order_status_type = 'confirmed';\n\t\t\t$orderStatus->user_type = 'admin';\n\t\t\t$orderStatus->user_id = 1;\n\t\t\t$orderStatus->created_at = date('Y-m-d H:i:s');\n\t\t\t$orderStatus->updated_at = date('Y-m-d H:i:s');\n\t\t\t$orderStatus->save();\n\t\t\t\n\t\t\t\n\t\t\t$cart_itemslist = Cart::with('product')->where('user_id','=', Auth::user()->id)->get();\n\t\t\t if(!empty($cart_itemslist)){\n\t\t\t\t foreach($cart_itemslist as $cart){\n\t\t\t\t\t$attributes = $this->getAttributeDetail($cart->productItem_ids); \n $subtotal = ($cart->product->price+$attributes['amount']);\n $total = (($cart->product->price+$attributes['amount']) * $cart->qty);\n\t\t\t\t\t // save data in cart item table\n\t\t\t\t\t$orderItem = new OrderItem();\n\t\t\t\t\t$orderItem->order_id = $order->id;\n $orderItem->product_id = $cart->product_id;\n\t\t\t\t\t$orderItem->productFeatureItem_id = $cart->productItem_ids;\n\n\t\t\t\t\t$product_detail = $this->getproduct_detail($cart->product_id);\n\t\t\t\t\t//echo '<pre>';print_r($product_detail);die;\n\t\t\t\t\t$orderItem->user_id = Auth::user()->id;\n\t\t\t\t\t$orderItem->is_pre_order = (isset($product_detail['is_pre_order'])&& !empty($product_detail['is_pre_order']))?$product_detail['is_pre_order']:0;\n\t\t\t\t\t$orderItem->order_date = (isset($product_detail['order_date'])&& !empty($product_detail['order_date']))?$product_detail['order_date']:date(\"Y-m-d\");\n\t\t\t\t\t$orderItem->product_name = $cart->product->name;\n\t\t\t\t\t$orderItem->product_image = $cart->product->image;\n\t\t\t\t\t$orderItem->qty = $cart->qty;\n\t\t\t\t\t$orderItem->amount = $subtotal;\n\t\t\t\t\t$orderItem->total_amount = $total;\n\t\t\t\t\t\n\t\t\t\t\t$orderItem->save();\n\t\t\t\t }\n\t\t\t }\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// deleting user cart by cartids\n\t\t\t$this->deleteUserCartByIds($cartIds);\n\t\t\t\n\t\t\t// distory user cart session\n\t\t\t$this->distoryUserCartSession();\t\t\t\n\n\t\t\t// send order mail to user\n\t\t\t\n\t\t\t$this->sendmailtocustomer($order_number);\n\n\t\t\tif (Session::has('apply_coupon')) {\n \t\tSession::forget('apply_coupon');\n \t\t}\n\t\t\tSession::flash('success_h1','Payment');\n \n Session::flash('success','Payment successfully'); \n\n \n return Redirect::to('/cart-thankyou');\n }\n\t\t\n\t\tSession::flash('error_h1','Payment');\n Session::flash('error','Payment failed. Please try again');\n\n return Redirect::to('/');\n }", "title": "" } ]
4e67770af9f035c5704e9e6fe957195b
Cabecera del Reporte aparecera en todas las paginas
[ { "docid": "a48d15f314060cf81ba29e731952970a", "score": "0.0", "text": "function Header()\n\t{\n\t\t$this->SetXY(10,10);\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t\n\t}", "title": "" } ]
[ { "docid": "26831d50de669be92ef91b442719da7d", "score": "0.6957324", "text": "public function reportes(){\n\n\t\t$dato['active'] = \"operador\";\n \t$dato['active1'] = \"reportes-operador\";\n\t\t$dato['ruta1'] = \"Reporte de Operadores\";\n\t\t$dato['ruta'] = \"Modulo Operador / Reportes\";\n\n\t\t$vista['operadores'] = $this->Operador_model->get_list_operadores();\n\n\t\t$this->load->view('global_view/header', $dato);\n \t$this->load->view('admin/operador/reportes', $vista);\n \t$this->load->view('global_view/foother');\n\n }", "title": "" }, { "docid": "28464be04cffe5666b9cdd3e28e4637c", "score": "0.6856921", "text": "public function ReporteEmpleadosDoblePlazaAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Generar reportes y documentos\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>5)));\n $breadcrumbs->addItem(\"Reportes\", $this->get(\"router\")->generate(\"pantalla_reportes\"));\n $breadcrumbs->addItem(\"Expediente de empleados\", $this->get(\"router\")->generate(\"reporte_empleado_seleccionar\"));\n $breadcrumbs->addItem(\"Reporte\", \"\");\n \n // Nombre reporte\n $filename= 'Reporte empleadosdobleplaza.pdf';\n \n //Llamando la funcion JRU de la libreria php-jru\n $jru=new JRU();\n //Ruta del reporte compilado Jasper generado por IReports\n $Reporte=__DIR__.'/../Resources/reportes/Estadisticos/reporte_empleadoscondobleplaza.jasper';\n //Ruta a donde deseo Guardar mi archivo de salida Pdf\n $SalidaReporte=__DIR__.'/../../../../web/uploads/reportes/'.$filename;\n //Paso los parametros necesarios\n $Parametro=new java('java.util.HashMap');\n $Parametro->put(\"ubicacionReport\", new java(\"java.lang.String\", __DIR__));\n //Funcion de Conexion a Base de datos \n $Conexion = $this->crearConexion();\n //Generamos la Exportacion del reporte\n $jru->runReportToPdfFile($Reporte,$SalidaReporte,$Parametro,$Conexion->getConnection());\n \n return $this->render('ReporteBundle:Reportes:vistapdf.html.twig',array('reportes'=>$filename));\n }", "title": "" }, { "docid": "613225a474b64ac383b3f6a5700d564e", "score": "0.6800432", "text": "function listarReporteAguinaldoMinisterioNuevo(){\n $this->procedimiento='plani.ft_planilla_sel';\n $this->transaccion='PLA_MINTRA_AGUI_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n //$this->setParametro('modalidad','modalidad','varchar');\n $this->setParametro('id_gestion','id_gestion','int4');\n\n //Definicion de la lista del resultado del query\n $this->captura('fila','int4');\n $this->captura('tipo_documento','varchar');\n $this->captura('ci','varchar');\n $this->captura('expedicion','varchar');\n $this->captura('fecha_nacimiento','text');\n\n $this->captura('apellido_paterno','varchar');\n $this->captura('apellido_materno','varchar');\n $this->captura('nombres','varchar');\n $this->captura('nacionalidad','varchar');\n $this->captura('sexo','varchar');\n $this->captura('jubilado','int4');\n $this->captura('aporta_afp','int4');\n $this->captura('discapacitado','int4');\n $this->captura('tutor_discapacidad','int4');\n $this->captura('fecha_ingreso','text');\n $this->captura('fecha_finalizacion','text');\n $this->captura('motivo_retiro','varchar');\n $this->captura('caja_salud','varchar');\n $this->captura('afp','integer');\n $this->captura('nro_afp','varchar');\n $this->captura('oficina','int4');\n $this->captura('clasificacion_laboral','varchar');\n $this->captura('cargo','varchar');\n $this->captura('modalidad_contrato','int4');\n $this->captura('tipo_contrato','int4');\n $this->captura('valor','numeric');\n $this->captura('horas_dia','int4');\n\n $this->captura('codigo_columna','varchar');\n $this->captura('contrato_periodo','varchar');\n $this->captura('retiro_periodo','varchar');\n $this->captura('edad','integer');\n $this->captura('lugar','varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo $this->consulta;exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "69b426b37ec31a03ab37830bf4b7828c", "score": "0.67857254", "text": "function listarReporteMinisterioCabecera(){\n\t\t$this->procedimiento='plani.ft_planilla_sel';\n\t\t$this->transaccion='PLA_REPMINCABE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\t\n\t\t\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('nombre_entidad','varchar');\t\t\n\t\t$this->captura('nit','varchar');\n\t\t$this->captura('identificador_min_trabajo','varchar');\n\t\t$this->captura('identificador_caja_salud','varchar');\n\t\t\t\t\n\t\t\t\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t\n\t\t$this->ejecutarConsulta();\n\n\t\t\n\t\t\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "9102fe9e29e9e4a76f8f678a880b6866", "score": "0.67328936", "text": "private function emitirRestosPagar() {\n\n if (!$this->exibirRelatorio(self::EMITIR_RESTOS_A_PAGAR)) {\n return false;\n }\n\n $oDadosResto = $this->getDadosRestosPagar();\n if ($this->iAnoUsu >= 2017 ) {\n $this->imprimirRestosPagar($oDadosResto);\n } else {\n\n /**\n * ******************************************************\n * Impressão dos dados Referentes ao ano <= 2016\n * ******************************************************\n */\n $this->oPdf->setAutoNewLineMulticell(false);\n $this->oPdf->MultiCell(70, 6, \"RESTOS A PAGAR POR PODER E MINISTÉRIO PÚBLICO\", 'TBR', 'C');\n $this->oPdf->MultiCell(30, 6, \"Inscrição\", 'TBL', 'C');\n $this->oPdf->MultiCell(30, 3, \"Cancelamento\\nAté o Bimestre\", 'TBLR', 'C');\n $this->oPdf->MultiCell(30, 3, \"Pagamento\\nAté o Bimestre\", 'TBLR', 'C');\n $this->oPdf->setAutoNewLineMulticell(true);\n $this->oPdf->MultiCell(30, 3, \"Saldo\\na Pagar\", 'TBL', 'C');\n\n $this->oPdf->cell(70, 3, \"RESTOS A PAGAR PROCESSADOS\", 'R', 'C');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalProcessado->nTotalInscrito, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalProcessado->nTotalCancelado, 'f'), 'L',0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalProcessado->nTotalPago, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalProcessado->nTotalPagar, 'f'), 'L', 1, 'R');\n\n $this->oPdf->cell(70, 3, \" Poder Executivo\", 'R', 0, 'L');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oExecutivo->nTotalProcessadoInscrito, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oExecutivo->nTotalProcessadoCancelado, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oExecutivo->nTotalProcessadoPago, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oExecutivo->nTotalProcessadoPagar, 'f'), 'L', 1, 'R');\n\n $this->oPdf->cell(70, 3, \" Poder Legislativo\", 'R', 0, 'L');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oLegislativo->nTotalProcessadoInscrito, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oLegislativo->nTotalProcessadoCancelado, 'f'), 'L',0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oLegislativo->nTotalProcessadoPago, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oLegislativo->nTotalProcessadoPagar, 'f'), 'L', 1, 'R');\n\n $this->oPdf->cell(70, 3, \"RESTOS A PAGAR NÃO PROCESSADOS\", 'R', 'C');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalNaoProcessado->nTotalInscrito, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalNaoProcessado->nTotalCancelado, 'f'), 'L',0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalNaoProcessado->nTotalPago, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalNaoProcessado->nTotalPagar, 'f'), 'L', 1, 'R');\n\n $this->oPdf->cell(70, 3, \" Poder Executivo\", 'R', 0, 'L');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oExecutivo->nTotalNaoProcessadoInscrito, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oExecutivo->nTotalNaoProcessadoCancelado, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oExecutivo->nTotalNaoProcessadoPago, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oExecutivo->nTotalNaoProcessadoPagar, 'f'), 'L', 1, 'R');\n\n $this->oPdf->cell(70, 3, \" Poder Legislativo\", 'R', 0, 'L');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oLegislativo->nTotalNaoProcessadoInscrito, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oLegislativo->nTotalNaoProcessadoCancelado, 'f'), 'L',0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oLegislativo->nTotalNaoProcessadoPago, 'f'), 'L', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oLegislativo->nTotalNaoProcessadoPagar, 'f'), 'L', 1, 'R');\n\n $this->oPdf->cell(70, 3, \"TOTAL\", 'RTB', 0, 'l');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalGeral->nInscrito, 'f'), 'TBL', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalGeral->nCancelado, 'f'), 'TBL',0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalGeral->nPago, 'f'), 'TBL', 0, 'R');\n $this->oPdf->cell(30, 3, db_formatar($oDadosResto->oTotalGeral->nPagar, 'f'), 'TBL', 1, 'R');\n $this->oPdf->ln();\n }\n\n }", "title": "" }, { "docid": "79d85214748715dfe9d2c38ec917012a", "score": "0.6722458", "text": "public function pagoCompaniaAction(){\n\t\t\n\t\t$params = $this->_request->getParams();\n\t\n\t\t$this->view->compania = Domain_Compania::getNameById($params['compania_id']);\n\t\t//Trae el pago de la compania\n\t\t//Seria la sumatoria de todos los pagos que hizo\n\t\t$moneda_pesos = Domain_Helper::getHelperIdByDominioAndName('moneda', 'PESOS');\n\t\t$moneda_dolar = Domain_Helper::getHelperIdByDominioAndName('moneda', 'DOLAR');\n\t\t$moneda_euro = Domain_Helper::getHelperIdByDominioAndName('moneda', 'EURO');\n\t\t \n\t\t\n\t\t\n\t\t//Trae la sumatoria de todo lo que debe segun las polizas\n\t\t$this->view->debe_pesos = Domain_Compania::getDebePremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_pesos);\n\t\t$this->view->debe_dolar = Domain_Compania::getDebePremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_dolar);\n\t\t$this->view->debe_euro = Domain_Compania::getDebePremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_euro);\n\t\t\n\t\t\n\t\t\n\t\t//Trae la sumatoria de todo lo que pago\n\t $this->view->pago_pesos = Domain_Compania::getPagoPremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_pesos);\n\t\t$this->view->pago_dolar = Domain_Compania::getPagoPremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_dolar);\n\t\t$this->view->pago_euro = Domain_Compania::getPagoPremioCompaniaByCompaniaIdAndMoneda($params['compania_id'],$moneda_euro);\n\t\t\n\t\t//Me trae las polizas del asegurado por ahora todas\n\t\t//$rows = $this->_t_usuario->getPolizaByAsegurado($params['asegurado_id']);\n\t\t//Trae las polizas aduaneras\n\t\t//$this->view->polizas_aduaneros = $this->_t_usuario->getPolizaInpagaByAseguradoAndTipo($params['asegurado_id'],2);\n\t\t///$this->view->polizas_automotor = $this->_t_usuario->getPolizaInpagaByAseguradoAndTipo($params['asegurado_id'],7);\n\t\t//$this->view->polizas_alquiler = $this->_t_usuario->getPolizaInpagaByAseguradoAndTipo($params['asegurado_id'],5);\n\t\t//$this->view->polizas_construccion = $this->_t_usuario->getPolizaInpagaByAseguradoAndTipo($params['asegurado_id'],4);\n\t\t\n\t\t\n\t\t$this->view->monedas = Domain_Helper::getHelperByDominio('moneda');\n\t\t$this->view->compania_id = $params['compania_id'];\n\t\t\n\t}", "title": "" }, { "docid": "2e01260b71500676cec3885037982c46", "score": "0.6718911", "text": "public function reportes(){\n\t\t$data['titulo'] = $this->titulo;\n\t\t$data['header1'] = \"REPORTES\";\n\t\t$data['header2'] = \"REPORTES DE BOLETAS\";\n\t\t$data['contenido'] = \"boletas/reportes\";\n\t\t$data['cprocedimientos'] = $this->Model_Cprocedimientos->mostrar_cprocedimientos();\n\t\t$data['js'] = \"public/iestp/js/reporte_boleta.js\";\n \t\t$this->load->view('layouts/content',$data);\n\t}", "title": "" }, { "docid": "388e0592c96058de238345662d3af721", "score": "0.67006993", "text": "function listarReporteAguinaldoMinisterio(){\n\t\t$this->procedimiento='plani.ft_planilla_sel';\n\t\t$this->transaccion='PLA_REPMINAGUI_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n $this->captura('fila','int4');\n $this->captura('tipo_documento','int4');\n $this->captura('ci','varchar');\n $this->captura('expedicion','varchar');\n $this->captura('afp','varchar');\n $this->captura('nro_afp','varchar');\n $this->captura('apellido_paterno','varchar');\n $this->captura('apellido_materno','varchar');\n $this->captura('apellido_casada','varchar');\n $this->captura('primer_nombre','varchar');\n $this->captura('otros_nombres','varchar');\n $this->captura('nacionalidad','varchar');\n $this->captura('fecha_nacimiento','text');\n $this->captura('sexo','int4');\n $this->captura('jubilado','int4');\n $this->captura('clasificacion_laboral','varchar');\n $this->captura('cargo','varchar');\n $this->captura('fecha_ingreso','text');\n $this->captura('modalidad_contrato','int4');\n $this->captura('fecha_finalizacion','text');\n $this->captura('horas_dia','int4');\n $this->captura('codigo_columna','varchar');\n $this->captura('valor','numeric');\n $this->captura('oficina','varchar');\n $this->captura('discapacitado','varchar');\n\n $this->captura('edad','integer');\n $this->captura('lugar','varchar');\n\n\n //Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "d85fee18e29008f491222c3c7c3ca5f0", "score": "0.6624749", "text": "function report(){\r\n$pdf = new PDF('P','mm','Letter');\r\n$pdf->AliasNbPages();\r\n$pdf->AddPage();\r\n$pdf->SetFont('Times','',10);\r\n// ebc5c72026c6baf3c1efc5631139fdab $pdf->ChapterTitle(1,'HOLA');\r\n\r\n// ebc5c72026c6baf3c1efc5631139fdab $fechafmt=$_GET['fecha'];\r\n// ebc5c72026c6baf3c1efc5631139fdab $fecha=cambiaf_a_mysql($fechafmt);\r\n$fecha = date('d/m/Y');\r\n//$id_agenda = $_GET['id_agenda'];\r\n$id_agenda = 30;\r\n$nodo = new paciente();\r\n$nodo->setid_agenda($id_agenda);\r\n$nodo->getpacientexagenda();\r\n\r\n\r\n $pdf->FECHATitle('','FECHA:'.$fecha);\r\n $pdf->Cell(0,4,'',0,1);\r\n $cod_tipo_especialista = 1; \r\n //$pdf->ChapterTitle2(' Reporte agenda - paciente: '.getnombrepaciente($id_paciente),' ');\r\n $pdf->ChapterTitle2('Datos paciente - '.'',' ');\r\n //unset($arrAgendado);\r\n //$arrAgendado = $nodo->rptagendadiaria;\r\n datos_pacientes($nodo->arrobtPaciente, $pdf);\r\n $pdf->ChapterTitle2(' Reporte agenda - paciente: '.'',' ');\r\n$me= new cls_atencion();\r\n$me->setid_paciente(39);\r\n //$me->setid_paciente(intval($nodo->arrobtPaciente[0]['id_paciente']));\r\n $me->msoatencionxpaciente();\r\n \r\n imprimirrptpachra($me->arratencion, $pdf);\r\n $pdf->Ln();$pdf->Ln();$pdf->Ln();$pdf->Ln();$pdf->Ln();$pdf->Ln();\r\n $pdf->Cell(0,4,'',0,1);\r\n \r\n \r\n \r\n$pdf->Output();\r\n\r\n}", "title": "" }, { "docid": "435730914f2af84fcf9e6bc6546491d7", "score": "0.6609838", "text": "public function reportesAction()\n {\n \t$this->view->fechas = CobAjuste::find([\"id_ajuste_reportado IS NOT NULL\", 'order' => 'id_ajuste_reportado DESC', 'group' => 'id_periodo, id_ajuste_reportado']);\n }", "title": "" }, { "docid": "e84e0b9415954ada0483d469695a8e5b", "score": "0.6580602", "text": "function listarReporteSegAguinaldoMinisterioNuevo(){\n $this->procedimiento='plani.ft_planilla_sel';\n $this->transaccion='PLA_MINTRA_SAGUI_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_periodo','id_periodo','int4');\n $this->setParametro('id_gestion','id_gestion','int4');\n\n //Definicion de la lista del resultado del query\n $this->captura('fila','int4');\n $this->captura('tipo_documento','varchar');\n $this->captura('ci','varchar');\n $this->captura('expedicion','varchar');\n $this->captura('fecha_nacimiento','text');\n\n $this->captura('apellido_paterno','varchar');\n $this->captura('apellido_materno','varchar');\n $this->captura('nombres','varchar');\n $this->captura('nacionalidad','varchar');\n $this->captura('sexo','varchar');\n $this->captura('jubilado','int4');\n $this->captura('aporta_afp','int4');\n $this->captura('discapacitado','int4');\n $this->captura('tutor_discapacidad','int4');\n $this->captura('fecha_ingreso','text');\n $this->captura('fecha_finalizacion','text');\n $this->captura('motivo_retiro','varchar');\n $this->captura('caja_salud','varchar');\n $this->captura('afp','integer');\n $this->captura('nro_afp','varchar');\n $this->captura('oficina','int4');\n $this->captura('clasificacion_laboral','varchar');\n $this->captura('cargo','varchar');\n $this->captura('modalidad_contrato','int4');\n $this->captura('tipo_contrato','int4');\n $this->captura('valor','numeric');\n $this->captura('horas_dia','int4');\n\n $this->captura('codigo_columna','varchar');\n $this->captura('contrato_periodo','varchar');\n $this->captura('retiro_periodo','varchar');\n $this->captura('edad','integer');\n $this->captura('lugar','varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo $this->consulta;exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "a8e85eebe081d9bf87fedddff1f4b3e6", "score": "0.6572286", "text": "function reporteApertura(){\r\n $this->procedimiento='vef.ft_apertura_cierre_caja_sel';\r\n $this->transaccion='VF_REPORAP_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n $this->setCount(false);//tipo de transaccion\r\n\r\n $this->setParametro('id_apertura_cierre_caja','id_apertura_cierre_caja','int4');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('cajero','varchar');\r\n $this->captura('fecha','varchar');\r\n $this->captura('pais','varchar');\r\n $this->captura('estacion','varchar');\r\n $this->captura('punto_venta','varchar');\r\n $this->captura('desc_punto_venta','varchar');\r\n $this->captura('obs_cierre','varchar');\r\n $this->captura('arqueo_moneda_local','numeric');\r\n $this->captura('arqueo_moneda_extranjera','numeric');\r\n $this->captura('monto_inicial','numeric');\r\n $this->captura('monto_inicial_moneda_extranjera','numeric');\r\n $this->captura('tipo_cambio','numeric');\r\n $this->captura('tiene_dos_monedas','varchar');\r\n $this->captura('moneda_local','varchar');\r\n $this->captura('moneda_extranjera','varchar');\r\n $this->captura('cod_moneda_local','varchar');\r\n $this->captura('cod_moneda_extranjera','varchar');\r\n\r\n $this->captura('efectivo_boletos_ml','numeric');\r\n $this->captura('efectivo_boletos_me','numeric');\r\n $this->captura('tarjeta_boletos_ml','numeric');\r\n $this->captura('tarjeta_boletos_me','numeric');\r\n $this->captura('cuenta_corriente_boletos_ml','numeric');\r\n $this->captura('cuenta_corriente_boletos_me','numeric');\r\n $this->captura('mco_boletos_ml','numeric');\r\n $this->captura('mco_boletos_me','numeric');\r\n $this->captura('otros_boletos_ml','numeric');\r\n $this->captura('otros_boletos_me','numeric');\r\n\r\n $this->captura('efectivo_ventas_ml','numeric');\r\n $this->captura('efectivo_ventas_me','numeric');\r\n $this->captura('tarjeta_ventas_ml','numeric');\r\n $this->captura('tarjeta_ventas_me','numeric');\r\n $this->captura('cuenta_corriente_ventas_ml','numeric');\r\n $this->captura('cuenta_corriente_ventas_me','numeric');\r\n $this->captura('mco_ventas_ml','numeric');\r\n $this->captura('mco_ventas_me','numeric');\r\n $this->captura('otros_ventas_ml','numeric');\r\n $this->captura('otros_ventas_me','numeric');\r\n\r\n $this->captura('comisiones_ml','numeric');\r\n $this->captura('comisiones_me','numeric');\r\n $this->captura('monto_ca_recibo_ml','numeric');\r\n $this->captura('monto_ca_recibo_me','numeric');\r\n $this->captura('monto_cc_recibo_ml','numeric');\r\n $this->captura('monto_cc_recibo_me','numeric');\r\n\r\n $this->captura('monto_otro_recibo_ml','numeric');\r\n $this->captura('monto_otro_recibo_me','numeric');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n\r\n //var_dump($this->respuesta);exit;\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "b4bb7f233ba076a90b89e31153c16dc5", "score": "0.6567433", "text": "public function actionReporte_listas_ciudad(){\n// echo \"oh\";\n// die();\n \n Yii::setAlias('listaCiudad', 'reporte/prueba');\n $jasper =Yii::$app->jasper;\n //$jasper->compile(Yii::getAlias('@nombre_cualquiera'). 'getLista.jrxml')->excute();\n $jasper->process(\n Yii::getAlias('@listaCiudad') . '/ciudadLista.jasper',\n [],\n ['docx'],\n false,\n false\n \n )->execute();\n// echo \"genial\";\n// die();\n return $this->render('reporte_lista_ciudad', ['url'=>'reporte\\prueba\\ciudadLista.docx', 'formato'=>'word']);\n \n }", "title": "" }, { "docid": "591efe342799876030a5ed2fdc272939", "score": "0.65560454", "text": "function reportes()\n {\n if (isset($_SERVER['HTTP_REFERER'])) {\n $data['estudiante'] = $this->Estudiante_model->get_all_estudiantes();\n\n /*Empiezo de paginacion*/\n $total_rows = $this->Estudiante_model->count();\n\n $this->load->library('pagination');\n $config['total_rows'] = $total_rows;\n $config['per_page'] = $this->limit;\n $config['uri_segment'] = 3;\n $config['base_url'] = base_url() . '/estudiante/reportes';\n $this->pagination->initialize($config);\n\n $page_links = $this->pagination->create_links();\n $data['links'] = explode('&nbsp;', $page_links);\n /*Fin de paginacion*/\n\n $this->load->helper('form');\n $this->load->helper(array('form'));\n $this->load->view('templates/header');\n $this->load->view('estudiante/reportes', $data);\n $this->load->view('templates/footer');\n } else {\n\n\n $this->load->view('templates/header');\n $this->load->view('templates/forbidden');\n $this->load->view('templates/footer');\n\n }\n }", "title": "" }, { "docid": "bbdf06eea98fdcff2ddd00a5d45f3953", "score": "0.65276355", "text": "public function actionReporte_listas_ciudades(){\n// echo \"oh\";\n// die();\n \n Yii::setAlias('listaCiudad', 'reporte/prueba');\n $jasper =Yii::$app->jasper;\n //$jasper->compile(Yii::getAlias('@nombre_cualquiera'). 'getLista.jrxml')->excute();\n $jasper->process(\n Yii::getAlias('@listaCiudad') . '/ciudadLista.jasper',\n [],\n ['xls'],\n false,\n false\n \n )->execute();\n// echo \"genial\";\n// die();\n return $this->render('reporte_lista_ciudad', ['url'=>'reporte\\prueba\\ciudadLista.xls', 'formato'=>'excel']);\n \n }", "title": "" }, { "docid": "572c446952247611cca50a50227b2e38", "score": "0.6504593", "text": "public function actionReporte_lista_ciudad(){\n// echo \"oh\";\n// die();\n \n Yii::setAlias('listaCiudad', 'reporte/param_ciudad');\n $jasper =Yii::$app->jasper;\n //$jasper->compile(Yii::getAlias('@nombre_cualquiera'). 'getLista.jrxml')->excute();\n $jasper->process(\n Yii::getAlias('@listaCiudad') . '/agruparListaCiudad.jasper',\n [],\n ['pdf'],\n false,\n false\n \n )->execute();\n// echo \"genial\";\n// die();\n return $this->render('reporte_lista_ciudad', ['url'=>'reporte\\param_ciudad\\agruparListaCiudad.pdf', 'formato'=>'pdf']);\n \n }", "title": "" }, { "docid": "17d35f8c800483e5ae380d6839132f1b", "score": "0.6492236", "text": "public function ReporteEntrada() {\n\n $entrada = $this->input->get('entrada'); \n $data = array();\n $this->load->model('ModeloEntradaArticulos');\n $data = $this->ModeloEntradaArticulos->DetalleEntrada($entrada);\n $totales = $this->ModeloEntradaArticulos->TotalEntradas($entrada);\n\n \n\n \n $pdf = new PDF('L', 'mm', array(216, 140));\n $pdf->AddPage();\n $pdf->SetFont('Arial', '', 8);\n // Se crean números para generar algunas páginas en el documento\n $total = '';\n foreach ($data as $item) {\n $total += $item->valor_total;\n $pdf->Cell(25,5,$item->codigo_producto,1,0,'L',false);\n $pdf->Cell(87,5,$item->descripcion,1,0,'L',false); \n $pdf->Cell(18,5,$item->cantidad,1,0,'L',false); \n $pdf->Cell(30,5,number_format($item->valor_unitario),1,0,'L',false); \n $pdf->Cell(30,5, number_format($item->valor_total),1,0,'L',false); \n $pdf->Ln(5);\n }\n $pdf->Ln(5);\n $pdf->SetFillColor(230,230,230); \n $pdf->SetFont('Arial', 'B', 8);\n $pdf->Cell(25,5,\"TOTAL ITEM\",1,0,'L',true);\n $pdf->Cell(165,5,count($data),1,0,'R',false);\n $pdf->Ln(5);\n $pdf->Cell(25,5,\"TOTAL VALOR\",1,0,'L',true);\n $pdf->Cell(165,5,number_format($total),1,0,'R',false);\n \n\n \n \n \n \n $pdf->Output('paginaEnBlanco.pdf', 'I');\n }", "title": "" }, { "docid": "be340fd22454d8a525b738d1c84e0c04", "score": "0.6491683", "text": "function clientes($objs){\n $pdf = new PDF();\n $pdf->AliasNbPages();\n $pdf->AddPage();\n $pdf->SetX(30);\n $pdf->SetFont('Helvetica','B',13);\n $pdf->Cell(0,10,'Fecha Inicio: '.$objs->fechainicio,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Fecha Final: '.$objs->fechafinal,0,1);\n\n\n foreach($objs->objs as $obj){\n $pdf->AddPage();\n $pdf->SetX(30);\n $pdf->SetFont('Helvetica','B',13);\n $pdf->Cell(0,10,'Cliente: '.$obj->cliente,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'IDs de Reportes: '.$obj->ids,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Fechas de Reportes: '.$obj->fechas,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Tiempo total de servicio: '.$obj->time,0,1);\n }\n \n $pdf->Output();\n }", "title": "" }, { "docid": "7d3d1a43d8850f36226a1e72c8053ada", "score": "0.6491034", "text": "function listarReportePlanillaMinisterio(){\n\t\t$this->procedimiento='plani.ft_planilla_sel';\n\t\t$this->transaccion='PLA_REPMINTRASUE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_periodo','id_periodo','int4');\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('fila','int4');\n\t\t$this->captura('tipo_documento','int4');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('expedicion','varchar');\n\t\t$this->captura('afp','varchar');\n\t\t$this->captura('nro_afp','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('apellido_casada','varchar');\n\t\t$this->captura('primer_nombre','varchar');\n\t\t$this->captura('otros_nombres','varchar');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('fecha_nacimiento','text');\n\t\t$this->captura('sexo','int4');\n\t\t$this->captura('jubilado','int4');\n\t\t$this->captura('clasificacion_laboral','varchar');\n\t\t$this->captura('cargo','varchar');\n\t\t$this->captura('fecha_ingreso','text');\n\t\t$this->captura('modalidad_contrato','int4');\n\t\t$this->captura('fecha_finalizacion','text');\n\t\t$this->captura('horas_dia','int4');\n\t\t$this->captura('codigo_columna','varchar');\n\t\t$this->captura('valor','numeric');\n\t\t$this->captura('oficina','varchar');\n\t\t$this->captura('discapacitado','varchar');\n\t\t$this->captura('contrato_periodo','varchar');\n\t\t$this->captura('retiro_periodo','varchar');\t\n\t\t$this->captura('edad','integer');\t\n\t\t$this->captura('lugar','varchar');\t\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "c8ef24192c7a58c8b964d78a7d3efeba", "score": "0.64907324", "text": "function reporteAperturaCierreCaja(){\r\n $this->procedimiento='vef.ft_apertura_cierre_caja_sel';\r\n $this->transaccion='VF_REPAPCIE_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n $this->setCount(false);//tipo de transaccion\r\n\r\n $this->setParametro('id_apertura_cierre_caja','id_apertura_cierre_caja','int4');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('cajero','varchar');\r\n $this->captura('fecha','varchar');\r\n $this->captura('pais','varchar');\r\n $this->captura('estacion','varchar');\r\n $this->captura('punto_venta','varchar');\r\n $this->captura('obs_cierre','varchar');\r\n $this->captura('arqueo_moneda_local','numeric');\r\n $this->captura('arqueo_moneda_extranjera','numeric');\r\n $this->captura('monto_inicial','numeric');\r\n $this->captura('monto_inicial_moneda_extranjera','numeric');\r\n $this->captura('tipo_cambio','numeric');\r\n $this->captura('tiene_dos_monedas','varchar');\r\n $this->captura('moneda_local','varchar');\r\n $this->captura('moneda_extranjera','varchar');\r\n $this->captura('cod_moneda_local','varchar');\r\n $this->captura('cod_moneda_extranjera','varchar');\r\n\r\n $this->captura('efectivo_boletos_ml','numeric');\r\n $this->captura('efectivo_boletos_me','numeric');\r\n $this->captura('tarjeta_boletos_ml','numeric');\r\n $this->captura('tarjeta_boletos_me','numeric');\r\n $this->captura('cuenta_corriente_boletos_ml','numeric');\r\n $this->captura('cuenta_corriente_boletos_me','numeric');\r\n $this->captura('mco_boletos_ml','numeric');\r\n $this->captura('mco_boletos_me','numeric');\r\n $this->captura('otros_boletos_ml','numeric');\r\n $this->captura('otros_boletos_me','numeric');\r\n\r\n $this->captura('efectivo_ventas_ml','numeric');\r\n $this->captura('efectivo_ventas_me','numeric');\r\n $this->captura('tarjeta_ventas_ml','numeric');\r\n $this->captura('tarjeta_ventas_me','numeric');\r\n $this->captura('cuenta_corriente_ventas_ml','numeric');\r\n $this->captura('cuenta_corriente_ventas_me','numeric');\r\n $this->captura('mco_ventas_ml','numeric');\r\n $this->captura('mco_ventas_me','numeric');\r\n $this->captura('otros_ventas_ml','numeric');\r\n $this->captura('otros_ventas_me','numeric');\r\n /****************AUMENTO DE RECIBOS********************/\r\n $this->captura('efectivo_recibo_ml','numeric');\r\n $this->captura('efectivo_recibo_me','numeric');\r\n $this->captura('tarjeta_recibo_ml','numeric');\r\n $this->captura('tarjeta_recibo_me','numeric');\r\n $this->captura('cuenta_corriente_recibo_ml','numeric');\r\n $this->captura('cuenta_corriente_recibo_me','numeric');\r\n $this->captura('deposito_recibo_ml','numeric');\r\n $this->captura('deposito_recibo_me','numeric');\r\n $this->captura('otros_recibo_ml','numeric');\r\n $this->captura('otros_recibo_me','numeric');\r\n\r\n $this->captura('pago_externo_ml','numeric');\r\n $this->captura('pago_externo_me','numeric');\r\n /******************************************************/\r\n\r\n $this->captura('comisiones_ml','numeric');\r\n $this->captura('comisiones_me','numeric');\r\n $this->captura('monto_ca_recibo_ml','numeric');\r\n $this->captura('monto_ca_recibo_me','numeric');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n\r\n //var_dump($this->respuesta);exit;\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "989b32edbd57790594f52cdf460fd4be", "score": "0.647088", "text": "function listarReportePrimaMinisterio(){\n\t\t$this->procedimiento='plani.ft_planilla_sel';\n\t\t$this->transaccion='PLA_REPMINPRIMA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('fila','int4');\n\t\t$this->captura('tipo_documento','int4');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('expedicion','varchar');\n\t\t$this->captura('afp','varchar');\n\t\t$this->captura('nro_afp','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('apellido_casada','varchar');\n\t\t$this->captura('primer_nombre','varchar');\n\t\t$this->captura('otros_nombres','varchar');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('fecha_nacimiento','text');\n\t\t$this->captura('sexo','int4');\n\t\t$this->captura('jubilado','int4');\n\t\t$this->captura('clasificacion_laboral','varchar');\n\t\t$this->captura('cargo','varchar');\n\t\t$this->captura('fecha_ingreso','text');\n\t\t$this->captura('modalidad_contrato','int4');\n\t\t$this->captura('fecha_finalizacion','text');\n\t\t$this->captura('horas_dia','int4');\n\t\t$this->captura('codigo_columna','varchar');\n\t\t$this->captura('valor','numeric');\n\t\t$this->captura('oficina','varchar');\n\t\t$this->captura('discapacitado','varchar');\n\t\t\n\t\t$this->captura('edad','integer');\t\n\t\t$this->captura('lugar','varchar');\t\t\n\t\t\n\t\t\t\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "6bfe9533b954f4524b8b1d83299e116c", "score": "0.6467006", "text": "function mostraPagina()\n\t\t{\n\t\t// prepara la pagina, ossia il contenitore della tabella\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Controlli\", \"titolo\");\n\t\t$this->aggiungiElemento($this->Tabella());\n\t\t\n\t\t// manda in output l'intera pagina\n\t\t$this->mostra();\n\t\t}", "title": "" }, { "docid": "cfc9df0f6607010e63b7d5b1a831eccb", "score": "0.6466025", "text": "function reporte($obj){\n $pdf = new PDF();\n $pdf->AliasNbPages();\n $pdf->AddPage();\n\n\n $pdf->SetX(30);\n $pdf->SetFont('Helvetica','B',13);\n $pdf->Cell(0,10,'ID Reporte: '.$obj->id_reporte,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Cliente: '.$obj->cliente,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'ID Ticket: '.$obj->id_ticket,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Contacto: '.$obj->contacto,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Solicitado por: '.$obj->solicitadopor,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Partes / Descripcion: '.$obj->partesdescripcion,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Tareas: '.$obj->tareas,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Tipo: '.$obj->tipo,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Hora de llegada: '.$obj->horallegada,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Hora de salida: '.$obj->horasalida,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Tiempo de traslado: '.$obj->tiempotraslado,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Fecha: '.$obj->fecha,0,1);\n\n $pdf->Output();\n }", "title": "" }, { "docid": "65d4ebc2480be5bc21c173f3fbdb3c05", "score": "0.6463766", "text": "public function reporteXTodasFormasPago(Request $request)\n {\n $nombre=$request->get('nom_remitente');\n $fecha_inicio=$request->get('fecha_inicio_4');\n $fecha_final=$request->get('fecha_final_4');\n\n //Obtener los registros X Facturar\n\n $guias=DB::select('SELECT c.num_guia, c.fecha_emision, c.ciudad_origen,c.ciudad_destino, \n c.nom_remitente, c.nom_destinatario, SUM(d.cantidad) as cantidad,c.valor_guia,f.descripcion,c.estatus_cobro\n FROM cabecera as c\n INNER JOIN formas_pago as f\n ON c.id_forma_pago=f.id_formas_pago\n INNER join detalle as d\n ON c.id_cabecera=d.id_cabecera\n WHERE c.nom_remitente=\"'.$nombre.'\"\n AND date(c.fecha_emision) BETWEEN \"'.$fecha_inicio.'\"\n AND \"'.$fecha_final.'\"\n GROUP by c.id_cabecera \n ORDER BY c.fecha_emision ASC');\n $suma=DB::select('SELECT SUM(c.valor_guia) as total \n FROM cabecera as c \n WHERE c.nom_remitente =\"'.$nombre.'\"\n AND date(c.fecha_emision) BETWEEN \"'.$fecha_inicio.'\"\n AND \"'.$fecha_final.'\"');\n $pdf = PDF::loadView('reportes.clientes.pdf.xTodasFormasPago',['guias'=>$guias,'suma'=>$suma]);\n return $pdf->download('Todas-Formas-Pago.pdf');\n }", "title": "" }, { "docid": "e6331850a7d9525d2429c712e5898fd2", "score": "0.64580667", "text": "public function reporteXfacturarxPagar(Request $request)\n {\n $nombre=$request->get('nom_remitente');\n $fecha_inicio=$request->get('fecha_inicio_3');\n $fecha_final=$request->get('fecha_final_3');\n\n //Obtener los registros X Facturar\n\n $guias=DB::select('SELECT c.num_guia, c.fecha_emision, c.ciudad_origen,c.ciudad_destino, \n c.nom_remitente, c.nom_destinatario, SUM(d.cantidad) as cantidad,c.valor_guia\n FROM cabecera as c\n INNER JOIN formas_pago as f\n ON c.id_forma_pago=f.id_formas_pago\n INNER join detalle as d\n on c.id_cabecera=d.id_cabecera\n WHERE c.nom_remitente=\"'.$nombre.'\"\n AND c.estatus_cobro=\"Pendiente\"\n AND date(c.fecha_emision) BETWEEN \"'.$fecha_inicio.'\"\n AND \"'.$fecha_final.'\"\n AND c.id_forma_pago = 3\n GROUP by c.id_cabecera \n ORDER BY c.fecha_emision ASC');\n $suma=DB::select('SELECT SUM(c.valor_guia) as total \n FROM cabecera as c \n WHERE c.nom_remitente =\"'.$nombre.'\"\n AND c.id_forma_pago = 3\n AND c.estatus_cobro=\"Pendiente\"\n AND date(c.fecha_emision) BETWEEN \"'.$fecha_inicio.'\"\n AND \"'.$fecha_final.'\"');\n $pdf = PDF::loadView('reportes.clientes.pdf.xfacturarxPagar',['guias'=>$guias,'suma'=>$suma]);\n return $pdf->download('Por-Facturar-Por-Pagar.pdf');\n }", "title": "" }, { "docid": "c839cde896be4d3d54e4a42c01b2fffc", "score": "0.6452972", "text": "public function reporte_de_trabajos_pdf(){\n\t\t$datos_trabajo = $this->obj_trabajo->reportar_trabajos();\n\t\tob_start();\n\t\trequire_once 'app/vista/reportes/reporte_trabajos.php';\n\t\t$contenido = ob_get_clean();\n\t\t$nombre = \"reporte_trabajos.pdf\";\n\t\tControlador_Reporte::reportar($contenido,$nombre);\n\t}", "title": "" }, { "docid": "7d844812bf4f17ae4c7350e0e0a7b3ae", "score": "0.6443785", "text": "public function mostrarVistaReportes(){\n $profesion= Profesion::all();\n return view(\"secretaria.reportes\", compact(\"profesion\"));\n }", "title": "" }, { "docid": "ef9ebaa62016add6c0c66fa0ddf8564e", "score": "0.64042675", "text": "function respaldoReportes(){\n $id_reportes=pg_query(\"SELECT id_reporte, id_emergency, reporte, fecha_reporte FROM reportes\");\n //LUEGO SE CUENTA LA CANTIDAD DE REPORTE ALMACENADOS\n $consultaCantReportes=pg_fetch_assoc(pg_query(\"SELECT COUNT(id_reporte) as maxrep FROM reportes\"));\n //SE ASIGNA LA CANTIDAD DE REPORTES OBTENIDOS A $CANTIDADREPORTES\n $cantidadReportes=$consultaCantReportes['maxrep'];\nwhile($reg=pg_fetch_assoc($id_reportes)){\n $registro[]=$reg;//LUEGO SE ASIGNA A $REGISTRO LO ENCONTRADO EN LA CONSULTA DE $ID_REPORTES\n \n}\n\nfor($i=0;$i<$cantidadReportes;$i++){//CADA ITERACIÓN DE ESTE FOR REPRESENTA UN REPORTE, ES DECIR SI EXISTEN 10 REPORTES EN EL SISTEMA, EL FOR ITERARÁ 10 VECES\n $registroBomberos= array();\n $registroCarros= array();//SE CREAN ARREGLOS PARA ALMACENAR LOS BOMBEROS Y CARROS BOMBAS QUE APARECEN EN LOS REPORTES\n $pdf = new FPDF();//SE CREA UN NUEVO PDF\n $pdf->AddPage();//SE AÑADE UNA PÁGINA\n $pdf->SetFont('Arial','B',16);//SE LE DA FORMATO A LA FUENTE\n $titulo='Reporte de emergencia número ';//TITULO DEL REPORTE\n $pdf->Ln(20);//ESPACIO VERTICAL\n $pdf->Cell(180,10,utf8_decode($titulo).$registro[$i]['id_reporte'],0,0,'C');//ID DEL REPORTE\n \n //SE REALIZA, UNA CONSULTA PARA RECUPERAR LOS DATOS DE LA EMERGENCIA A LA QUE EL REPORTE ESTÁ ASOCIADO\n $fecha_prioridad=pg_query(\"SELECT priority, start_date, address, id_emergency \n FROM emergency \n WHERE id_emergency='\".$registro[$i]['id_emergency'].\"'\");//$REGISTRO[$i][ID_EMERGENCY], SIGNIFICA QUE SE RECUPERARÁN LOS DATOS DE LA EMERGENCIA DEL REPORTE $i CON EL ID_EMERGENCY ASOCIADO A ESE REPORTE $i\n \n $fechaFetch=pg_fetch_assoc($fecha_prioridad);//SE ASIGNA EL VALOR DE LA FECHA A $FECHAFETCH\n $fecha=substr((string)$fechaFetch['start_date'],0,10);//SE CONVIERTE LA FECHA A UN STRING\n \n \n \n $stringArchivo=\"Reporte asociado.pdf\";//LUEGO SE CREA EL NOMBRE DEL PDF A CREAR\n $pdf->Ln(20);\n $pdf->cell(1,10,'',11,0,'C');\n $pdf->SetFont('Arial','B',12); \n $pdf->Cell(50,10,'Id emergencia',1,0,'C');\n $pdf->Cell(50,10,'Prioridad',1,0,'C');\n $pdf->Cell(90,10,utf8_decode('Dirección'),1,0,'C');//DESPUÉS SE AÑADEN LOS DATOS RELATIVOS A LA EMERGENCIA A LA QUE EL REPORTE ESTÁ ASOCIADO\n $pdf->Ln(10);\n $pdf->cell(1,10,'',11,0,'C');\n $pdf->Cell(50,10,$fechaFetch['id_emergency'],1,0,'C');\n $pdf->Cell(50,10,$fechaFetch['priority'],1,0,'C');\n $pdf->Cell(90,10,utf8_decode($fechaFetch['address']),1,0,'C');\n $pdf->Ln(10);\n \n //LUEGO, SE REALIZAN DOS CONSULTAS, CONTAR LA CANTIDAD DE CARROS BOMBA Y BOMBEROS QUE APARECEN EN UN DETERMINADO REPORTE IDENTIFICADO CON ID_REPORTE, LAS QUE PERMITIRÁN DISTRIBUIR LAS TABLAS QUE SERÁN GENERADAS EN EL RESPALDO DEL REPORTE\n $consultaCantidadBomberos=pg_fetch_assoc(pg_query(\"\n SELECT COUNT(firefighter_name) as maxbomb\n FROM reporte_bomberos\n WHERE id_reporte='\".$registro[$i]['id_reporte'].\"'\"));\n \n $consultaCantidadCarros=pg_fetch_assoc(pg_query(\"\n SELECT COUNT(fire_truck_name) as maxcar\n FROM reporte_carros\n WHERE id_reporte='\".$registro[$i]['id_reporte'].\"'\"));\n //LUEGO SE CAPTURAN DICHAS CANTIDADES Y SE ASIGNAN A $CANTIDADBOMBEROSY $CANTIDADCARROS\n $cantidadBomberos=$consultaCantidadBomberos['maxbomb'];\n \n $cantidadCarros=$consultaCantidadCarros['maxcar'];\n \n $pdf->cell(1,10,'',11,0,'C');\n $pdf->Cell(190,10,'Comandante Incidente',1,0,'C');\n $pdf->Ln(10);\n \n //SE CONULSTAN LOS BOMBEROS PARTICIPANTES EN EL REPORTE $i\n $consulta_repBomberos=pg_query(\"SELECT r.firefighter_name, f.firefighter_type\n FROM reporte_bomberos r, firefighter f\n WHERE id_reporte='\".$registro[$i]['id_reporte'].\"'\n AND r.firefighter_name= f.firefighter_name\");\n \n while($regg=pg_fetch_assoc($consulta_repBomberos)){\n \n $registroBomberos[]=$regg;//SE ASIGNA A $REGISTROBOMBEROS LO RECUPERADO DE LA CONSULTA\n }\n \n for($f=0;$f<$cantidadBomberos;$f++){//LUEGO SE EJECUTA UN FOR QUE ITERARÁ TANTAS VECES COMO CANTIDAD DE BOMBEROS APAREZCAN EN EL REPORTE ALMACENADO\n if($registroBomberos[$f]['firefighter_type']==\"Comandante Incidente\"){//SI EL TIPO DE BOMBERO ES COMANDANTE INCIDENTE, SE AÑADE UNA CELDA CON EL NOMBRE DEL COMANDANTE INCIDENTE\n $pdf->cell(1,10,'',11,0,'C');\n $pdf->Cell(190,10,$registroBomberos[$f]['firefighter_name'],1,0,'C'); \n $pdf->Ln(10); \n }\n }\n \n $pdf->cell(1,10,'',11,0,'C');\n $pdf->Cell(95,10,'Bomberos participantes',1,0,'C');//LUEGO SE AÑADIRÁN LOS BOMBEROS Y CARROS BOMBA PRESENTES EN EL REPORTE\n $pdf->Cell(95,10,'Carros bomba',1,0,'C');\n \n //SE CNSULTA POR LOS CARRPOS BOMBA PRESENTES EN EL REPORTE $i\n $consulta_repCarros=pg_query(\"SELECT fire_truck_name \n FROM reporte_carros \n WHERE id_reporte='\".$registro[$i]['id_reporte'].\"'\");\n \n while($regg=pg_fetch_assoc($consulta_repCarros)){\n \n $registroCarros[]=$regg;//SE REALIZA UN FETCH DE LA CONSUTLA $CONSULTA_REPCARROS\n \n } \n\n \n if($cantidadCarros<$cantidadBomberos){//SI LA CANTIDAD DE CARROS ENCONTRADOS ES MENOR A LA DE BOMBEROS ENCONTRADOS, SUCEDE LO SIGUIENTE\n echo\"holi<br>\";\n for($x=0;$x<$cantidadBomberos;$x++){\n \n $pdf->Ln(10);\n $pdf->cell(1,10,'',11,0,'C');\n $pdf->Cell(95,10,$registroBomberos[$x]['firefighter_name'],1,0,'C');\n if($x>=$cantidadCarros){\n $pdf->Cell(95,10,' ',1,0,'C'); \n }else{\n $pdf->Cell(95,10,$registroCarros[$x]['fire_truck_name'],1,0,'C');\n \n }\n \n \n }\n $pdf->Ln(10);\n }if($cantidadBomberos<$cantidadCarros){//SI LA CANTIDAD DE BOMBEROS ES MENOR A LA CANTIDAD DE CARROS ENCONTRADOS, SUCEDE LO SIGUIENTE\n \n echo \"chaito<br>\";\n for($j=0;$j<$cantidadCarros;$j++){\n $pdf->Ln(10);\n $pdf->cell(1,10,'',11,0,'C'); \n if($j>=$cantidadBomberos){\n $pdf->Cell(95,10,' ',1,0,'C'); \n }\n else{\n $pdf->Cell(95,10,$registroBomberos[$j]['firefighter_name'],1,0,'C');\n }\n $pdf->Cell(95,10,$registroCarros[$j]['fire_truck_name'],1,0,'C');\n \n }\n $pdf->Ln(10);\n }if($cantidadCarros==$cantidadBomberos){//SI LA CANTIDAD DE BOMBEROS ES LA MISMA CANTIDAD DE CARROS BOMBA ENCONTRADOS, SUCEDE LO SIGUIENTE\n \n echo \"jiji<br>\";\n for($y=0;$y<$cantidadCarros;$y++){\n $pdf->Ln(10);\n $pdf->cell(1,10,'',11,0,'C'); \n $pdf->Cell(95,10,$registroBomberos[$y]['firefighter_name'],1,0,'C');\n $pdf->Cell(95,10,$registroCarros[$y]['fire_truck_name'],1,0,'C');\n \n }\n $pdf->Ln(10);\n }\n //FINALMENTE SE AÑADEN LOS DATOS RELATIVOS AL REPORTE\n $pdf->Cell(1,10,'',11,0,'C');\n $pdf->Cell(190,10,'Contenido de reporte',1,0,'C');\n $pdf->Ln(10);\n $pdf->Cell(1,10,'',11,0,'C');\n $pdf->MultiCell(190,10,utf8_decode($registro[$i]['reporte']),1,'C');\n $pdf->Cell(1,10,'',11,0,'C');\n $pdf->Cell(190,10,'Fecha de reporte',1,0,'C');\n $pdf->Ln(10);\n $pdf->Cell(1,10,'',11,0,'C');\n $pdf->Cell(190,10,$registro[$i]['fecha_reporte'],1,0,'C');\n $pdf->Ln(10);\n $pdf->Image('img/logo.png',170,20,20);//SE AÑADE UN LOGO AL REPORTE\n $stringFecha=\" \".$fecha;//SE CREARÁ DIRECTORIO EN QUE SE ALMACENARÁ EL REPORTE\n $stringRuta=\"Emergencia \".$fechaFetch['id_emergency'].$stringFecha;//SE TERMINA DE CREAR RUTA DE REPORTE RESPALDADO\n $mypath=\"respaldosEMG/$stringRuta/\";//SE CREA RUTA DE CARPETA CONTENEDORA DE LA PRIMERA RUTA DESCRITA\n if (!is_dir($mypath)) {//SE VERIFICA SI LA RUTA EXISTE, SI NO EXISTE, SE CREA\n mkdir('respaldosEMG/'.$stringRuta.'/', 0777, true); \n }\n //SI LA RUTA EXISTE, SE ESCRIBE DIRECTAMENTE EL ARCHIVO\n $pdf->Output($mypath.\"/\".$stringArchivo,'F');\n \n \n}\n\n\n}", "title": "" }, { "docid": "82348b8b139c8beea2e337cf9f9322c7", "score": "0.63975406", "text": "function getPagina(){\r\n\t\techo $this->cabecera.$this->cuerpo.$this->pie;\r\n\t}", "title": "" }, { "docid": "0a4f6261950dfcb5cd1780b430c67244", "score": "0.6390965", "text": "public function index()\n {\n return view(\"pdf.listado_reportes\");\n }", "title": "" }, { "docid": "92ab4e0f44cdfa0e467b198bf545487d", "score": "0.6381782", "text": "public function index()\n {\n //\n $datos['reportes']=reporte::paginate(15);\n return view('reporte.index', $datos);\n }", "title": "" }, { "docid": "5df190fd7a61e7e6b9d9cef5f555a002", "score": "0.63638866", "text": "function reportePagoVariable(){\n\t\t$this->procedimiento='oip.ft_archivo_horas_piloto_sel';\n\t\t$this->transaccion='OIP_REPPILO_SEL';\n\t\t$this->tipo_procedimiento='SEL';\t\t\t\t\t\t\n $this->setCount(false);\n\n $this->setParametro('id_archivo_horas_piloto','id_archivo_horas_piloto','integer');\n \n //captura de datos\n $this->captura('nombre', 'varchar');\n $this->captura('gestion', 'int4');\n $this->captura('periodo', 'varchar');\n $this->captura('pago_total', 'numeric');\n $this->captura('nombre_piloto', 'varchar');\n $this->captura('escala_salarial', 'varchar');\n $this->captura('ci', 'varchar');\n $this->captura('pic_sic', 'varchar');\n $this->captura('horas_vuelo','int4');\n $this->captura('horas_simulador_full', 'int4');\n $this->captura('horas_simulador_fix', 'int4');\n $this->captura('horas_simulador_full_efectivas', 'int4');\n $this->captura('horas_simulador_fix_efectivas', 'int4');\n $this->captura('pago_variable', 'numeric');\n $this->captura('factor_esfuerzo', 'numeric');\n $this->captura('monto_horas_vuelo', 'numeric');\n $this->captura('monto_horas_simulador_full', 'numeric');\n $this->captura('monto_horas_simulador_fix', 'numeric');\n $this->captura('tipo_flota', 'varchar');\n $this->captura('pic_sic_servicio', 'varchar');\n\n\t\t//Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit; \n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n return $this->respuesta; \n }", "title": "" }, { "docid": "7ca19c288413b6a41e1fd656e9ab9140", "score": "0.6352727", "text": "public function defineReport($date,$interCompany,$noActivity,$typePaymentTerm,$paymentTerms)\r\n {\r\n ini_set('max_execution_time', 1500);\r\n ini_set('memory_limit', '512M');\r\n $legendSecurityRetainer=\"<br>Nota: Los carriers con <font style='color:red;'> * </font> son aquellos que tienen deposito de seguridad.\";\r\n $var=\"\";\r\n if($paymentTerms==\"todos\") {\r\n $paymentTerms= TerminoPago::getModel();\r\n \r\n if($typePaymentTerm===NULL){/*Este caso es si se selecciono traer ambos tipos de relacion comercial*/\r\n $var.=\"<h1 style='color:#06ACFA!important;'>RECREDI CUSTOMER</h1> <br>\";\r\n foreach ($paymentTerms as $key => $paymentTerm) /*Busca todos los termino pago en la relacion customer*/\r\n {\r\n if($paymentTerm->name!=\"Sin estatus\") $var.= $this->report($date,$interCompany,$noActivity,FALSE,$paymentTerm->id);\r\n }\r\n $var.=\"<br> <h1 style='color:#06ACFA!important;'>RECREDI SUPPLIER</h1> <br>\";\r\n foreach ($paymentTerms as $key => $paymentTerm) /*Concatena al customer y busca todos los termino pago en la relacion supplier*/\r\n {\r\n if($paymentTerm->name!=\"Sin estatus\") $var.= $this->report($date,$interCompany,$noActivity,TRUE,$paymentTerm->id);\r\n }\r\n }else{\r\n $var.=\"<h1>RECREDI</h1>\";\r\n foreach ($paymentTerms as $key => $paymentTerm) /*Busca todos los termino pago en la relacion seleccionada, (solo una:customer o supplier)*/\r\n {\r\n if($paymentTerm->name!=\"Sin estatus\") $var.= $this->report($date,$interCompany,$noActivity,$typePaymentTerm,$paymentTerm->id);\r\n }\r\n $var.= $this->totalsGeneral($date).$legendSecurityRetainer;\r\n }\r\n }else{ /*Busca un solo termino pago en la relacion seleccionada, (solo una:customer o supplier)*/\r\n $data= $this->report($date,$interCompany,$noActivity,$typePaymentTerm,$paymentTerms);\r\n if($data!=NULL)\r\n $var.=\"<h1>RECREDI</h1>\". $data.$legendSecurityRetainer;\r\n else\r\n $var.=\"<h3>No hay data para este termino pago en la relacion comercial seleccionada</h3>\";\r\n \r\n } \r\n return $var;\r\n }", "title": "" }, { "docid": "a369e9f46476a288ec9bb81b706a1229", "score": "0.6334368", "text": "public function reporteXfacturarxPagarTodos(Request $request)\n {\n $fecha_inicio=$request->get('fecha_inicio_5');\n $fecha_final=$request->get('fecha_final_5');\n\n //Obtener los registros X Facturar\n\n $guias=DB::select('SELECT c.num_guia, c.fecha_emision, c.ciudad_origen,c.ciudad_destino, \n c.nom_remitente, c.nom_destinatario, SUM(d.cantidad) as cantidad,c.valor_guia\n FROM cabecera as c\n INNER JOIN formas_pago as f\n ON c.id_forma_pago=f.id_formas_pago\n INNER join detalle as d\n on c.id_cabecera=d.id_cabecera\n WHERE c.estatus_cobro=\"Pendiente\"\n AND date(c.fecha_emision) BETWEEN \"'.$fecha_inicio.'\"\n AND \"'.$fecha_final.'\"\n AND c.id_forma_pago = 3\n GROUP by c.id_cabecera \n ORDER BY c.fecha_emision ASC');\n $suma=DB::select('SELECT SUM(c.valor_guia) as total \n FROM cabecera as c \n WHERE c.id_forma_pago = 3\n AND c.estatus_cobro=\"Pendiente\"\n AND date(c.fecha_emision) BETWEEN \"'.$fecha_inicio.'\"\n AND \"'.$fecha_final.'\"');\n $pdf = PDF::loadView('reportes.clientes.pdf.xfacturarxPagarTodos',['guias'=>$guias,'suma'=>$suma]);\n return $pdf->download('Por-Facturar-Por-Pagar-Todos.pdf');\n }", "title": "" }, { "docid": "bee5e6fa8294f1f0b55269763b47d395", "score": "0.63193125", "text": "function anexos_orden_pago_relacion($pdf, $numero, $fecha, $pag) {\n\t//\tNUEVA PAGINA CABECERA\n\t$pdf->AddPage(); \n\tsetLogo($pdf);\n\t\n\t$pdf->SetFont('Arial', 'B', 9);\n\t$pdf->Cell(15, 4); $pdf->Cell(120, 5, '', 0, 0, 'L');\n\t$pdf->SetFont('Arial', '', 9);\n\t$pdf->Cell(50, 4, utf8_decode('Número: '), 0, 0, 'R');\n\t$pdf->SetFont('Arial', 'B', 9);\n\t$pdf->Cell(35, 4, $numero, 0, 1, 'L');\t\n\t$pdf->SetFont('Arial', 'B', 9);\n\t$pdf->Cell(15, 4); $pdf->Cell(120, 5, '', 0, 0, 'L'); \n\t$pdf->SetFont('Arial', '', 9);\n\t$pdf->Cell(50, 4, 'Fecha: ', 0, 0, 'R'); \n\t$pdf->SetFont('Arial', 'B', 9);\n\tlist($a, $m, $d)=SPLIT( '[/.-]', $fecha); $fecha=$d.\"/\".$m.\"/\".$a;\n\t$pdf->Cell(35, 4, $fecha, 0, 1, 'L');\t \n\t$pdf->SetFont('Arial', '', 9);\n\t$pdf->Cell(185, 4, utf8_decode('Página: '), 0, 0, 'R'); \n\t$pdf->SetFont('Arial', 'B', 9);\n\t$pdf->Cell(35, 4, $pag, 0, 1, 'L'); \n\t\n\t/////////////////////////////\n\t$pdf->Ln(10);\n\t$pdf->SetFont('Arial', 'B', 14);\n\t$pdf->Cell(200, 5, utf8_decode('Relación de Retenciones'), 0, 1, 'C');\n\t$pdf->Cell(200, 7, '', 0, 1, 'C');\n\t$pdf->Ln(5);\t\t\n\t$pdf->SetDrawColor(0, 0, 0); $pdf->SetFillColor(255, 255, 255); $pdf->SetTextColor(0, 0, 0);\n\t$pdf->SetFont('Arial', 'B', 10);\n\t$pdf->Cell(30, 5, utf8_decode('Código'), 1, 0, 'C', 1);\n\t$pdf->Cell(135, 5, utf8_decode('Denominación'), 1, 0, 'C', 1);\n\t$pdf->Cell(40, 5, 'Total', 1, 1, 'C', 1);\n\t$pdf->Ln(2);\n}", "title": "" }, { "docid": "df174b2c3fca418b1fcd0dee8856b3ac", "score": "0.63086414", "text": "function general($obj){\n $pdf = new PDF();\n $pdf->AliasNbPages();\n $pdf->AddPage();\n\n $pdf->SetX(30);\n $pdf->SetFont('Helvetica','B',13);\n $pdf->Cell(0,10,'Fecha Inicio: '.$obj->fechainicio,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Fecha Final: '.$obj->fechafinal,0,1);\n $pdf->SetX(30);\n $pdf->Cell(0,10,'Total de horas de servicio: '.$obj->time,0,1);\n\n $pdf->Output();\n }", "title": "" }, { "docid": "0593442e7d5705956d0e1c8d556c34b9", "score": "0.62977517", "text": "function reporteOtrosIngresos(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='plani.ft_planilla_sel';// nombre procedimiento almacenado\n $this->transaccion='PLA_RP_OTROS_ING_SEL';//nombre de la transaccion\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\n //$this->setParametro('fecha_ini','fecha_ini','date');\n //$this->setParametro('fecha_fin','fecha_fin','date');\n $this->setParametro('gestion','gestion','integer');\n $this->setParametro('periodo','periodo','integer');\n //$this->setParametro('tipo','tipo','varchar');\n\n //defino varialbes que se capturan como retorno de la funcion\n\n\n $this->captura('nombre_empleado','text');\n $this->captura('id_funcionario','integer');\n $this->captura('sistema_fuente','varchar');\n $this->captura('monto','numeric');\n $this->captura('ci','varchar');\n $this->captura('cargo','varchar');\n $this->captura('contrato','varchar');\n $this->captura('categoria','varchar');\n $this->captura('area','varchar');\n $this->captura('regional','varchar');\n $this->captura('c31','varchar');\n $this->captura('fecha_pago','date');\n $this->captura('tipo','varchar');\n $this->captura('estado','varchar');\n $this->captura('tasa_nacional','numeric');\n $this->captura('tasa_internacional','numeric');\n $this->captura('importe_retencion','numeric');\n $this->captura('orden','varchar');\n $this->captura('ref_sep','numeric');\n $this->captura('id_fuente','integer');\n //$this->captura('prima','numeric');\n //$this->captura('retro','numeric');\n\n\n //Ejecuta la funcion\n $this->armarConsulta();\n //echo $this->getConsulta(); exit;\n $this->ejecutarConsulta();\n return $this->respuesta;\n }", "title": "" }, { "docid": "54916aaff8a1609a10a8183ad3a3a48e", "score": "0.6282584", "text": "public function index() \n {\n $reglas_evaluacion = $this->rep_mod->get_lista_roles_regla_evaluacion('roles', 'excepcion'); //Agregar reglas de evaluación a sesión, para ser utilizadas en la muestra de resultados\n $this->session->set_userdata('reglas_evaluacion', $reglas_evaluacion);\n \n $main_content = $this->filtrosreportes_tpl->getCuerpo(FiltrosReportes_Tpl::RB_GENERAL, array('js' => array('reporte_general.js')));\n $this->template->setMainTitle(\"General\");\n $this->template->setMainContent($main_content);\n $this->template->getTemplate();\n }", "title": "" }, { "docid": "7dcdcb829652a883842afdb1e7f6bfe6", "score": "0.6264878", "text": "public function getInfoReport($reporte)\n {\n $report = Reporte::where('id', $reporte)->first();\n\n //Se crea un string para pasarlo a la función date_interval_create_from_date_string()\n $periodo = \"\";\n if($report->periodo == \"semanal\")\n {\n $periodo = '7 days';\n }\n elseif($report->periodo == \"quincenal\")\n {\n $periodo = '15 days';\n }\n elseif($report->periodo == \"mensual\")\n {\n $periodo = '1 month';\n }\n\n //Se obtiene la fecha final de acuerdo a la fecha_inicio y el periodo seleccionado\n $fecha_inicio = $report->fecha_inicio;\n $fecha_final = date_create($fecha_inicio);\n date_add($fecha_final, date_interval_create_from_date_string($periodo));\n $fecha_final = date_format($fecha_final, 'Y-m-d');\n\n //Se procede a obtener los pedidos en el intervalo establecido\n $pedidos = Pedido::whereBetween('fecha', [$fecha_inicio, $fecha_final])->get()->all();\n\n //Se declaran los arrays donde se van a guardar los datos de interés para mostrar en el reporte\n $array_id = array(); // array de id's\n $array_nombre = array(); //array de nombres de cervezas\n $array_cantidad = array(); //array de cantidad por cerveza vendida\n $array_total_por_cerv = array(); //array del monto total por cerveza vendida\n\n $cant_total = 0;\n $suma_total = 0;\n $envios_normales = 0;\n $envios_expres = 0;\n $pagos_tarjeta = 0;\n $pagos_paypal = 0;\n $total_pedidos = 0;\n\n foreach($pedidos as $pedido)\n {\n foreach($pedido->cervezas as $cerveza)\n {\n $total_por_cerv = $cerveza->pivot->cantidad * $cerveza->precio;\n\n if(empty($array_id))\n {\n $array_id[]= $cerveza->id;\n $array_nombre[] = $cerveza->nombre;\n $array_cantidad[] = $cerveza->pivot->cantidad;\n $array_total_por_cerv[] = $total_por_cerv;\n }\n else //El array ya tiene al menos un elemento\n {\n //Se van a agregar los elementos si el id todavía no existe\n if(!in_array($cerveza->id, $array_id))\n {\n $array_id[]= $cerveza->id;\n $array_nombre[] = $cerveza->nombre;\n $array_cantidad[] = $cerveza->pivot->cantidad;\n $array_total_por_cerv[] = $total_por_cerv;\n }\n else{ \n //Si existe el id, se actualiza la cantidad del producto en su respectivo array,\n //obteniendo el índice del array_id y pasándolo como parámetro a los arrays de cantidad y monto.\n $array_cantidad[array_search($cerveza->id, $array_id, true)] += $cerveza->pivot->cantidad;\n $array_total_por_cerv[array_search($cerveza->id, $array_id, true)] += $total_por_cerv;\n }\n }\n }\n\n //Se obtienen la cantidad de cervezas vendidas, el monto por las cervezas vendidas,\n //cantidad de envíos normales y exprés, y de pagos con tarjeta o paypal.\n $cant_total += $pedido->cantidad;\n $suma_total += $pedido->total;\n if($pedido->metodo_envio == 'normal')\n {\n $envios_normales++;\n }\n elseif($pedido->metodo_envio == 'expres')\n {\n $envios_expres++;\n }\n\n if($pedido->metodo_pago == 'tarjeta')\n {\n $pagos_tarjeta++;\n }\n elseif($pedido->metodo_pago == 'paypal')\n {\n $pagos_paypal++;\n }\n }\n\n //Se ordenan todos los array simultáneamente en orden ascendente\n array_multisort($array_cantidad, $array_id, $array_nombre, $array_total_por_cerv);\n\n //Se crea un arreglo final para devolver con todos los datos obtenidos\n $array_final =array(\n 'cervezas_id' => array_reverse($array_id),\n 'cervezas_nombre' => array_reverse($array_nombre),\n 'cervezas_cantidad' => array_reverse($array_cantidad),\n 'cervezas_monto' => array_reverse($array_total_por_cerv),\n 'total_cervezas_vendidas' => $cant_total,\n 'monto_vendido' => $suma_total,\n 'envios_normales' => $envios_normales,\n 'envios_expres' => $envios_expres,\n 'pagos_tarjeta' => $pagos_tarjeta,\n 'pagos_paypal' => $pagos_paypal,\n 'total_cervezas' => count($array_id),\n 'fecha_inicio' => $fecha_inicio,\n 'fecha_final' => $fecha_final\n );\n return $array_final;\n }", "title": "" }, { "docid": "29a2a73ec2450d02c41cec0186a269f1", "score": "0.6250085", "text": "public function paginador_devolucion_controlador($pagina,$registros,$url,$fecha_inicio,$fecha_final){\r\n $pagina=mainModel::limpiar_cadena($pagina);\r\n\t\t\t$registros=mainModel::limpiar_cadena($registros);\r\n\r\n $url=mainModel::limpiar_cadena($url);\r\n $tipo=$url;\r\n\t\t\t$url=SERVERURL.$url.\"/\";\r\n\r\n\t\t\t\r\n\t\t\t$fecha_inicio=mainModel::limpiar_cadena($fecha_inicio);\r\n\t\t\t$fecha_final=mainModel::limpiar_cadena($fecha_final);\r\n\t\t\t$tabla=\"\";\r\n\r\n\t\t\t$pagina = (isset($pagina) && $pagina>0) ? (int) $pagina : 1;\r\n $inicio = ($pagina>0) ? (($pagina * $registros)-$registros) : 0;\r\n \r\n if($tipo==\"return-search\"){\r\n\t\t\t\tif(mainModel::verificar_fecha($fecha_inicio) || mainModel::verificar_fecha($fecha_final)){\r\n\t\t\t\t\treturn '\r\n\t\t\t\t\t\t<div class=\"alert alert-danger text-center\" role=\"alert\">\r\n\t\t\t\t\t\t\t<p><i class=\"fas fa-exclamation-triangle fa-5x\"></i></p>\r\n\t\t\t\t\t\t\t<h4 class=\"alert-heading\">¡Ocurrió un error inesperado!</h4>\r\n\t\t\t\t\t\t\t<p class=\"mb-0\">Lo sentimos, no podemos realizar la búsqueda ya que al parecer a ingresado una fecha incorrecta.</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t';\r\n\t\t\t\t\texit();\r\n\t\t\t\t}\r\n }\r\n\r\n $campos_tablas=\"devolucion.devolucion_id,devolucion.devolucion_codigo,devolucion.devolucion_fecha,devolucion.devolucion_hora,devolucion.devolucion_tipo,devolucion.devolucion_descripcion,devolucion.devolucion_cantidad,devolucion.devolucion_precio,devolucion.devolucion_total,devolucion.compra_venta_codigo,devolucion.usuario_id,devolucion.caja_id,usuario.usuario_id,usuario.usuario_nombre,usuario.usuario_apellido,caja.caja_id,caja.caja_numero,caja.caja_nombre\";\r\n\r\n\t\t\tif($tipo==\"return-search\" && $fecha_inicio!=\"\" && $fecha_final!=\"\"){\r\n\t\t\t\t$consulta=\"SELECT SQL_CALC_FOUND_ROWS $campos_tablas FROM devolucion INNER JOIN caja ON devolucion.caja_id=caja.caja_id INNER JOIN usuario ON devolucion.usuario_id=usuario.usuario_id WHERE (devolucion.devolucion_fecha BETWEEN '$fecha_inicio' AND '$fecha_final') ORDER BY devolucion.devolucion_id DESC LIMIT $inicio,$registros\";\r\n\t\t\t}else{\r\n\t\t\t\t$consulta=\"SELECT SQL_CALC_FOUND_ROWS $campos_tablas FROM devolucion INNER JOIN caja ON devolucion.caja_id=caja.caja_id INNER JOIN usuario ON devolucion.usuario_id=usuario.usuario_id ORDER BY devolucion.devolucion_id DESC LIMIT $inicio,$registros\";\r\n }\r\n \r\n $conexion = mainModel::conectar();\r\n\r\n\t\t\t$datos = $conexion->query($consulta);\r\n\r\n\t\t\t$datos = $datos->fetchAll();\r\n\r\n\t\t\t$total = $conexion->query(\"SELECT FOUND_ROWS()\");\r\n\t\t\t$total = (int) $total->fetchColumn();\r\n\r\n $Npaginas =ceil($total/$registros);\r\n \r\n ### Cuerpo de la tabla ###\r\n\t\t\t$tabla.='\r\n <div class=\"table-responsive\">\r\n <table class=\"table table-dark table-sm\" style=\"border: 1px solid #dbdbdb\">\r\n <thead>\r\n <tr class=\"text-center\" style=\"background:#00a2d9; color: white;\">\r\n <th>#</th>\r\n <th>FECHA</th>\r\n <th>TIPO</th>\r\n <th>PRODUCTO</th>\r\n <th>CANTIDAD</th>\r\n <th>PRECIO</th>\r\n <th>TOTAL</th>\r\n <th>VENDEDOR</th>\r\n <th>DETALLES</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n ';\r\n\r\n if($total>=1 && $pagina<=$Npaginas){\r\n\t\t\t\t$contador=$inicio+1;\r\n\t\t\t\t$pag_inicio=$inicio+1;\r\n\t\t\t\tforeach($datos as $rows){\r\n\t\t\t\t\t$tabla.='\r\n\t\t\t\t\t\t<tr class=\"text-center\" >\r\n <td>'.$contador.'</td>\r\n <td>'.date(\"d-m-Y\", strtotime($rows['devolucion_fecha'])).' '.$rows['devolucion_hora'].'</td>\r\n <td>'.$rows['devolucion_tipo'].'</td>\r\n <td>'.$rows['devolucion_descripcion'].'</td>\r\n <td>'.$rows['devolucion_cantidad'].'</td>\r\n <td>'.MONEDA_SIMBOLO.number_format($rows['devolucion_precio'],MONEDA_DECIMALES,MONEDA_SEPARADOR_DECIMAL,MONEDA_SEPARADOR_MILLAR).' '.MONEDA_NOMBRE.'</td>\r\n <td>'.MONEDA_SIMBOLO.number_format($rows['devolucion_total'],MONEDA_DECIMALES,MONEDA_SEPARADOR_DECIMAL,MONEDA_SEPARADOR_MILLAR).' '.MONEDA_NOMBRE.'</td>\r\n <td>'.$rows['usuario_nombre'].' '.$rows['usuario_apellido'].'</td>\r\n <td>';\r\n if($rows['devolucion_tipo']==\"Devolución de venta\" || $rows['devolucion_tipo']==\"Devolucion de venta\"){\r\n $tabla.='<a href=\"'.SERVERURL.'sale-detail/'.$rows['compra_venta_codigo'].'/\" class=\"btn btn-info\" data-toggle=\"popover\" data-trigger=\"hover\" title=\"Ver detalles de venta\" data-content=\"Venta código '.$rows['compra_venta_codigo'].'\" >\r\n\t\t\t\t\t\t\t\t\t<i class=\"fas fa-cart-plus fa-fw\"></i>\r\n\t\t\t\t\t\t\t\t</a>';\r\n }else{\r\n $tabla.='<a href=\"'.SERVERURL.'shop-detail/'.$rows['compra_venta_codigo'].'/\" class=\"btn btn-info\" data-toggle=\"popover\" data-trigger=\"hover\" title=\"Ver detalles de compra\" data-content=\"Compra código '.$rows['compra_venta_codigo'].'\" >\r\n\t\t\t\t\t\t\t\t\t<i class=\"fas fa-shopping-bag fa-fw\"></i>\r\n\t\t\t\t\t\t\t\t</a>';\r\n }\r\n\t\t\t\t\t\t\t\t\r\n $tabla.='</td>\r\n </tr>\r\n ';\r\n $contador++;\r\n\t\t\t\t}\r\n\t\t\t\t$pag_final=$contador-1;\r\n\t\t\t}else{\r\n\t\t\t\tif($total>=1){\r\n\t\t\t\t\t$tabla.='\r\n\t\t\t\t\t\t<tr class=\"text-center\" >\r\n\t\t\t\t\t\t\t<td colspan=\"9\">\r\n\t\t\t\t\t\t\t\t<a href=\"'.$url.'\" class=\"btn btn-raised btn-primary btn-sm\">\r\n\t\t\t\t\t\t\t\t\tHaga clic acá para recargar el listado\r\n\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t';\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$tabla.='\r\n\t\t\t\t\t\t<tr class=\"text-center\" >\r\n\t\t\t\t\t\t\t<td colspan=\"9\">\r\n\t\t\t\t\t\t\t\tNo hay registros en el sistema\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$tabla.='</tbody></table></div>';\r\n\r\n\t\t\tif($total>0 && $pagina<=$Npaginas){\r\n\t\t\t\t$tabla.='<p class=\"text-right\">Mostrando movimientos <strong>'.$pag_inicio.'</strong> al <strong>'.$pag_final.'</strong> de un <strong>total de '.$total.'</strong></p>';\r\n\t\t\t}\r\n\r\n\t\t\t### Paginacion ###\r\n\t\t\tif($total>=1 && $pagina<=$Npaginas){\r\n\t\t\t\t$tabla.=mainModel::paginador_tablas($pagina,$Npaginas,$url,7);\r\n\t\t\t}\r\n\r\n\t\t\treturn $tabla;\r\n }", "title": "" }, { "docid": "2ad336c79e72dd1098a6989be1429cae", "score": "0.6235852", "text": "public function actionTablaAmortizacionPdf($id) {\n $id_unidad_familiar = UnidadFamiliar::model()->findByAttributes(array('beneficiario_id' => $id))->id_unidad_familiar; // ID DE LA UNIDAD_FAMILIAR PARA TRAER EL BENEFICIARIO\n $analicredito = AnalisisCredito::model()->findByAttributes(array('unidad_familiar_id' => $id_unidad_familiar)); // BUSQUEDA DEL ID_UNIDAD_FAMILIAR EN ANALISIS DE CREDITO \n $beneficiario = Beneficiario::model()->findByPk($id); //ID DEL BENEFICIARIO\n// $n = new AnalisisCredito();\n $criteria = new CDbCriteria;\n $criteria->condition = 'unidad_familiar_id= :unidad_familiar';\n $criteria->params = array(\":unidad_familiar\" => (int) $id_unidad_familiar);\n $credito = AnalisisCredito::model()->findAll($criteria);\n\n\n $htmlprincipal = \"<table align='right' width='100%' border='0'> \";\n foreach ($credito AS $analisis) {\n// var_dump($analisis->tasaInteres->tasa_interes);die();\n\n /* monto de la cuota finaciera es la funcion que se calcula de acuerdo al interes, los años , y el monto de credito a pagar ; funcion PMT EN EXCEL\n * $tasainteres=> 4.66/100/12\n * $años=> cantidad de años\n * $monto credito=> monto a pagar solicitado\n */\n $meses = $analisis->nro_cuotas; //meses para pagar\n $años = $analisis->plazo_credito_ano; // cantidad en años para los meses \n $cuotamensual = $analisis->monto_cuota_f_total; //cuota total mensual a pagar\n $montocredito = $analisis->monto_credito; //monto total a pagar del credito\n $tasainteres = $analisis->tasaInteres->tasa_interes; // tasa de interes \n $montoCoutaFinanciera = CalculosController::actionMontoCoutaFinanciera($tasainteres, $años, $montocredito);\n $montoCoutaFinanciera = number_format($montoCoutaFinanciera, 2, '.', '');\n $totalInteres = 0;\n $totalCuotaFongar = 0;\n $totalMontoCuotaFinan = 0;\n $htmlprincipal = \"<table align='right' width='100%' border='0'> \n <tr>\n <td colspan='4' align='center'><b><font size='4'>DATOS DEL CRÉDITO</br></br></font></td>\n </tr>\t\t\n </table>\n \n <table width='100%' >\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Monto Solicitado: </b></td><td colspan='1'>\" . number_format($analisis->unidadFamiliar->beneficiario->beneficiarioTemporal->vivienda->precio_vivienda, 2, ',', '.') . \"</td> \n </tr>\";\n if ($analisis->sub_directo_habitacional!='0.00'){\n $htmlprincipal .= \"\n <tr>\n <td colspan='1'><b>Subsidio Directo Habitacional:</b></td><td colspan='1'>\" . $analisis->sub_directo_habitacional . \"</td>\n </tr>\";\n }\n if ($analisis->sub_vivienda_perdida!='0.00'){\n $htmlprincipal .= \"\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Reconocimiento Vivienda Perdida:</b></td><td colspan='1'>\" . number_format($analisis->sub_vivienda_perdida, 2, ',', '.') . \"</td>\n </tr>\";\n }\n if (($analisis->sub_directo_habitacional!='0.00')&&($analisis->sub_vivienda_perdida!='0.00')){\n $htmlprincipal .= \"\n <tr>\n <td colspan=''><b>Subsidio Total (Bs.):</b></td><td colspan='1'>\" . number_format($analisis->sub_directo_habitacional + $analisis->sub_vivienda_perdida, 2, ',', '.') . \"</td>\n </tr>\"; \n }\n \n if ($analisis->monto_inicial!='0.00'){\n $htmlprincipal .= \"\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Cuota Inicial Pagada (Bs.):</b></td><td colspan='1'>\" . number_format($analisis->monto_inicial, 2, ',', '.') . \"</td>\n </tr>\";\n }\n $htmlprincipal .= \" \n <tr>\n <td colspan='1'><b>Monto Credito A Otorgar: </b></td><td colspan='1'>\" . number_format($analisis->monto_credito, 2, ',', '.') . \"</td> \n </tr>\n \n <tr style='background:#E5E2E2'>\n <td colspan='1'><b> Tasa Interes:</b></td><td colspan='1'>\" . $analicredito->tasaInteres->tasa_interes . \" %</td>\n </tr>\n \n <tr>\n <td colspan='1'><b>Plazo del Credito:</b></td><td colspan='1'>\" . number_format($analisis->nro_cuotas/12 ).\" - AÑOS</td>\n </tr>\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Pago Total Mensual:</b></td><td colspan='1'>\" . number_format($analisis->monto_cuota_f_total, 2, ',', '.') . \"</td>\n </tr>\n \n </table> <br/>\";\n\n $htmlprincipal.=\" <table align='right' width='100%' border='0'> \n <tr >\n <td colspan='4' align='center'><b><font size='4'>DATOS PARA LA CANCELACIÓN</br></br></font><font size='6'> </font></td>\n </tr>\n </table>\n <table width='100%'>\n <tr style='background:#E5E2E2'>\n <td colspan='2'><b>Institución Bancaria:</b></td><td colspan='2'> BANCO DE VENEZUELA </td>\n </tr>\n <tr >\n <td colspan='2'><b>Cuenta Corriente:</b></td><td colspan='2'> 0102-0552-23-0000027685 </td>\n </tr>\n <tr style='background:#E5E2E2'>\n <td colspan='2'><b>A nombre de:</b></td><td colspan='2'> <b>BANAVIH COBRANZAS</b></td>\n </tr>\n <tr >\n <td colspan='2'><b>Serial de Cliente:</b></td><td colspan='2'>\" . date('Y') . \" \" . $analicredito->unidadFamiliar->beneficiario->beneficiarioTemporal->cedula . \" </td>\n </tr> \n <tr style='background:#E5E2E2'>\n <td colspan='2'><b>Fecha Primer Pago:</b></td><td colspan='2'>\" . date(\"d/m/Y\", strtotime($analisis->fecha_protocolizacion)) . \"</td>\n </tr>\n </table>\n <br/>\";\n\n// $htmlprincipal.=\"<table align='right' width='100%' border='0'> \n// <tr>\n// <td colspan='4' align='center'><b><font size='4'>PRIMA INICIAL FONDO DE GARANTIA</br></br></font><font size='6'> </font></td>\n// </tr>\t\t\n// <tr style='background:#E5E2E2'>\n// <td colspan='2'><b>Prima Inicial Fondo de Garantia (Bs.):</b></td><td colspan='2'>\" . number_format($analisis->monto_prima_inicial_fg, 2, ',', '.') . \"</td>\n// <tr>\n// <td colspan='2'><b>Porcentaje de la Prima Inicial (Bs.):</b></td><td colspan='2'> 1,43% </td>\n// </tr>\t\t\n// </tr>\n// </table>\";\n\n\n\n\n// $tablaAmortiz = '<table border=1 cellspacing=1 cellpadding=0 bordercolor=\"E5E2E2\">';\n// $tablaAmortiz.= ' <tr><th colspan=\"4\" style=\"background:#E5E2E2; tex-algn:center;\"><b>CUOTA FINANCIERA</th><th colspan=\"1\" style=\"background:#E5E2E2\">PRIMA <br/>RENOVAC. <br/>FONGAR</th>\n// <th colspan=\"2\" style=\"background:#E5E2E2\">CUOTA <br/>TOTAL<br/>MENSUAL</th>\n// </tr>';\n// $tablaAmortiz.= '<tr style=\"background:#E5E2E2\"> <th colspan=\"1\">N-MESES</th><th colspan=\"1\">SALDO<br/>DEUDOR (Bs.)</th><th colspan=\"1\">AMORTIZACION <br>DE CAPITAL</th><th colspan=\"1\">INTERESES<br/>(Bs.)</th>\n// <th colspan=\"1\">PRIMA DEL <br/>FONDO DE<br/> GARANTIA (Bs.)</th><th colspan=\"1\">PAGO TOTAL <br/> MENSUAL (Bs.)</th><th colspan=\"1\">FECHA DE <br/> VENCIMIENTO</th><th colspan=\"1\"></th>\n// </tr>';\n $tasaFongar = 0.0143; //tasa fongar al 1.43%\n $fechaprotocolizacion = $analisis->fecha_protocolizacion; //fecha en que se hizo genero el calculo\n $mes = 1; //variable definida en 1 para la sumar por meses \n\n for ($i = 1; $i <= $meses; $i++) { // inicio for para incrementar los meses \n $primaFondoGa = number_format($montocredito * ($tasaFongar / 12), 2, '.', '');\n $intereses = number_format($montocredito * (($tasainteres / 100) / 12), 2, '.', '');\n $amortizacion = number_format(($montoCoutaFinanciera - $intereses), 2, '.', '');\n $cuotamen = number_format(($intereses + $primaFondoGa + $amortizacion), 2, '.', '');\n $nuevafecha = strtotime('+' . $mes . ' month', strtotime($fechaprotocolizacion)); //$nuevafecha fecha de Protocolizacion 01/01/0001 00:00:00 convertida en fecha, sumando el mes siguiente\n $mes++;\n $nuevafecha = date('d/m/Y', $nuevafecha); //formato de la fecha nueva\n\n $saldoAnt = $montocredito - $amortizacion; // saldo nuevo una vez restada en el $montocredito - $amortizacion\n\n if ($i == $meses) { //inicio if\n $saldo = number_format(0.00, 2, '.', ''); //saldo deudor\n } else {\n\n $saldo = number_format($saldoAnt, 2, '.', ''); //saldo deudor\n } //fin if \n\n $totalInteres = $totalInteres + $intereses;\n $totalCuotaFongar = $totalCuotaFongar + $primaFondoGa;\n $totalMontoCuotaFinan = $totalMontoCuotaFinan + $montoCoutaFinanciera;\n $totalCancelar = $totalCuotaFongar + $totalMontoCuotaFinan;\n// $tablaAmortiz.='<tr><td>' . $i . '</td><td style=\"text-align:center;\">' . number_format($saldo, 2, ',', '.') . '</td><td style=\"text-align:center;\">' . number_format($amortizacion, 2, ',', '.') . '</td><td style=\"text-align:center;\">' . number_format($intereses, 2, ',', '.') . '</td>'\n// . '<td style=\"text-align:center;\">' . number_format($primaFondoGa, 2, ',', '.') . '</td><td style=\"text-align:center;\">' . number_format($cuotamen, 2, ',', '.') . '</td><td style=\"text-align:center;\">' . $nuevafecha . '</td></tr>';\n $montocredito = $saldoAnt; // saldo deudor\n }//fin del for\n// $tablaAmortiz.='</table>';\n// $htmlprincipal.=\"<table align='right' width='100%' border='0'> \n// <tr>\n// <td colspan='2' align='center'><b><font size='5'>RESUMEN DEL PRESTAMO AL FINAL DE \" . $analisis->nro_cuotas . \" MESES</br></br></font><font size='6'> </font>\n// </td>\n// <br/>\n// </tr>\t\t\n// <tr style='background:#E5E2E2'>\n// <td colspan='1'><b>Total Capital (Bs.):</b></td><td colspan='1'>\" . number_format($analisis->monto_credito, 2, ',', '.') . \"</td>\n// </tr>\n// <tr>\n// <td colspan='1'><b>Total Interes (Bs.):</b></td><td colspan='1'>\" . number_format($totalInteres, 2, ',', '.') . \"</td>\n// </tr>\n// <tr style='background:#E5E2E2'>\n// <td colspan='1'><b>Total Cuota Financiera (Bs.):</b></td><td colspan='1'>\" . number_format($totalMontoCuotaFinan, 2, ',', '.') . \"</td>\n// </tr>\n// <tr>\n// <td colspan='1'><b>Total Cuota FONDO DE GARANTÍA (Bs.):</b></td><td colspan='1'>\" . number_format($totalCuotaFongar, 2, ',', '.') . \"</td>\n// </tr>\n// <tr style='background:#E5E2E2'>\n// <td colspan='1'><b>TOTAL A CANCELAR (Bs.):</b></td><td colspan='1'>\" . number_format($totalCancelar, 2, ',', '.') . \"</td>\n// </tr>\n// </table> <br/><br/><br/><br/><br/><br/><br/><br/>\";\n }\n\n $updateBene = Beneficiario::model()->updateByPk($beneficiario->id_beneficiario, array(\n 'estatus_beneficiario_id' => 271,\n 'usuario_id_actualizacion' => Yii::app()->user->id,\n 'fecha_actualizacion' => 'now()'\n ));\n $updateBeneTemp = BeneficiarioTemporal::model()->updateByPk($beneficiario->beneficiario_temporal_id, array(\n 'estatus' => 272,\n 'usuario_id_actualizacion' => Yii::app()->user->id,\n 'fecha_actualizacion' => 'now()'\n ));\n\n $this->render('tablaAmortizacionpdf', array(\n 'model' => $credito, 'totalInteres' => $totalInteres, 'totalCuotaFongar' => $totalCuotaFongar, 'analicredito' => $analicredito,\n 'totalMontoCuotaFinan' => $totalMontoCuotaFinan, 'totalCancelar' => $totalCancelar, 'htmlprincipal' => $htmlprincipal\n ));\n }", "title": "" }, { "docid": "6ae1f9dc749582117bf08b699e45e394", "score": "0.6232056", "text": "public function getReporteRequisito($funcion){\n $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n $pdf->setFunction($funcion);\n $pdf->Header();\n // set document information\n $pdf->SetCreator(PDF_CREATOR);\n $pdf->SetAuthor('Nicola Asuni');\n $pdf->SetTitle('Reporte de Clasificadores');\n $pdf->SetSubject('TCPDF Tutorial');\n $pdf->SetKeywords('TCPDF, PDF, example, test, guide');\n \n // set default header data\n $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, 'Reporte de Clasificadores', PDF_HEADER_STRING);\n \n // set header and footer fonts\n $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n \n // set default monospaced font\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n \n // set margins\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n \n // set auto page breaks\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n \n // set image scale factor\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n \n // set some language-dependent strings (optional)\n if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\n require_once(dirname(__FILE__).'/lang/eng.php');\n $pdf->setLanguageArray($l);\n }\n \n // ---------------------------------------------------------\n \n // set font\n $pdf->SetFont('helvetica', '', 12);\n \n // add a page\n $pdf->AddPage();\n \n // column titles\n $header = array('FIN'=>'Finalidad', 'BLG'=>'Base Legal', 'CAL'=>'Calificación', 'REQ'=>'Requisitos', 'IMP'=>'Importe','ALC'=>'Alcance','INS'=>'Instrucciones','ACT'=>'Actividades','PLA'=>'Plazo de Atención');\n $header2 = array('Logo','Denominación del Procedimiento','Código');\n // data loading\n $data = $this->CargarDatos($funcion);\n $data2 = $this->CargarDatos2($funcion);\n $pdf->EncabezadoRequisito($header2, $data2);\n // print colored table\n $pdf->CrearTabla($header, $data);\n ob_end_clean();\n // ---------------------------------------------------------\n \n // close and output PDF document\n $pdf->Output('example_011.pdf', 'I');\n \n //============================================================+\n // END OF FILE\n //============================================================+ \n }", "title": "" }, { "docid": "cfd606977d1ad5196b38b908f6cbf04a", "score": "0.6210523", "text": "public function actionTablaAmortizacionCompletaPdf($id) {\n $id_unidad_familiar = UnidadFamiliar::model()->findByAttributes(array('beneficiario_id' => $id))->id_unidad_familiar; // ID DE LA UNIDAD_FAMILIAR PARA TRAER EL BENEFICIARIO\n $analicredito = AnalisisCredito::model()->findByAttributes(array('unidad_familiar_id' => $id_unidad_familiar)); // BUSQUEDA DEL ID_UNIDAD_FAMILIAR EN ANALISIS DE CREDITO \n $beneficiario = Beneficiario::model()->findByPk($id); //ID DEL BENEFICIARIO\n// $n = new AnalisisCredito();\n $criteria = new CDbCriteria;\n $criteria->condition = 'unidad_familiar_id= :unidad_familiar';\n $criteria->params = array(\":unidad_familiar\" => (int) $id_unidad_familiar);\n $credito = AnalisisCredito::model()->findAll($criteria);\n\n\n $htmlprincipal = \"<table align='right' width='100%' border='0'> \";\n foreach ($credito AS $analisis) {\n// var_dump($analisis->tasaInteres->tasa_interes);die();\n\n /* monto de la cuota finaciera es la funcion que se calcula de acuerdo al interes, los años , y el monto de credito a pagar ; funcion PMT EN EXCEL\n * $tasainteres=> 4.66/100/12\n * $años=> cantidad de años\n * $monto credito=> monto a pagar solicitado\n */\n $meses = $analisis->nro_cuotas; //meses para pagar\n $años = $analisis->plazo_credito_ano; // cantidad en años para los meses \n $cuotamensual = $analisis->monto_cuota_f_total; //cuota total mensual a pagar\n $montocredito = $analisis->monto_credito; //monto total a pagar del credito\n $tasainteres = $analisis->tasaInteres->tasa_interes; // tasa de interes \n $montoCoutaFinanciera = CalculosController::actionMontoCoutaFinanciera($tasainteres, $años, $montocredito);\n $montoCoutaFinanciera = number_format($montoCoutaFinanciera, 2, '.', '');\n $totalInteres = 0;\n $totalCuotaFongar = 0;\n $totalMontoCuotaFinan = 0;\n $htmlprincipal = \"<table align='right' width='100%' border='0'> \n <tr>\n <td colspan='4' align='center'><b><font size='5'>DATOS DEL CRÉDITO</br></br></font></td>\n </tr>\t\t\n </table>\n \n <table width='100%' >\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Monto Solicitado: </b></td><td colspan='1'>\" . number_format($analisis->unidadFamiliar->beneficiario->beneficiarioTemporal->vivienda->precio_vivienda, 2, ',', '.') . \"</td> \n </tr>\";\n if ($analisis->sub_directo_habitacional!='0.00'){\n $htmlprincipal .= \"\n <tr>\n <td colspan='1'><b>Subsidio Directo Habitacional:</b></td><td colspan='1'>\" . $analisis->sub_directo_habitacional . \"</td>\n </tr>\";\n }\n if ($analisis->sub_vivienda_perdida!='0.00'){\n $htmlprincipal .= \"\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Reconosimiento Vivienda Perdida:</b></td><td colspan='1'>\" . number_format($analisis->sub_vivienda_perdida, 2, ',', '.') . \"</td>\n </tr>\";\n }\n if (($analisis->sub_directo_habitacional!='0.00')&&($analisis->sub_vivienda_perdida!='0.00')){\n $htmlprincipal .= \"\n <tr>\n <td colspan=''><b>Subsidio Total (Bs.):</b></td><td colspan='1'>\" . number_format($analisis->sub_directo_habitacional + $analisis->sub_vivienda_perdida, 2, ',', '.') . \"</td>\n </tr>\"; \n }\n \n if ($analisis->monto_inicial!='0.00'){\n $htmlprincipal .= \"\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Cuota Inicial Pagada (Bs.):</b></td><td colspan='1'>\" . number_format($analisis->monto_inicial, 2, ',', '.') . \"</td>\n </tr>\";\n }\n $htmlprincipal .= \" \n <tr>\n <td colspan='1'><b>Monto Credito A Otorgar: </b></td><td colspan='1'>\" . number_format($analisis->monto_credito, 2, ',', '.') . \"</td> \n </tr>\n \n <tr style='background:#E5E2E2'>\n <td colspan='1'><b> Tasa Interes:</b></td><td colspan='1'>\" . $analicredito->tasaInteres->tasa_interes . \" %</td>\n </tr>\n \n <tr>\n <td colspan='1'><b>Plazo del Credito:</b></td><td colspan='1'>\" . $analisis->nro_cuotas . \" - MESES</td>\n </tr>\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Pago Total Mensual:</b></td><td colspan='1'>\" . $analisis->monto_cuota_f_total . \"</td>\n </tr>\n \n </table> <br/>\";\n\n $htmlprincipal.=\" <table align='right' width='100%' border='0'> \n <tr >\n <td colspan='4' align='center'><b><font size='5'>DATOS PARA LA CANCELACIÓN</br></br></font><font size='6'> </font></td>\n </tr>\n </table>\n <table width='100%'>\n <tr style='background:#E5E2E2'>\n <td colspan='2'><b>Institución Bancaria:</b></td><td colspan='2'> BANCO DE VENEZUELA </td>\n </tr>\n <tr >\n <td colspan='2'><b>Cuenta Corriente:</b></td><td colspan='2'> 0102-0552-23-0000027685 </td>\n </tr>\n <tr style='background:#E5E2E2'>\n <td colspan='2'><b>A nombre de:</b></td><td colspan='2'> <b>BANAVIH COBRANZAS</b></td>\n </tr>\n <tr >\n <td colspan='2'><b>Serial de Cliente:</b></td><td colspan='2'>\" . date('Y') . \" \" . $analicredito->unidadFamiliar->beneficiario->beneficiarioTemporal->cedula . \" </td>\n </tr> \n <tr style='background:#E5E2E2'>\n <td colspan='2'><b>Fecha Primer Pago:</b></td><td colspan='2'>\" . date(\"d/m/Y\", strtotime($analisis->fecha_protocolizacion)) . \"</td>\n </tr>\n </table>\n <br/>\";\n\n $htmlprincipal.=\"<table align='right' width='100%' border='0'> \n <tr>\n <td colspan='4' align='center'><b><font size='5'>PRIMA INICIAL FONDO DE GARANTIA</br></br></font><font size='6'> </font></td>\n </tr>\t\t\n <tr style='background:#E5E2E2'>\n <td colspan='2'><b>Prima Inicial Fondo de Garantia (Bs.):</b></td><td colspan='2'>\" . number_format($analisis->monto_prima_inicial_fg, 2, ',', '.') . \"</td>\n <tr>\n <td colspan='2'><b>Porcentaje de la Prima Inicial (Bs.):</b></td><td colspan='2'> 1,43% </td>\n </tr>\t\t\n </tr>\n </table> <br/>\";\n\n\n\n\n $tablaAmortiz = '<table border=1 cellspacing=1 cellpadding=0 bordercolor=\"E5E2E2\">';\n $tablaAmortiz.= ' <tr><th colspan=\"4\" style=\"background:#E5E2E2; tex-algn:center;\"><b>CUOTA FINANCIERA</th><th colspan=\"1\" style=\"background:#E5E2E2\">PRIMA <br/>RENOVAC. <br/>FONGAR</th>\n <th colspan=\"2\" style=\"background:#E5E2E2\">CUOTA <br/>TOTAL<br/>MENSUAL</th>\n </tr>';\n $tablaAmortiz.= '<tr style=\"background:#E5E2E2\"> <th colspan=\"1\">N-MESES</th><th colspan=\"1\">SALDO<br/>DEUDOR (Bs.)</th><th colspan=\"1\">AMORTIZACION <br>DE CAPITAL</th><th colspan=\"1\">INTERESES<br/>(Bs.)</th>\n <th colspan=\"1\">PRIMA DEL <br/>FONDO DE<br/> GARANTIA (Bs.)</th><th colspan=\"1\">PAGO TOTAL <br/> MENSUAL (Bs.)</th><th colspan=\"1\">FECHA DE <br/> VENCIMIENTO</th><th colspan=\"1\"></th>\n </tr>';\n $tasaFongar = 0.0143; //tasa fongar al 1.43%\n $fechaprotocolizacion = $analisis->fecha_protocolizacion; //fecha en que se hizo genero el calculo\n $mes = 1; //variable definida en 1 para la sumar por meses \n\n for ($i = 1; $i <= $meses; $i++) { // inicio for para incrementar los meses \n $primaFondoGa = number_format($montocredito * ($tasaFongar / 12), 2, '.', '');\n $intereses = number_format($montocredito * (($tasainteres / 100) / 12), 2, '.', '');\n $amortizacion = number_format(($montoCoutaFinanciera - $intereses), 2, '.', '');\n $cuotamen = number_format(($intereses + $primaFondoGa + $amortizacion), 2, '.', '');\n $nuevafecha = strtotime('+' . $mes . ' month', strtotime($fechaprotocolizacion)); //$nuevafecha fecha de Protocolizacion 01/01/0001 00:00:00 convertida en fecha, sumando el mes siguiente\n $mes++;\n $nuevafecha = date('d/m/Y', $nuevafecha); //formato de la fecha nueva\n\n $saldoAnt = $montocredito - $amortizacion; // saldo nuevo una vez restada en el $montocredito - $amortizacion\n\n if ($i == $meses) { //inicio if\n $saldo = number_format(0.00, 2, '.', ''); //saldo deudor\n } else {\n\n $saldo = number_format($saldoAnt, 2, '.', ''); //saldo deudor\n } //fin if \n\n $totalInteres = $totalInteres + $intereses;\n $totalCuotaFongar = $totalCuotaFongar + $primaFondoGa;\n $totalMontoCuotaFinan = $totalMontoCuotaFinan + $montoCoutaFinanciera;\n $totalCancelar = $totalCuotaFongar + $totalMontoCuotaFinan;\n $tablaAmortiz.='<tr><td>' . $i . '</td><td style=\"text-align:center;\">' . number_format($saldo, 2, ',', '.') . '</td><td style=\"text-align:center;\">' . number_format($amortizacion, 2, ',', '.') . '</td><td style=\"text-align:center;\">' . number_format($intereses, 2, ',', '.') . '</td>'\n . '<td style=\"text-align:center;\">' . number_format($primaFondoGa, 2, ',', '.') . '</td><td style=\"text-align:center;\">' . number_format($cuotamen, 2, ',', '.') . '</td><td style=\"text-align:center;\">' . $nuevafecha . '</td></tr>';\n $montocredito = $saldoAnt; // saldo deudor\n }//fin del for\n $tablaAmortiz.='</table>';\n $htmlprincipal.=\"<table align='right' width='100%' border='0'> \n <tr>\n <td colspan='2' align='center'><b><font size='5'>RESUMEN DEL PRESTAMO AL FINAL DE \" . $analisis->nro_cuotas . \" MESES</br></br></font><font size='6'> </font>\n </td>\n <br/>\n </tr>\t\t\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Total Capital (Bs.):</b></td><td colspan='1'>\" . number_format($analisis->monto_credito, 2, ',', '.') . \"</td>\n </tr>\n <tr>\n <td colspan='1'><b>Total Interes (Bs.):</b></td><td colspan='1'>\" . number_format($totalInteres, 2, ',', '.') . \"</td>\n </tr>\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>Total Cuota Financiera (Bs.):</b></td><td colspan='1'>\" . number_format($totalMontoCuotaFinan, 2, ',', '.') . \"</td>\n </tr>\n <tr>\n <td colspan='1'><b>Total Cuota FONDO DE GARANTÍA (Bs.):</b></td><td colspan='1'>\" . number_format($totalCuotaFongar, 2, ',', '.') . \"</td>\n </tr>\n <tr style='background:#E5E2E2'>\n <td colspan='1'><b>TOTAL A CANCELAR (Bs.):</b></td><td colspan='1'>\" . number_format($totalCancelar, 2, ',', '.') . \"</td>\n </tr>\n </table> <br/><br/><br/><br/><br/><br/><br/><br/>\";\n }\n\n $updateBene = Beneficiario::model()->updateByPk($beneficiario->id_beneficiario, array(\n 'estatus_beneficiario_id' => 271,\n 'usuario_id_actualizacion' => Yii::app()->user->id,\n 'fecha_actualizacion' => 'now()'\n ));\n $updateBeneTemp = BeneficiarioTemporal::model()->updateByPk($beneficiario->beneficiario_temporal_id, array(\n 'estatus' => 272,\n 'usuario_id_actualizacion' => Yii::app()->user->id,\n 'fecha_actualizacion' => 'now()'\n ));\n\n $this->render('tablaAmortizacionCompletapdf', array(\n 'model' => $credito, 'totalInteres' => $totalInteres, 'totalCuotaFongar' => $totalCuotaFongar, 'analicredito' => $analicredito,\n 'totalMontoCuotaFinan' => $totalMontoCuotaFinan, 'totalCancelar' => $totalCancelar, 'tablaAmortiz' => $tablaAmortiz, 'htmlprincipal' => $htmlprincipal\n ));\n }", "title": "" }, { "docid": "05858202a93046dcd2b2ab77906beb0a", "score": "0.6205276", "text": "private function viewReport() {\n }", "title": "" }, { "docid": "fc47e7ce41185c8c6a16b46260015d4f", "score": "0.6198492", "text": "function reporteElaboracionPlanillaC31(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='plani.ft_planilla_sel';\n $this->transaccion='PLA_REP_PLANIC31_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n $this->captura('categoria_prog', 'varchar');\n $this->captura('codigo_programa', 'varchar');\n $this->captura('desc_programa', 'varchar');\n $this->captura('lugar', 'varchar');\n $this->captura('presupuesto', 'varchar');\n $this->captura('gestion', 'varchar');\n $this->captura('entidad', 'varchar');\n $this->captura('dir_admin', 'varchar');\n $this->captura('actividad', 'varchar');\n $this->captura('tipo_proceso', 'varchar');\n $this->captura('periodo', 'varchar');\n $this->captura('fecha_ini', 'date');\n $this->captura('fecha_fin', 'date');\n $this->captura('fuente', 'varchar');\n $this->captura('organismo', 'varchar');\n $this->captura('ue', 'varchar');\n $this->captura('funcionario', 'varchar');\n $this->captura('ci', 'varchar');\n $this->captura('item', 'varchar');\n $this->captura('fecha_planilla', 'date');\n $this->captura('dias', 'integer');\n $this->captura('haber', 'numeric');\n $this->captura('bono', 'numeric');\n $this->captura('otros_ing', 'numeric');\n $this->captura('total_ing', 'numeric');\n $this->captura('rc_iva', 'numeric');\n $this->captura('afp_lab', 'numeric');\n $this->captura('descuento', 'numeric');\n $this->captura('total_descuento', 'numeric');\n $this->captura('liquido', 'numeric');\n $this->captura('subsidio', 'numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "f7c58d1b21ee7b6209f5982df0ebe064", "score": "0.6197555", "text": "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Modulo organismi\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "264a5ad8f3e95c6fded706db74a2140f", "score": "0.6196628", "text": "function ordenpago($pdf, $numero, $fecha, $tipo_documento, $pag, $idtipo_documento) {\n\t//\tNUEVA PAGINA CABECERA\n\t$pdf->AddPage();\n\t//\t--------------------\n\tsetLogo($pdf);\n\t//\t--------------------\n\t$pdf->SetFont('Arial', 'B', 9);\n\t$pdf->Cell(15, 4); $pdf->Cell(100, 5, '', 0, 0, 'L');\n\t$pdf->SetFont('Arial', '', 11);\n\t$pdf->Cell(50, 4, utf8_decode('Número: '), 0, 0, 'R');\n\t$pdf->SetFont('Arial', 'B', 11);\n\t$pdf->Cell(35, 4, $numero, 0, 1, 'L');\t\n\t$pdf->SetFont('Arial', 'B', 11);\n\t$pdf->Cell(15, 4); $pdf->Cell(100, 5, '', 0, 0, 'L'); \n\t$pdf->SetFont('Arial', '', 11);\n\t$pdf->Cell(50, 4, 'Fecha: ', 0, 0, 'R'); \n\t$pdf->SetFont('Arial', 'B', 11);\n\tlist($a, $m, $d)=SPLIT( '[/.-]', $fecha); $fecha=$d.\"/\".$m.\"/\".$a;\n\t$pdf->Cell(35, 4, $fecha, 0, 1, 'L');\t \n\t$pdf->SetFont('Arial', '', 11);\n\t$pdf->Cell(165, 4, utf8_decode('Página: '), 0, 0, 'R'); \n\t$pdf->SetFont('Arial', 'B', 11);\n\t$pdf->Cell(35, 4, $pag, 0, 1, 'L'); \n\t/////////////////////////////\n\t$pdf->Ln(10);\n\t$pdf->SetFont('Arial', 'B', 16);\n\t$pdf->Cell(200, 5, 'Orden de Pago', 0, 1, 'C');\n\t$pdf->Cell(200, 7, '', 0, 1, 'C');\n\t/////////////////////////////\n\tgetFootOrdenPago($pdf, $modulo, $tipo_documento, $idtipo_documento);\n}", "title": "" }, { "docid": "3e24f033580a0985c1b2e4de16504db8", "score": "0.6185037", "text": "public static function plan_de_pagos($parametros) {\n\n $params = (object) $parametros;\n $rango = $params->rango;\n $frecuencia = $params->frecuencia;\n $dias_mes = 30;\n if (!$rango)\n $rango = 1;\n\n $dias = $rango * $dias_mes;\n $fecha_inicio = $params->fecha_inicio;\n $fecha_pri_cuota = $params->fecha_pri_cuota;\n\n if ($fecha_inicio > $fecha_pri_cuota) {\n $fecha_inicio = $params->fecha_pri_cuota;\n }\n\n $nro_cuota = $params->nro_cuota_inicio;\n\n $_dia = '01';\n if ($frecuencia == 'dia_mes') {\n $afpc = explode('-', $fecha_pri_cuota);\n $_dia = $afpc[2];\n }\n\n\n if ($params->tipo == 'plazo') {\n $plazo = $params->plazo;\n $interes_anual = $params->interes_anual;\n $saldo = $params->saldo;\n// $interes_efectivo = (($rango * $interes_anual ) / 12) / 100;\n\n $interes_dia = ($interes_anual / 360) / 100;\n\n $cuota = round(FUNCIONES::get_cuota($saldo, $interes_anual, $plazo, $rango), 2);\n\n $lista_cuotas = array();\n $sw = 1;\n for ($i = 1; $i <= $plazo; $i++) {\n $fila = new stdClass();\n if ($i == 1) {\n $fecha_ant = $fecha_inicio;\n $fecha = $fecha_pri_cuota;\n $dias_interes = FUNCIONES::diferencia_dias($fecha_ant, $fecha);\n } else {\n if ($frecuencia == '30_dias') {\n $fecha = FUNCIONES::sumar_dias(\"+$dias\", $fecha);\n $dias_interes = $dias;\n } elseif ($frecuencia == 'dia_mes') {\n $fecha_ant = $fecha;\n $fecha = FUNCIONES::sumar_meses($fecha, $rango, $_dia);\n $dias_interes = FUNCIONES::diferencia_dias($fecha_ant, $fecha);\n }\n }\n $fila->nro_cuota = $nro_cuota;\n $fila->fecha = $fecha;\n $fila->dias = $dias_interes;\n if ($sw == 1) {\n $interes_efectivo = $dias * $interes_dia;\n } else {\n $interes_efectivo = $dias_interes * $interes_dia;\n }\n\n\n $_interes = $saldo * $interes_efectivo;\n\n $interes = round($_interes, 2);\n\n if ($i == $plazo) {\n $capital = round($saldo, 2);\n $_capital = $saldo;\n } else {\n $capital = $cuota - $interes;\n $_capital = $cuota - $_interes;\n }\n\n if ($sw == 1) {\n if ($fecha_inicio <= $fecha) {\n $interes_efectivo = $dias_interes * $interes_dia;\n $_interes = $saldo * $interes_efectivo;\n $interes = round($_interes, 2);\n $fila->dias = $dias_interes;\n $sw++;\n } else {\n $interes = 0;\n $fila->dias = 0;\n }\n }\n\n if ($fecha_inicio >= $fecha) {\n $interes = 0;\n }\n\n $fila->interes = $interes;\n $fila->capital = $capital;\n $fila->monto = $interes + $capital;\n\n $saldo = $saldo - $capital;\n\n $fila->saldo = round($saldo, 2);\n $lista_cuotas[] = $fila;\n $nro_cuota++;\n }\n return $lista_cuotas;\n } elseif ($params->tipo == 'cuota') {\n\n\n $interes_anual = $params->interes_anual;\n $saldo = $params->saldo;\n $interes_dia = ($interes_anual / 360) / 100;\n $cuota = round($params->cuota, 2);\n $plazo = 500;\n ;\n if ($params->plazo) {\n $plazo = $params->plazo;\n }\n $lista_cuotas = array();\n $i = 1;\n $sw = 1;\n// echo \"$saldo --- & $nro_cuota <= $plazo\";\n while (round($saldo, 2) > 0 && $i <= $plazo) {\n// echo \"$i <= $plazo<br>\";\n $fila = new stdClass();\n if ($i == 1) {\n $fecha_ant = $fecha_inicio;\n $fecha = $fecha_pri_cuota;\n $dias_interes = FUNCIONES::diferencia_dias($fecha_ant, $fecha);\n } else {\n if ($frecuencia == '30_dias') {\n $fecha = FUNCIONES::sumar_dias(\"+$dias\", $fecha);\n $dias_interes = $dias;\n } elseif ($frecuencia == 'dia_mes') {\n $fecha_ant = $fecha;\n $fecha = FUNCIONES::sumar_meses($fecha, $rango, $_dia);\n $dias_interes = FUNCIONES::diferencia_dias($fecha_ant, $fecha);\n }\n }\n $fila->nro_cuota = $nro_cuota;\n $fila->fecha = $fecha;\n// $interes_efectivo = $dias * $interes_dia;\n if ($sw == 1) {\n $interes_efectivo = $dias * $interes_dia;\n } else {\n $interes_efectivo = $dias_interes * $interes_dia;\n }\n $fila->dias = $dias_interes;\n\n $_interes = $saldo * $interes_efectivo;\n\n $interes = round($_interes, 2);\n\n if ($saldo < $cuota || $i == $plazo) {\n $capital = round($saldo, 2);\n $_capital = $saldo;\n } else {\n $capital = $cuota - $interes;\n $_capital = $cuota - $_interes;\n }\n\n if ($sw == 1) {\n if ($fecha_inicio <= $fecha) {\n $interes_efectivo = $dias_interes * $interes_dia;\n $_interes = $saldo * $interes_efectivo;\n $interes = round($_interes, 2);\n $fila->dias = $dias_interes;\n $sw++;\n } else {\n $interes = 0;\n $fila->dias = 0;\n }\n }\n\n $fila->interes = $interes;\n $fila->capital = $capital;\n $fila->monto = $capital + $interes;\n $saldo = $saldo - $capital;\n $fila->saldo = round($saldo, 2);\n $lista_cuotas[] = $fila;\n\n $nro_cuota++;\n $i++;\n }\n return $lista_cuotas;\n } elseif ($params->tipo == 'plazo_cuota') {\n $interes_anual = $params->interes_anual;\n $saldo = $params->saldo;\n\n $fecha_inicio = $params->fecha_inicio;\n $fecha_pri_cuota = $params->fecha_pri_cuota;\n $nro_cuota = $params->nro_cuota_inicio;\n\n $interes_dia = ($interes_anual / 360) / 100;\n\n $cuota = round($params->cuota, 2);\n $plazo = $params->plazo;\n $lista_cuotas = array();\n $_afecha = explode('-', $fecha_pri_cuota);\n $dia = $_afecha[2];\n $i = 1;\n $sw = 1;\n while ($i <= $plazo && $i <= 500) {\n $fila = new stdClass();\n if ($i == 1) {\n $fecha = $fecha_pri_cuota;\n// $dias_interes = FUNCIONES::diferencia_dias($fecha_inicio, $fecha_pri_cuota);\n } else {\n $fecha = FUNCIONES::sumar_dias(\"+$dias\", $fecha);\n }\n $fila->nro_cuota = $nro_cuota;\n $fila->fecha = $fecha;\n\n $interes_efectivo = $dias * $interes_dia;\n\n $fila->dias = $dias;\n\n $_interes = $saldo * $interes_efectivo;\n $interes = round($_interes, 2);\n\n if ($saldo < $cuota) {\n $capital = round($saldo, 2);\n $_capital = $saldo;\n } else {\n $capital = $cuota - $interes;\n $_capital = $cuota - $_interes;\n }\n\n if ($sw == 1) {\n if ($fecha_inicio <= $fecha) {\n $interes_efectivo = $dias_interes * $interes_dia;\n $_interes = $saldo * $interes_efectivo;\n $interes = round($_interes, 2);\n $fila->dias = $dias_interes;\n $sw++;\n } else {\n $interes = 0;\n $fila->dias = 0;\n }\n }\n $fila->interes = $interes;\n $fila->capital = $capital;\n\n $fila->monto = $capital + $interes;\n $saldo = $saldo - $capital;\n $fila->saldo = $saldo;\n $lista_cuotas[] = $fila;\n $nro_cuota++;\n $i++;\n }\n return $lista_cuotas;\n }\n }", "title": "" }, { "docid": "07dae81c162335be808dcbd469aa85f3", "score": "0.6177313", "text": "function visualizarRecibos()\n {\n $this->session->unset_userdata('idArchivo');\n $idCliente=1;\n $data['recibos']=$this->Transferencias_models->regresaRecibos($idCliente);\n $data['tituloPago']='Historial de compras';\n //vista_datos('ecommers/recibosPdf_view',$data);\n vista_ecommers('ecommers/recibosPdf_view',$data);\n\n }", "title": "" }, { "docid": "43143bc88010f6713606081548fe9709", "score": "0.616606", "text": "public function historicoAction(){\t\t\t\t\n\t\t$this->view->doctype('XHTML1_RDFA');\t\t\n\t\t$validador = new My_Validador_AztecaValidador();\n\t\t$BoJson\t\t= new My_Model_ProcesaJsonTraderBO();\n\t\t$url \t= $validador->urlValida($this->getRequest()->getUserParam('url',''));\n\t\t$item \t= $validador->intValido($this->getRequest()->getUserParam('item',''));\n\t\t$pagina = $validador->intValido($this->getRequest()->getParam('pagina'));\n\t\t\n\t\tif (empty($pagina)) {\n\t\t\t$pagina = 0;\n\t\t}\n\t\t\n\t\t$dataJson \t= file_get_contents(\"https://www.tvazteca.com/appnoticias/json-fundacion-azteca-2020\");\n\t\t\n\t\t$data \t\t= json_decode($dataJson, true);\n\t\t\n\t\t$totalReg\t= 8;\n\t\t$datos \t \t= $BoJson->consultaDatosArticulo($data['items']);//Busca todos los articulos...\n\t\t\n\t\t$paginado \t= $BoJson->paginarHistorico($datos, $totalReg);//pagina los articulos (mas bien simula un paginado...xD)\n\t\t\n\t\t$totalPag = count($paginado)-1;\n\t\t\n\t\tif ($pagina > $totalPag){//Entro a una pagina que no existe\n\t\t\t$pagina = 0;\n\t\t}\n\n\t\t$this->view->pagina \t\t= $pagina;\n\t\t$this->view->total \t\t\t= $totalPag;\n\t\t$this->view->masVisto \t\t= $paginado[0];\n\t\t$this->view->datos \t\t = $paginado[$pagina];\n\t\t$this->view->bandera \t\t= $bandera;\n\t\t$this->view->metadatos \t= \"\";\n\t\t$this->view->site\t\t\t= $BoJson->obtenerUrl();\n\t}", "title": "" }, { "docid": "9468870366644d9bc663b256c8e72230", "score": "0.61650646", "text": "public function reporte_de_usuarios_pdf(){\n\t\t$datos_usuario = $this->obj_usuario->reportar_usuarios();\n\t\tob_start();\n\t\trequire_once 'app/vista/reportes/reporte_usuarios.php';\n\t\t$contenido = ob_get_clean();\n\t\t$nombre = \"reporte_usuarios.pdf\";\n\t\tControlador_Reporte::reportar($contenido,$nombre);\n\t}", "title": "" }, { "docid": "e1c6380c24ab7258fbdc23b4b85f440a", "score": "0.6161733", "text": "public function actionReport() {\n $content = \"\n <b style='color:red'>bold</b>\n <img src='\".Url::to('@web/images/reibach-logo-460x460.png', true).\"'/>\n <a href='http://reibach.federa.de'>Reibach ...</a>\n \";\n \n // setup kartik\\mpdf\\Pdf component\n $pdf = new Pdf([\n // set to use core fonts only\n 'mode' => Pdf::MODE_CORE,\n // A4 paper format\n 'format' => Pdf::FORMAT_A4,\n // portrait orientation\n 'orientation' => Pdf::ORIENT_PORTRAIT,\n // stream to browser inline\n 'destination' => Pdf::DEST_BROWSER,\n // your html content input\n 'content' => $content, \n // format content from your own css file if needed or use the\n // enhanced bootstrap css built by Krajee for mPDF formatting\n 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css',\n // call mPDF methods on the fly\n 'methods' => [\n 'SetHeader'=>['THIS IS REPORT'],\n 'SetFooter'=>['{PAGENO}'],\n ]\n ]);\n \n // http response\n $response = Yii::$app->response;\n $response->format = \\yii\\web\\Response::FORMAT_RAW;\n $headers = Yii::$app->response->headers;\n $headers->add('Content-Type', 'application/pdf');\n \n // return the pdf output as per the destination setting\n return $pdf->render();\n }", "title": "" }, { "docid": "79c58a3106367f27dc0a8ce2bb489c5d", "score": "0.6160924", "text": "public function index($dia1='', $mes1='', $anho1='', $dia2='', $mes2='', $anho2='')\r\n\t{\r\n\t\t/*\r\n\t\t *Departamentos que tendran acceso a este reporte.\r\n\t\t*/\r\n\t\t$Permitido = array('Gerencia' => '', 'Plani' => '', 'Sistemas' => '', 'SAP' => '');\r\n\t\t$this->ver_sesion_m->acceso($Permitido);\r\n\t\t\r\n\t\t//Los clientes no deberan acceder a este reporte.\r\n\t\t$this->ver_sesion_m->no_clientes();\r\n\t\t\r\n\t\t//Pequenha validacion\r\n\t\t$dia1 += 0;\r\n\t\t$mes1 += 0;\r\n\t\t$anho1 += 0;\r\n\t\t$dia2 += 0;\r\n\t\t$mes2 += 0;\r\n\t\t$anho2 += 0;\r\n\t\t//Si el resultado de la suma anterio es igual a cero, significa que el valor\r\n\t\t//recibido era una cadena de letras\r\n\t\tif(0 == $dia1 or 0 == $mes1 or 0 == $anho1 or 0 == $dia2 or 0 == $mes2 or 0 == $anho2)\r\n\t\t{\r\n\t\t\t//Muestro un mensaje de error\r\n\t\t\tshow_404();\r\n\t\t\t//Evito que se siga ejecutando el script\r\n\t\t\texit();\r\n\t\t}\r\n\t\t//Cargamos el modelo para poder realizar la verificacion.\r\n\t\t$this->load->model('extras/extra_rep_m', 'ext_rep');\r\n\t\t$HExtras = $this->ext_rep->mostrar_extras($dia1, $mes1, $anho1, $dia2, $mes2, $anho2);\r\n\t\t$Administradores = $this->ext_rep->mostrar_admon($HExtras);\r\n\t\t//Verificamos si la persona que quiere acceder se ha auntenticado\r\n\t\t//Como un usuario que tiene acceso a esta area.\r\n\t\tif($this->session->userdata('contra_ok') == 'ok')\r\n\t\t{\r\n\t\t\r\n\t\t\t$fecha1 = $dia1.'-'.$mes1.'-'.$anho1;\r\n\t\t\t$fecha2 = $dia2.'-'.$mes2.'-'.$anho2;\r\n\t\t\t//Variables necesarias en el encabezado\r\n\t\t\t$Variables = array(\r\n\t\t\t\t'Titulo_Pagina' => '',\r\n\t\t\t\t'Mensaje' => '',\r\n\t\t\t\t'fecha1' => $fecha1,\r\n\t\t\t\t'fecha2' => $fecha2,\r\n\t\t\t\t'HExtras' => $HExtras\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$this->load->view('extras/extra_rep_imp_v', $Variables);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\theader('location: /extras/extra_con');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "10cac8d844366bfe256c9762c2ab7690", "score": "0.6156479", "text": "public function getReporte($funcion){\n $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n $pdf->setFunction($funcion);\n $pdf->Header();\n // set document information\n $pdf->SetCreator(PDF_CREATOR);\n $pdf->SetAuthor('Nicola Asuni');\n $pdf->SetTitle('Reporte de Clasificadores');\n $pdf->SetSubject('TCPDF Tutorial');\n $pdf->SetKeywords('TCPDF, PDF, example, test, guide');\n \n // set default header data\n $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, 'Reporte de Clasificadores', PDF_HEADER_STRING);\n \n // set header and footer fonts\n $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n \n // set default monospaced font\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n \n // set margins\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n \n // set auto page breaks\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n \n // set image scale factor\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n \n // set some language-dependent strings (optional)\n if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\n require_once(dirname(__FILE__).'/lang/eng.php');\n $pdf->setLanguageArray($l);\n }\n \n // ---------------------------------------------------------\n \n // set font\n $pdf->SetFont('helvetica', '', 12);\n \n // add a page\n $pdf->AddPage();\n \n // column titles\n $header = array('ID', 'Descripcion', 'SIAF', 'Clasificador');\n \n // data loading\n $data = $this->LoadData($funcion);\n \n // print colored table\n $pdf->ColoredTable($header, $data,$funcion);\n ob_end_clean();\n // ---------------------------------------------------------\n \n // close and output PDF document\n $pdf->Output('example_011.pdf', 'I');\n \n //============================================================+\n // END OF FILE\n //============================================================+ \n }", "title": "" }, { "docid": "90f38715ff0cde2fe1ee655e1fd3c971", "score": "0.615647", "text": "public function mostrarReporte(){\n $evaluaciones = Evaluacion::get();\n $estudiantes = Estudiante::select('id','nombres','apellidos','fechaNacimiento')->with('notas')->get();\n\n $porcentajeTotal = 0;\n foreach ($estudiantes as $estudiante) {\n $estudiante->generarCalificaciones($evaluaciones);\n $porcentajeTotal += $estudiante->porcentajeTotal;\n }\n if (count($estudiantes)){\n $porcentajeTotal = round($porcentajeTotal/count($estudiantes),1);\n }\n return view('estudiante/reportes', compact('evaluaciones', 'estudiantes', 'porcentajeTotal'));\n }", "title": "" }, { "docid": "c20b0dab3d71e066d7b439908be23abb", "score": "0.6155565", "text": "function ordenes_pago_por_financiamiento($pdf, $estado, $ffinanciamiento) {\n\t//\tNUEVA PAGINA CABECERA\n\t$pdf->AddPage();\n\t//\t--------------------\n\tsetLogo($pdf);\n\t$pdf->Ln(8);\n\t//\t--------------------\n\t$pdf->SetFont('Arial', 'B', 12);\n\t$pdf->Cell(200, 10, 'Ordenes de Pago', 0, 1, 'C');\n\t$pdf->SetFont('Arial', 'B', 12);\n\t$pdf->Cell(200, 10, 'ESTADO: '.strtoupper($estado), 0, 1, 'C');\n\t$pdf->SetFont('Arial', 'B', 12);\n\t$pdf->Cell(200, 10, 'FUENTE DE FINANCIAMIENTO: '.strtoupper($ffinanciamiento), 0, 1, 'C');\n\t$pdf->Ln(5);\n\t//\t--------------------\n\t$pdf->SetDrawColor(0, 0, 0); $pdf->SetFillColor(255, 255, 255); $pdf->SetTextColor(0, 0, 0);\n\t$pdf->SetFont('Arial', 'B', 8);\n\t$pdf->Cell(35, 5, 'Nro. Orden', 1, 0, 'C', 1);\n\t$pdf->Cell(25, 5, 'Fecha Orden', 1, 0, 'C', 1);\n\t$pdf->Cell(90, 5, 'Beneficiario', 1, 0, 'C', 1);\n\t$pdf->Cell(30, 5, 'Estado', 1, 0, 'C', 1);\n\t$pdf->Cell(25, 5, 'Monto', 1, 1, 'C', 1);\n\t//\t--------------------\n\t$pdf->SetFont('Arial', '', 8);\n\t$pdf->SetAligns(array('L', 'C', 'L', 'C', 'R'));\n\t$pdf->SetWidths(array(35, 25, 90, 30, 25));\n}", "title": "" }, { "docid": "b9b777f7771a5f6ea27d5efc5699d57f", "score": "0.61527944", "text": "public function PDF_Informe_Ventas_Admin($TipoReporte,$FechaCorte,$FechaIni, $FechaFinal,$CentroCostos,$EmpresaPro,$Vector) {\r\n \r\n \r\n $Condicion=\" ori_facturas_items WHERE \";\r\n $Condicion2=\" ori_facturas WHERE \";\r\n if($TipoReporte==\"Corte\"){\r\n $CondicionFecha1=\" FechaFactura <= '$FechaCorte' \";\r\n $CondicionFecha2=\" Fecha <= '$FechaCorte' \";\r\n $CondicionFecha3=\" fi.FechaFactura <= '$FechaCorte' \";\r\n $Rango=\"Corte a $FechaFinal\";\r\n }else{\r\n $CondicionFecha1=\" FechaFactura >= '$FechaIni' AND FechaFactura <= '$FechaFinal' \";\r\n $CondicionFecha2=\" Fecha >= '$FechaIni' AND Fecha <= '$FechaFinal' \";\r\n $CondicionFecha3=\" fi.FechaFactura >= '$FechaIni' AND fi.FechaFactura <= '$FechaFinal' \";\r\n $Rango=\"De $FechaIni a $FechaFinal\";\r\n }\r\n\r\n $CondicionItems=$Condicion.$CondicionFecha1;\r\n $CondicionFacturas=$Condicion2.$CondicionFecha2;\r\n \r\n $CondicionItems=\" FROM `ori_facturas_items` fi INNER JOIN facturas f ON fi.`idFactura` = f.idFacturas \r\n WHERE $CondicionFecha1\r\n \";\r\n \r\n $idFormato=16;\r\n $DatosFormatos= $this->obCon->DevuelveValores(\"formatos_calidad\", \"ID\", $idFormato);\r\n \r\n $Documento=\"$DatosFormatos[Nombre] $Rango\";\r\n \r\n $this->PDF_Ini(\"Informe_Ventas\", 8, \"\");\r\n \r\n $this->PDF_Encabezado($Rango,1, $idFormato, \"\",$Documento);\r\n \r\n $html= $this->HTML_VentasXDepartamentos($CondicionItems);\r\n $this->PDF_Write($html);\r\n \r\n $html= $this->HTML_VentasXUsuario($CondicionItems,$CondicionFecha1,$CondicionFecha3);\r\n $this->PDF_Write($html);\r\n \r\n $html= $this->HTML_Uso_Resoluciones($CondicionFecha2, $CentroCostos, $EmpresaPro, \"\");\r\n $this->PDF_Write($html);\r\n $html= $this->HTML_Egresos_Admin($CondicionFecha2);\r\n $this->PDF_Write($html);\r\n $html= $this->HTML_Abonos_Facturas_Admin($CondicionFecha2);\r\n $this->PDF_Write($html);\r\n $html= $this->HTML_Abonos_Separados_Admin($CondicionFecha2);\r\n $this->PDF_Write($html);\r\n $html= $this->HTML_Intereses_SisteCredito_Admin($CondicionFecha2);\r\n $this->PDF_Write($html);\r\n $html= $this->HTML_Entregas($CondicionFecha1,$CondicionFecha2);\r\n $this->PDF_Write($html);\r\n $html= $this->HTML_Ventas_Colaboradores($CondicionFecha2, $CentroCostos, $EmpresaPro, \"\");\r\n $this->PDF_Write($html);\r\n \r\n /*Solo Juan Car\r\n $this->PDF_Add();\r\n //$this->PDF->SetFont('helvetica', '', 6);\r\n $html= $this->HTML_LibroDiario_Informe_Admin($CondicionFecha2, $CentroCostos, $EmpresaPro, \"\");\r\n $this->PDF_Write($html);\r\n * \r\n */\r\n $this->PDF_Output(\"Informe_Ventas_\");\r\n \r\n }", "title": "" }, { "docid": "5024b9d834355948f702c013c092143f", "score": "0.61323893", "text": "public function reporte($tipo, $tipo_archivo){\n\n $reporte = new ExportFiles();\n switch($tipo){\n case 'investigacion':\n $opciongrados = OpcionGrado::select('descripcion as Título', \\DB::raw(\"CASE WHEN tipo_opcion_grado='mr' THEN 'Mon. de Revisión' WHEN tipo_opcion_grado='mi' THEN 'Mon. Investigativa' ELSE 'Proyecto EPI' END AS Tipo\"), 'fecha_aprobacion as Aprobación', 'fecha_entrega_informe_final as Informe_Final', \\DB::raw(\"CASE WHEN finalizado='s' THEN 'Si' ELSE 'No' END AS Finalizado\"))\n ->whereIn('tipo_opcion_grado', ['epi', 'mi', 'mr'])\n ->get();\n if($tipo_archivo == 'excel')\n $reporte->createExcel($opciongrados, 'Opciones de Grado', 'E1');\n else\n $reporte->createPdf($opciongrados, 'Opciones de Grado', 'E1');\n break;\n\n case 'proyeccion':\n $opciongrados = OpcionGrado::select('descripcion as Título', \\DB::raw(\"CASE WHEN tipo_opcion_grado='epps' THEN 'EPPS' WHEN tipo_opcion_grado='pas' THEN 'Pasantía' ELSE 'Posgrado' END AS Tipo\"), 'fecha_aprobacion as Aprobación', 'fecha_entrega_informe_final as Informe_Final', \\DB::raw(\"CASE WHEN finalizado='s' THEN 'Si' ELSE 'No' END AS Finalizado\"))\n ->whereIn('tipo_opcion_grado', ['epps', 'pas', 'pos'])\n ->get();\n if($tipo_archivo == 'excel')\n $reporte->createExcel($opciongrados, 'Opciones de Grado', 'E1');\n else\n $reporte->createPdf($opciongrados, 'Opciones de Grado', 'E1');\n break;\n }\n }", "title": "" }, { "docid": "d5b75f8ab7f300411de31a8069f9137b", "score": "0.61268425", "text": "function reporteGeneral(){\n $this->procedimiento='conta.ft_comisionistas_sel';\n $this->transaccion='CONTA_CMS_REPO';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\n $this->setParametro('id_periodo','id_periodo','int4');\n\n $this->captura('nombre_agencia','varchar');\n $this->captura('nit_comisionista','varchar');\n $this->captura('nro_contrato','varchar');\n $this->captura('nro_boleto','varchar');\n $this->captura('periodo','int4');\n $this->captura('cantidad','numeric');\n $this->captura('precio_unitario','numeric');\n $this->captura('monto_total','numeric');\n $this->captura('monto_total_comision','numeric');\n $this->captura('tipo','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n // var_dump($this->respuesta);exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "b7cd2d60ecdc5c63cef3da45f22c767d", "score": "0.61141557", "text": "public function reporteAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $egresoForm = new \\Area4\\ContableBundle\\Util\\EgresoForm(new \\DateTime('now'), new \\DateTime('now'));\n $form = $this->createForm(new ReporteType(),$egresoForm );\n\n $request = $this->getRequest();\n $form->bindRequest($request);\n\n $egresos = $em->getRepository('Area4ContableBundle:Egreso')->reporte($egresoForm->getFechaInicio(), $egresoForm->getFechaFin());\n\n $total = 0;\n foreach ($egresos as $egreso) {\n $total += $egreso->getImporte();\n }\n\n return array(\n 'egresos' => $egresos,\n 'fecha_inicio' => $egresoForm->getFechaInicio(),\n 'fecha_fin' => $egresoForm->getFechaFin(),\n 'total' => $total\n );\n }", "title": "" }, { "docid": "685f7395019d38226b9f2091b899d59a", "score": "0.61062646", "text": "public function report($date,$interCompany,$noActivity,$typePaymentTerm,$paymentTerm)\r\n {\r\n /********************* AYUDA A AUMENTAR EL TIEMPO PARA GENERAR EL REPORTE CUANDO SON MUCHOS REGISTROS **********************/\r\n ini_set('max_execution_time', 500);\r\n\r\n if($date==null) $date=date('Y-m-d');\r\n $documents=$this->_getData($date,$interCompany,$noActivity,$typePaymentTerm,$paymentTerm);\r\n $balances3=$this->_getBalances(DateManagement::calculateDate('-3',$date));\r\n $balances2=$this->_getBalances(DateManagement::calculateDate('-2',$date));\r\n $balances1=$this->_getBalances(DateManagement::calculateDate('-1',$date));\r\n $soaDue=$soaNext=$provisionInvoiceSent=$provisionInvoiceReceived=$provisionTrafficSent=$provisionTrafficReceived=$receivedDispute=$sentDispute=$balance=$revenue3=$cost3=$margin3=$revenue2=$cost2=$margin2=$revenue1=$cost1=$margin1=0;\r\n $body=NULL;\r\n if($documents!=NULL)\r\n {\r\n $body.=\"<br>\r\n <table>\r\n <tr>\r\n <td colspan='12'>\r\n <h2> \".Reportes::defineNameExtra($paymentTerm,$typePaymentTerm, NULL).\"</h2>\r\n al {$date}\r\n </td>\r\n </tr>\r\n </table>\r\n <table >\r\n <tr>\r\n <td {$this->styleNull} colspan='2'></td>\r\n <td {$this->styleMarginHead} colspan='3'> CAPTURA \".DateManagement::calculateDate('-3',$date).\"</td>\r\n <td {$this->styleMarginHead} colspan='3'> CAPTURA \".DateManagement::calculateDate('-2',$date).\"</td>\r\n <td {$this->styleMarginHead} colspan='3'> CAPTURA \".DateManagement::calculateDate('-1',$date).\"</td>\r\n <td {$this->styleNull} colspan='6'></td>\r\n <td {$this->styleProvFactHead} colspan='2'> PROVISION FACT </td>\r\n <td {$this->styleProvTrafHead} colspan='2'> PROVISION TRAFICO </td>\r\n <td {$this->styleProvDispHead} colspan='2'> DISPUTAS </td>\r\n <td {$this->styleNull} ></td>\r\n </tr>\r\n <tr>\r\n <td {$this->styleNumberRow} >N°</td>\r\n <td {$this->styleCarrierHead} > CARRIER </td>\r\n <td {$this->styleRevenueHead} > REVENUE </td>\r\n <td {$this->styleCostHead} > COST </td>\r\n <td {$this->styleMarginHead} > MARGEN </td>\r\n <td {$this->styleRevenueHead} > REVENUE </td>\r\n <td {$this->styleCostHead} > COST </td>\r\n <td {$this->styleMarginHead} > MARGEN </td>\r\n <td {$this->styleRevenueHead} > REVENUE </td>\r\n <td {$this->styleCostHead} > COST </td>\r\n <td {$this->styleMarginHead} > MARGEN </td>\r\n <td {$this->styleBalanceHead} colspan='2'> BALANCE </td>\r\n \r\n <td {$this->styleSoaHead} > SOA(DUE)</td>\r\n <td {$this->styleSoaHead} > DUE DATE </td>\r\n <td {$this->styleSoaHead} > SOA(NEXT)</td>\r\n <td {$this->styleSoaHead} > DUE DATE </td>\r\n <td {$this->styleProvFactHead} > CLIENTES REVENUE </td>\r\n <td {$this->styleProvFactHead} > PROVEEDORES COST </td>\r\n <td {$this->styleProvTrafHead} > CLIENTES REVENUE </td>\r\n <td {$this->styleProvTrafHead} > PROVEEDORES COST </td>\r\n <td {$this->styleProvDispHead} > CLIENTES RECIBIDAS </td>\r\n <td {$this->styleProvDispHead} > PROVEEDORES ENVIADAS </td>\r\n <td {$this->styleNumberRow} >N°</td>\r\n </tr>\";\r\n foreach($documents as $key => $document)\r\n {\r\n $pos=$key+1;\r\n\r\n $body.=\"<tr {$this->styleBasic} >\";\r\n $body.=\"<td {$this->styleNumberRow} >{$pos}</td>\";\r\n $body.=\"<td {$this->styleBasic} >\".$document->name.Reportes::showSecurityRetainer($document).\"</td>\";\r\n $body.=\"<td {$this->styleBasicRevenue} >\".Yii::app()->format->format_decimal($this->_getBalance($balances3,$document->id,\"revenue\")).\"</td>\";\r\n $revenue3+=$this->_getBalance($balances3,$document->id,\"revenue\");\r\n $body.=\"<td {$this->styleBasicCost} >\".Yii::app()->format->format_decimal($this->_getBalance($balances3,$document->id,\"cost\")).\"</td>\";\r\n $cost3+=$this->_getBalance($balances3,$document->id,\"cost\");\r\n $body.=\"<td {$this->styleBasicMargin} >\".Yii::app()->format->format_decimal($this->_getBalance($balances3,$document->id,\"margin\")).\"</td>\";\r\n $margin3+=$this->_getBalance($balances3,$document->id,\"margin\");\r\n $body.=\"<td {$this->styleBasicRevenue} >\".Yii::app()->format->format_decimal($this->_getBalance($balances2,$document->id,\"revenue\")).\"</td>\";\r\n $revenue2+=$this->_getBalance($balances2,$document->id,\"revenue\");\r\n $body.=\"<td {$this->styleBasicCost} >\".Yii::app()->format->format_decimal($this->_getBalance($balances2,$document->id,\"cost\")).\"</td>\";\r\n $cost2+=$this->_getBalance($balances2,$document->id,\"cost\");\r\n $body.=\"<td {$this->styleBasicMargin} >\".Yii::app()->format->format_decimal($this->_getBalance($balances2,$document->id,\"margin\")).\"</td>\";\r\n $margin2+=$this->_getBalance($balances2,$document->id,\"margin\");\r\n $body.=\"<td {$this->styleBasicRevenue} >\".Yii::app()->format->format_decimal($this->_getBalance($balances1,$document->id,\"revenue\")).\"</td>\";\r\n $revenue1+=$this->_getBalance($balances1,$document->id,\"revenue\");\r\n $body.=\"<td {$this->styleBasicCost} >\".Yii::app()->format->format_decimal($this->_getBalance($balances1,$document->id,\"cost\")).\"</td>\";\r\n $cost1+=$this->_getBalance($balances1,$document->id,\"cost\");\r\n $body.=\"<td {$this->styleBasicMargin} >\".Yii::app()->format->format_decimal($this->_getBalance($balances1,$document->id,\"margin\")).\"</td>\";\r\n $margin1+=$this->_getBalance($balances1,$document->id,\"margin\");\r\n $body.=\"<td {$this->styleBasic} colspan='2'>\".Yii::app()->format->format_decimal($document->balance).\"</td>\";\r\n $balance+=$document->balance;\r\n\r\n $body.=\"<td {$this->styleBasic} >\".Yii::app()->format->format_decimal($document->soa).\"</td>\";\r\n $soaDue+=$document->soa;\r\n $body.=\"<td {$this->styleBasic} >\".Utility::ifNull($document->due_date, \"Nota 1\") .\"</td>\";\r\n $body.=\"<td {$this->styleBasic} >\".Yii::app()->format->format_decimal($document->soa_next).\"</td>\";\r\n $soaNext+=$document->soa_next;\r\n $body.=\"<td {$this->styleBasic} >\".Utility::ifNull($document->due_date_next, \"Nota\") .\"</td>\";\r\n $body.=\"<td {$this->styleBasicCost} >\".Yii::app()->format->format_decimal($document->provision_invoice_sent).\"</td>\";\r\n $provisionInvoiceSent+=$document->provision_invoice_sent;\r\n $body.=\"<td {$this->styleBasicCost} >\".Yii::app()->format->format_decimal($document->provision_invoice_received).\"</td>\";\r\n $provisionInvoiceReceived+=$document->provision_invoice_received;\r\n $body.=\"<td {$this->styleBasic} >\".Yii::app()->format->format_decimal($document->provision_traffic_sent).\"</td>\";\r\n $provisionTrafficSent+=$document->provision_traffic_sent;\r\n $body.=\"<td {$this->styleBasic} >\".Yii::app()->format->format_decimal($document->provision_traffic_received).\"</td>\";\r\n $provisionTrafficReceived+=$document->provision_traffic_received;\r\n $body.=\"<td {$this->styleBasicCost} >\".Yii::app()->format->format_decimal($document->received_dispute).\"</td>\";\r\n $receivedDispute+=$document->received_dispute;\r\n $body.=\"<td {$this->styleBasicCost} >\".Yii::app()->format->format_decimal($document->sent_dispute).\"</td>\";\r\n $sentDispute+=$document->sent_dispute;\r\n $body.=\"<td {$this->styleNumberRow} >{$pos}</td>\";\r\n $body.=\"</tr>\";\r\n }\r\n $body.=\"<tr>\r\n <td {$this->styleNull} ></td>\r\n <td {$this->styleCarrierHead} rowspan='2' > TOTAL </td>\r\n <td {$this->styleRevenueHead} > REVENUE </td>\r\n <td {$this->styleCostHead} > COST </td>\r\n <td {$this->styleMarginHead} > MARGEN </td>\r\n <td {$this->styleRevenueHead} > REVENUE </td>\r\n <td {$this->styleCostHead} > COST </td>\r\n <td {$this->styleMarginHead} > MARGEN </td>\r\n <td {$this->styleRevenueHead} > REVENUE </td>\r\n <td {$this->styleCostHead} > COST </td>\r\n <td {$this->styleMarginHead} > MARGEN </td>\r\n <td {$this->styleBalanceHead} colspan='2'> BALANCE </td>\r\n \r\n <td {$this->styleSoaHead} colspan='2'> SOA(DUE)</td>\r\n <td {$this->styleSoaHead} colspan='2'> SOA(NEXT)</td>\r\n <td {$this->styleProvFactHead} > CLIENTES REVENUE </td>\r\n <td {$this->styleProvFactHead} > PROVEEDORES COST </td>\r\n <td {$this->styleProvTrafHead} > CLIENTES REVENUE </td>\r\n <td {$this->styleProvTrafHead} > PROVEEDORES COST </td>\r\n <td {$this->styleProvDispHead} > CLIENTES RECIBIDAS </td>\r\n <td {$this->styleProvDispHead} > PROVEEDORES ENVIADAS </td>\r\n <td {$this->styleNull} ></td>\r\n </tr>\r\n <tr>\r\n <td {$this->styleNull} ></td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($revenue3).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($cost3).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($margin3).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($revenue2).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($cost2).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($margin2).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($revenue1).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($cost1).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($margin1).\"</td>\r\n <td {$this->styleBasic} colspan='2'>\".Yii::app()->format->format_decimal($balance).\"</td>\r\n \r\n <td {$this->styleBasic} colspan='2'>\".Yii::app()->format->format_decimal($soaDue).\"</td>\r\n <td {$this->styleBasic} colspan='2'>\".Yii::app()->format->format_decimal($soaNext).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($provisionInvoiceSent).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($provisionInvoiceReceived).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($provisionTrafficSent).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($provisionTrafficReceived).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($receivedDispute).\"</td>\r\n <td {$this->styleBasic} >\".Yii::app()->format->format_decimal($sentDispute).\"</td>\r\n <td {$this->styleNull} ></td>\r\n </tr>\r\n </table>\"; \r\n\r\n $this->totalSoaDue+=$soaDue;\r\n $this->totalSoaNext+=$soaNext;\r\n $this->totalProvisionInvoiceSent+=$provisionInvoiceSent;\r\n $this->totalProvisioInvoiceReceived+=$provisionInvoiceReceived;\r\n $this->totalProvisioTrafficSent+=$provisionTrafficSent;\r\n $this->totalProvisioTrafficReceived+=$provisionTrafficReceived;\r\n $this->totalReceivedDispute+=$receivedDispute;\r\n $this->totalSentDispute+=$sentDispute;\r\n $this->totalBalance+=$balance;\r\n $this->totalRevenue3+=$revenue3;\r\n $this->totalCost3+=$cost3;\r\n $this->totalMargin3+=$margin3;\r\n $this->totalRevenue2+=$revenue2;\r\n $this->totalCost2+=$cost2;\r\n $this->totalMargin2+=$margin2;\r\n $this->totalRevenue1+=$revenue1;\r\n $this->totalCost1+=$cost1;\r\n $this->totalMargin1+=$margin1;\r\n // $body.=\"<table><tr style='border:0px><td style='border:0px colspan='23'>Nota: No presenta movimiento despues de la fecha</td></tr></table>\";\r\n\r\n if($noActivity==TRUE)$body.=\"<table><tr style='border:0px><td style='border:0px colspan='23'>Nota 1: No presenta movimiento a la fecha</td></tr><table>\";\r\n } \r\n return $body;\r\n }", "title": "" }, { "docid": "41cc64fc942a4d51bcc7680997aab15d", "score": "0.6104449", "text": "public function report(){\n $rubros= Rubroingreso::all();\n\n $listaAños = DB::table('ingresos') \n ->select('año')\n ->distinct()->get();\n\n $listaMeses = DB::table('ingresos') \n ->select('mes')\n ->orderBy('mes', 'asc')\n ->distinct()->get();\n\n return view('tesoreria.MostReportes', compact(\"rubros\", \"listaAños\", \"listaMeses\"));\n \n\n }", "title": "" }, { "docid": "c892b954092e8a1ba2dba467622af73f", "score": "0.6097063", "text": "public function reporteAction() {\r\n /* $proyectos_id = substr($_GET['datos'], 0, -1); //quitamos la ultima (,)\r\n $columnas = substr($_GET['columnas'], 0, -1); //quitamos la ultima (,)\r\n // $columnas= substr($columnas, 6);\r\n $columnas = explode(',', $columnas);\r\n $titulos = substr($_GET['titulos'], 0, -1); //quitamos la ultima (,)\r\n //$titulos= substr($titulos, 3);\r\n $titulos = strtoupper($titulos); //titulos en mayuscula\r\n $titulos = explode(',', $titulos);\r\n $grupos = $_GET['grupo'];\r\n $grupos = explode(',', $grupos);\r\n $orden = $_GET['orden'];\r\n $dir = $_GET['dir'];\r\n\r\n $sql = \"SELECT 1 as suma,mov.id,e.estacion,CONCAT(du.nombres,' ',du.apellidos) as de_user,\r\n CONCAT(au.nombres,' ',au.apellidos) as a_user, \r\n v.valor,m.motivo,mov.inicio,mov.fin,mov.cantidad,mov.fecha,\r\n mov.resto_inicio,mov.resto_fin,\r\n mov.cantidad_vendida,mov.saldo,\r\n mov.costo_unitario,\r\n mov.cantidad_vendida*mov.costo_unitario as venta,mov.fecha_devolucion\r\n FROM mtmovimiento mov \r\n INNER JOIN mtestaciones e ON mov.estacion_id=e.id\r\n INNER JOIN operador du ON mov.d_user=du.codigo\r\n INNER JOIN operador au ON mov.a_user=au.codigo\r\n INNER JOIN mtvalores v ON mov.valor_id=v.id\r\n INNER JOIN mtmotivo m ON mov.motivo_id=m.id \";\r\n $sql.=\" WHERE mov.id IN (\";\r\n $sql.=$proyectos_id;\r\n $sql.=\")\";\r\n\r\n if ($orden != \"\") {\r\n $sql.=\" ORDER BY \" . $orden;\r\n if ($dir) {\r\n $sql.=\" \" . $dir;\r\n }\r\n }\r\n // var_dump($sql);\r\n // var_dump($columnas);\r\n //echo $sql;\r\n /* $con = $this->getDI()->get('db');\r\n $proyectos = $con->query($sql);\r\n $proyectos->setFetchMode(\\Phalcon\\Db::FETCH_ASSOC);\r\n */\r\n // $proyectos = $this->modelsManager->executeQuery($sql);\r\n $celdas = array(\r\n 0 => 'A',\r\n 1 => 'B',\r\n 2 => 'C',\r\n 3 => 'D',\r\n 4 => 'E',\r\n 5 => 'F',\r\n 6 => 'G',\r\n 7 => 'H',\r\n 8 => 'I',\r\n 9 => 'J',\r\n 10 => 'K',\r\n 11 => 'L',\r\n 12 => 'M',\r\n 13 => 'N',\r\n 14 => 'O',\r\n 15 => 'P',\r\n 16 => 'Q',\r\n 17 => 'R',\r\n 18 => 'S',\r\n 19 => 'T',\r\n 20 => 'U',\r\n 21 => 'V',\r\n 22 => 'W',\r\n 23 => 'X',\r\n 24 => 'Y',\r\n 25 => 'Z',\r\n );\r\n \r\n error_reporting(E_ALL);\r\n ini_set('display_errors', TRUE);\r\n ini_set('display_startup_errors', TRUE);\r\n date_default_timezone_set('Europe/London');\r\n\r\n if (PHP_SAPI == 'cli')\r\n die('This example should only be run from a Web Browser');\r\n \r\n $objPHPExcel = new PHPExcel();\r\n $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\r\n // Set document properties\r\n $objPHPExcel->getProperties()->setCreator(\"Ivan Chacolla\")\r\n ->setLastModifiedBy(\"Ivan Chacolla\")\r\n ->setTitle(\"Office 2007 XLSX Test Document\")\r\n ->setSubject(\"Office 2007 XLSX Test Document\")\r\n ->setDescription(\"Test document for Office 2007 XLSX, generated using PHP classes.\")\r\n ->setKeywords(\"office 2007 openxml php\")\r\n ->setCategory(\"Ivan Chacolla\");\r\n//styles\r\n//Titulos\r\n $styleTitle = array(\r\n 'font' => array(\r\n 'bold' => true,\r\n 'color' => array(\r\n 'argb' => PHPExcel_Style_Color::COLOR_WHITE,\r\n ),\r\n 'name' => 'Arial',\r\n 'size' => 8,\r\n ),\r\n 'alignment' => array(\r\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,\r\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\r\n ),\r\n 'borders' => array(\r\n 'allborders' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\r\n 'color' => array('argb' => 'FF000000'),\r\n )\r\n ),\r\n 'fill' => array(\r\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\r\n 'startcolor' => array(\r\n 'argb' => 'FF135982',\r\n ),\r\n ),\r\n );\r\n $borders = array(\r\n 'font' => array(\r\n 'name' => 'Arial',\r\n 'size' => 8,\r\n ),\r\n 'borders' => array(\r\n 'allborders' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\r\n 'color' => array('argb' => 'FF000000'),\r\n )\r\n ),\r\n 'alignment' => array(\r\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT,\r\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\r\n ),\r\n );\r\n $derecha = array(\r\n 'alignment' => array(\r\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_RIGHT,\r\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\r\n ),\r\n );\r\n\r\n $totals = array();\r\n $results = array();\r\n $row = 2;\r\n //VEMOS SI el group tiene datos\r\n //$grupos = array_reverse($grupos);\r\n //var_dump($grupos);\r\n /* $count = count($titulos);\r\n $mGrupo = array();\r\n $aProyectos = array();\r\n foreach ($proyectos as $k => $v) {\r\n foreach ($columnas as $key => $col) {\r\n $aProyectos[$k][$col] = $v[$col];\r\n //array_push($colx, $v[$col]);\r\n }\r\n }\r\n $matriz = array();\r\n // var_dump($grupos);\r\n\r\n $contador = sizeof($grupos);\r\n if ($grupos[0] != '') {\r\n foreach ($grupos as $k => $g) {\r\n // $nombre='grupo'.$g;\r\n $grupo = array();\r\n switch ($contador) {\r\n case 1:\r\n foreach ($proyectos as $key => $v) {\r\n //$clave = $v[$g];\r\n $clave1 = $v[$g];\r\n if ($k == 0)\r\n $grupo[$clave1][$key] = $aProyectos[$key];\r\n }\r\n break;\r\n case 2:\r\n foreach ($proyectos as $key => $v) {\r\n\r\n $clave1 = $v[$grupos[0]];\r\n $clave2 = $v[$grupos[1]];\r\n if ($k == 1)\r\n $grupo[$clave1][$clave2][$key] = $aProyectos[$key];\r\n else\r\n $grupo[$clave1][$clave2][$key] = $aProyectos[$key][$g];\r\n }\r\n break;\r\n case 3:\r\n foreach ($proyectos as $key => $v) {\r\n\r\n $clave1 = $v[$grupos[0]];\r\n $clave2 = $v[$grupos[1]];\r\n $clave3 = $v[$grupos[2]];\r\n if ($k == 2)\r\n $grupo[$clave1][$clave2][$clave3][$key] = $aProyectos[$key];\r\n else\r\n $grupo[$clave1][$clave2][$clave3][$key] = $aProyectos[$key][$g];\r\n }\r\n break;\r\n case 4:\r\n foreach ($proyectos as $key => $v) {\r\n\r\n $clave1 = $v[$grupos[0]];\r\n $clave2 = $v[$grupos[1]];\r\n $clave3 = $v[$grupos[2]];\r\n $clave4 = $v[$grupos[3]];\r\n if ($k == 3)\r\n $grupo[$clave1][$clave2][$clave3][$clave4][$key] = $aProyectos[$key];\r\n else\r\n $grupo[$clave1][$clave2][$clave3][$clave4][$key] = $aProyectos[$key][$g];\r\n }\r\n break;\r\n\r\n default:\r\n $grupo = $aProyectos;\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n $contador = 0;\r\n $grupo = $aProyectos;\r\n // var_dump($grupo);\r\n }\r\n switch ($contador) {\r\n case 1:\r\n foreach ($grupo as $k1 => $v1) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A' . $row, $k1);\r\n $objPHPExcel->getActiveSheet()->mergeCells('A' . $row . ':' . $celdas[$count + 0] . $row);\r\n //$objPHPExcel->getActiveSheet()->getStyle('A' . $row . ':' . $celdas[$count + 0] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($titulos), NULL, 'B' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('B' . $row . ':' . $celdas[$count + 0] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v1 as $k2 => $v2) {\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($v2), NULL, 'B' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('B' . $row . ':' . $celdas[$count + 0] . $row)->applyFromArray($borders);\r\n $row++;\r\n }\r\n $row++;\r\n }\r\n break;\r\n case 2:\r\n foreach ($grupo as $k1 => $v1) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A' . $row, $k1);\r\n $objPHPExcel->getActiveSheet()->mergeCells('A' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v1 as $k2 => $v2) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B' . $row, $k2);\r\n $objPHPExcel->getActiveSheet()->mergeCells('B' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($titulos), NULL, 'C' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 2] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v2 as $k3 => $v3) {\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($v3), NULL, 'C' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 2] . $row)->applyFromArray($borders);\r\n $row++;\r\n }\r\n //sumatorias\r\n $row++;\r\n }\r\n }\r\n\r\n break;\r\n case 3:\r\n foreach ($grupo as $k1 => $v1) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A' . $row, $k1);\r\n $objPHPExcel->getActiveSheet()->mergeCells('A' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v1 as $k2 => $v2) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B' . $row, $k2);\r\n $objPHPExcel->getActiveSheet()->mergeCells('B' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v2 as $k3 => $v3) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('C' . $row, $k3);\r\n $objPHPExcel->getActiveSheet()->mergeCells('C' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($titulos), NULL, 'D' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('D' . $row . ':' . $celdas[$count + 2] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v3 as $k4 => $v4) {\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($v4), NULL, 'D' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('D' . $row . ':' . $celdas[$count + 2] . $row)->applyFromArray($borders);\r\n $row++;\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n case 4:\r\n foreach ($grupo as $k1 => $v1) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A' . $row, $k1);\r\n $objPHPExcel->getActiveSheet()->mergeCells('A' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v1 as $k2 => $v2) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B' . $row, $k2);\r\n $objPHPExcel->getActiveSheet()->mergeCells('B' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v2 as $k3 => $v3) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('C' . $row, $k3);\r\n $objPHPExcel->getActiveSheet()->mergeCells('C' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('C' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v3 as $k4 => $v4) {\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('D' . $row, $k4);\r\n $objPHPExcel->getActiveSheet()->mergeCells('D' . $row . ':' . $celdas[$count + 2] . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('D' . $row . ':' . $celdas[$count + 1] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($titulos), NULL, 'E' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('E' . $row . ':' . $celdas[$count + 2] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($v4 as $k5 => $v5) {\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($v5), NULL, 'F' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('F' . $row . ':' . $celdas[$count + 2] . $row)->applyFromArray($borders);\r\n $row++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n\r\n default:\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($titulos), NULL, 'A' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('A' . $row . ':' . $celdas[$count] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n foreach ($grupo as $k1 => $v1) {\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($v1), NULL, 'A' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('A' . $row . ':' . $celdas[$count] . $row)->applyFromArray($borders);\r\n $row++;\r\n }\r\n break;\r\n }*/\r\n /*\r\n //indices de celdas\r\n $uh = 0; //uh_aprobado\r\n $uh_monto = 0;\r\n $costo_proyecto = 0;\r\n foreach ($columnas as $k => $c) {\r\n switch ($c) {\r\n case 'uh_ejecucion':\r\n $uh = $k;\r\n break;\r\n case 'monto_con_aev':\r\n $uh_monto = $k;\r\n break;\r\n case 'costo_proyecto':\r\n $costo_proyecto = $k;\r\n break;\r\n }\r\n }\r\n $uh_total = '=SUM(';\r\n $costo_total = '=SUM(';\r\n foreach ($grupo as $key => $value) {\r\n //titulo\r\n $inicio = $row;\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A' . $row, $key);\r\n $objPHPExcel->getActiveSheet()->mergeCells('A' . $row . ':' . $celdas[$count] . $row);\r\n $row++;\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($titulos), NULL, 'B' . $row);\r\n $objPHPExcel->getActiveSheet()->getStyle('A' . $row . ':' . $celdas[$count] . $row)->applyFromArray($styleTitle);\r\n $row++;\r\n\r\n //INDICES\r\n $linea = $row;\r\n for ($i = 1; $i <= count($value); $i++) {\r\n $objPHPExcel->setActiveSheetIndex(0)\r\n ->setCellValue('A' . $linea, $i);\r\n $linea++;\r\n }\r\n $row1 = $row;\r\n $objPHPExcel->getActiveSheet()->fromArray(array_values($value), NULL, 'B' . $row);\r\n $row+=sizeof($value);\r\n\r\n $objPHPExcel->getActiveSheet()->getStyle('A' . $row1 . ':' . $celdas[$count] . $row)->applyFromArray($borders);\r\n //sumatorias\r\n if (in_array('uh_ejecucion', $columnas)) {\r\n $celda = $celdas[$uh + 1];\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue($celda . $row, '=SUM(' . $celda . $row1 . ':' . $celda . ($row - 1) . ')');\r\n //total\r\n $uh_total.=$celda . $row . '+';\r\n if (in_array('costo_proyecto', $columnas)) {\r\n $celda = $celdas[$costo_proyecto + 1];\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue($celda . $row, '=SUM(' . $celda . $row1 . ':' . $celda . ($row - 1) . ')');\r\n //costo total\r\n $costo_total.=$celda . $row . '+';\r\n }\r\n $row++;\r\n }\r\n //formato numero\r\n for ($i = $row1; $i <= $row; $i++) {\r\n $celda = $celdas[$costo_proyecto + 1];\r\n $objPHPExcel->getActiveSheet()->getStyle($celda . $i)->getNumberFormat()->setFormatCode('\"Bs \"#,##0.00_-');\r\n $objPHPExcel->getActiveSheet()->getStyle($celda . $i . ':' . $celdas[$count] . $row)->applyFromArray($derecha);\r\n }\r\n //formato numero\r\n for ($i = $row1; $i <= $row; $i++) {\r\n $celda = $celdas[$uh_monto + 1];\r\n $objPHPExcel->getActiveSheet()->getStyle($celda . $i)->getNumberFormat()->setFormatCode('\"Bs \"#,##0.00_-');\r\n $objPHPExcel->getActiveSheet()->getStyle($celda . $i . ':' . $celdas[$count] . $row)->applyFromArray($derecha);\r\n }\r\n\r\n $row++;\r\n }\r\n\r\n //TOTAL\r\n $celda = $celdas[$uh + 1];\r\n $uh_total = substr($uh_total, 0, -1) . ')';\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue($celda . $row, $uh_total);\r\n\r\n $celda = $celdas[$costo_proyecto + 1];\r\n $costo_total = substr($costo_total, 0, -1) . ')';\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue($celda . $row, $costo_total);\r\n\r\n foreach ($columnas as $k => $c) {\r\n $objPHPExcel->getActiveSheet()->getColumnDimension($celdas[$k])->setAutoSize(true);\r\n }\r\n * \r\n */\r\n // Rename worksheet\r\n $objPHPExcel->getActiveSheet()->setTitle('SISTEMA COMERCIALIZACIÓN');\r\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\r\n $objPHPExcel->setActiveSheetIndex(0);\r\n // Redirect output to a client’s web browser (Excel2007)\r\n\r\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\r\n header('Content-Disposition: attachment;filename=\"VENTA_VALORES.xlsx\"');\r\n header('Cache-Control: max-age=0');\r\n\r\n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\r\n $objWriter->save('php://output');\r\n exit;\r\n }", "title": "" }, { "docid": "22bdc1597ed896c3aefea2407b8b54d1", "score": "0.60943407", "text": "public function index(Request $request)\n {\n \n \n\n\n $buscar = $request->get('buscar');\n $tipo = $request->get('tipo');\n \n //$guia = guia::buscarpor($tipo, $buscar)->paginate(5);\n\n //return view('guias.index',compact('guia'));\n\n\n\n $time = $request->get('tiempo'); \n\n\n// $guie = guia::select('guias')->count(); \n\n$guie = guia\n::join(\"cedes\",\"cedes.codigo\" ,\"=\",\"guias.origen\")\n->buscarpor($tipo, $buscar)\n->select(\"guias.*\")->count(); \n\n$guias = guia\n::join(\"cedes as cedes_origen\",\"cedes_origen.codigo\" ,\"=\",\"guias.origen\")\n->join(\"cedes as cedes_destino\",\"cedes_destino.codigo\" ,\"=\",\"guias.destino\")\n->buscarpor($tipo, $buscar)\n->select(\"guias.*\", \"cedes_origen.names as names_origen\", \"cedes_destino.names as names_destino\")\n->simplepaginate(5);\n\n$guias_exportar = guia\n::join(\"cedes as cedes_origen\",\"cedes_origen.codigo\" ,\"=\",\"guias.origen\")\n->join(\"cedes as cedes_destino\",\"cedes_destino.codigo\" ,\"=\",\"guias.destino\")\n->buscarpor($tipo, $buscar)\n->select(\"guias.*\", \"cedes_origen.names as names_origen\", \"cedes_destino.names as names_destino\");\n\n\n //$guia = guia::where('created_at', 'like', \"%$time%\")->paginate(5);\n\n return view('guias.index',compact('guias', 'guie'));\n\n\n\n\n\n\n\n//else\n//{\n\n//$query= trim($request->get('fech'));\n\n // s $guia = guia::where('created_at', 'LIKE', '%' .$query. '%')->OrderBy('id','asc')->simplepaginate();\n\n // return view('guias.index', ['guia' => $guia, 'fech' => $query]);\n//}\n\n //return view('guias.index',[\n \n //'guia'=> guia::get(), 'chofere' => chofere::get(), 'cede' => cede::get()] );\n }", "title": "" }, { "docid": "85a6ed5c9685f38847a6da6740392f85", "score": "0.6092174", "text": "public function test_report() {\n $c = $this->jasper->getJasperClient();\n $controls = array('p_user_id' => '3003');\n $report = $c->reportService()->runReport('/reports/realestate/clinetFollowParam', 'pdf', null, null, $controls);\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Description: File Transfer');\n header('Content-Disposition: attachment; filename=SalesClientFollowRep.pdf');\n header('Content-Transfer-Encoding: binary');\n header('Content-Length: ' . strlen($report));\n header('Content-Type: application/pdf');\n echo $report;\n }", "title": "" }, { "docid": "9a7b4a7e042961bd5f06eeb7a32cdf51", "score": "0.6091872", "text": "public function getStrRptHistoriaClinicaPacienteServicio()\r\n {\r\n define('FPDF_FONTPATH',FONT_PATH);\r\n include_once ( CLASS_PATH . \"class.clfpdf.php\" );\r\n\r\n //Limpia el buffer si no sale un error\r\n ob_end_clean();\r\n\r\n $fechaimpresion = date(\"Y/m/d H:i:s a\");\r\n\r\n\r\n //create a FPDF object\r\n $pdf = new FPDF('P' , 'mm' , 'A4');\r\n\r\n //set document properties\r\n $pdf->SetAuthor('CPCH - KOICA');\r\n $pdf->SetTitle('Recibo Servicio');\r\n\r\n //encabezado\r\n $pdf->setStrTipoEncabezado(9);\r\n $pdf->Header();\r\n //\r\n //Envia a otra pagina\r\n $pdf->setAutoPagebreak(true,'');\r\n\r\n //set font for the entire document\r\n $pdf->SetFont('Arial','B',35);\r\n $pdf->SetTextColor(50,60,100);\r\n\r\n //set up a page\r\n $pdf->AddPage('P');\r\n $pdf->SetDisplayMode(75,'default');\r\n\r\n //insert an image and make it a link\r\n //$pdf->Image('logo.png',10,20,33,0,' ','http://www.fpdf.org/');\r\n\r\n $query = new clQuery();\r\n\r\n //Nombre Procedimientos Almacenados\r\n $ProcedimientoAlmacenado = sprintf(\"CALL sprpthistoriaclinicapacienteservicio('%d','%d');\", $this->getStrTipoMedico(), $this->getStrNumeroHistoriaClinicaPaciente());\r\n $query->setStrProcedimientoAlmacenado($ProcedimientoAlmacenado);\r\n $resultado = $query->getStrSqlSelect();\r\n\r\n if( count($resultado) > 0 ) {\r\n foreach( $resultado as $rst):\r\n $pdf->Ln(2);\r\n\r\n $NHC = \"\";\r\n switch (strlen($rst[\"nhc\"])){\r\n case 1:\r\n $NHC = \"0000\".$rst[\"nhc\"];\r\n break;\r\n case 2:\r\n $NHC = \"000\".$rst[\"nhc\"];\r\n break;\r\n case 3:\r\n $NHC = \"00\".$rst[\"nhc\"];\r\n break;\r\n case 4:\r\n $NHC = \"0\".$rst[\"nhc\"];\r\n break;\r\n default:\r\n $NHC = $rst[\"nhc\"];\r\n break;\r\n }\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('MEDICO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(100,5,utf8_decode(utf8_encode($rst[\"medico\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('FECHA VISITA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(40,5,utf8_decode(utf8_encode($rst[\"fechahistoriaclinica\"])),1,1,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('SERVICIO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(60,5,utf8_decode(utf8_encode($rst[\"departamento\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('UNIDAD: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(50,5,utf8_decode(utf8_encode($rst[\"unidad\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('EDADES: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(20,5,utf8_decode(utf8_encode($rst[\"subarea\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('NHC: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(20,5,utf8_decode(utf8_encode($NHC)),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('CEDULA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(20,5,utf8_decode(utf8_encode($rst[\"cedula\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('PACIENTE: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(90,5,utf8_decode(utf8_encode($rst[\"paciente\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('SEXO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(60,5,utf8_decode(utf8_encode($rst[\"sexo\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('ESTADO CIVIL: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(30,5,utf8_decode(utf8_encode($rst[\"estadocivil\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('TIPO SANGRE: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(20,5,utf8_decode(utf8_encode($rst[\"tiposangre\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('PROVINCIA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(40,5,utf8_decode(utf8_encode($rst[\"provincia\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('CANTON: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(40,5,utf8_decode(utf8_encode($rst[\"canton\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('PARROQUIA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(40,5,utf8_decode(utf8_encode($rst[\"parroquia\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('DIRECCION: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(60,5,utf8_decode(utf8_encode($rst[\"direccion\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('TELEFONO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(25,5,utf8_decode(utf8_encode($rst[\"telefono\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('CELULAR: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(25,5,utf8_decode(utf8_encode($rst[\"celular\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(40,5,utf8_decode('FECHA NACIMIENTO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(65,5,utf8_decode(utf8_encode($rst[\"fechanacimiento\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('EM@IL: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(55,5,utf8_decode(utf8_encode($rst[\"email\"])),1,1,'L',0);\r\n\r\n $pdf->Ln(4);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(15,5,utf8_decode('TALLA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"talla\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(15,5,utf8_decode('PESO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"peso\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(15,5,utf8_decode('GRASA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"grasa\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(40,5,utf8_decode('PRESION ARTERIAL: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"presionarterial\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('TEMPERATURA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"temperatura\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(15,5,utf8_decode('PULSO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"pulso\"])),1,1,'C',0);\r\n\r\n $pdf->Ln(4);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(0,5,utf8_decode('MOTIVO CONSULTA: '),0,1,'L',0);\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->MultiCell(0, 5, $rst[\"motivoconsulta\"], 1, \"J\", 0);\r\n\r\n $pdf->Ln(2);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(0,5,utf8_decode('EXAMEN FISICO: '),0,1,'L',0);\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->MultiCell(0, 5, $rst[\"examenfisico\"], 1, \"J\", 0);\r\n\r\n $pdf->Ln(2);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(0,5,utf8_decode('TRATAMIENTO: '),0,1,'L',0);\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->MultiCell(0, 5, $rst[\"tratamiento\"], 1, \"J\", 0);\r\n\r\n $pdf->Ln(2);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(0,5,utf8_decode('OBSERVACIONES: '),0,1,'L',0);\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->MultiCell(0, 5, $rst[\"observaciones\"], 1, \"J\", 0);\r\n\r\n //Fecha Impresion\r\n $pdf->Ln(1);\r\n $pdf->SetFont('Arial','B',6);\r\n $pdf->Cell(20,4,utf8_decode('Fecha Impresión:'),0,0,'L',0);\r\n $pdf->SetFont('Arial','',6);\r\n $pdf->Cell(20,4,\" \".utf8_decode($fechaimpresion),0,1,'L',0);\r\n\r\n// $pdf->Ln(260 - $pdf->GetY());\r\n\r\n\r\n for($x = 0; $x < (260 - $pdf->GetY()); $x++){\r\n $pdf->Ln(10);\r\n }\r\n\r\n// $salto = 270 - $pdf->GetY();\r\n// $pdf->Cell(0,$salto,\"\",1,1,'L',0);\r\n\r\n $pdf->setAutoPagebreak(true,50);\r\n\r\n endforeach;\r\n\r\n\r\n }else{\r\n //Set x and y position for the main text, reduce font size and write content\r\n $pdf->SetXY (30,100);\r\n $pdf->SetFontSize(8);\r\n $pdf->Write(5,utf8_decode(' No existe Informacion registrada'));\r\n }\r\n\r\n //Pie Pagina\r\n $pdf->Footer();\r\n\r\n //Para poner la Pagina 1/(1...n)\r\n $pdf->AliasNbPages();\r\n\r\n //Output the document\r\n $fecha = date(\"YmdHis\").'.pdf';\r\n $pdf->Output($fecha,'D');\r\n\r\n }", "title": "" }, { "docid": "2650a80d915fd1e33591691d71213b65", "score": "0.60894156", "text": "public function getStrRptHistoriaClinicaPacienteGeneral()\r\n {\r\n define('FPDF_FONTPATH',FONT_PATH);\r\n include_once ( CLASS_PATH . \"class.clfpdf.php\" );\r\n\r\n //Limpia el buffer si no sale un error\r\n ob_end_clean();\r\n\r\n $fechaimpresion = date(\"Y/m/d H:i:s a\");\r\n\r\n\r\n //create a FPDF object\r\n $pdf = new FPDF('P' , 'mm' , 'A4');\r\n\r\n //set document properties\r\n $pdf->SetAuthor('CPCH - KOICA');\r\n $pdf->SetTitle('Recibo Servicio');\r\n\r\n //encabezado\r\n $pdf->setStrTipoEncabezado(10);\r\n $pdf->Header();\r\n //\r\n //Envia a otra pagina\r\n $pdf->setAutoPagebreak(true,'');\r\n\r\n //set font for the entire document\r\n $pdf->SetFont('Arial','B',35);\r\n $pdf->SetTextColor(50,60,100);\r\n\r\n //set up a page\r\n $pdf->AddPage('P');\r\n $pdf->SetDisplayMode(75,'default');\r\n\r\n //insert an image and make it a link\r\n //$pdf->Image('logo.png',10,20,33,0,' ','http://www.fpdf.org/');\r\n\r\n $query = new clQuery();\r\n\r\n //Nombre Procedimientos Almacenados\r\n $ProcedimientoAlmacenado = sprintf(\"CALL sprpthistoriaclinicapacientegeneral('%d');\", $this->getStrNumeroHistoriaClinicaPaciente());\r\n $query->setStrProcedimientoAlmacenado($ProcedimientoAlmacenado);\r\n $resultado = $query->getStrSqlSelect();\r\n\r\n if( count($resultado) > 0 ) {\r\n foreach( $resultado as $rst):\r\n $pdf->Ln(2);\r\n\r\n $NHC = \"\";\r\n switch (strlen($rst[\"nhc\"])){\r\n case 1:\r\n $NHC = \"0000\".$rst[\"nhc\"];\r\n break;\r\n case 2:\r\n $NHC = \"000\".$rst[\"nhc\"];\r\n break;\r\n case 3:\r\n $NHC = \"00\".$rst[\"nhc\"];\r\n break;\r\n case 4:\r\n $NHC = \"0\".$rst[\"nhc\"];\r\n break;\r\n default:\r\n $NHC = $rst[\"nhc\"];\r\n break;\r\n }\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('MEDICO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(100,5,utf8_decode(utf8_encode($rst[\"medico\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('FECHA VISITA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(40,5,utf8_decode(utf8_encode($rst[\"fechahistoriaclinica\"])),1,1,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('SERVICIO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(60,5,utf8_decode(utf8_encode($rst[\"departamento\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('UNIDAD: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(50,5,utf8_decode(utf8_encode($rst[\"unidad\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('EDADES: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(20,5,utf8_decode(utf8_encode($rst[\"subarea\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('NHC: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(20,5,utf8_decode(utf8_encode($NHC)),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('CEDULA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(20,5,utf8_decode(utf8_encode($rst[\"cedula\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('PACIENTE: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(90,5,utf8_decode(utf8_encode($rst[\"paciente\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('SEXO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(60,5,utf8_decode(utf8_encode($rst[\"sexo\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('ESTADO CIVIL: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(30,5,utf8_decode(utf8_encode($rst[\"estadocivil\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('TIPO SANGRE: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(20,5,utf8_decode(utf8_encode($rst[\"tiposangre\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('PROVINCIA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(40,5,utf8_decode(utf8_encode($rst[\"provincia\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('CANTON: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(40,5,utf8_decode(utf8_encode($rst[\"canton\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('PARROQUIA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(40,5,utf8_decode(utf8_encode($rst[\"parroquia\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(20,5,utf8_decode('DIRECCION: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(60,5,utf8_decode(utf8_encode($rst[\"direccion\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('TELEFONO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(25,5,utf8_decode(utf8_encode($rst[\"telefono\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('CELULAR: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(25,5,utf8_decode(utf8_encode($rst[\"celular\"])),1,1,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(40,5,utf8_decode('FECHA NACIMIENTO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(65,5,utf8_decode(utf8_encode($rst[\"fechanacimiento\"])),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('EM@IL: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(55,5,utf8_decode(utf8_encode($rst[\"email\"])),1,1,'L',0);\r\n\r\n $pdf->Ln(4);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(15,5,utf8_decode('TALLA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"talla\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(15,5,utf8_decode('PESO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"peso\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(15,5,utf8_decode('GRASA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"grasa\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(40,5,utf8_decode('PRESION ARTERIAL: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"presionarterial\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(30,5,utf8_decode('TEMPERATURA: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"temperatura\"])),1,0,'C',0);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(15,5,utf8_decode('PULSO: '),1,0,'L',0);\r\n\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"pulso\"])),1,1,'C',0);\r\n\r\n $pdf->Ln(4);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(0,5,utf8_decode('MOTIVO CONSULTA: '),0,1,'L',0);\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->MultiCell(0, 5, $rst[\"motivoconsulta\"], 1, \"J\", 0);\r\n\r\n $pdf->Ln(2);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(0,5,utf8_decode('EXAMEN FISICO: '),0,1,'L',0);\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->MultiCell(0, 5, $rst[\"examenfisico\"], 1, \"J\", 0);\r\n\r\n $pdf->Ln(2);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(0,5,utf8_decode('TRATAMIENTO: '),0,1,'L',0);\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->MultiCell(0, 5, $rst[\"tratamiento\"], 1, \"J\", 0);\r\n\r\n $pdf->Ln(2);\r\n\r\n $pdf->SetFont('Arial','B',9);\r\n $pdf->Cell(0,5,utf8_decode('OBSERVACIONES: '),0,1,'L',0);\r\n $pdf->SetFont('Arial','',8);\r\n $pdf->MultiCell(0, 5, $rst[\"observaciones\"], 1, \"J\", 0);\r\n\r\n //Fecha Impresion\r\n $pdf->Ln(1);\r\n $pdf->SetFont('Arial','B',6);\r\n $pdf->Cell(20,4,utf8_decode('Fecha Impresión:'),0,0,'L',0);\r\n $pdf->SetFont('Arial','',6);\r\n $pdf->Cell(20,4,\" \".utf8_decode($fechaimpresion),0,1,'L',0);\r\n\r\n// $pdf->Ln(260 - $pdf->GetY());\r\n\r\n\r\n for($x = 0; $x < (260 - $pdf->GetY()); $x++){\r\n $pdf->Ln(10);\r\n }\r\n\r\n// $salto = 270 - $pdf->GetY();\r\n// $pdf->Cell(0,$salto,\"\",1,1,'L',0);\r\n\r\n $pdf->setAutoPagebreak(true,50);\r\n\r\n endforeach;\r\n\r\n\r\n }else{\r\n //Set x and y position for the main text, reduce font size and write content\r\n $pdf->SetXY (30,100);\r\n $pdf->SetFontSize(8);\r\n $pdf->Write(5,utf8_decode(' No existe Informacion registrada'));\r\n }\r\n\r\n //Pie Pagina\r\n $pdf->Footer();\r\n\r\n //Para poner la Pagina 1/(1...n)\r\n $pdf->AliasNbPages();\r\n\r\n //Output the document\r\n $fecha = date(\"YmdHis\").'.pdf';\r\n $pdf->Output($fecha,'D');\r\n\r\n }", "title": "" }, { "docid": "537012138a876ca64d99f4266b945362", "score": "0.60823095", "text": "public function reportes()\n {\n return view('backend.administracion.acopio.acopio_miel.reportes.index');\n }", "title": "" }, { "docid": "5bdde2f50af43f30255ba9aec082e1fa", "score": "0.60799116", "text": "function verComisionesCobranzaPagadasPeriodo($Inicio,$Fin){\n\t\t$arreglo = array(\"success\"=>\"false\",\"data\"=>\"\",\"error\"=>\"No hay registros\");\n\t\t$db = getConexionTda();\n\t\t$sRetorno ='';\n\t\tif ($db->getError() == '') {\n\t\t\t$rs = $db->query(\"SELECT * FROM fn_comisionespagadasporcobranza_select('$Inicio'::DATE,'$Fin'::DATE) ORDER BY num_ejecutivo;\");\n\t\t\tif ($db->getError() != \"\") {\n\t\t\t\t$sRetorno =$db->getError();\n\t\t\t\t$arreglo['success'] = false;\n\t\t\t\t$arreglo['error'] = $sRetorno;\n\t\t\t}else{\n\t\t\t\t$i = 0;\n\t\t\t\t$iEncabezado = 0;\n\t\t\t\t$opcion = '';\n\t\t\t\t$pagina1 = 19;\n\t\t\t\tforeach ($rs AS $valor) {\n\t\t\t\t\tif ($iEncabezado == 0){\n\t\t\t\t\t\t$iEncabezado = 1;\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$opcion .= '<div class=\"table-responsive\"></tr>';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$vColonia ='';\n\t\t\t\t\tif ($valor['colonia'] !=''){\n\t\t\t\t\t\t$vColoniaArray = explode( ' - ', $valor['colonia']);\n\t\t\t\t\t\t$vColonia = ISSET($vColoniaArray[1])?$vColoniaArray[1]:'';\n\t\t\t\t\t}\n\t\t\t\t\t$vTotal = $valor['total'];\n\t\t\t\t\t$opcion .= '<tr id=row_'.$valor['num_foliopedido'].'><td><table cellspacing=\"0\" cellpadding=\"0\" class=\"table-condensed\" style=\"width:100%;margin: 0px 0px 0px 0px;padding:0px;border-spacing: 0px 0px;border: 0px;\"><tr>';\n\t\t\t\t\t//$opcion .= '<tr id=\"'.$valor['num_foliopedido'].'\" title=\"'.$valor['num_foliopedido'].'\"><td><table cellspacing=\"0\" cellpadding=\"0\" class=\"table-condensed\" style=\"width:100%;margin: 0px 0px 0px 0px;padding:0px;border-spacing: 0px 0px;border: 0px;\"></td><tr>';\n\t\t\t\t\t$opcion .= '<td name=\"detalle\" style=\"font-family:Arial;font-size:11px;\"><span><strong>ARTICULOS:</strong>&nbsp;<label id=\"detalle\">'.$valor['detallepedido'].'</label>&nbsp;</span>.&nbsp; TOTAL $<label id=\"detalle\">'.$valor['total'].'</label>';\n\t\t\t\t\t$opcion .= '</br><label id=\"calle\"><strong>DOMICILIO:</strong>&nbsp;'.$valor['calle'].'</label>&nbsp;<label id=\"numero_ext\">'.$valor['numext'].'</label>&nbsp;<label id=\"numero_int\">'.$valor['numint'].'</label>,&nbsp;<label id=\"colonia\"><strong>&nbsp;'.$vColonia.'</strong></label><span style=\"font-size: 9px;\"> <label id=\"referencias\">'.$valor['referencias'].'.</span></label>&nbsp;';\n\t\t\t\t\t$opcion .= '</br><label id=\"nombre\" class=\"semi-bold\"><strong>CLIENTE:</strong>&nbsp;'.$valor['nombrecte'].' '.$valor['apellidocte'].'</label>&nbsp;|&nbsp;&nbsp;<label id=\"ciudad\">'.$valor['telefonocasa'].'&nbsp;/&nbsp;'.$valor['telefonocelular'].'</label>|&nbsp;FOLIO:&nbsp;<label id=\"folio\">'.$valor['num_foliopedido'].'</label>';\t\n\t\t\t\t\t$opcion .= '</br><strong>FECHA:</strong>&nbsp;<label id=\"fecha_venta\">'.$valor['fecha_venta'].'</label>&nbsp;|&nbsp;<strong>TIPO PAGO:</strong>&nbsp;<label id=\"tipopago\">'.$valor['nom_tipopago'].'</label>';\n\t\t\t\t\t$opcion .= '&nbsp;|&nbsp;<strong>PLAZO:</strong>&nbsp;<label id=\"plazo\">'.$valor['nom_plazo'].'</label>';\n\t\t\t\t\t$opcion .= '&nbsp;|&nbsp;<strong>COBRO:</strong>&nbsp;<label id=\"plazo\">'.$valor['nom_periodocobro'].'</label>';\n\t\t\t\t\t$opcion .= '</br><strong>VENDEDOR:</strong>&nbsp;<label id=\"nom_ejecutivo\">'.$valor['nom_ejecutivo'].'</label>';\n\t\t\t\t\t$opcion .= '|&nbsp;<strong>SUPERVISOR:</strong>&nbsp;<label id=\"nom_supervisor\">'.$valor['nom_supervisor'].'</label>';\n\t\t\t\t\t$opcion .= '|&nbsp;<strong>JEFE GPO:</strong>&nbsp;<label id=\"nom_jefegpo\">'.$valor['nom_jefegpo'].'</label>';\n\t\t\t\t\t$opcion .='</td>';\n\t\t\t\t\t\n\t\t\t\t\t$opcion .= '<td class=\"pull-right\" name=\"controles\" id=\"controles_'.$valor['num_foliopedido'].'\" ><div class=\"btn-group-vertical\">';\n\t\t\t\t\t$opcion .= '<label id=\"num_clientecomision\" class=\"bold\" style=\"display:none\">'.$valor['num_ejecutivo'].'</label><br>';\n\t\t\t\t\t$opcion .= 'VENDEDOR:<label id=\"nom_clientecomision\" class=\"bold\">'.$valor['nom_ejecutivo'].'</label><br>';\n\t\t\t\t\t$opcion .= 'COMISIÓN:$<label id=\"total_comision\" class=\"semi-bold\">'.$valor['comision'].'</label><br>';\n\t\t\t\t\t$opcion .= '<button type=\"button\" title=\"Imprimir comprobante\" class=\"btn btn-info btn-xs noMostrarPrint\" name=\"'.$valor['num_foliopedido'].'\" onclick=RedirectPage(\"#ajax/imprimir_comprobantepedido.php?f='.$valor['num_foliopedido'].'&n='.$vTotal.'\"); id=\"smart-mod-eg1\"><i class=\"fa fa-edit\">&nbsp;</i>Factura</button>';\n\t\t\t\t\t/*$opcion .= '<button type=\"button\" title=\"Cancelar el pedido\" class=\"btn btn-info btn-xs noMostrarPrint\" name=\"'.$valor['num_foliopedido'].'\" href=\"javascript:void(0);\" id=\"smart-mod-eg1\" onclick=\"MensajeSmartModPedidos('.$valor['num_foliopedido'].',2);\"><i class=\"fa fa-trash-o\">&nbsp;</i>Cancelar</button><br/>';\n\t\t\t\t\t$opcion .= '<a id=\"recibirpedido\" href=\"#ajax/modal_abonos.php?id='.$valor['num_foliopedido'].'\" title=\"Recibe abonos y mercancias\" type=\"button\" class=\"btn btn-primary btn-xs noMostrarPrint\"><i class=\"fa fa-edit\">&nbsp;</i>Recibir</a><br/>';\n\t\t\t\t\t$opcion .= '<button type=\"button\" title=\"Imprimir comprobante\" class=\"btn btn-info btn-xs noMostrarPrint\" name=\"'.$valor['num_foliopedido'].'\" onclick=RedirectPage(\"#ajax/imprimir_comprobantepedido.php?f='.$valor['num_foliopedido'].'&n='.$vTotal.'\"); id=\"smart-mod-eg1\"><i class=\"fa fa-edit\">&nbsp;</i>Comprobante</button></div>';*/\n\t\t\t\t\t\n\t\t\t\t\t$opcion .= '</td><tr/>';\n\t\t\t\t\t$opcion .= '<hr style=\"margin:0px 0px 0px 0px;padding:0px;\"></table>';\n\t\t\t\t\tif ($i == $pagina1){\n\t\t\t\t\t\t$pagina1 = 21;\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t$opcion .= '<br/><br/>';\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$opcion .= '</tr></div>';\n\t\t\t\t\n\t\t\t\t$arreglo['success'] = true;\n\t\t\t\t$arreglo['data'] = $opcion;\n\t\t\t\t$arreglo['error'] = '';\n\t\t\t}\n\t\t} else {\n\t\t\t$sRetorno =$db->getError();\n\t\t\t$arreglo['success'] = false;\n\t\t\t$arreglo['error'] = $sRetorno;\n\t\t}\n\t\tcloseConexion($db);\n\t\treturn $arreglo;\n\t}", "title": "" }, { "docid": "5d0485277ed406ba9aa412066b052f68", "score": "0.6077316", "text": "public function actionIndex()\n {\n $tamanio_pagina=9;\n\n $modelSubirDoc = new SubirArchivo();\n $modelSubirDoc->extensions = 'pdf, docx';\n $modelSubirDoc->noRequired = true;\n\n $modelSubirDocHde = new SubirArchivo();\n $modelSubirDocHde->extensions = 'pdf, docx';\n $modelSubirDocHde->noRequired = true;\n\n $modelSubirDocFactura = new SubirArchivo();\n $modelSubirDocFactura->extensions = 'pdf, zip';\n $modelSubirDocFactura->noRequired = true;\n\n $modelSubirDocFacturaXML = new SubirArchivo();\n $modelSubirDocFacturaXML->extensions = 'xml, zip';\n $modelSubirDocFacturaXML->noRequired = true;\n\n $datos = Yii::$app->request->get();\n $connection = \\Yii::$app->db;\n\n $sql = $connection->createCommand(\" select\n a.PK_ASIGNACION,\n e.NOMBRE_EMP,\n e.PK_EMPLEADO,\n e.APELLIDO_PAT_EMP,\n a.NOMBRE,\n a.TARIFA,\n a.HORAS,\n a.FECHA_INI,\n a.FECHA_FIN,\n a.MONTO,\n c.NOMBRE_CLIENTE,\n c.PK_CLIENTE,\n c.HORAS_ASIGNACION,\n c.RFC,\n a.FK_ESTATUS_ASIGNACION,\n cont.NOMBRE_CONTACTO,\n t.PK_CAT_TARIFA,\n t.DESC_TARIFA\n from tbl_asignaciones a\n left join tbl_clientes c\n on a.FK_CLIENTE = c.PK_CLIENTE\n inner join tbl_cat_contactos cont\n on a.FK_CONTACTO = cont.PK_CONTACTO\n left join tbl_empleados e\n on a.FK_EMPLEADO = e.PK_EMPLEADO\n left join tbl_cat_tarifas t\n on t.PK_CAT_TARIFA = a.FK_CAT_TARIFA\n where a.PK_ASIGNACION = \".($datos['id']))->queryOne();\n\n $modelUnidadNegocio = $connection->createCommand(\"select\n a.PK_ASIGNACION,\n u.PK_UNIDAD_NEGOCIO,\n u.DESC_UNIDAD_NEGOCIO\n from tbl_asignaciones a\n inner join tbl_cat_unidades_negocio u\n on a.PK_ASIGNACION =\".($datos['id']).\n \" and a.FK_UNIDAD_NEGOCIO = u.PK_UNIDAD_NEGOCIO\")->queryOne();\n\n $modelComentariosAsignaciones3= TblBitComentariosAsignaciones::find()->where(['FK_ASIGNACION'=>$sql['PK_ASIGNACION']])->andWhere(['=','FK_ESTATUS_ASIGNACION',5])->orderBy(['FECHA_FIN' => SORT_ASC])->asArray()->all();\n $modeloDocumentos = new TblDocumentos;\n $modeloDocumentosXML = new TblDocumentos;\n $modeloHde = new TblDocumentos;\n $modeloFactura = new TblFacturas;\n $mesPeriodo = '';\n $facturaNuevaModifica = '';\n\n if ($modeloDocumentos->load(Yii::$app->request->post())) {\n $datos = Yii::$app->request->get();\n $data = Yii::$app->request->post();\n\n $pk_documento_factura = '';\n $pk_documento_factura_xml='';\n $facturaNueva = 'false';\n\n //Condición sólo para documentos de tipo 'FACTURA'.\n\n if($data['TblDocumentos']['FK_TIPO_DOCUMENTO'] == 4) {\n $modelSubirDocFactura->file = UploadedFile::getInstance($modelSubirDocFactura, '[7]file');\n if (!empty($modelSubirDocFactura->file)) {\n $fechaHoraHoy = date('YmdHis');\n $rutaGuardado = '../uploads/DocumentosPeriodos/';\n $nombreFisico = $fechaHoraHoy.'_'.quitar_acentos(utf8_decode($modelSubirDocFactura->file->basename));\n $nombreBD = quitar_acentos(utf8_decode($modelSubirDocFactura->file->basename));\n $extension = $modelSubirDocFactura->upload($rutaGuardado,$nombreFisico);\n $rutaDoc = '/uploads/DocumentosPeriodos/';\n $pk_documento_factura='';\n $facturaNueva = 'true';\n }else{\n $pk_documento_factura= (isset($data['pk_documento_factura'])&&!empty($data['pk_documento_factura']))?$data['pk_documento_factura']:'';\n }\n $modelSubirDocFacturaXML->file = UploadedFile::getInstance($modelSubirDocFacturaXML, '[8]file');\n if (!empty($modelSubirDocFacturaXML->file)) {\n $fechaHoraHoyXML = date('YmdHis');\n $rutaGuardadoXML = '../uploads/DocumentosPeriodos/';\n $nombreFisicoXML = $fechaHoraHoyXML.'_'.quitar_acentos(utf8_decode($modelSubirDocFacturaXML->file->basename));\n $nombreBDXML = quitar_acentos(utf8_decode($modelSubirDocFacturaXML->file->basename));\n $extensionXML = $modelSubirDocFacturaXML->upload($rutaGuardadoXML,$nombreFisicoXML);\n $rutaDocXML = '/uploads/DocumentosPeriodos/';\n $pk_documento_factura_xml='';\n }\n else{\n $pk_documento_factura_xml= (isset($data['pk_documento_factura_xml'])&&!empty($data['pk_documento_factura_xml']))?$data['pk_documento_factura_xml']:'';\n }\n\n if(isset($data['periodo'])){\n foreach ($data['periodo'] as $key => $value) {\n $pk_periodo_factura = $value;\n $facturaNuevaModifica = TblPeriodos::find()->where(['PK_PERIODO' => $pk_periodo_factura])->limit(1)->one();\n // $pk_documento_factura= $facturaNuevaModifica->FK_DOCUMENTO_FACTURA;\n // INICIO HRIBI 02/08/2016- array para concatenar en el asunto del correo, el nombre del(os) mes(es) perteneciente(s) al periodo donde se guarda el documento de Factura.\n $mesPeriodo = $mesPeriodo.(date(\"m\",strtotime($facturaNuevaModifica->FECHA_INI)).',');\n // FIN HRIBI\n\n /**\n * Se crea una nueva factura\n */\n if($facturaNuevaModifica->FK_DOCUMENTO_FACTURA==null&&empty($pk_documento_factura)){\n $facturaNueva = 'true';\n $modeloDocumentos->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->NUM_SP = isset($data['numSPFactura']) ? $data['numSPFactura'] : null;\n //$modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_ASIGNACION = $datos['id'];\n $modeloDocumentos->FK_TIPO_DOCUMENTO = isset($data['TblDocumentos']['FK_TIPO_DOCUMENTO']) ? $data['TblDocumentos']['FK_TIPO_DOCUMENTO'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n $modeloDocumentos->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modeloDocumentos->FK_CLIENTE = $data['FK_CLIENTE'];\n $modeloDocumentos->CONSECUTIVO_TIPO_DOC = $data['consecutivo'];\n\n if (!empty($modelSubirDocFactura->file)) {\n $modeloDocumentos->NOMBRE_DOCUMENTO = $nombreBD.'.'.$extension;\n $modeloDocumentos->DOCUMENTO_UBICACION = $rutaDoc.$nombreFisico.'.'.$extension;\n }\n\n $modeloDocumentos->save(false);\n\n $modeloDocumentosXML->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentosXML->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentosXML->NUM_SP = isset($data['numSPFactura']) ? $data['numSPFactura'] : null;\n //$modeloDocumentosXML->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentosXML->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentosXML->FK_ASIGNACION = $datos['id'];\n $modeloDocumentosXML->FK_TIPO_DOCUMENTO = 5;\n $modeloDocumentosXML->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n $modeloDocumentosXML->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modeloDocumentosXML->FK_CLIENTE = $data['FK_CLIENTE'];\n $modeloDocumentosXML->CONSECUTIVO_TIPO_DOC = $data['consecutivo'];\n\n if (!empty($modelSubirDocFacturaXML->file)) {\n $modeloDocumentosXML->NOMBRE_DOCUMENTO = $nombreBDXML.'.'.$extensionXML;\n $modeloDocumentosXML->DOCUMENTO_UBICACION = $rutaDocXML.$nombreFisicoXML.'.'.$extensionXML;\n }\n $modeloDocumentosXML->save(false);\n\n $modelSeguimiento = new TblAsignacionesSeguimiento;\n $modelSeguimiento->COMENTARIOS = 'Modificaci&oacute;n de documento Factura_'.$modeloDocumentos->NUM_DOCUMENTO.'_'.obtener_nombre_mes(date('m',strtotime($facturaNuevaModifica->FECHA_INI))).date('Y',strtotime($facturaNuevaModifica->FECHA_INI));\n $modelSeguimiento->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modelSeguimiento->FK_ASIGNACION = $modeloDocumentos->FK_ASIGNACION;\n $modelSeguimiento->FK_USUARIO = user_info()['PK_USUARIO'];\n $modelSeguimiento->save(false);\n\n $pk_documento_factura= $modeloDocumentos->PK_DOCUMENTO;\n $pk_documento_factura_xml= $modeloDocumentosXML->PK_DOCUMENTO;\n\n $modeloFactura->FK_PERIODO = $pk_periodo_factura;\n $modeloFactura->FK_DOC_FACTURA = $pk_documento_factura;\n $modeloFactura->FECHA_EMISION = !empty($data['TblFacturas']['FECHA_EMISION']) ? transform_date($data['TblFacturas']['FECHA_EMISION'],'Y-m-d') : null;\n $modeloFactura->FECHA_ENTREGA_CLIENTE = !empty($data['TblFacturas']['FECHA_ENTREGA_CLIENTE']) ? transform_date($data['TblFacturas']['FECHA_ENTREGA_CLIENTE'],'Y-m-d') : null;\n $modeloFactura->FECHA_INGRESO_BANCO = !empty($data['TblFacturas']['FECHA_INGRESO_BANCO']) ? transform_date($data['TblFacturas']['FECHA_INGRESO_BANCO'],'Y-m-d') : null;\n $modeloFactura->FECHA_RECEPCION_IR = !empty($data['TblFacturas']['FECHA_RECEPCION_IR']) ? transform_date($data['TblFacturas']['FECHA_RECEPCION_IR'],'Y-m-d') : null;\n //$modeloFactura->FACTURA_PROVISION = 2;//isset($data['TblFacturas']['FACTURA_PROVISION']) ? $data['TblFacturas']['FACTURA_PROVISION'] : null;\n $modeloFactura->CONTACTO_ENTREGA = isset($data['TblFacturas']['CONTACTO_ENTREGA']) ? $data['TblFacturas']['CONTACTO_ENTREGA'] : null;\n $modeloFactura->FK_SERVICIO = 1;\n $modeloFactura->NUMERO_IR = isset($data['TblFacturas']['NUMERO_IR']) ? $data['TblFacturas']['NUMERO_IR'] : null;\n $modeloFactura->FK_ESTATUS = 1;\n $modeloFactura->FK_PORCENTAJE = 1;\n $modeloFactura->TOTAL_FACTURABLE = $data['total_facturable'][$pk_periodo_factura];\n $modeloFactura->COMENTARIOS = isset($data['comentariosFactura']) ? $data['comentariosFactura'] : null;\n $modeloFactura->save(false);\n //Bitacora para crear nuevo registro de un Documento Factura en Periodos.\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentos->FK_ASIGNACION.', TIPO_DOCUMENTO=FACTURA, NUM_DOCUMENTO='.$modeloDocumentos->NUM_DOCUMENTO.', FK_CLIENTE='.$data['FK_CLIENTE'];\n user_log_bitacora($descripcionBitacora,'Modificar Documento Factura en Periodos',$pk_periodo_factura);\n\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentosXML->FK_ASIGNACION.', TIPO_DOCUMENTO=XML, NUM_DOCUMENTO='.$modeloDocumentosXML->NUM_DOCUMENTO.', FK_CLIENTE='.$data['FK_CLIENTE'];\n user_log_bitacora($descripcionBitacora,'Modificar Documento XML en Periodos',$pk_documento_factura_xml);\n\n $descripcionBitacora = 'FK_DOC_FACTURA='.$modeloFactura->FK_DOC_FACTURA.', FECHA_ENTREGA_CLIENTE='.$modeloFactura->FECHA_ENTREGA_CLIENTE.', COMENTARIOS='.$modeloFactura->COMENTARIOS;\n user_log_bitacora($descripcionBitacora,'Cargar Información de Factura',$modeloFactura->FK_PERIODO);\n\n }else{\n /**\n * Se modifica una factura ya existente\n */\n\n if(empty($pk_documento_factura)){\n // $modelSubirDocFactura->file = UploadedFile::getInstance($modelSubirDocFactura, '[7]file');\n if (!empty($modelSubirDocFactura->file)) {\n $modeloDocumentos = new TblDocumentos;\n $modeloDocumentos->CONSECUTIVO_TIPO_DOC = $data['consecutivo'];\n $modeloDocumentos->FK_ASIGNACION = $datos['id'];\n $modeloDocumentos->NOMBRE_DOCUMENTO = $nombreBD.'.'.$extension;\n $modeloDocumentos->DOCUMENTO_UBICACION = $rutaDoc.$nombreFisico.'.'.$extension;\n $modeloDocumentos->FK_TIPO_DOCUMENTO = isset($data['TblDocumentos']['FK_TIPO_DOCUMENTO']) ? $data['TblDocumentos']['FK_TIPO_DOCUMENTO'] : null;\n }else{\n $modeloDocumentos = TblDocumentos::findOne($facturaNuevaModifica->FK_DOCUMENTO_FACTURA);\n }\n\n $modeloDocumentos->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n //$modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n\n\n $modeloDocumentos->save(false);\n\n //Bitacora para modificación de Documento Factura en Periodos.\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentos->FK_ASIGNACION.', TIPO_DOCUMENTO=FACTURA, NUM_DOCUMENTO='.$modeloDocumentos->NUM_DOCUMENTO.', FK_CLIENTE='.$modeloDocumentos->FK_CLIENTE;\n user_log_bitacora($descripcionBitacora,'Cargar Documento Factura en Periodos',$facturaNuevaModifica->FK_DOCUMENTO_FACTURA);\n\n $modelSeguimiento = new TblAsignacionesSeguimiento;\n $modelSeguimiento->COMENTARIOS = 'Cargar de documento Factura_'.$modeloDocumentos->NUM_DOCUMENTO.'_'.obtener_nombre_mes(date('m',strtotime($facturaNuevaModifica->FECHA_INI))).date('Y',strtotime($facturaNuevaModifica->FECHA_INI));\n $modelSeguimiento->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modelSeguimiento->FK_ASIGNACION = $modeloDocumentos->FK_ASIGNACION;\n $modelSeguimiento->FK_USUARIO = user_info()['PK_USUARIO'];\n $modelSeguimiento->save(false);\n\n $pk_documento_factura = $modeloDocumentos->PK_DOCUMENTO;\n\n }else{/*Si al actualizar no se esta dando de alta un documento nuevo, se modifican los datos del documento ya existente*/\n\n $modeloDocumentos = TblDocumentos::findOne($pk_documento_factura);\n\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->save(false);\n\n //Bitacora para modificación de Documento Factura en Periodos.\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentos->FK_ASIGNACION.', TIPO_DOCUMENTO=FACTURA, NUM_DOCUMENTO='.$modeloDocumentos->NUM_DOCUMENTO.', FK_CLIENTE='.$modeloDocumentos->FK_CLIENTE;\n user_log_bitacora($descripcionBitacora,'Actualiza Documento Factura en Periodos',$facturaNuevaModifica->FK_DOCUMENTO_FACTURA);\n\n $modelSeguimiento = new TblAsignacionesSeguimiento;\n $modelSeguimiento->COMENTARIOS = 'Modificación de documento Factura_'.$modeloDocumentos->NUM_DOCUMENTO.'_'.obtener_nombre_mes(date('m',strtotime($facturaNuevaModifica->FECHA_INI))).date('Y',strtotime($facturaNuevaModifica->FECHA_INI));\n $modelSeguimiento->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modelSeguimiento->FK_ASIGNACION = $modeloDocumentos->FK_ASIGNACION;\n $modelSeguimiento->FK_USUARIO = user_info()['PK_USUARIO'];\n $modelSeguimiento->save(false);\n }\n\n if(empty($pk_documento_factura_xml)){\n if (!empty($modelSubirDocFacturaXML->file)) {\n $modeloDocumentosXML = new TblDocumentos;\n $modeloDocumentosXML->CONSECUTIVO_TIPO_DOC = $data['consecutivo'];\n $modeloDocumentosXML->FK_ASIGNACION = $datos['id'];\n $modeloDocumentosXML->NOMBRE_DOCUMENTO = $nombreBDXML.'.'.$extensionXML;\n $modeloDocumentosXML->DOCUMENTO_UBICACION = $rutaDocXML.$nombreFisicoXML.'.'.$extensionXML;\n $modeloDocumentosXML->FK_TIPO_DOCUMENTO = 5;\n }else{\n $modeloDocumentosXML = TblDocumentos::findOne($facturaNuevaModifica->FK_DOCUMENTO_FACTURA_XML);\n }\n if($modeloDocumentosXML){\n $modeloDocumentosXML->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentosXML->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n //$modeloDocumentosXML->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentosXML->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentosXML->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n\n $modeloDocumentosXML->save(false);\n $pk_documento_factura_xml = $modeloDocumentosXML->PK_DOCUMENTO;\n }\n }\n\n $modeloFacturaUpd = TblFacturas::find()\n ->where(['=','FK_PERIODO', $pk_periodo_factura])\n //->andWhere(['=','FK_ESTATUS', '1'])\n //->andWhere(['=','FK_ESTATUS', '2'])\n ->limit(1)\n ->one();\n\n if($modeloFacturaUpd){\n $modeloFacturaUpd->FK_DOC_FACTURA = $pk_documento_factura;\n $modeloFacturaUpd->FECHA_EMISION = !empty($data['TblFacturas']['FECHA_EMISION']) ? transform_date($data['TblFacturas']['FECHA_EMISION'],'Y-m-d') : null;\n $modeloFacturaUpd->FECHA_ENTREGA_CLIENTE = !empty($data['TblFacturas']['FECHA_ENTREGA_CLIENTE']) ? transform_date($data['TblFacturas']['FECHA_ENTREGA_CLIENTE'],'Y-m-d') : null;\n $modeloFacturaUpd->FECHA_INGRESO_BANCO = !empty($data['TblFacturas']['FECHA_INGRESO_BANCO']) ? transform_date($data['TblFacturas']['FECHA_INGRESO_BANCO'],'Y-m-d') : null;\n $modeloFacturaUpd->FECHA_RECEPCION_IR = !empty($data['TblFacturas']['FECHA_RECEPCION_IR']) ? transform_date($data['TblFacturas']['FECHA_RECEPCION_IR'],'Y-m-d') : null;\n //$modeloFacturaUpd->FACTURA_PROVISION = 2;//isset($data['TblFacturas']['FACTURA_PROVISION']) ? $data['TblFacturas']['FACTURA_PROVISION'] : null;\n $modeloFacturaUpd->CONTACTO_ENTREGA = isset($data['TblFacturas']['CONTACTO_ENTREGA']) ? $data['TblFacturas']['CONTACTO_ENTREGA'] : null;\n $modeloFacturaUpd->FK_SERVICIO = 1;\n $modeloFacturaUpd->NUMERO_IR = isset($data['TblFacturas']['NUMERO_IR']) ? $data['TblFacturas']['NUMERO_IR'] : null;\n if($modeloFacturaUpd->FECHA_INGRESO_BANCO != null){\n $modeloFacturaUpd->FK_ESTATUS = 2;\n }else{\n $modeloFacturaUpd->FK_ESTATUS = 1;\n }\n $modeloFacturaUpd->TOTAL_FACTURABLE = $data['total_facturable'][$pk_periodo_factura];\n $modeloFacturaUpd->COMENTARIOS = isset($data['comentariosFactura']) ? $data['comentariosFactura'] : null;\n $modeloFacturaUpd->save(false);\n\n //Bitacora para modificación de registro en tblFacturas.\n $descripcionBitacora = 'FK_DOC_FACTURA='.$modeloFacturaUpd->FK_DOC_FACTURA.', FECHA_ENTREGA_CLIENTE='.$modeloFacturaUpd->FECHA_ENTREGA_CLIENTE.\n ', FECHA_INGRESO_BANCO='.$modeloFacturaUpd->FECHA_INGRESO_BANCO.', COMENTARIOS='.$modeloFacturaUpd->COMENTARIOS;\n user_log_bitacora($descripcionBitacora,'Modificar Información de Factura',$modeloFactura->FK_PERIODO);\n }else{\n $modeloFactura = new TblFacturas;\n $modeloFactura->FK_PERIODO = $pk_periodo_factura;\n $modeloFactura->FK_DOC_FACTURA = $pk_documento_factura;\n $modeloFactura->FECHA_EMISION = !empty($data['TblFacturas']['FECHA_EMISION']) ? transform_date($data['TblFacturas']['FECHA_EMISION'],'Y-m-d') : null;\n $modeloFactura->FECHA_ENTREGA_CLIENTE = !empty($data['TblFacturas']['FECHA_ENTREGA_CLIENTE']) ? transform_date($data['TblFacturas']['FECHA_ENTREGA_CLIENTE'],'Y-m-d') : null;\n $modeloFactura->FECHA_INGRESO_BANCO = !empty($data['TblFacturas']['FECHA_INGRESO_BANCO']) ? transform_date($data['TblFacturas']['FECHA_INGRESO_BANCO'],'Y-m-d') : null;\n $modeloFactura->FECHA_RECEPCION_IR = !empty($data['TblFacturas']['FECHA_RECEPCION_IR']) ? transform_date($data['TblFacturas']['FECHA_RECEPCION_IR'],'Y-m-d') : null;\n //$modeloFactura->FACTURA_PROVISION = 2;//isset($data['TblFacturas']['FACTURA_PROVISION']) ? $data['TblFacturas']['FACTURA_PROVISION'] : null;\n $modeloFactura->CONTACTO_ENTREGA = isset($data['TblFacturas']['CONTACTO_ENTREGA']) ? $data['TblFacturas']['CONTACTO_ENTREGA'] : null;\n $modeloFactura->FK_SERVICIO = 1;\n $modeloFactura->NUMERO_IR = isset($data['TblFacturas']['NUMERO_IR']) ? $data['TblFacturas']['NUMERO_IR'] : null;\n $modeloFactura->FK_ESTATUS = 1;\n $modeloFactura->FK_PORCENTAJE = 1;\n $modeloFactura->TOTAL_FACTURABLE = $data['total_facturable'][$pk_periodo_factura];\n $modeloFactura->COMENTARIOS = isset($data['comentariosFactura']) ? $data['comentariosFactura'] : null;\n $modeloFactura->save(false);\n\n //Bitacora para crear nuevo registro de un Documento Factura en Periodos.\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentos->FK_ASIGNACION.', TIPO_DOCUMENTO=FACTURA, NUM_DOCUMENTO='.$modeloDocumentos->NUM_DOCUMENTO.', FK_CLIENTE='.$data['FK_CLIENTE'];\n user_log_bitacora($descripcionBitacora,'Modificar Documento Factura en Periodos',$pk_periodo_factura);\n\n $descripcionBitacora = 'FK_DOC_FACTURA='.$modeloFactura->FK_DOC_FACTURA.', FECHA_ENTREGA_CLIENTE='.$modeloFactura->FECHA_ENTREGA_CLIENTE.', COMENTARIOS='.$modeloFactura->COMENTARIOS;\n user_log_bitacora($descripcionBitacora,'Cargar Información de Factura',$modeloFactura->FK_PERIODO);\n\n }\n }\n $modelPeriodosUpd = TblPeriodos::find()->where(['PK_PERIODO' => $pk_periodo_factura])->limit(1)->one();\n $modelPeriodosUpd->FK_DOCUMENTO_FACTURA = $pk_documento_factura;\n $modelPeriodosUpd->FK_DOCUMENTO_FACTURA_XML = $pk_documento_factura_xml;\n //$modelPeriodosUpd->TARIFA_FACTURA = $data['TblDocumentos']['TARIFA'];\n $modelPeriodosUpd->HORAS_FACTURA = $data['horas_factura'][$pk_periodo_factura];\n $modelPeriodosUpd->MONTO_FACTURA = $data['monto_factura'][$pk_periodo_factura];\n $modelPeriodosUpd->save(false);\n\n }\n }\n\n if(isset($nombreBD) && $facturaNueva = 'true'){\n $modeloDocumentoFactura = TblDocumentos::findOne($pk_documento_factura);\n $ubicacion_doc_factura = $modeloDocumentoFactura['DOCUMENTO_UBICACION'];\n $ubicacion_doc_factura_xml = '';\n\n if($pk_documento_factura_xml != null){\n $modeloDocumentoFacturaXML = TblDocumentos::findOne($pk_documento_factura_xml);\n $ubicacion_doc_factura_xml = $modeloDocumentoFacturaXML['DOCUMENTO_UBICACION'];\n }\n\n $arrayMeses = array(\"01\" => \"Enero\",\n \"02\" => \"Febrero\",\n \"03\" => \"Marzo\",\n \"04\" => \"Abril\",\n \"05\" => \"Mayo\",\n \"06\" => \"Junio\",\n \"07\" => \"Julio\",\n \"08\" => \"Agosto\",\n \"09\" => \"Septiembre\",\n \"10\" => \"Octubre\",\n \"11\" => \"Noviembre\",\n \"12\" => \"Diciembre\", );\n\n $is_pr = get_config('CONFIG','PRODUCCION');\n $de = get_config('PERIODOS','CORREO_REMITENTE_FACTURA');\n $prefix_correo = '';\n\n if($is_pr){\n\n $arr_validar_factura_btn= explode(',',get_config('PERIODOS','PARA_FACTURA_BTN'));\n\n //Valida que sea Unidad de negocio Banorte Monterrey\n if($modelUnidadNegocio['DESC_UNIDAD_NEGOCIO'] == 'Banorte Monterrey' || $modelUnidadNegocio['DESC_UNIDAD_NEGOCIO'] == 'Banorte DF'){\n //Valida que sea cliente Banorte -> ($sql['RFC']=='BMN930209927) || ($sql['RFC']=='ITA081127UZ1')\n if (in_array($sql['RFC'],$arr_validar_factura_btn)) {\n $prefix_correo = get_config('PERIODOS','PREFIX_BANORTE');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_FACTURA_BTN'));\n // Valida que sea cliente IBM -> ($sql['RFC']=='IMC9701024T5')\n }elseif($sql['RFC']==get_config('PERIODOS','IS_IBM')){\n $prefix_correo = get_config('PERIODOS','PREFIX_IBM');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_FACTURA_IBM'));\n // Validad que se cliente STEFANINI -> ($sql['RFC']=='STE9607266C7')\n }elseif($sql['RFC']==get_config('PERIODOS','IS_STEFANINI')){\n $prefix_correo = get_config('PERIODOS','PREFIX_STEFANINI');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_FACTURA_STE'));\n }\n }elseif($modelUnidadNegocio['DESC_UNIDAD_NEGOCIO'] == 'Nuevos Negocios'){\n $prefix_correo = get_config('PERIODOS','PREFIX_NUEVOS_NEGOCIOS');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_FACTURA_NN'));\n //Validación para cualquier otra unidad de nebocio y/o cliente que no es considerada en las condiciones anteriores.\n }else{\n $prefix_correo = '';\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_FACTURA_OTROS'));\n }\n //Validación cuando se ejecuta un ambiente distinto a PR\n }else{\n $prefix_correo = 'PRUEBA QA ';\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_FACTURA_BTN'));\n }\n\n // INICIO MOD HRIBI - Concatenación en el asunto del correo del número del documento, mes y año pertenecientes al periodo donde se guarda el doc HdE.\n $asunto= $prefix_correo.' Factura_'.$modeloDocumentoFactura['NUM_DOCUMENTO'].'_'.$sql['NOMBRE'];\n // FIN MOD HRIBI\n $nombre_usuario= user_info()['NOMBRE_COMPLETO'];\n\n $mensaje='<style>p, ul, li {font-family: Arial, Helvetica, sans-serif; font-size: 12px;}</style>\n <p>Buen d&iacute;a</p>\n <p>Adjunto Factura y XML de la facturaci&oacute;n</p>\n <p>Los periodos afectados por esta factura son: </p>';\n\n $mesPeriodos = trim($mesPeriodo,',');\n foreach (explode(\",\",$mesPeriodos) as $key => $mes) {\n $mensaje .='<p>'.$arrayMeses[$mes].' del '.date(\"Y\",strtotime($facturaNuevaModifica->FECHA_INI)).'</p>';\n }\n $mensaje .= '<p>Saludos y Gracias.</p>';\n\n if($ubicacion_doc_factura_xml != ''){\n $enviado = send_mail($de,$para, $asunto, $mensaje,['..'.$ubicacion_doc_factura,'..'.$ubicacion_doc_factura_xml]);\n }else{\n $enviado = send_mail($de,$para, $asunto, $mensaje,['..'.$ubicacion_doc_factura]);\n }\n\n }\n\n }\n\n if(isset($data['es_bolsaHDE'])&&$data['es_bolsaHDE']!=1){\n //Condición sólo para documentos de tipo 'HDE'.\n if($data['TblDocumentos']['FK_TIPO_DOCUMENTO'] == 3) {\n\n $hdeNuevaModifica = TblPeriodos::find()->where(['PK_PERIODO' => $data['pk_periodo_hde']])->limit(1)->one();\n\n if($hdeNuevaModifica->FK_DOCUMENTO_HDE == null) {\n $modeloDocumentos->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->NUM_SP = isset($data['TblDocumentos']['NUM_SP']) ? $data['TblDocumentos']['NUM_SP'] : null;\n //$modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_ASIGNACION = $datos['id'];\n $modeloDocumentos->FK_TIPO_DOCUMENTO = isset($data['TblDocumentos']['FK_TIPO_DOCUMENTO']) ? $data['TblDocumentos']['FK_TIPO_DOCUMENTO'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n $modeloDocumentos->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modeloDocumentos->FK_CLIENTE = $data['FK_CLIENTE'];\n $modeloDocumentos->CONSECUTIVO_TIPO_DOC = $data['consecutivo'];\n\n $modelSubirDocHde->file = UploadedFile::getInstance($modelSubirDocHde, '[6]file');\n if (!empty($modelSubirDocHde->file)) {\n $fechaHoraHoy = date('YmdHis');\n $rutaGuardado = '../uploads/DocumentosPeriodos/';\n $nombreFisico = $fechaHoraHoy.'_'.quitar_acentos(utf8_decode($modelSubirDocHde->file->basename));\n $nombreBD = quitar_acentos(utf8_decode($modelSubirDocHde->file->basename));\n $extension = $modelSubirDocHde->upload($rutaGuardado,$nombreFisico);\n $rutaDoc = '/uploads/DocumentosPeriodos/';\n $modeloDocumentos->NOMBRE_DOCUMENTO = $nombreBD.'.'.$extension;\n $modeloDocumentos->DOCUMENTO_UBICACION = $rutaDoc.$nombreFisico.'.'.$extension;\n }\n $modeloDocumentos->save(false);\n //Bitacora para crear nuevo registro de un Documento HDE en Periodos.\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentos->FK_ASIGNACION.', TIPO_DOCUMENTO=HDE, NUM_DOCUMENTO='.$modeloDocumentos->NUM_DOCUMENTO.', FK_CLIENTE='.$modeloDocumentos->FK_CLIENTE;\n user_log_bitacora($descripcionBitacora,'Modificar Documento HDE en Periodos',$hdeNuevaModifica->FK_DOCUMENTO_HDE);\n\n $modelSeguimiento = new TblAsignacionesSeguimiento;\n // $modelSeguimiento->load(Yii ::$app->request->post());\n $modelSeguimiento->COMENTARIOS = 'Modificaci&oacute;n de documento HDE_'.$modeloDocumentos->NUM_DOCUMENTO.'_'.obtener_nombre_mes(date(\"m\",strtotime($hdeNuevaModifica->FECHA_INI))).date(\"Y\",strtotime($hdeNuevaModifica->FECHA_INI));\n $modelSeguimiento->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modelSeguimiento->FK_ASIGNACION = $modeloDocumentos->FK_ASIGNACION;\n $modelSeguimiento->FK_USUARIO = user_info()['PK_USUARIO'];\n $modelSeguimiento->save(false);\n\n $id = $modeloDocumentos->PK_DOCUMENTO;\n }else{\n $modeloDocumentos = TblDocumentos::findOne($hdeNuevaModifica->FK_DOCUMENTO_HDE);\n $modeloDocumentos->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n //$modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n\n\n $modelSubirDocHde->file = UploadedFile::getInstance($modelSubirDocHde, '[6]file');\n if (!empty($modelSubirDocHde->file)) {\n $fechaHoraHoy = date('YmdHis');\n $rutaGuardado = '../uploads/DocumentosPeriodos/';\n $nombreFisico = $fechaHoraHoy.'_'.quitar_acentos(utf8_decode($modelSubirDocHde->file->basename));\n $nombreBD = quitar_acentos(utf8_decode($modelSubirDocHde->file->basename));\n $extension = $modelSubirDocHde->upload($rutaGuardado,$nombreFisico);\n $rutaDoc = '/uploads/DocumentosPeriodos/';\n $modeloDocumentos->NOMBRE_DOCUMENTO = $nombreBD.'.'.$extension;\n $modeloDocumentos->DOCUMENTO_UBICACION = $rutaDoc.$nombreFisico.'.'.$extension;\n }\n $modeloDocumentos->save(false);\n //Bitacora para modificación de Documento HDE en Periodos.\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentos->FK_ASIGNACION.', TIPO_DOCUMENTO=HDE, NUM_DOCUMENTO='.$modeloDocumentos->NUM_DOCUMENTO.', FK_CLIENTE='.$modeloDocumentos->FK_CLIENTE;\n user_log_bitacora($descripcionBitacora,'Cargar Documento HDE en Periodos',$data['pk_periodo_hde']);\n\n $modelSeguimiento = new TblAsignacionesSeguimiento;\n // $modelSeguimiento->load(Yii ::$app->request->post());\n $modelSeguimiento->COMENTARIOS = 'Cargar de documento HDE_'.$modeloDocumentos->NUM_DOCUMENTO.'_'.obtener_nombre_mes(date(\"m\",strtotime($hdeNuevaModifica->FECHA_INI))).date(\"Y\",strtotime($hdeNuevaModifica->FECHA_INI));\n $modelSeguimiento->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modelSeguimiento->FK_ASIGNACION = $modeloDocumentos->FK_ASIGNACION;\n $modelSeguimiento->FK_USUARIO = user_info()['PK_USUARIO'];\n $modelSeguimiento->save(false);\n\n $id = $modeloDocumentos->PK_DOCUMENTO;\n }\n if(isset($nombreBD) && $hdeNuevaModifica->FK_DOCUMENTO_FACTURA == null){\n $modeloDocumentoODC= TblDocumentos::findOne($hdeNuevaModifica->FK_DOCUMENTO_ODC);\n $ubicacion_doc_odc= $modeloDocumentoODC->DOCUMENTO_UBICACION;\n $modeloDocumentoHDE= TblDocumentos::findOne($id);\n $ubicacion_doc_hde= $modeloDocumentoHDE->DOCUMENTO_UBICACION;\n\n // INICIO HRIBI - array para concatenar en el asunto del correo, el nombre del mes perteneciente al periodo donde se guarda el doc HdE.\n $arrayMeses = array(\"01\" => \"Enero\",\n \"02\" => \"Febrero\",\n \"03\" => \"Marzo\",\n \"04\" => \"Abril\",\n \"05\" => \"Mayo\",\n \"06\" => \"Junio\",\n \"07\" => \"Julio\",\n \"08\" => \"Agosto\",\n \"09\" => \"Septiembre\",\n \"10\" => \"Octubre\",\n \"11\" => \"Noviembre\",\n \"12\" => \"Diciembre\", );\n $mesPeriodo = date(\"m\",strtotime($hdeNuevaModifica->FECHA_INI));\n // FIN HRIBI\n\n $is_pr= get_config('CONFIG','PRODUCCION');\n $de= get_config('PERIODOS','CORREO_REMITENTE_FACTURA');\n $prefix_correo = '';\n if($is_pr){\n\n $arr_validar_factura_btn= explode(',',get_config('PERIODOS','PARA_FACTURA_BTN'));\n\n //Banorte\n // if($sql['RFC']=='BMN930209927'||$sql['RFC']=='ITA081127UZ1')\n if (in_array($sql['RFC'],$arr_validar_factura_btn)) {\n //$para = array('jorge.mendiola@eisei.net.mx','nestor.tristan@eisei.net.mx','maria.delgado@eisei.net.mx');\n $prefix_correo= get_config('PERIODOS','PREFIX_BANORTE');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_BTN'));\n // if($sql['RFC']=='IMC9701024T5')\n }elseif($sql['RFC']==get_config('PERIODOS','IS_IBM')){\n //$para = array('jorge.mendiola@eisei.net.mx','maria.delgado@eisei.net.mx');\n $prefix_correo= get_config('PERIODOS','PREFIX_IBM');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_IBM'));\n // if($sql['RFC']=='STE9607266C7')\n }elseif($sql['RFC']==get_config('PERIODOS','IS_STEFANINI')){\n //$para = array('eveylin@eisei.net.mx','maria.delgado@eisei.net.mx');\n $prefix_correo= get_config('PERIODOS','PREFIX_STEFANINI');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_STE'));\n }else{\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_OTROS'));\n }\n\n }else{\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_OTROS'));\n }\n // INICIO MOD HRIBI - Concatenación en el asunto del correo del número del documento, mes y año pertenecientes al periodo donde se guarda el doc HdE.\n $asunto= $prefix_correo.' Pendiente por facturar '.'OdC_'.$modeloDocumentoODC->NUM_DOCUMENTO.'_'.$arrayMeses[$mesPeriodo].date(\"Y\",strtotime($hdeNuevaModifica->FECHA_INI));;\n\n // FIN MOD HRIBI\n $nombre_usuario= user_info()['NOMBRE_COMPLETO'];\n\n $mensaje='<style>p, ul, li {font-family: Arial, Helvetica, sans-serif; font-size: 12px;}</style>\n <p>Buen d&iacute;a</p>\n <p>Adjunto OdC y HdE para su facturaci&oacute;n</p>\n <p>Saludos y Gracias.</p>';\n\n $enviado = send_mail($de,$para, $asunto, $mensaje,['..'.$ubicacion_doc_hde,'..'.$ubicacion_doc_odc]);\n }\n }\n }\n\n /*if($data['TblDocumentos']['FK_TIPO_DOCUMENTO'] == 2) {\n\n $odcNuevaModifica = TblPeriodos::find()->where(['PK_PERIODO' => $data['pk_periodo_odc']])->limit(1)->one();\n\n if($odcNuevaModifica->FK_DOCUMENTO_ODC == null) {\n $modeloDocumentos->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->NUM_SP = isset($data['TblDocumentos']['NUM_SP']) ? $data['TblDocumentos']['NUM_SP'] : null;\n $modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_ASIGNACION = $datos['id'];\n $modeloDocumentos->FK_TIPO_DOCUMENTO = isset($data['TblDocumentos']['FK_TIPO_DOCUMENTO']) ? $data['TblDocumentos']['FK_TIPO_DOCUMENTO'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n $modeloDocumentos->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modeloDocumentos->FK_CLIENTE = $data['FK_CLIENTE'];\n $modeloDocumentos->CONSECUTIVO_TIPO_DOC = $data['consecutivo'];\n\n $modelSubirDoc->file = UploadedFile::getInstance($modelSubirDoc, '[5]file');\n if (!empty($modelSubirDoc->file)) {\n $fechaHoraHoy = date('YmdHis');\n $rutaGuardado = '../uploads/DocumentosPeriodos/';\n $nombreFisico = $fechaHoraHoy.'_'.$modelSubirDoc->file->basename;\n $nombreBD = $modelSubirDoc->file->basename;\n $extension = $modelSubirDoc->upload($rutaGuardado,$nombreFisico);\n $rutaDoc = '/uploads/DocumentosPeriodos/';\n $modeloDocumentos->NOMBRE_DOCUMENTO = $nombreBD.'.'.$extension;\n $modeloDocumentos->DOCUMENTO_UBICACION = $rutaDoc.$nombreFisico.'.'.$extension;\n }\n $modeloDocumentos->save(false);\n $id = $modeloDocumentos->PK_DOCUMENTO;\n }else{\n $modeloDocumentos = TblDocumentos::findOne($odcNuevaModifica->FK_DOCUMENTO_ODC);\n $modeloDocumentos->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n\n\n $modelSubirDoc->file = UploadedFile::getInstance($modelSubirDoc, '[5]file');\n if (!empty($modelSubirDoc->file)) {\n $fechaHoraHoy = date('YmdHis');\n $rutaGuardado = '../uploads/DocumentosPeriodos/';\n $nombreFisico = $fechaHoraHoy.'_'.$modelSubirDoc->file->basename;\n $nombreBD = $modelSubirDoc->file->basename;\n $extension = $modelSubirDoc->upload($rutaGuardado,$nombreFisico);\n $rutaDoc = '/uploads/DocumentosPeriodos/';\n $modeloDocumentos->NOMBRE_DOCUMENTO = $nombreBD.'.'.$extension;\n $modeloDocumentos->DOCUMENTO_UBICACION = $rutaDoc.$nombreFisico.'.'.$extension;\n }\n\n $modeloDocumentos->save(false);\n $id = $modeloDocumentos->PK_DOCUMENTO;\n }\n }*/\n /*if($data['TblDocumentos']['FK_TIPO_DOCUMENTO'] == 3) {\n\n $modelSubirDocHde->file = UploadedFile::getInstance($modelSubirDocHde, 'file');\n if (!empty($modelSubirDocHde->file)) {\n $fechaHoraHoy = date('YmdHis');\n $rutaGuardado = '../uploads/DocumentosPeriodos/';\n $nombreFisico = $fechaHoraHoy.'_'.$modelSubirDocHde->file->basename;\n $nombreBD = $modelSubirDocHde->file->basename;\n $extension = $modelSubirDocHde->upload($rutaGuardado,$nombreFisico);\n $rutaDoc = '/uploads/DocumentosPeriodos/';\n $modeloDocumentos->NOMBRE_DOCUMENTO = $nombreBD.'.'.$extension;\n $modeloDocumentos->DOCUMENTO_UBICACION = $rutaDoc.$nombreFisico.'.'.$extension;\n }\n\n if ($modelSubirDocHde->file == null) {\n $modeloDocumentos = TblDocumentos::findOne($data['TblDocumentos']['PK_DOCUMENTO']);\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->NUM_SP = isset($data['TblDocumentos']['NUM_SP']) ? $data['TblDocumentos']['NUM_SP'] : null;\n $modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n } else {\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->NUM_SP = isset($data['TblDocumentos']['NUM_SP']) ? $data['TblDocumentos']['NUM_SP'] : null;\n $modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_ASIGNACION = $datos['id'];\n $modeloDocumentos->FK_TIPO_DOCUMENTO = isset($data['TblDocumentos']['FK_TIPO_DOCUMENTO']) ? $data['TblDocumentos']['FK_TIPO_DOCUMENTO'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n $modeloDocumentos->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modeloDocumentos->FK_CLIENTE = $data['FK_CLIENTE'];\n $modeloDocumentos->CONSECUTIVO_TIPO_DOC = $data['consecutivo'];\n }\n $modeloDocumentos->save(false);\n }*/\n\n if(isset($data['es_bolsa'])&&$data['es_bolsa']!=1){\n //Condición sólo para documentos de tipo 'ODC'.\n if($data['TblDocumentos']['FK_TIPO_DOCUMENTO'] == 2) {\n\n $odcNuevaModifica = TblPeriodos::find()->where(['PK_PERIODO' => $data['chkPeriodos']])->limit(1)->one();\n\n $modelSubirDoc->file = UploadedFile::getInstance($modelSubirDoc, '[5]file');\n if (!empty($modelSubirDoc->file)) {\n $fechaHoraHoy = date('YmdHis');\n $rutaGuardado = '../uploads/DocumentosPeriodos/';\n $nombreFisico = $fechaHoraHoy.'_'.quitar_acentos(utf8_decode($modelSubirDoc->file->basename));\n $nombreBD = quitar_acentos(utf8_decode($modelSubirDoc->file->basename));\n\n $extension = $modelSubirDoc->upload($rutaGuardado,$nombreFisico);\n $rutaDoc = '/uploads/DocumentosPeriodos/';\n $modeloDocumentos->NOMBRE_DOCUMENTO = $nombreBD.'.'.$extension;\n $modeloDocumentos->DOCUMENTO_UBICACION = $rutaDoc.$nombreFisico.'.'.$extension;\n //$modeloDocumentos->FK_USUARIO = $pk_usuario_loggin = isset(user_info()['PK_USUARIO']) ? user_info()['PK_USUARIO'] : null;\n $modeloDocumentos->FK_USUARIO = isset(user_info()['PK_USUARIO']) ? user_info()['PK_USUARIO'] : null;\n }\n\n if ($modelSubirDoc->file == null) { //Condición para identificar si es un update de un registro ODC\n\n $modeloDocumentos = TblDocumentos::findOne($data['TblDocumentos']['PK_DOCUMENTO']);\n $modeloDocumentos->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->NUM_SP = isset($data['TblDocumentos']['NUM_SP']) ? $data['TblDocumentos']['NUM_SP'] : null;\n\n //$modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n //Bitacora para crear nuevo registro de un Documento ODC en Periodos.\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentos->FK_ASIGNACION.', TIPO_DOCUMENTO=ODC, NUM_DOCUMENTO='.$modeloDocumentos->NUM_DOCUMENTO.', FK_CLIENTE='.$modeloDocumentos->FK_CLIENTE.', FK_USUARIO '.$modeloDocumentos->FK_USUARIO;\n user_log_bitacora($descripcionBitacora,'Modificar Documento ODC en Periodos',$data['TblDocumentos']['PK_DOCUMENTO']);\n\n $modelSeguimiento = new TblAsignacionesSeguimiento;\n // $modelSeguimiento->load(Yii::$app->request->post());\n $modelSeguimiento->COMENTARIOS = 'Modificaci&oacute;n de documento OdC_'.$modeloDocumentos->NUM_DOCUMENTO.'_'.obtener_nombre_mes(date(\"m\",strtotime($odcNuevaModifica->FECHA_INI))).date(\"Y\",strtotime($odcNuevaModifica->FECHA_INI));\n $modelSeguimiento->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modelSeguimiento->FK_ASIGNACION = $modeloDocumentos->FK_ASIGNACION;\n $modelSeguimiento->FK_USUARIO = user_info()['PK_USUARIO'];\n $modelSeguimiento->save(false);\n\n } else { //Condición para identificar si es un create de un registro ODC\n\n $modeloDocumentos->FECHA_DOCUMENTO = isset($data['TblDocumentos']['FECHA_DOCUMENTO']) ? transform_date($data['TblDocumentos']['FECHA_DOCUMENTO'],'Y-m-d') : null;\n $modeloDocumentos->NUM_DOCUMENTO = isset($data['TblDocumentos']['NUM_DOCUMENTO']) ? $data['TblDocumentos']['NUM_DOCUMENTO'] : null;\n $modeloDocumentos->NUM_SP = isset($data['TblDocumentos']['NUM_SP']) ? $data['TblDocumentos']['NUM_SP'] : null;\n //$modeloDocumentos->TARIFA = isset($data['TblDocumentos']['TARIFA']) ? $data['TblDocumentos']['TARIFA'] : null;\n $modeloDocumentos->FK_RAZON_SOCIAL = isset($data['TblDocumentos']['FK_RAZON_SOCIAL']) ? $data['TblDocumentos']['FK_RAZON_SOCIAL'] : null;\n $modeloDocumentos->FK_ASIGNACION = $datos['id'];\n $modeloDocumentos->FK_TIPO_DOCUMENTO = isset($data['TblDocumentos']['FK_TIPO_DOCUMENTO']) ? $data['TblDocumentos']['FK_TIPO_DOCUMENTO'] : null;\n $modeloDocumentos->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n $modeloDocumentos->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modeloDocumentos->FK_CLIENTE = $data['FK_CLIENTE'];\n $modeloDocumentos->CONSECUTIVO_TIPO_DOC = $data['consecutivo'];\n\n //Bitacora para modificación de Documento ODC en Periodos.\n $descripcionBitacora = 'FK_ASIGNACION='.$modeloDocumentos->FK_ASIGNACION.', TIPO_DOCUMENTO=ODC, NUM_DOCUMENTO='.$modeloDocumentos->NUM_DOCUMENTO.', FK_CLIENTE='.$modeloDocumentos->FK_CLIENTE.', FK_USUARIO '.$modeloDocumentos->FK_USUARIO;\n user_log_bitacora($descripcionBitacora,'Cargar Documento ODC en Periodos',$data['TblDocumentos']['PK_DOCUMENTO']);\n\n $modelSeguimiento = new TblAsignacionesSeguimiento;\n // $modelSeguimiento->load(Yii::$app->request->post());\n $modelSeguimiento->COMENTARIOS = 'Carga de documento OdC_'.$modeloDocumentos->NUM_DOCUMENTO.'_'.obtener_nombre_mes(date(\"m\",strtotime($odcNuevaModifica->FECHA_INI))).date(\"Y\",strtotime($odcNuevaModifica->FECHA_INI));\n $modelSeguimiento->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modelSeguimiento->FK_ASIGNACION = $modeloDocumentos->FK_ASIGNACION;\n $modelSeguimiento->FK_USUARIO = user_info()['PK_USUARIO'];\n $modelSeguimiento->save(false);\n }\n\n $modeloDocumentos->save(false);\n }\n $id = $modeloDocumentos->PK_DOCUMENTO;\n }\n\n if (isset($data['chkPeriodos'])) { //identifica si estan seleccionados uno o mas periodos en el alta de ODC\n\n /* if($data['TblDocumentos']['FK_TIPO_DOCUMENTO'] == 4) {\n $modelPeriodosUpd = TblPeriodos::find()->where(['PK_PERIODO' => $data['pk_periodo_factura']])->limit(1)->one();\n $modelPeriodosUpd->FK_DOCUMENTO_FACTURA = $id;\n $modelPeriodosUpd->TARIFA_FACTURA = $data['TblDocumentos']['TARIFA'];\n $modelPeriodosUpd->HORAS_FACTURA = $data['horasFactura'];\n $modelPeriodosUpd->MONTO_FACTURA = $data['montoFactura'];\n $modelPeriodosUpd->save(false);\n } else*/\n //Entra con documentos\n if($data['TblDocumentos']['FK_TIPO_DOCUMENTO'] == 3) { //Condición para documentos tipo HDE\n\n\n $bolsa_documento_hde= '';\n if(isset($data['es_bolsaHDE'])&&$data['es_bolsaHDE']==1){\n $bolsa_documento_hde = TblDocumentos::find()->where(['PK_DOCUMENTO'=>$data['TblDocumentos']['PK_DOCUMENTO']])->one();\n $datos_bolsa = TblCatBolsas::find()->where(['PK_BOLSA'=>$data['pk_bolsaHDE']])->one();\n }\n\n $modelPeriodosUpd = TblPeriodos::find()->where(['PK_PERIODO' => $data['pk_periodo_hde']])->limit(1)->one();\n\n if(isset($data['es_bolsaHDE'])&&$data['es_bolsaHDE']==1){\n $datos_bolsa->HORAS_DISPONIBLES = $datos_bolsa->HORAS_DISPONIBLES + $modelPeriodosUpd->HORAS_HDE;\n $datos_bolsa->MONTO_DISPONIBLE = $datos_bolsa->MONTO_DISPONIBLE + $modelPeriodosUpd->MONTO_HDE;\n }\n\n if(isset($data['es_bolsaHDE'])&&$data['es_bolsaHDE']!=1){\n $modelPeriodosUpd->FK_DOCUMENTO_HDE = $id;\n //$modelPeriodosUpd->TARIFA_HDE = $data['TblDocumentos']['TARIFA'];\n }else{\n $modelPeriodosUpd->HORAS = $data['txtHoras'];\n $modelPeriodosUpd->MONTO = $data['txtMonto'];\n }\n\n $modelPeriodosUpd->HORAS_HDE = $data['txtHoras'];\n if ($data['txtHoras'] != $modelPeriodosUpd->HORAS_DEVENGAR) {\n\n $modelSeguimiento = new TblAsignacionesSeguimiento();\n $modelSeguimiento->COMENTARIOS = 'El Periodo <b>'.$modelPeriodosUpd->PK_PERIODO.'</b> ha tenido una actualizaci&oacute;n de <b>Horas a Devengar,</b> de <b>'.$modelPeriodosUpd->HORAS_DEVENGAR.'</b> horas a <b>'.$data['txtHoras'].'</b> horas.';\n $modelSeguimiento->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $modelSeguimiento->FK_ASIGNACION = $modelPeriodosUpd->FK_ASIGNACION;\n $modelSeguimiento->FK_USUARIO = user_info()['PK_USUARIO'];\n $modelSeguimiento->save(false);\n\n $modelPeriodosUpd->HORAS_DEVENGAR = $data['txtHoras'];\n }\n $modelPeriodosUpd->MONTO_HDE = $data['txtMonto'];\n\n $docFactura = TblFacturas::find()->where(['FK_DOC_FACTURA' => $modelPeriodosUpd->FK_DOCUMENTO_FACTURA ])->orderBy(['PK_FACTURA' => SORT_DESC])->limit(1)-> one();\n\n if(!isset($docFactura->FECHA_INGRESO_BANCO)){\n $modelPeriodosUpd->HORAS_FACTURA = $data['txtHoras'];\n $modelPeriodosUpd->MONTO_FACTURA = ($data['txtHoras'] * $data['TblDocumentos']['TARIFA']);\n }\n\n $modelPeriodosUpd->save(false);\n\n if(isset($data['es_bolsaHDE'])&&$data['es_bolsaHDE']==1){\n $datos_bolsa->HORAS_DISPONIBLES = $datos_bolsa->HORAS_DISPONIBLES - $modelPeriodosUpd->HORAS_HDE;\n $datos_bolsa->MONTO_DISPONIBLE = $datos_bolsa->MONTO_DISPONIBLE - $modelPeriodosUpd->MONTO_HDE;\n $datos_bolsa->save(false);\n }\n\n } else { //Condición para documentos tipo ODC\n\n $newAsignacion = TblAsignaciones::find()->where(['PK_ASIGNACION' => $datos['id']])->limit(1)->one();\n $periodosImpactados = null;\n\n $bolsa_documento_odc= '';\n if(isset($data['es_bolsa'])&&$data['es_bolsa']==1){\n $bolsa_documento_odc = TblDocumentos::find()->where(['PK_DOCUMENTO'=>$data['TblDocumentos']['PK_DOCUMENTO']])->one();\n $datos_bolsa = TblCatBolsas::find()->where(['PK_BOLSA'=>$data['pk_bolsa']])->one();\n }\n\n foreach ($data['chkPeriodos'] as $key => $value) { //Recorre los periodos seleccionados para cargar ODC\n\n $modelPeriodosUpd = TblPeriodos::findOne($value);\n if(isset($data['es_bolsa'])&&$data['es_bolsa']==1&&$modelPeriodosUpd->FK_DOCUMENTO_ODC!=null){\n $datos_bolsa->HORAS_DISPONIBLES = (float)$datos_bolsa->HORAS_DISPONIBLES+ (float)$modelPeriodosUpd->HORAS;\n $datos_bolsa->MONTO_DISPONIBLE = (float)$datos_bolsa->MONTO_DISPONIBLE + (float)$modelPeriodosUpd->MONTO;\n }\n\n $horas = $data['txtHoras_'.$value];\n if(isset($data['cambio'])){\n $monto = $data['TblPeriodos']['TARIFA']*$horas;\n $monto = isset($data['txtMonto_'.$value]) ? $data['txtMonto_'.$value] : ($horas * $data['TblPeriodos']['TARIFA']);\n }else{\n if(isset($data['TblPeriodos']['TARIFA'])){\n $monto = isset($data['txtMonto_'.$value]) ? $data['txtMonto_'.$value] : ($horas * $data['TblPeriodos']['TARIFA']);\n }else{\n $monto = isset($data['txtMonto_'.$value]) ? $data['txtMonto_'.$value] : ($horas * $data['mask_tarifa_odc']);\n }\n }\n //$monto = isset($data['txtMonto_'.$value]) ? $data['txtMonto_'.$value] : ($data['txtHoras_'.$value] * $data['TblPeriodos']['TARIFA']);\n //$modelPeriodosUpd->FK_DOCUMENTO_ODC = ($modelSubirDoc->file == null) ? ($modelPeriodosUpd->FK_DOCUMENTO_ODC == 'null' || $modelPeriodosUpd->FK_DOCUMENTO_ODC == null) ? $id : $modelPeriodosUpd->FK_DOCUMENTO_ODC : $id;\n if(isset($data['es_bolsa'])&&$data['es_bolsa']!=1){\n\n $modelPeriodosUpd->FK_DOCUMENTO_ODC = ($modelSubirDoc->file == null) ? ($modelPeriodosUpd->FK_DOCUMENTO_ODC == 'null' || $modelPeriodosUpd->FK_DOCUMENTO_ODC == null) ? $id : $id : $id;\n $modelPeriodosUpd->FACTURA_PROVISION= $data['Tblperiodos']['FACTURA_PROVISION'];\n\n if($data['Tblperiodos']['FACTURA_PROVISION'] == 1){\n\n //SECCION DE CODIGO PARA ENVIAR CORREO ADJUNTO EN ODC CON PROVISION SI\n\n $modeloDocumentoODC= TblDocumentos::findOne($id);\n $ubicacion_doc_odc= $modeloDocumentoODC->DOCUMENTO_UBICACION;\n\n // INICIO HRIBI - array para concatenar en el asunto del correo, el nombre del mes perteneciente al periodo donde se guarda el doc HdE.\n $arrayMeses = array(\"01\" => \"Enero\",\n \"02\" => \"Febrero\",\n \"03\" => \"Marzo\",\n \"04\" => \"Abril\",\n \"05\" => \"Mayo\",\n \"06\" => \"Junio\",\n \"07\" => \"Julio\",\n \"08\" => \"Agosto\",\n \"09\" => \"Septiembre\",\n \"10\" => \"Octubre\",\n \"11\" => \"Noviembre\",\n \"12\" => \"Diciembre\", );\n $mesPeriodo = date(\"m\",strtotime($modelPeriodosUpd->FECHA_INI));\n // FIN HRIBI\n\n $is_pr= get_config('CONFIG','PRODUCCION');\n $de= get_config('PERIODOS','CORREO_REMITENTE_FACTURA');\n $prefix_correo = '';\n if($is_pr){\n\n $arr_validar_factura_btn= explode(',',get_config('PERIODOS','PARA_FACTURA_BTN'));\n\n //Banorte\n // if($sql['RFC']=='BMN930209927'||$sql['RFC']=='ITA081127UZ1')\n if (in_array($sql['RFC'],$arr_validar_factura_btn)) {\n //$para = array('jorge.mendiola@eisei.net.mx','nestor.tristan@eisei.net.mx','maria.delgado@eisei.net.mx');\n $prefix_correo= get_config('PERIODOS','PREFIX_BANORTE');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_BTN'));\n // if($sql['RFC']=='IMC9701024T5')\n }elseif($sql['RFC']==get_config('PERIODOS','IS_IBM')){\n //$para = array('jorge.mendiola@eisei.net.mx','maria.delgado@eisei.net.mx');\n $prefix_correo= get_config('PERIODOS','PREFIX_IBM');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_IBM'));\n // if($sql['RFC']=='STE9607266C7')\n }elseif($sql['RFC']==get_config('PERIODOS','IS_STEFANINI')){\n //$para = array('eveylin@eisei.net.mx','maria.delgado@eisei.net.mx');\n $prefix_correo= get_config('PERIODOS','PREFIX_STEFANINI');\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_STE'));\n }else{\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_OTROS'));\n }\n\n }else{\n $para= explode(',',get_config('PERIODOS','CORREO_DESTINO_POR_FACTURAR_OTROS'));\n }\n // INICIO MOD HRIBI - Concatenación en el asunto del correo del número del documento, mes y año pertenecientes al periodo donde se guarda el doc ODC.\n $asunto = 'Provisión - '. $prefix_correo.' Pendiente por facturar '.'OdC_'.$modeloDocumentoODC->NUM_DOCUMENTO.'_'.$arrayMeses[$mesPeriodo].date(\"Y\",strtotime($modelPeriodosUpd->FECHA_INI));\n\n // FIN MOD HRIBI\n $nombre_usuario= user_info()['NOMBRE_COMPLETO'];\n\n $mensaje='<style>p, ul, li {font-family: Arial, Helvetica, sans-serif; font-size: 12px;}</style>\n <p>Buen d&iacute;a</p>\n <p>Adjunto OdC para la facturaci&oacute;n del Periodo '.transform_date($modelPeriodosUpd->FECHA_INI, \"d/m/Y\").' al '.transform_date($modelPeriodosUpd->FECHA_FIN, \"d/m/Y\").' por la cantidad de $'.$modelPeriodosUpd->MONTO.'</p>\n <p>Saludos y Gracias.</p>';\n\n $enviado = send_mail($de,$para, $asunto, $mensaje,['..'.$ubicacion_doc_odc]);\n\n\n }\n }else{\n\n if($modelPeriodosUpd->FK_DOCUMENTO_ODC==null){\n $nuevo_documento_odc = new TblDocumentos();\n $nuevo_documento_odc->FECHA_DOCUMENTO = $bolsa_documento_odc->FECHA_DOCUMENTO;\n $nuevo_documento_odc->NUM_DOCUMENTO = $bolsa_documento_odc->NUM_DOCUMENTO;\n $nuevo_documento_odc->NUM_SP = isset($data['TblDocumentos']['NUM_SP']) ? $data['TblDocumentos']['NUM_SP'] : null;\n //$nuevo_documento_odc->TARIFA = $bolsa_documento_odc->TARIFA;\n $nuevo_documento_odc->FK_RAZON_SOCIAL = $bolsa_documento_odc->FK_RAZON_SOCIAL;\n $nuevo_documento_odc->FK_ASIGNACION = $bolsa_documento_odc->FK_ASIGNACION;\n $nuevo_documento_odc->FK_TIPO_DOCUMENTO = $bolsa_documento_odc->FK_TIPO_DOCUMENTO;\n $nuevo_documento_odc->DOCUMENTO_UBICACION = $bolsa_documento_odc->DOCUMENTO_UBICACION;\n $nuevo_documento_odc->NOMBRE_DOCUMENTO = $bolsa_documento_odc->NOMBRE_DOCUMENTO;\n $nuevo_documento_odc->FK_UNIDAD_NEGOCIO = isset($data['TblDocumentos']['FK_UNIDAD_NEGOCIO']) ? $data['TblDocumentos']['FK_UNIDAD_NEGOCIO'] : null;\n $nuevo_documento_odc->FECHA_REGISTRO = date('Y-m-d H:i:s');\n $nuevo_documento_odc->FK_CLIENTE = $data['FK_CLIENTE'];\n $nuevo_documento_odc->CONSECUTIVO_TIPO_DOC = $bolsa_documento_odc->CONSECUTIVO_TIPO_DOC;\n $nuevo_documento_odc->save(false);\n $modelPeriodosUpd->FK_DOCUMENTO_ODC =$nuevo_documento_odc->PK_DOCUMENTO;\n $modelPeriodosUpd->TARIFA =isset($data['TblPeriodos']['TARIFA']) ? $data['TblPeriodos']['TARIFA'] : null;\n\n $nuevo_documento_hde = new TblDocumentos();\n $nuevo_documento_hde->FECHA_DOCUMENTO = $bolsa_documento_odc->FECHA_DOCUMENTO;\n $nuevo_documento_hde->NUM_DOCUMENTO = str_replace('BLS_ODC_','BLS_HDE_',$bolsa_documento_odc->NUM_DOCUMENTO);\n $nuevo_documento_hde->DOCUMENTO_UBICACION = $bolsa_documento_odc->DOCUMENTO_UBICACION;\n $nuevo_documento_hde->NOMBRE_DOCUMENTO = $bolsa_documento_odc->NOMBRE_DOCUMENTO;\n //$nuevo_documento_hde->TARIFA = $bolsa_documento_odc->TARIFA;\n $nuevo_documento_hde->FK_ASIGNACION = $bolsa_documento_odc->FK_ASIGNACION;\n $nuevo_documento_hde->FK_TIPO_DOCUMENTO = 3;\n $nuevo_documento_hde->CONSECUTIVO_TIPO_DOC = 0;\n $nuevo_documento_hde->FK_RAZON_SOCIAL = $bolsa_documento_odc->FK_RAZON_SOCIAL;\n $nuevo_documento_hde->save(false);\n\n $modelPeriodosUpd->FK_DOCUMENTO_HDE = $nuevo_documento_hde->PK_DOCUMENTO;\n $modelPeriodosUpd->HORAS_HDE = $horas;\n $modelPeriodosUpd->MONTO_HDE = $monto;\n $modelPeriodosUpd->FACTURA_PROVISION= $data['TblPeriodos']['FACTURA_PROVISION'];\n\n }else{\n $documento_periodo_bolsa = TblDocumentos::find()->where(['PK_DOCUMENTO'=>$modelPeriodosUpd->FK_DOCUMENTO_ODC])->one();\n $documento_periodo_bolsa->DOCUMENTO_UBICACION = $bolsa_documento_odc->DOCUMENTO_UBICACION;\n $documento_periodo_bolsa->NOMBRE_DOCUMENTO = $bolsa_documento_odc->NOMBRE_DOCUMENTO;\n $documento_periodo_bolsa->NUM_SP = isset($data['TblDocumentos']['NUM_SP']) ? $data['TblDocumentos']['NUM_SP'] : $documento_periodo_bolsa->NUM_SP;\n $documento_periodo_bolsa->FK_CLIENTE = $data['FK_CLIENTE'];\n $documento_periodo_bolsa->save(false);\n $modelPeriodosUpd->TARIFA =isset($data['TblPeriodos']['TARIFA']) ? $data['TblPeriodos']['TARIFA'] : $modelPeriodosUpd->TARIFA;\n $modelPeriodosUpd->HORAS_HDE = $horas;\n $modelPeriodosUpd->MONTO_HDE = $monto;\n $modelPeriodosUpd->FACTURA_PROVISION = isset($data['TblPeriodos']['FACTURA_PROVISION']) ? $data['TblPeriodos']['FACTURA_PROVISION'] : $modelPeriodosUpd->FACTURA_PROVISION;\n }\n }\n $modelPeriodosUpd->HORAS = $horas;\n if(isset($data['cambio'])){\n $modelPeriodosUpd->MONTO = $data['TblPeriodos']['TARIFA']*$horas;\n $modelPeriodosUpd->TARIFA = $data['TblPeriodos']['TARIFA'];\n /*if(isset($data['pk_cat_tarifa_select'])){\n $modelPeriodosUpd->FK_CAT_TARIFA = $data['pk_cat_tarifa_select'];\n }*/\n }else{\n $modelPeriodosUpd->MONTO = $modelPeriodosUpd->TARIFA*$horas;\n }\n $modelPeriodosUpd->save(false);\n\n if(isset($data['es_bolsa'])&&$data['es_bolsa']==1){\n $datos_bolsa->HORAS_DISPONIBLES = (float)$datos_bolsa->HORAS_DISPONIBLES - (float)$modelPeriodosUpd->HORAS;\n $datos_bolsa->MONTO_DISPONIBLE = (float)$datos_bolsa->MONTO_DISPONIBLE - (float)$modelPeriodosUpd->MONTO;\n }\n\n /*Inicio Cambio de Tarifas*/\n if ($newAsignacion->TARIFA != $modelPeriodosUpd->TARIFA) {\n\n $nuevaTarifa = new TblBitAsignacionTarifas();\n $nuevaTarifa->FK_ASIGNACION = $newAsignacion->PK_ASIGNACION;\n $nuevaTarifa->FK_PERIODO = $modelPeriodosUpd->PK_PERIODO;\n $nuevaTarifa->CAMBIO_TARIFA = $modelPeriodosUpd->TARIFA;\n $nuevaTarifa->FK_CAT_TARIFA = isset($data['pk_cat_tarifa_select']) ? $data['pk_cat_tarifa_select'] : null;\n $nuevaTarifa->FECHA_REGISTRO = date('Y-m-d H:i:s');\n\n $nuevaTarifa->save(false);\n /*if ($newAsignacion->FKS_PERIODOS_CAMBIO_TARIFA == null) {\n $newAsignacion->FKS_PERIODOS_CAMBIO_TARIFA = $modelPeriodosUpd->PK_PERIODO.',';\n } else {\n $newAsignacion->FKS_PERIODOS_CAMBIO_TARIFA = $newAsignacion->FKS_PERIODOS_CAMBIO_TARIFA.$modelPeriodosUpd->PK_PERIODO.',';\n }\n\n $newAsignacion->TARIFA = $modelPeriodosUpd->TARIFA;*/\n // if(isset($data['cambio'])&&isset($data['pk_cat_tarifa_select'])){\n // $newAsignacion->FK_CAT_TARIFA = $data['pk_cat_tarifa_select'];\n // }\n $newAsignacion->TARIFA = $modelPeriodosUpd->TARIFA;\n $newAsignacion->FK_CAT_TARIFA = isset($data['pk_cat_tarifa_select']) ? $data['pk_cat_tarifa_select'] : null;\n $newAsignacion->save(false);\n\n /**\n * Cambiar Tarifa periodos\n */\n $proximos_periodos= TblPeriodos::find()->where(['FK_ASIGNACION'=>$modelPeriodosUpd->FK_ASIGNACION])->andWhere(['>','FECHA_INI',$modelPeriodosUpd->FECHA_INI])->all();\n\n foreach ($proximos_periodos as $key => $value2) {\n if(!$value2->FK_DOCUMENTO_ODC){\n $next_periodo= TblPeriodos::find()->where(['PK_PERIODO'=>$value2->PK_PERIODO])->one();\n $next_periodo->TARIFA = $data['TblPeriodos']['TARIFA'];\n $new_monto = $next_periodo->TARIFA * $next_periodo->HORAS;\n $next_periodo->MONTO=$new_monto;\n $next_periodo->save(false);\n }else{\n break;\n }\n }\n\n }\n /*Fin Cambio de Tafiras*/\n\n if($periodosImpactados == null){\n $periodosImpactados = $periodosImpactados.''.$value;\n }else{\n $periodosImpactados = $periodosImpactados.', '.$value;\n }\n }\n if(isset($data['es_bolsa'])&&$data['es_bolsa']==1){\n $datos_bolsa->save(false);\n if(isset($data['eliminar_periodo_bolsa'])){\n foreach ($data['eliminar_periodo_bolsa'] as $pk_periodo_desligar) {\n $periodo_desligar = TblPeriodos::find()->where(['PK_PERIODO'=>$pk_periodo_desligar])->one();\n\n $documento_odc= TblDocumentos::find()->where(['PK_DOCUMENTO'=>$periodo_desligar->FK_DOCUMENTO_ODC])->one();\n $documento_odc->delete();\n\n $documento_hde= TblDocumentos::find()->where(['PK_DOCUMENTO'=>$periodo_desligar->FK_DOCUMENTO_HDE])->one();\n $documento_hde->delete();\n\n $datos_bolsa->HORAS_DISPONIBLES = $datos_bolsa->HORAS_DISPONIBLES + $periodo_desligar->HORAS;\n $datos_bolsa->MONTO_DISPONIBLE = $datos_bolsa->HORAS_DISPONIBLES * $datos_bolsa->TARIFA;\n\n $datos_bolsa->save(false);\n\n $periodo_desligar->FK_DOCUMENTO_ODC=null;\n $periodo_desligar->FK_DOCUMENTO_HDE=null;\n $periodo_desligar->TARIFA_HDE=null;\n $periodo_desligar->HORAS_HDE=null;\n $periodo_desligar->MONTO_HDE=null;\n $periodo_desligar->save(false);\n }\n }\n }\n\n //Bitacora para Periodos impactados por Carga/Modificación de Documento ODC.\n $descripcionBitacora = 'FK_PERIODOS_IMPACTADOS= '.$periodosImpactados.' EN REGISTRO_AFECTADO SE INSERTA EL VALOR DE -PK_ASIGNACION-';\n user_log_bitacora($descripcionBitacora,'Periodos Impactados',$datos['id']);\n }\n }\n $this->redirect(['periodos/index','id'=>$datos['id']]);\n }\n\n if (Yii::$app->request->isAjax) {\n $data = Yii::$app->request->post();\n $post=null;\n parse_str($data['data'],$post);\n\n /*\n $pagina =(!empty($data['pagina']))? trim($data['pagina']):'';\n\n $query= TblPeriodos::find()\n //->andWhere(['LIKE', 'NOMBRE_CLIENTE', $nombre])\n //->andWhere(['LIKE', 'RFC', $rfc])\n //->andWhere(['LIKE', 'FK_GIRO', $giro])\n ->orderBy(['PK_PERIODO' => SORT_DESC])->all();\n\n if(count($query)<$tamanio_pagina){\n $pagina=1;\n }*/\n\n $pagina =(!empty($data['pagina']))? trim($data['pagina']):'';\n\n $query = (new \\yii\\db\\Query())\n ->select('tbl_periodos.PK_PERIODO\n , tbl_periodos.FECHA_INI\n , tbl_periodos.FECHA_FIN\n , tbl_periodos.TARIFA\n , tbl_periodos.MONTO\n , tbl_empleados.NOMBRE_EMP\n , tbl_empleados.APELLIDO_PAT_EMP\n ')\n ->from('tbl_periodos')\n ->join('JOIN','tbl_asignaciones',\n 'tbl_asignaciones.PK_ASIGNACION = tbl_periodos.FK_ASIGNACION')\n ->join('JOIN','tbl_empleados',\n 'tbl_empleados.PK_EMPLEADO = tbl_periodos.FK_EMPLEADO')\n /*->join('LEFT JOIN','tbl_documentos',\n 'tbl_documentos.FK_PERIODO = tbl_periodos.PK_PERIODO')*/\n ->orderBy('tbl_periodos.PK_PERIODO DESC')\n -> all();\n\n if(count($query)<$tamanio_pagina){\n $pagina=1;\n }\n\n $dataProvider = new ActiveDataProvider([\n 'query'=>(new \\yii\\db\\Query())\n ->select('tbl_periodos.PK_PERIODO\n , tbl_periodos.FECHA_INI\n , tbl_periodos.FECHA_FIN\n , tbl_periodos.TARIFA\n , tbl_periodos.MONTO\n , tbl_empleados.NOMBRE_EMP\n , tbl_empleados.APELLIDO_PAT_EMP\n ')\n ->from('tbl_periodos')\n ->join('JOIN','tbl_asignaciones',\n 'tbl_asignaciones.PK_ASIGNACION = tbl_periodos.FK_ASIGNACION')\n ->join('JOIN','tbl_empleados',\n 'tbl_empleados.PK_EMPLEADO = tbl_periodos.FK_EMPLEADO')\n ->orderBy('tbl_periodos.PK_PERIODO DESC')\n ,\n 'pagination' => [\n 'pageSize' => $tamanio_pagina,\n 'page' => $pagina-1,\n ],\n ]);\n /*$dataProvider = new ActiveDataProvider([\n 'query'=>TblPeriodos::find()\n //->andWhere(['LIKE', 'NOMBRE_CLIENTE', $nombre])\n //->andWhere(['LIKE', 'RFC', $rfc])\n //->andWhere(['LIKE', 'FK_GIRO', $giro])\n ->orderBy(['PK_PERIODO' => SORT_DESC])\n ,\n 'pagination' => [\n 'pageSize' => $tamanio_pagina,\n 'page' => $pagina-1,\n ],\n ]);*/\n\n $resultado=$dataProvider->getModels();\n //var_dump($resultado);\n foreach ($resultado as $key => $value) {\n\n $periodos = TblPeriodos::find()->where(['PK_PERIODO' => $resultado[$key]['PK_PERIODO']])->limit(1)->one();\n if($periodos){\n $idperiodo = $periodos->PK_PERIODO;\n }else{\n $idperiodo = 'Sin Definir';\n }\n\n $resultado[$key]['PK_PERIODO']=$idperiodo;\n }\n\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n $res = array(\n 'pagina' => $pagina,\n 'data' => $dataProvider->getModels(),\n 'total_paginas' => ceil($dataProvider->getPagination()->totalCount / $tamanio_pagina),\n );\n return $res;\n }else{\n $dataProvider = new ActiveDataProvider([\n 'query' => TblPeriodos::find()->orderBy(['PK_PERIODO' => SORT_DESC]),\n 'pagination' => [\n 'pageSize' => $tamanio_pagina,\n 'page' => 0,\n ],\n ]);\n\n $datos = Yii::$app->request->get();\n if($modelComentariosAsignaciones3){\n $periodosAsignacion = (new \\yii\\db\\Query())\n ->select('PK_PERIODO, FECHA_INI, FECHA_FIN, TARIFA')\n ->from('tbl_periodos')\n ->where(['FK_ASIGNACION' => $datos['id'] ])\n ->andWhere(['<','FECHA_INI',$modelComentariosAsignaciones3[0]['FECHA_FIN'] ])\n ->orderBy(['FECHA_INI' => SORT_ASC])\n ->all();\n\n $tarifas = '';\n if ($periodosAsignacion) {\n foreach ($periodosAsignacion as $key) {\n $tarifas[$key['PK_PERIODO']] = $key['TARIFA'];\n }\n }\n\n }else{\n $periodosAsignacion = (new \\yii\\db\\Query())\n ->select('PK_PERIODO, FECHA_INI, FECHA_FIN, TARIFA')\n ->from('tbl_periodos')\n ->where(['FK_ASIGNACION' => $datos['id'] ])\n ->orderBy(['FECHA_INI' => SORT_ASC])\n ->all();\n\n $tarifas = '';\n if ($periodosAsignacion) {\n foreach ($periodosAsignacion as $key) {\n $tarifas[$key['PK_PERIODO']] = $key['TARIFA'];\n }\n }\n\n }\n\n $reemplazos = TblAsignacionesReemplazos::find()->where(['FK_ASIGNACION' => $datos['id'] ])->orderBy(['PK_ASIGNACION_REEMPLAZO' => SORT_DESC])->asArray()->limit(1)->one();\n $cat_tarifas=[];\n //if($sql['DESC_TARIFA']){\n $fks_cat_tarifas = TblTarifasClientes::find()->select(['FK_CAT_TARIFA'])->where(['FK_CLIENTE'=>$sql['PK_CLIENTE']])->column();\n $cat_tarifas= TblCatTarifas::find()->andWhere(['IN','PK_CAT_TARIFA',$fks_cat_tarifas])->asArray()->all();\n //}\n\n\n return $this->render('index', [\n 'data' => $dataProvider->getModels(),\n 'total_paginas' => ceil($dataProvider->getPagination()->totalCount / $tamanio_pagina),\n 'dataProvider' => $dataProvider,\n 'modelSubirDoc' => $modelSubirDoc,\n 'periodosAsignacion' => $periodosAsignacion,\n 'modeloDocumentos' => $modeloDocumentos,\n 'modelSubirDocHde' => $modelSubirDocHde,\n 'modelSubirDocFactura' => $modelSubirDocFactura,\n 'modelSubirDocFacturaXML' => $modelSubirDocFacturaXML,\n 'modeloHde' => $modeloHde,\n 'modeloFactura' => $modeloFactura,\n 'sql' => $sql,\n 'reemplazos' => $reemplazos,\n 'tarifas' => $tarifas,\n 'modelComentariosAsignaciones3' => $modelComentariosAsignaciones3,\n 'cat_tarifas' => $cat_tarifas,\n ]);\n }\n $connection->close();\n }", "title": "" }, { "docid": "4408c3fb12c15a45f5aa00512b41a588", "score": "0.6057665", "text": "function reportsAction(){\n// $Tables = new DataTable(parent::getAdapter(),'__structure_menu');\n// // $facults =\n// $request = $this->getRequest();\n// if($request->isPost())\n// {\n// $post = new Data();\n// $post->exchangeArray($request->getPost());\n//\n// $tables = explode(' ',$post->id_kaf);\n//\n// //$TableInfos = $post->id_kaf;\n//\n//\n// }\n//\n// return array(\n// 'facult' => $Fac->fetchAll(),\n// 'tables'=>$Tables->fetchAll(),\n// );\n }", "title": "" }, { "docid": "32afb7867fd7802c01f43990641d081a", "score": "0.6057064", "text": "public function CrearReporte()\r\n {\r\n IncludeClass(\"ConexionBD\");\r\n IncludeClass('listas_proveedoresSQL', 'classes', 'app', 'listas_proveedores');\r\n\r\n // $sql = new listas_proveedoresSQL();\r\n\r\n // $pacientes = $sql->ObtenerPacientesII($this->datos);\r\n\r\n // $html .= \"<table class=\\\"normal_10\\\" width=\\\"100%\\\" align=\\\"center\\\" border=\\\"1\\\" rules=\\\"all\\\">\\n\";\r\n // $html .= \" <tr class=\\\"label\\\" align=\\\"center\\\">\";\r\n // $html .= \" <td>PACIENTE</td>\";\r\n // $html .= \" <td>IDENTIFICACION</td>\";\r\n // $html .= \" <td>FECHA</td>\";\r\n\r\n // $html .= \" </tr>\";\r\n\r\n // foreach ($pacientes as $k => $d) {\r\n\r\n // $html .= \" <tr >\";\r\n // $html .= \" <td>\" . $d['primer_nombre'] . \" \" . $d['segundo_nombre'] . \" \" . $d['primer_apellido'] . \" \" . $d['segundo_apellido'] . \"</td>\";\r\n // $html .= \" <td>\" . $d['tipo_id_paciente'] . \" \" . $d['paciente_id'] . \"</td>\";\r\n // $html .= \" <td>\" . $d['fecha_ingreso'] . \"</td>\";\r\n\r\n // $html .= \" </tr>\";\r\n // }\r\n\r\n // $html .= \"</table>\";\r\n\r\n return $html;\r\n }", "title": "" }, { "docid": "e3526f9ee321be465c575a8a2454f0cf", "score": "0.6051866", "text": "function f_consultar_reportes(\n\t\t\t$cod_tabla\t\t\t\t,\n\t\t\t$arr_post\t\t\t\t,\n\t\t\t$ord_por\t\t\t\t,\n\t\t\t$num_max_registros\t= 20,\n\t\t\t$num_pagina\t\t\t= 0\n\t){\n\t\tglobal $db;\n\t\t\n\t\t$condicion \t\t\t\t\t= \tarray();\n\t\t$sis_genericos\t\t\t\t= \tnew sis_genericos;\n\t\t$reporte_tabla\t\t\t\t=\tnew reporte_tabla;\n\t\t//=== Indica la paginacion para que no se muestren todos los registros en un solo pantallaso>>>\n\t\tif($num_pagina>0)\t$num_pagina \t= $num_pagina-1;\n\t\tif(!$num_pagina) \t$limite_inicial = 0;\n\t\telse\t\t\t\t$limite_inicial = $num_pagina*$num_max_registros;\n\t\t$limite_final \t\t= $limite_inicial+ $num_max_registros;\n\t\t\n\t\t//Obtiene las columnas de la tabla >>>\n\t\t$query =\"\n\t\tselect \t\t* \n\t\tfrom \t\tcolumna_tabla_autonoma\n\t\twhere\t\tind_filtro\t\t\t= 1\n\t\tand\t\t\tcod_tabla\t\t\t= $cod_tabla\n\t\torder by \tnum_orden_insert\";\n\n\t\t$cursor_columnas\t\t= $db->consultar($query);\n\t\t$num_registros \t\t\t= $db->num_registros($cursor_columnas);\n\t\t$row_imput\t\t\t\t= array();\n\t\tfor($i=0; $i<$num_registros; $i++){\n\t\t\t$row_info_columna\t\t\t\t\t\t\t\t= $db->sacar_registro($cursor_columnas,$i);\n\t\t\t$txt_nombre_columna\t\t\t\t\t\t\t\t= $row_info_columna['txt_nombre'];\n\t\t\t$txt_script_cursor\t\t\t\t\t\t\t\t= $row_info_columna['txt_script_cursor'];\n\t\t\t$value\t\t\t\t\t\t\t\t\t\t\t= $arr_post[$txt_nombre_columna];\n\n\t\t\t//=== Evita confusion entre el NULL y el cero>>>\n\t\t\tif($value===0) $value=\"0\";\n\t\t\t//=== Evalua datos tipo NUMERIC SIN FORMATO >>>\n\t\t\tif(($row_info_columna['cod_tipo_dato_columna'] == 5 || $row_info_columna['cod_tipo_dato_columna'] == 7) && $value != NULL)\n\t\t\t\t\tarray_push($condicion,\"t.$txt_nombre_columna in($value)\");\n\t\t\t//=== Evalua datos tipo LISTBOX >>>\n\t\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 4 && $value !=-1 && $value !== NULL){\n\t\t\t\tif($value==0) $value =\"0\";\n\t\t\t\tarray_push($condicion,\"t.$txt_nombre_columna =$value\");\n\t\t\t}\t\t\t\n\t\t\t//=== Evalua datos tipo DATE CON FORMATO, como es un filtro lo evalua desde la fehca inicial hasta la final >>>\n\t\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 3 || $row_info_columna['cod_tipo_dato_columna'] == 8){\n\t\t\t\t$value1\t= $arr_post[$txt_nombre_columna.\"_inicial\"];\n\t\t\t\t$value2\t= $arr_post[$txt_nombre_columna.\"_final\"];\n\t\t\t\tif($value1){\n\t\t\t\t\tarray_push($condicion,\"t.$txt_nombre_columna >='$value1 00:00:00'\");\n\t\t\t\t}\n\t\t\t\tif($value2){\n\t\t\t\t\tarray_push($condicion,\"t.$txt_nombre_columna <='$value2 23:59:59'\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//=== Evalua datos tipo VARCHAR CON O SIN NUMEROS >>>\n\t\t\telse if(($row_info_columna['cod_tipo_dato_columna'] == 1 || \n\t\t\t\t\t$row_info_columna['cod_tipo_dato_columna'] == 15) && $value != NULL){\n\t\t\t\t//=== Evita con caracteres especiales como ñ, espacios, etc >>>\n\t\t\t\t$value = $sis_genericos->f_preparar_cadena_para_db($value);\n\t\t\t\tarray_push($condicion,\"t.$txt_nombre_columna like '%$value%'\");\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$condiciones \t\t\t\t= implode(\" AND \", $condicion);\n\t\tif ($condiciones) \t\t\t$condiciones = \" and $condiciones\";\n\t\t//Obtiene informacion del pk y de la tabla >>>\n\t\t$query =\"\n\t\tselect \t\tcta.txt_nombre\t\t\tas\ttxt_nombre_columna_pk\n\t\tfrom \t\tcolumna_tabla_autonoma\tcta,\n\t\t\t\t\ttabla_autonoma\t\t\tta\n\t\twhere\t\tcta.ind_pk\t\t\t\t= 1\n\t\tand\t\t\tta.cod_tabla\t\t\t= $cod_tabla\n\t\tand\t\t\tcta.cod_tabla\t\t\t= ta.cod_tabla\";\n\t\t$row\t\t\t\t\t= $db->consultar_registro($query);\n\t\t$nom_pk\t\t \t\t\t= $row['txt_nombre_columna_pk'];\n\t\t//==== Obtiene el script de la consulta de acuerdo al reporte seleccionado>>>>\t\t\n//\t\t$txt_script_consulta\t= \t$reporte_tabla->f_get_consulta( $arr_post['cod_reporte_tabla'], $cod_tabla);\n\n\t\t$txt_script_consulta\t=\t$reporte_tabla->f_get_script_reportes($arr_post['cod_pk_reporte'],$cod_tabla,$arr_post['cod_usuario']);\t\t\n\n\t\t\n\t\t$row_imput\t\t\t\t= array();\n\t\t//=== Ordenamiento >>>\n\t\tif($ord_por==-1 ||$ord_por==NULL)\t$ord_por = \"t.$nom_pk desc\";\n\t\t\n\t\t\n\t\t// remplaza el idioma de mysql en caso de que la consulta lo necesite\n\t\t$txt_script_consulta\t= str_replace(\"set_idioma_consulta_spanish\",\"SET lc_time_names = 'es_CO';\",$txt_script_consulta);\n\t\t\n\t\t\n\t\t\n\t\t$txt_script_consulta\t= str_replace(\"condiciones_script_consulta\",$condiciones,$txt_script_consulta);\n\t\t\n\t\t\n\t\t\n\t\t$cod_periodo_facturacion \t= $arr_post['cod_pk_periodo'];\n\t\t// $cod_entidad\t\t\t\t= $arr_post['cod_entidad_cmb'];\n\t\t//$cod_entidad_multiple\t\t= $arr_post['cod_entidad_multiple'];\n\t\t//$cod_entidad_multiple\t\t= implode(',',$cod_entidad_multiple);\n\n\t\t$arr_cod_archivos\t\t\t= $arr_post['cod_archivo'];\n\t\t$cadena_cod_archivos\t\t= implode(',',$arr_cod_archivos);\n\t\t$cod_pk_reporte_tabla\t\t= $arr_post['cod_pk_reporte'];\n\t\t \n\t\t\n\t\t\n\t\t// rango de codigos de facturas que el usuario eligio separado por coma\n\t\t$cods_factura\t\t\t\t= $arr_post['cod_facturas'];\n\t\t\n\n\t\t\t\n\t\t// valida si el codigo de periodo llega vacio o con dato\n\t\tif($cadena_cod_archivos){\n\t\t\t$cod_periodo_facturacion\t= \"and t.cod_nombre_archivos in ($cadena_cod_archivos)\";\n\t\t}else{$cod_periodo_facturacion = '';}\n\t\t\n\t\t//busca la condicion del periodo de factura desntro del script del reporte\n\t\tif($cod_periodo_facturacion){\n\t\t\t$txt_script_consulta\t= str_replace(\"condicion_periodo_facturacion\", $cod_periodo_facturacion,$txt_script_consulta);\n\t\t}else{\n\t\t\t$txt_script_consulta\t= str_replace(\"condicion_periodo_facturacion\",'',$txt_script_consulta);\n\t\t}\n\t\t\t\t\n\t\t\t\n\t\t// valida si el codigo de entidad tiene dato o no\n\t\t/*if($cod_entidad && $cod_entidad != -1){\n\t\t\t$cod_entidad = \"and t.cod_entidad in ($cod_entidad)\";\t\t\n\t\t}else{$cod_entidad = '';}\n\t\t// busca la condicion de entidad en el script y remplaza \n\t\tif($cod_entidad){\n\t\t\t$txt_script_consulta\t= str_replace(\"condicion_reporte_entidad\",$cod_entidad,$txt_script_consulta);\n\t\t}else{\n\t\t\t$txt_script_consulta\t= str_replace(\"condicion_reporte_entidad\",'',$txt_script_consulta);\t\t\n\t\t}*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif($cod_entidad_multiple && $cod_entidad_multiple != -1){\n\t\t\t\t$cond_ntdad_multiple = \"and t.cod_entidad in ($cod_entidad_multiple)\";\t\t\t\t\n\t\t}else{\n\t\t\t\t$cond_ntdad_multiple = '';\n\t\t}\n\t\t\n\t\t\n\t\tif($cond_ntdad_multiple){\n\t\t\t$txt_script_consulta\t= str_replace(\"condicion_reporte_entidad\",$cond_ntdad_multiple,$txt_script_consulta);\n\t\t}else{\n\t\t\t$txt_script_consulta\t= str_replace(\"condicion_reporte_entidad\",'',$txt_script_consulta);\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//=== Genera consulta para resolver el numero de registros a encontrar (esto se hace para mejorar el rendimiento) >>>\n\t\t$txt_script_consulta\t\t= strtolower($txt_script_consulta); \n\t\t$txt_script_num_registros\t= explode(\"from\",$txt_script_consulta);\n\t\t$txt_script_num_registros[0]= \"\"; //quita el escript\n\t\t$txt_script_num_registros\t= implode(\"from\",$txt_script_num_registros);\n\t\t\n\t\t$ind_group_by\t\t\t\t= explode(\"group by\",$txt_script_num_registros);\n\t\tif($ind_group_by[1]) \t\t$ind_group_by = true;\n\t\telse\t\t\t\t\t\t$ind_group_by = false;\n\n\t\t$txt_script_num_registros\t= \"select count(*) $txt_script_num_registros\";\n\t\t\n\t\tif($ind_group_by){\n\t\t\t\n\t\t\t\t$cursor_num_registros\t\t= $db->consultar($txt_script_num_registros);\n\t\t\t\t$num_reigstros\t\t\t\t= $db->num_registros($cursor_num_registros); //por si viene con un group by \n\t\t\t\t$resultado['NUM_REGISTROS'] += $num_reigstros; //la cantidad de datos que tiene el cursor\n\t\t}else{\n\t\t\t\t\n\n\t\t\t\t$row = $db->consultar_registro($txt_script_num_registros);\n\t\t\t\t$resultado['NUM_REGISTROS']\t\t+= $row[0];\n\t\t}\n\t\t\n\t\t\n\t\t//=== Obtiene los datos>>>\n\t\tif($resultado['NUM_REGISTROS']){\n\t\t\t$query\t\t\t\t\t= \"$txt_script_consulta\";\n\t\t\n\t\t\t$cursor \t\t\t\t= $db->consultar($query);\n\t\t\t$resultado['NUM_REGISTROS']\t\t= $db->num_registros($cursor);\t\t\n\t\t\t$resultado['DATOS']\t\t\t\t= $cursor;\t\t\n\t\t}\t\t\n\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "f70f41f79826e7de3f11def03cfb7d38", "score": "0.6044005", "text": "static public function ctrMostrarReportePagos($orden1,$orden2,$canc,$vend,$inicio,$fin){\n\t\t$tabla=\"cuenta_ctejf\";\n\t\t$respuesta = ModeloCuentas::mdlMostrarReportePagos($tabla,$orden1,$orden2,$canc,$vend,$inicio,$fin);\n\n\t\treturn $respuesta;\n\n\t}", "title": "" }, { "docid": "13e59af1ba55554431ac7a611b036cb0", "score": "0.6040659", "text": "function ordenes_pago_multiple($nro_orden,$simbolo_moneda,$width,$mostrar_total)\r\n{global $bgcolor3;\r\n\r\n $colspan=2;\r\n $colspan2=1;\r\n\r\n?>\r\n\r\n <table border=1 width=\"<?=$width?>\" cellspacing=0 cellpadding=5 align=\"center\">\r\n <tr>\r\n <td style=<?=\"border:$bgcolor3;\"?> align=\"center\" id=mo colspan=<?=$colspan?>>\r\n <b>Ordenes de Compra que se incluyen en el pago</b>\r\n </td>\r\n </tr>\r\n <?//generamos la tabla con detalle de las ordenes de compra\r\n $tam=sizeof($nro_orden);\r\n $total_a_pagar=0;\r\n for($i=0;$i<$tam;$i++)\r\n {?>\r\n <tr>\r\n <td colspan=<?=$colspan2?>>\r\n <b>Nro Orden: </b><?=$nro_orden[$i]?>\r\n </td>\r\n <td colspan=<?=$colspan2?>>\r\n <b>Monto: </b><?$m_orden=monto_a_pagar($nro_orden[$i]);\r\n $total_a_pagar+=$m_orden;\r\n echo \"$simbolo_moneda \";\r\n echo formato_money($m_orden);\r\n ?>\r\n </td>\r\n </tr>\r\n <?\r\n }//del for\r\n if($mostrar_total)\r\n {?>\r\n <tr>\r\n <td colspan=<?=$colspan?> align=\"center\">\r\n <b>Total a Pagar <?echo \"<font color=red size=2>\";\r\n echo \"$simbolo_moneda \";\r\n echo formato_money($total_a_pagar);\r\n ?>\r\n </td>\r\n </tr>\r\n </table>\r\n <?\r\n }//de if($mostrar_total)\r\n return $total_a_pagar;\r\n}", "title": "" }, { "docid": "b1298805850afae405a1684f764579c0", "score": "0.60262746", "text": "function show_rpt() {\r\n\t\t$cls_mtd_html = $this->router->fetch_class().\"/cetak/html/\";\r\n\t\t$cls_mtd_pdf = $this->router->fetch_class().\"/cetak/pdf/\";\r\n\t\t$data['rpt_html'] = active_module_url($cls_mtd_html. $_SERVER['QUERY_STRING']);;\r\n\t\t$data['rpt_pdf'] = active_module_url($cls_mtd_pdf . $_SERVER['QUERY_STRING']);;\r\n $this->load->view('vjasper_viewer', $data);\r\n\t}", "title": "" }, { "docid": "1b65943397f1af9f47cdbe0ec4abea79", "score": "0.6023075", "text": "public function ListarReporte(){\n\t\t\t\trequire_once(\"conexionpdo.php\");//se llama al archivo para la conexion\n\n\t\t\t\t$sql = \"SELECT \ts.cedula AS cedulasol, \n\t\t\t\t\t\t\t\t\ts.nombre AS nombresol,\n\t\t\t\t\t\t\t\t\ts.apellido AS apellidosol,\n\t\t\t\t\t\t\t\t\tt.nombre AS tipo,\n\t\t\t\t\t\t\t\t\ta.nombre AS area,\n\t\t\t\t\t\t\t\t\tsa.nombre AS subarea,\n\t\t\t\t\t\t\t\t\tss.motivo AS motivo,\n\t\t\t\t\t\t\t\t\tss.fecha AS fecha,\n\t\t\t\t\t\t\t\t\tss.id AS idsoli\n\t\t\t\t\t\t\tFROM solicitud AS ss INNER JOIN solicitante AS s \n\t\t\t\t\t\t\tON ss.id_sol=s.id INNER JOIN tipo_solicitud AS t \n\t\t\t\t\t\t\tON ss.id_tipo=t.id INNER JOIN subarea AS sa\n\t\t\t\t\t\t\tON ss.id_subarea=sa.id INNER JOIN area AS a \n\t\t\t\t\t\t\tON sa.id_area=a.id WHERE ss.estatus='a' ORDER BY ss.id ASC\";//consulto si existe el registro\n\t\t\t\t$result = $con->prepare($sql);//preparar la sentencia sql\n\t\t\t\t$result->execute();\n\t\t\t\treturn $result->fetchAll(PDO::FETCH_OBJ);\n\t\t\t}", "title": "" }, { "docid": "025a9b8acaa35f23ee35b3f99b64b6d9", "score": "0.6020175", "text": "function visualizar($pag=\"\",$orderby=\"\",$nombrecampo=\"\")\n {\n global $sContrato,$sIdConvenioAct,$rptDiario;\n $this->nombrecampo = $nombrecampo ;\n for($i=0;$i<2;$i++){\n $consulta = $this->sql;\n //filas obtenidas\n $total = $this->contarfilas($consulta);\n //tamaņo del paginador\n if($total<200):\n $tampag=10;\n elseif ($total<400):\n $tampag=10;\n else:\n $tampag=10;\n endif;\n $iniciaren=($pag-1) * $tampag; //Registro actual\n if($iniciaren<0)$iniciaren=0;\n \n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n \n if ($orderby !=\"\"){\n $consulta = $this->sql.\" ORDER BY $orderby LIMIT $iniciaren,$tampag\";\n }\n else {\n $consulta = $this->sql.\" LIMIT $iniciaren,$tampag\"; \n }\n \n $result = $this->query($consulta);\n //obtener descripcion de la tabla\n $tablades = $this->comentarioTabla($this->nombreTabla($result, 0));\n //si no tiene, poner como descripcion el nombre de la misma\n if ($tablades == \"\") $tablades = $this->nombreTabla($result, 0);\n \n echo \"\\n<center><table class='enhancedtablerowhover'>\n \\n<caption>\".$tablades.\"</caption>\n \\n<thead>\n \\n<tr>\n \\n<td scope='col' colspan=4</td>\";\n if( $this->nombrecampo==\"\"){\n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n $campo=$this->nombreCampo($result, $i);\n //los campos imagen no mostrarlos\n if (!$this->mostrarCampo($campo))\n continue;\n //obtener descripcion del campo \n $des = str_replace(\"/*\", \"\", $this->comentario($this->nombreCampo($result, $i),\n $this->nombreTabla($result, $i)));\n //si no tiene, poner como descripcion el nombre del mismo\n if ($des == \"\" ) $des = $campo;\n echo \"\\n<th scope='col' ><a href='?order=$campo'>$des</a></th>\";\n }\n }\n else{\n foreach($this->nombrecampo as $title){\n print(\"<th scope='col'>$title</th>\");\n }\n }\n echo \" \\n</tr>\n \\n</thead>\n \\n<tbody>\";\n while ($row = mysql_fetch_array($result))\n {\n $filtro = $this->cifrar($row, $result);\n echo \"\\n<tr>\";\n echo \"\\n<td class='CrearReporte' >\\n<a title='Modificar Caratula de Reporte' href='?sContrato=$sContrato&dIdFecha=\".$row['dIdFecha'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&sIdTurno=\".$row['sIdTurno'].\"'>\\n<img src='\".$this->PathImages.\"editar.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='Eliminar Caratula de Reporte' href='$_SERVER[PHP_SELF]?operacion=b&$filtro'>\\n<img src='\".$this->PathImages.\"eliminar.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='Imprimir el Reporte Diario' href=\\\"./../../../../Acceso/scripts/php/Reportes/$rptDiario/rptReporteDiario.php?sContrato=\".$sContrato.\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&dFecha=\".$row['dIdFecha'].\"&sIdTurno=\".$row['sIdTurno'].\"&sIdConvenio=\".$row['sIdConvenio'].\"&lStatus=\".$row['lStatus'].\"&sNumeroReporte=\".$row['sNumeroReporte'].\"\\\" target=_blank >\\n<img src='\".$this->PathImages.\"impresora.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='Analisis Financiero' href=\\\"./../../../../../reporte.php?sContrato=\".$sContrato.\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&dIdFecha=\".$row['dIdFecha'].\"&sIdTurno=\".$row['sIdTurno'].\"&sIdConvenio=\".$row['sIdConvenio'].\"&lStatus=\".$row['lStatus'].\"&reportesPath=financiero&nombreReporte=costoPersonalEquipo\\\" target=_blank >\\n<img src='\".$this->PathImages.\"pesos.png' width=17 height=17>\\n</a></td> \";\n // acroba2t.gif\n for ($i = 0; $i < mysql_num_fields($result); $i++)\n {\n if(strpos($this->nombreCampo($result, $i), \"Imagen\") and $tipo = $this->tipoCampo($result, $i)==\"blob\") \n {\n $nombreImagen=\"\";\n foreach($this->campollave as $claves){\n $nombreImagen.=$row[$claves]; \n }\n $nombreImagen.=\".jpg\";\n //$nombreImagen=$row[$this->campollave].\".jpg\";\n $img = $this->procesarImagen($row[$i],$nombreImagen);\n }\n if (!$this->mostrarCampo($this->nombreCampo($result, $i)))\n continue;\n if ($img){\n echo \"\\n<td><img src = '$nombreImagen' width = '100' heigth = '100'</img></td>\"; \n $img = false;\n }\n else if($this->tipoCampo($result,$i)==\"real\" and (strpos($this->nombreCampo($result,$i),\"Costo\") or strpos($this->nombreCampo($result,$i),\"Venta\")))\n echo \"\\n<td>$ \".number_format($row[$i],2,'.',',').\"</td>\";\n else if($this->tipoCampo($result,$i)==\"real\" and strpos($this->nombreCampo($result,$i),\"Avance\"))\n echo \"\\n<td>\".number_format($row[$i],1,'.',',').\" % </td>\";\n else if(strpos(strtolower($this->nombreCampo($result, $i)), strtolower(\"fecha\"))!==false){//formato de fecha\n echo \"\\n<td>\".formatoFecha($row[$i]).\"</td>\";\n }\n else\n echo \"\\n<td>\".$row[$i].\"</td>\";\n }\n #Saber si tiene permisos para validar\n $sql_ =\"select lValida from usuarios where sIdUsuario='\".$_SESSION['sIdUsuario'].\"'\";\n $result_ = mysql_query($sql_);\n if($row_=mysql_fetch_array($result_))\n $valida = $row_['lValida'];\n \n echo \"\\n<td class='CrearReporte' >\\n<a title='(1) Jornadas y Tiempos' href='jornadas/mostrar.php?sContrato=$sContrato&fecha=\".$row['dIdFecha'].\"&orden=\".$row['sNumeroOrden'].\"&convenio=\".$row['sIdConvenio'].\"&turno=\".$row['sIdTurno'].\"'>\\n<img src='\".$this->PathImages.\"jornadasDiarias.png' width=17 height=17>\\n</a></td> \";\n\n echo \"\\n<td class='CrearReporte' >\\n<a title='(2) Firmantes del Dia' href='../../../../frmFirmas.php?reportediario=si&fecha=\".$row['dIdFecha'].\"&orden=\".$row['sNumeroOrden'].\"'>\\n<img src='\".$this->PathImages.\"firmantes.png' width=17 height=17>\\n</a></td> \";\n// echo \"\\n<td class='CrearReporte' >\\n<a title='(2) Firmantes del Dia' href='../firmantes/mostrar.php?reportediario=si&fecha=\".$row['dIdFecha'].\"&orden=\".$row['sNumeroOrden'].\"'>\\n<img src='\".$this->PathImages.\"firmantes.png' width=17 height=17>\\n</a></td> \";\n // echo \"\\n<td class='CrearReporte' >\\n<a title='(2) Firmantes del Dia' href='../firmantes/index.php?reportediario=si&fecha=\".$row['dIdFecha'].\"&orden=\".$row['sNumeroOrden'].\"'>\\n<img src='\".$this->PathImages.\"firmantes.png' width=17>\\n</a></td> \";\n\n echo \"\\n<td class='CrearReporte' >\\n<a title='(3) Permisos' href='../../permisosdeseguridad/index.php?sContrato=$sContrato&fecha=\".$row['dIdFecha'].\"&orden=\".$row['sNumeroOrden'].\"&convenio=\".$row['sIdConvenio'].\"&pag=1'>\\n<img src='\".$this->PathImages.\"permisos.png' width=17 height=17>\\n</a></td> \";\n //echo \"\\n<td class='CrearReporte' >\\n<a title='(4) Aviso de Embarque' href='avisosdeembarques/?sContrato=$sContrato&dIdFecha=\".$row['dIdFecha'].\"&orden=\".$row['sNumeroOrden'].\"&convenio=\".$row['sIdConvenio'].\"&pag=1'>\\n<img src='\".$this->PathImages.\"embarques.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='(4) Aviso de Embarque' href='../../../../frmAvisosEmbarques.php?orden=\".$row['sNumeroOrden'].\"'>\\n<img src='\".$this->PathImages.\"embarques.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='(5) Volumenes de Obra y Notas' href='volumenes/volumenes.php?sContrato=$sContrato&dIdFecha=\".$row['dIdFecha'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&convenio=\".$row['sIdConvenio'].\"&sIdTurno=\".$row['sIdTurno'].\"&lStatus=\".$row['lStatus'].\"&pag=1'>\\n<img src='\".$this->PathImages.\"volumenes.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='(6) Alcances por Partida Anexo' href='alcancesxpartida/alcances.php?sContrato=$sContrato&dIdFecha=\".$row['dIdFecha'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&convenio=\".$row['sIdConvenio'].\"&sIdTurno=\".$row['sIdTurno'].\"&lStatus=\".$row['lStatus'].\"&pag=1'>\\n<img src='\".$this->PathImages.\"alcances.png' width=17 height=17>\\n</a></td> \";\n// echo \"\\n<td class='CrearReporte' >\\n<a title='(7) Personal y Equipo' href='personalyequipo/?sContrato=$sContrato&dIdFecha=\".$row['dIdFecha'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&convenio=\".$row['sIdConvenio'].\"&sIdTurno=\".$row['sIdTurno'].\"&pag=1'>\\n<img src='\".$this->PathImages.\"personal.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='(7) Personal y Equipo' href='../../../../frmPersonalEquipo.php?sContrato=$sContrato&dFecha=\".$row['dIdFecha'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&convenio=\".$row['sIdConvenio'].\"&sIdTurno=\".$row['sIdTurno'].\"&pag=1'>\\n<img src='\".$this->PathImages.\"personal.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='(8) Reporte Fotografico' onClick=\\\"window.open('fotografico/reportefotografico.php?numeroFolio=\".$row['sNumeroReporte'].\"&Fecha=\".$row['dIdFecha'].\"&sIdTurno=\".$row['sIdTurno'].\"&orden=\".$row['sNumeroOrden'].\"&pag=1','ReporteFotografico','width=500,height=300,scrollbars=yes,resizable=yes,status=0,toolbar=0');\\\" href='#'>\\n<img src='\".$this->PathImages.\"camara.png' width=17 height=17>\\n</a></td> \";\n\n $url=\"sContrato=$sContrato&dIdFecha=\".$row['dIdFecha'].\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&sIdConvenio=\".$row['sIdConvenio'].\"&sIdTurno=\".$row['sIdTurno'].\"&sNumeroReporte=\".$row['sNumeroReporte'];\n\n /* echo \"\\n</tr>\";\n echo \"\\n<tr>\";\n echo \"\\n<td colspan=12 >\\n</td> \";*/\n\t\t\tif($_SESSION['database']=='geotech' or $_SESSION['database']=='geotechAdal'){ \n echo \"\\n<td class='CrearReporte' >\\n<a title='(9) Control de Acarreos' href='../../../../frmControlAcarreo.php?$url'>\\n<img src='\".$this->PathImages.\"embarques.png' width=17 height=17>\\n</a></td> \";\n echo \"\\n<td class='CrearReporte' >\\n<a title='(10) Relacion Personal Equipo' href='../../../../frmRelacionPersonalEquipo.php?$url'>\\n<img src='\".$this->PathImages.\"embarques.png' width=17 height=17>\\n</a></td> \";\n }\n\t\t\t//echo \"\\n</tr>\";\n\n\n # if($valida=='Si')\n\n # echo \"\\n<td class='CrearReporte' >\\n<a title='(9) Validar Reporte Diario' href=\\\"ValidaReporteDiario/sqls.php?sContrato=\".$sContrato.\"&sNumeroOrden=\".$row['sNumeroOrden'].\"&dIdFecha=\".$row['dIdFecha'].\"&sIdTurno=\".$row['sIdTurno'].\"&sIdConvenio=\".$sIdConvenioAct.\"&lStatus=\".$row['lStatus'].\"\\\">\\n<img src='\".$this->PathImages.\"validar.jpg' width=17 height=17>\\n</a></td> \";\n //$sIdConvenioAct mensaje($row['sIdConvenio']);\n echo \"\\n</tr>\";// ../../../../Acceso/scripts/php/Reportes/generadores\n }\n echo \"\\n</tr></tbody></table></center>\";\n $this->paginar($pag, $total, $tampag, \"?pag=\"); \n }\n }", "title": "" }, { "docid": "dfa1c7729e8bf4093c87e16dc33776ca", "score": "0.6019432", "text": "public function reporte()\n {\n #referencia a la ruta que se va ir\n\n #todos los registros de los cliente\n #guarda en la variable clientes a todos los clientes\n $clientes=Cliente::all();\n\n return view('cliente.reporte', [\n #creando una variable activePage con el valor cliente-index\n #para saber en que opcionmenu estoy\n 'activePage' => 'cliente-index',\n #creacion de la variable cliente\n #mando a la vista la variable clientes\n 'clientes' => $clientes\n\n ]);\n }", "title": "" }, { "docid": "8ae42560349c1620ae103c7b750c3b74", "score": "0.6014094", "text": "public function filterReports()\n {\n if (isset($_GET[\"reports\"]) && !empty($_GET[\"reports\"])) {\n $reports = $_GET[\"reports\"];\n // jika jenis laporan yang dipilih penjualan\n if ($reports == '1') {\n\n // cek apakah user sudah memfilter laporan\n if (isset($_GET[\"filter\"]) && !empty($_GET[\"filter\"])) {\n $filter = $_GET[\"filter\"];\n // jika user memfilter dari bulan\n if ($filter == \"1\") {\n $this->_printTransaksiReportByMonth();\n } else {\n $this->_printTransaksiReportByYear();\n }\n }\n } else {\n // cek apakah user sudah memfilter laporan\n if (isset($_GET[\"filter\"]) && !empty($_GET[\"filter\"])) {\n $filter = $_GET[\"filter\"];\n // jika user memfilter dari bulan\n if ($filter == \"1\") {\n $this->_printGroomingReportsByMonth();\n } else {\n $this->_printGroomingReportsByYear();\n }\n }\n }\n }\n }", "title": "" }, { "docid": "f408c331bf98bd82d0507389d7570eb5", "score": "0.60126525", "text": "function Cabecera($pdf, $ftiponom, $nomina, $proceso, $periodo) {\r\n\t$pdf->AddPage();\r\n\t$pdf->SetDrawColor(255, 255, 255); $pdf->SetFillColor(255, 255, 255); $pdf->SetTextColor(0, 0, 0);\r\n\t$pdf->SetFont('Arial', 'B', 8);\r\n\t\r\n\t$pdf->Cell(190, 5, ('CONTRALORIA DEL ESTADO MONAGAS'), 0, 1, 'L');\r\n\t$pdf->Cell(190, 5, ('DIRECCION DE RECURSOS HUMANOS'), 0, 1, 'L');\r\n\t$pdf->Cell(190, 5, ('RELACION DE NOMINA - '.$nomina), 0, 1, 'L');\r\n\t$pdf->Cell(190, 5, ($periodo.' '.utf8_decode($proceso)), 0, 1, 'L');\r\n\t$pdf->Cell(190, 5, 'Pagina: '.$pdf->PageNo().'/{nb}', 0, 1, 'R');\r\n\t$pdf->Ln(5);\r\n\t\r\n\r\n\t$pdf->SetDrawColor(0, 0, 0); $pdf->SetFillColor(255, 255, 255); $pdf->SetTextColor(0, 0, 0);\r\n\t$pdf->SetWidths(array(8, 20, 105, 20, 40));\r\n\t$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C'));\r\n\t$pdf->Row(array('N°','CEDULA', 'APELLIDOS Y NOMBRES', 'MONTO Bs.', 'NRO. CUENTA'));\r\n}", "title": "" }, { "docid": "cb05dee012e4eb40356d8163bbc15893", "score": "0.6012614", "text": "public function BuscarPagos() {\r\n\r\n $condicion = \"\";\r\n if ($this->TxtNroDocumento->Text != \"\" && is_numeric($this->TxtNroDocumento->Text)) {\r\n $condicion = \" AND NrObligacion = \" . $this->TxtNroDocumento->Text;\r\n }\r\n\r\n if ($this->TxtIdTercero->Text != \"\" && is_numeric($this->TxtIdTercero->Text)) {\r\n $strSql = \"SELECT DATE_FORMAT(FhPago,'%M') AS FhPago, DATE_FORMAT(FhPago,'%m') AS IdRecibo, SUM(TotalPagado) as TotalPagado\r\n FROM recibos\r\n WHERE IdTercero = \" . $this->TxtIdTercero->Text . \" $condicion AND FhPago > '2012-01-01' \r\n GROUP BY DATE_FORMAT(FhPago,_latin1'%M') ORDER BY IdRecibo ASC\";\r\n $this->DGPagos->DataSource = RecibosRecord::finder()->findAllBySql($strSql);\r\n $this->DGPagos->dataBind();\r\n } else {\r\n $this->DGPagos->DataSource = \"\";\r\n $this->DGPagos->dataBind();\r\n }\r\n }", "title": "" }, { "docid": "2d4e5c8bd2aca9ef5e2f40935ccae10e", "score": "0.6011404", "text": "function GenReportFormHeader($print=0) {\r\n\t$query = sprintf(\"select perdano,perdatgl from {setupapp} where tahun='%s'\", variable_get('apbdtahun', 0)) ;\r\n\t$res = db_query($query);\r\n\tif ($data = db_fetch_object($res)) {\r\n\t\t$perdano = $data->perdano;\r\n\t\t$perdatgl = $data->perdatgl;\r\n\t}\r\n\t\r\n\r\n\t$rowslampiran[]= array (\r\n\t\t\t\t\t\t array('data' => '', 'width'=> '575px','colspan'=>'3', 'style' => 'border:none; text-align:left;'),\r\n\t\t\t\t\t\t array('data' => 'LAMPIRAN II', 'width' => '50px', 'style' => 'border:none; text-align:right;font-size: 75%;'),\r\n\t\t\t\t\t\t array('data' => ': PERATURAN DAERAH KABUPATEN JEPARA', 'width' => '250px', 'colspan'=>'2', 'style' => 'border:none;text-align:left;font-size: 75%;'),\r\n\t\t\t\t\t\t );\r\n\t$rowslampiran[]= array (\r\n\t\t\t\t\t\t array('data' => '', 'width'=> '525px', 'colspan'=>'3', 'style' => 'border:none; text-align:left;'),\r\n\t\t\t\t\t\t array('data' => '', 'width' => '100px', 'style' => 'border:none; text-align:right;'),\r\n\t\t\t\t\t\t array('data' => 'Nomor', 'width' => '50px', 'style' => 'border:none;text-align:left;font-size: 75%;'),\r\n\t\t\t\t\t\t array('data' => ': ' . $perdano, 'width' => '200px', 'style' => 'border:none; text-align:left;font-size: 75%;'),\r\n\t\t\t\t\t\t );\r\n\t$rowslampiran[]= array (\r\n\t\t\t\t\t\t array('data' => '', 'width'=> '575px','colspan'=>'3', 'style' => 'border:none; text-align:left;'),\r\n\t\t\t\t\t\t array('data' => '', 'width' => '50px', 'style' => 'border-bottom: 1px solid black; text-align:right;'),\r\n\t\t\t\t\t\t array('data' => 'Tanggal', 'width' => '50px', 'style' => 'border-bottom: 1px solid black; text-align:left;font-size: 75%;'),\r\n\t\t\t\t\t\t array('data' => ': ' . $perdatgl, 'width' => '200px', 'style' => 'border-bottom: 1px solid black; text-align:left;font-size: 75%;'),\r\n\t\t\t\t\t\t );\r\n\t\t\t\t\t\t \r\n\t$rowsjudul[] = array (array ('data'=>'PEMERINTAH KABUPATEN JEPARA', 'width'=>'875px', 'colspan'=>'5', 'style' =>'border:none; font-weight:900; font-size:1em; text-align:center;'));\r\n\t$rowsjudul[] = array (array ('data'=>'RINGKASAN APBD MENURUT URUSAN PEMERINTAHAN DAERAH DAN ORGANISASI', 'width'=>'875px', 'colspan'=>'5', 'style' =>'border:none; font-weight:900; font-size:1.3em; text-align:center;'));\r\n\t$rowsjudul[] = array (array ('data'=>'TAHUN ANGGARAN 2016', 'width'=>'875px', 'colspan'=>'5', 'style' =>'border:none; font-weight:900; font-size:1em; text-align:center;'));\r\n\r\n\t\r\n\t$opttbl = array('cellspacing'=>'1', 'cellpadding'=>'1', 'border' => '0');\r\n\t$headerkosong = array();\r\n\r\n\t$output = theme_box('', apbd_theme_table($headerkosong, $rowslampiran, $opttbl));\r\n\t$output .= theme_box('', apbd_theme_table($headerkosong, $rowsjudul, $opttbl));\r\n\t\r\n\treturn $output;\r\n\t\r\n}", "title": "" }, { "docid": "fd101cc45621041522d47d60c3dd5894", "score": "0.60044074", "text": "public function pdf_galvanizado($usuario, $unidad, $sema_inicio, $sema_fin) {\n\n $pdf_galvanizado_detalle = [\n 'dateFechIngr' => intval($sema_inicio),\n 'dateFechSali' => intval($sema_fin),\n 'tipo_reporte' => $unidad\n ];\n $url = \"http://localhost/GestionReportes/public/index.php/reporte_galvanizado_turno\";\n $ch5 = curl_init($url);\n\n curl_setopt($ch5, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch5, CURLINFO_HEADER_OUT, true);\n curl_setopt($ch5, CURLOPT_POST, true);\n curl_setopt($ch5, CURLOPT_POSTFIELDS, $pdf_galvanizado_detalle);\n $data = curl_exec($ch5);\n $datos_array = json_decode($data, true);\n $array_temp = $datos_array['data'];\n //dd($array_temp);\n \n\n date_default_timezone_set('America/Lima');\n $current_date = date('Y/m/d H:i:s');\n\n $html = PDF::loadView('Galvanizado/pdf_galvanizado', ['user' => $usuario, 'detalle' => $array_temp,'fecha_hoy'=>$current_date])->setPaper('a4', 'landscape');\n //dd($html);\n $html->setOptions(['margin-top' => 0, 'margin-right' => 0, 'margin-bottom' => 0, 'margin-left' => 0, 'footer-center' => 'Pagina [page] de [toPage]']);\n\n\n return $html->download($usuario . '.pdf');\n }", "title": "" }, { "docid": "ec38340d256134ad6aeaff09d4df6c39", "score": "0.6003254", "text": "public function getStrListadoPrecios()\r\n {\r\n $query = new clQuery();\r\n\r\n //Nombre Procedimientos Almacenados\r\n\r\n $ProcedimientoAlmacenado = sprintf(\"CALL sprptlistadoprecios();\");\r\n $query->setStrProcedimientoAlmacenado($ProcedimientoAlmacenado);\r\n $resultado = $query->getStrSqlSelect();\r\n\r\n $fecha = date(\"YmdHis\").'.txt';\r\n $tipousuario = strtolower($_SESSION[\"usuario\"][\"tipo\"]);\r\n\r\n $retval .= '<fieldset class=\"fieldsetGrande\">';\r\n $retval .= '<legend class=\"etiquetaborde\">\r\n Reporte <img src=\"'. IMAGENES_PATH .'/siguiente.png\" style=\"border: 0px none;\"> Listado Precios\r\n </legend>\r\n ';\r\n $retval .= '<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\">\r\n <tr>\r\n <td colspan=\"4\" align=\"center\">\r\n <a href=\"'. REPORTE_URL .'reporte.php?btnreporte-acceso='. $tipousuario .'\">| <img src=\"'. IMAGENES_PATH .'/atras.png\" title=\"Regresar\" width=\"16px\" height=\"16px\" border=\"0\" /> Regresar |</a>\r\n <a href=\"'. REPORTE_URL .'reporte.php?btnreporte-acceso=descargar&descargararchivo='. $fecha .'\"> <img src=\"'. IMAGENES_PATH .'/rptarchivo.png\" title=\"Descargar Archivo\" width=\"16px\" height=\"16px\" border=\"0\" /> Descargar Archivo |</a>\r\n <td>\r\n </tr>\r\n\r\n <tr class=\"tablatitulo\">\r\n <th colspan=\"4\">LISTADO&nbsp;DE&nbsp;PRECIOS</th>\r\n </tr>\r\n <tr class=\"tablasubtitulo\">\r\n <th align=\"center\">Departamento</th>\r\n <th align=\"center\">Unidad</th>\r\n <th align=\"center\">Area</th>\r\n <th align=\"center\">Costo ($)</th>\r\n </tr>';\r\n\r\n\r\n\r\n $f = $this->getStrAbrirArchivo($fecha);\r\n\r\n if( count($resultado) > 0 ) {\r\n $i = 0;\r\n $j = 0;\r\n fputs($f,\"DEPARTAMENTO\");\r\n fputs($f,\"\\t\");\r\n fputs($f,\"UNIDAD\");\r\n fputs($f,\"\\t\");\r\n fputs($f,\"AREA\");\r\n fputs($f,\"\\t\");\r\n fputs($f,\"COSTO\");\r\n fputs($f,\"\\n\");\r\n\r\n\r\n foreach( $resultado as $rst):\r\n $j = $j + 1;\r\n\r\n $retval .= '<tr class=\"listadofila'.$i.'\" onMouseOver=\"resaltar(this)\" onMouseOut=\"normal(this,'. $i .')\">';\r\n $retval .= \t'<td align=\"left\">'. $rst[\"depdescripcion\"] .'</td>';\r\n $retval .= \t'<td align=\"left\">'. $rst[\"unidescripcion\"] .'</td>';\r\n $retval .= \t'<td align=\"left\">'. $rst[\"subaredescripcion\"] .'</td>';\r\n $retval .= \t'<td align=\"right\">$ '. $rst[\"areprecio\"] .'</td>';\r\n //$retval .= \t'<td align=\"center\"><div class=\"vtip\" title=\"Detalle Paciente <br> [ N&uacute;mero Historia Cl&iacute;;nica = '.$rst[\"pacnumerohistoriaclinica\"] .' ]\">';\r\n //$retval .= '<a href=\"'. PACIENTE_URL .'paciente.php?btnDetalle=Detalle&strNumeroHistoriaClinica='. $rst[\"pacnumerohistoriaclinica\"] .'\"><img src=\"'. IMAGENES_PATH .'/detalle.png\" title=\"\" width=\"16px\" height=\"16px\" border=\"0\" /></a>';\r\n //$retval .= \t'</div></td>';\r\n $retval .= '</tr>';\r\n $i = 1 - $i;\r\n\r\n fputs($f,$rst[\"depdescripcion\"]);\r\n fputs($f,\"\\t\");\r\n fputs($f,$rst[\"unidescripcion\"]);\r\n fputs($f,\"\\t\");\r\n fputs($f,$rst[\"subaredescripcion\"]);\r\n fputs($f,\"\\t\");\r\n fputs($f,$rst[\"areprecio\"]);\r\n fputs($f,\"\\n\");\r\n endforeach;\r\n\r\n $retval .= '<tr class=\"tablasubtitulo\">\r\n <th align=\"right\" colspan=\"3\">TOTAL AREAS</th>\r\n <th align=\"center\">'. number_format($j,0,',','.') .'</th>\r\n </tr>\r\n ';\r\n }\r\n $retval .= '</table>';\r\n $retval .= '</fieldset>';\r\n\r\n $this->getStrCerrarArchivo($f);\r\n $this->getStrCopiarArchivo($fecha);\r\n\r\n return $retval;\r\n }", "title": "" }, { "docid": "76c4372de0a0642b8b297be1e0927b26", "score": "0.60015273", "text": "public function getStrRptAtencionPacienteGeneral()\r\n {\r\n define('FPDF_FONTPATH',FONT_PATH);\r\n include_once ( CLASS_PATH . \"class.clfpdf.php\" );\r\n\r\n //Limpia el buffer si no sale un error\r\n ob_end_clean();\r\n\r\n $fechaimpresion = date(\"Y/m/d H:i:s a\");\r\n\r\n\r\n //create a FPDF object\r\n $pdf = new FPDF('P' , 'mm' , 'A4');\r\n\r\n //set document properties\r\n $pdf->SetAuthor('CPCH - KOICA');\r\n $pdf->SetTitle('Recibo Servicio');\r\n\r\n //encabezado\r\n $pdf->setStrTipoEncabezado(7);\r\n $pdf->Header();\r\n //\r\n //Envia a otra pagina\r\n $pdf->setAutoPagebreak(true,'');\r\n\r\n //set font for the entire document\r\n $pdf->SetFont('Arial','B',35);\r\n $pdf->SetTextColor(50,60,100);\r\n\r\n //set up a page\r\n $pdf->AddPage('L');\r\n $pdf->SetDisplayMode(75,'default');\r\n\r\n //insert an image and make it a link\r\n //$pdf->Image('logo.png',10,20,33,0,' ','http://www.fpdf.org/');\r\n\r\n $query = new clQuery();\r\n\r\n //Nombre Procedimientos Almacenados\r\n $ProcedimientoAlmacenado = sprintf(\"CALL sprptatencionpacientegeneral('%s','%s');\", $this->getStrFechaInicio(), $this->getStrFechaFin());\r\n $query->setStrProcedimientoAlmacenado($ProcedimientoAlmacenado);\r\n $resultado = $query->getStrSqlSelect();\r\n\r\n if( count($resultado) > 0 ) {\r\n $i = 0;\r\n $j = 0;\r\n foreach( $resultado as $rst):\r\n $j = $j + 1;\r\n\r\n if ($i == 0){\r\n $pdf->Ln(2);\r\n\r\n $pdf->SetFont('Arial','B',7);\r\n $pdf->Cell(10,6,utf8_decode('N°'),1,0,'C',0);\r\n $pdf->Cell(15,6,utf8_decode('Fec. Vis.'),1,0,'C',0);\r\n $pdf->Cell(10,6,utf8_decode('NHC'),1,0,'C',0);\r\n $pdf->Cell(60,6,utf8_decode('Paciente'),1,0,'C',0);\r\n $pdf->Cell(10,6,utf8_decode('Sexo'),1,0,'C',0);\r\n $pdf->Cell(15,6,utf8_decode('Fec. Nac.'),1,0,'C',0);\r\n $pdf->Cell(30,6,utf8_decode('Departamento'),1,0,'C',0);\r\n $pdf->Cell(60,6,utf8_decode('Unidad'),1,0,'C',0);\r\n $pdf->Cell(15,6,utf8_decode('Edades'),1,0,'C',0);\r\n $pdf->Cell(52,6,utf8_decode('Médico'),1,1,'C',0);\r\n\r\n $i = 1;\r\n }\r\n\r\n $NHC = \"\";\r\n switch (strlen($rst[\"nhc\"])){\r\n case 1:\r\n $NHC = \"0000\".$rst[\"nhc\"];\r\n break;\r\n case 2:\r\n $NHC = \"000\".$rst[\"nhc\"];\r\n break;\r\n case 3:\r\n $NHC = \"00\".$rst[\"nhc\"];\r\n break;\r\n case 4:\r\n $NHC = \"0\".$rst[\"nhc\"];\r\n break;\r\n default:\r\n $NHC = $rst[\"nhc\"];\r\n break;\r\n }\r\n\r\n $pdf->SetFont('Arial','',6);\r\n $pdf->Cell(10,5,$j,1,0,'C',0);\r\n $pdf->Cell(15,5,$rst[\"fecha\"],1,0,'C',0);\r\n $pdf->Cell(10,5,$NHC,1,0,'C',0);\r\n $pdf->Cell(60,5,utf8_decode(utf8_encode($rst[\"paciente\"])),1,0,'L',0);\r\n $pdf->Cell(10,5,utf8_decode(utf8_encode($rst[\"sexo\"])),1,0,'C',0);\r\n $pdf->Cell(15,5,utf8_decode(utf8_encode($rst[\"fechanacimiento\"])),1,0,'L',0);\r\n $pdf->Cell(30,5,utf8_decode(utf8_encode($rst[\"departamento\"])),1,0,'L',0);\r\n $pdf->Cell(60,5,utf8_decode(utf8_encode($rst[\"unidad\"])),1,0,'L',0);\r\n $pdf->Cell(15,5,utf8_decode(utf8_encode($rst[\"subarea\"])),1,0,'L',0);\r\n $pdf->Cell(52,5,utf8_decode(utf8_encode($rst[\"medico\"])),1,1,'L',0);\r\n endforeach;\r\n\r\n //Fecha Impresion\r\n $pdf->Ln(1);\r\n $pdf->SetFont('Arial','B',6);\r\n $pdf->Cell(20,4,utf8_decode('Fecha Impresión:'),0,0,'L',0);\r\n $pdf->SetFont('Arial','',6);\r\n $pdf->Cell(20,4,\" \".utf8_decode($fechaimpresion),0,1,'L',0);\r\n\r\n\r\n// $pdf->Ln(20);\r\n// $pdf->SetFont('Arial','B',10);\r\n// $pdf->SetX (40);\r\n// $pdf->Cell(50,4,'________________________________',0,0,'C',0);\r\n// $pdf->Cell(40,4,'',0,0,'C',0);\r\n// $pdf->Cell(50,4,'________________________________',0,1,'C',0);\r\n// $pdf->SetX (40);\r\n// $pdf->Cell(50,4,utf8_decode(RESPONSABLE),0,0,'C',0);\r\n// $pdf->Cell(40,4,'',0,0,'C',0);\r\n// $pdf->Cell(50,4,utf8_decode(TESORERO),0,1,'C',0);\r\n// $pdf->SetX (40);\r\n// $pdf->Cell(50,4,'RESPONSABLE',0,0,'C',0);\r\n// $pdf->Cell(40,4,'',0,0,'C',0);\r\n// $pdf->Cell(50,4,'TESORERO',0,1,'C',0);\r\n\r\n }else{\r\n //Set x and y position for the main text, reduce font size and write content\r\n $pdf->SetXY (30,100);\r\n $pdf->SetFontSize(8);\r\n $pdf->Write(5,utf8_decode(' No existe Informacion registrada'));\r\n }\r\n\r\n //Pie Pagina\r\n $pdf->Footer();\r\n\r\n //Para poner la Pagina 1/(1...n)\r\n $pdf->AliasNbPages();\r\n\r\n //Output the document\r\n $fecha = date(\"YmdHis\").'.pdf';\r\n $pdf->Output($fecha,'D');\r\n\r\n }", "title": "" }, { "docid": "37ab4810ac422f85b8a3be097b0d9d76", "score": "0.5988789", "text": "public function index(){\n $car = DB::table('programa_educativo')->paginate(10);\n //Se hace una consulta solo a la carrera de tics y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $tics=Programa_educativo::where('nombreProgramaEducativo','Tecnologías de la Información y Comunicación')->first();\n $cargaHorariaTics=$tics->cargashorarias()->paginate(10);\n //Se hace una consulta solo a la carrera de Meca y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $meca=Programa_educativo::where('nombreProgramaEducativo','Mecatrónica')->first();\n $cargaHorariaMeca=$meca->cargashorarias()->paginate(10);\n \n //Se hace una consulta solo a la carrera de mantenimiento y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $mantenimiento=Programa_educativo::where('nombreProgramaEducativo','Mantenimiento Industrial')->first();\n $cargaHorariaMentenimiento=$mantenimiento->cargashorarias()->paginate(10);\n\n //Se hace una consulta solo a la carrera de industrial y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $industrial=Programa_educativo::where('nombreProgramaEducativo','Ingeniería Industrial')->first();\n $cargaHorariaIndustrial=$industrial->cargashorarias()->paginate(10);\n\n //Se hace una consulta solo a la carrera de alimetos y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $alimetos=Programa_educativo::where('nombreProgramaEducativo','Procesos Bioalimentarios')->first();\n $cargaHorariaAlimentos=$alimetos->cargashorarias()->paginate(10);\n\n //Se hace una consulta solo a la carrera de conta y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $conta=Programa_educativo::where('nombreProgramaEducativo','Finanzas y Fiscal Contador Público')->first();\n $cargaHorariaConta=$conta->cargashorarias()->paginate(10);\n\n //Se hace una consulta solo a la carrera de negocios y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $negocios=Programa_educativo::where('nombreProgramaEducativo','Negocios y Gestión Empresarial')->first();\n $cargaHorariaNegocios=$negocios->cargashorarias()->paginate(10); \n\n //Se hace una consulta solo a la carrera de gestionEnpresarial y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $gestionEnpresarial=Programa_educativo::where('nombreProgramaEducativo','Gestión de Proyectos')->first();\n $cargaHorariaGestionE=$gestionEnpresarial->cargashorarias()->paginate(10);\n\n //Se hace una consulta solo a la carrera de agricultura y se una a la table de carga horaria mediante hasMany en el modelo de Programa_educativo\n $agricultura=Programa_educativo::where('nombreProgramaEducativo','Agricultura Sustentable y Protegida')->first();\n $cargaHorariaAgricultura=$agricultura->cargashorarias()->paginate(10);\n \n //obtiene todas las cargas horarias compartidas\n $cargasHorariasCompartidas= Carga_horaria_compartido::all();\n \n \treturn view('modulos.cargaHoraria.main', compact('car','tics','meca','mantenimiento','industrial','alimetos','conta','negocios','gestionEnpresarial','agricultura','cargaHorariaTics','cargaHorariaMeca','cargaHorariaIndustrial','cargaHorariaMentenimiento','cargaHorariaAlimentos','cargaHorariaConta','cargaHorariaNegocios','cargaHorariaGestionE','cargaHorariaAgricultura','cargasHorariasCompartidas'));\n }", "title": "" }, { "docid": "0118900e8f82ebda328d5d07910d3b64", "score": "0.59874254", "text": "function RsolicitudBaja(){\n $pdf = new FPDF();\n $pdf->AddPage();\n \n $pdf->Image($this->base.\"assets/images/logo.png\",10,8,185,32);\n \n $pdf->SetFont('Arial','B',10);\n $pdf->ln(35);\n $pdf->cell(105);\n \n // Información de cabecera parte derecha\n \n $pdf->Cell(30,5,utf8_decode('Oficio No.'),0,0,\"R\");\n $pdf->SetFont('Arial','',10);\n \n $pdf->Cell(30,5,utf8_decode('{Número de folio}'));\n $pdf->Ln();\n $pdf->SetFont('Arial','B',10);\n $pdf->cell(100);\n $pdf->Cell(30,5,'Asunto:',0,0,\"R\");\n $pdf->SetFont('Arial','',10);\n $pdf->Cell(30,5,utf8_decode('Se notifica tramite solicitado'));\n $pdf->Ln();\n $pdf->cell(107);\n $pdf->Cell(30,5,utf8_decode('{Fecha formato: Colima, Colima , a 25 de Junio de 2018}'));\n $pdf->Ln(10);\n \n \n // Datos del remitente\n $pdf->SetFont('Arial','B',10);\n \n $pdf->Cell(30,5,utf8_decode('{Nombre al que va dirigido el oficio},'));\n $pdf->Ln();\n \n $pdf->Cell(30,5,utf8_decode('{Cargo al que va dirigido el oficio},'));\n $pdf->Ln();\n \n $pdf->Cell(30,5,utf8_decode('PRESENTE.'));\n $pdf->Ln(10);\n \n // Comunicado\n $pdf->SetFont('Arial','',10);\n \n \n $pdf->MultiCell(185,5,utf8_decode(\"De conformidad a las atribuciones que me confiere en numeral 19, 20 y además relativos a la ley del sistema de Seguridad Pública para el Estado de Colima y en atención al oficio no. {Respuesta al oficio número}, del año {Año}, signado por el Director General de Operaciones e Inteligencia, en el cual se solicita realizar el trámite de baja en el aplicativo del Registro Nacional de Personal de Seguridad Pública (RNPSP), {Nombre de la persona a dar a baja}, al respecto hago de su conocimiento que se ha llevado a cabo el trámite solicitado, adjunto constancia de dicho movimiento \"));\n \n $pdf->Ln(5);\n $pdf->SetFont('Arial','',10);\n \n $pdf->Cell(30,5,utf8_decode('PEP'));\n \n \n $pdf->Ln(10);\n $pdf->Cell(30,5,utf8_decode('Sin otro particular, hago propicia la ocasión para hacerle llegar un cordial saludo'));\n $pdf->Ln(10);\n $pdf->SetFont('Arial','B',8);\n $pdf->Cell(0,0,utf8_decode('A T E N T A M E N T E'),0 ,0 ,'C');\n $pdf->Ln();\n $pdf->Cell(0,10,utf8_decode('{Cargo}'), 0, 0, 'C');\n\n $pdf->Ln(15);\n\n $pdf->Cell(0,5,utf8_decode('{Nombre del encargado del despacho del secretariado ejecutivo del SESESP}'), 0, 0, 'C');\n \n $pdf->Ln();\n \n $pdf->SetFont('Arial','',8);\n $pdf->Cell(30,5,utf8_decode('C.c.p.'));\n $pdf->Ln(10);\n \n $pdf->SetFont('Arial','',9);\n $pdf->Cell(30,5,utf8_decode('{Coordinador de TI de SESESP}'));\n $pdf->Cell(25);\n $pdf->Cell(30,5,utf8_decode('Coordinador General de Administración de Tecnologías del SESESP.- Para su conocimiento'));\n $pdf->Ln();\n \n $pdf->SetFont('Arial','',9);\n $pdf->Cell(30,5,utf8_decode('{Director general Op e Int SSP}'));\n $pdf->Cell(25);\n $pdf->Cell(30,5,utf8_decode('Director General de Operaciones e Inteligencia de la SSP.- Igual fin'));\n $pdf->Ln();\n \n $pdf->SetFont('Arial','',9);\n $pdf->Cell(30,5,utf8_decode('{Subcoordinador De SI del SESESP}'));\n $pdf->Cell(30);\n $pdf->Cell(30,5,utf8_decode('Subcoordinador de Sistemas de Información del SESESP.- Mismo fin'));\n $pdf->Ln();\n $pdf->SetFont('Arial','',6);\n $pdf->Cell(30,5,utf8_decode('Archivo.'));\n $pdf->Ln();\n $pdf->SetFont('Arial','',6);\n $pdf->Cell(30,5,utf8_decode('JACHG/HHCHD/NAVA'));\n \n $pdf->Ln(5);\n $pdf->Cell(52);\n $pdf->SetFont('Arial','',6);\n $pdf->Cell(30,5,utf8_decode('\"Año 2018. Centenario del natalicio del escritor mexicano y universal Juan José Arreola\"'));\n $pdf->Ln();\n $pdf->Image($this->base.\"assets/images/Cintillo.png\",72,253,65,1);\n \n $pdf->SetFont('Arial','',6);\n $pdf->Cell(64);\n $pdf->Cell(30,4,utf8_decode('Secretariado Ejecutivo del Sistema Estatal de Seguridad Pública'));\n $pdf->Ln();\n $pdf->Cell(57);\n $pdf->Cell(30,4,utf8_decode('C. Emilio Carranza Esq. Ejército Nacional S/N, Colonia Centro, C.P. 28000'));\n $pdf->Ln();\n $pdf->Cell(72);\n $pdf->Cell(30,4,utf8_decode('Colima, Colima, México. Tel. (312) 3162603'));\n $pdf->Ln();\n $pdf->Cell(69);\n $pdf->Cell(30,4,utf8_decode('https://www.secretariadoejecutivosesp.col.gob.mx'));\n \n \n $pdf->Output();\n }", "title": "" }, { "docid": "4bbb0a1d7c25ab1798fa5ddd92ebbf70", "score": "0.59863925", "text": "public function Carregar_Pagina()\r\n {\r\n if (Controller_Header_Usuario::Verificar_Autenticacao()) {\r\n $status = Controller_Header_Usuario::Verificar_Status_Usuario();\r\n \r\n if ($status != 0) {\r\n $view = new View_Faturas($status);\r\n \r\n $fatura_aberta = GerenciarFaturas::Retornar_Fatura(Login_Session::get_entidade_id(), 1);\r\n \r\n if (!empty($fatura_aberta)) {\r\n $view->set_fatura_aberta($fatura_aberta);\r\n }\r\n \r\n $fatura_fechada = GerenciarFaturas::Retornar_Fatura(Login_Session::get_entidade_id(), 16);\r\n \r\n if (empty($fatura_fechada)) {\r\n $fatura_fechada = GerenciarFaturas::Retornar_Fatura(Login_Session::get_entidade_id(), 32);\r\n \r\n if (empty($fatura_fechada)) {\r\n $fatura_fechada = GerenciarFaturas::Retornar_Fatura(Login_Session::get_entidade_id(), 128);\r\n \r\n if (empty($fatura_fechada)) {\r\n $fatura_fechada = GerenciarFaturas::Retornar_Fatura(Login_Session::get_entidade_id(), 2);\r\n }\r\n }\r\n }\r\n \r\n if (!empty($fatura_fechada)) {\r\n $view->set_fatura_fechada($fatura_fechada);\r\n }\r\n \r\n $pagseguro = new PagSeguro();\r\n \r\n $view->set_pagseguro_sessao_id($pagseguro->getIdSessao());\r\n \r\n $view->Executar();\r\n }\r\n \r\n return $status;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "3d5c388a78d9ecf36a2ab698ae3f9aa4", "score": "0.59842163", "text": "public function actionReport() {\n\n // $content = \"\n // <b style='color:red'>bold</b>\n // <img src='\".Url::to('@web/img/UNIDA8.jpg'. true).\"' />\n // <a href='http://u3motor.com'>u3motor.com</a>\"\n // ;\n\n $content = $this->renderPartial('index');\n\n //setup kartik\\mpdf\\Pdf component\n $pdf = new Pdf([\n //set to use core fonts only\n 'mode' => Pdf::MODE_CORE,\n //A4 paper format\n 'format' => Pdf::FORMAT_A4,\n //portrait orientation\n 'orientation' => Pdf::ORIENT_PORTRAIT,\n // stream to browse inline\n 'destination' => Pdf::DEST_BROWSER,\n //your HTML content input\n 'content' => $content,\n //format content from your own css file if needed or use the enhanced bootstrap css built by krajee for pdf formatting\n 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap',\n //call pdf method on the fly\n 'methods' => [\n 'SetHeader' => ['U3 MOTOR INVOICE'],\n 'SetFooter' => ['{PAGENO}'],\n ]\n ]);\n\n //http response\n $response = Yii::$app->response;\n // $response->format = \\yii\\web\\Responsive::FORMAT_RAW;\n $headers = Yii::$app->response->headers;\n $headers->add('Content-Type', 'application/pdf');\n\n return $pdf->render('contoh');\n }", "title": "" }, { "docid": "8457c2dc4549cf79aefc43a1ffebbc7e", "score": "0.5982843", "text": "public function PaginacionEppc(){\n\n $respuesta = EppM::PaginacionEppM(); \n }", "title": "" }, { "docid": "5ba4db7b41aa37ab8f61bf24bd08249a", "score": "0.598275", "text": "public function index($numPag = 0) {\n $notificaciontotal = $this->inventario_model->cantidadVencidos()->cantVencido + $this->inventario_model->cantidadXVencerse()->cuantovencerse + $this->inventario_model->cantidadAgotados()->agotados + $this->inventario_model->cantidadXAgotarse()->cuantoAgotarse;\n\n if ($this->session->userdata('rol') == NULL) {\n redirect(base_url() . 'iniciar');\n }\n ob_start();\n $this->pagina(0);\n $initial_content = ob_get_contents();\n ob_end_clean();\n $data = array(\n 'div1' => \" <div id='pagina'>\",\n 'table' => $initial_content,\n 'titulo' => \"OrdenSalida\",\n 'totalNotificaciones' => $notificaciontotal,\n 'vencidos' => $this->inventario_model->cantidadVencidos()->cantVencido,\n 'porVencerse' => $this->inventario_model->cantidadXVencerse()->cuantovencerse,\n 'agotados' => $this->inventario_model->cantidadAgotados()->agotados,\n 'porAgotarse' => $this->inventario_model->cantidadXAgotarse()->cuantoAgotarse, \n 'es_usuario_normal' => FALSE,\n 'perfil' => $this->usuario_model->consultarPerfil($this->session->userdata('idUsuario'))\n );\n $this->load->view('templates/admin/header', $data);\n $this->load->view('templates/admin/menu', $data);\n $this->load->view('inventario/OrdenSalida', $data);\n $this->load->view('templates/admin/footer');\n }", "title": "" }, { "docid": "8970110dfd83306d06c73cf14c879e74", "score": "0.5980609", "text": "public function PagarPagSeguroBoleto() : void\r\n {\r\n $link_boleto = '';\r\n \r\n if (empty($this->erros)) {\r\n $pagseguro = new PagSeguro();\r\n \r\n $pagseguro->set_hash($this->hash);\r\n $pagseguro->set_ip($this->ip);\r\n \r\n $entidade = DAO_Entidade::BuscarPorCOD(Login_Session::get_entidade_id());\r\n if ($entidade instanceof OBJ_Entidade) {\r\n $pagseguro->set_entidade_cpf_cnpj($entidade->get_cpf_cnpj());\r\n }\r\n \r\n $fatura_fechada = GerenciarFaturas::Retornar_Fatura(Login_Session::get_entidade_id(), 16);\r\n if (empty($fatura_fechada)) {\r\n $fatura_fechada = GerenciarFaturas::Retornar_Fatura(Login_Session::get_entidade_id(), 32);\r\n \r\n if (empty($fatura_fechada)) {\r\n $fatura_fechada = GerenciarFaturas::Retornar_Fatura(Login_Session::get_entidade_id(), 2);\r\n }\r\n }\r\n \r\n if (!empty($fatura_fechada)) {\r\n $pagseguro->set_reference($fatura_fechada->get_id());\r\n $pagseguro->set_total($fatura_fechada->get_valor_total());\r\n \r\n $fatura_servicos_fechada = DAO_Fatura_Servico::BuscarPorCOD($fatura_fechada->get_id());\r\n \r\n if (!empty($fatura_servicos_fechada) AND $fatura_servicos_fechada != false) {\r\n $pagseguro->set_servicos($fatura_servicos_fechada);\r\n }\r\n }\r\n \r\n $usuario = DAO_Usuario::Buscar_Usuario(Login_Session::get_usuario_id());\r\n if ($usuario instanceof OBJ_Usuario) {\r\n $pagseguro->set_nome($usuario->get_nome().' '.$usuario->get_sobrenome());\r\n $pagseguro->set_email($usuario->get_email());\r\n $pagseguro->set_fone($usuario->get_fone());\r\n }\r\n \r\n $link_boleto = $pagseguro->pagarBoleto();\r\n if (!empty($link_boleto)) {\r\n DAO_Fatura::Atualizar_Status($fatura_fechada->get_id(), 128);\r\n $this->sucessos[] = 'Boleto gerado com sucesso! o pagamento será confirmado em até 3 dias após o pagamento.';\r\n } else {\r\n $this->erros[] = 'Erro ao tentar gerar solicitação de pagamento';\r\n }\r\n }\r\n \r\n $retorno['erros'] = View_Faturas::CriarListagem($this->erros);\r\n $retorno['sucessos'] = View_Faturas::CriarListagem($this->sucessos);\r\n $retorno['campos'] = $this->campos;\r\n $retorno['link_boleto'] = $link_boleto;\r\n \r\n echo json_encode($retorno);\r\n }", "title": "" }, { "docid": "2ece4d19f751bb6dcb8155afbeb1b452", "score": "0.59750235", "text": "public function ctrDescargarReporte()\r\n {\r\n\r\n if (isset($_GET[\"reporte\"])) {\r\n\r\n $tabla = $_GET[\"reporte\"];\r\n\r\n $reporte = ModeloReportes::mdlDescargarReporte($tabla);\r\n\r\n /*=============================================\r\n CREAMOS EL ARCHIVO DE EXCEL\r\n =============================================*/\r\n\r\n $nombre = $_GET[\"reporte\"] . '.xls';\r\n\r\n header('Expires: 0');\r\n header('Cache-control: private');\r\n header(\"Content-type: application/vnd.ms-excel\"); // Archivo de Excel\r\n header(\"Cache-Control: cache, must-revalidate\");\r\n header('Content-Description: File Transfer');\r\n header('Last-Modified: ' . date('D, d M Y H:i:s'));\r\n header(\"Pragma: public\");\r\n header('Content-Disposition:; filename=\"' . $nombre . '\"');\r\n header(\"Content-Transfer-Encoding: binary\");\r\n\r\n if ($_GET[\"reporte\"] == \"productos\") {\r\n\r\n echo utf8_decode(\"\r\n\r\n\t\t\t\t\t<table border='0'>\r\n\r\n\t\t\t\t\t\t<tr>\r\n\r\n\t\t\t\t\t\t\t<td style='font-weight:bold; border:1px solid #eee;'>COD_PRODUCTO</td>\r\n\t\t\t\t\t\t\t<td style='font-weight:bold; border:1px solid #eee;'>TITULO</td>\r\n\t\t\t\t\t\t\t<td style='font-weight:bold; border:1px solid #eee;'>ESTADO</td>\r\n\t\t\t\t\t\t\t<td style='font-weight:bold; border:1px solid #eee;'>CATEGORIA</td>\r\n\t\t\t\t\t\t\t<td style='font-weight:bold; border:1px solid #eee;'>DETALLES</td>\r\n\t\t\t\t\t\t\t<td style='font-weight:bold; border:1px solid #eee;'>PRECIO</td>\r\n\t\t\t\t\t\t\t<td style='font-weight:bold; border:1px solid #eee;'>FECHA</td>\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t</tr>\");\r\n\r\n foreach ($reporte as $key => $value) {\r\n\r\n /*=============================================\r\n TRAER PRODUCTO\r\n =============================================*/\r\n\r\n $item = \"id\";\r\n $valor = $value[\"id_categoria\"];\r\n $categorias = ControladorCategorias::ctrMostrarCategorias($item, $valor);\r\n\r\n echo utf8_decode(\"\r\n\r\n\t\t\t\t\t \t<tr>\r\n\t\t\t\t\t\t\t<td style='border:1px solid #eee;'>\" . $value[\"id\"] . \"</td>\r\n\t\t\t\t\t\t\t<td style='border:1px solid #eee;'>\" . $value[\"titulo\"] . \"</td>\r\n\r\n\t\t\t\t\t \");\r\n\r\n echo utf8_decode(\"<td style='border:1px solid #eee;'>\" . $value[\"estado\"] . \"</td>\r\n\t\t\t \t\t\t\t\t \t <td style='border:1px solid #eee;'>\" . $categorias[\"categoria\"] . \"</td>\r\n\t\t\t \t\t\t\t\t \t <td style='border:1px solid #eee;'>\" . $value[\"detalle\"] . \"</td>\r\n\t\t\t \t\t\t\t\t \t <td style='border:1px solid #eee;'>\" . $value[\"precio\"] . \"</td>\r\n\t\t\t \t\t\t\t\t \t <td style='border:1px solid #eee;'>\" . $value[\"fecha\"] . \"</td>\r\n\r\n\t\t\t \t\t\t\t\t \t </tr>\");\r\n\r\n }\r\n\r\n echo utf8_decode(\"</table>\r\n\r\n\t\t\t\t\t\");\r\n\r\n }\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "41b1536edd984d7b7824d7c60bd4d64a", "score": "0.59726954", "text": "public function paginacion_anuncios(){\n\n\t\t$return = '<div class=\"row container-property\">';\n\t\t//si no le pasamos conexion se monta una\n\t\t//link paginacion dependiendo de seccion (inmobiliaria o busqueda)\n\t\t// if(is_null($Empresa)){\n\t\t\t$link_pag = $this->url.'&pagg=*VAR*';\n\t\t\t$conexion = $this->crear_consulta_busqueda();\n\t\t// }else{\n\t\t// \t$this->empresa = $Empresa->user;\n\t\t// \t$link_pag = $this->url.'&inmv='.$Empresa->salida['nik_empresa'].'&pagg_inmo=*VAR*';\n\t\t// \t$conexion = $this->crear_consulta_busqueda($Empresa);\n\t\t// }\n\n\t\t$this->publicar_mysqli();\n\t\t$options = array( \n\t\t\t'url' \t=> $link_pag, \n\t\t\t'db_handle' \t=> $this->public_mysqli,\n\t\t\t'results_per_page' => ANUNCIOS_POR_PAGINA,\n\t\t\t'db_conn_type' => 'mysqli');\n\t\t$Pag = new pagination($this->pagina, $conexion, $options);\n\n\t\tif($Pag->success == true){ \n\n\t\t\t $i=0;\n\t\t\t while($salida = $Pag->resultset->fetch_assoc()){\n\t\t\t \t$i++;\n\t\t\t \t$return .= $this->formar_anuncios_paginados($this->mod,$i,$salida);\n\t\t\t }\t\t\n\t\t\t $return .= '</div>';\n\t\t\tif($Pag->total_pages <1){\t$return .= $this->no_results($conexion); }\n\t\t\tif($Pag->total_pages >1){\t$return .= $Pag->links_html; \t}\n\t\t}else{\n\t\t\t$return .= '</div>'; //cerramos igualmente\n\t\t\t//var_dump('es false');\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "bfebab4cfc04e46aa30f0e6b83658c52", "score": "0.59702474", "text": "public function main(){\n\n $qrcode = qr(filter_get(\"url\"));\n $signature = array_key_exists(\"firma\", $_GET)? settypebool(filter_get(\"firma\")) : true;\n $id = filter_get(\"id\");\n \n $v = $this->container->getRel(\"toma\")->value(\n $this->container->getDb()->get(\"toma\",$id)\n );\n\n $modelTools = $this->container->getController(\"model_tools\");\n\n $date = new SpanishDateTime();\n\n $fechaToma = $v[\"toma\"]->_get(\"fecha_toma\");\n $fechaToma4 = clone $fechaToma;\n $fechaToma4->modify(\"+ 4 month\"); \n $calendarioFin = $v[\"calendario\"]->_get(\"fin\");\n $fechaFin = ($fechaToma4 < $calendarioFin) ? $fechaToma4 : $calendarioFin;\n\n $mpdf = new \\Mpdf\\Mpdf();\n\n $c = htmlToPdfHeader($qrcode);\n $c .= '\n<div class=\"title\">\n CONSTANCIA GENERAL\n</div>\n<div class=\"content\">\n <p>La Dirección de la Escuela de Educación CENS Nº 462 de La Plata, \nhace constar por la presente que <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $v[\"docente\"]->_get(\"apellidos\", \"X\") . ' ' . $v[\"docente\"]->_get(\"nombres\",\"Xx Yy\") . '&nbsp;&nbsp;&nbsp;</span> DNI Nº <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $v[\"docente\"]->_get(\"numero_documento\",\"Xx Yy\") . '&nbsp;&nbsp;&nbsp;</span>\nes docente de la asignatura <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $v[\"asignatura\"]->_get(\"nombre\") . '&nbsp;&nbsp;&nbsp;</span> \ntramo <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $v[\"planificacion\"]->_get(\"anio\") . '°' . $v[\"planificacion\"]->_get(\"semestre\") . 'C&nbsp;&nbsp;&nbsp;</span>\ncorrespondiente a <span class=\"data\">&nbsp;&nbsp;&nbsp;Programa Fines 2 Trayecto Secundario&nbsp;&nbsp;&nbsp;</span>\ncon orientación en <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $v[\"plan\"]->_get(\"orientacion\") . '&nbsp;&nbsp;&nbsp;</span> resolución <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $v[\"plan\"]->_get(\"resolucion\") . '&nbsp;&nbsp;&nbsp;</span>.\nEl período de cursada abarca desde <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $v[\"toma\"]->_get(\"fecha_toma\", \"d/m/Y\") . '&nbsp;&nbsp;&nbsp;</span> hasta <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $fechaFin->format(\"d/m/Y\") . '&nbsp;&nbsp;&nbsp;</span>.\n\n\n </p>\n <p>A pedido del/de la interesado/a y al sólo efecto de ser presentado ante las autoridades que se lo exijan, se extiene la presente en La Plata a los <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $date->format(\"d\") . '&nbsp;&nbsp;&nbsp;</span> días\ndel mes de <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $date->format(\"F\") . '&nbsp;&nbsp;&nbsp;</span> \nde <span class=\"data\">&nbsp;&nbsp;&nbsp;' . $date->format(\"Y\") . '&nbsp;&nbsp;&nbsp;</span>.\n </p>\n</div>\n';\n $c .= htmlToPdfSignature($signature);\n $html = htmlToPdfIndex($c); \n\n\n // echo $html;\n $mpdf = new \\Mpdf\\Mpdf();\n $mpdf->SetProtection([\"print\"]);\n\n $mpdf->WriteHTML($html);\n\n $mpdf->Output(\"constancia_servicios_\" . $v[\"docente\"]->_get(\"numero_documento\") . \".pdf\", 'I');\n }", "title": "" }, { "docid": "201a7e1600087254d16b3399351217d4", "score": "0.596843", "text": "public function pesquisar(\\Illuminate\\Http\\Request $request, $tipo_relatorio)\n{\n\n /*Pega todos campos enviados no post*/\n $input = $request->except(array('_token', 'ativo')); //não levar o token\n\n /*------------------------------------------INICIALIZA PARAMETROS JASPER--------------------------------------------------*/\n //Pega dados de conexao com o banco para o JASPER REPORT\n $database = \\Config::get('database.connections.jasper_report');\n $ext = $input[\"resultado\"]; //Tipo saída (PDF, XLS)\n $output = public_path() . '/relatorios/resultados/' . $ext . '/celulas_' . $this->dados_login->empresas_id . '_' . Auth::user()->id; //Path para cada tipo de relatorio\n $path_download = '/relatorios/resultados/' . $ext . '/celulas_' . $this->dados_login->empresas_id . '_' . Auth::user()->id; //Path para cada tipo de relatorio\n /*------------------------------------------INICIALIZA PARAMETROS JASPER--------------------------------------------------*/\n\n /*Instancia biblioteca de funcoes globais*/\n $formatador = new \\App\\Functions\\FuncoesGerais();\n\n $filtros = \"\";\n $descricao_lider=\"\";\n $descricao_curso=\"\";\n $descricao_nivel1=\"\";\n $descricao_nivel2=\"\";\n $descricao_nivel3=\"\";\n $descricao_nivel4=\"\";\n $descricao_nivel5=\"\";\n\n if (isset($input[\"nivel1_up\"]))\n if ($input[\"nivel1_up\"]!=\"\") $descricao_nivel1 = explode(\"|\", $input[\"nivel1_up\"]);\n\n if (isset($input[\"nivel2_up\"]))\n if ($input[\"nivel2_up\"]!=\"\") $descricao_nivel2 = explode(\"|\", $input[\"nivel2_up\"]);\n\n if (isset($input[\"nivel3_up\"]))\n if ($input[\"nivel3_up\"]!=\"\") $descricao_nivel3 = explode(\"|\", $input[\"nivel3_up\"]);\n\n if (isset($input[\"nivel4_up\"]))\n if ($input[\"nivel4_up\"]!=\"\") $descricao_nivel4 = explode(\"|\", $input[\"nivel4_up\"]);\n\n if (isset($input[\"nivel5_up\"]))\n if ($input[\"nivel5_up\"]!=\"\") $descricao_nivel5 = explode(\"|\", $input[\"nivel5_up\"]);\n\n if (isset($input[\"nivel1_up\"]))\n if ($input[\"nivel1_up\"]!=\"0\") $filtros .= \" \" . \\Session::get('nivel1') . \" : \" . $descricao_nivel1[1];\n\n if (isset($input[\"nivel2_up\"]))\n if ($input[\"nivel2_up\"]!=\"0\") $filtros .= \" \" . \\Session::get('nivel2') . \" : \" . $descricao_nivel2[1];\n\n if (isset($input[\"nivel3_up\"]))\n if ($input[\"nivel3_up\"]!=\"0\") $filtros .= \" \" . \\Session::get('nivel3') . \" : \" . $descricao_nivel3[1];\n\n if (isset($input[\"nivel4_up\"]))\n if ($input[\"nivel4_up\"]!=\"0\") $filtros .= \" \" . \\Session::get('nivel4') . \" : \" . $descricao_nivel4[1];\n\n if (isset($input[\"nivel5_up\"]))\n if ($input[\"nivel5_up\"]!=\"0\") $filtros .= \" \" . \\Session::get('nivel5') . \" : \" . $descricao_nivel5[1];\n\n //make where clausure for query in jasper report\n //for report (encontro), set alias from field empresas_id (celulas.empresas_id)\n $sWhere = \" c.empresas_id = \" . $this->dados_login->empresas_id . \" and c.empresas_clientes_cloud_id = \" .$this->dados_login->empresas_clientes_cloud_id . \"\";\n\n //parameters fields to jasper report\n $parametros = array();\n\n if (isset($input[\"lideres\"])) {\n if ($input[\"lideres\"]!=\"\") $descricao_lider = explode(\"|\", $input[\"lideres\"]);\n\n if ($descricao_lider[0]!=\"0\") {\n $filtros .= \" Celula : \" . $descricao_lider[1];\n $sWhere .= \" and cel.lider_pessoas_id = \" . $descricao_lider[0];\n }\n }\n\n\n if (isset($input[\"curso\"]))\n {\n if ($input[\"curso\"]!=\"\") {\n $descricao_curso = explode(\"|\", $input[\"curso\"]);\n\n $filtros .= \" Curso / Evento : \" . $descricao_curso[1];\n $sWhere .= \" and cursos_id = \" . $descricao_curso[0];\n }\n }\n\n if (isset($input[\"ministrante\"]))\n {\n if ($input[\"ministrante\"]!=\"\") {\n $filtros .= \" Ministrante : \" . $input[\"ministrante\"];\n $sWhere .= \" and ministrante_id = \" . substr($input['ministrante'],0,9);\n }\n }\n\n if (isset($input[\"participante\"]))\n {\n if ($input[\"participante\"]!=\"\") {\n $filtros .= \" Pessoa : \" . $input[\"participante\"];\n $sWhere .= \" and cp.pessoas_id = \" . substr($input['participante'],0,9);\n }\n }\n\n if (isset($input[\"data_inicio\"]))\n {\n if (trim($input[\"data_inicio\"])!=\"\") {\n $parametros = array_add($parametros, 'data_inicio', $formatador->FormatarData($input[\"data_inicio\"]));\n $filtros .= \" Data Inicial : \" . $input[\"data_inicio\"];\n }\n }\n\n if (isset($input[\"data_fim\"]))\n {\n if (trim($input[\"data_fim\"])!=\"\") {\n $filtros .= \" Data Final : \" . $input[\"data_fim\"];\n $parametros = array_add($parametros, 'data_fim', $formatador->FormatarData($input[\"data_fim\"]));\n }\n }\n\n if ($descricao_nivel1!=\"\" && $descricao_nivel1[0]!=\"0\") {\n $sWhere .= \" and \" . ($tipo_relatorio==\"encontro\" ? \"celulas.\" : \"\") . \"celulas_nivel1_id = \" . $descricao_nivel1[0];\n }\n\n if ($descricao_nivel2!=\"\" && $descricao_nivel2[0]!=\"0\") {\n $sWhere .= \" and \" . ($tipo_relatorio==\"encontro\" ? \"celulas.\" : \"\") . \"celulas_nivel2_id = \" . $descricao_nivel2[0];\n }\n\n if ($descricao_nivel3!=\"\" && $descricao_nivel3[0]!=\"0\") {\n $sWhere .= \" and \" . ($tipo_relatorio==\"encontro\" ? \"celulas.\" : \"\") . \"celulas_nivel3_id = \" . $descricao_nivel3[0];\n }\n\n if ($descricao_nivel4!=\"\" && $descricao_nivel4[0]!=\"0\") {\n $sWhere .= \" and \" . ($tipo_relatorio==\"encontro\" ? \"celulas.\" : \"\") . \"celulas_nivel4_id = \" . $descricao_nivel4[0];\n }\n\n if ($descricao_nivel5!=\"\" && $descricao_nivel5[0]!=\"0\") {\n $sWhere .= \" and \" . ($tipo_relatorio==\"encontro\" ? \"celulas.\" : \"\") . \"celulas_nivel5_id = \" . $descricao_nivel5[0];\n }\n\n //Selecionar tipo de relatorio\n if ($input[\"tipo\"]==\"1\") {\n $nome_relatorio = public_path() . '/relatorios/relatorio_pessoa_cursos.jasper';\n } else if ($input[\"tipo\"]==\"2\") {\n $nome_relatorio = public_path() . '/relatorios/relatorio_cursos_pessoas.jasper';\n } else if ($input[\"tipo\"]==\"3\") {\n $nome_relatorio = public_path() . '/relatorios/relatorio_cursos_datas.jasper';\n }\n\n //set parameter sWhere for query in report\n $parametros = array_add($parametros, 'sWhere', \"'\" . $sWhere . \"'\");\n $parametros = array_add($parametros, 'filtros', \"'\" . $filtros . \"'\");\n\n //echo $nome_relatorio;\n //dd($parametros);\n\n \\JasperPHP::process(\n $nome_relatorio,\n $output,\n array($ext),\n $parametros,\n $database,\n false,\n false\n )->execute();\n\n\n $Mensagem=\"\";\n\n if (filesize($output . '.' . $ext)<=1000) //Se arquivo tiver menos de 1k, provavelmente está vazio...\n {\n\n $Mensagem = \"Nenhum Registro Encontrado\";\n if ($tipo_relatorio==\"celulas\") {\n return $this->CarregarView('', $Mensagem);\n } else {\n header('Content-Description: File Transfer');\n header('Content-Type: application/pdf');\n header('Content-Disposition: inline; filename=' . $output .'.' . $ext . '');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Content-Length: ' . filesize($output.'.'.$ext));\n flush();\n readfile($output.'.'.$ext);\n unlink($output.'.'.$ext);\n }\n\n }\n else\n {\n\n if ($ext==\"pdf\") //Se for pdf abre direto na pagina\n {\n header('Content-Description: File Transfer');\n header('Content-Type: application/pdf');\n header('Content-Disposition: inline; filename=' . $output .'.' . $ext . '');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Content-Length: ' . filesize($output.'.'.$ext));\n flush();\n readfile($output.'.'.$ext);\n unlink($output.'.'.$ext);\n }\n else //Gera link para download\n {\n return $this->CarregarView($path_download . '.' . $ext, $Mensagem);\n }\n }\n\n }", "title": "" }, { "docid": "17bf064166e64c7c39a7365af1cf1e61", "score": "0.5968265", "text": "public function pesquisaAction(){\n $request = $this->getRequest();\n $data = $request->getPost()->toArray();\n\n //var_dump($data);die();\n\n $list = $this->getEm()->getRepository($this->entity)->moviData($data['dataInicial'],$data['dataFinal']);\n $debito = $this->getEm()->getRepository($this->entity)->totalDebito();\n $credito = $this->getEm()->getRepository($this->entity)->totalCredito();\n $pdf = new FPDF();\n $pdf->AddPage();\n $pdf->SetMargins(10, 10, 10);\n $pdf->SetFont('Arial','B',8);\n // Nome Coluna\n //posiciona verticalmente\n $pdf->SetY(1);\n $pdf->Cell(50,5,'Movimento do Caixa do Periodo.:',0,0,'L');\n $datas = explode('-', $data['dataInicial']);\n $dataInicio = $datas[2] . '/'.$datas[1].'/'.$datas[0];\n $dataInicioP = $datas[2] . '-'.$datas[1].'-'.$datas[0];\n $pdf->Cell(18 ,5,$dataInicio,0,0,'L');\n $pdf->Cell(5,5,'à',0,0,'L');\n $datas = explode('-', $data['dataFinal']);\n $dataFinal = $datas[2] . '/'.$datas[1].'/'.$datas[0];\n $dataFinalP = $datas[2] . '-'.$datas[1].'-'.$datas[0];\n $pdf->Cell(18 ,5,$dataFinal,0,0,'L');\n\n\n $pdf->SetY(\"10\");\n //posiciona horizontalmente\n $pdf->SetX(\"1\");\n $pdf->Cell(10,5,'Id.:',0,0,'L');\n $pdf->Cell(70,5,'Nome.:',0,0,'L');\n $pdf->Cell(70,5,'Discriminação.:',0,0,'L');\n $pdf->Cell(20,5,'Valor.:',0,0,'L');\n $pdf->Cell(20,5,'Tipo.:',0,0,'L');\n //$pdf->Line(70, 48, 70, 23);\n\n // Valore das Colunas\n /**\n * @var $entity \\Pax\\Entity\\PaxMovimentoCaixa\n */\n $linha = 1;\n //$pdf->SetY(10);\n foreach($list as $entity):\n $possicao = 15 + $linha;\n //posiciona verticalmente\n $pdf->SetY($possicao);\n //posiciona horizontalmente\n $pdf->SetX(\"1\");\n $pdf->Cell(10,5,$entity->getId(),0,0,'L');\n //$pdf->SetX(20);\n $pdf->Cell(70,5,$entity->getCredor(),0,0,'L');\n $pdf->Cell(70,5,$entity->getDiscriminacao(),0,0,'L');\n $pdf->Cell(20,5,$entity->getValorLancado(),0,0,'L');\n $pdf->Cell(20,5,($entity->getTipo() == 'D')? 'Debito' : 'Credito',0,0,'L');\n $linha += 5;\n $linha++;\n endforeach;\n\n $linha = $possicao + 10;\n //posiciona verticalmente\n $pdf->SetY($linha);\n //posiciona horizontalmente\n $pdf->SetX(\"1\");\n $pdf->Cell(15,5,'Debito.:',0,0,'L');\n $pdf->Cell(30,5,$debito[0][1],0,0,'L');\n $pdf->Cell(15,5,'Credito.:',0,0,'L');\n $pdf->Cell(15,5,$credito[0][1],0,0,'L');\n $total = $debito[0][1] - $credito[0][1];\n $pdf->Cell(10,5,'Total.:',0,0,'C');\n $pdf->Cell(15,5,$total,0,0,'C');\n $nome = \"Movimento do Caixa_\".$dataInicioP.'_'.$dataFinalP.'.pdf';\n //var_dump($nome);die();\n $pdf->Output($nome, \"D\");\n // To set view variables\n\n //die();\n\n return new ViewModel(array('data' => $list) );\n\n }", "title": "" }, { "docid": "dbcd206c5103cb242505ca0538eb391d", "score": "0.5967389", "text": "function listarCierreCaja(){\r\n $this->procedimiento='vef.ft_apertura_cierre_caja_sel';\r\n $this->transaccion='VF_CIE_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n //$this->setCount(false);\r\n\r\n $this->setParametro('fecha','fecha','date');\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_apertura_cierre_caja','int4');\r\n $this->captura('id_sucursal','int4');\r\n $this->captura('id_punto_venta','int4');\r\n $this->captura('nombre_punto_venta','varchar');\r\n $this->captura('obs_cierre','text');\r\n $this->captura('monto_inicial','numeric');\r\n $this->captura('obs_apertura','text');\r\n $this->captura('monto_inicial_moneda_extranjera','numeric');\r\n $this->captura('estado','varchar');\r\n $this->captura('fecha_apertura_cierre','date');\r\n $this->captura('arqueo_moneda_local','numeric');\r\n $this->captura('arqueo_moneda_extranjera','numeric');\r\n //$this->captura('monto_boleto_moneda_base','numeric');\r\n //$this->captura('monto_boleto_moneda_ref','numeric');\r\n $this->captura('monto_base_fp_boleto','numeric');\r\n $this->captura('monto_ref_fp_boleto','numeric');\r\n $this->captura('monto_base_fp_ventas','numeric');\r\n $this->captura('monto_ref_fp_ventas','numeric');\r\n //$this->captura('monto_cc_boleto_bs','numeric');\r\n //$this->captura('monto_cc_boleto_usd','numeric');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "68f79331304c88020ceefec01b5e3aa6", "score": "0.5965799", "text": "public function imprimirReporteZ();", "title": "" }, { "docid": "3e54c1967dedfff5f3b6dd49ea674700", "score": "0.59586143", "text": "function verComisionesPagadasPeriodo($Inicio,$Fin){\n\t\t$arreglo = array(\"success\"=>\"false\",\"data\"=>\"\",\"error\"=>\"No hay registros\");\n\t\t$db = getConexionTda();\n\t\t$sRetorno ='';\n\t\tif ($db->getError() == '') {\n\t\t\t$rs = $db->query(\"SELECT * FROM fn_comisionespagadasporventas_select('$Inicio'::DATE,'$Fin'::DATE) ORDER BY num_ejecutivo;\");\n\t\t\tif ($db->getError() != \"\") {\n\t\t\t\t$sRetorno =$db->getError();\n\t\t\t\t$arreglo['success'] = false;\n\t\t\t\t$arreglo['error'] = $sRetorno;\n\t\t\t}else{\n\t\t\t\t$i = 0;\n\t\t\t\t$iEncabezado = 0;\n\t\t\t\t$opcion = '';\n\t\t\t\t$pagina1 = 19;\n\t\t\t\tforeach ($rs AS $valor) {\n\t\t\t\t\tif ($iEncabezado == 0){\n\t\t\t\t\t\t$iEncabezado = 1;\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$opcion .= '<div class=\"table-responsive\"></tr>';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$vColonia ='';\n\t\t\t\t\tif ($valor['colonia'] !=''){\n\t\t\t\t\t\t$vColoniaArray = explode( ' - ', $valor['colonia']);\n\t\t\t\t\t\t$vColonia = ISSET($vColoniaArray[1])?$vColoniaArray[1]:'';\n\t\t\t\t\t}\n\t\t\t\t\t$vTotal = $valor['total'];\n\t\t\t\t\t$opcion .= '<tr id=row_'.$valor['num_foliopedido'].'><td><table cellspacing=\"0\" cellpadding=\"0\" class=\"table-condensed\" style=\"width:100%;margin: 0px 0px 0px 0px;padding:0px;border-spacing: 0px 0px;border: 0px;\"><tr>';\n\t\t\t\t\t//$opcion .= '<tr id=\"'.$valor['num_foliopedido'].'\" title=\"'.$valor['num_foliopedido'].'\"><td><table cellspacing=\"0\" cellpadding=\"0\" class=\"table-condensed\" style=\"width:100%;margin: 0px 0px 0px 0px;padding:0px;border-spacing: 0px 0px;border: 0px;\"></td><tr>';\n\t\t\t\t\t$opcion .= '<td name=\"detalle\" style=\"font-family:Arial;font-size:11px;\"><span><strong>ARTICULOS:</strong>&nbsp;<label id=\"detalle\">'.$valor['detallepedido'].'</label>&nbsp;</span>.&nbsp; TOTAL $<label id=\"detalle\">'.$valor['total'].'</label>';\n\t\t\t\t\t$opcion .= '</br><label id=\"calle\"><strong>DOMICILIO:</strong>&nbsp;'.$valor['calle'].'</label>&nbsp;<label id=\"numero_ext\">'.$valor['numext'].'</label>&nbsp;<label id=\"numero_int\">'.$valor['numint'].'</label>,&nbsp;<label id=\"colonia\"><strong>&nbsp;'.$vColonia.'</strong></label><span style=\"font-size: 9px;\"> <label id=\"referencias\">'.$valor['referencias'].'.</span></label>&nbsp;';\n\t\t\t\t\t$opcion .= '</br><label id=\"nombre\" class=\"semi-bold\"><strong>CLIENTE:</strong>&nbsp;'.$valor['nombrecte'].' '.$valor['apellidocte'].'</label>&nbsp;|&nbsp;&nbsp;<label id=\"ciudad\">'.$valor['telefonocasa'].'&nbsp;/&nbsp;'.$valor['telefonocelular'].'</label>|&nbsp;FOLIO:&nbsp;<label id=\"folio\">'.$valor['num_foliopedido'].'</label>';\t\n\t\t\t\t\t$opcion .= '</br><strong>FECHA:</strong>&nbsp;<label id=\"fecha_venta\">'.$valor['fecha_venta'].'</label>&nbsp;|&nbsp;<strong>TIPO PAGO:</strong>&nbsp;<label id=\"tipopago\">'.$valor['nom_tipopago'].'</label>';\n\t\t\t\t\t$opcion .= '&nbsp;|&nbsp;<strong>PLAZO:</strong>&nbsp;<label id=\"plazo\">'.$valor['nom_plazo'].'</label>';\n\t\t\t\t\t$opcion .= '&nbsp;|&nbsp;<strong>COBRO:</strong>&nbsp;<label id=\"plazo\">'.$valor['nom_periodocobro'].'</label>';\n\t\t\t\t\t$opcion .= '</br><strong>VENDEDOR:</strong>&nbsp;<label id=\"nom_ejecutivo\">'.$valor['nom_ejecutivo'].'</label>';\n\t\t\t\t\t$opcion .= '|&nbsp;<strong>SUPERVISOR:</strong>&nbsp;<label id=\"nom_supervisor\">'.$valor['nom_supervisor'].'</label>';\n\t\t\t\t\t$opcion .= '|&nbsp;<strong>JEFE GPO:</strong>&nbsp;<label id=\"nom_jefegpo\">'.$valor['nom_jefegpo'].'</label>';\n\t\t\t\t\t$opcion .='</td>';\n\t\t\t\t\t\n\t\t\t\t\t$opcion .= '<td class=\"pull-right\" name=\"controles\" id=\"controles_'.$valor['num_foliopedido'].'\" ><div class=\"btn-group-vertical\">';\n\t\t\t\t\t$opcion .= '<label id=\"num_clientecomision\" class=\"bold\" style=\"display:none\">'.$valor['num_ejecutivo'].'</label><br>';\n\t\t\t\t\t$opcion .= 'VENDEDOR:<label id=\"nom_clientecomision\" class=\"bold\">'.$valor['nom_ejecutivo'].'</label><br>';\n\t\t\t\t\t$opcion .= 'COMISIÓN:$<label id=\"total_comision\" class=\"semi-bold\">'.$valor['comision'].'</label><br>';\n\t\t\t\t\t$opcion .= '<button type=\"button\" title=\"Imprimir comprobante\" class=\"btn btn-info btn-xs noMostrarPrint\" name=\"'.$valor['num_foliopedido'].'\" onclick=RedirectPage(\"#ajax/imprimir_comprobantepedido.php?f='.$valor['num_foliopedido'].'&n='.$vTotal.'\"); id=\"smart-mod-eg1\"><i class=\"fa fa-edit\">&nbsp;</i>Factura</button>';\n\t\t\t\t\t/*$opcion .= '<button type=\"button\" title=\"Cancelar el pedido\" class=\"btn btn-info btn-xs noMostrarPrint\" name=\"'.$valor['num_foliopedido'].'\" href=\"javascript:void(0);\" id=\"smart-mod-eg1\" onclick=\"MensajeSmartModPedidos('.$valor['num_foliopedido'].',2);\"><i class=\"fa fa-trash-o\">&nbsp;</i>Cancelar</button><br/>';\n\t\t\t\t\t$opcion .= '<a id=\"recibirpedido\" href=\"#ajax/modal_abonos.php?id='.$valor['num_foliopedido'].'\" title=\"Recibe abonos y mercancias\" type=\"button\" class=\"btn btn-primary btn-xs noMostrarPrint\"><i class=\"fa fa-edit\">&nbsp;</i>Recibir</a><br/>';\n\t\t\t\t\t$opcion .= '<button type=\"button\" title=\"Imprimir comprobante\" class=\"btn btn-info btn-xs noMostrarPrint\" name=\"'.$valor['num_foliopedido'].'\" onclick=RedirectPage(\"#ajax/imprimir_comprobantepedido.php?f='.$valor['num_foliopedido'].'&n='.$vTotal.'\"); id=\"smart-mod-eg1\"><i class=\"fa fa-edit\">&nbsp;</i>Comprobante</button></div>';*/\n\t\t\t\t\t\n\t\t\t\t\t$opcion .= '</td><tr/>';\n\t\t\t\t\t$opcion .= '<hr style=\"margin:0px 0px 0px 0px;padding:0px;\"></table>';\n\t\t\t\t\tif ($i == $pagina1){\n\t\t\t\t\t\t$pagina1 = 21;\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t$opcion .= '<br/><br/>';\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$opcion .= '</tr></div>';\n\t\t\t\t\n\t\t\t\t$arreglo['success'] = true;\n\t\t\t\t$arreglo['data'] = $opcion;\n\t\t\t\t$arreglo['error'] = '';\n\t\t\t}\n\t\t} else {\n\t\t\t$sRetorno =$db->getError();\n\t\t\t$arreglo['success'] = false;\n\t\t\t$arreglo['error'] = $sRetorno;\n\t\t}\n\t\tcloseConexion($db);\n\t\treturn $arreglo;\n\t}", "title": "" } ]
599b7826835aaf5cae9bd0792c87aad7
Read a file to get the content
[ { "docid": "2f87d6abfe5d9fb0520b4eb1e0ffb7d3", "score": "0.0", "text": "static function file($filename, $start = \"\", $end = \"\") {\n\t\treturn file_exists($filename) ? $start . file_get_contents($filename) . $end : null;\n\t}", "title": "" } ]
[ { "docid": "c5d5d1f0a99dd65f7493822f0bd6aaa4", "score": "0.812255", "text": "public function getContents($file);", "title": "" }, { "docid": "1fae860b24a173f5bc1c1e3c255244ac", "score": "0.77041733", "text": "public function read($file);", "title": "" }, { "docid": "5987388eba2a22538d71666771e09107", "score": "0.75657964", "text": "protected function getFileContents() {\n $path = $this->getFilePath();\n return file_get_contents($path);\n }", "title": "" }, { "docid": "e0aaa4176e15643012ec0345e0c49362", "score": "0.75150675", "text": "function fileGetContents($filename);", "title": "" }, { "docid": "210c5abf07401148080f02f946857630", "score": "0.74732625", "text": "public function read_file() {\t\t\r\n\t\t$file = $this->filepath;\r\n\t\t\r\n\t\tif(file_exists($file)) {\r\n\t\t\t$this->_content = file_get_contents($file);\t\r\n\t\t} \r\n\t}", "title": "" }, { "docid": "08e9a17729b1047b0109b15c4c9dd3c7", "score": "0.74164295", "text": "public function getFileContents($file)\n\t{\n\t\treturn file_get_contents($file);\n\t}", "title": "" }, { "docid": "8e7da46be0cb9e6fc0d41f9c006f7f06", "score": "0.73281157", "text": "public function readFile($file) {\n\t\treturn $this->read(file_get_contents($file));\n\t}", "title": "" }, { "docid": "0794fd8559a1e4af24318477fc326dc7", "score": "0.7319547", "text": "abstract public function getContent($file);", "title": "" }, { "docid": "6cc983cb7e115f7c1ea89f61ea1b5547", "score": "0.7268259", "text": "public function readFile($file){\n\t\tif (isset($file) && file_exists($file)) return file_get_contents($file);\n\t\telse return '';\n\t}", "title": "" }, { "docid": "b3031c0a01754475d064b325866e3dc2", "score": "0.725606", "text": "public function read()\n\t{\n\t\treturn file_get_contents($this->getPath());\n\t}", "title": "" }, { "docid": "57253a6b504b408d0629284c0b9637e8", "score": "0.7204826", "text": "public function readFile() {\n $content = $this->getFileContents();\n return json_decode($content, 1);\n }", "title": "" }, { "docid": "bb8ec036d60735c558a1be19b7441029", "score": "0.7199635", "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": "4955bde0686680a5877420a00bd1d29b", "score": "0.71454793", "text": "function readFile(){\n $this->setHeaders();\n $this->readContent();\n\n }", "title": "" }, { "docid": "6f95f17b10e9db19c3ff8e9b5aaa738b", "score": "0.71215713", "text": "function get_file_contents($filename) {\r\n if (!function_exists('file_get_contents')) {\r\n $fhandle = fopen($filename, 'r');\r\n $fcontents = fread($fhandle, filesize($filename));\r\n fclose($fhandle);\r\n } else {\r\n $fcontents = file_get_contents($filename);\r\n }\r\n\r\n return $fcontents;\r\n }", "title": "" }, { "docid": "01500d163f9be590491ae8788b07888b", "score": "0.70824635", "text": "public function read($file) {\n\t}", "title": "" }, { "docid": "a74419ca6d1dbefe2dcaa6f35782a0fb", "score": "0.7076407", "text": "public function read($path) {\n return file_get_contents($path);\n }", "title": "" }, { "docid": "013327474cce8731ea60ad7183cb982d", "score": "0.7038596", "text": "function fatchfilecontent($file_path = NULL)\n {\n $handle = fopen($file_path, \"r\");\n $contents = '';\n while (!feof($handle)) {\n $contents .= fread($handle, 8192);\n }\n fclose($handle);\n return $contents;\n }", "title": "" }, { "docid": "0c78d88282d0ef0c89660ffef05c46ce", "score": "0.70365494", "text": "private static function getFileContent($filename)\n\t{\n\t\treturn file_get_contents($filename);\n\t}", "title": "" }, { "docid": "4ce5d3d835a041cf0284e403d768926e", "score": "0.70060045", "text": "public static function read_content($id)\n {\n $meta = self::meta($id);\n self::file_exists($meta, true);\n return file_get_contents($meta['file']);\n }", "title": "" }, { "docid": "b3f07ebffd2067d05b55557be391918f", "score": "0.6983145", "text": "public function get_content($file_name)\n\t{\n\t\tif ( $this->check_path($file_name) && defined('BBN_DATA_PATH') && is_file(BBN_DATA_PATH.$file_name) ){\n return file_get_contents(BBN_DATA_PATH.$file_name);\n }\n\t\treturn false;\n\t}", "title": "" }, { "docid": "4683d65fe3764492a7c7f0f4d60c5f17", "score": "0.69679374", "text": "public function read($path)\n {\n return file_get_contents($path);\n }", "title": "" }, { "docid": "edace737f37ece3a5d2325c9d4849d07", "score": "0.6951125", "text": "public function getContents($path)\n {\n return file_get_contents($path);\n }", "title": "" }, { "docid": "d57228432f396fbc7d9e4503e0d15615", "score": "0.6936717", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "d57228432f396fbc7d9e4503e0d15615", "score": "0.6935213", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "d57228432f396fbc7d9e4503e0d15615", "score": "0.6935213", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "d57228432f396fbc7d9e4503e0d15615", "score": "0.69348073", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "d57228432f396fbc7d9e4503e0d15615", "score": "0.69348073", "text": "public function get_contents($file)\n {\n }", "title": "" }, { "docid": "5361b8cf1c7b1da993d412cd2a6bea65", "score": "0.69320387", "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": "1f499a947de7d7c97df169b23e7622d1", "score": "0.6894535", "text": "public function contents() {\n\t\treturn file_get_contents($this->path);\n\t}", "title": "" }, { "docid": "42eb79f8a0538bc39669c915fd125043", "score": "0.68875504", "text": "public static function getFileContent($filename)\r\n\t{\r\n\t\t$buffer = '';\r\n\t\tif( $fd = @fopen($filename, 'r') )\r\n\t\t{\r\n\t\t\twhile(! @feof ($fd))\r\n\t\t\t\t$buffer .= @fgets($fd, 4096); \r\n\t\t\t@fclose($fd);\r\n\t\t}\r\n\t\telse\r\n\t\t\tself::reportRunningWarning(\"Common::getFileContent() Unable to read the file '$filename' !\");\r\n\t\treturn $buffer;\r\n\t}", "title": "" }, { "docid": "cfcf3c6f30e4dc8ae9010bf99ace1262", "score": "0.68819994", "text": "public function readFile($path);", "title": "" }, { "docid": "e5d3a9379e0de1ea11f0dfb9e8fbf0cf", "score": "0.6872805", "text": "protected function getFileContent($filename)\n {\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "5faa6582ea76c15727409e74eac9a75b", "score": "0.684246", "text": "public function getContent() {\n\t\treturn $this->storage->file_get_contents($this->path);\n\t}", "title": "" }, { "docid": "75a4fae31fe30d908e200c40c7bcc1df", "score": "0.68348897", "text": "function reading_file($file_txt) {\n\t$data_txt = $file_txt;\n\t$fh = fopen($data_txt, \"r\");\n\t$file = file_get_contents($data_txt);\n\treturn $file;\n}", "title": "" }, { "docid": "0fa38f03fefe3093841c1300b2cbc1fa", "score": "0.68335736", "text": "protected function getFileContent($fileName)\n {\n return file_get_contents($fileName);\n }", "title": "" }, { "docid": "52cab1118929f479533c570442eceeb4", "score": "0.68314666", "text": "public function getFileContents()\r\n {\r\n $this->fileContents = $this->fileContents ?? file_get_contents($this->file);\r\n\r\n return $this->fileContents;\r\n }", "title": "" }, { "docid": "758725d1bb493dad689f34c42478acb1", "score": "0.68236154", "text": "public function read(string $file): string;", "title": "" }, { "docid": "91832242518381abda33c8d1713684e7", "score": "0.68127877", "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": "e4b31ecdcb3173d9c1c1b5e46fae4016", "score": "0.68070245", "text": "public function readAll() {\n //$max_len = \\filesize($this->file->getAbsolutePath());\n //return $this->readString($max_len);\n return \\file_get_contents($this->file->getAbsolutePath());\n }", "title": "" }, { "docid": "e58b9dad3923eaf34295876c580a9bb4", "score": "0.6782101", "text": "function getFileContent($file_name, $lang) {\n\t// stores the file's content\n\t$file_content = \"\";\n\n\t// build path to the data folder, where the .txt files are located\n\t$data_path = dirname(dirname(__FILE__)).\"/data/\";\n\n\t// check if the file is language independent\n\tif (file_exists($data_path.$file_name.\".txt\")) {\n\t\t// it is\n\t\t// get the requested file's content\n\t\t$file_content = file_get_contents($data_path.$file_name.\".txt\");\n\t// check if the file is language dependent\n\t}else if (file_exists($data_path.$lang.\"/\".$file_name.\".txt\")) {\n\t\t// it is\n\t\t// get the requested file's content\n\t\t$file_content = file_get_contents($data_path.$lang.\"/\".$file_name.\".txt\");\n\t}\n\n\t// check if the file_get_contents() returned a failure\n\tif ($file_content === False) {\n\t\t// it did\n\t\t// the content couldn't be retrieved, so set this file's content to an empty string\n\t\t$file_content = \"\";\n\t}\n\n\t// return this file's content\n\treturn($file_content);\n}", "title": "" }, { "docid": "cbc0b5d216cf35e38b2caf15d4216a62", "score": "0.6747093", "text": "function get_content($file) {\n include($file);\n return array($q, $a);\n }", "title": "" }, { "docid": "9ab8931f1c246ab18d11f2580120c26f", "score": "0.67374897", "text": "public function getContents(){\n return file_get_contents($this->source);\n }", "title": "" }, { "docid": "e5ae0cd769e6cf69bc74ae5d876bf0a6", "score": "0.6735783", "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": "a32a911cd2ceac1d5df3c0278ebc3b59", "score": "0.67334586", "text": "protected function readContent() {\r\n\t\t$this->contentList = [];\r\n\t\t$this->read = true;\r\n\t\t$i = 0;\r\n\t\t\r\n\t\t// Read the 512 bytes header\r\n\t\t$longFilename = null;\r\n\t\twhile (strlen($binaryData = $this->file->read(512)) != 0) {\r\n\t\t\t// read header\r\n\t\t\t$header = $this->readHeader($binaryData);\r\n\t\t\tif ($header === false) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// fixes a bug that files with long names aren't correctly\r\n\t\t\t// extracted\r\n\t\t\tif ($longFilename !== null) {\r\n\t\t\t\t$header['filename'] = $longFilename;\r\n\t\t\t\t$longFilename = null;\r\n\t\t\t}\r\n\t\t\tif ($header['typeflag'] == 'L') {\r\n\t\t\t\t$format = 'Z'.$header['size'].'filename';\r\n\t\t\t\t\r\n\t\t\t\t$fileData = unpack($format, $this->file->read(512));\r\n\t\t\t\t$longFilename = $fileData['filename'];\r\n\t\t\t\t$header['size'] = 0;\r\n\t\t\t}\r\n\t\t\t// don't include the @LongLink file in the content list\r\n\t\t\telse {\r\n\t\t\t\t$this->contentList[$i] = $header;\r\n\t\t\t\t$this->contentList[$i]['index'] = $i;\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->file->seek($this->file->tell() + (512 * ceil($header['size'] / 512)));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2524426cc4a75e0f67df7f1868e441bf", "score": "0.66918933", "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": "46bb4ff918cc73579678e5fe444f4d60", "score": "0.6676006", "text": "function getFileContents($pathToFile) {\n\t$file = $pathToFile;\n\t$handle = fopen($file, \"r\");\n\t$pageContents = fread($handle, filesize($file));\n\tfclose($handle);\n\treturn $pageContents;\n}", "title": "" }, { "docid": "333fa2c47e544aafcf9e7ab1c13990c3", "score": "0.6672308", "text": "function _getFileContents( $file )\r\n {\r\r\n if (function_exists('file_get_contents')) {\r\n $content = @file_get_contents( $file );\r\n } else {\r\n $content = implode('', file($file));\r\n }\r\n\r\n /**\r\n * store the file name\r\n */\r\n array_push($this->_files, $file);\r\n\r\n return $content;\r\n }", "title": "" }, { "docid": "dd823a71d329e13c28fd9610be8e7305", "score": "0.66722864", "text": "function local_file_get_contents($file) {\r\n\t\treturn file_get_contents($file);\r\n\t}", "title": "" }, { "docid": "1564a3d0aae15c9e3b90bcbaa5a345ae", "score": "0.66594803", "text": "public function getContent()\n {\n return file_get_contents($this->fullPath);\n }", "title": "" }, { "docid": "b60f86571df3718f9b88ef59a7e4b0aa", "score": "0.66552854", "text": "public function read($fileName)\n {\n $data=$this->fileAction('r',$fileName);\n return $data;\n }", "title": "" }, { "docid": "ee24b632b73ce3622376b9b10a918d0c", "score": "0.66511816", "text": "public function read($path);", "title": "" }, { "docid": "843f78f02dffea6c380a1fff4a40bb98", "score": "0.66414356", "text": "public function readerGetContent();", "title": "" }, { "docid": "4cb458bb62f12f0a19de3f49a9f4178a", "score": "0.66366637", "text": "public function getContent()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$filePath = $this->filePath;\n\t\t$content = $fc->readFromFile($filePath);\n\t\tif ($content === false) {\n\t\t\t// Init new file with default content.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$res = $fc->writeToFile($content, $filePath);\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "775c2c49ae0fbcaf6330790555c6a611", "score": "0.6636139", "text": "public static function read($filename)\n\t{\n\t\t$contents='';\n\t\tclearstatcache();\n\t\tif(file_exists($filename))\n\t\t{\n\t\t\t$fsize=filesize($filename);\n\t\t\tif($fsize>0)\n\t\t\t{\n\t\t\t\t$fp=fopen($filename,'r');\n\t\t\t\t$contents=fread($fp,$fsize);\n\t\t\t\tfclose($fp);\n\t\t\t}\n\t\t}\n\t\tif(version_compare(PHP_VERSION,'5.4.0','<'))\n\t\t\tif(get_magic_quotes_runtime())\n\t\t\t\t$contents=stripslashes($contents);\n\t\treturn $contents;\n\t}", "title": "" }, { "docid": "96c7e492666b1f138f251f696bc9d3d1", "score": "0.6626983", "text": "function file_get_contents($file) {\n\t\treturn join('', file($file));\n\t}", "title": "" }, { "docid": "baf9722d1601ff8e9a9df0d7383800a4", "score": "0.6624918", "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": "7a87443a94fc1d04d7e1d77ba7138afd", "score": "0.66198134", "text": "function file_read ($filename) {\r\n $fd = fopen($filename, 'r') or die(\"Can't open file $filename for read!\");\r\n $theData = fread($fd, filesize($filename));\r\n fclose($fd);\r\n return $theData;\r\n }", "title": "" }, { "docid": "1ab25854685a8989dc847f04d4ab57c9", "score": "0.6606173", "text": "public static function getContent($filename)\n\t{\n\t\treturn @file_get_contents((string) $filename);\n\t}", "title": "" }, { "docid": "2655d7a66471c646eebce2b8bdbb7336", "score": "0.6595019", "text": "public function getFileContent()\n {\n return $this->extractFileAsText();\n }", "title": "" }, { "docid": "5964f357ca973530b34e2c3e17709d2c", "score": "0.65872836", "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": "85729bca085363724346f349d0132503", "score": "0.65836006", "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": "f256f2fb8b7a9afe899861562a21ae5b", "score": "0.65821403", "text": "public function parse($file)\n {\n return $this->content;\n }", "title": "" }, { "docid": "ed4df1d7336cd5c4b288c386aacf287a", "score": "0.6569018", "text": "function my_file_get_contents($filename, $use_include_path = 0) {\n\n $data = \"\";\n $file = @fopen($filename, \"rb\", $use_include_path);\n if ($file) {\n while (!feof($file)) {\n $data .= fread($file, 1024);\n }\n fclose($file);\n }\n return $data;\n}", "title": "" }, { "docid": "694aa36877fb9e5cf999fdcc85eecc56", "score": "0.65644234", "text": "protected function getContents()\n {\n $filepath = $this->getFilepath();\n\n // Cancel if the file doesn't exist\n if (!$this->files->has($filepath)) {\n return [];\n }\n\n // Get and parse file\n if ($this->contents === null) {\n $this->contents = $this->files->read($filepath);\n $this->contents = json_decode($this->contents, true);\n }\n\n return $this->contents;\n }", "title": "" }, { "docid": "008dfeb4aa655f0d73da82e9e8815cf1", "score": "0.6560661", "text": "function read($file):string{\r\n//cette methode permet de lire et ecrire dans un fichier \r\n $file=dirname(__DIR__).DIRECTORY_SEPARATOR.str_secure($file);\r\n//verification des l'existence du fichier \r\n if(file_exists($file)):\r\n//on recupere le contenu du fichier\r\n $readline=(string)file_get_contents($file);\r\n//On retourne le contenu du fichier\r\n return (!empty($readline))?$readline:\"\";\r\n\r\n endif;\r\n\r\n}", "title": "" }, { "docid": "e3561af6a0715b19a675cb9d679b9d1f", "score": "0.65605927", "text": "public function get($fileName)\n\t{\n\t\treturn file_get_contents($fileName);\n\t}", "title": "" }, { "docid": "f00076135b6f13fe77b8817acd1295f1", "score": "0.65542036", "text": "public function get($file)\n\t{\n\t\tif (!$this->exists($this->path($file)))\n\t\t{\n\t\t\tthrow new FileNotFoundException(\"File not found at $file\");\n\t\t}\n\n\t\treturn file_get_contents($this->path($file));\n\t}", "title": "" }, { "docid": "d555cb766970280961ad1e69875af8a0", "score": "0.6549821", "text": "public function contents($path)\n {\n if ($this->check($path)) return File::contents($path);\n }", "title": "" }, { "docid": "aab92c66fe5a7745ed5cde41234b0bbc", "score": "0.6549238", "text": "public function read()\n {\n if(!$this->edit && $this->exists())\n readfile($this->getPath());\n else\n echo $this->contents;\n }", "title": "" }, { "docid": "6268f710527e134657e0002830823d6a", "score": "0.6540198", "text": "public function read()\n {\n return $this->_contents;\n }", "title": "" }, { "docid": "7c1a1b9067d7c54bf89c981dc4ba89a8", "score": "0.65360653", "text": "public static function readFile($path) {\n if (is_file($path)) {\n return file_get_contents($path);\n } else {\n throw new Visio\\Exception\\FileNotFound('File \\'' . $path . '\\' not found!');\n }\n }", "title": "" }, { "docid": "dc41458483603bc9cdb3f70e326f5daf", "score": "0.65291625", "text": "function quest_read_layout_file( $file ) {\n\t\tWP_Filesystem();\n\t\tglobal $wp_filesystem;\n\t\treturn $wp_filesystem->get_contents( $file );\n\t}", "title": "" }, { "docid": "f0d903b85a36fae46c1b093bd622d9bd", "score": "0.651103", "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": "a95d4b0f232fbf3c643d9b8b33c1af29", "score": "0.6505956", "text": "abstract public function read($path);", "title": "" }, { "docid": "c0d51d0c572c676a1340d09564bb5f06", "score": "0.65037835", "text": "public function get_file_content($file)\n {\n return is_bool($file) ? FALSE : file_get_contents($file);\n }", "title": "" }, { "docid": "9975f6c2d4626716c2c0918f1de4d1fd", "score": "0.64762706", "text": "protected function _readFile($path) {\n\t\t$context = stream_context_create(\n\t\t\t['http' => ['header' => 'Connection: close']],\n\t\t);\n\t\t$content = file_get_contents($path, false, $context);\n\t\tif (!$content) {\n\t\t\tthrow new RuntimeException('No content found for ' . $path);\n\t\t}\n\n\t\treturn chunk_split(base64_encode($content));\n\t}", "title": "" }, { "docid": "e4ee31b5e569662440ee14f9fa2b518e", "score": "0.64587694", "text": "public static function read_file($file) {\n\t\tif(self::has_file($file)) {\n\t\t\t$time = filemtime($file);\n\t\t\tif(Registry::get(\"site.newest_file\") < $time) {\n\t\t\t\tRegistry::set(\"site.newest_file\",$time);\n\t\t\t}\n\t\t\treturn file_get_contents($file);\n\t\t} else {\n\t\t\tdie(\"Disk::read_file: File '\".$file.\"' does not exist!\");\n\t\t}\n\t}", "title": "" }, { "docid": "a4393a737a0b9a0079a31dd9df1dbd62", "score": "0.64392257", "text": "protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }", "title": "" }, { "docid": "86d03bdf9b700dd558c1563b71b47e89", "score": "0.64324915", "text": "public static function getContent ($path) {\n\t\treturn \\file_get_contents($path);\n\t}", "title": "" }, { "docid": "f6e148de81941f62687a98a6fb855ef9", "score": "0.64143723", "text": "function Get_File_Contents($Filename) {\n //return 'hello';\n $File_Handle = fopen($Filename, \"r\");\n $File_Contents = fread($File_Handle, filesize($Filename));\n fclose($File_Handle);\n return $File_Contents;\n }", "title": "" }, { "docid": "7fba28a5065f9381e4cbf10d9ba2d2a4", "score": "0.6400224", "text": "function getContents() ;", "title": "" }, { "docid": "3c5de5292001849a8183a805d55c2a9c", "score": "0.6393312", "text": "public function getFileContent($filePath): string\n {\n return file_get_contents($this->rootDir . '/' . $filePath);\n }", "title": "" }, { "docid": "ae8a385022632bd391bafca07103a058", "score": "0.6379959", "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": "d2618e5e264981b20299509a4cc283c5", "score": "0.63674504", "text": "function read() {\n\t\tif ($this->f && filesize($this->path) > 0) {\n\t\t\treturn fread($this->f, filesize($this->path));\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "a0c7fb33b3bc6d8564abf1326bd7ece3", "score": "0.6366093", "text": "public function get_content() {\n // Check if no content is yet loaded\n if (empty($this->content)) {\n $this->content = @file_get_contents($this->name);\n }\n\n return $this->content;\n }", "title": "" }, { "docid": "d633e4acf0e27502ae8c4b541784db45", "score": "0.6357185", "text": "public function read_doc_file()\n {\n $path = getcwd();\n $f = $path . \"/\" . $this->file;\n if (file_exists($f)) {\n if (($fh = fopen($f, 'r')) !== false) {\n $headers = fread($fh, 0xA00);\n\n // 1 = (ord(n)*1) ; Document has from 0 to 255 characters\n $n1 = (ord($headers[0x21C]) - 1);\n\n // 1 = ((ord(n)-8)*256) ; Document has from 256 to 63743 characters\n $n2 = ((ord($headers[0x21D]) - 8) * 256);\n\n // 1 = ((ord(n)*256)*256) ; Document has from 63744 to 16775423 characters\n $n3 = ((ord($headers[0x21E]) * 256) * 256);\n\n // 1 = (((ord(n)*256)*256)*256) ; Document has from 16775424 to 4294965504 characters\n $n4 = (((ord($headers[0x21F]) * 256) * 256) * 256);\n\n // Total length of text in the document\n $textLength = ($n1 + $n2 + $n3 + $n4);\n\n $extracted_plaintext = fread($fh, $textLength);\n $extracted_plaintext = mb_convert_encoding($extracted_plaintext, 'UTF-8');\n // simple print character stream without new lines\n //echo $extracted_plaintext;\n\n // if you want to see your paragraphs in a new line, do this\n return nl2br($extracted_plaintext);\n // need more spacing after each paragraph use another nl2br\n }\n }\n }", "title": "" }, { "docid": "87e7f8f4d8a7284b73167e0bfa3dd2d2", "score": "0.63532287", "text": "function read($name) {\n return @file_get_contents($this->path . \"/$name\");\n }", "title": "" }, { "docid": "bee37c19c812098bcc8794b8ac73000e", "score": "0.6337584", "text": "public function get($file)\n {\n $path = $this->getPath($file);\n\n if ( ! file_exists($path)) throw new FileDoesNotExist;\n\n return file_get_contents($path);\n }", "title": "" }, { "docid": "98b9042a378ec8927107da6f42cd3da8", "score": "0.6334468", "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": "dafb171152696fdb659e68058c2f07d2", "score": "0.6331597", "text": "public function getContent()\n\t\t\t{\n\t\t\t\tif($this->exist)\n\t\t\t\t\treturn file_get_contents($this->path);\n\t\t\t\telse\n\t\t\t\t\treturn '';\n\t\t\t}", "title": "" }, { "docid": "1c31f59062b25173f1369cc7182770fe", "score": "0.63154286", "text": "public static function get($_path)\r\n {\r\n if($this->isFile($_path))\r\n {\r\n return file_get_contents($_path);\r\n }\r\n }", "title": "" }, { "docid": "02959ca1812d7663c0d989766b522259", "score": "0.6307399", "text": "public function readLines(){\n return $this->file;\n }", "title": "" }, { "docid": "50577e2692ea07dc0e3cae2f0e839eb3", "score": "0.6283685", "text": "public function getContents(): string\n {\n return (string) file_get_contents($this->getAbsolutePath());\n }", "title": "" }, { "docid": "fcf7cb5f4e388499c029c4b12b69f21c", "score": "0.6273404", "text": "public function read()\n {\n if(Cache::exist($this->key))\n {\n return Cache::get($this->key);\n }\n else\n {\n if(File::exist($this->file))\n {\n if(!static::$cache->hasKey($this->key))\n {\n $file = new Reader($this->file);\n \n if($file->is('php'))\n {\n $data = static::send($file->require());\n }\n else\n {\n $data = static::send($file->lines());\n }\n\n static::$cache->set($this->key, $data);\n\n return $data;\n }\n else\n {\n return static::$cache->get($this->key);\n }\n }\n }\n }", "title": "" }, { "docid": "c15d8234f14d5dfe589dd99f1e981f95", "score": "0.6260972", "text": "private function getFileContent(string $filename)\n {\n if (!file_exists($filename)) {\n throw new Exception(sprintf('File %s not found', $filename));\n }\n\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "75b8045be72c19bb960440d20143d528", "score": "0.62589604", "text": "function GetFile($filename){\n $filename = 'brown' . DIRECTORY_SEPARATOR . $filename;\n $handle = fopen($filename, 'r');\n $contents = fread($handle, filesize($filename));\n fclose($handle);\n return $contents;\n}", "title": "" }, { "docid": "a77a222d9b6ca01a86a3a19ea1a92386", "score": "0.6254735", "text": "function openFile($filename) \n{\n $handle = fopen($filename, 'r');\n $contents = fread($handle, filesize($filename));\n $contentsArray = explode(\"\\n\", trim($contents));\n fclose($handle);\n return $contentsArray;\n}", "title": "" }, { "docid": "42e7d8429181c39d3728b91eec0d3af0", "score": "0.62528163", "text": "static function readFl($file)\n {\n $fileC = fopen($file,\"r\") or die(\"unable to open\");\n\n return fread($fileC, filesize($file));\n fclose($fileC);\n }", "title": "" }, { "docid": "178f13282a75a01766b9ae3ca2c39c09", "score": "0.6243876", "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": "a52af7e07a163bd9aff39e84a0813ef1", "score": "0.62421674", "text": "public function read(string $file): string\n {\n return $this->filesystem->exists($file) ? \\file_get_contents($file) : '';\n }", "title": "" }, { "docid": "6eeb130cc94d8fe9b4a2ea62cdeeba0b", "score": "0.6237986", "text": "function GetFileContent()\n{\t\n\t$sFileUrl = ''; \n\t$sFileContent = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t\n\t$sFileUrl = $_REQUEST['file-path']; \n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>file not exist</fail>';\n\t\treturn;\n\t}\n\t\n\tif(is_file($sFileUrl) === false)\n\t{\t\n\t\techo '<fail>this is not a file</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t\n\t$sFileContent = file_get_contents($sFileUrl); \n\tif($sFileUrl === false)\n\t{\n\t\techo '<fail>cant open file</fail>';\n\t\treturn;\n\t}\n\t\n\techo '<mdhash>'.md5($sFileContent).'</mdhash>';\n\techo '<correct>correct get file</correct>';\n\techo base64_encode($sFileContent);\n\treturn true;\n}", "title": "" } ]
96e5930346577b5d971cc9c5e791ff9c
need this to start session tracking IN EVERY PHP page using session session_start();
[ { "docid": "144d623d4ad61a48dbdd7add8a2adbea", "score": "0.0", "text": "function createArray($omit)\n{\n $array = [];\n $i = 0;\n foreach (range('A', 'Z') as $char)\n {\n $array[$i] = $char;\n $i++;\n }\n \n // var_dump($array);\n \n $pos = array_search($omit, $array);\n unset($array[$pos]);\n \n // var_dump($array);\n \n return $array;\n}", "title": "" } ]
[ { "docid": "a91c4a28468362ee6fcfc9138f7add55", "score": "0.81343704", "text": "private function startSession(){\n\t\t\tsession_start();\n\t\t}", "title": "" }, { "docid": "d99ff35cc5d7da54b6b3c017b9fff976", "score": "0.8033749", "text": "private static function startSession() {\n session_start();\n }", "title": "" }, { "docid": "2824466e96572c24e1b4dc1fd13c8d0c", "score": "0.8023097", "text": "private function _startSession() {\n\t\tsession_start();\n\t\t\n\t\t// Assign framework variables if needed\n\t\tif (!isset($_SESSION[Config::SESSION_PREFIX.'inited'])) {\n\t\t\t$this->_assignFrameworkVars();\n\t\t}\n\t}", "title": "" }, { "docid": "819b3d160d12cc660fdb447f7919602b", "score": "0.8002897", "text": "public function start_session() {\n\t\t\tif( ! session_id()) session_start();\n\t\t}", "title": "" }, { "docid": "68245933bbd385332782ced1f6a754f9", "score": "0.7968167", "text": "public function session_start()\n {\n if( ! session_id() )\n session_start();\n }", "title": "" }, { "docid": "bd3aeee22714e0eb7d64225b4ae07349", "score": "0.7923126", "text": "public static function start() {\n\t\t\tsession_start();\n\t\t}", "title": "" }, { "docid": "7b6f7449b389e8eb13fcf67fc7ab1823", "score": "0.7915076", "text": "private function doStartSession()\n {\n session_start();\n }", "title": "" }, { "docid": "0e8d00b129e8d5e0d1dbbae1465b0eb7", "score": "0.78482276", "text": "private function doStartSession()\n {\n if(session_status() == PHP_SESSION_NONE) session_start();\n }", "title": "" }, { "docid": "5a6449e593c0601146419d63c4aa0d25", "score": "0.7847534", "text": "public static function session_start() {\n $session = self::getInstance();\n }", "title": "" }, { "docid": "665af2238597d0ffbdd0f5f7538b18ed", "score": "0.7825271", "text": "function startSession(){\r\n session_start();\r\n }", "title": "" }, { "docid": "ee483fd4f7f64726c6d4da57b5e624d5", "score": "0.7813143", "text": "public static function startSession(){\n\t\tsession_cache_limiter('nocache');\n\t\tsession_start();\n\n\t}", "title": "" }, { "docid": "6e251647d4ba1ffec1d13928d5119648", "score": "0.7794802", "text": "private function startSession(): void {\n\t\tsession_name('Automad-' . md5(AM_BASE_DIR));\n\t\tsession_set_cookie_params(0, '/', '', false, true);\n\t\tsession_start();\n\t}", "title": "" }, { "docid": "a0b404a6b703dc9cae676bc2ea48c4dc", "score": "0.7741646", "text": "public function startSession()\n {\n if(session_status() == PHP_SESSION_NONE)\n {\n // Start the session\n session_start();\n\n // Regenerate the identifiers\n $this->setSessionSalt();\n $this->setSessionFingerprint();\n $this->regenerateID();\n\n // Commit the identifiers to the in-memory session object\n $this->superGlobalRepository()->setSession();\n }\n }", "title": "" }, { "docid": "b5f079f3168cad183652ec663b9bd744", "score": "0.7694824", "text": "function start_session() {\n\t\t$session_name = 'omh_session_id'; // Set a custom session name\n\t\t/*Sets the session name.\n\t\t *This must come before session_set_cookie_params due to an undocumented bug/feature in PHP.\n\t\t */\n\t\tsession_name( $session_name );\n\n\t\t$secure = true;\n\t\t// This stops JavaScript being able to access the session id.\n\t\t$httponly = true;\n\t\t// Forces sessions to only use cookies.\n\t\tif ( ini_set( 'session.use_only_cookies', 1 ) === false ) {\n\t\t\theader( \"Location: ../error.php?err=Could not initiate a safe session (ini_set)\" );\n\t\t\texit();\n\t\t}\n\t\t// Gets current cookies params.\n\t\t$cookieParams = session_get_cookie_params();\n\t\t/*session_set_cookie_params($cookieParams[\"lifetime\"],\n\t\t\t$cookieParams[\"path\"],\n\t\t\t$cookieParams[\"domain\"],\n\t\t\t$secure,\n\t\t\t$httponly);*/\n\n\t\tsession_start(); // Start the PHP session\n\t\tsession_regenerate_id( true ); // regenerated the session, delete the old one.\n\t}", "title": "" }, { "docid": "0d948403df6c5f3dc5d88c637113f61b", "score": "0.7680629", "text": "public function start()\r\n {\r\n $this->protectSession();\r\n if(!session_id())\r\n {\r\n session_start();\r\n session_regenerate_id();\r\n }\r\n }", "title": "" }, { "docid": "d6785205527e8cd2b68f65c8e2f7d42f", "score": "0.76525044", "text": "function initSession()\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n }", "title": "" }, { "docid": "4764c5d5309eec036da6cf8bc0fa909f", "score": "0.7649326", "text": "protected function startSessions() {\n\t\t$sessions = $this->sessions;\n\n\t\tforeach ($sessions as $key => $session) {\n\t\t\tif (!isset($_SESSION[$key])) {\n\t\t\t\t$_SESSION[$key] = $session;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c9b2fe51102d1437b68115c08657b127", "score": "0.7642043", "text": "public function maybe_start_session() {\r\n\t\tif( ! session_id() && ! headers_sent() ) {\r\n\t\t\tsession_start();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7ebc700e1d590d6d221b664635c2f583", "score": "0.7641238", "text": "public static function setSession() {\n if(!isset($_SESSION)) {\n session_start(); \n }\n }", "title": "" }, { "docid": "2801a7f683d8e68760b823cb7369b55d", "score": "0.7625464", "text": "function init_sessions() {\r\n if (!session_id()) {\r\n session_start();\r\n }\r\n}", "title": "" }, { "docid": "809a958ba16f95ce0cc3dbf943a83779", "score": "0.76216966", "text": "public function startSession()\n {\n\n if (!IS_CLI) {\n session_start();\n }\n\n }", "title": "" }, { "docid": "475278dcdce3b8e1707df184962813c3", "score": "0.76099885", "text": "protected function startSession() {\r\n if (session_status() == PHP_SESSION_NONE) {\r\n session_name('farao_session');\r\n session_set_cookie_params(0);\r\n session_start();\r\n }\r\n }", "title": "" }, { "docid": "158fd1cb9dfa515e3cba0667ace20aa5", "score": "0.7589526", "text": "public static function startSession() {\r\n// Retorna null si las sesiones no están habilitadas o hay una sesión iniciada\r\n if (session_status() != PHP_SESSION_NONE)\r\n return;\r\n session_start();\r\n }", "title": "" }, { "docid": "16bc8d3071b755b0c77a97130328f486", "score": "0.7566194", "text": "function session()\n\t{\n\t\tsession_start();\n\t}", "title": "" }, { "docid": "fed9798dc977fa9c4af987e98f8a6f5a", "score": "0.7549673", "text": "public static function start ()\n\t{\n\t\tini_set('session.use_cookies', 1);\n\t\tini_set('session.use_only_cookies', 1);\n\t\tini_set('session.referer_check', '');\n\t\tini_set('session.use_trans_sid', 0);\n\t\tsession_set_save_handler(\n\t\t\tarray('prom_session', 's_open'),\n\t\t\tarray('prom_session', 's_close'),\n\t\t\tarray('prom_session', 's_read'),\n\t\t\tarray('prom_session', 's_write'),\n\t\t\tarray('prom_session', 's_destroy'),\n\t\t\tarray('prom_session', 's_gc')\n\t\t);\n\t\tsession_name(SESSION_COOKIE);\n\t\tsession_set_cookie_params(0, parse_url(URL_BASE, PHP_URL_PATH), '.'. parse_url(URL_BASE, PHP_URL_HOST));\n\t\tsession_start();\n\n\t\t// need this so it happens before $db goes away\n\t\tregister_shutdown_function('session_write_close');\n\t}", "title": "" }, { "docid": "c7e56b919543677fe0462894e375c098", "score": "0.7549446", "text": "public static function start() {\n\t\t\tif( !self::$_started )\n\t\t\t\tsession_start();\n\n\t\t\tself::$_started = true;\n\t\t}", "title": "" }, { "docid": "d219a912a1912e5922f8d01604820de4", "score": "0.7523464", "text": "public function init_session() {\n if ( session_id() == '' ) {\n session_start();\n }\n }", "title": "" }, { "docid": "9fb800bf9173e98fe370380fd7a70ff0", "score": "0.74976337", "text": "public static function startSession() {\r\n\t\t\r\n\t\t$sessionConfig = Config::getByKey ( 'session_time' );\r\n\t\t\r\n\t\tini_set ( 'session.gc_divisor', '10' );\r\n\t\tini_set ( 'session.gc_probability', '100' );\r\n\t\tini_set ( 'session.gc_maxlifetime', $sessionConfig->value * 60 );\r\n\t\t\r\n\t\tsession_start ();\r\n\t}", "title": "" }, { "docid": "34cba241afbc21964c28e585772b4422", "score": "0.7469411", "text": "public static function run()\n {\n session_start();\n }", "title": "" }, { "docid": "1aa674d675e995b2724a9b7a245c3f37", "score": "0.7466603", "text": "function wp_scgcge_sessionset()\n{\n if (!session_id()) {\n @session_start();\n }\n}", "title": "" }, { "docid": "c2fa4a4b5a05e2e0c5dfad223ecd3f4b", "score": "0.7457403", "text": "function init_session() {\n\t\tif ( !session_id() ) {\n\t\t\tsession_start();\n\t\t}\n\t}", "title": "" }, { "docid": "b7dfd1492c7471074888bef1c31e4acc", "score": "0.74389607", "text": "function auth_start_session()\n{\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n}", "title": "" }, { "docid": "5df03f491c2f0023f1f7b44678012a5b", "score": "0.74203825", "text": "function startSession(){\r\n global $database; //The database connection\r\n session_start(); //Tell PHP to start the session\r\n\r\n /* Determine if user is logged in */\r\n $this->logged_in = $this->checkLogin();\r\n\r\n /**\r\n * Set guest value to users not logged in, and update\r\n * active guests table accordingly.\r\n */\r\n if(!$this->logged_in){\r\n $this->username = $_SESSION['username'] = GUEST_NAME;\r\n $this->userlevel = GUEST_LEVEL;\r\n $database->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time);\r\n }\r\n /* Update users last active timestamp */\r\n else{\r\n $database->addActiveUser($this->username, $this->time);\r\n }\r\n \r\n /* Remove inactive visitors from database */\r\n $database->removeInactiveUsers();\r\n $database->removeInactiveGuests();\r\n \r\n /* Set referrer page */\r\n if(isset($_SESSION['url'])){\r\n $this->referrer = $_SESSION['url'];\r\n }else{\r\n $this->referrer = \"/\";\r\n }\r\n\r\n /* Set current url */\r\n $this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];\r\n }", "title": "" }, { "docid": "12539441cc31e875dbb2ffda1d303e31", "score": "0.73593485", "text": "public function sessionStart();", "title": "" }, { "docid": "ecbc1257b00013f7e88317f5e885f208", "score": "0.7358421", "text": "function session_init() {\n\n if ( ! session_id() && ! headers_sent() ) {\n session_start();\n }\n include_once LOGINPRESS_SOCIAL_DIR_PATH . 'classes/loginpress-social-check.php';\n }", "title": "" }, { "docid": "0e6234a366e4b538c86dc582a55f6edf", "score": "0.73556894", "text": "public function start()\n {\n\n $config = new Config();\n $session_name = $config->session_name ? $config->session_name : '';\n\n if (!session_id()) {\n session_start(array('name' => $session_name));\n }\n\n }", "title": "" }, { "docid": "1517c888cb4ce18c43c4fe7e7c02f997", "score": "0.7330794", "text": "function session_start_once(){\n if(session_status() == PHP_SESSION_NONE){\n return session_start();\n }\n }", "title": "" }, { "docid": "e4c2013b77e079bb0e0c84cb8de67c56", "score": "0.7322639", "text": "function sessionStartSession()\n{\n if (session_status() == PHP_SESSION_NONE) {\n session_name(SESSION_NAME);\n session_start();\n }\n}", "title": "" }, { "docid": "cad391b73d3f7026fd6340a70af460c0", "score": "0.7278021", "text": "public static function Start()\n {\n session_start();\n $_SESSION['auth_data'] = array();\n $_SESSION['auth_data']['username'] = null;\n $_SESSION['auth_data']['password'] = null;\n $_SESSION['auth_data']['email'] = null;\n $_SESSION['auth_data']['level'] = 'LVL_VISITOR'; \n }", "title": "" }, { "docid": "8c8391f284ffe10b52a58b55f66e1dd4", "score": "0.72554207", "text": "public static function init()\n {\n \tif(function_exists('session_status'))\n \t{\n \t\tif (session_status() == PHP_SESSION_NONE) {\n \tsession_start();\n \t}\n\t } else if(function_exists('session_id')) { // php version below 5.4\n\t\t\tif(session_id() == '') {\n\t\t\t session_start();\n\t\t\t}\t\n \t}\n }", "title": "" }, { "docid": "816e66d7ccaf82e2aca07be3eaf04553", "score": "0.72273636", "text": "function setup_session() {\n\tif (!isset($_SESSION)) session_start();\n\t// If a new session is needed\n\tif (isset($_POST['la_name']) && $_POST['la_name'] != \"\") {\n\t\tunset($_SESSION);\n\t\tsession_destroy();\n\t\tsession_start();\n\t}\n\n\tset_default($_SESSION['count'], 0);\n\t$_SESSION['count']++;\n\t$_SESSION['time'] = time();\n\tset_default ( $_SESSION['identity'], array(\n\t\t'ID'\t\t=> '',\n\t\t'name'\t\t=> '',\n\t\t'email'\t\t=> '',\n\t\t'language' \t=> '',\n\t\t'level'\t\t=> ''\n\t));\n}", "title": "" }, { "docid": "4a427e0fd5dbf0f3d2e8d42cef590b2b", "score": "0.72268647", "text": "public function start() {\n if ('' === session_id()) {\n if (session_start()) {\n $this->sessionStartTime();\n $this->checkSessionValidity();\n }\n }\n }", "title": "" }, { "docid": "3b273a3c3a8b92e36ca9c2e99b6b5056", "score": "0.716479", "text": "public function sec_session_start() {\n\t\t$session_name = 'sec_session_id'; // Set a custom session name\n\t\t$secure = false; // Set to true if using https.\n\t\t$httponly = true; // This stops javascript being able to access the session id. \n\t\t\n\t\tini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies. \n\t\t$cookieParams = session_get_cookie_params(); // Gets current cookies params.\n\t\tsession_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly); \n\t\tsession_name($session_name); // Sets the session name to the one set above.\n\t\tsession_start(); // Start the php session\n\t\tsession_regenerate_id(true); // regenerated the session, delete the old one. \n\t}", "title": "" }, { "docid": "3039fcb9d3d28d3902dda56c1a3c8a38", "score": "0.7146925", "text": "public static function init(){\n if (version_compare(phpversion(), '5.4.0', '<')) {\n if (session_id() == '') {\n session_start();\n }\n } else {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }\n }", "title": "" }, { "docid": "30b7357ed5f406fc3a4efec35d38802a", "score": "0.71408206", "text": "protected function _init() {\n\t\tsession_write_close();\n\n\t\tif (headers_sent()) {\n\t\t\t$_SESSION = (empty($_SESSION)) ?: array();\n\t\t} elseif (!isset($_SESSION)) {\n\t\t\tsession_cache_limiter(\"nocache\");\n\t\t}\n\t\tsession_start();\n\n\t\tforeach ($this->_defaults as $key => $config) {\n\t\t\tif (isset($this->_config[$key])) {\n\t\t\t\tini_set(\"session.$key\", $this->_config[$key]);\n\t\t\t}\n\t\t}\n\t\t$_SESSION['_timestamp'] = time();\n\t}", "title": "" }, { "docid": "2e3d248bbb166b8c375e1ce940465f23", "score": "0.7129596", "text": "public function __construct(){\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n\n }", "title": "" }, { "docid": "f97586b7969e5ae564a34af2db63ac58", "score": "0.7119911", "text": "function sec_session_start() {\n\t$httponly = true;\n\tsession_start(); // Start the PHP session\n\tsession_regenerate_id(true); // regenerated the session, delete the old one.\n}", "title": "" }, { "docid": "38301907d90857284a30a7ed3b4b6131", "score": "0.71043926", "text": "function __construct()\n {\n if (session_id() === \"\") { session_start(); }\n }", "title": "" }, { "docid": "c4cb9e7aa13d1e60c37c47166deb0a46", "score": "0.7100085", "text": "public function startSession() {}", "title": "" }, { "docid": "27467248230090c82b1dd9fa9d7b7315", "score": "0.7095584", "text": "protected function startSession()\n {\n $cookie = \\session_get_cookie_params();\n \n \\session_set_cookie_params( $cookie['lifetime'], $cookie['path'], $cookie['domain'], \n $this->config['session_https'], $this->config['session_http_only']\n );\n\n \\session_name($this->config['session_name']);\n \\session_start(array('gc_maxlifetime' => 860));\n }", "title": "" }, { "docid": "a56d618cebb498323ebf7c1076e32980", "score": "0.7090069", "text": "private function start_session()\n\t{\n\n\t\tself::$gebruikersinfo['sleutel'] = md5(rand(0,99999999999).date(\"dmyhis\"));\n\t\t$info = self::$gebruikersinfo['info'];\n\t\t$SQL = \"INSERT INTO \".$this->logins_table.\" \";\n\t\t$SQL .= \"SET uid\t= '\". $info['id'] .\"' \";\n\t\t$SQL .= \", sid = '\". self::$gebruikersinfo['sleutel'] .\"' \";\n\t\t$SQL .= \", ip\t= '\". $this->get_ip() .\"' \";\n\t\t$SQL .= \", datum = NOW() \";\n\t\t$query = $this->verbinding->query($SQL);\n\t\tif( $query )\n\t\t{\n\t\t\t/*\n\t\t\t| Make cookie\n\t\t\t*/\n\t\t\t$secondes = $this->login_session_time * 3600;\n\t\t\tsetcookie($this->cookiename, self::$gebruikersinfo['sleutel'], time()+$secondes, \"/\");\n\n\t\t\t/*\n\t\t\t| Send to the next page\n\t\t\t*/\n\t\t\t$next = rawurldecode(rawurldecode( $_POST['next'] ));\n\n\t\t\t$the_url = ( $next != '' ) ? $next: $this->landing_page_url;\n\n\t\t\theader(\"Location:\". $the_url);\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprint_r( $query->errorInfo() );\n\t\t}\n\t}", "title": "" }, { "docid": "f45b0333949d9ece2153a84df16d8d02", "score": "0.70857054", "text": "function Session(){\n session_start();\n }", "title": "" }, { "docid": "12e4b9d60608c11ca7e354923b75e019", "score": "0.70797694", "text": "function startSession()\n{\n\t//if(!isset($_SESSION)){@session_start();}\n\tif(isset($_SESSION))\n\t{\n\t\treturn true;\n\t}else{\n\t\t@session_start();\n\t}\n\tif(isset($_SESSION)){return true;}else{return false;}\n}", "title": "" }, { "docid": "b117f550a7c977368dfc665ea73739cb", "score": "0.70573264", "text": "function if_session_starter()\n{\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n}", "title": "" }, { "docid": "57e7f3998f84c6648d32392c090aca19", "score": "0.7048571", "text": "private static function initialiseSession(): void {\n\t\t\tstatic $s_basePath = null;\n\n\t\t\tif(is_null($s_basePath)) {\n\t\t\t\t$s_basePath = [\"app\", constant(\"app.uid\")];\n\t\t\t}\n\n\t\t\tsession_start();\n\t\t\t$session =& $_SESSION;\n\n\t\t\tforeach($s_basePath as $p) {\n\t\t\t\tif(!array_key_exists($p, $session) || !is_array($session[$p])) {\n\t\t\t\t\t$session[$p] = [];\n\t\t\t\t}\n\n\t\t\t\t$session =& $session[$p];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b96732d66e10ea067574035a92f0a1ae", "score": "0.7041216", "text": "function KT_session_start() {\r\n\tif (!session_id()) {\r\n\t\t@session_start();\r\n\t\tif (!session_id()) {\r\n\t\t\tdie('Your session is incorrectly defined and cannot be started. Check your php.ini configuration.');\r\n\t\t}\r\n\t}\r\n\t\r\n $siteroot = md5(KT_getSiteRoot());\r\n if (isset($_SESSION['KT_lastsiteroot'])) {\r\n $lastsiteroot = $_SESSION['KT_lastsiteroot'];\r\n if (isset($_SESSION[$lastsiteroot]) && is_array($_SESSION[$lastsiteroot])) {\r\n foreach ($_SESSION[$lastsiteroot] as $key => $value) {\r\n unset($_SESSION[$key]);\r\n }\r\n }\r\n }\r\n\r\n\tif ( isset($_SESSION[$siteroot]) && is_array($_SESSION[$siteroot]) ) {\r\n\t\tforeach ($_SESSION[$siteroot] as $key => $value) {\r\n\t\t\t$_SESSION[$key] = $value;\r\n\t\t}\r\n }\r\n $_SESSION['KT_lastsiteroot'] = $siteroot;\r\n}", "title": "" }, { "docid": "5739b7f9254b659057e55c44d570e1b0", "score": "0.70221514", "text": "function Session(){\r\n $this->time = time();\r\n $this->startSession();\r\n }", "title": "" }, { "docid": "722e96326cde158b0cd6c9c49067854c", "score": "0.69987136", "text": "public function __construct()\n {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "title": "" }, { "docid": "7a4701bc6da931b286cb054cd0b3ef09", "score": "0.69955564", "text": "public static function open()\n {\n @session_start();\n }", "title": "" }, { "docid": "e151004728ba3b111f1a034080b9f71c", "score": "0.69928205", "text": "protected function getSession(){\n\t\tif(session_id()==''){\n\t\t\tsession_start();\n\t\t}\n\t}", "title": "" }, { "docid": "65d8644b6c735c8daf81c8b5312a2fa7", "score": "0.6980389", "text": "public function safesession() {\n\t\t@session_start();\n\t}", "title": "" }, { "docid": "7db38ea9af6251289b4c20372c65f738", "score": "0.6974857", "text": "protected function startSession()\n {\n if (!$this->app['session']->isStarted())\n {\n $this->app['session']->start();\n }\n }", "title": "" }, { "docid": "9e1c07dffadecf01836852b4281245b8", "score": "0.6961522", "text": "function startSession() {\n\t\t$mySession = Cgn_ObjectStore::getObject(\"object://defaultSessionLayer\");\n\t\tif ($mySession->get('userId') != 0 ) {\n\t\t\t$this->userId = $mySession->get('userId');\n\t\t\t$this->username = $mySession->get('username');\n\t\t\t$this->email = $mySession->get('email');\n\t\t\t$this->password = $mySession->get('password');\n\t\t\t$this->locale = $mySession->get('locale');\n\t\t\t$this->tzone = $mySession->get('tzone');\n\t\t\t$this->active_on = $mySession->get('active_on');\n\t\t\t$this->enableAgent = $mySession->get('enableAgent');\n\t\t\tif ($this->enableAgent) {\n\t\t\t\t$this->agentKey = $mySession->get('agentKey');\n\t\t\t}\n\n\t\t\t$this->loggedIn = true;\n\t\t\t$this->groups = unserialize($mySession->get('groups'));\n\n\t\t\tif ($this->tzone != '' && function_exists('date_default_timezone_set')) {\n\t\t\t\t@date_default_timezone_set($this->tzone);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1dfb6aa2c2c313bfdd94e7560ad784ef", "score": "0.6959528", "text": "function sec_session_start() {\n\t$session_name = '_uvtiqixhej_'; // Set a custom session name\n\t$secure = SECURE;\n\n\t// Prevent JavaScript from being able to access the session id.\n\t$httponly = true;\n\n\t// Force sessions to only use cookies.\n\tif (ini_set('session.use_only_cookies', 1) === FALSE) {\n\t\theader(\"Location: ../error.php?err=Could not initiate a safe session (ini_set)\");\n\t\texit();\n\t}\n\n\t// Get current cookies params.\n\t$cookieParams = session_get_cookie_params();\n\n\tsession_set_cookie_params($cookieParams[\"lifetime\"],\n $cookieParams[\"path\"], \n $cookieParams[\"domain\"], \n $secure,\n $httponly);\n\n\t// Set the session name \n\tsession_name($session_name);\n\tsession_start(); // Start the PHP session \n\tsession_regenerate_id(); // regenerated the session, delete the old one. \n}", "title": "" }, { "docid": "cc3a2e8bdc642e9426f3d0d5fb9611bc", "score": "0.6949093", "text": "public static function make_active()\n\t\t{\n\t\t\tif (!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "84e5268f4f8072c465139f7ae5cb7ec2", "score": "0.6927625", "text": "function Session()\n {\n\n $this->time = time();\n\n $this->startSession();\n\n }", "title": "" }, { "docid": "00d625f139de05b258bef496e5079fea", "score": "0.690545", "text": "function startSession() {\n\t// session expires in 4 hours, only on our domain, only send session cookie over SSL\n\t$domain = $_SERVER['HTTP_HOST'];\n\t// strip a possible port number from the host\n\tif ($pos = strrpos($domain,':')) {\n\t\t$domain = substr($domain, 0, $pos);\n\t}\n\tini_set('session.gc_maxlifetime', '14400');\n\tsession_set_cookie_params(14400, '/', $domain, FORCE_SSL);\n\tsession_start();\n}", "title": "" }, { "docid": "5365e5729f1a489fcae9a326c8d809b6", "score": "0.6890804", "text": "function createSession () {\n if (!isset($_SESSION['start'])) {\n session_start();\n $_SESSION['start'] = 'start';\n }\n}", "title": "" }, { "docid": "1d56bbc07b8a63ec946b4cd72fe50387", "score": "0.68878686", "text": "protected function startUserSession()\n {\n // Session must be started by middleware.\n }", "title": "" }, { "docid": "650dd0483223aea4702de610a3b95a1c", "score": "0.6876173", "text": "function sessionCRUD_startSession(){\n $lifetime = 60 * 60 * 24 * 5;\n session_set_cookie_params($lifetime, '/');\n session_start();\n }", "title": "" }, { "docid": "77f9c6e20b18beb492967cd04a8b87e3", "score": "0.6872345", "text": "function initializeSession()\n{\n\t// LACE_SESSION_INIT_BYPASS is defined in the Ajax listener, \n\t// lace.php. This is to help prevent abusing the listener.\n\tif (defined('LACE_SESSION_INIT_BYPASS') === true)\n\t\treturn;\n\n\t/*\n\tglobal $name;\n\tglobal $A; // Activity object\n\t\n\t$_name = getName();\n\t$A->update($_name);\n\t*/\n\t\t\t\t\n\tif (cookieVar(LACE_SESSION_COOKIE, false) === false)\n\t{\n\t\tglobal $name;\n\t\tglobal $A; // Activity object\n\t\t\n\t\t$_name = getName();\n\t\t$A->update($_name);\n\t\t\n\t\t$name = $_name;\t\n\t\tsetcookie(LACE_SESSION_COOKIE, getCookieString(), time() + 600, LACE_URL_REL);\n\t\tsetcookie(LACE_NAME_COOKIE, $name, time() + 2592000, LACE_URL_REL);\n\t\t\n\t\treturn;\n\t} \n}", "title": "" }, { "docid": "9b8df2d7d27fdd7a8ff61a2bbcca1dd2", "score": "0.6847991", "text": "function start_session() {\n\t\t// bail if output was already started\n\t\tif (headers_sent($file, $line)) {\n\t\t\ttrigger_error(\"Session could not be started because output was started in '$file' on line $line\", E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// make sure session id is valid\n\t\tif (isset($_REQUEST[session_name()])) {\n\n\t\t\t$session_id = $_REQUEST[session_name()];\n\t\t\t\n\t\t\tif (!preg_match('/^[a-zA-Z0-9]*$/', $session_id) || ($_REQUEST[session_name()] == '' )) {\n\t\t\t //Old method was to trigger error. I'd rather just make a new session id and let them be on their way.\n\t\t\t //So, unset the old one.\n\t\t\t setcookie(session_name(), '', time()-3600, '/');\n unset($_REQUEST[session_name()]);\n unset($_COOKIE[session_name()]);\n //trigger_error(\"Invalid session id, aborting\");\n\t\t\t\t//return false;\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tsession_start();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "6702681eb2b7073f18b47a8812002dae", "score": "0.6841835", "text": "function rio_video_gallery_init_session()\n{\n\tsession_start();\n}", "title": "" }, { "docid": "f6878850a4cad6a1688a0d4eba6da80f", "score": "0.6825652", "text": "protected function session_start()\n\t/* start a session\n\t *\n\t */\n\t{\n\t\t# Check for existing \"SessionId\" cookie\n\t\tif (array_key_exists($this->session_qualifier, $_COOKIE)) {\n\t\t\t$id = $_COOKIE[$this->session_qualifier];\n\t\t} else {\n\t\t\t$id = '';\n\t\t}\n\t\t\n\t\tif ($id == '') {\n\t\t\t# generate a random number to randomize the session_ids\n\t\t\tsrand ((double) microtime( )*100000000);\n\t\t\t$rand1 = (rand()%1000);\n\t\t\tfor ($counter=0;$counter<100;$counter++) { $random[$counter]=$rand1 * $counter; }\n\t\t\t$rand1 = (rand()%100);\n\t\t\t# Use user's IP address to make more unique.\n\t\t\t$random_string = (intval(md5('lets go bucks!')) * $random[12]) . $random[44] . 'f' . $random[0] . 'u';\n\t\t\t$random_string .= $random[10] . 'd' . $random[13] . 'ge' . $random[20] . 'm' . $random[33];\n\t\t\t$random_string .= bin2hex('*') . $random[12] . 'c' . $random[18] . 'h' . $random[86] . bin2hex('*');\n\t\t\t$random_string .= $random[88] . 'g' . $random[99] . 'a' . $random[10] . 'n' . $random[7];\n\t\t\t$random_string .= (intval(bin2hex($_SERVER['REMOTE_ADDR'])) * $random[37]) . ($random[76] % 5);\n\t\t\t$random_string .= $random[69] . ($random[24] * $random[56]);\n\t\t\tif (strlen($random_string) > 110) { $random_string = left($random_string, 110); }\n\t\t\t$id = uniqid($random_string);\n\t\t}\n\t\t\n\t\t# temporarily define static values\n\t\t$httponly = false;\n\t\t\n\t\t# initialize the session parameters\n\t\tsession_id($id);\n\t\tsession_name($this->session_qualifier);\n\t\t\n\t\t# set site expiration time\n\t\t@ini_set('session.gc_maxlifetime', (string)$this->session_timeout);\n\t\tsession_cache_limiter('private'); // set to private_no_expire for non dynamic content\n\t\tsession_cache_expire($this->session_timeout / 60);\n\t\t#@session_set_cookie_params($this->session_timeout , url(), $this->_tx->get->domain, $this->_tx->get->ssl, $httponly);\n\t\t\n\t\t# disallow php version header\n\t\tif (function_exists('header_remove')) @header_remove('X-Powered-By');\n\t\t\n\t\t# start the session\n\t\tif (session_start() === false) { $this->_debug('UNABLE TO INIT SESSION!'); }\n\t\t@header(\"Cache-control: private\");\n\t}", "title": "" }, { "docid": "13b2398055bc47164f76ac420ede7084", "score": "0.68194944", "text": "public function _initSession() {\n\t\t// TODO figure out sessions\n\t\tZend_Session::start();\n\t}", "title": "" }, { "docid": "9464f831a6572dc5ea2e85ecb128589a", "score": "0.68123984", "text": "public function create()\n {\n if (PHP_SESSION_ACTIVE !== session_status()) {\n session_start();\n }\n }", "title": "" }, { "docid": "f034c90d8d0a9ddce3306ef870620fc5", "score": "0.6799731", "text": "public function open() {\n session_set_cookie_params($this->_lifetime);\n @session_start();\n }", "title": "" }, { "docid": "95e993d69834281ffe9efe1ab7d872c9", "score": "0.6781667", "text": "static function start_secure_session() {\n self::add_param('ss_fprint', self::_Fingerprint());\n //self::_regenerate_id();\n\n if (sessionConfig::session_timeout > 0) {\n $date = date('m/d/Y H:i');\n self::add_param('timeout', intval(strtotime($date)) + (60 * intval(sessionConfig::session_timeout)));\n }\n }", "title": "" }, { "docid": "587a7f819e3e1340e85ed9e96045c867", "score": "0.6769191", "text": "private function start_session() {\n\n\t\t$themes = array_fill_keys( array_keys( $this->wp_get_themes() ), false );\n\t\t$default = isset( $themes[ self::DEFAULT_THEME ] ) ? self::DEFAULT_THEME : get_stylesheet();\n\n\t\t$this->session = [\n\t\t\t'_nonce' => $this->wp_create_nonce( self::COOKIE ),\n\t\t\t'plugins' => array_fill_keys( array_keys( $this->get_plugins() ), false ),\n\t\t\t'themes' => array_merge( $themes, [ $default => true ] ),\n\t\t];\n\n\t\t$this->set_cookie( wp_json_encode( $this->session ) );\n\n\t}", "title": "" }, { "docid": "a1a3a757ba3313f732a74b481ed60ddd", "score": "0.6760422", "text": "public function start()\n {\n if ($this->sessionTimeout > 0 && $this->sessionTimeout < $this->lifetime) {\n // If server session timeout is non-zero but less than client session timeout: Copy this value instead.\n $this->sessionTimeout = $this->lifetime;\n }\n $this->sessionDataLifetime = (int)$GLOBALS['TYPO3_CONF_VARS']['FE']['sessionDataLifetime'];\n if ($this->sessionDataLifetime <= 0) {\n $this->sessionDataLifetime = 86400;\n }\n parent::start();\n }", "title": "" }, { "docid": "4b5e492a0eff6cbee994ddf4131a48dd", "score": "0.6754883", "text": "private function __construct() {\n\t\tsession_set_cookie_params(1800,\"/\");\n\t\tsession_start();\n\t}", "title": "" }, { "docid": "8844b3274c4a59e47a60ca476ad2aaa6", "score": "0.67442083", "text": "function sec_session_start () {\n\t$sec_session_id = 'secure_session';\n\t$secure = SECURE;\n\n\t$httponly = true;\n\n\tif (ini_set('session.use_only_cookies', 1) === false) {\n header(\"Location: ../LICENSE.txt\");\n exit();\n\t}\n\t\n\t$cookie_parameters = session_get_cookie_params();\n\tsession_set_cookie_params(\n\t\t$cookie_parameters[\"lifetime\"],\n \t$cookie_parameters[\"path\"], \n \t$cookie_parameters[\"domain\"], \n \t$secure,\n \t$httponly\n\t);\n\n\tsession_name($sec_session_id);\n\tsession_start();\n\tsession_regenerate_id(true);\n}", "title": "" }, { "docid": "df7f93082ee8d06b2c71d98b3db5cce1", "score": "0.67388356", "text": "function __construct() {\n parent::__construct();\n session_start();\n }", "title": "" }, { "docid": "0a92a3f96712e2a9ee710a62e3d340b7", "score": "0.67336524", "text": "function sec_session_start()\n{\n $session_name = 'sec_session_id';\n $secure = SECURE;\n $httponly = true;\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\n header(\"Location: error.php?err=Could not initate a safe session\");\n exit();\n }\n // Gets current cookies params\n $cookieParams = session_get_cookie_params();\n session_set_cookie_params($cookieParams[\"lifetime\"],\n $cookieParams[\"path\"],\n $cookieParams[\"domain\"],\n $secure,\n $httponly\n );\n session_name($session_name);\n session_start();\n session_regenerate_id();\n}", "title": "" }, { "docid": "df77bd516a6d9a5ea8b542e5846283da", "score": "0.6730861", "text": "public function __construct()\r\n {\r\n if (session_status() != PHP_SESSION_ACTIVE) {\r\n session_start();\r\n }\r\n if (!array_key_exists('logged', $_SESSION) || $_SESSION['logged'] != true) {\r\n header(\"Location: index.php\");\r\n exit();\r\n }\r\n }", "title": "" }, { "docid": "4203b443fc2eb1611e46586c8fb32a66", "score": "0.6726692", "text": "function sec_session_start() {\r\n\t$session_name = 'sec_session_id'; // Set a custom session name\r\n\t$secure = SECURE;\r\n\t// This stops JavaScript being able to access the session id.\r\n\t$httponly = true;\r\n\t// Forces sessions to only use cookies.\r\n\tif (ini_set('session.use_only_cookies', 1) === FALSE) {\r\n\t\theader(\"Location: ../error.php?err=Could not initiate a safe session (ini_set)\");\r\n\t\texit();\r\n\t}\r\n\t// Gets current cookies params.\r\n\t$cookieParams = session_get_cookie_params();\r\n\tsession_set_cookie_params(\r\n\t\t$cookieParams[\"lifetime\"],\r\n\t\t$cookieParams[\"path\"], \r\n\t\t$cookieParams[\"domain\"], \r\n\t\t$secure,\r\n\t\t$httponly\r\n\t);\r\n\t// Sets the session name to the one set above.\r\n\tsession_name($session_name);\r\n\tsession_start();\t\t\t// Start the PHP session \r\n\tsession_regenerate_id();\t// regenerated the session, delete the old one. \r\n}", "title": "" }, { "docid": "dd2aad770ed663865112256de5b76c63", "score": "0.67238337", "text": "public static function start($onlyIfCookieSet = false) {\n\t\t/*\n\t\tDo NOT use session_id() here, because it could give you the wrong info.\n\t\tNormally, in an ideal world, session_id() would be fine and we're all happy.\n\t\tBut when using FullPageCache, there (maybe) has already a session been\n\t\tstarted and \"closed\" (session_write_close). In this particular case, a\n\t\tcall to session_id() would return the current session ID not no session\n\t\twould be active.\n\t\tTo work around this limitation, we check for $_SESSION. This var will be\n\t\texplicitely unset() by FullPageCache.\n\t\t*/\n\n\t\tif (!$onlyIfCookieSet || self::isCookieSet()) {\n\t\t\tif (!isset($_SESSION) || !session_id()) {\n\t\t\t\t// force httponly flag but leave other stuff unchanged\n\t\t\t\t$params = session_get_cookie_params();\n\t\t\t\tsession_set_cookie_params($params['lifetime'], $params['path'], $params['domain'], $params['secure'], true);\n\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "07709f52ea3559de23f43712a33bcbe8", "score": "0.672166", "text": "function sessionWillStart() {}", "title": "" }, { "docid": "5f8384f07ea5f6feec021f6b39d18d7c", "score": "0.66990167", "text": "public function initSession($username){\n $_SESSION = array();\n session_id('active');\n session_start();\n $_SESSION['timeout'] = time();\n if (isset($_SESSION['username'])) {\n $_SESSION['username'] = $username;\n } else {\n $_SESSION['username'] = $username;\n }\n }", "title": "" }, { "docid": "9748b172c965ffe26688ee4515748fbe", "score": "0.6653173", "text": "function sec_session_start() {\n $session_name = 'sec_session_id'; # Set: custom session name\n $secure = true; # Denies: JavaScript from being able to access the session id\n $httponly = true; # Forces sessions to only use cookies\n\n if (ini_set('session.use_only_cookies', 1) === FALSE) {\n header(\"Location: ../error.php?err=Could not initiate a safe session (ini_set)\");\n exit();\n }\n\n $cookieParams = session_get_cookie_params(); # Get: current cookies params\n session_set_cookie_params($cookieParams[\"lifetime\"], $cookieParams[\"path\"], $cookieParams[\"domain\"], $secure, $httponly);\n\n session_name($session_name); # Set: session name to the one set above\n session_start(); # Start: PHP session\n session_regenerate_id(true); # Regenerate: session; delete the old one\n}", "title": "" }, { "docid": "f95b148f5423f8c484f5a09e54aeb2a4", "score": "0.66390556", "text": "function Auth(){\n\t\tsession_name(\"CAKEPHP\");\n\t\tif(empty($_SESSION)){\n\t\t\t@session_start();\n\t\t}\n\t}", "title": "" }, { "docid": "c62eca8addba1eef4a3ebeeb997b3177", "score": "0.66385686", "text": "protected function _initAutoStartSession() {\r\n\t\t// zorg dat de session-sectie uit de application.ini eerst wordt geinitialiseerd\r\n\t\t$this->bootstrap('session');\r\n\t\tZend_Session::start();\r\n\t}", "title": "" }, { "docid": "88930148a8acc25cb00cde3520d7c15b", "score": "0.6631475", "text": "public function start_session(){\nreturn session_start();\n}", "title": "" }, { "docid": "22b16af398a7ba8dfcdbf30d886bac81", "score": "0.6621684", "text": "function init_user_session() {\n global $settings;\n session_set_cookie_params($settings['session_lifetime']);\n if (session_id())\n session_destroy();\n session_start();\n $_SESSION = array();\n $_SESSION['ip_addr'] = full_remote_addr();\n $_SESSION['expires'] = time() + $settings['session_lifetime'];\n $_SESSION['total_post_limit'] = $settings['total_post_limit'];\n $_SESSION['check_email_limit'] = $settings['check_email_limit'];\n $_SESSION['check_mobile_limit'] = $settings['check_mobile_limit'];\n log_debug('init_user_session');\n}", "title": "" }, { "docid": "0e763f6368f81e3dddea831d7e987a93", "score": "0.66176766", "text": "private function oldLogin(){\n\t\t\n\t\tif(\\go\\core\\Environment::get()->isCli()){\n\t\t\treturn;\n\t\t}\n\t\t\n if (session_status() == PHP_SESSION_NONE) {\n\t\t\t\n //without cookie_httponly the cookie can be accessed by malicious scripts \n //injected to the site and its value can be stolen. Any information stored in \n //session tokens may be stolen and used later for identity theft or\n //user impersonation.\n ini_set(\"session.cookie_httponly\",1);\n\n //Avoid session id in url's to prevent session hijacking.\n ini_set('session.use_only_cookies',1);\n\n if(\\go\\core\\http\\Request::get()->isHttps()) {\n ini_set('session.cookie_secure',1);\n }\n\n session_name('groupoffice');\n session_start();\n }\n\t\t\n\t\tif(!isset($_SESSION['GO_SESSION'])) {\n\t\t\t\t$_SESSION['GO_SESSION'] = [];\n\t\t\t}\t\t\t\n\t\t$_SESSION['GO_SESSION']['user_id'] = $this->userId;\n\t\t$_SESSION['GO_SESSION']['accessToken'] = $this->accessToken;\t\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "3a6abb02628b213e700937943d3469c4", "score": "0.65969783", "text": "function __construct()\n {\n parent::__construct();\n session_start();\n }", "title": "" }, { "docid": "10c4c7e0f1876ca448361e91a8146fc9", "score": "0.6595745", "text": "function setSession()\n\t{\n\t\t$_SESSION['adminKey'] = md5($_SERVER['REMOTE_ADDR'].\"salt\");\n\t}", "title": "" }, { "docid": "937aab7f2ec1ecb8d24b85eb8f8cd54a", "score": "0.6590281", "text": "public function __construct() {\n \t\t\t//this starts the session when the object is instantiated.\n \t\t\tsession_start();\n \t\n \t\t}", "title": "" }, { "docid": "435e88f90b3789a80f6fb7093a8456a9", "score": "0.6585585", "text": "public function __construct() { //trigger cuando un object 'session' se crea\n session_start();\n $this->check_stored_login();\n }", "title": "" }, { "docid": "126e55d2b8ba7260cc0394f58def56c3", "score": "0.6576582", "text": "public function open()\n {\n if (SESSION_HANDLER === 'db') {\n session_set_save_handler(new SessionHandler($this->db), true);\n }\n\n $this->configure();\n\n if (ini_get('session.auto_start') == 1) {\n session_destroy();\n }\n\n session_name('KB_SID');\n session_start();\n }", "title": "" }, { "docid": "0ad737a87ff015c83f44c425b10f6e7d", "score": "0.655539", "text": "public static function setUpBeforeClass()\n {\n @session_start();\n }", "title": "" } ]
9918fc56249d2bbf6617a3470f465b3c
Update database information about the given author.
[ { "docid": "4476fd5f51d8f2fdceb1c9cccd5ab0f1", "score": "0.64575905", "text": "private function update(int $authorid, string $name, string $link,\n string $bio): void\n {\n $author = TableAuthors::findByID($authorid);\n $author->name = $name;\n $author->link = $link;\n $author->bio = $bio;\n $author->update();\n }", "title": "" } ]
[ { "docid": "4d587a7f515f3071fd7e8ebc128dc8cc", "score": "0.7610635", "text": "public function update() {\n\n // Does the Author object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Author::update(): Attempt to update an Author object that does not have its ID property set.\", E_USER_ERROR );\n \n // Update the Author\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"UPDATE `Authors` SET full_name=:fullName WHERE `author_code` = :id\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":fullName\", $this->fullName, PDO::PARAM_STR );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "74e4c05bf7ee8a28b05f1c9a95ba856e", "score": "0.710157", "text": "function updateAuthor() {\n\tglobal $wpdb;\n\t$topicID = $_POST['id'];\n\t$author = $_POST['user'];\n\n\t $wpdb->update( '$table_name', \n\t\tarray( 'author' => $author), \n\t\tarray( 'id' => $topicID )\n\t\t);\n\n}", "title": "" }, { "docid": "5615d5c50c02d5548518c5a277f97a2c", "score": "0.69114006", "text": "protected function setAuthor($author): void\n {\n }", "title": "" }, { "docid": "ae363fb0117bc264b20be2e4969f6a7d", "score": "0.67941827", "text": "public function updateAuthor($data, $author)\n {\n return $this->performRequest('PUT', \"/authors/{$author}\", $data);\n }", "title": "" }, { "docid": "ad44b0ad031be6309c65dedefcd92055", "score": "0.6683335", "text": "public function setAuthor($author)\r\n {\r\n $this->author = $author;\r\n }", "title": "" }, { "docid": "3d85c8559054aa7d0a5698747c53db2c", "score": "0.6655345", "text": "abstract public function setAuthor(string $author);", "title": "" }, { "docid": "ecc63a94ddc2269042ff113353a51789", "score": "0.6640152", "text": "public function setAuthor($author)\n {\n $this->author = $author;\n }", "title": "" }, { "docid": "4bbce82254ca5e1c9efb5e820b8a3a8a", "score": "0.6580544", "text": "public function update(Request $request, Author $author)\n {\n //\n }", "title": "" }, { "docid": "e974930eab4cb0d883a8de150f8e9cf1", "score": "0.65347147", "text": "function set_author($author)\r\n {\r\n $this->set_default_property(self :: PROPERTY_AUTHOR, $author);\r\n }", "title": "" }, { "docid": "d829fbdb1e95258e59e1b2d56c9a357c", "score": "0.65158945", "text": "public function update()\n\t\t{\n\t\t\t$header = [];\n\t\t\t$header['title'] = \"This is author\";\n\t\t\t$header['content'] = \"This is content author\";\n\t\t\t\n\t\t\t$data=[];\n\t\t\tif (isset($_GET['state']) && $_GET['state']==='err') {\n\t\t\t\t$data['errAdd'] = $_SESSION['errAdd'] ?? [];\n\t\t\t}\n\t\t\t$idManga = $_GET['id'] ?? '';\n\t\t\t//die($idManga);\n\t\t\t//lay all du lieu comics\n\t\t\t$data['author']= $this->Model->getDataAuthorById('author',(int)$idManga);\n\t\t\t//echo \"<pre/>\";print_r($data['admins']);die();\n\t\t\t//lay toan bo du lieu cua tac gia\n\t\t\t//load sidebar\n\t\t\t$this->loadSidebarAdmin();\n\t\t\t//loadheader\n\t\t\t$this->loadHeaderAdmin();\n\t\t\t//load content view\n\t\t\t$this->updateAuthor($data);\n\t\t\t//load footer\n\t\t\t$this->loadFooterAdmin();\n\t\t}", "title": "" }, { "docid": "58e9724b6910aa7597953eba4bbe839e", "score": "0.65042096", "text": "public function setAuthor($_author)\n {\n $this->author = $_author;\n }", "title": "" }, { "docid": "1312f890e12f1ce784b240d525a83f86", "score": "0.6493354", "text": "public function update( Request $request, Author $author ) {\n\t\t$this->validate( $request, [\n\t\t\t'lastname' => 'required|min:1|max:121',\n\t\t\t'forename' => 'required|min:1|max:121'\n\t\t] );\n\n\t\t$author->lastname = $request->input( 'lastname' );\n\t\t$author->forename = $request->input( 'forename' );\n\t\t$author->save();\n\n\t\treturn redirect()->route( 'author.index' )->with( 'message', 'Author updated successfully' );\n\t}", "title": "" }, { "docid": "80a5df89a6f13b0b4c9785d7a0c21a75", "score": "0.6433459", "text": "private function updateAuthor($authorId) {\n $this->_template->title = 'Update Author';\n $this->_template->author = $this->_model->getAuthorInfo($authorId);\n $this->_template->countries = $this->_registry->getModel('register')->selectCountries();\n if (filter_has_var(INPUT_POST, 'updateAuthor')) {\n $this->checkToken();\n $response = $this->_model->updateAuthor($authorId);\n if ($response == 'success') {\n $this->_registry->getObject('session')->flash('message', '<p class=\"success\">Author was updated successfully.</p>');\n $this->_registry->redirectTo('admin/authors/view/' . $authorId);\n } else {\n $this->_template->token = $this->_registry->getObject('security')->generateToken();\n $this->displayFormErrors();\n $this->_template->buildFromAdminTemplates('admin.header.php', 'admin.updateauthor.php', 'admin.footer.php');\n }\n } else {\n $this->_template->token = $this->_registry->getObject('security')->generateToken();\n $this->_template->buildFromAdminTemplates('admin.header.php', 'admin.updateauthor.php', 'admin.footer.php');\n }\n }", "title": "" }, { "docid": "ef726d6b2f58e77d1a91002e4730a5ff", "score": "0.6424089", "text": "public function update(Request $request, Author $author)\n {\n //\n\t$this->authorize('update', $author);\n\n\t$this->validate(request(), [\n\t 'first' => 'required',\n\t 'middle' => '',\n\t 'last' => 'required',\n\t 'website' => '',\n\t 'description' => 'required',\n\t]);\n\n\t$author->first_name = request('first');\n\tif(request('middle') != '') {\n\t $author->middle_name = request('middle');\n\t}\n\t$author->last_name = request('last');\n\tif(request('website') != '') {\n\t $author->website = request('website');\n\t}\n\t$author->description = request('description');\n\n\t$author->save();\n\n\tif(request()->expectsJson()) {\n\t return $author->load(['creator', 'owner']);\n\t}\n\n\treturn redirect($author->path());\n }", "title": "" }, { "docid": "1662eca09b1cb1b190774f6686f02f1c", "score": "0.64171", "text": "function updateLocaleFields(&$author) {\n\t\t$this->updateDataObjectSettings(\n\t\t\t'author_settings',\n\t\t\t$author,\n\t\t\tarray(\n\t\t\t\t'author_id' => $author->getId()\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "25d58c6e8813685b300c76917d27e6b2", "score": "0.6411708", "text": "function xlate_author($recPost)\n\t{\n\t\t// update or create new author on remote server\n\t\t\n\t\t// Set id of remote author id into post data\n\t\t\n\t}", "title": "" }, { "docid": "105d8af7e41f76a0644305e0e43a2178", "score": "0.6382618", "text": "public function crudUpdate() {\n\t\t$book = Book::first();\n\n\t\t# Update the author\n\t\t$book->author = 'Foobar';\n\n\t\t# Save the changes\n\t\t$book->save();\n\n\t\techo \"This book has been updated\";\n\n\t}", "title": "" }, { "docid": "262e588eec1c7774730274a05e5ee0ef", "score": "0.6352851", "text": "public function setAuthor(?User $author);", "title": "" }, { "docid": "c3ee472abfc84c9661db665f9a71d650", "score": "0.63035446", "text": "public function testAuthorRepositoryUpdate() {\n\t\t$authorRepos = new \\Model\\Library\\AuthorRepository($this->emanager);\n\t\t$author = $authorRepos->read()->where(\"bookID\", 1)->fetch();\n\n\t\t$author->setName(\"Martin Chudoba - updated\");\n\t\t$authorRepos->save();\n\n\t\t$author = $authorRepos->read()->where(\"bookID\", 1)->fetch();\n\t\t$this->assertEquals($author->getName(), \"Martin Chudoba - updated\");\n\t}", "title": "" }, { "docid": "44c8b681a0696cfd7be227bfa7a49337", "score": "0.6299629", "text": "public function setAuthor()\n\t{\n\t\tif ($this->isNewRecord) {\n\t\t\t$interior = Interior::model()->findByPk($this->interior_id, array('select' => 'author_id'));\n\t\t\t$this->author_id = $interior->author_id;\n\t\t}\n\t}", "title": "" }, { "docid": "eda8f26cdae177ebb754c7c8ad88facb", "score": "0.62967485", "text": "public function author($author)\n {\n return $this->setProperty('author', $author);\n }", "title": "" }, { "docid": "77efa23a446b5671f6362645eaac547f", "score": "0.62919956", "text": "public function update(Request $request, $author){\n return $this->successResponse($this->authorService->editAuthor($request->all(), $author));\n }", "title": "" }, { "docid": "0774af4e1794f428a5934349948e4085", "score": "0.62908304", "text": "public function authors_save(): void\n {\n $response = $this->check_request('Save author');\n if (!$response) {\n $this->update(input_request('authorid'), input_request('name'),\n input_request('link'), input_request('bio'));\n $response = $this->get_response(false, 'Author updated');\n }\n exit(json_encode($response));\n }", "title": "" }, { "docid": "e3a94239634a3235a346f64e556951c2", "score": "0.6277235", "text": "public function update(Request $request, Author $author)\n {\n $request->validate([\n 'name' => [\n 'required',\n 'max:80',\n 'alpha_custom',\n Rule::unique('authors')\n ->where(function ($query) {\n return $query->where('deleted_at', null);\n })->ignore($author->id),\n ],\n ]);\n\n $author->update([\n 'updated_by' => auth()->user()->id,\n 'name' => $request->input('name'),\n 'updated_at' => now(),\n ]);\n\n return $author;\n }", "title": "" }, { "docid": "e62570044a622d7e6e11e58043722393", "score": "0.62147176", "text": "public function updateAuthors()\n {\n $results = Tweester_Twitter::getMaxSearchResults($this->coreManager->getSettingsManager()->getOption('query')->getValue(), 15);\n\n //Get list of excludes\n $excludes = $this->coreManager->getSettingsManager()->getOption('excludes')->getValue();\n $excludedArray = explode(',', $excludes);\n $excludedArray = array_map('trim', $excludedArray);\n\n if ($results != false) {\n //Process, store supporters\n foreach($results as $tweet){\n //Get Username\n $username = $tweet->from_user;\n\n //Skip if in excluded\n if (in_array($username, $excludedArray)) {\n continue;\n }\n\n //Check if already in base\n $data = $this->coreManager->getDbManager()->get_row(\"SELECT * FROM \".$this->coreManager->getDbManager()->getTableNameFor('authors').\" WHERE twitter = '\".$username.\"'\");\n\n //Add to base if not\n if ($data == null){\n $this->coreManager->getDbManager()->insert( $this->coreManager->getDbManager()->getTableNameFor('authors'), array( 'twitter' => $username, 'added_on' => date('Y-m-d H:i:s') ), array( '%s', '%s' ) );\n }\n \n }\n }\n\n //Update execution time\n $this->coreManager->getSettingsManager()->getOption('cron_run_time')->setValue(time());\n }", "title": "" }, { "docid": "eb7505baaa163fe6945a3299c7df7341", "score": "0.62086177", "text": "public function update(AuthorRequest $request, Author $author)\n {\n $validatedData = $request->validated();\n\n $author->first_name = $validatedData['first_name'];\n $author->last_name = $validatedData['last_name'];\n\n //Store Image\n if ($request->hasFile('image') && $request->file('image')->isValid()) {\n //Get Image Name\n $fileName = $request->image->getClientOriginalName();\n //Check if Author has image record, if yes Delete it\n if ($author->image) {\n $path = asset('storage/authors/' . $author->image);\n Storage::delete($path);\n }\n //Specify new mage storage path\n $request->image->storeAs('authors', $fileName, 'public');\n\n $author->image = $fileName;\n }\n $author->user_id = auth()->user()->id;\n $author->save();\n\n session()->flash('success_report', 'Author Updated Successfully');\n return back();\n }", "title": "" }, { "docid": "777826d2b7f9e7623f206d1a05255636", "score": "0.619194", "text": "public function update(Request $request, Author $author)\n {\n $request->validate([\n 'name' => ['required']\n ]);\n $author = Author::findOrFail($author->id);\n $author->update([\n 'name' => request('name'),\n 'slug' => Str::slug(request('name'))\n ]);\n\n if ($author) {\n return response()->json([\n 'message' => 'Author berhasil diupdate',\n 'data_author' => $author\n ], 200);\n } else {\n return response()->json([\n 'message' => 'Invalid',\n ], 400);\n }\n }", "title": "" }, { "docid": "b7b05934088ff2330228e91e49ae411b", "score": "0.6161317", "text": "public function ADMupdateAuthor($id)\n {\n \t$author = AuthorDao::update($id);\n\t\t\n\t\t$view_path = constant(\"SITE_PATH\") . \"/src/vue/admin/librairie/author/ADMupdateAuthor.php\";\n\t\t\n\t\trequire_once constant(\"SITE_PATH\") . \"/src/vue/page.php\";\n }", "title": "" }, { "docid": "31d9c9a72efae1e4674d6bb927817c0f", "score": "0.61488765", "text": "private function changeRevAuthors( $authors, $comment ) {\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\t$dbw->startAtomic( __METHOD__ );\n\t\t$editcounts = []; // Array to keep track of EC mutations; key=userid, value=mutation\n\n\t\tforeach ( $authors as $id => $users ) {\n\t\t\t$dbw->update(\n\t\t\t\t'revision',\n\t\t\t\t/* SET */[\n\t\t\t\t\t'rev_user' => $users[1]->getId(),\n\t\t\t\t\t'rev_user_text' => $users[1]->getName()\n//\t\t\t\t\t'rev_actor' => $users[1]->getActorId() // This needs to be added when the column will be there.\n\t\t\t\t],\n\t\t\t\t[ 'rev_id' => $id ], // WHERE\n\t\t\t\t__METHOD__\n\t\t\t);\n\n\t\t\t// Now also change the revision_actor_temp table :\n\t\t\t$dbw->update(\n\t\t\t\t'revision_actor_temp',\n\t\t\t\t/* SET */[\n\t\t\t\t\t'revactor_actor' => $users[1]->getActorId()\n\t\t\t\t\t],\n\t\t\t\t[ 'revactor_rev' => $id ], // WHERE\n\t\t\t\t__METHOD__\n\t\t\t);\n\n\t\t\t$rev = Revision::newFromId( $id );\n\n\t\t\t$logEntry = new ManualLogEntry( 'changeauth', 'changeauth' );\n\t\t\t$logEntry->setPerformer( $this->getUser() );\n\t\t\t$logEntry->setTarget( $rev->getTitle() );\n\t\t\t$logEntry->setComment( $comment );\n\t\t\t$logEntry->setParameters( [\n\t\t\t\t'4::revid' => $id,\n\t\t\t\t'5::originalauthor' => $users[0]->getName(),\n\t\t\t\t'6::newauthor' => $users[1]->getName(),\n\t\t\t] );\n\t\t\t$logId = $logEntry->insert();\n\t\t\t$logEntry->publish( $logId );\n\n\t\t\tWikimedia\\suppressWarnings();\n\t\t\t$editcounts[$users[1]->getId()]++;\n\t\t\t$editcounts[$users[0]->getId()]--;\n\t\t\tWikimedia\\restoreWarnings();\n\t\t}\n\n\t\tforeach ( $editcounts as $userId => $mutation ) {\n\t\t\tif ( $mutation == 0 || $userId == 0 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( $mutation > 0 ) {\n\t\t\t\t$mutation = \"+$mutation\";\n\t\t\t}\n\t\t\t$dbw->update(\n\t\t\t\t'user',\n\t\t\t\t[ \"user_editcount=user_editcount$mutation\" ],\n\t\t\t\t[ 'user_id' => $userId ],\n\t\t\t\t__METHOD__\n\t\t\t);\n\t\t\tif ( $dbw->affectedRows() == 0 ) {\n\t\t\t\t// Let's have mercy on those who don't have a proper DB server\n\t\t\t\t// (but not enough to spare their master)\n\t\t\t\t$count = $dbw->selectField(\n\t\t\t\t\t'revision',\n\t\t\t\t\t'COUNT(rev_user)',\n\t\t\t\t\t[ 'rev_user' => $userId ],\n\t\t\t\t\t__METHOD__\n\t\t\t\t);\n\t\t\t\t$dbw->update(\n\t\t\t\t\t'user',\n\t\t\t\t\t[ 'user_editcount' => $count ],\n\t\t\t\t\t[ 'user_id' => $userId ],\n\t\t\t\t\t__METHOD__\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$dbw->endAtomic( __METHOD__ );\n\t}", "title": "" }, { "docid": "6a328790340092c1fcdbee952e4d13f6", "score": "0.611181", "text": "public function setAuthor(User $author) {\r\n\t\t$this->author = $author;\r\n\t}", "title": "" }, { "docid": "7852a1ec380dc634306969621b08cd1a", "score": "0.6072942", "text": "public function setAuthor($author)\n\t{\n\t\t$this->pdf->SetAuthor($this->parseVariables($author));\n\t}", "title": "" }, { "docid": "7ae510b617d3efe564db5de176b78d8a", "score": "0.60662556", "text": "public function setAuthor(User $author)\n {\n $this->author = $author;\n }", "title": "" }, { "docid": "b2a7ebc5cf3dce8ccd34368eb51bf35d", "score": "0.60595715", "text": "public function update(Request $request, Author $author)\n {\n $this->validate($request, [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'email' => 'required',\n 'handphone' => 'required'\n ]);\n\n $author->update($request->all());\n return response()->json('Success', 201); \n }", "title": "" }, { "docid": "b6b2c3e72a485880d55642e2b6c8d729", "score": "0.60591036", "text": "public function testUpdateUnownedAuthorAsAdmin()\n {\n $user = User::factory()\n ->create();\n\n $user->assignRole(Role::create(['name' => User::ADMIN]));\n $user->save();\n\n $token = $user->createToken('normal');\n\n $author = Author::factory()\n ->create(['user_id' => User::factory()->create()->id]);\n\n $response = $this->put(\"/api/v1/authors/{$author->id}\", [\n 'website' => $this->faker->url,\n 'address' => $this->faker->address,\n 'email' => $user->email,\n 'name' => $this->faker->name,\n ], [\n 'Accept' => 'application/json',\n 'Authorization' => \"Bearer {$token->plainTextToken}\"\n ]);\n\n $response->assertOk();\n }", "title": "" }, { "docid": "efaf10489832dd3a6ca9200b850f3bf0", "score": "0.6059055", "text": "public function edit($author)\n {\n return Author::select('id', 'name')->findOrFail($author);\n\n }", "title": "" }, { "docid": "c47dfc197386cdf73bfbce5a2ee1e6b3", "score": "0.6041453", "text": "public function setAuthorName($_authorName)\n {\n $this->authorName = $_authorName;\n }", "title": "" }, { "docid": "a949e953e92b3cb10217b576344f987e", "score": "0.60205805", "text": "public function setAuthor(\\Inouire\\UserBundle\\Entity\\User $author){\n $this->author = $author;\n }", "title": "" }, { "docid": "4d113b26f3dd6ede9025d1d4e03932cc", "score": "0.60150206", "text": "public function editAuthor($data, $authorId) {\n return $this->httpRequest('PUT', \"/authors/{$authorId}\", $data);\n }", "title": "" }, { "docid": "9eb06ec2ca2dd5f95ec5be88ecfefade", "score": "0.5976276", "text": "public function setPost_author($value) {\r\n if ($value <> '') {\r\n $this->_name = $value;\r\n }\r\n }", "title": "" }, { "docid": "6b7337fe6ab1c5b7650a7883e2f36a76", "score": "0.5919528", "text": "public function update(User $user, Author $author)\n {\n return true;\n }", "title": "" }, { "docid": "683aae16a4e19732407140672a7c4b2e", "score": "0.5909685", "text": "public function addAuthor($author) {\n\t\tglobal $db; \n\t\t \n\t\tif (!empty($author)) {\n\t\t\t$db->vars['name'] = $author;\n\t\t\t$dup_check = $db->select(\"SELECT * FROM authors WHERE fullname=:name\");\n\t\t\t\n\t\t\tif (!count($dup_check)) {\n\t\t\t\t$db_author = array(\n\t\t\t\t\t'fullname'=>\t$author,\n\t\t\t\t);\n\t\t\t\t$db->insert(\"authors\", $db_author);\n\t\t\t\t$db->doCommit();\n\t\t\t\t$author_id = $db->lastId;\n\t\t\t} else {\n\t\t\t\t$author_id = $dup_check[0]['id'];\n\t\t\t}\n\t\t\treturn $author_id;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "d558cd3e6f51c6e5f75f1ff0518925e1", "score": "0.5895048", "text": "public function updated(CourseBatchAuthor $courseBatchAuthor)\n {\n //\n }", "title": "" }, { "docid": "134429347cd05b5900354ca268891c3f", "score": "0.58693343", "text": "public function addAuthor($author)\n\t{\n\t\t$this->authors[] = $author;\n\t}", "title": "" }, { "docid": "6e5d53d5c366b0e894ac77b9fe61b396", "score": "0.5831296", "text": "protected function setMetaAuthor($name, $incremental=false)\n\t{\n\t\tif ($incremental === false)\n\t\t\t$this->_metas[\"author\"] = $name;\n\t\telse \n\t\t\t$this->_metas[\"author\"] .= \",\".$name;\n\t}", "title": "" }, { "docid": "0ada57ca762c576b0236dd52aa790d5d", "score": "0.58281946", "text": "public function getAuthorDetails(int $author_id);", "title": "" }, { "docid": "9443f945c161023b6a60a9e69d2880e1", "score": "0.5819767", "text": "public function update(\\PDO $pdo): void {\n\n\t\t// create query template\n\t\t$query = \"UPDATE author SET authorActivationToken = :authorActivationToken, authorAvatarUrl = :authorAvatarUrl, \n \t\t\t\t\t\tauthorEmail = :authorEmail, authorHash = :authorHash, authorUsername = :authorUsername \n\t\t\t\t\t\tWHERE authorId = :authorId\";\n\t\t$statement = $pdo->prepare($query);\n\n\t\t//bind the member variables to the place holders in the template\n\n\t\t$parameters = [\"authorId\" => $this->authorId->getBytes(), \"authorActivationToken\" => $this->authorActivationToken,\n\t\t\t\"authorAvatarUrl\" => $this->authorAvatarUrl, \"authorEmail\" => $this->authorEmail,\n\t\t\t\"authorHash\" => $this->authorHash, \"authorUserName\" => $this->authorUsername];\n\t\t$statement = $pdo->execute($parameters);\n\t}", "title": "" }, { "docid": "5ba857eaef41d8b687634ff0c2300e88", "score": "0.5769036", "text": "function addAuthor($author) {\r\n\t\tif ($author->getSequence() == null) {\r\n\t\t\t$author->setSequence(count($this->authors) + 1);\r\n\t\t}\r\n\t\tarray_push($this->authors, $author);\r\n\t}", "title": "" }, { "docid": "eb56d2065ebfa6df55a02204aedf2f4b", "score": "0.5757496", "text": "protected function author() {\n return isset($this->info['author']) ? $this->info['author'] : 'unknown';\n }", "title": "" }, { "docid": "a9f1db978e77fdf3e14f8d88e9e3f7e3", "score": "0.57565945", "text": "public function updateAuthor(int $id, string $name, string $surname)\n {\n /* Global $pdo object */\n global $pdo;\n\n /* Trim the strings to remove extra spaces */\n $name = trim($name);\n $surname = trim($surname);\n\n if (!$this->isNameValid($name)) {\n throw new Exception('Not valid author name');\n }\n\n if (!$this->isSurnameValid($surname)) {\n throw new Exception('Not valid author surname');\n }\n\n /* Check if the author having the same name already exists. */\n $idFromAuthor = $this->getIdFromAuthor($name, $surname);\n\n if (!is_null($idFromAuthor) && ($idFromAuthor != $id)) {\n throw new Exception('Author name and surname already used');\n }\n\n $this->name = $name;\n $this->surname = $surname;\n\n $query = 'UPDATE authors \n SET author_name = :name,\n author_surname = :surname\n WHERE author_id = :id';\n\n $values = [':name' => $name, ':surname' => $surname, ':id' => $id];\n\n try {\n $res = $pdo->prepare($query);\n $res->execute($values);\n } catch (PDOException $e) {\n throw new Exception('Database query error');\n }\n }", "title": "" }, { "docid": "71dc82caa189b923d1e10c4e54ee2dba", "score": "0.5696913", "text": "public function addAuthor($author) {\n try {\n return add(new Meta(Element::AUTHOR, $author));\n } catch (DocumentException $de) {\n throw new Exception($de);\n }\n }", "title": "" }, { "docid": "1df376f69022d46a5b972d2a6277e31e", "score": "0.56730324", "text": "function setDocAuthor($docAuthor) {\n\t\t$this->docAuthor = is_string($docAuthor) ? trim($docAuthor) : NULL;\n\t}", "title": "" }, { "docid": "fe6b2ef182e73ebc9b68a4956a51a45f", "score": "0.566723", "text": "public function practice97() {\n\n // Find any books by the author Carl Sagan and update the author name to be carl sagan (lowercase).\n\n // To update a row in a table, you first have to select which row(s) you wish to edit.\n // Then you can alter the properties of the row and then save those changes using the save method.\n\n # this works:\n //$books = Book::where('author', 'LIKE', '%Sagan%')->update(['author' => 'sagantest2']);\n\n # this doesn't work, it causes error\n // Whoops, looks like something went wrong.\n // ErrorException in PracticeController.php line 179:\n // Use of undefined constant author - assumed 'author'\n //$books = Book::where('author', 'LIKE', '%Sagan%')->update(['author' => strtoupper(author)]);\n\n # this doesn't work, it changes author field to the string 'AUTHOR'\n //$books = Book::where('author', 'LIKE', '%Sagan%')->update(['author' => strtoupper('author')]);\n\n # THIS WORKS, IT MAKES THE AUTHOR OF BOTH SAGAN BOOKS LOWER CASE:\n $books = Book::where('author', 'LIKE', '%Sagan%')->get();\n foreach($books as $book) {\n $book->author = strtolower($book->author);\n $book->save();\n }\n\n dump('Update complete; check the database to confirm the update worked.');\n\n}", "title": "" }, { "docid": "41378da04149a3897d23280051f247b6", "score": "0.5662019", "text": "public function edit(Author $author)\n {\n //\n\t$this->authorize('update', $author);\n\n\treturn view('authors.edit', compact('author'));\n }", "title": "" }, { "docid": "6869b7aa994cea1eda8627f2e71fecb1", "score": "0.5658819", "text": "public function byAuthor($author)\n {\n return $this->author()->associate($author);\n }", "title": "" }, { "docid": "5d0bd97a590304012634365876fd19fb", "score": "0.56538844", "text": "function martfury_setup_author() {\n\tglobal $wp_query;\n\n\tif ( $wp_query->is_author() && isset( $wp_query->post ) ) {\n\t\t$GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author );\n\t}\n}", "title": "" }, { "docid": "481ec2b090f3f442ad8a92c3a08eb418", "score": "0.56518745", "text": "public function update($conn, $name, $author, $book_desc) {\n\t\t$safe_name = $conn->real_escape_string($name);\n\t\t$safe_author = $conn->real_escape_string($author);\n\t\t$safe_id = $conn->real_escape_string($this->id);\n\t\t$safe_book_desc = $conn->real_escape_string($book_desc);\n\n\t\t$query = \"UPDATE books SET name='$safe_name', author='$safe_author', book_desc='$book_desc' WHERE id=$safe_id\";\n\t\tif ( $res = $conn->query($query) ) {\n\t\t\t$this->name = $name;\n\t\t\t$this->author = $author;\n\t\t\t$this->book_desc = $book_desc;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "f4fa6f0a32555af94206d9304ac66ccf", "score": "0.5648215", "text": "public function update($id)\n\t{\n\t\t$author = Author::find($id);\n\t\t$author->username = Input::get('username');\n\t\t$author->bio = Input::get('bio');\n\t\t$author->save();\n\n\t\treturn Redirect::to('author');\n\t}", "title": "" }, { "docid": "e1b8f05142953bdf226d06c9c1b0ca63", "score": "0.56337017", "text": "function wppandora_setup_author() {\r\n global $wp_query;\r\n\r\n if ( $wp_query->is_author() && isset( $wp_query->post ) ) {\r\n $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author );\r\n }\r\n}", "title": "" }, { "docid": "3564caed43775db70bfdda4a1e508bb6", "score": "0.5627053", "text": "public function testUpdateUnownedAuthorAsNormalUser()\n {\n $user = User::factory()\n ->create();\n\n $user->assignRole(Role::create(['name' => User::NORMAL]));\n $user->save();\n\n $token = $user->createToken('normal');\n\n $author = Author::factory()\n ->create(['user_id' => User::factory()->create()->id]);\n\n $response = $this->put(\"/api/v1/authors/{$author->id}\", [\n 'website' => $this->faker->url,\n 'address' => $this->faker->address,\n 'email' => $user->email,\n 'name' => $this->faker->name,\n ], [\n 'Accept' => 'application/json',\n 'Authorization' => \"Bearer {$token->plainTextToken}\"\n ]);\n\n $response->assertForbidden();\n }", "title": "" }, { "docid": "922242a4953965234fc95a606ffa5bb1", "score": "0.5619277", "text": "function set(Autor $autor){\r\n \r\n $parametrosWhere=array();\r\n $parametrosWhere[\"id_autor\"]=$autor->getID();\r\n return $this->bd->update($this->tabla, $autor->getGenerico(), $parametrosWhere);\r\n \r\n }", "title": "" }, { "docid": "fb0bf364dd993d0c026394a5f9d385bf", "score": "0.5611453", "text": "function changeAuthors($uid, $pid, $add, $remove) {\n mysql_query('START TRANSACTION');\n addAuthors($uid, $pid, $add);\n removeAuthors($uid, $pid, $remove);\n mysql_query('COMMIT');\n}", "title": "" }, { "docid": "8fd6f6ba3179ce4b08192654b71a579f", "score": "0.56111515", "text": "public function getauthorId()\r\n {\r\n return $this->authorId;\r\n }", "title": "" }, { "docid": "8aebfd46598efa4abfff7ae0ece64df6", "score": "0.5594657", "text": "public function getAuthorId()\n {\n return $this->author_id;\n }", "title": "" }, { "docid": "67096c80e8d18ebdfeb5bc8bcd942494", "score": "0.55937773", "text": "public function commit($body, $title, $author){\n $latestArticle = $this->getArticle();\n // has the current article hasn't received its first contribution yet?\n if(!isset($latestArticle['title'])){\n if($title != null){\n // insert title of article and overwrite the dat e_created value\n $statement = $this->connection->prepare(\"UPDATE articles SET\n title = ?,\n date_created = NOW(),\n username = ?\n WHERE id = {$latestArticle['id']}\");\n $statement->bind_param('ss', $title, $author);\n $statement->execute() or die($this->connection->error);\n $statement->close();\n } else die(\"Must include a title\");\n }\n $statement = $this->connection->prepare(\"INSERT INTO contributions VALUES(NULL, ?, {$latestArticle['id']}, NOW(), ?)\");\n $statement->bind_param('ss', $body, $author);\n $statement->execute() or die($this->connection->error);\n $statement->close();\n return mysqli_insert_id($this->connection);\n }", "title": "" }, { "docid": "dae3aa231d45b126b5a5fbd4c76b7c0d", "score": "0.5589398", "text": "public function practice98() {\n\n // Find any books by the author Carl Sagan and update the author name to be carl sagan (lowercase).\n\n // To update a row in a table, you first have to select which row(s) you wish to edit.\n // Then you can alter the properties of the row and then save those changes using the save method.\n\n # First get a book to update\n $book = Book::where('author', 'LIKE', '%Sagan%')->first();\n\n if(!$book) {\n dump(\"Book not found, can't update.\");\n }\n else {\n\n # Change one or more properties\n //$book->title = 'The Really Great Gatsby';\n $book->author = strtoupper($book->author);\n\n # Save the changes\n $book->save();\n\n dump('Update complete; check the database to confirm the update worked.');\n }\n\n}", "title": "" }, { "docid": "49385f860f31347814541c0a31bb7d8d", "score": "0.558446", "text": "public function example105() {\n # First get a book to update\n $books = Book::where('author', 'LIKE', '%Bell Hooks%')->get();\n\n # If we found the book, update it\n if($books) {\n # change each author in books\n foreach($books as $book) {\n # change author to lowercase\n $book->author = 'bell hooks';\n echo $book->title.'<br>';\n }\n # Save the changes\n $book->save();\n\n echo \"Update complete; check the database to see if your update worked...\";\n }\n else {\n echo \"Book not found, can't update.\";\n }\n }", "title": "" }, { "docid": "8a5e548a03af6becf2d5da3e1bd41471", "score": "0.5579611", "text": "public function setAuthor($author = NULL) {\n if ($this->getDrupalEntityType() == 'node' && isset($author)) {\n // Set the entity's author for node entities.\n if ($this->getAttribute('author')) {\n $this->setAttributeValue('author', $author);\n }\n else {\n $attribute = new Attribute(Attribute::TYPE_REFERENCE);\n $attribute = $attribute->setValue($author);\n $this->setAttribute('author', $attribute);\n }\n }\n }", "title": "" }, { "docid": "136ae5e0707477586593eb984082bd3f", "score": "0.5576149", "text": "public function __construct(Author $author)\n {\n $this->author = $author;\n }", "title": "" }, { "docid": "24b7602086f516378c8512637c3328cd", "score": "0.5571412", "text": "public function update(Request $request, $authorId)\n {\n $rules = [\n 'name' => 'max:255',\n 'country' => 'max:255',\n 'gender' => 'max:255 | in:male,female',\n ];\n $this->validate($request,$rules);\n $author = Author::findOrFail($authorId);\n $author->fill($request->all());\n if($author->isClean()) {\n return $this->error('can not update an empty object', Response::HTTP_UNPROCESSABLE_ENTITY);\n }\n $author->save();\n return $this->success($author);\n }", "title": "" }, { "docid": "15578563b913db1416203012508ccf7a", "score": "0.5564736", "text": "public function author($query = [], $author = DEFAULT_STRING) {\n\t\t// articles/author/author1\n\n\t\t// Get data from api\n\t\t// get('api/articles?author=author1\n\n\t\t$page = 1;\n\n\t\tif(isset($query['lpage']))\n\t\t\t$page = $query['lpage'];\n\n\t\t$filter = $this->model->filterArrayToString($query);\n\n\t\t$url = BASE_URL . 'api/articles?' . $filter . '&author.name=' . $this->model->filterSpecialChars($author) . '&lpage=' . $page;\n\t\t$result = json_decode($this->model->getDataFromApi($url), true);\n\t\t$result['pageTitle'] = AUTHOR . ' - ' . $author;\n\n\t\tif($page == '1')\n\t\t\t($result['articles'] != 'noData') ? $this->view('articles/articles', json_encode($result)) : $this->view('error/index');\n\t\telse\n\t\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "cdf1b73c30df473b9f61efd72f085f67", "score": "0.556143", "text": "public function setAuthor(string $author) : self\n {\n $this->author = $author;\n return $this;\n }", "title": "" }, { "docid": "8c82454bb2087aa5e6112d1134243fca", "score": "0.5559916", "text": "public function getAuthorid()\n {\n return $this->authorid;\n }", "title": "" }, { "docid": "9bc121ab9f9687576a7ad6b60d1399bc", "score": "0.55567163", "text": "public function setAuthor($value)\n {\n $this->_author = $value;\n return $this;\n }", "title": "" }, { "docid": "e290735c7a8573b04eb69a3a01271017", "score": "0.55396885", "text": "function zelda_setup_author() {\n\tglobal $wp_query;\n\n\tif ( $wp_query->is_author() && isset( $wp_query->post ) ) {\n\t\t$GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author );\n\t}\n}", "title": "" }, { "docid": "ccff9081f693c2f3c49a18b5fb50ebe2", "score": "0.55171496", "text": "public function update($author, $name)\n {\n $flashBag = $this->application->session()->getFlashBag();\n try {\n $package = $this->getPackage($author, $name);\n $this->application->getApi()->worker()->scan($author, $name);\n } catch (\\Exception $exception) {\n $flashBag->add(\n 'error',\n 'Error while updating the package: ' . $exception->getMessage()\n );\n $this->application->logger()->error('Exception: ' . $exception->getMessage());\n return $this->application->redirect('/');\n }\n \n $flashBag->add(\n 'success',\n 'The package ' . $package->getIdentifier() . ' will be updated. Thanks.'\n );\n return $this->application->redirect('/package/' . $package->getIdentifier());\n }", "title": "" }, { "docid": "759e3dc7884d2d030c079b419756362c", "score": "0.55081385", "text": "public function updated(Album $album)\n {\n $user_id = auth()->user()->id;\n $album->updated_by = $user_id;\n //\n }", "title": "" }, { "docid": "519036cb726d15c039b86f93852c3fc4", "score": "0.5503315", "text": "public function obtainAuthor($author)\n {\n return $this->performRequest('GET', \"/authors/{$author}\");\n }", "title": "" }, { "docid": "6711dcc0a315ca67c49a42d66d423521", "score": "0.5476318", "text": "function setup_be_author_by() {\n\t\t$id = get_the_author_meta( 'ID' );\n\t\techo '<div class=\"item author\">By <a href=\"' . get_author_posts_url( $id ) . '\">' . get_the_author() . '</a></div>';\n\t}", "title": "" }, { "docid": "a07a8d2356669c0d153763166b337ff2", "score": "0.54720914", "text": "function processAuthorFormInfo($pdo) {\r\n // first let us see if there is any query string information\r\n // ... if not return empty author object\r\n if (! isThereQueryStringInfo() ) {\r\n return new Author(\"\",\"\",\"\",\"\");\r\n }\r\n // are we editing an existing author ...\r\n if ( areEditingExisting() ) {\r\n // since request method is GET, then this is either request for\r\n // inserting new or a request to edit if id attribute\r\n // NOTE: we are assuming ID in query string is ok\r\n // (should actually test it in real site)\r\n $which = $_GET['which'];\r\n // retrieve data from database\r\n return retrieveAuthor($pdo, $which);\r\n }\r\n // ... or are we saving an author\r\n if ( areSaving() ) {\r\n // if here then saving a record\r\n // we are going to use the existence of an ID querystring to\r\n // determine whether we should be inserting or updating\r\n $id = \"\";\r\n if ( isset($_POST['id']) ) {\r\n $id = $_POST['id'];\r\n }\r\n $author = saveAuthor( $pdo, $id, $_POST['firstname'],\r\n\t\t\t $_POST['lastname'], $_POST['institution'] );\r\n return $author;\r\n }\r\n}", "title": "" }, { "docid": "8499176873ad9dd99892f84b8442e0d6", "score": "0.5447067", "text": "function authors($args) {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\t$journal =& Request::getJournal();\n\n\t\t$authorDao =& DAORegistry::getDAO('AuthorDAO');\n\n\t\tif (isset($args[0]) && $args[0] == 'view') {\n\t\t\t// View a specific author\n\t\t\t$firstName = Request::getUserVar('firstName');\n\t\t\t$middleName = Request::getUserVar('middleName');\n\t\t\t$lastName = Request::getUserVar('lastName');\n\t\t\t$affiliation = Request::getUserVar('affiliation');\n\t\t\t$country = Request::getUserVar('country');\n\n\t\t\t$publishedArticles = $authorDao->getPublishedArticlesForAuthor($journal?$journal->getId():null, $firstName, $middleName, $lastName, $affiliation, $country);\n\n\t\t\t// Load information associated with each article.\n\t\t\t$journals = array();\n\t\t\t$issues = array();\n\t\t\t$sections = array();\n\t\t\t$issuesUnavailable = array();\n\n\t\t\t$issueDao =& DAORegistry::getDAO('IssueDAO');\n\t\t\t$sectionDao =& DAORegistry::getDAO('SectionDAO');\n\t\t\t$journalDao =& DAORegistry::getDAO('JournalDAO');\n\n\t\t\tforeach ($publishedArticles as $article) {\n\t\t\t\t$articleId = $article->getId();\n\t\t\t\t$issueId = $article->getIssueId();\n\t\t\t\t$sectionId = $article->getSectionId();\n\t\t\t\t$journalId = $article->getJournalId();\n\n\t\t\t\tif (!isset($issues[$issueId])) {\n\t\t\t\t\timport('classes.issue.IssueAction');\n\t\t\t\t\t$issue =& $issueDao->getIssueById($issueId);\n\t\t\t\t\t$issues[$issueId] =& $issue;\n\t\t\t\t\t$issuesUnavailable[$issueId] = IssueAction::subscriptionRequired($issue) && (!IssueAction::subscribedUser($journal, $issueId, $articleId) && !IssueAction::subscribedDomain($journal, $issueId, $articleId));\n\t\t\t\t}\n\t\t\t\tif (!isset($journals[$journalId])) {\n\t\t\t\t\t$journals[$journalId] =& $journalDao->getJournal($journalId);\n\t\t\t\t}\n\t\t\t\tif (!isset($sections[$sectionId])) {\n\t\t\t\t\t$sections[$sectionId] =& $sectionDao->getSection($sectionId, $journalId, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (empty($publishedArticles)) {\n\t\t\t\tRequest::redirect(null, Request::getRequestedPage());\n\t\t\t}\n\n\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t$templateMgr->assign_by_ref('publishedArticles', $publishedArticles);\n\t\t\t$templateMgr->assign_by_ref('issues', $issues);\n\t\t\t$templateMgr->assign('issuesUnavailable', $issuesUnavailable);\n\t\t\t$templateMgr->assign_by_ref('sections', $sections);\n\t\t\t$templateMgr->assign_by_ref('journals', $journals);\n\t\t\t$templateMgr->assign('firstName', $firstName);\n\t\t\t$templateMgr->assign('middleName', $middleName);\n\t\t\t$templateMgr->assign('lastName', $lastName);\n\t\t\t$templateMgr->assign('affiliation', $affiliation);\n\n\t\t\t$countryDao =& DAORegistry::getDAO('CountryDAO');\n\t\t\t$country = $countryDao->getCountry($country);\n\t\t\t$templateMgr->assign('country', $country);\n\n\t\t\t$templateMgr->display('search/authorDetails.tpl');\n\t\t} else {\n\t\t\t// Show the author index\n\t\t\t$searchInitial = Request::getUserVar('searchInitial');\n\t\t\t$rangeInfo = Handler::getRangeInfo('authors');\n\n\t\t\t$authors =& $authorDao->getAuthorsAlphabetizedByJournal(\n\t\t\t\tisset($journal)?$journal->getId():null,\n\t\t\t\t$searchInitial,\n\t\t\t\t$rangeInfo\n\t\t\t);\n\n\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t$templateMgr->assign('searchInitial', Request::getUserVar('searchInitial'));\n\t\t\t$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));\n\t\t\t$templateMgr->assign_by_ref('authors', $authors);\n\t\t\t$templateMgr->display('search/authorIndex.tpl');\n\t\t}\n\t}", "title": "" }, { "docid": "5dabd5306a71b0d63d71658c6656625d", "score": "0.5442124", "text": "public function getAuthorID () {\n\t\treturn $this->_authorID;\n\t}", "title": "" }, { "docid": "606e1782b960678414e25434815ec7ef", "score": "0.54395384", "text": "public function author($author = NULL)\n {\n if ($author !== NULL) {\n $this->author = $author;\n return $this;\n }\n return $this->author;\n }", "title": "" }, { "docid": "0a6a97d9aa5c73551dc60e11b5fb6161", "score": "0.5437591", "text": "function show_author($author)\n{\nglobal $db;\nglobal $dr;\nglobal $boxcontent;\n\n\t$boxauthor=show_user_avatar($author,\"login\");\n\t$boxcontent=str_replace(\"{PORTFOLIO_LINK}\",site_root.\"/index.php?user=\".user_url($author).\"&portfolio=1\",$boxcontent);\n\n\t$boxcontent=str_replace(\"{AUTHOR}\",$boxauthor,$boxcontent);\n}", "title": "" }, { "docid": "28be1a35e9b7c5cf972c88d592d0e6fa", "score": "0.54316705", "text": "function getAuthor()\r\n {\r\n return 'Roberto Bolli | Edmond Hui (admun)';\r\n }", "title": "" }, { "docid": "a158e5048e2d60d6dc3811e4479fd574", "score": "0.5428366", "text": "public function run()\n {\n $author = new Author();\n $author->name = 'Jack Fairweather';\n $author->about = 'A longtime foreign correspondent for the Daily Telegraph and the Washington Post, Jack Fairweather is currently Middle East editor and correspondent for Bloomberg News. He lives in Istanbul, Turkey.';\n $author->save();\n\n $author = new Author();\n $author->name = 'Sara Collins';\n $author->about = 'ara Collins is of Jamaican descent and worked as a lawyer for seventeen years in Cayman, before admitting that what she really wanted to do was write novels. She studied Creative Writing at Cambridge University,';\n $author->save();\n\n }", "title": "" }, { "docid": "c463286a95b6d8aec9fd306c035b2e97", "score": "0.5424534", "text": "public function show(Author $author)\n {\n //\n }", "title": "" }, { "docid": "5fa6c1f587dc8057606341b411e139de", "score": "0.542012", "text": "public function getAuthorId(): int\n {\n return $this->authorId;\n }", "title": "" }, { "docid": "a3c5e21a22463e133975104f6df7ffbc", "score": "0.5418797", "text": "public function update($publication)\n {\n }", "title": "" }, { "docid": "1be530e35c025cc5c1b544856430beb5", "score": "0.5415353", "text": "public function controller_author(){\n\n global $wp_query;\n $this->context['posts'] = new \\Timber\\PostQuery();\n if ( isset( $wp_query->query_vars['author'] ) ) {\n $author = new \\Timber\\User( $wp_query->query_vars['author'] );\n $this->context['author'] = $author;\n $this->context['title'] = 'Author Archives: ' . $author->name();\n }\n $this->templates = array( 'author.twig', 'archive.twig' );\n\n $this->custom_method('author');\n\n }", "title": "" }, { "docid": "f51e1479cd835bcd68427d609106e6f0", "score": "0.54152", "text": "public function author($author = null) {\n\t\tif (!is_null($author)) {\n\t\t\t$this->author = $author;\n\t\t\treturn $this;\n\t\t}\n\t\treturn $this->author;\n\t}", "title": "" }, { "docid": "6ef8c5fcb36001f0621d2f28d8828301", "score": "0.5411503", "text": "function updatePost($author = 0, $title, $content, $published, $post_id)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->_updatePost->bindParam(':author',$author);\n\t\t\t\t$this->_updatePost->bindParam(':title',$title);\n\t\t\t\t$this->_updatePost->bindParam(':content',$content);\n\t\t\t\t$this->_updatePost->bindParam(':published',$published);\n\t\t\t\t$this->_updatePost->bindParam(':id',$post_id, PDO::PARAM_INT);\n\t\t\t\t$this->_updatePost->execute();\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch(PDOException $e)\n\t\t\t{\n\t\t\t\techo \"<h1> Well shit: \" . $exception->getMessage() . \"</h1>\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e3e340a0826f434eea51ec52656df633", "score": "0.54102993", "text": "public function setAuthor($author)\n {\n assert(is_string($author), 'Invalid argument $author. String expected');\n $this->_author = $author;\n return $this;\n }", "title": "" }, { "docid": "247ffa6ccadd624c9bb412957ffe680d", "score": "0.54089814", "text": "public function DiscussionController_AuthorInfo_Handler(&$Sender) {\n $FB = Gdn::Session()->GetAttribute('Facebook.Profile', NULL);\n // If the author has a Facebook profile and a friendlist, check if the author is their friend\n if($FB && $this->friendlist) {\n // Check if the author has a Facebook profile\n $FriendFB = Gdn::UserModel()->GetAttribute($Sender->EventArguments['Author']->UserID, 'Facebook.Profile');\n if(!$FriendFB) return;\n $fkey = $FriendFB[\"id\"];\n // If the author ID is in list of friends, then add their name\n if(array_key_exists($fkey, $this->friendlist)) {\n\t $UserName = $this->friendlist[$fkey];\n // TODO: Make this flexible so that it can be styled or modified easily by users\n echo '<b>' . $UserName . '</b>';\n }\n }\n }", "title": "" }, { "docid": "30f4d94e368690fa9a17903461479850", "score": "0.54051363", "text": "public function setAuthor($author)\n {\n if ($author === null) {\n $this->author = null;\n } else {\n $this->author = (string)$author;\n }\n return $this;\n }", "title": "" }, { "docid": "b25af2e97b164b8ea5daed4bc68113a9", "score": "0.54004157", "text": "public function setAuthor($author) {\n $this->author = $author;\n return $this;\n }", "title": "" }, { "docid": "a4bc61028e29e6b73b2b5f2a8f1f1582", "score": "0.53840035", "text": "private function viewAuthor($authorId) {\n $this->_template->title = 'Author Details';\n $this->_template->authorInfo = $this->_model->getAuthorInfo($authorId);\n $this->_template->buildFromAdminTemplates('admin.header.php', 'admin.author.php', 'admin.footer.php');\n }", "title": "" }, { "docid": "b711b9ba5f2ce6045bcf380437b73e8f", "score": "0.538136", "text": "public function authors_add(): void\n {\n $response = $this->check_request('Add author');\n if (!$response) {\n $authorid = $this->insert(input_request('name'),\n input_request('link'), input_request('bio'));\n $this->log_info(\"Author added $authorid\");\n $response = $this->get_response(false, 'Author added');\n $response['author_id'] = $authorid;\n }\n exit(json_encode($response));\n }", "title": "" }, { "docid": "16aba166afde03afe72c7643792c0994", "score": "0.53738236", "text": "public function setAuthor($author)\r\n {\r\n $this->author = $author;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "fa5508550f7a7b5081e923b64b621c95", "score": "0.53674936", "text": "public function author(){\n\t\treturn parent::author().\" & Second author name is \".$this->name_second;\n\t}", "title": "" }, { "docid": "7d250b19e8ee90af4101853d3df8aa3e", "score": "0.5366815", "text": "public function actionUpdate()\n {\n if ($this->checkToken() and $_SERVER['REQUEST_METHOD'] == 'PUT') {\n header(\"HTTP/1.1 200 OK\");\n $_PUT = array();\n parse_str(file_get_contents(\"php://input\"), $_PUT);\n if ($this->isIdValidForUpdating($_PUT['id'])) {\n $idUser = $this->findUserIdByToken($_SERVER['HTTP_TOKEN']);\n $query = \"UPDATE `blog` SET \n title = \" . $_PUT['title'] . \",\n text = \" . $_PUT['text'] . \",\n blogger = $idUser \n WHERE blog.id =\" . $_PUT['id'];\n mysqli_query($this->myDB->connect(), $query);\n }\n }\n else {\n header(\"HTTP/1.1 404 Not Found\");\n }\n }", "title": "" } ]
22e07330438678ad260620103a95a66a
/ $name, log title $level: EMERG system is unusable ALERT action must be taken immediately CRIT critical conditions ERR error conditions WARNING warning conditions NOTICE normal, but significant, condition INFO informational message DEBUG debuglevel message $content
[ { "docid": "52e51f32e503e1f70e98914186ed73e4", "score": "0.4976128", "text": "function rlog($title, $level, $content)\n{\n openlog(\"$title\", LOG_PID, LOG_LOCAL0);\n syslog(LOG_DEBUG,\"$level $content\");\n closelog();\n}", "title": "" } ]
[ { "docid": "714c6f74d5a8f44cd41cddb868e77abb", "score": "0.55425596", "text": "function die_hard(&$log, $message) {\n \n // log the message\n $log->crit($message);\n \n // @todo incorporate into smarty display for user friendly display\n die(\"Please contact the system administrator\");\n \n}", "title": "" }, { "docid": "4a965b9df2d6bf26ac796efcadb787f4", "score": "0.5512768", "text": "public function emergence($message){ }", "title": "" }, { "docid": "f7d55bfa467ce1253b545b07c6ade750", "score": "0.54418224", "text": "function amfErrorHandler($level, $string, $file, $line, $context) {\n\t$msg = new VerboseException($string, $level, $file, $line);\n\tLogger::write($msg, 'php', false);\n}", "title": "" }, { "docid": "d967381110cc736cfc20e0d8e333ec32", "score": "0.5338209", "text": "function lg (int $severity, string $msg): void {\n\tglobal $CONFIG, $ERRMSG;\n\t\n\t// first store to the file\n\tif ($CONFIG['errors']['log-enabled']\n\t\t&& $CONFIG['errors']['log-min-severity'] <= $severity)\n\t\t@error_log(\"$severity: $msg\", 3, $CONFIG['errors']['log-file']);\n\t\n\t// generate the output message\n\tif ($CONFIG['errors']['display-enabled']\n\t\t&& $CONFIG['errors']['display-min-severity'] <= $severity)\n\t\t$ERRMSG[] = $msg;\n\t\n\t// kill the application, if severity is critical\n\tif ($severity >= 2)\n\t\tdie('Critical failure: ' . end($ERRMSG));\n}", "title": "" }, { "docid": "364f33a642d41f16c1f2190db7e6b855", "score": "0.52553296", "text": "function Halt( $msg ) { \n global $Global;\n // New Error control \n echo \"`_RPC_error_`\" . $this->Errno . \"`\" . $this->Error .\n \"`\" . $msg ; \n $this->NoLog = 1;\n $Global['SQL_Status'] = \"ER\";\n $this->log( $Global['username'], 'SQL ' .\n $this->Errno . \" - \" . $this->Error , $Global['SQL_Status'], $msg ); \n }", "title": "" }, { "docid": "fa0a4b0e4a7f4f2ae845b6a723e0449d", "score": "0.5226777", "text": "public function createLogFromResponse(String $content): void\n\t{\n\t\n\t\t\t$content = json_decode($content);\n\n\t\t\tif(!strstr($content->file, 'CustomExceptions.php')) {\n\t\t\t\t\t$this->createLog(\\Arr::only((array)$content, ['message', 'exception', 'file', 'line']));\n\t\t\t}\n\t}", "title": "" }, { "docid": "05ea7c2b50742ca1e52caf8c07a38d0f", "score": "0.5223916", "text": "function filter_game_exception_effective_level( $level, $identifier, $exception )\n {\n if( $new = Conf::get(\"REPORT_{$identifier}_AT\") )\n {\n if( $value = Logger::get_level_by_name($new) )\n {\n $level = $value;\n }\n }\n \n return $level;\n }", "title": "" }, { "docid": "ae43487a799599027e9d0ff76825d926", "score": "0.51906073", "text": "private function logMessageAboutLowVersion()\n {\n if (ee('Filesystem')->isDir(PATH_THIRD . 'low_variables')) {\n if (!ee()->has('logger')) {\n ee()->load->library('logger');\n }\n ee()->logger->developer(lang('low_vars_in_third_party_folder_message'), true, 1209600);\n }\n }", "title": "" }, { "docid": "3e4f56b6f841535eac2b0b834b6edadc", "score": "0.51867217", "text": "public function testEmergencyLogLevel() {\n\t\t$config = array();\n\t\t$config['display_error_details'] = true;\n\t\t$config['cors_origins'] = array('testurl.com');\n\t\t$config['mysql'] = array();\n\t\t$config['logging'] = array('level' => 'emergency', 'maxFiles' => 12);\n\t\t$config['aws'] = array('region' => 'test-region');\n\t\t$config['baseUrl'] = 'test.com';\n\t\t$config['mail'] = array();\n\n\t\t$file = fopen(self::$filePath, 'w');\n\t\tfwrite($file, json_encode($config));\n\t\tfclose($file);\n\n\t\t$this->assertEquals(\\Monolog\\Logger::EMERGENCY, ConfigReader::getLogLevel(), \"Expected Log Level\");\n\t}", "title": "" }, { "docid": "4d14e6507000dbd2b56dbe95261a9cc7", "score": "0.5165944", "text": "function log_message($message, $level= false, $traceback= false)\r\n{\r\n if((!$level) || (confGet('LOG_LEVEL') & $level) ) {\r\n\r\n $message =\"\\n\".$message;\r\n\r\n $prepend = \"\\nLog \" . @gmdate(\"YmdHis\") . \" \";\r\n $message = ereg_replace(\"\\n\", $prepend, $message);\r\n\r\n\r\n if(!error_log($message, 3, dirname(__FILE__).\"/../_tmp/errors.log.php\")) {\r\n trigger_error(\"log message failed\",E_USER_NOTICE);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "c34356c3cce901689716cb94391d8d36", "score": "0.510187", "text": "public function log_blocked() {\n\t\t$post_id = wp_insert_post( array(\n\t\t\t'post_title' => $this->type,\n\t\t\t'post_content' => $this->value,\n\t\t\t'post_status' => 'inherit',\n\t\t\t'post_type' => 'spamlytics_log',\n\t\t) );\n\n\t\tupdate_post_meta( $post_id, 'ip_address', $this->ip );\n\t\tupdate_post_meta( $post_id, 'type', $this->type );\n\t\tupdate_post_meta( $post_id, 'spam_type', $this->spam );\n\n\t\tif ( apply_filters( 'spamlytics_block_exit', true ) ) {\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "32c96db8a9ea4a1b147a04df5db93fcb", "score": "0.5082225", "text": "public function fatal($log_content){\n $this->write_log($log_content, \"FATAL\");\n }", "title": "" }, { "docid": "c69f01551fcb2d692627cf15a6cb7c81", "score": "0.5079418", "text": "public static function logDie($msg='')\n\t{\n\t\tif (true === self::getConfig('do_logging'))\n\t\t{\n\t\t\tGWF_Log::logCritical($msg);\n\t\t}\n\t\tdie(htmlspecialchars($msg)); # FIXME: dont die here, raise global GWF_Exception\n\t}", "title": "" }, { "docid": "ec195fbedd78960e8efe8b139e0fc5a5", "score": "0.50618356", "text": "static function debug ($msg) {\n file_put_contents(\"/tmp/overlay.log\", $msg . \"\\n\", FILE_APPEND);\n return;\n }", "title": "" }, { "docid": "2a0d735d1b9749b670c5d2130b8c2493", "score": "0.5055779", "text": "private function critical_error($message){\n if (MMRPG_CONFIG_IS_LIVE){\n $file = fopen(dirname(MMRPG_CONFIG_ROOTDIR).'/logs/mmrpg-database-errors_'.date('Y-m-d').'.txt', 'a');\n fwrite($file, date('Y-m-d @ H:i:s').' ('.$_SERVER['REMOTE_ADDR'].') : '.$message.\"\\r\\n\\r\\n\");\n fclose($file);\n } else {\n echo('<pre style=\"display: block; clear: both; float: none; background-color: #f2f2f2; color: #292929; text-shadow: 0 0 0 transparent; white-space: normal; padding: 10px; text-align: left;\">'.$message.'</pre>');\n }\n return false;\n }", "title": "" }, { "docid": "ad573ed9cb8665ad53113608f2b42e38", "score": "0.5043707", "text": "public function emerg( string $channel, string $message, array $context = [] ) {\n\t\treturn $this->log( $channel, Logger::EMERGENCY, $message, $context );\n\t}", "title": "" }, { "docid": "57ee3a006a67190de7de5d9457ea172e", "score": "0.50325084", "text": "private function log($msg) {\r\n error_log('auth_ahea: ' . $msg);\r\n }", "title": "" }, { "docid": "e9435f5fbfd504f212e9b69f1597d73e", "score": "0.5024457", "text": "private function logMsg() {\n\n //log our error message to our log file\n $arr = $this->logData;\n\n if ($this->mode==\"db\") $this->logToDB($arr);\n elseif ($this->mode==\"xml\") $this->logToXML($arr);\n elseif ($this->mode==\"file\") $this->logToFile($arr);\n\n }", "title": "" }, { "docid": "cef5cae127d70fa026b114ed39f5b647", "score": "0.5016772", "text": "public function setup_notices()\n {\n }", "title": "" }, { "docid": "eac76600b9a8725f19c421a01dd031e7", "score": "0.50138485", "text": "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\r\n\t\r\n// Build the error message.\r\n$message = \"<br /><br /><p>An error occurred in script '$e_file' on line $e_line: $e_message \\n <br />\";\r\n\r\n// Add the date and time:\r\n$message .= \"Date/Time: \" . date('n-j-Y\r\nH:i:s') . \"\\n<br />\";\r\n\r\n// Append $e_vars to the $message:\r\n$message .= \"<pre>\" . print_r ($e_vars,1) . \"</pre>\\n</p>\";\r\n\r\nif (!LIVE) { \t// Development (print the error).\r\n\r\n\t \techo '<div id=\"Error\">'.$message.'</div><br />';\r\n\r\n} else { \t// Don't show the error:\r\n\r\n// Send an email to the admin:\r\n\r\nmail(EMAIL, 'Site Error!', $message, 'From: jhenetic@gmail.com');\r\n\r\n// Only print an error message if the error isn't a notice:\r\n\r\nif ($e_number != E_NOTICE) {\r\n\t\r\n\techo '<div id=\"Error\">A system error occurred. We apologize for the inconvenience.</div><br />';\r\n\t\t\r\n\t\t}\r\n\t} // End of !LIVE IF.\r\n\t\r\n}", "title": "" }, { "docid": "6f84cf95ca96523983c118eb790a922b", "score": "0.50104326", "text": "public function output_notices()\n {\n }", "title": "" }, { "docid": "f8eb8059a8091a58fc3501e8c539b096", "score": "0.49969456", "text": "function ei8_xmlrpc_admin_log( $msg, $level=2 ) {\n global $ei8_xmlrpc_debug;\n if( $level<2 || isset($ei8_xmlrpc_debug) ) {\n //$logMsg .= $msg;\n update_site_option('ei8_xmlrpc_admin_log', ei8_xmlrpc_get_blog_option('ei8_xmlrpc_admin_log') . $msg);\n }\n}", "title": "" }, { "docid": "0b4612ddb5865a0e55d1513346d9e632", "score": "0.49740788", "text": "public function write( $level ){ /* PHP CODE FOR SAVE LOG MESSAGE */ }", "title": "" }, { "docid": "fc2a88c65c74fb5780a56284392e12b8", "score": "0.49698198", "text": "function eh($type, $msg, $file, $line, $context)\n\t{\n\t\t//this function will need further development\n\t\tif($type==8){\n\t\t}else{\n\t\t\techo $type . \"<br>\" . $msg . \"<br>\" . $file . \"<br>\" . $line . \"<br>\" . $context;\n\t\t}\n\t}", "title": "" }, { "docid": "552ebf1a2fee3a2215192c4b6630707e", "score": "0.49651977", "text": "function elog($string) { error_log($string.\"\\n\", 3, APP_LOG); }", "title": "" }, { "docid": "e616bd7c9b1a6b46cb3cff645decfa27", "score": "0.4958071", "text": "protected function _write($event) {\n\n parent::_write($event);\n\n if( Mage::helper('newrelic')->isEnabled() == false || Mage::helper('newrelic')->isLogErrorEnabled() == false) {\n return $this;\n }\n\n //send only ERR or more critical log to new relic\n try {\n if ( array_key_exists('priority', $event) && intval( $event['priority'] ) <=self::DEFAULT_LOG_PRIORITY_LEVEL ) {\n $name = array_key_exists('priorityName',$event)?$event['priorityName']:$event['priority'];\n Mage::helper('newrelic')->getClient()->noticeError('['.$name.'] =>' .$event['message']);\n }\n } catch (Exception $e) {\n //do nothing to avoid infinite loop\n }\n\n }", "title": "" }, { "docid": "82ef821eebee637958ec662e056bad69", "score": "0.49451122", "text": "protected static function out($msg, $level = self::LEVEL_DEBUG, $forbidDelay = FALSE)\r\n\t{\r\n\t\t$output = TRUE;\r\n\t\t$is_tty = posix_isatty(STDOUT);\r\n\t\tswitch ($level)\r\n\t\t{\r\n\t\tcase self::LEVEL_DEBUG: $lname = 'Debug'; $loglevel = Fuel::L_DEBUG; $output = self::DEBUG_MODE || $is_tty; break;\r\n\t\tcase self::LEVEL_NOTICE: $lname = 'Notice'; $loglevel = $lname; $output = self::DEBUG_MODE || $is_tty; break;\r\n\t\tcase self::LEVEL_WARNING: $lname = 'Warning'; $loglevel = $lname; $output = TRUE; break;\r\n\t\tcase self::LEVEL_ERROR: $lname = 'Error'; $loglevel = Fuel::L_ERROR; $output = TRUE; break;\r\n\t\t}\r\n\t\tLog::write($loglevel, 'Harvester: '.$msg);\r\n\t\t\r\n\t\tif ($output)\r\n\t\t{\r\n\t\t\tif ($is_tty)\r\n\t\t\t\techo $lname,': ',$msg,\"\\n\";\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tself::$messages[] = $msg;\r\n\t\t\t\t\r\n\t\t\t\tif ($forbidDelay)\r\n\t\t\t\t{\r\n\t\t\t\t\t$app = Config::load('app');\r\n\t\t\t\t\t$shortMsg = str_replace(array(\"\\n\",\"\\r\",\"\\t\",' '), ' ', substr($msg, 0, 20));\r\n\t\t\t\t\tif (strlen($msg) > 20) $shortMsg .= '...';\r\n\t\t\t\t\t$subject = $app['name'].' harvester'.(self::DEBUG_MODE ? ' (debug mode)' : '').': '.$lname.': '.$shortMsg;\r\n\t\t\t\t\t\r\n\t\t\t\t\tself::sendMail($subject);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "01acffde618b1c244bedabc977ad1641", "score": "0.49431038", "text": "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n\t// Build the error message:\n\t$message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\t\n\t// Add the date and time:\n\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\t\n\tif (!LIVE) { // Development (print the error).\n\n\t\t// Show the error message:\n\t\techo '<div class=\"error\">' . nl2br($message);\n\t\n\t\t// Add the variables and a backtrace:\n\t\techo '<pre>' . print_r ($e_vars, 1) . \"\\n\";\n\t\tdebug_print_backtrace();\n\t\techo '</pre></div>';\n\t\t\n\t} else { // Don't show the error:\n\n\t\t// Send an email to the admin:\n\t\t$body = $message . \"\\n\" . print_r ($e_vars, 1);\n\t\tmail(EMAIL, 'Site Error!', $body, 'From: email@example.com');\n\t\n\t\t// Only print an error message if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\n\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n\t\t}\n\t} // End of !LIVE IF.\n\n}", "title": "" }, { "docid": "01acffde618b1c244bedabc977ad1641", "score": "0.49431038", "text": "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n\t// Build the error message:\n\t$message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\t\n\t// Add the date and time:\n\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\t\n\tif (!LIVE) { // Development (print the error).\n\n\t\t// Show the error message:\n\t\techo '<div class=\"error\">' . nl2br($message);\n\t\n\t\t// Add the variables and a backtrace:\n\t\techo '<pre>' . print_r ($e_vars, 1) . \"\\n\";\n\t\tdebug_print_backtrace();\n\t\techo '</pre></div>';\n\t\t\n\t} else { // Don't show the error:\n\n\t\t// Send an email to the admin:\n\t\t$body = $message . \"\\n\" . print_r ($e_vars, 1);\n\t\tmail(EMAIL, 'Site Error!', $body, 'From: email@example.com');\n\t\n\t\t// Only print an error message if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\n\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n\t\t}\n\t} // End of !LIVE IF.\n\n}", "title": "" }, { "docid": "01acffde618b1c244bedabc977ad1641", "score": "0.49431038", "text": "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n\t// Build the error message:\n\t$message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\t\n\t// Add the date and time:\n\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\t\n\tif (!LIVE) { // Development (print the error).\n\n\t\t// Show the error message:\n\t\techo '<div class=\"error\">' . nl2br($message);\n\t\n\t\t// Add the variables and a backtrace:\n\t\techo '<pre>' . print_r ($e_vars, 1) . \"\\n\";\n\t\tdebug_print_backtrace();\n\t\techo '</pre></div>';\n\t\t\n\t} else { // Don't show the error:\n\n\t\t// Send an email to the admin:\n\t\t$body = $message . \"\\n\" . print_r ($e_vars, 1);\n\t\tmail(EMAIL, 'Site Error!', $body, 'From: email@example.com');\n\t\n\t\t// Only print an error message if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\n\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n\t\t}\n\t} // End of !LIVE IF.\n\n}", "title": "" }, { "docid": "2c5e816c1abc8381e0518eb4dcc3fe73", "score": "0.49185854", "text": "public function failureLog($message) {\n }", "title": "" }, { "docid": "4f399dc84d23268d4c5f1abc139487cd", "score": "0.49150166", "text": "private static function fatal($msg, $level=E_USER_ERROR) {\n list($c, $b) = debug_backtrace(false); // $c - caller; $b - c-of-c\n // $d = first_non_framework LoC\n trigger_error(\"$msg\\n\".\n \" $b[class]$b[type]$b[function](\".substr(substr(json_encode($b[\"args\"]),1,-1),0, 240).\")\\n\".\n \" $c[file]:$c[line]\\n\".\n \" $b[file]:$b[line]\\n\",\n $level);\n die;\n }", "title": "" }, { "docid": "b1c84e9c3a917309664edc873b4a6bb0", "score": "0.4910318", "text": "function prxoclinicerror(){\n $replace['body'] = $this->build_template($this->get_template(\"prxoclinicerror\"));\n\t\t\t$this->output = $this->build_template($this->get_template(\"main\"),$replace); \n }", "title": "" }, { "docid": "bd41c754df213a8211ed431176b849e9", "score": "0.4900706", "text": "abstract protected function getLogMessage();", "title": "" }, { "docid": "2e0ae1ee503cb8d888625ed9655f6ad6", "score": "0.489348", "text": "function error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n $message = \"An error occured in script '$e_file' on line '$e_line:\\n$e_message\\n\";\n $message .= \"<pre>\" . print_r(debug_backtrace(), 1) . \"</pre>\\n\";\n if (!LIVE) {\n echo '<div class=\"alert alert-danger\">' . nl2br($message) . '</div>';\n } else {\n error_log($message, 1, 'savannah@savannahskinner.com', 'From: bpa_development');\n // include_once './assets/includes/error.html';\n } //END of $live IF-ELSE\n return true;\n\n}", "title": "" }, { "docid": "7d293ca4e64a35a465e6746a574f42cf", "score": "0.4889811", "text": "function critical($text, $die = false)\n {\n error($text);\n }", "title": "" }, { "docid": "9f4bf94cc264a391af7835503209ef1c", "score": "0.4886211", "text": "abstract function getErrorLogMessage();", "title": "" }, { "docid": "c71209780699b5dbc3b21ca3e2ee1917", "score": "0.4872557", "text": "function errorAndDie($error_msg) {\n global $dateForm;\n $debug_file = ROOT.DS.'logs/reports.txt';\n if (!empty($debug_file)) {\n $report = 'Error: '.$dateForm.' | '.$error_msg.PHP_EOL; \n WRITE($debug_file,$report,\"a\");\n die('Error: '.$error_msg);\n }\n }", "title": "" }, { "docid": "3455c839c516e51b50add2897ce55f90", "score": "0.48600066", "text": "function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '')\n{\n\tglobal $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images;\n\tglobal $userdata, $user_ip, $session_length;\n\tglobal $starttime, $plus_config;\n\tglobal $HTTP_COOKIE_VARS;\n\t//-- mod : categories hierarchy --------------------------------------------------------------------\n//-- add\n\tglobal $tree;\n//-- fin mod : categories hierarchy ----------------------------------------------------------------\n\n//+MOD: Fix message_die for multiple errors MOD\n\tstatic $msg_history;\n\tif( !isset($msg_history) )\n\t{\n\t\t$msg_history = array();\n\t}\n\t$msg_history[] = array(\n\t\t'msg_code'\t=> $msg_code,\n\t\t'msg_text'\t=> $msg_text,\n\t\t'msg_title'\t=> $msg_title,\n\t\t'err_line'\t=> $err_line,\n\t\t'err_file'\t=> $err_file,\n\t\t'sql'\t\t=> $sql\n\t);\n//-MOD: Fix message_die for multiple errors MOD\n\n\tif(defined('HAS_DIED'))\n\t{\n\t\t//+MOD: Fix message_die for multiple errors MOD\n\n\t\t//\n\t\t// This message is printed at the end of the report.\n\t\t// Of course, you can change it to suit your own needs. ;-)\n\t\t//\n\t\t$custom_error_message = 'Please, contact the %swebmaster%s. Thank you.';\n\t\tif ( !empty($board_config) && !empty($board_config['board_email']) )\n\t\t{\n\t\t\t$custom_error_message = sprintf($custom_error_message, '<a href=\"mailto:' . $board_config['board_email'] . '\">', '</a>');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$custom_error_message = sprintf($custom_error_message, '', '');\n\t\t}\n\t\techo \"<html>\\n<body>\\n<b>Critical Error!</b><br />\\nmessage_die() was called multiple times.<br />&nbsp;<hr />\";\n\t\tfor( $i = 0; $i < count($msg_history); $i++ )\n\t\t{\n\t\t\techo '<b>Error #' . ($i+1) . \"</b>\\n<br />\\n\";\n\t\t\tif( !empty($msg_history[$i]['msg_title']) )\n\t\t\t{\n\t\t\t\techo '<b>' . $msg_history[$i]['msg_title'] . \"</b>\\n<br />\\n\";\n\t\t\t}\n\t\t\techo $msg_history[$i]['msg_text'] . \"\\n<br /><br />\\n\";\n\t\t\tif( !empty($msg_history[$i]['err_line']) )\n\t\t\t{\n\t\t\t\techo '<b>Line :</b> ' . $msg_history[$i]['err_line'] . '<br /><b>File :</b> ' . $msg_history[$i]['err_file'] . \"</b>\\n<br />\\n\";\n\t\t\t}\n\t\t\tif( !empty($msg_history[$i]['sql']) )\n\t\t\t{\n\t\t\t\techo '<b>SQL :</b> ' . $msg_history[$i]['sql'] . \"\\n<br />\\n\";\n\t\t\t}\n\t\t\techo \"&nbsp;<hr />\\n\";\n\t\t}\n\t\techo $custom_error_message . '<hr /><br clear=\"all\">';\n\t\tdie(\"</body>\\n</html>\");\n//-MOD: Fix message_die for multiple errors MOD\n\n\t}\n\t\n\tdefine('HAS_DIED', 1);\n\t\n\n\t$sql_store = $sql;\n\t\n\t//\n\t// Get SQL error if we are debugging. Do this as soon as possible to prevent \n\t// subsequent queries from overwriting the status of sql_error()\n\t//\n\tif ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) )\n\t{\n\t\t$sql_error = $db->sql_error();\n\n\t\t$debug_text = '';\n\n\t\tif ( $sql_error['message'] != '' )\n\t\t{\n\t\t\t$debug_text .= '<br /><br />SQL Error : ' . $sql_error['code'] . ' ' . $sql_error['message'];\n\t\t}\n\n\t\tif ( $sql_store != '' )\n\t\t{\n\t\t\t$debug_text .= \"<br /><br />$sql_store\";\n\t\t}\n\n\t\tif ( $err_line != '' && $err_file != '' )\n\t\t{\n\t\t\t$debug_text .= '<br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file);\n\t\t}\n\t}\n\n\tif( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR ) )\n\t{\n\t\t$userdata = session_pagestart($user_ip, PAGE_INDEX);\n\t\tinit_userprefs($userdata);\n\t}\n\n\t//\n\t// If the header hasn't been output then do it\n\t//\n\tif ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR )\n\t{\n\t\tif ( empty($lang) )\n\t\t{\n\t\t\tif ( !empty($board_config['default_lang']) )\n\t\t\t{\n\t\t\t\tinclude($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinclude($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);\n\t\t\t}\n\t\t\t//-- mod : language settings -----------------------------------------------------------------------\n//-- add\n\t\t\tinclude($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);\n//-- fin mod : language settings -------------------------------------------------------------------\n\n\t\t}\n\n\t\tif ( empty($template) || empty($theme) )\n\t\t{\n\t\t\t$theme = setup_style($board_config['default_style']);\n\t\t}\n\n\t\t//\n\t\t// Load the Page Header\n\t\t//\n\t\tif ( !defined('IN_ADMIN') )\n\t\t{\n\t\t\tinclude($phpbb_root_path . 'includes/page_header.'.$phpEx);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude($phpbb_root_path . 'admin/page_header_admin.'.$phpEx);\n\t\t}\n\t}\n\n\tswitch($msg_code)\n\t{\n\t\tcase GENERAL_MESSAGE:\n\t\t\tif ( $msg_title == '' )\n\t\t\t{\n\t\t\t\t$msg_title = $lang['Information'];\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase CRITICAL_MESSAGE:\n\t\t\tif ( $msg_title == '' )\n\t\t\t{\n\t\t\t\t$msg_title = $lang['Critical_Information'];\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase GENERAL_ERROR:\n\t\t\tif ( $msg_text == '' )\n\t\t\t{\n\t\t\t\t$msg_text = $lang['An_error_occured'];\n\t\t\t}\n\n\t\t\tif ( $msg_title == '' )\n\t\t\t{\n\t\t\t\t$msg_title = $lang['General_Error'];\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase CRITICAL_ERROR:\n\t\t\t//\n\t\t\t// Critical errors mean we cannot rely on _ANY_ DB information being\n\t\t\t// available so we're going to dump out a simple echo'd statement\n\t\t\t//\n\t\t\tinclude($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);\n\n\t\t\tif ( $msg_text == '' )\n\t\t\t{\n\t\t\t\t$msg_text = $lang['A_critical_error'];\n\t\t\t}\n\n\t\t\tif ( $msg_title == '' )\n\t\t\t{\n\t\t\t\t$msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>';\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\t//\n\t// Add on DEBUG info if we've enabled debug mode and this is an error. This\n\t// prevents debug info being output for general messages should DEBUG be\n\t// set TRUE by accident (preventing confusion for the end user!)\n\t//\n\tif ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) )\n\t{\n\t\tif ( $debug_text != '' )\n\t\t{\n\t\t\t$msg_text = $msg_text . '<br /><br /><b><u>DEBUG MODE</u></b>' . $debug_text;\n\t\t}\n\t}\n\n\tif ( $msg_code != CRITICAL_ERROR )\n\t{\n\t\tif ( !empty($lang[$msg_text]) )\n\t\t{\n\t\t\t$msg_text = $lang[$msg_text];\n\t\t}\n\n\t\tif ( !defined('IN_ADMIN') )\n\t\t{\n\t\t\t$template->set_filenames(array(\n\t\t\t\t'message_body' => 'message_body.tpl')\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$template->set_filenames(array(\n\t\t\t\t'message_body' => 'admin/admin_message_body.tpl')\n\t\t\t);\n\t\t}\n\n\t\t$template->assign_vars(array(\n\t\t\t'PLUS_VERSION' => $plus_config['plus_version'],\n\t\t\t'MESSAGE_TITLE' => $msg_title,\n\t\t\t'MESSAGE_TEXT' => $msg_text)\n\t\t);\n\t\t$template->pparse('message_body');\n\n\t\tif ( !defined('IN_ADMIN') )\n\t\t{\n\t\t\tinclude($phpbb_root_path . 'includes/page_tail.'.$phpEx);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude($phpbb_root_path . 'admin/page_footer_admin.'.$phpEx);\n\t\t}\n\t}\n\telse\n\t{\n\t\techo \"<html>\\n<body>\\n\" . $msg_title . \"\\n<br /><br />\\n\" . $msg_text . \"</body>\\n</html>\";\n\t}\n\n\texit;\n}", "title": "" }, { "docid": "4a6281b49262770b17697e0d2a224e22", "score": "0.48516327", "text": "function error()\r\n {\r\n $this->merge_to_log(func_get_args());\r\n }", "title": "" }, { "docid": "9ca5496190187c95a7f7a5d5c76711b9", "score": "0.48406473", "text": "public static function fatal($data)\n\t{\n\t\t\n\t\t// Retrieve subject and body of validation email from email_text messages file\n\t\t$email_subject = Kohana::message('email_text', 'system_error_report.subject');\n\t\t$email_body = Kohana::message('email_text', 'system_error_report.body');\n \t\n\t\t// Make substitutions\n\t\t$email_body = str_replace('[USER_ID]', Session::instance()->get('user_id'), $email_body);\n\t\t$email_body = str_replace('[DTTM]', date('Y-m-d H:i:s'), $email_body);\n\t\t$email_body = str_replace('[CONTROLLER]', Request::current()->controller(), $email_body);\n\t\t$email_body = str_replace('[ACTION]', Request::current()->action(), $email_body);\n\t\t$email_body = str_replace('[PROBLEM_DESCR]', $data['problem_descr'], $email_body);\n\n\t\t// Create email object, default message to '', as we want to override it to use HTML formatting \t\n\t\t$email = Email::factory($email_subject, '')\n\t\t\t->to(Kohana::message('email_text', 'system_error_report.recipient'))\n\t\t\t->from(Kohana::message('email_text', 'system_error_report.sender'),\n\t\t\t\tKohana::message('email_text', 'system_error_report.sender_descr'));\n \t\n\t\t// Identify that email body contains HTML\n\t\t$email->message($email_body, 'text/html');\n \t\t\n\t\t// Actually send email\n\t\t$email->send();\n\t\t\t\t \t\n\t\t// All DB exceptions are fatal, redirect to sign in page and display error message\n\t\t$session = Session::instance();\n\t\t$session->delete('message');\n\t\t$session->set('error', 'SYSTEM ERROR ENCOUNTERED - system support has been notified - please try again later.');\n\n\t\t// Redirect to User/sign_in action\n\t\tHTTP::redirect('User/sign_in');\n\t\t\n\t}", "title": "" }, { "docid": "666c5c871752558dd45a5e2be19a1653", "score": "0.4817305", "text": "public function error(){\n\t\t$this->iLog(func_get_args(),__FUNCTION__);\n\t}", "title": "" }, { "docid": "2d5c7ea6051294bd31191468aee3934b", "score": "0.48088002", "text": "static public function logMsgEx($msg, $data, $level, $file, $line, $name) {\n $msgPrefix = getmypid() . \": \";\n if (!is_null($file)) {\n $msgPrefix .= basename($file) . \": \";\n }\n if (!is_null($line)) {\n $msgPrefix .= $line . \": \";\n }\n // The full message to be logged to a file, need to convert $data into a string\n $logMessage = $msgPrefix . $msg;\n if (!is_null($data)) {\n if (is_string($data)) {\n $logMessage .= \":\" . $data;\n } else {\n $logMessage .= \":\" . var_export($data, true);\n }\n }\n self::logging(Wx_LogLevel::getName($level) . \":\" . $logMessage, $name);\n }", "title": "" }, { "docid": "e403f51ced7bf755172d66329477f66d", "score": "0.4802506", "text": "public function it_creates_emergency_level_bugger()\n {\n /** * * * *\n * SETUP *\n * * * * **/\n Log::emergency('EmergencyTest');\n\n /** * * *\n * ACT *\n * * * **/\n // No action required\n\n /** * * *\n * TEST *\n * * * **/\n\n $this->assertDatabaseHas('buggers', [\n 'message' => 'EmergencyTest',\n 'level_name' => 'EMERGENCY'\n ]);\n }", "title": "" }, { "docid": "71e932e6dbfa9e028c56141cff21851f", "score": "0.47989693", "text": "function haltmsg($msg) {\n printf(\"<b>Template Error:</b> %s<br>\\n\", $msg);\n }", "title": "" }, { "docid": "5843593a19590c57fbc47d8609d38299", "score": "0.47959483", "text": "public function alert(){\n\t\t$this->iLog(func_get_args(),__FUNCTION__);\n\t}", "title": "" }, { "docid": "47e93d170ea865d123c7b0d0b9d305d3", "score": "0.47952056", "text": "public function log_process_exception($e)\n {\n // Get message\n $message = $e->getMessage();\n\n // Try to decode the message\n $message_decoded = maybe_unserialize($message);\n\n // Log simple message\n if (is_string($message_decoded)) {\n $this->log_add($message);\n }\n\n // Log additional data\n else {\n\n $this->log_add(__('REQUEST: ', 'woochimp') . $message_decoded['request_to']);\n\n if (!empty($message_decoded['request'])) {\n $this->log_add($message_decoded['request']);\n }\n\n $this->log_add(__('RESPONSE: ', 'woochimp') . $message_decoded['message']);\n\n if (!empty($message_decoded['response'])) {\n $this->log_add($message_decoded['response']);\n }\n }\n }", "title": "" }, { "docid": "dccabcc6ec5d16d179a8a34dda7cc8e4", "score": "0.479452", "text": "function dieFastDevel($msg)\r\n{\r\n include(LOGS_PATH.\"dieFastDevel.php\");\r\n exit;\r\n}", "title": "" }, { "docid": "6ed62acb5370936253efcb1b59688296", "score": "0.47885588", "text": "private function log($msg)\n {\n $msg = PHP_EOL . '========[ ' . date('Y-m-d H:i:s') . ' ]========' . PHP_EOL . $msg . PHP_EOL . str_repeat('=', 39) . PHP_EOL;\n file_put_contents($this->patch_dir . $this->patch_file, $msg, FILE_APPEND);\n }", "title": "" }, { "docid": "05b87efb635cffb4a0c648766d9203e1", "score": "0.47758391", "text": "function LogError($descr=\"\",$msg=\"\"){\n\tif(trim($descr) == \"\" && trim($msg) == \"\")return;\n\tglobal $dbo;\n\t $inst = $dbo->InsertID(\"paymentlog_tb\",[\"Description\"=>$descr,\"Message\"=>$msg,\"Type\"=>\"ETRANZACT_DUMP\"]);\n\t exit($msg);\n}", "title": "" }, { "docid": "49246ac280c0585758413e586aaaada6", "score": "0.47746456", "text": "function report_log_post()\n {\n $message = $this->post('message');\n $this->writeErrorLog(date('Ymd'), $message);\n\n $this->response(RestSuccess(), SUCCESS_CODE);\n }", "title": "" }, { "docid": "06454de325450c764a8e57f431e3d8b1", "score": "0.4767717", "text": "public function warning(){\n\t\t$this->iLog(func_get_args(),__FUNCTION__);\n\t}", "title": "" }, { "docid": "45d9f08d57cd6786b46d0acc79cb780f", "score": "0.47659415", "text": "function dbg_err($msg){\n global $debug_db,$debug_log;\n\n if(!$debug_log) print(\"<p><b>\".$msg.\"</b></p>\"); \n else {\n accum_file($debug_log,\"trace error $msg\\n\");\n }\n dbg_tr();\n\n }", "title": "" }, { "docid": "98cbaabf28202095c162cebc55984283", "score": "0.47655368", "text": "function errorHandler($level, $message, $file, $line, $context) {\n if($level === E_USER_ERROR || $level === E_USER_WARNING || $level === E_USER_NOTICE) {\n echo '<strong>Error:</strong><br />'.$message;\n\t\t//if ($level === E_USER_ERROR) die();\n return(true); //And prevent the PHP error handler from continuing\n }\n return(false); //Otherwise, use PHP's error handler\n}", "title": "" }, { "docid": "a08820f63a8ac5e00560b7a2326d261b", "score": "0.47627863", "text": "function log($level, $msg) {\n if($level >= $this->level) {\n $datestamp = '[' . date(self::$dateformat) . ']';\n $levelstamps = array_flip($this->levels);\n $levelstamp = '[' . $levelstamps[$this->level] . ']';\n\n fwrite($this->file, \"$datestamp $levelstamp $msg \\n\");\n }\n }", "title": "" }, { "docid": "35fe3711b5333dd1c08774bf3509c4c9", "score": "0.47605142", "text": "function internal_error_POST($args)\n {\n global $DB, $cdatas, $api;\n\n if (!checkargs($args, array('description', 'judgehostlog', 'disabled'))) {\n return '';\n }\n\n // Both cid and judgingid are allowed to be NULL.\n $cid = @$args['cid'];\n $judgingid = @$args['judgingid'];\n\n // group together duplicate internal errors\n // note that it may be good to be able to ignore fields here, e.g. judgingid with compile errors\n $errorid = $DB->q('MAYBEVALUE SELECT errorid FROM internal_error\n WHERE description=%s AND disabled=%s AND status=%s' .\n (isset($cid) ? ' AND cid=%i' : '%_'),\n $args['description'], $args['disabled'], 'open', $cid);\n\n if (isset($errorid)) {\n // FIXME: in some cases it makes sense to extend the known information, e.g. the judgehostlog\n return $errorid;\n }\n\n $errorid = $DB->q('RETURNID INSERT INTO internal_error\n (judgingid, cid, description, judgehostlog, time, disabled)\n VALUES (%i, %i, %s, %s, %i, %s)',\n $judgingid, $cid, $args['description'],\n $args['judgehostlog'], now(), $args['disabled']);\n\n $disabled = dj_json_decode($args['disabled']);\n // disable what needs to be disabled\n set_internal_error($disabled, $cid, 0);\n if (in_array($disabled['kind'], array('problem', 'language', 'judgehost')) && isset($args['judgingid'])) {\n // give back judging if we have to\n give_back_judging($args['judgingid']);\n }\n\n return $errorid;\n }", "title": "" }, { "docid": "ec78184d2838669dcb850f0aaf53793a", "score": "0.47579992", "text": "public function humane_error()\n\t{\n\t\t$trace = $this->getTrace();\n\t\t$trace1 = reset( $trace );\n\n\t\t$file = isset( $trace1['file'] ) ? $trace1['file'] : $this->getFile();\n\t\t$line = isset( $trace1['line'] ) ? $trace1['line'] : $this->getLine();\n\n\t\treturn _t( '%1$s in %2$s line %3$s on request of \"%4$s\"', array( $this->getMessage(), $file, $line, $_SERVER['REQUEST_URI'] ) );\n\t}", "title": "" }, { "docid": "00a2baaee4885a6507f4ce7001a856c7", "score": "0.47538638", "text": "function bd_log($text, $level='i', $clazz) {\r\n\t$LOG_FILE = $_SERVER['DOCUMENT_ROOT'] . \"/logs/buondeal.log\";\r\n switch (strtolower($level)) {\r\n case 'e':\r\n case 'error':\r\n $level='ERROR';\r\n break;\r\n case 'i':\r\n case 'info':\r\n $level='INFO';\r\n break;\r\n case 'd':\r\n case 'debug':\r\n $level='DEBUG';\r\n break;\r\n default:\r\n $level='INFO';\r\n }\r\n error_log(date(\"[Y-m-d H:i:s]\").\"\\t[\".$level.\"]\\t[\".$clazz.\"]\\t\".$text.\"\\n\", 3, $LOG_FILE);\r\n}", "title": "" }, { "docid": "5ca40353139de4e85a7f04ca5e3d4f16", "score": "0.4747423", "text": "public function Warning($content)\n {\n $this->addMessage('warning', $content);\n }", "title": "" }, { "docid": "5891978df8a80f4c37a38339669213c8", "score": "0.47460473", "text": "function error_handler($errno, $errstr, $errfile, $errline) {\n global $LOG;\n if($errno == E_WARNING) {\n\t$LOG->message(\"Warning. File: $errfile, Line: $errline. $errstr\");\n// \tthrow new Exception($errstr);\n } else if($errno == E_NOTICE) {\n// throw new Exception($errstr);\n\t$LOG->message(\"Notice. File: $errfile, Line: $errline. $errstr\");\n\texit;\n }\n}", "title": "" }, { "docid": "ef2cc9ad660cde3460cd85a6326dd3be", "score": "0.47446057", "text": "function ee($msg)\n{\n\tpe($msg);\n\texit;\n}", "title": "" }, { "docid": "d229b9ce83f3ecf097c9fe75c0418ca0", "score": "0.47387564", "text": "function log_emergency(string $message = '', $context = [], $name = null)\n {\n if (Logger::isName($context, $name)) {\n $name = $context;\n $context = [];\n }\n\n $logger = \\logger_instance($name);\n if ($logger instanceof LoggerInterface)\n return $logger->emergency($message, $context);\n }", "title": "" }, { "docid": "eac2dc8c7ce6b1e997b9ac910584a484", "score": "0.47364768", "text": "public function __construct()\n {\n parent::__construct(\"[%datetime%]: [%level_name%]: %message%\\n%context%\\n\", 'Y-m-d H:i:s', true, true);\n }", "title": "" }, { "docid": "03d575bf74190bbdf89cfe695ae737d4", "score": "0.47319433", "text": "public function critical(){\n\t\t$this->iLog(func_get_args(),__FUNCTION__);\n\t}", "title": "" }, { "docid": "d4c35c65fabac0d2cea0853354d17159", "score": "0.4731046", "text": "private function error_log( $msg ) {\n\t \tif( self::LOGGING )\n\t \t\terror_log( $msg . \"\\n\", 3, $this->logFilePath );\n\t }", "title": "" }, { "docid": "c8fe7d7268cc28062ded8770b40e1234", "score": "0.47289938", "text": "public function it_creates_alert_level_bugger()\n {\n /** * * * *\n * SETUP *\n * * * * **/\n Log::alert('AlertTest');\n\n /** * * *\n * ACT *\n * * * **/\n // No action required\n\n /** * * *\n * TEST *\n * * * **/\n $this->assertDatabaseHas('buggers', [\n 'message' => 'AlertTest',\n 'level_name' => 'ALERT'\n ]);\n }", "title": "" }, { "docid": "7c5d01f242660bf041d936be58edf7bb", "score": "0.47181505", "text": "public function sysLog($message, $severity = 0);", "title": "" }, { "docid": "feaf0a30caa5d7e4e5627e4b50c70b66", "score": "0.47172645", "text": "public function emerg($message, array $context = array())\n {\n return $this->addRecord(static::EMERGENCY, $message, $context);\n }", "title": "" }, { "docid": "9597678e76453d7ecd38479b37bd9057", "score": "0.47124186", "text": "public function error_handler($msg)\n {\n if ($this->is_debug) {\n add_action('wp_head', function () use ($msg) {\n echo \"\\n<!-- $msg --> \\n\\n\";\n });\n }\n error_log($msg);\n }", "title": "" }, { "docid": "60462951350e62ba990d141249bdba7b", "score": "0.47114438", "text": "private function __logError() {\n\t\t$_log_dir = $rcmail->config->get('log_dir');\n file_put_contents($_log_dir.'/'.$this->_logs_file, date(\"Y-m-d H:i:s\").\"|\".$_SERVER['HTTP_X_FORWARDED_FOR'].\"|\".$_SERVER['REMOTE_ADDR'].\"\\n\", FILE_APPEND);\n }", "title": "" }, { "docid": "c5cbef6a2ca5555a4e4bde11758cf429", "score": "0.471005", "text": "private function audit($msg)\n {\n // Log the message if enabled\n if ($this->app['config']->get('general/debug_permission_audit_mode', false)) {\n $this->app['logger.system']->info($msg, ['event' => 'authentication']);\n }\n }", "title": "" }, { "docid": "70eb6e31ffc7f699dd0433b63d1a2cbf", "score": "0.47067827", "text": "function mlog($msg,$prio = 0) {\r\n if ($prio >= LPRIO){\r\n \t $ts = date(DATE_RFC2822);\r\n \t file_put_contents(LOG, $ts . \" : \" . $msg . PHP_EOL, FILE_APPEND);\r\n }\r\n }", "title": "" }, { "docid": "3400ddb84cf639c8a7756a45851fe10d", "score": "0.47053888", "text": "public function emerg($data, $forceLog = null)\n {\n return $this->log($data, Zend_Log::EMERG, $forceLog);\n }", "title": "" }, { "docid": "d7b3f1ba45e686caeae363f607935271", "score": "0.46974212", "text": "function assert_fatal($condition, $message)\n{\n if (!$condition)\n {\n RENDERER::setStatus(500);\n LOG::event(\"FATAL\", $message);\n header(\"HTTP/1.1 500 Internal Server Error\");\n echo '<h1>500 - Internal Server Error</h1>';\n echo '<p><b>FATAL:</b> ' . htmlentities($message) . '</p>';\n yapf_exit();\n }\n}", "title": "" }, { "docid": "420d4cd5f65f0e5538633343e45f1b8a", "score": "0.46952266", "text": "public function logInternal($message, $type, $time, $context)\n {\n// var_dump($type);\n switch ($type) {\n case Logger::CRITICAL:\n case Logger::ALERT:\n case Logger::ERROR:\n $this->client->error($message, $this->module);\n break;\n case Logger::WARNING:\n $this->client->warn($message, $this->module);\n break;\n case Logger::DEBUG:\n $this->client->debug($message, $this->module);\n break;\n case Logger::CUSTOM:\n case Logger::SPECIAL:\n case Logger::INFO:\n $this->client->info($message, $this->module);\n break;\n default:\n $this->client->info($message, $this->module);\n }\n }", "title": "" }, { "docid": "1be662a039e1a3e44dd6e3a7fcfd03d5", "score": "0.46948734", "text": "function gwwus_admin_import_notice() {\n}", "title": "" }, { "docid": "f8eea99db23f1346080ac2875f56cbef", "score": "0.4685902", "text": "function Report($msg)\n\t{\n\t\t//basically the CLI Arguments.\n\t\tglobal $file_name,$device_id,$comm_id,$error,$cid_number,$cid_name;\n\t\t\n\t\t$server = `hostname`;\n\t\tthrow new CondorException(\"$msg\n\t\t\tServer: $server\n\t\t\tFile: $file_name\n\t\t\tDevice: $device_id\n\t\t\tComm Id: $comm_id\n\t\t\tError: $error\n\t\t\tCID Number: $cid_number\n\t\t\tCID Name: $cid_name\n\t\t\",CondorException::ERROR_HYLAFAX);\n\t}", "title": "" }, { "docid": "35ea431b86746f0098f6b651acfece87", "score": "0.46831727", "text": "function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '')\n{\n\tglobal $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images;\n\tglobal $userdata, $user_ip, $session_length;\n\tglobal $starttime;\n\n//-- mod : the logger ----------------------------------------------------------\n//-- add\n\tglobal $log;\n//-- fin mod : the logger ------------------------------------------------------\n\n//-- mod : rank color system ---------------------------------------------------\n//-- add\n\tglobal $get;\n//-- fin mod : rank color system -----------------------------------------------\n\n//-- mod : fix message_die for multiple errors ---------------------------------\n//-- add\n\tstatic $msg_history;\n\tif( !isset($msg_history) )\n\t{\n\t\t$msg_history = array();\n\t}\n\t$msg_history[] = array(\n\t\t'msg_code'\t=> $msg_code,\n\t\t'msg_text'\t=> $msg_text,\n\t\t'msg_title'\t=> $msg_title,\n\t\t'err_line'\t=> $err_line,\n\t\t'err_file'\t=> $err_file,\n\t\t'sql'\t\t=> $sql\n\t);\n//-- fin mod : fix message_die for multiple errors -----------------------------\n\n\tif(defined('HAS_DIED'))\n\t{\n//-- mod : fix message_die for multiple errors ---------------------------------\n//-- delete\n/*-MOD\n\t\tdie('message_die() was called multiple times. This is not supposed to happen. Was message_die() used in page_tail.php?');\nMOD-*/\n//-- add\n\t\t$custom_error_message = 'Please, contact the %swebmaster%s. Thank you.';\n\t\tif ( !empty($board_config) && !empty($board_config['board_email']) )\n\t\t{\n\t\t\t$custom_error_message = sprintf($custom_error_message, '<a href=\"mailto:' . $board_config['board_email'] . '\">', '</a>');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$custom_error_message = sprintf($custom_error_message, '', '');\n\t\t}\n\t\techo \"<html>\\n<body>\\n<b>Critical Error!</b><br />\\nmessage_die() was called multiple times.<br />&nbsp;<hr />\";\n\t\tfor( $i = 0; $i < count($msg_history); $i++ )\n\t\t{\n\t\t\techo '<b>Error #' . ($i+1) . \"</b>\\n<br />\\n\";\n\t\t\tif( !empty($msg_history[$i]['msg_title']) )\n\t\t\t{\n\t\t\t\techo '<b>' . $msg_history[$i]['msg_title'] . \"</b>\\n<br />\\n\";\n\t\t\t}\n\t\t\techo $msg_history[$i]['msg_text'] . \"\\n<br /><br />\\n\";\n\t\t\tif( !empty($msg_history[$i]['err_line']) )\n\t\t\t{\n\t\t\t\techo '<b>Line :</b> ' . $msg_history[$i]['err_line'] . '<br /><b>File :</b> ' . $msg_history[$i]['err_file'] . \"</b>\\n<br />\\n\";\n\t\t\t}\n\t\t\tif( !empty($msg_history[$i]['sql']) )\n\t\t\t{\n\t\t\t\techo '<b>SQL :</b> ' . $msg_history[$i]['sql'] . \"\\n<br />\\n\";\n\t\t\t}\n\t\t\techo \"&nbsp;<hr />\\n\";\n\t\t}\n\t\techo $custom_error_message . '<hr /><br clear=\"all\">';\n\t\tdie(\"</body>\\n</html>\");\n//-- fin mod : fix message_die for multiple errors -----------------------------\n\t}\n\t\n\tdefine('HAS_DIED', 1);\n\t\n\n\t$sql_store = $sql;\n\t\n\t//\n\t// Get SQL error if we are debugging. Do this as soon as possible to prevent \n\t// subsequent queries from overwriting the status of sql_error()\n\t//\n\tif ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) )\n\t{\n\t\t$sql_error = $db->sql_error();\n\n\t\t$debug_text = '';\n\n\t\tif ( $sql_error['message'] != '' )\n\t\t{\n\t\t\t$debug_text .= '<br /><br />SQL Error : ' . $sql_error['code'] . ' ' . $sql_error['message'];\n\t\t}\n\n\t\tif ( $sql_store != '' )\n\t\t{\n\t\t\t$debug_text .= '<br /><br />' . $sql_store;\n\t\t}\n\n\t\tif ( $err_line != '' && $err_file != '' )\n\t\t{\n\t\t\t$debug_text .= '<br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file);\n\t\t}\n\t}\n\n\tif( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR ) )\n\t{\n\t\t$userdata = session_pagestart($user_ip, PAGE_INDEX);\n\t\tinit_userprefs($userdata);\n\t}\n\n\t//\n\t// If the header hasn't been output then do it\n\t//\n\tif ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR )\n\t{\n\t\tif ( empty($lang) )\n\t\t{\n\t\t\tif ( !empty($board_config['default_lang']) )\n\t\t\t{\n\t\t\t\tinclude($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinclude($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);\n\t\t\t}\n//-- mod : language settings -----------------------------------------------------------------------\n//-- add\n\t\t\tinclude($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);\n//-- fin mod : language settings -------------------------------------------------------------------\n\t\t}\n\n\t\tif ( empty($template) || empty($theme) )\n\t\t{\n\t\t\t$theme = setup_style($board_config['default_style']);\n\t\t}\n\n//-- mod : keep unread flags ---------------------------------------------------\n//-- add\n\t\t$toggle_unreads_link = false;\n//-- fin mod : keep unread flags -----------------------------------------------\n\n\t\t//\n\t\t// Load the Page Header\n\t\t//\n\t\tif ( !defined('IN_ADMIN') )\n\t\t{\n\t\t\tinclude($phpbb_root_path . 'includes/page_header.'.$phpEx);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude($phpbb_root_path . 'admin/page_header_admin.'.$phpEx);\n\t\t}\n\t}\n\n\tswitch($msg_code)\n\t{\n\t\tcase GENERAL_MESSAGE:\n\t\t\tif ( $msg_title == '' )\n\t\t\t{\n\t\t\t\t$msg_title = $lang['Information'];\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase CRITICAL_MESSAGE:\n\t\t\tif ( $msg_title == '' )\n\t\t\t{\n\t\t\t\t$msg_title = $lang['Critical_Information'];\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase GENERAL_ERROR:\n\t\t\tif ( $msg_text == '' )\n\t\t\t{\n\t\t\t\t$msg_text = $lang['An_error_occured'];\n\t\t\t}\n\n\t\t\tif ( $msg_title == '' )\n\t\t\t{\n\t\t\t\t$msg_title = $lang['General_Error'];\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase CRITICAL_ERROR:\n\t\t\t//\n\t\t\t// Critical errors mean we cannot rely on _ANY_ DB information being\n\t\t\t// available so we're going to dump out a simple echo'd statement\n\t\t\t//\n\t\t\tinclude($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);\n\n\t\t\tif ( $msg_text == '' )\n\t\t\t{\n\t\t\t\t$msg_text = $lang['A_critical_error'];\n\t\t\t}\n\n\t\t\tif ( $msg_title == '' )\n\t\t\t{\n\t\t\t\t$msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>';\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\t//\n\t// Add on DEBUG info if we've enabled debug mode and this is an error. This\n\t// prevents debug info being output for general messages should DEBUG be\n\t// set TRUE by accident (preventing confusion for the end user!)\n\t//\n\tif ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) )\n\t{\n\t\tif ( $debug_text != '' )\n\t\t{\n\t\t\t$msg_text = $msg_text . '<br /><br /><b><u>DEBUG MODE</u></b>' . $debug_text;\n\t\t}\n\t}\n\n//-- mod : the logger ----------------------------------------------------------\n//-- add\n\t\tif( defined( 'LOG_MOD_INSTALLED' ) )\n\t\t{\n\t\t\tif( !DEBUG )\n\t\t\t{\n\t\t\t\t$sql_error = $db->sql_error();\n\t\t\t\t\n\t\t\t\t$debug_text = '';\n\t\t\t\t\n\t\t\t\tif ( $sql_error['message'] != '' )\n\t\t\t\t{\n\t\t\t\t\t$debug_text .= '<br /><br />SQL Error : ' . $sql_error['code'] . ' ' . $sql_error['message'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $sql_store != '' )\n\t\t\t\t{\n\t\t\t\t\t$debug_text .= \"<br /><br />$sql_store\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $err_line != '' && $err_file != '' )\n\t\t\t\t{\n\t\t\t\t\t$debug_text .= '<br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$log_msg_text = $msg_text . '<br /><br /><b><u>DEBUG MODE</u></b>' . $debug_text;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$log_msg_text = $msg_text;\n\t\t\t}\n\t\t\t\t\n\t\t\tif( $log->config['log_error_general'] && $msg_code == GENERAL_ERROR )\n\t\t\t{\n\t\t\t\t$log->insert( LOG_TYPE_ERROR, 'LOG_E_GENERAL', array( $log_msg_text ) );\n\t\t\t}\n\t\t\t\n\t\t\tif( $log->config['log_error_critical'] && $msg_code == CRITICAL_ERROR )\n\t\t\t{\n\t\t\t\t$log->insert( LOG_TYPE_ERROR, 'LOG_E_CRITICAL', array( $log_msg_text ) );\n\t\t\t}\n\t\t\t\n\t\t\t// Hide errors depending on config\n\t\t\tif( $log->config['log_msgdie_hide'] && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) && $userdata['user_level'] != ADMIN )\n\t\t\t{\n\t\t\t\t$msg_title\t= $lang['General_Error'];\n\t\t\t\t$msg_text\t= $lang['log_msgdie_default'] . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href=\"' . append_sid( \"{$phpbb_root_path}index.php\" ) . '\">', '</a>' );\n\t\t\t}\n\t\t}\n//-- fin mod : the logger ------------------------------------------------------\n\n\tif ( $msg_code != CRITICAL_ERROR )\n\t{\n\t\tif ( !empty($lang[$msg_text]) )\n\t\t{\n\t\t\t$msg_text = $lang[$msg_text];\n\t\t}\n\n\t\tif ( !defined('IN_ADMIN') )\n\t\t{\n\t\t\t$template->set_filenames(array('message_body' => 'message_body.tpl'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$template->set_filenames(array('message_body' => 'admin/admin_message_body.tpl'));\n\t\t}\n\n\t\t$template->assign_vars(array(\n\t\t\t'MESSAGE_TITLE' => $msg_title,\n\t\t\t'MESSAGE_TEXT' => $msg_text)\n\t\t);\n\t\t$template->pparse('message_body');\n\n\t\tif ( !defined('IN_ADMIN') )\n\t\t{\n\t\t\tinclude($phpbb_root_path . 'includes/page_tail.'.$phpEx);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude($phpbb_root_path . 'admin/page_footer_admin.'.$phpEx);\n\t\t}\n\t}\n\telse\n\t{\n\t\techo \"<html>\\n<body>\\n\" . $msg_title . \"\\n<br /><br />\\n\" . $msg_text . \"</body>\\n</html>\";\n\t}\n\n\texit;\n}", "title": "" }, { "docid": "0810b5e2535384dd737de4d387d36333", "score": "0.46813193", "text": "function ungarh_change_login_errors( $content ) {\n\t// Fixes so you can't guess the username.\n\treturn \"<strong><?php _e('ERROR', 'ungarh'); ?></strong><?php _e('Du har fyllt i fel inloggningsuppgifter.', 'ungarh'); ?>\";\n}", "title": "" }, { "docid": "ddac3e7f3046980662c095aaab08bc9b", "score": "0.46784374", "text": "public static function emergency(string $message, array $context = []): void\n {\n self::log(Logger::EMERGENCY, $message, $context);\n }", "title": "" }, { "docid": "6b7dd69e1089e60b40cec8527957713b", "score": "0.46710876", "text": "function error($type = \"Unknown\", $message = \"Please contact an administrator\") {\n\t\thead(); ?>\n\t\t\n\t\t<section class=\"content\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<h1><?= $type ?></h1>\n\t\t\t\t<p><?= $message ?></p>\n\t\t\t\t<img style=\"\" src=\"/asuwxpcl/.assets/img/errorzebra.png\" alt=\"error zebra\" />\n\t\t\t</div>\n\t\t</section>\n\n\t\t<?php tail();\n\t\tdie();\n\t}", "title": "" }, { "docid": "82335c3c95039553cdbd6d5d927732e3", "score": "0.46706638", "text": "function errorHandler( $severity, $msg, $filename, $linenum){\n\n}", "title": "" }, { "docid": "93deac6d37c71051923880d346c32c39", "score": "0.46652097", "text": "abstract protected function errorReporting();", "title": "" }, { "docid": "80ac3eca330f01a104f527582c4853aa", "score": "0.46622288", "text": "protected static function write($msg, $level = '')\n {\n if (Config::getSoul()->APP_DEBUG == false) {\n return;\n }\n\n if (function_exists('saeAutoLoader')) {\n $msg = \"[{$level}]\" . $msg;\n sae_set_display_errors(false);\n sae_debug(trim($msg));\n sae_set_display_errors(true);\n } else {\n $msg = date('[ Y-m-d H:i:s ]') . \"[{$level}]\" . $msg . \"\\r\\n\";\n $logPath = Config::getSoul()->APP_FULL_PATH . '/logs';\n if (!file_exists($logPath)) {\n Helper::mkdirs($logPath);\n }\n\n file_put_contents($logPath . '/' . date('Ymd') . '.log', $msg, FILE_APPEND);\n }\n }", "title": "" }, { "docid": "9699a7bfb6f9569f7ffe609edfeaa985", "score": "0.46552828", "text": "protected function executeEpilog() {}", "title": "" }, { "docid": "77afa987db261fef48ed11c10910a712", "score": "0.46545795", "text": "function log_message ($msg, $type = Msg_type_debug_info, $channel = Msg_channel_default, $has_html = false)\n{\n global $Logger;\n\n if ($Logger)\n {\n $Logger->record ($msg, $type, $channel, $has_html);\n }\n}", "title": "" }, { "docid": "7dc85de91903c205a8ac88366030d293", "score": "0.46492088", "text": "function mylogger($message){\n\t\n\tif($GLOBALS['debug']){\n\t\tsyslog(LOG_WARNING, \"Record: $message\");\n\t}\n\n}", "title": "" }, { "docid": "0f0d415620da71c3ce1951ae55ee1c3f", "score": "0.46485728", "text": "function log_error($type, $message, $file, $line)\r\n\t{\r\n\t\tglobal $mybb;\r\n\r\n\t\tif($type == MYBB_SQL)\r\n\t\t{\r\n\t\t\t$message = \"SQL Error: {$message['error_no']} - {$message['error']}\\nQuery: {$message['query']}\";\r\n\t\t}\r\n\r\n\t\t// Do not log something that might be executable\r\n\t\t$message = str_replace('<?', '< ?', $message);\r\n\r\n\t\tif(function_exists('debug_backtrace'))\r\n\t\t{\r\n\t\t\tob_start();\r\n\t\t\tdebug_print_backtrace();\r\n\t\t\t$trace = ob_get_contents();\r\n\t\t\tob_end_clean();\r\n\r\n\t\t\t$back_trace = \"\\t<back_trace>{$trace}</back_trace>\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$back_trace = '';\r\n\t\t}\r\n\r\n\t\t$error_data = \"<error>\\n\";\r\n\t\t$error_data .= \"\\t<dateline>\".TIME_NOW.\"</dateline>\\n\";\r\n\t\t$error_data .= \"\\t<script>\".$file.\"</script>\\n\";\r\n\t\t$error_data .= \"\\t<line>\".$line.\"</line>\\n\";\r\n\t\t$error_data .= \"\\t<type>\".$type.\"</type>\\n\";\r\n\t\t$error_data .= \"\\t<friendly_type>\".$this->error_types[$type].\"</friendly_type>\\n\";\r\n\t\t$error_data .= \"\\t<message>\".$message.\"</message>\\n\";\r\n\t\t$error_data .= $back_trace;\r\n\t\t$error_data .= \"</error>\\n\\n\";\r\n\r\n\t\tif(trim($mybb->settings['errorloglocation']) != \"\")\r\n\t\t{\r\n\t\t\t@error_log($error_data, 3, $mybb->settings['errorloglocation']);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t@error_log($error_data, 0);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c64ac2742d574cf1bb92138e5a6b6e9f", "score": "0.46479598", "text": "public function defualtError($e);", "title": "" }, { "docid": "cde60b86206f41c4dac31dced2bbc01b", "score": "0.46469945", "text": "public function log($msg){\n }", "title": "" }, { "docid": "2c123e1ee2b8e4e87a4a6f0ea3d0149f", "score": "0.4645476", "text": "public static function captureNormal($type, $message, $file, $line): void\n {\n self::$handledByNormal = $message;\n if (!error_reporting()) {\n return;\n }\n $err = [\n 'class' => 'errors',\n 'type' => $type,\n 'error' => Libs\\Debug\\ErrorConstants::getInstance()->getVerbalError($type),\n 'message' => $message,\n 'file' => $file,\n 'line' => $line,\n 'stage' => 'normal'\n ];\n $err['traceback'] = debug_backtrace();\n array_shift($err['traceback']);\n self::addLineAsArray($err);\n }", "title": "" }, { "docid": "2f24a72d5490b1a872def6de48c893d2", "score": "0.46440798", "text": "public function emergency( string $channel, string $message, array $context = [] ) {\n\t\treturn $this->log( $channel, Logger::EMERGENCY, $message, $context );\n\t}", "title": "" }, { "docid": "4fc60dc2b9b0ec3e5a7ac2c126519e85", "score": "0.46388072", "text": "public function error($msg) {\n if ($this->level & E_ERROR) $this->log_message('ERROR', $msg);\n }", "title": "" }, { "docid": "c498c502a4dd59f300293526247a5065", "score": "0.46366423", "text": "abstract protected function insertLogEntry($message);", "title": "" }, { "docid": "e784d36e9cc432b2c2420598a4bbbf2e", "score": "0.4634683", "text": "function printLogAndDie($str) {\n global $LOG;\n $LOG->message($str);\n exit;\n}", "title": "" }, { "docid": "0692544ca79f9ec59786325463e56ac3", "score": "0.4630923", "text": "abstract public function log($message);", "title": "" }, { "docid": "fc8cf1fae2935afe6c1ca2b2e235a74e", "score": "0.46299922", "text": "function tagBpmErrorHandler($errno, $errstr, $errfile, $errline) {\n\t$log = date(DateTime::W3C) . ' [errno '.$errno . '] in '.$errfile .' on line ' . $errline . ': ' . $errstr . \"\\n\"; \n\tfile_put_contents( dirname(dirname(__FILE__)).'/logs/php.errors', $log, FILE_APPEND);\n}", "title": "" }, { "docid": "e4816d06de39158f8d18c60af24fb099", "score": "0.46271273", "text": "private function logs($reqs,$error_msg,$sontype='send'){\n \t$logobj = new Common_Log(); \t\n \tif(is_array($reqs)){\n $reqs = json_encode(Common_Func::gbkToUtf8Array($reqs));\n \t}\n \tif(is_array($error_msg)){\n \t\t$error_msg = json_encode($error_msg);\n \t} \t\n $logobj->write('FATAL', 'mcpack',\n\t array(\n\t \t'sontype'=>$sontype,\n\t \t'param'=>$reqs,\n\t \t'message'=>$error_msg,\n\t \t'file'=>__FILE__,\n\t \t'line'=>__LINE__,\n\t )\n );\n }", "title": "" }, { "docid": "2a4b4cc2aeefa3b16ff45f5b2db72f7f", "score": "0.46225864", "text": "function epfl_restrict_edition_settings_log($message)\n{\n if (WP_DEBUG === true) {\n if (is_array($message) || is_object($message)) {\n error_log(print_r($message, true));\n } else {\n error_log($message);\n }\n }\n}", "title": "" }, { "docid": "1edf8b1829ad62f4989631ec874416de", "score": "0.46185672", "text": "function log_known_error($message)\n {\n \n if(!isset($this->transaction_id)){\n $this -> transaction_id = $this -> createTransactionID($this->databaseName, $this->program, $this->logging_db);\n }\n \n if(is_array($message)){\n $holder = serialize($message);\n $message = $holder;\n }\n\n //echo PHP_EOL.$this -> databaseName . ': ' . $message . PHP_EOL;\n\n $success = $this->update_logging_databased($this -> logging_db, 'caught', $message);\n\n $file = 'error.txt';\n\n $id = $this -> databaseName . ': on ' . date(DATE_RFC2822) . PHP_EOL;\n\n file_put_contents($file, $id, FILE_APPEND | LOCK_EX);\n\n $message = ' ' . $message . PHP_EOL . PHP_EOL;\n\n file_put_contents($file, $message, FILE_APPEND | LOCK_EX);\n }", "title": "" } ]
b7b68951db18dc1ef2d47afa3811044c
Adds a new user account with the provided data
[ { "docid": "28a3a6efe1d621dca038b64cbc04d11e", "score": "0.64256585", "text": "public function add(array $data)\n {\n $user = new UserModel();\n $user->populate($data);\n \n $auth = new AuthModel();\n $auth->populate($data);\n \n $profile = new ProfileModel();\n $profile->populate($data);\n \n $user->setProfile($profile);\n $auth->setUser($user);\n $profile->setUser($user);\n \n $em = $this->getEntityManager();\n $em->persist($user);\n $em->persist($auth);\n $em->persist($profile);\n $em->flush();\n \n return $user;\n }", "title": "" } ]
[ { "docid": "e2fbf7081dadcbccca6be200b07afeec", "score": "0.74614143", "text": "public function addUser($data) {\n\t\tglobal $db;\n\t\t$db->type = 'site';\n\t\t\n\t\tforeach ($data as $key=>$val) {\n\t\t\tif ($key != 'password') {\n\t\t\t\t$values[$key] = $db->sqlify($val);\n\t\t\t} else {\n\t\t\t\t$values[$key] = $db->sqlify(crypt($val)); \n\t\t\t}\n\t\t}\n\t\t$values['date_created'] = $db->sqlify(date('Y-m-d H:i:s')); \n\t\t\n\t\t$check = false;\n\t\tif (!empty($data['email'])) {\n\t\t\t$check = $this->getUserByEmail($data['email']);\n\t\t} elseif (!empty($data['twitter_id'])) {\n\t\t\t$check = $this->getUserByTwitterId($data['twitter_id']);\n\t\t}\n\t\t\n\t\tif (!$check) {\n\t\t\t$db->insert('users', $values);\n\t\t\t$db->doCommit();\n\t\t}\n\t}", "title": "" }, { "docid": "4e05948b9c41a8146c4eb3a818522105", "score": "0.73931324", "text": "function add_user($data)\n\t{\n\t\t$url = $this->restApiUrl. 'users/'.$this->locale.'/'.$this->apiAuthKey;\n\t\treturn json_decode($this->call_rest_post($url,$data));\n\t}", "title": "" }, { "docid": "13805b86e2fb1bff02e7646b2ee9315c", "score": "0.7388906", "text": "public function addUser($data) {\n return DB::table('table_bot_users')\n ->insert([\n 'telegramId' => $data['id'],\n 'telegramUsername' => $data['username'],\n 'inviteId' => $data['inviteId'],\n 'ban' => 2\n ]);\n }", "title": "" }, { "docid": "ae64fb83f41228e658922ae823318712", "score": "0.71964955", "text": "public function addUser(){}", "title": "" }, { "docid": "240dfd2bf248a475b151eaf867b5a2fa", "score": "0.71741813", "text": "public function addAccount(array $data)\n {\n return parent::addAccount($data);\n }", "title": "" }, { "docid": "4fa91fa404b9da8ec5c4447cf4acad7d", "score": "0.716778", "text": "public function addUser($data) {\n\t\t$user = $this->findByUnique($data['name'], $data['email'], $data['mobile']);\n\t\tif (!isset($user)) {\n\t\t\t$user = $this->createRow($data);\n\t\t\t$user->save();\n\t\t}\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "564db4866a8f9d45473fbf5966f13bd2", "score": "0.71423686", "text": "function user_add($data)\n{\n\tif (user_find($data[0],NULL))\n\t\treturn false;\n\t\n\t$GLOBALS[\"users\"][] = $data;\n\treturn _saveUsers();\n}", "title": "" }, { "docid": "d914fd1fe8b7c294bb4bf459c245966c", "score": "0.71300566", "text": "function addUser($data)\n { \n $this->query(\"INSERT INTO `{$this->userTable}` (`{$this->tbFields1['first_name']}`, `{$this->tbFields1['last_name']}`, `{$this->tbFields1['gender']}`, `{$this->tbFields1['dob']}`, `{$this->tbFields1['telephone']}`, `{$this->tbFields1['fax']}`, `{$this->tbFields1['email']}`, `{$this->tbFields1['newsletter_flag']}`, `{$this->tbFields1['password']}`, `{$this->tbFields1['date_created']}`) VALUES ('\".$data[$this->dataFields['first_name']].\"', '\".$data[$this->dataFields['last_name']].\"', '\".$data[$this->dataFields['gender']].\"', '\".$data[$this->dataFields['dob']].\"', '\".$data[$this->dataFields['telephone']].\"', '\".$data[$this->dataFields['fax']].\"', '\".$data[$this->dataFields['email']].\"', '\".$data[$this->dataFields['newsletter_flag']].\"', '\".$data[$this->dataFields['password']].\"', CURRENT_TIMESTAMP)\"); \n \n $data[$this->dataFields['customer_id']] = mysql_insert_id($this->dbConn);\n \n if($data[$this->dataFields['address']] != \"\"){\n $this->addAddress($data);\n }\n \n }", "title": "" }, { "docid": "9eb548c6b73498b0f0583c577980c035", "score": "0.70905095", "text": "public function addAccount($data)\n\t{\n\t\t// Do not allow several application with the same name.\n\t\tif(!$account = $this->checkAccountExists($data['account'])) {\n\n\t\t\t// Create new Account entity.\n\t\t\t$account = new Account();\n\t\t\t$account->setAccount($data['account']);\n\t\t\t$account->setDescription($data['description']);\n\t\t\t\n\t\t\n\t\t\t// Add the entity to the entity manager.\n\t\t\t$this->entityManager->persist($account);\n\t\t\t\n\t\t\t// Apply changes to database.\n\t\t\t$this->entityManager->flush();\n\t\t\n\t\t}\n\t\t\n\t\treturn $account;\n\t}", "title": "" }, { "docid": "da642c6e78e1344081fb4f195907c68a", "score": "0.70457315", "text": "public function add($data)\n\t{\n\t\t## table : user\n\t\t$data_user\t= Array(\n\t\t\t\t\"userIC\"=>str_replace(\"-\", \"\", $data['userIC']),\n\t\t\t\t\"userEmail\"=>$data['userEmail'],\n\t\t\t\t\"userPassword\"=>md5($data['userPassword'] == \"\"?12345:$data['userPassword']),\n\t\t\t\t\"userLevel\"=>2,\n\t\t\t\t\"userStatus\"=>1,\n\t\t\t\t\"userPremiumStatus\"=>1,\n\t\t\t\t\"userCreatedDate\"=>now(),\n\t\t\t\t\"userCreatedUser\"=>session::get(\"userID\")\n\t\t\t\t\t\t);\n\n\t\tdb::insert(\"user\",$data_user);\n\n\t\t## get inserted userID.\n\t\t$userID\t= db::getLastID(\"user\",\"userID\");\n\n\t\t## table : user_premium\n\t\t$data_profile\t= Array(\n\t\t\t\t\"userID\"=>$userID,\n\t\t\t\t\"userProfileFullName\"=>$data['userProfileFullName'],\n\t\t\t\t\"userProfileTitle\"=>$data['userProfileTitle'],\n\t\t\t\t\"userProfileGender\"=>$data['userProfileGender'],\n\t\t\t\t\"userProfileDOB\"=>$data['userProfileDOB'],\n\t\t\t\t\"userProfilePOB\"=>$data['userProfilePOB'],\n\t\t\t\t\"userProfileMarital\"=>$data['userProfileMarital'],\n\t\t\t\t\"userProfilePhoneNo\"=>$data['userProfilePhoneNo'],\n\t\t\t\t\"userProfileMailingAddress\"=>$data['userProfileMailingAddress']\n\t\t\t\t\t\t);\n\n\t\tdb::insert(\"user_profile\",$data_profile);\n\t}", "title": "" }, { "docid": "62e5c52e8a96d7cb6b8ef288f65a1e0c", "score": "0.7042019", "text": "public function adduseraccount() {\n\n $usr = new UserAccount();\n\n if(!$usr->access()) {\n\n return \"connection failure!\";\n\n }\n\n if($this->ruseript('name', 'username')) {\n\n return \"username already exists\";\n\n }\n\n else if($this->ruseript('mail', 'email')) {\n\n return \"email already exists\";\n\n }\n\n else {\n\n $usr->insertuserinfo($_POST);\n\n return;\n\n }\n\n }", "title": "" }, { "docid": "342ab24d3474673a730195355e21eec8", "score": "0.7029929", "text": "public function createUser($data)\n {\n $entity = new \\AppBundle\\Entity\\User();\n $entity->setName($data[\"username\"]);\n $entity->setEmail($data[\"email\"]);\n $entity->setHash($this->generateHash($data[\"password\"]));\n\n $this->em->persist($entity);\n $this->em->flush();\n }", "title": "" }, { "docid": "fe75ecdb947006e6b915aa1e3f2265f7", "score": "0.7005907", "text": "public function addUser(\\PHPAuth\\User $user);", "title": "" }, { "docid": "7b111bf3616d1f51545cd8376fe6555d", "score": "0.6950102", "text": "public function addUser(User $user);", "title": "" }, { "docid": "cd68c82adc9a65dfbc96b7737848f56f", "score": "0.69481266", "text": "function add_user($data=array())\n {\n if ($data)\n {\n // secure password\n $salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), TRUE));\n $password = hash('sha512', $data['password'] . $salt);\n\n $sql = \"\n INSERT INTO {$this->_db} (\n username,\n password,\n salt,\n first_name,\n last_name,\n email,\n language,\n is_admin,\n status,\n deleted,\n created,\n updated\n ) VALUES (\n \" . $this->db->escape($data['username']) . \",\n \" . $this->db->escape($password) . \",\n \" . $this->db->escape($salt) . \",\n \" . $this->db->escape($data['first_name']) . \",\n \" . $this->db->escape($data['last_name']) . \",\n \" . $this->db->escape($data['email']) . \",\n \" . $this->db->escape($this->config->item('language')) . \",\n \" . $this->db->escape($data['is_admin']) . \",\n \" . $this->db->escape($data['status']) . \",\n '0',\n '\" . date('Y-m-d H:i:s') . \"',\n '\" . date('Y-m-d H:i:s') . \"'\n )\n \";\n\n $this->db->query($sql);\n\n if ($id = $this->db->insert_id())\n {\n return $id;\n }\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "2b34d1e78d75acd262970bb511fb674f", "score": "0.6935153", "text": "public function addUser($data) {\n if ($this->checkUserExists($data['email'])) {\n throw new \\Exception(\"User with email address \" . $data['email'] . \" already exists\");\n }\n if ($this->checkUserLogin($data['full_name'])) {\n throw new \\Exception(\"User with Login '\" . $data['full_name'] . \"' already exists\");\n }\n\n $user = new User();\n $user->setEmail($data['email']);\n $user->setFullName($data['full_name']);\n $user->setuFirstName($data['uFirstName']);\n $user->setuLastName($data['uLastName']);\n $user->setuMoney(0);\n $user->setuGender($data['uGender']);\n $user->setuRace($data['uRace']);\n $user->setuLevel(0);\n $user->setuEXP(0);\n $bcrypt = new Bcrypt();\n $passwordHash = $bcrypt->create($data['password']);\n $user->setPassword($passwordHash);\n $currentDate = date('Y-m-d H:i:s');\n $user->setDateCreated($currentDate);\n\n $this->entityManager->persist($user);\n\n $this->entityManager->flush();\n\n return $user;\n }", "title": "" }, { "docid": "c058ab8a566c4706246e94cc0fd56aaa", "score": "0.69323945", "text": "public function add($data)\r\n {\r\n // Adds a user into the database.\r\n global $db;\r\n // Get what we need.\r\n $stamp = time();\r\n if (isset($_SERVER['REMOTE_ADDR'])) {\r\n $user_ip = $_SERVER['REMOTE_ADDR'];\r\n } else {\r\n $user_ip = false;\r\n }\r\n if (!isset($data['admin'])) {\r\n $admin = false;\r\n } else {\r\n $admin = $data['admin'];\r\n }\r\n $name = $data['name'];\r\n $username = $data['username'];\r\n $email = $data['email'];\r\n $password = $data['password'];\r\n $key = md5($email . $stamp . rand(0, 999));\r\n\r\n // Play with our food.\r\n $salted = $this->salt($password);\r\n // We only want letters and numbers.\r\n $username = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $username);\r\n\r\n // Scrub up and clean up.\r\n $sql = array();\r\n $sql['name'] = $name;\r\n $sql['username'] = $username;\r\n $sql['email'] = $email;\r\n $sql['password'] = $salted;\r\n $sql['regstamp'] = $stamp;\r\n $sql['regip'] = $user_ip;\r\n $sql['verified'] = false;\r\n $sql['verifykey'] = $key;\r\n\r\n $users_uname = db::get_array(\"users\", array(\"username\" => $username));\r\n $users_email = db::get_array(\"users\", array(\"email\" => $email));\r\n $users = (count($users_uname) + count($users_email));\r\n\r\n if ($users > 0) {\r\n if (count($users_uname) > 0) {\r\n return array(\"res\" => false, \"msg\" => \"A user with that Username already exists!\");\r\n } else {\r\n return array(\"res\" => false, \"msg\" => \"A user with that E-Mail already exists!\");\r\n }\r\n } else {\r\n // Insert the data.\r\n db::insert(\"users\", $sql);\r\n do_email($email, $username, \"Email Validation\", \"To begin using your SmallURL account, you need your email verifying. <br /> Please visit <a href='http://account.smallurl.in/verify/{$key}'> http://account.smallurl.in/verify/{$key} </a> to validate your account.\");\r\n\t\t\treturn array(\"res\" => true, \"msg\" => \"Registered!\");\r\n }\r\n }", "title": "" }, { "docid": "41fcf9205bd29e2400dfdddb50045e5c", "score": "0.69192624", "text": "public static function registerAccount($data)\r\n {\r\n if (static::userExists($data['username'] ?? null)) \r\n {\r\n Flash::addMessage(Config::get('hotelname') . 'naam is al ingebruik!', 'error');\r\n } \r\n else if (static::emailExists($data['email'] ?? null)) \r\n {\r\n Flash::addMessage('opgegeven email is al ingebruik', 'error');\r\n }\r\n else\r\n {\r\n $loader = '\\App\\Emulator\\\\' . ucfirst(Config::get('emulatorname'));\r\n $register = call_user_func($loader. '::addUsers', $data);\r\n if($register)\r\n {\r\n queryBuilder::table('cms_user_settings')->insert(array('user_id' => $register));\r\n queryBuilder::table('cms_feeds')->insert(array('to_user_id' => $register, 'message' => 'Een warm welkom naar onze nieuwe hotel speler!', 'timestamp' => time(), 'from_user_id' => 0));\r\n return $register;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "220dbff8533e2887bd3b0f0328fd7e6b", "score": "0.6799401", "text": "public function addBankAccount($data)\n {\n return $this->post('/bank_accounts/add/', $data);\n }", "title": "" }, { "docid": "3975a23508ecb034bfa2d3a1c2d3995b", "score": "0.6793143", "text": "public function add_user()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "982f3c9273d985496a3a7ac04053847b", "score": "0.6787067", "text": "function newUser($data){\n\t\t$this->db->insert('usuarios', array(\n\t\t\t\t\t\t\t\t\t\t\t'rol' \t\t=> $data['rol'],\n\t\t\t\t\t\t\t\t\t\t\t'nombre' \t=> $data['nombre'],\n\t\t\t\t\t\t\t\t\t\t\t'empresa' \t=> $data['empresa'],\n\t\t\t\t\t\t\t\t\t\t\t'direccion' => $data['direccion'],\n\t\t\t\t\t\t\t\t\t\t\t'tel' \t\t=> $data['tel'],\n\t\t\t\t\t\t\t\t\t\t\t'cif' \t\t=> $data['cif'],\n\t\t\t\t\t\t\t\t\t\t\t'mail' \t\t=> $data['mail'],\n\t\t\t\t\t\t\t\t\t\t\t'password' \t=> $data['password']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "8b50253a770ac08b62eb9232ca510f0c", "score": "0.67793834", "text": "public function addAccount(){\n\n\t}", "title": "" }, { "docid": "2beb4b2ecce0788b83e5f31102f2a8a1", "score": "0.6772658", "text": "public function add($data){\n \t\t\t$result = $this->db->insert(\"user\",$data);\n \t\t}", "title": "" }, { "docid": "9ad65d7709bf274775fdf772d8f491d8", "score": "0.6766077", "text": "public function Add( )\n {\n\t\t\t$password = \"\";\n\t\t\tif( $this->password!=\"\" )\n\t\t\t{\n\t\t\t\t$password = md5($this->password);\n\t\t\t}\n\t\t\t\n $dataArray = array( \"email\"=>$this->email,\n\t\t\t\t\t\t \"username\"=>$this->username,\n \"firstname\"=>$this->firstname,\n \"lastname\"=>$this->lastname,\n \"password\"=>$password,\n \"gender\"=>$this->gender,\n \"yearOfBirth\"=>$this->yearOfBirth,\n \"phone\"=>$this->phone,\n \"mobile\"=>$this->mobile,\n \"addressLine1\"=>$this->addressLine1,\n \"addressLine2\"=>$this->addressLine2,\n \"addressCity\"=>$this->addressCity,\n \"addressState\"=>$this->addressState,\n \"addressCountry\"=>$this->addressCountry,\n \"addressZipCode\"=>$this->addressZipCode,\n \"photo\"=>$this->photo,\n \"interests\"=>$this->interests,\n\t\t\t\t\t\t\t\t\"newsletters\"=>intval($this->newsletters),\n \"recordStatus\" =>$this->recordStatus,\n \"lastLoginTime\"=>$this->lastLoginTime,\n \"accountType\"=>$this->accountType,\n \"isAdmin\"=>$this->isAdmin,\n\t\t\t\t\t\t\t\t\"isDataAdmin\" => $this->isDataAdmin,\n \"facebookDetails\" =>$this->facebookDetails,\n \"twitterDetails\" =>$this->twitterDetails,\n \"favoriteApps\"=>$this->favoriteApps,\n \"openidDetails\" =>$this->openidDetails, \n \"ownedApps\"=>$this->ownedApps,\t\t\t\t\t\t\t\t\n \"registeredDate\"=>$this->registeredDate,\n \"privileges\"=>$this->privileges\t\t\t\t\t\t\t\n );\n \n $response = ServiceAPIUtils::CallAPIService( $dataArray,\"/User/Add/123\", \"json\" );\n \n return $response;\n }", "title": "" }, { "docid": "d0750836b52f030b98d7341a37f24744", "score": "0.6735713", "text": "public function create($data){\n \n $this->db->insert('users', array(\n 'user_login' => $data['login'], \n 'user_password' => Hash::create(HASH_ALGO, $data['password'], HASH_PASSWORD_KEY), \n 'user_nicename' => $data['nicename'],\n 'user_email' => $data['email'],\n 'user_role' => $data['role']\n\n \n ));\n }", "title": "" }, { "docid": "8c8954e5b25a7d8784171a0797b2da2a", "score": "0.67214155", "text": "function createUser($data) {\n\t\t\tglobal $bigtree;\n\n\t\t\t// Safely go through the post data\n\t\t\tforeach ($data as $key => $val) {\n\t\t\t\tif (substr($key,0,1) != \"_\" && !is_array($val)) {\n\t\t\t\t\t$$key = sqlescape($val);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// See if the user already exists\n\t\t\t$r = sqlrows(sqlquery(\"SELECT * FROM bigtree_users WHERE email = '$email'\"));\n\t\t\tif ($r > 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$permissions = sqlescape(json_encode($data[\"permissions\"]));\n\n\t\t\t// If the user is trying to create a developer user and they're not a developer, then… no.\n\t\t\tif ($level > $this->Level) {\n\t\t\t\t$level = $this->Level;\n\t\t\t}\n\n\t\t\t// Hash the password.\n\t\t\t$phpass = new PasswordHash($bigtree[\"config\"][\"password_depth\"], TRUE);\n\t\t\t$password = sqlescape($phpass->HashPassword($data[\"password\"]));\n\n\t\t\tsqlquery(\"INSERT INTO bigtree_users (`email`,`password`,`name`,`company`,`level`,`permissions`,`daily_digest`) VALUES ('$email','$password','$name','$company','$level','$permissions','$daily_digest')\");\n\t\t\t$id = sqlid();\n\n\t\t\t// Audit trail.\n\t\t\t$this->track(\"bigtree_users\",$id,\"created\");\n\n\t\t\treturn $id;\n\t\t}", "title": "" }, { "docid": "c9cfe976d2dec51f805eaa7d800b4d94", "score": "0.6703983", "text": "public function addUser() {\n $app = $this->getSilexApplication();\n $entity = new Entity\\User();\n\n $password = $app['security.encoder_factory']->getEncoder($entity)->encodePassword('admin', $entity->getSalt());\n\n $entity->setEmail('admin@demo.com');\n $entity->setIsAdmin(true);\n $entity->setRoles(array('ROLE_DEVELOPER'));\n $entity->setName('Administrator');\n $entity->setPassword($password);\n\n $this->entityManager->persist($entity);\n }", "title": "" }, { "docid": "173fe7d2e56cf2df8609e25416fb1c5e", "score": "0.6676674", "text": "protected function create(array $data)\n {\n //create the user Data\n $userData = new UserData;\n\n $userCode = $this->createUserCode();\n\n if(!empty($data['profile']))\n {\n $avatar = $this->uploadAvatar($data['profile']);\n }\n else {\n $avatar = User::DEFAULT_AVATAR;\n }\n\n $user = User::create([\n 'code' => $userCode,\n 'avatar' => $avatar,\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n ]);\n\n $userData->user_id = $user->id;\n $userData->name = $data['name'];\n $userData->prefix = $data['prefix'];\n $userData->country_id = $data['country'];\n $userData->company_name = $data['company_name'];\n $userData->year_created = $data['year_created'];\n $userData->position = $data['position'];\n $userData->company_address = $data['company_address'];\n $userData->tel_numbers = $data['tel_numbers'];\n $userData->fax = $data['fax'];\n $userData->email = $data['email'];\n\n $userData->save();\n\n //now save the user account types.\n if(isset($data['account_type']))\n {\n foreach ($data['account_type'] as $type)\n {\n $accType = new UserAccountType;\n\n $accType->user_id = $user->id;\n $accType->account_type_id = $type;\n\n $accType->save();\n }\n }\n\n session()->flash('success', 'User Registered');\n\n return $user;\n }", "title": "" }, { "docid": "c45e6e2dcbbbb17bf89f9ffb4040172d", "score": "0.6672259", "text": "function addUser(){\r\n\t\t$data = array(\r\n\t\t\t\"username\"=>$this->input->post(\"username\"),\r\n\t\t\t\"password\"=>sha1($this->input->post(\"password\")),\r\n\t\t\t\"name\"=>$this->input->post(\"fullname\"),\r\n\t\t\t\"usertype\"=>$this->input->post(\"usertype\"),\r\n\t\t\t\"status\"=>1,\r\n\t\t\t);\r\n\r\n\t\t$this->users->addUser($data);\r\n\t\treturn \"Successfully created a new user.\";\r\n\t}", "title": "" }, { "docid": "bab9f427c13de0c0fe02895e4bd6d7ba", "score": "0.66607", "text": "public function user_insert($data = array())\n\t{\n\t\t// Hashed password should not get logged\n\t\tunset($data['user']['u_password']);\n\t\t\n\t\t$this->CI->logger->add('users/user_insert', $data);\n\t}", "title": "" }, { "docid": "3a125ce5d7bde0cf777c61fe667433aa", "score": "0.66584814", "text": "protected function create(array $data)\n {\n $newUser = User::create([\n 'username' => $data['username'],\n 'password' => bcrypt($data['password']),\n 'created_at' => gmdate('Y-m-d H:i:s'),\n 'updated_at' => gmdate('Y-m-d H:i:s'),\n 'userTypeId' => $data['userTypeId']\n ]);\n \n $userTypeId = $newUser->userTypeId;\n \n if ( $userTypeId == 1 || $userTypeId == 2) {\n \n $newEmployee = Employee::create([ \n 'userId' => $newUser->id,\n 'firstName' => $data['firstName'],\n 'lastName' => $data['lastName'],\n 'email' => $data['email'],\n 'phone' => $data['phone'],\n 'streetAddress' => $data['streetAddress'],\n 'city' => $data['city'],\n 'state' => $data['state'],\n 'zipcode' => $data['zipcode'],\n 'ssn' => $data['ssn'],\n 'hourlyRate' => $data['hourlyRate'],\n 'primaryStoreId' => $data['primaryStoreId']\n ]);\n \n }\n \n if ( $userTypeId == 3 ) {\n \n if( array_key_exists('accountId', $data) ) {\n \n $newContact = Contact::create([\n 'userId' => $newUser->id,\n 'accountId' => $data['accountId'],\n 'firstName' => $data['firstName'],\n 'lastName' => $data['lastName'],\n 'email' => $data['email'],\n 'phone' => $data['phone'],\n 'contactTypeId' => $data['contactTypeId']\n ]);\n \n } else {\n \n $newAccount = Account::create([\n 'companyName' => $data['companyName'],\n 'streetAddress' => $data['streetAddress'],\n 'city' => $data['city'],\n 'state' => $data['state'],\n 'zipcode' => $data['zipcode'],\n 'accountStatus' => $data['accountStatus'],\n ]);\n \n $accntId = $newAccount->id;\n \n $newContant = Contact::create([\n 'userId' => $newUser->id,\n 'accountId' => $accntId,\n 'firstName' => $data['firstName'],\n 'lastName' => $data['lastName'],\n 'email' => $data['email'],\n 'phone' => $data['phone'],\n 'contactTypeId' => $data['contactTypeId']\n ]);\n \n $newBalance = Balance::create([\n 'accountId' => $accntId,\n 'balance' => 0.00\n ]);\n \n }\n \n }\n \n return $newUser;\n }", "title": "" }, { "docid": "39f622465fc523eaf47ec3deaf44f955", "score": "0.66561925", "text": "public function addNew($data)\n {\n $user_data = [\n 'email' => $data['email'],\n 'name' => $data['owner'],\n 'phone' => $data['phone'],\n ];\n\n $userRepo = new TicketUserRepository;\n $user = $userRepo->addUser($user_data);\n\n // Get the category\n $category = Category::find($data['category']);\n $ticket_data = [\n 'user_id' => $user->id,\n 'unique_id' => $this->genUuid(),\n 'title' => $data['title'],\n 'status' => 'pending',\n 'priority' => $data['priority'],\n 'description' => $data['description'],\n 'category_id' => isset($category->id) ? $category->id : 0,\n ];\n // We create the Ticket\n return Ticket::create($ticket_data);\n }", "title": "" }, { "docid": "e227d1fd806cbb5e68fac85b2a316426", "score": "0.6653705", "text": "public function addUser(){\n\t}", "title": "" }, { "docid": "d738c4dbe9dbbcd6c4a4bd6a1a4e60d9", "score": "0.6647765", "text": "public function addUser() {\n $user = new User();\n $user->set('fname', $_POST['fname']);\n $user->set('lname', $_POST['lname']);\n $user->set('uname', $_POST['uname']);\n $user->set('email', $_POST['email_id']);\n $user->set('password', $_POST['password']);\n $user->set('user_type', 'applicant');\n $user->save();\n //Create an event if admin request is made\n if($_POST['user_type'] == 'admin') {\n $latestUser = User::getLastRowId();\n $adminReq = new Event();\n $adminReq->set('user', $latestUser);\n $adminReq->set('event_type', '10'); //10 is request admin\n $adminReq->set('job', '');\n $adminReq->set('timestamp','');\n $adminReq->save();\n }\n\n $signUp = \"success\";\n header('Location: '.BASE_URL.'/home');\n }", "title": "" }, { "docid": "f38fe28136355c0fa438998e5bba7076", "score": "0.66304594", "text": "public function addUser($data)\n\t{\n\t\t$this->db->insert($this->pro->prifix.$this->pro->user,$data);\n\t\treturn $this->db->insert_id();\n\t\t\n\t}", "title": "" }, { "docid": "2efdeb572c44f3e35701f2bc303e556d", "score": "0.6618507", "text": "public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}", "title": "" }, { "docid": "2b75087940bfbf5156267a3b080fbd88", "score": "0.6602497", "text": "public function addNewUser() {\n\t\t\tGLOBAL $page;\n\t\t\t\n\t\t\t$db = new database();\n\t\t\t$db->query(\"INSERT INTO `cashltd_cash`.`admin_login` (\n\t\t\t\t\t\t`id` ,\n\t\t\t\t\t\t`username` ,\n\t\t\t\t\t\t`password` ,\n\t\t\t\t\t\t`rank` ,\n\t\t\t\t\t\t`fname` ,\n\t\t\t\t\t\t`sname`\n\t\t\t\t\t\t)\n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\tNULL , '\".safe::post('username').\"', '\".MD5(safe::post('password')).\"', '\".safe::post('rank').\"', '\".safe::post('fnamex').\"', '\".safe::post('lnamex').\"'\n\t\t\t\t\t\t);\");\n\t\t\t\n\t\t}", "title": "" }, { "docid": "d4fe56c473133ed6a71cc2a491c692c2", "score": "0.6594587", "text": "public function createUser($username, $password, array $data = []);", "title": "" }, { "docid": "f174b43e8ae1da2ec8d1d3224f6fa22d", "score": "0.6573116", "text": "public function registerUser(array $data)\n {\n $data['uid'] = (string) Str::uuid();\n $data['password'] = app('hash')->make($data['password']);\n\n \treturn $this->user->create($data);\n }", "title": "" }, { "docid": "a257dd46f925f2ea35886976574c2f66", "score": "0.6570074", "text": "public function createNewUser(array $data)\n\t{\n\t\treturn $this->user->create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\t}", "title": "" }, { "docid": "09d8f7f9663a15a3635169b176c56a5f", "score": "0.6566596", "text": "public static function create(array $data)\n {\n $res_main = BitrixQuery::callMethod(\"crm.lead.add\", [\n 'fields' =>\n [\n 'TITLE' => $data['name']. ' ' . $data['last_name'],\n 'NAME' => $data['name'],\n 'LAST_NAME' => $data['last_name'],\n 'EMAIL' => [ 'VALUE' => $data['email'], 'VALUE_TYPE' => 'WORK' ]\n ]\n ]);\n return User::create([\n 'bx_id' => $res_main,\n 'name' => $data['name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'avatar' => '/img/avatars/ava-3.png',\n 'password' => Hash::make($data['password']),\n ]);\n }", "title": "" }, { "docid": "6a9d8bb0c0028e803965eaede00afd1a", "score": "0.6566207", "text": "public function createUser(){\n\t\t$data = json_decode(file_get_contents('php://input'), true);\n\t\t$this->model->createUser($data);\n\n\t\t}", "title": "" }, { "docid": "a85a41cec4509343f19b62ed33cd8247", "score": "0.6563407", "text": "function add_new_user($user_info) {\n\t\t\n\t\t//connect to the database\n\t\t$mysql = new Mysql();\n\t\t\n\t\t//make sure username, email, and access code are correct\n\t\t$response = $mysql->validate_new_user($user_info['username'], $user_info['email'], $user_info['access_code']);\n\t\t\n\t\t//if username, email and access code are correct insert user into DB and return true\n\t\tif( $response === true ) {\n\t\t\t$response = $mysql->insert_user($user_info);\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//otherwise return an array of errors now held in $response\n\t\t\treturn $response;\n\t\t}\n\t}", "title": "" }, { "docid": "640bc5feb36c75ec53bc4757cf3536be", "score": "0.65544313", "text": "public function Create_Account($p_CompanyName, $p_UserName, $p_Password, $p_Email){\n $acc_info=new Account_Info();\n $acc_info->AccountId = $this->GetGUID();//GUID Creation\n $acc_info->CompanyName = $p_CompanyName;\n $acc_info->Status = AccountStatus::Trail;//Enum Data Type Creation\n print_r($acc_info->Status);\n $acc_info->AccountType = AccountType::Starter;//Enum Data Type Creation\n $acc_info->ExpiryDate = date('Y-m-d', strtotime('+15 days'));\n \t $acc_info->CreatedDate = date('Y-m-d');\n \t $acc_info->Email = $p_Email;\n $acc_info->Insert();\n \t $usr_info = new User_Info();\n $usr_info->UserId = $this->GetGUID();\n \t $usr_info->AccountId =\"$acc_info->AccountId\";\n $usr_info->Email = $p_Email;\n \t $usr_info->UserName =$p_UserName;\n \t $usr_info->Password = $p_Password; \n \t $usr_info->Role = UserRole::Admin;//Enum Data Type Creation\n $usr_info->Insert();\n }", "title": "" }, { "docid": "561e678d8e21b6f1eb86d5ab03665ac5", "score": "0.6551307", "text": "function demoAddUser()\n {\n echoln(\"<h3>demoAddUser</h3>\");\n \n $user_dmaier = new User(\"dmaier\", \"David\", \"Maier\", \"david.maier@couchbase.com\", new DateTime());\n $user_mmustermann = new User(\"mmustermann\", \"Max\", \"Mustermann\", \"max.mustermann@mm.de\", new DateTime());\n \n echoln(\"Persisting \" . $user_dmaier->uid . \"...\");\n $user_dmaier->persist();\n echoln(\"Persisting \" . $user_mmustermann->uid . \"...\");\n $user_mmustermann->persist();\n \n }", "title": "" }, { "docid": "02340fe49e1932973e95f09bf238cacf", "score": "0.65475607", "text": "public function addUser($data, $setRole = true)\n {\n return parent::addUser($data, $setRole);\n }", "title": "" }, { "docid": "054b590fcd6ca119e29832d88a9e7a09", "score": "0.6546414", "text": "public function addUser(){\n\t\t$username = $this->input->post('username');\n\t\t$password =$this ->input->post('password');\n\t\t$sex =$this ->input->post('sex');\n\t\t$this->ModelUsers->saveUser($username, $password,$sex);\n\t}", "title": "" }, { "docid": "31e94121e4ff30f71c41150285cc53ad", "score": "0.6543047", "text": "public function add(){\n\n\t\tif (Users::where('email', '=', $_POST['email'])->exists()) {\n\t\t\treturn json_encode(Utils::response_error(\"This email is exist.\"));\n\t\t}\n\t\telse{\n\n\t\t\t$user = new Users;\n\t\t\t$user->username \t= $_POST['firstName'].$_POST['lastName'];\n\t\t\t$user->email \t\t= $_POST['email'];\n\t\t\t$user->password \t= bcrypt($_POST['password']);\n\n\t\t\t$user->role = (($_POST['role'] == \"\") ? 'customer':$_POST['role']);\n\t\t\t$user->save();\n\t\t\t\t try {\n\t\t\t $profile = new Profile;\n\t\t\t\t\t$profile->firstName = $_POST['firstName'];\n\t\t\t\t\t$profile->lastName = $_POST['lastName'];\n\t\t\t\t\t$profile->dob = date(\"Y-m-d\", strtotime($_POST['dob']));\n\t\t\t\t\t$profile->description = $_POST['description'];\n\t\t\t\t\t$profile->telephone = $_POST['phone'];\n\t\t\t\t\t$profile->primaryHome = $_POST['address'];\n\t\t\t\t\t$profile->gender = $_POST['gender'];\n\t\t\t\t\t$profile->users()->associate($user);\n\t\t\t\t\t$profile->save();\n\t\t\t\t\t$profile = ['id' => $user->id, 'name' =>$user->username, 'email' => $user->email, 'phone' => $profile->telephone, 'role' => $user->role, 'social' => '', 'gender' => $profile->gender];\n\t\t\t\t\treturn json_encode(Utils::response_success($profile));\n\n\t\t\t\t}catch(Exception $e){\n\t\t\t\t\tUsers::destroy($user->id);\n\t\t\t\t\treturn json_encode(Utils::response_error(\"Unable to create user.\"));\n\t\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "6f3d3237b08c563d5d55dbc4f33f729b", "score": "0.6535155", "text": "public function insert_user($data)\n\t{\n\n\t\t/**\n\t\t * Insert all the form information in the user table\n\t\t */\n\t\t$this->db->insert(\"users\", $data);\n\n\t}", "title": "" }, { "docid": "dce729923fdae67a814c7225dc3783b6", "score": "0.6525771", "text": "public function createAccountAction()\n {\n try {\n $account = new UserModel();\n\n $account->setUsername($_POST['username']);\n $account->setEmail($_POST['email']);\n $account->setPassword($_POST['password']);\n $account->setPhoneNumber($_POST['phone-number']);\n\n $account->save();\n } catch (\\Exception $e) {\n error_log($e->getMessage());\n $this->redirect('errorPage');\n }\n }", "title": "" }, { "docid": "3b8b6c79519ed4f3bcf3a0c0415a3dd8", "score": "0.65141445", "text": "public function executeAdd() \n {\n \t$user = new User();\n \t$user->setUserFn($this->getRequestParameter('fname'));\n \t$user->setUserLn($this->getRequestParameter('lname'));\n \t$user->setUserLogin($this->getRequestParameter('login'));\n \t$user->setUserEmail($this->getRequestParameter('email'));\n \t$user->setAuthLvlId('1');\n \t$user->setUserPswd($this->getRequestParameter('password'));\n \t$user->save();\n \t\n\t$this->forward('user', 'login');\n }", "title": "" }, { "docid": "18932fc0578ec44cec35e8d56dfe353f", "score": "0.6513181", "text": "public function new_user( $data ){\n\t\t$query =\n\t\t'INSERT INTO Usuario\n\t\t(\tUsuarioAcceso,\n\t\t\tUsuarioPassword,\n\t\t\tUsuarioEmail,\n\t\t\tNivelUsuId,\n\t\t\tTipoUsuId,\n\t\t\tUsuarioNombre,\n\t\t\tUsuarioApellidos,\n\t\t\tFacultadId,\n\t\t\tLicenciaturaId\n\t\t)\n\t\tVALUES ( ?,?,?,?,?,?,?,?,? )\n\t\t';\n\t\t// Valores\n\t\t$values = array(\n\t\t\t$data['username'],\n\t\t\t$data['pass'],\n\t\t\t$data['email'],\n\t\t\t$data['nivel'],\n\t\t\t$data['tipo'],\n\t\t\t$data['nombre'],\n\t\t\t$data['apellidos'],\n\t\t\t$data['facultad'],\n\t\t\t$data['licenciatura']\n\t\t);\n\n\t\t$result = $this->db->query( $query,$values );\n\n\t\treturn $this->db->insert_id();\n\t}", "title": "" }, { "docid": "4db26d9d9624906280a3bcc450b1a00a", "score": "0.65100914", "text": "public static function add(object $data)\n {\n // Empty the result before doing any tasks\n if(isset(self::$result))\n {\n self::$result->message = \"\";\n self::$result->hasError = false;\n self::$result->data = [];\n }\n\n $query = \"SELECT * FROM \" . self::$table . \" WHERE email_address=('{$data->email_address}')\";\n $res = self::$conn->query($query);\n $data = Security::escapeData($data);\n\n if($res && $res->num_rows <= 0)\n {\n $data->password = password_hash($data->password, PASSWORD_BCRYPT);\n $data->created_at = date('Y-m-d h:i:s', time());\n\n $query = \"INSERT INTO \" . self::$table . \"(\";\n\n foreach($data as $key => $val)\n $query .= \"$key, \";\n $query = substr($query, 0, strlen($query) - 2) . \") VALUES(\";\n\n foreach($data as $key => $val)\n $query .= \"'$val', \";\n $query = substr($query, 0, strlen($query) - 2) . \")\";\n\n $res = self::$conn->query($query);\n self::$result->message = $res ? \"Account has been registered successfully\" : self::$conn->error;\n self::$result->hasError = !$res;\n }\n else\n {\n self::$result->message = $res ? \"The email address you entered appears to be already registered in the database\" : self::$conn->error;\n self::$result->hasError = true;\n }\n\n return self::$result;\n }", "title": "" }, { "docid": "05b01c843a624ed072151a8f8165acbd", "score": "0.650636", "text": "public function add() {\n $user = $this->Users->newEntity();\n if ($this->request->is('post')) {\n $user = $this->Users->patchEntity($user, $this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__('The user has been saved.'));\n \n return $this->redirect(['action' => 'login']);\n } else {\n $this->Flash->error(__('The user could not be saved. Please, try again.'));\n }\n }\n \n $this->set(compact('user'));\n $this->set('_serialize', ['user']);\n }", "title": "" }, { "docid": "d94c920e225d781a1e31a084a9ac4064", "score": "0.6497862", "text": "public function add(){\n\t\t// if we got a post information, do add else do nothing\n\t\tif($this->request->is('post')){\n\t\t\t$this->User->create();\n\t\t\tif($this->User->save($this->request->data)){\n\t\t\t\t// if the information is successfully saved\n\t\t\t\t$this->Session->setFlash(__('Congratulation, the user has been created.'));\n\t\t\t\t$this->redirect(array('controller'=>'jobs', 'action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Sorry, the user can not be created.'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fc6b26c268326f2256c44c7e8ad3e317", "score": "0.6479141", "text": "protected function addUser(Request $data)\n {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password'])\n ]);\n return redirect()->route('user', ['id' => $user->id]);\n }", "title": "" }, { "docid": "f35ecf0945e1cd61df1ac17fa93209df", "score": "0.6470139", "text": "function addUser_post(){\n\n $name = $this->post('user');\n\n $huella = $this->post('huella');\n\n \n if(!$name){\n\n $this->response(\"Enter complete user information to save\", 400);\n\n }else{\n\n $data = array(\n\t\t\t'usuario' => $name,\n\t\t\t'huella' => $huella\n\t\t );\n $result = $this->user_model->Agrega($data);\n \n if($result === 0){\n\n $this->response(\"User information could not be saved. Try again.\", 500);\n\n }else{\n\n $this->response(\"success\", 200); \n \n }\n\n }\n\n }", "title": "" }, { "docid": "3f94aafac874de0e7a385ff1d5a2d06c", "score": "0.6461672", "text": "public function store()\n\t{\n\t\t$data = \\Input::get('data');\n\t\t\\User::create($data);\n\t}", "title": "" }, { "docid": "301b497e5160045e29999087f2e4d7c6", "score": "0.64611226", "text": "public function createUser($email, array $data);", "title": "" }, { "docid": "0b64fab01013dbe6b4e6dc54109d04bc", "score": "0.6461039", "text": "public function registerAccount(array $data)\n {\n return $this->client->doPost('system/registeraccount', $data);\n }", "title": "" }, { "docid": "ed7a9d4862a764d47eac2681bb8d2965", "score": "0.646002", "text": "protected function create(array $data)\n {\n DB::beginTransaction();\n try {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'surname' => $data['surname'],\n 'phone' => $data['phone'],\n 'country' => $data['country'],\n 'password' => bcrypt($data['password']),\n ]);\n Account::create([\n 'number' => (DB::table('accounts')->max('number') + 1),\n 'type_id' => 1,\n 'user_id' => $user->id,\n 'balance' => 0.0000,\n 'tarif_id' => 1,\n ]);\n\n DB::commit();\n $success = true;\n } catch (\\Exception $e) {\n $success = false;\n DB::rollback();\n }\n if ($success) {\n return $user;\n }\n return redirect('register');\n\n }", "title": "" }, { "docid": "cdd41eb204dc5ebd628f1402d8572188", "score": "0.6458397", "text": "function addUser()\n {\n if (APP_INSTALLED)\n {\n $this->_template->setRedirection(APP_URL);\n return ;\n }\n \n // Check post values and populate db\n if (isset($_POST['name']) && isset($_POST['pass']))\n {\n $newName = htmlspecialchars($_POST['name']);\n\n // Username lenght check\n if (strlen($newName) == 0)\n {\n $this->set('error', 'User Name needs to be at least 1 character long');\n return ;\n }\n\n // Username uniqueness check\n $user = new UserModel;\n $uNames = $user->getUserNames();\n\n $alreadyPresent = false;\n foreach ($uNames as $key => $value) {\n if ($value['name'] == $newName)\n $alreadyPresent = true;\n }\n\n if (!$alreadyPresent)\n {\n // success, lets add it to the database and inform the user\n $user->addUser($newName, hash(\"sha256\", $_POST['pass'] . BACK_HASH_SALT));\n $this->set('success', 'Added user <strong>' . $newName . '</strong> to SerieLast.');\n }\n else {\n $this->set('error', 'This name is already used');\n }\n }\n }", "title": "" }, { "docid": "c0358d3f01be8abdb85793643e41a509", "score": "0.64575773", "text": "protected function create(array $data)\n { \n /*\n * add new users\n */\n $registrationToken = strtotime(\"now\") . rand(0, 999999);\n $newCreatedUser = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'registration_token' => bcrypt($registrationToken),\n ]); \n\n /*\n * Create new account\n */ \n $account = Account::create(\n [ \n 'time_zone'=>'Asia/Taipei' \n ]\n ); \n // print \"<br><br> account id \" . $account->id;\n // dd($account);\n \n // dd($insertIntoUserAccount);\n\n /**\n * Create new user account\n */ \n UserAccount::create([\n 'account_id' => $account->id, \n 'user_id' => $newCreatedUser->id, \n 'role' => 'administrator'\n ]);\n \n // exit;\n /*\n * Send registration confirmation to the email \n */\n $user = User::find($newCreatedUser->id); \n $user->notify(new UserRegisteredNotification($user));\n\n\n /**\n * Create subscription\n */\n\n\n $subscription = Subscription::createNewSubscription($account->id); \n\n Activity::createActivity( ['account_id'=> $account->id, 'table_name'=>'users', 'table_id'=> $newCreatedUser->id, 'action'=> 'New user successfully created!'] );\n Activity::createActivity( ['account_id'=> $account->id, 'table_name'=>'accounts', 'table_id'=>$account->id, 'action'=> 'Your account successfully created!'] );\n Activity::createActivity( ['account_id'=> $account->id, 'table_name'=>'subscriptions', 'table_id'=> $subscription ->id, 'action'=> 'User account trial subscription successfully created!'] ); \n\n /*\n * return instance\n */\n return $newCreatedUser; \n }", "title": "" }, { "docid": "ab4bd45025515e9f308c88bb6e3d270b", "score": "0.64552855", "text": "public function registerAccount()\r\n {\r\n /*// SQL query to get total number of rows in user table\r\n $countStatement = 'SELECT userID FROM users ORDER BY userID DESC LIMIT 1';\r\n // Prepare PDO statement\r\n $countRows = $this->_dbHandle->prepare($countStatement);\r\n //Execute PDO statement\r\n $countRows->execute();*/\r\n // Store Total number of rows\r\n $totalRows = $this->countUserID();\r\n // var_dump($totalRows);\r\n\r\n // SQL query to insert user detail into users database\r\n // Bind username and password parameters\r\n $sqlQuery = 'INSERT INTO users (userID, username, password) VALUES (:id, :username, :password)';\r\n\r\n // Prepare PDO statement\r\n $statement = $this->_dbHandle->prepare($sqlQuery);\r\n\r\n // Bind parameters in SQL query are assigned\r\n $statement->bindParam(':id', $userID, PDO::PARAM_INT);\r\n $statement->bindParam(':username', $username, PDO::PARAM_STR);\r\n $statement->bindParam(':password', $password, PDO::PARAM_STR);\r\n\r\n $userID = $totalRows + 1; // New userID\r\n $username = $this->username; // New username\r\n\r\n // Password is encrypted using hash\r\n $password = password_hash($this->password, PASSWORD_DEFAULT);\r\n // var_dump(strlen($password));\r\n\r\n // SQL query is executed\r\n $statement->execute();\r\n // var_dump($statement->execute());\r\n\r\n echo \"New Account created\";\r\n // unset($statement);\r\n\r\n }", "title": "" }, { "docid": "0b67a43ca72a01219d31bac62df30f02", "score": "0.64547414", "text": "public function create($data)\n {\n // Meta data\n $data['actionDateTime'] = date(\"Y-m-d H:i:s\");\n $data['resourceUrl'] = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];\n\n // Remove sensitive information\n if (isset($data['userAccountData']['userPassword'])) {\n unset($data['userAccountData']['userPassword']);\n }\n if (isset($data['userAccountData']['userHash'])) {\n unset($data['userAccountData']['userHash']);\n }\n\n // Encode for storage\n $data['userAccountData'] = PerchUtil::json_safe_encode($data['userAccountData']);\n\n return parent::create($data);\n }", "title": "" }, { "docid": "f7a55dedff9870a116f3dce8d5caf4d2", "score": "0.6451138", "text": "public function action_add()\r\n\t{\r\n\t\tif ( Request::current()->method() == Request::POST )\r\n\t\t{\r\n\t\t\treturn $this->_add();\r\n\t\t}\r\n\t\t\r\n\t\t$this->template->title = __('Add user');\r\n\t\t$this->breadcrumbs\r\n\t\t\t->add($this->template->title);\r\n\r\n\t\t// check if user have already enter something\r\n\t\t$data = Flash::get( 'post_data', array() );\r\n\r\n\t\t$user = new User( $data );\r\n\r\n\t\t$this->template->content = View::factory( 'user/edit', array(\r\n\t\t\t'action' => 'add',\r\n\t\t\t'user' => $user,\r\n\t\t\t'permissions' => Model_Permission::get_all()\r\n\t\t) );\r\n\t}", "title": "" }, { "docid": "e7475f4d312a898c6a9e17dd92b0c61b", "score": "0.64475834", "text": "public function setNewUser($data)\n {\n // $lastname = $this -> checkXSS($data['f-lastname']);\n // $email = $this -> checkXSS($data['f-emal']);\n // $birthday = $this -> checkXSS($data['f-birthday']);\n // $pw = $this -> checkXSS($data['f-pw']);\n\n $firstname = $this -> db -> real_escape_string($data['f-firstname']);\n $lastname = $this -> db -> real_escape_string($data['f-lastname']);\n $email = $this -> db -> real_escape_string($data['f-email']);\n $birthday = $this -> db -> real_escape_string($data['f-birthday']);\n\n\n $pw = $this -> setPassword($data['f-pw']);\n\n $hash = $this -> generateUserhash();\n $userGroup = 1;\n $createdAt = time();\n $isActive = 0;\n\n\n if(isset($data['f-newsletter'])){\n\n $newsletter = \"on\";\n }else{\n $newsletter = \"off\";\n }\n\n $stmt = $this -> db -> prepare(\"INSERT INTO users(firstname, lastname, email, newsletter, birthday, pw, user_group, hash, created_at, is_active) VALUES (?,?,?,?,?,?,?,?,?,?)\");\n\n $stmt -> bind_param(\"ssssssissi\", $firstname, $lastname, $email, $newsletter, $birthday, $pw, $userGroup, $hash, $createdAt, $isActive);\n $stmt -> execute();\n\n $stmt -> close();\n\n return $hash;\n }", "title": "" }, { "docid": "df4f91bb7d161ba3819e1618f586d8bc", "score": "0.6440361", "text": "public static function addUser($data)\n\t{\n\t\tif (!is_array($data)) return false;\n\t\t$data = self::_cookData($data);\n\t\t$ret = self::_getDao()->insert($data);\n\t\tif (!$ret) return $ret;\n\t\treturn self::_getDao()->getLastInsertId();\n\t}", "title": "" }, { "docid": "5eba050a58db1bac8e47ffdffa619d44", "score": "0.6440281", "text": "function addUser($user)\n {\n $connection = Doctrine_Manager::connection();\n $query = \"INSERT INTO constant_contact (username, access_token, created_at) VALUES ('\".$user['username'].\"', '\".$user['access_token'].\"', '\".date('Y-m-d H:i:s').\"')\";\n $statement = $connection->execute($query);\n }", "title": "" }, { "docid": "57d00a30f819e110d8d10f1028e9cfac", "score": "0.6436481", "text": "public function addUser($input) {\n $sql = \"INSERT INTO \n usertable (username, password, type, email, firstname, lastname) \n VALUES (:username, :password, :type, :email, :firstname, :lastname)\";\n\n $stmt = $this->db_connect->prepare($sql);\n $stmt->bindParam(':username', $input->getUserName(), PDO::PARAM_STR);\n $stmt->bindParam(':password', $input->getUserPassword(), PDO::PARAM_STR);\n $stmt->bindParam(':type', $input->getUserType(), PDO::PARAM_STR);\n $stmt->bindParam(':email', $input->getUserEmail(), PDO::PARAM_STR);\n $stmt->bindParam(':firstname', $input->getFirstname(), PDO::PARAM_STR);\n $stmt->bindParam(':lastname', $input->getLastname(), PDO::PARAM_STR);\n\n $stmt->execute();\n// echo 'User Registered.';\n\n $username = $input->getUserName();\n $sql = \"SELECT * FROM usertable WHERE username = '$username'\";\n foreach (parent::$this->db_connect->query($sql) as $row) {\n $custController = new profile_controller();\n $custController->newProfile($row['userid']);\n }\n }", "title": "" }, { "docid": "6dceee4b751aa31ad0c92f388a4b70e5", "score": "0.6433022", "text": "public function addItem($data)\n {\n \n $tradeUserIns = new BuckysTradeUser();\n if (!$tradeUserIns->hasCredits($data['userID']))\n return; // no credits\n \n global $db;\n \n if (empty($data['userID']) || \n empty($data['title']) ||\n empty($data['subtitle']) ||\n empty($data['catID'])\n )\n return;\n \n $newID = $db->insertFromArray(TABLE_TRADE_ITEMS, $data);\n \n //Trade User has been created?\n $tradeUserIns->addUser($data['userID']);\n \n //Use one credits\n if ($newID)\n $tradeUserIns->useCredit($data['userID']);\n \n return $newID;\n }", "title": "" }, { "docid": "a486ab1553adc7a52db154865632bde2", "score": "0.6432893", "text": "function insert($data)\n {\n // validation fails\n if(!$this->validateUser($data))\n return;\n\n\n $validatedData = $this->generateValidatedData($this->fields, $data);\n $validatedData['salt'] = \"no-need\";\n $sql = $this->insertSQL($validatedData);\n $this->connection->prepare($sql)->execute($validatedData);\n echo \"user inserted\";\n }", "title": "" }, { "docid": "afe92a0e1f83fecd546275ad47822a3f", "score": "0.6431577", "text": "public function add()\n {\n $user = $this->Users->newEntity();\n if ($this->request->is('post')) {\n $user = $this->Users->patchEntity($user, $this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__(\"L'utilisateur a été sauvegardé.\"));\n return $this->redirect(['action' => 'index']);\n }\n $this->Flash->error(__(\"Impossible d'ajouter l'utilisateur.\"));\n }\n $this->set('user', $user);\n }", "title": "" }, { "docid": "6546d91886e7dba80b1af81d480567c3", "score": "0.64283043", "text": "function add_user ($User_name, $User_password, $User_email, $user_type)\n\t{\n\t\tglobal $conn;\n\n $sql_i = \"INSERT INTO login_db(user_name, user_password, user_email, user_type) VALUES \" .\n \"('$User_name', '$User_password', '$User_email', '$user_type')\";\n\n run_update($sql_i);\n\t}", "title": "" }, { "docid": "d0ae651e8046225d6b0b58f3bde3a21f", "score": "0.64228666", "text": "public function addUser($userData)\n {\n $sql = \"SELECT * FROM \" . USERS_TABLE . \" WHERE email = ? OR username = ?\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->bindValue(1, $userData['email']);\n $stmt->bindValue(2, $userData['username']);\n $stmt->execute();\n if($stmt->fetch()) \n return null;\n\n $keys = implode(\",\", array_keys($userData));\n $questionMarks = Database::placeholders($userData);\n \n $sql = \"INSERT INTO \" . USERS_TABLE . \" ($keys) VALUES ($questionMarks)\";\n $stmt = $this->pdo->prepare($sql);\n\n $count=1;\n $userData['pwd'] = $this->hashPassword($userData['pwd']);\n foreach ($userData as $value) {\n $stmt->bindValue($count++, $value);\n }\n\n $stmt->execute();\n return $this->pdo->lastInsertId(); \n }", "title": "" }, { "docid": "8caf6efdb2f0158a3c0636abb99d4826", "score": "0.6409149", "text": "protected function createUser(array $data) \n\t{\n\t\t\n\t\t$user = new User ();\n\t\t$user->exchangeArray($data);\n\t\t$user->setPassword($data['password']);\n \t//$userTable = new UserTable($tableGateway);\n\t\t$userTable = $this->getServiceLocator()->get('UserTable');\n \t$userTable->saveUser($user);\n \treturn true;\n }", "title": "" }, { "docid": "08bac5e156612fd99766805bd7825e4d", "score": "0.64086115", "text": "function addUser() {\n\t\t$this->hashEmail();\n\t\t$this->hashPassword();\n\t\t$stmt = $this->db->prepare('INSERT INTO note_users (UserId, UserEmail, UserPassword) VALUES(:id, :email, :password);');\n\t\t$stmt->execute(array(':id' => $this->emailHash, ':email' => $this->email, ':password' => $this->passwordHash));\n\t\t\n\t\tif($stmt) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "aac31fc3625e9d58421861b0c0137da8", "score": "0.6394506", "text": "protected function _createUser()\n {\n $data = [\n 'email' => 'newuser@email.nl',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }", "title": "" }, { "docid": "0a102962ffc606e4bb460fb94efd058a", "score": "0.6389489", "text": "public function add_user(PDO $conx,$data)\n {\n $returnValue = null;\n\n // section -64--88-56-1-530ab1a6:1720ae78e2d:-8000:0000000000000AE4 begin\n // section -64--88-56-1-530ab1a6:1720ae78e2d:-8000:0000000000000AE4 end\n\n return $returnValue;\n }", "title": "" }, { "docid": "a2da3b1fb4620d41c546e04a8b281a40", "score": "0.63856125", "text": "public function insertAndUpdateUser($requestData) {\n return $this->user->addUser($requestData);\n }", "title": "" }, { "docid": "5d5aeb6f4008be7a085d84b032ebf856", "score": "0.6382736", "text": "function addUser($link,$user)\n\t\t{\n\t\t\t$account_id = mysqli_escape_string($link,$user['account_id']);\n\t\t\t$fname = mysqli_escape_string($link,$user['first_name']);\n\t\t\t$lname = mysqli_escape_string($link,$user['last_name']);\n\t\t\t$birthday = mysqli_escape_string($link,$user['birthday']);\n\t\t\t$sex = mysqli_escape_string($link,$user['sex']);\n\t\t\t$photo = mysqli_escape_string($link,$user['photo']);\n\t\t\t$phone = mysqli_escape_string($link,$user['phone']);\n\t\t\t$sql = 'INSERT INTO profile (account_id,first_name,last_name,birthday,sex,photo,phone_number,num_follower,num_review,num_invited) VALUES ('.$account_id.',\"'.$fname.'\",\"'.$lname.'\",'.$birthday.','.$sex.',\"'.$photo.'\",\"'.$phone.'\",0,0,0)';\n\t\t\tif (mysqli_query($link, $sql)) {\n\t\t\t\t//success\n\t\t\t\treturn \"success\";\n\t\t\t}else{\n\t\t\t\t//error\n\t\t\t\treturn '{\"status\":\"error\",\"message\":\"user not inserted\"}';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "00e657d90d5990aa9c69a0891eb0f76f", "score": "0.6381101", "text": "public function Add($data, $options = array())\n {\n if ( array_key_exists('email',$data) ) {\n $existingUser = $this->FindExistingByEmail($data['email']);\n } else {\n $existingUser = false;\n }\n if ( $existingUser ) throw new Exception(\"Email already in use\");\n // Get extra data types\n $userDataTypes = new UserDataTypes($this->db,$this->app);\n $dataTypes = $userDataTypes->GetAll();\n\n $userDataItems = array();\n if ( is_array($dataTypes) ) {\n foreach ($dataTypes as $dataType)\n {\n $key = $dataType['Name'];\n if ( !isset($data[$key]) )\n {\n // TODO: Add additional checks, validation and sanitization.\n throw new Exception(\"$key does not exist\");\n }\n $userDataItems[] = array\n (\n 'UserDataTypes_id' \t=> $dataType['Id'],\n 'Users_id' \t\t\t=> 0,\n 'Value'\t\t\t\t=> $data[$key],\n );\n }\t\t\n }\n $requiredFields = array('Email','Password','Registration','Languages_id');\n $userId = $this->dbHelper->Add($data,$requiredFields);\n if ( is_array($dataTypes) ) {\n foreach($userDataItems as $userDataItem)\n {\n $userDataItem['Users_id'] = $userId;\n $userDataTypes->Add($userDataItem);\n }\n }\n return $userId;\n }", "title": "" }, { "docid": "02cbdfb92adb3622e51572ffe36bd4dd", "score": "0.63804954", "text": "private function createUserAccount(Request $request){\n\n \tDB::transaction( function () use ($request){\n\n \t\t$user = User::create([\n \t\t\t'name' => $request->name,\n \t\t\t'email' => $request->email\n \t\t]);\n\n \t\t$this->addSocialAccountToUser($request, $user);\n\n \t});\n\n }", "title": "" }, { "docid": "19ecc7f30e5ac1f08636868bbde7fb52", "score": "0.63772964", "text": "public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6c4625ff6ebee51c976b57fe677b26c4", "score": "0.6375486", "text": "function add_user($conn,$email,$username,$salt1,$salt2,$token){\n\t\t$query = \"INSERT INTO account_table (email, username, salt1, salt2, password) VALUES ('$email', '$username','$salt1','$salt2','$token')\";\n\t\tmysqli_query($conn,$query);\n\t}", "title": "" }, { "docid": "92a351411ab4b4ce79df66dae0e53dd4", "score": "0.6373974", "text": "public function insert(User $user, array $data);", "title": "" }, { "docid": "8ca3cd57621daa2ac9688631815f82db", "score": "0.6371214", "text": "function adduser(){\n\t\t\t$db_connection = new mysqli($this->host, $this->user, $this->password, $this->database);\n\t\t\tif ($db_connection->connect_error) {\n\t\t\t\tdie($db_connection->connect_error);\n\t\t\t} else {\n\n\t\t\t}\n\t\t\t$first=trim($_POST[\"first\"]);\n\t\t\t$last=trim($_POST[\"last\"]);\n\t\t\t$username=trim($_POST[\"user\"]);\n\t\t\t$email=trim($_POST[\"email\"]);\n\t\t\t$pw=trim($_POST[\"password\"]);\n\t\t\t$type=trim($_POST[\"type\"]);\n\t\t\t$query = \"insert into tauser (first,last,email,username,password,TA) values('$first','$last','$email','$username','$pw',$type)\";\n\n\t\t\t$result = $db_connection->query($query);\n\t\t\tif (!$result) {\n\t\t\t\tdie(\"Insertion failed: \" . $db_connection->error);\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$db_connection->close();\n\t\t}", "title": "" }, { "docid": "27c47eaec92573b7b113725f29f373b6", "score": "0.6370078", "text": "public function createUser(){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-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_account')){\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, password confirmation from object data\n $rf->removeFields(['csrf_token, passwordc']);\n \n // Perform desired data transformations on required fields. Is this a feature we could add to Fortress?\n $data['user_name'] = strtolower(trim($data['user_name']));\n $data['display_name'] = trim($data['display_name']);\n $data['email'] = strtolower(trim($data['email']));\n $data['active'] = 1;\n \n // Check if username or email already exists\n if (UserLoader::exists($data['user_name'], 'user_name')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_USERNAME_IN_USE\", $data);\n $error = true;\n }\n\n if (UserLoader::exists($data['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $data);\n $error = true;\n }\n \n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primaryGroup = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Set default values if not specified or not authorized\n if (!isset($data['locale']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"locale\"]))\n $data['locale'] = $this->_app->site->default_locale;\n \n if (!isset($data['title']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"title\"])) {\n // Set default title for new users\n $data['title'] = $primaryGroup->new_user_title;\n }\n \n if (!isset($data['primary_group_id']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"primary_group_id\"])) {\n $data['primary_group_id'] = $primaryGroup->id;\n }\n \n // Set groups to default groups if not specified or not authorized to set groups\n if (!isset($data['groups']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"groups\"])) {\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n $data['groups'] = [];\n foreach ($default_groups as $group_id => $group){\n $data['groups'][$group_id] = \"1\";\n }\n }\n \n // Hash password\n $data['password'] = Authentication::hashPassword($data['password']);\n \n // Create the user\n $user = new User($data);\n\n // Add user to groups, including selected primary group\n $user->addGroup($data['primary_group_id']);\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\"){ \n $user->addGroup($group_id); \n }\n }\n \n // Store new user to database\n $user->store(); \n \n // Success message\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_CREATION_COMPLETE\", $data);\n }", "title": "" }, { "docid": "de5884196c5b0668ed03a0dcde80aa89", "score": "0.6367646", "text": "public function store($user_data)\n\t{\n\t\t$new_user = new User;\n\t\t$new_user->role_id \t\t\t= $user_data['role_id'];\n\t\t$new_user->first_name \t\t= (isset($user_data['first_name']) && !empty($user_data['first_name'])) \t\t? $user_data['first_name'] \t: null;\n\t\t$new_user->last_name \t\t= (isset($user_data['last_name']) && !empty($user_data['last_name'])) \t\t\t? $user_data['last_name'] \t: null;\n\t\t$new_user->username \t\t= $user_data['username'];\n\t\t$new_user->password \t\t= (Hash::needsRehash($user_data['password'])) ? Hash::make($user_data['password']) : $user_data['password'];\n\t\t$new_user->email \t\t\t= $user_data['email'];\n\t\t$new_user->birthdate \t\t= (isset($user_data['birthdate']) && !empty($user_data['birthdate'])) \t\t\t? $user_data['birthdate'] \t\t: null;\n\t\t$new_user->phone \t\t\t= (isset($user_data['phone']) && !empty($user_data['phone'])) \t\t\t\t\t? $user_data['phone'] \t\t\t: null;\n\t\t$new_user->facebook \t\t= (isset($user_data['facebook']) && !empty($user_data['facebook']))\t\t\t\t? $user_data['facebook'] \t\t: null;\n\t\t$new_user->twitter \t\t\t= (isset($user_data['twitter']) && !empty($user_data['twitter'])) \t\t\t\t? $user_data['twitter'] \t\t: null;\n\t\t$new_user->profile_image \t= (isset($user_data['profile_image']) && !empty($user_data['profile_image'])) \t? $user_data['profile_image'] \t: null;\n\t\t$new_user->cover_image \t\t= (isset($user_data['cover_image']) && !empty($user_data['cover_image'])) \t\t? $user_data['cover_image'] \t: null;\n\t\t$new_user->cover_text \t\t= (isset($user_data['cover_text']) && !empty($user_data['cover_text']))\t\t\t? $user_data['cover_text'] \t\t: null;\n\t\tif($new_user->save())\n\t\t\treturn $new_user;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "7bec7f6d7fcbd82fe4e3e648fe108a06", "score": "0.63620037", "text": "public static function addAccountdetail($data) {\n\t\tif (!is_array($data)) return false;\n\t\t$data['create_time'] = Common::getTime();\n $data['update_time'] = Common::getTime();\n\t\t$data = self::_cookData($data);\n return $ret = self::_getDao()->insert($data);\n\t}", "title": "" }, { "docid": "66a092bc24f2ab76b3ee47f47b460a2b", "score": "0.63521695", "text": "function addUser($username, $firstName, $lastName, $email, $password, $role): int\r\n {\r\n $password = password_hash($password, PASSWORD_BCRYPT);\r\n return $this->addData('t_user', ['useUsername', 'useFirstName', 'useLastName', 'useEmail', 'usePassword', 'useRole'], [$username, $firstName, $lastName, $email, $password, $role]);\r\n }", "title": "" }, { "docid": "2eba9ffbade72ebf2b838f8227b81fa4", "score": "0.63519466", "text": "public static function addUser($inputRequestData){\n if ($inputRequestData['id'] && $inputRequestData['email']){\n $phoneNum = (empty($inputRequestData['phone'])) ? '' : substr(preg_replace('/[^0-9]/', '', $inputRequestData['phone']), -15);\n $email = $inputRequestData['email'];\n $id = $inputRequestData['id'];\n \n return static::query(\"INSERT INTO gc_users (`email`, `phone`, `id`) VALUES ('$email', '$phoneNum', '$id')\");\n }\n }", "title": "" }, { "docid": "ca7dd456b51cb58d2aa926419ad467fd", "score": "0.63516134", "text": "public function addUser()\n {\n // if we have POST data to create a new user entry\n if (isset($_POST[\"submit_add_user\"])) {\n // do addUser() in model/userModel.php\n // TODO : Retourner une erreur si jamais les champs ne sont pas correctement complétés.\n $this->userModel->addUser($_POST[\"login\"], $_POST[\"password\"], $_POST[\"firstname\"], $_POST[\"lastname\"]);\n }\n // where to go after user has been added\n header('location: ' . URL . 'user/index');\n }", "title": "" }, { "docid": "b7cee459e9e472ebe1ccb478796c060f", "score": "0.63429713", "text": "public function adduser() {\r\n $user = $this->Users->newEntity();\r\n if ($this->request->is('post')) {\r\n $validator = new UsersValidator();\r\n $errors = $validator->errors($this->request->data());\r\n if (empty($errors)) {\r\n $username = $this->Users->getuservalidation($this->request->data); // USER VALIDATION BY EMAIL\r\n if (empty($username)) {\r\n $user = $this->Users->patchEntity($user, $this->request->data);\r\n $user->created = date(\"Y-m-d H:i:s\");\r\n $user->created_by = $this->request->session()->read('Auth.User.id');\r\n if ($this->Users->save($user)) {\r\n $this->Flash->success(__('THE USER HAS BEEN SAVED.'));\r\n return $this->redirect(['action' => 'index']);\r\n } else {\r\n $this->Flash->error(__('UNABLE TO ADD THE USER.'));\r\n }\r\n } else {\r\n $this->Flash->error('EMAIL ID IS ALREAY EXIST. PLEASE, TRY AGAIN LATER!');\r\n }\r\n } else {\r\n $this->set('errors', $errors);\r\n }\r\n }\r\n $this->set('user', $user);\r\n }", "title": "" }, { "docid": "872dd029b2d5bae6c49ddc2674f91096", "score": "0.63406336", "text": "public function useradd(){\n $arr=Input::get();\n unset($arr['_token']);\n unset($arr['checkbox']);\n\n $arr['password'] = password_hash($arr['pwd'],PASSWORD_DEFAULT);\n unset($arr['pwd']);\n $students = DB::select('select * from DS_User where account = '.$arr[\"account\"]);\n if (!empty($students)){\n alert('该用户已存在!','/account',2);\n }\n $ls = DB::table('User')->insert($arr);\n if($ls === false){\n alert('注册失败!','/account',2);\n }\n alert('注册成功!','/login',1);\n }", "title": "" }, { "docid": "d880e28026ec37c470d16f771b134878", "score": "0.63399893", "text": "public function addUser(UserInterface $user);", "title": "" }, { "docid": "ef3ddf0e10e28668eb1601faba7b03e5", "score": "0.63325787", "text": "public function insertUser($data){\t\t\n\t\t$query = \"INSERT INTO final_usuario VALUES ('','\".$data[\"user\"].\"'\n\t\t\t,'\".$data[\"name\"].\"','\".$data[\"pwd\"].\"','\".$data[\"email\"].\"')\";\n\t\treturn $this->con->action($query);\n\t}", "title": "" }, { "docid": "369b47fbd4d233046b9ea7ab281bf3ff", "score": "0.63304424", "text": "function _add_user()\n {\n if (!$this->has_arg('PROJECTID'))\n $this->_error('No project id specified');\n if (!$this->has_arg('PERSONID'))\n $this->_error('No user specified');\n\n $proj = $this->db->pq(\"SELECT p.projectid FROM project p WHERE p.personid LIKE :1 AND p.projectid=:2\", array($this->user->personId, $this->arg('PROJECTID')));\n\n if (!sizeof($proj))\n $this->_error('No such project');\n $proj = $proj[0];\n\n $person = $this->db->pq(\"SELECT CONCAT(CONCAT(givenname, ' '), familyname) as fullname FROM person WHERE personid=:1\", array($this->arg('PERSONID')));\n if (!sizeof($person))\n $this->_error('No such person');\n $person = $person[0];\n\n $this->db->pq(\"INSERT INTO project_has_person (projectid, personid) VALUES (:1, :2)\", array($this->arg('PROJECTID'), $this->arg('PERSONID')));\n\n $this->_output(array('FULLNAME' => $person['FULLNAME']));\n }", "title": "" }, { "docid": "496be02d1df8e4ac76db6708bc1f2e21", "score": "0.63293695", "text": "protected function create(array $data)\n {\n $account_id = 1;\n\n $language = config('system.default_language');\n $verification_code = str_random(32);\n\n $user = User::create([\n 'account_id' => $account_id,\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'language' => $language,\n 'locale' => $language,\n 'signup_ip_address' => request()->ip(),\n 'verification_code' => $verification_code,\n 'active' => true,\n ]);\n\n // Assign default role\n $default_role = \\App\\Role::find(config('system.default_signup_role'));\n $user->assignRole($default_role);\n\n // Log\n Core\\Log::add(\n 'signup', \n trans('g.log_user_signed_up', ['name' => $user->name . ' (' . $user->email . ')']),\n '\\App\\User',\n $user->id,\n $user,\n $account_id\n );\n\n // Send verification email\n $verification_url = url('email/verify/' . $verification_code);\n Mail::to($data['email'])->send(new VerifyEmail($verification_url, $data['name']));\n\n return $user;\n }", "title": "" }, { "docid": "9928ae8138b4db971f9077eb51bda9e2", "score": "0.63262403", "text": "public function createAccount($obj){\n\n $userExists = emailExists($obj);\n\n\n\n if($userExists){\n\n echo $this->error(\"Create Account\",\"The user already exists\");\n\n die();\n\n }\n\n\n\n\n\n //IF SUCCESS CREATE USER PROFILE RECORD\n\n $createdProfile = insertUserProfile($obj);\n\n\n\n //IF SUCCESS CREATE CREDENTIALS RECORD\n\n if($createdProfile){\n\n $createdCredentials = insertCredentials($obj);\n\n if($createdCredentials){\n\n $token = generateVerify($obj->id,$obj->email,$obj->contact );\n\n sendToken($token,$obj->email,$obj->name);\n\n echo $this->success(\"Create Account\",\"The account was successfully created for the user\");\n\n die();\n\n }\n\n\n\n else\n\n echo $this->error(\"Create Account\", \"Error in adding the credentials provided\");\n\n }\n\n else{\n\n echo $this->error(\"Create Account\", \"Error in creating user profile\");\n\n }\n\n }", "title": "" } ]
9d5fac5adfc30d98152dbc27a9199553
This method return the data of the model
[ { "docid": "f79dd7af8e01728ede733611f869f3e4", "score": "0.0", "text": "public function __invoke(ManageCustomergroupRequest $request)\n {\n //\n $core = $this->customergroup->getForDataTable();\n return Datatables::of($core)\n ->escapeColumns(['id'])\n ->addIndexColumn()\n ->addColumn('title', function ($customergroup) {\n return '<a class=\"font-weight-bold\" href=\"' . route('biller.customers.index') . '?rel_type=0&rel_id=' . $customergroup->id . '\">' . $customergroup->title . '</a>';\n })\n ->addColumn('total', function ($customergroup) {\n return $customergroup->customers->count('id');\n })\n ->addColumn('discount', function ($customergroup) {\n return numberFormat($customergroup->disc_rate) . '%';\n })\n ->addColumn('created_at', function ($customergroup) {\n return dateFormat($customergroup->created_at);\n })\n ->addColumn('actions', function ($customergroup) {\n return '<a class=\"btn btn-purple round\" href=\"' . route('biller.customers.index') . '?rel_type=0&rel_id=' . $customergroup->id . '\" title=\"List\"><i class=\"fa fa-list\"></i></a>' . $customergroup->action_buttons;\n })\n ->make(true);\n }", "title": "" } ]
[ { "docid": "caf7e44152d7c60d3da12e1a2c2fa206", "score": "0.8381504", "text": "public function data(){\n return $this->call('GET', $this->model_name.'/'.$this->id.'/data');\n }", "title": "" }, { "docid": "6f8afa996a2d901f23d66aec51653c04", "score": "0.79741377", "text": "private function get_data()\n\t{\n\t\treturn $this->member_model->get_data();\n\t\n\t}", "title": "" }, { "docid": "ce546b5572dc59d007774dbdb75a6667", "score": "0.78828937", "text": "public function get_data() {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "91b85c8d36eb6d924fcef2b262625b3f", "score": "0.7848946", "text": "public function get_data() {\n return $this->data;\n }", "title": "" }, { "docid": "2fafa26011f134e5076f563aebc5def8", "score": "0.78268194", "text": "function get_data() {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "e74f200689e8886424bf41cecfdaa210", "score": "0.7799286", "text": "public function Data() {\n\t\tif (is_null($this->_ModelData)) {\n\t\t\t$ModelDataClassName = \\Finder::getFriendClassOf($this, 'Data', 'Model');\n\t\t\t$this->_ModelData = new $ModelDataClassName($this);\n\t\t}\n\t\treturn $this->_ModelData;\n\t}", "title": "" }, { "docid": "b544bc872517ea7034b3dc66ef2d7d85", "score": "0.77972853", "text": "public function get_data()\r\n {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "2afef9f121f18f13c9c0aeb4ff01cef5", "score": "0.77343804", "text": "function getData(){\n\t\t\treturn $this->data;\n\t\t}", "title": "" }, { "docid": "6df94549d98ec833d06cca986832bd80", "score": "0.7733755", "text": "public function get_data() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "6df94549d98ec833d06cca986832bd80", "score": "0.7733755", "text": "public function get_data() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "144fc459f75a3a2d1c45b8e565ae47d7", "score": "0.7732646", "text": "public function get_data() {\n\n\t\treturn $this->data;\n\n\t}", "title": "" }, { "docid": "d03362d796de1ddafbd8ad792c113709", "score": "0.7699052", "text": "public function getData(){\n return($this->data);\n }", "title": "" }, { "docid": "117bf3b1af84f0208674f697a0ec19e6", "score": "0.76605844", "text": "public function getData(){\n // $data = array('name'=>'the king of forest');\n // $result = self::create($data);\n $result = $this->find(1);\n return $result;\n }", "title": "" }, { "docid": "bc1390cc61a79cc95ee4c0291a2748cb", "score": "0.76430225", "text": "public function get_data()\n {\n return $this->m_data;\n }", "title": "" }, { "docid": "5b0f309678831798b6f7a2084c136e9e", "score": "0.7630959", "text": "public function GetData(){\n return $this->data;\n }", "title": "" }, { "docid": "9cc24f6d91bea0de527b233007b51a7f", "score": "0.75947976", "text": "function getData() {\n\treturn $this->data;\n }", "title": "" }, { "docid": "a877b50d5ae56b18ef7ca93671106b78", "score": "0.758659", "text": "protected function getData() {\n\n return $this->data;\n\n }", "title": "" }, { "docid": "268c9008a50f7cb08308c453890367f4", "score": "0.7569349", "text": "protected function get_data() {\n return $this->_data;\n }", "title": "" }, { "docid": "a1db76cb268c967c2e2a80e89a83e385", "score": "0.75242656", "text": "public function GetData(){\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "c527139d171255c9630570478603b291", "score": "0.7518369", "text": "public function data ()\n {\n return $this->__data;\n }", "title": "" }, { "docid": "2aa60940d8d97c5036238d61d8f87ecb", "score": "0.75140905", "text": "public function getData()\n {\n return $this;\n }", "title": "" }, { "docid": "7cb63e7356661b7157b48c237d95fe3e", "score": "0.74867624", "text": "public function getData() {\n\n return $this->data;\n }", "title": "" }, { "docid": "02b91ef60140026d242a7c4ab5fa4516", "score": "0.74766344", "text": "public function data()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "02b91ef60140026d242a7c4ab5fa4516", "score": "0.74766344", "text": "public function data()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "9767e3dacb0d3ada15b48559c06e0bb0", "score": "0.74709815", "text": "public function getData() {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "7e7d3f5b6f7cd2ec664e73a59f668eff", "score": "0.74600583", "text": "public function getData()\n {\n $data = $this->only(['name','slug','detail','is_active']);\n return $data;\n }", "title": "" }, { "docid": "52911d23e4c54e00884022dfb99df8db", "score": "0.74504507", "text": "function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "c4afaf08945c34ab90ca5334285e2b6c", "score": "0.74478525", "text": "public function data() \n\t{\n return $this->_data;\n }", "title": "" }, { "docid": "f2bcd6787d8ce362e5abbb4a366bd63e", "score": "0.7447455", "text": "public function getData() \n\t{\n\t\t return $this->data; \n\t}", "title": "" }, { "docid": "ece462d3b82c99b45e36c9bbc45a8bcc", "score": "0.7432097", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "ece462d3b82c99b45e36c9bbc45a8bcc", "score": "0.7432097", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "ebf9d0c8d05ba40587846f23517a4a77", "score": "0.74240863", "text": "public function getData ()\n {\n return $this->data;\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.742006", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.742006", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.7420005", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.7420005", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.7419471", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.7417448", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "14b76deb3f27dc009eaf5b3b6a1d8bff", "score": "0.7397555", "text": "public function getData()\n\t{\n\t\treturn $this->data; \n\n\t}", "title": "" }, { "docid": "d63f0439394bc1c38d7a5577443b9d7a", "score": "0.7393829", "text": "protected function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8025ffda0758dd1f1a46e5f481c0af6", "score": "0.73898107", "text": "public function getData() {\n\n return $this->Data;\n\n }", "title": "" }, { "docid": "b29bba727a73af249429d4bcc20bccff", "score": "0.7385254", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "b29bba727a73af249429d4bcc20bccff", "score": "0.7385254", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "370cbc928fa49ce23db0b37abcd1ed86", "score": "0.737968", "text": "public function getData(){\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "6a5e8b5c1de65f2ae9901b38729c1927", "score": "0.7379183", "text": "public function getData()\r\n {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "6a5e8b5c1de65f2ae9901b38729c1927", "score": "0.7379183", "text": "public function getData()\r\n {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "880f0ad7c078e5a3ce82a49534e61999", "score": "0.7334342", "text": "public function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "5d011e8d705a77d600ea09c20a5be8a0", "score": "0.7297147", "text": "public function data()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "5d011e8d705a77d600ea09c20a5be8a0", "score": "0.7297147", "text": "public function data()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "cdf252a4b0527e0554ef5e82ee413df3", "score": "0.72881156", "text": "public function get_data();", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.7281877", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.7281877", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.7281877", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.7281877", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.7281877", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.7281877", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "bd27a0cf1ddcbd627147f063fd14f634", "score": "0.7262368", "text": "public function getData() {\n\n\t\treturn $this->data;\n\n\t}", "title": "" }, { "docid": "2c8aeb9c5d3a63b2c8ccb83340a92341", "score": "0.72424656", "text": "public function getData() {\r\n return $this->_data;\r\n }", "title": "" }, { "docid": "4735f5eaea4d72e46f161f876532f2b0", "score": "0.7238604", "text": "public function data()\n {\n return $this->toArray($withItems = false);\n }", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.7231345", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.7231345", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.7231345", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.7231345", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" } ]
098a343abe0862f7b3665de89f8919e4
XML_DTD_XmlElement::getChildrenNames() Returns the names of the children of current XML element.
[ { "docid": "7063bd22205816ea7c95dc65d6b70369", "score": "0.756083", "text": "function getChildrenNames()\n {\n $return = array();\n foreach ($this->children as $child) {\n $return[] = $child->name;\n }\n return $return;\n }", "title": "" } ]
[ { "docid": "73561204a20750c938347660a014408b", "score": "0.7554236", "text": "public function getChildrenNames();", "title": "" }, { "docid": "f46c7684d582d17ff1d8fbd9a07a5358", "score": "0.6600317", "text": "function getChildNames($children) \n{\n $child_names = [];\n foreach ($children as $child)\n $child_names[] = $child->getName();\n\n return $child_names;\n}", "title": "" }, { "docid": "b658bdfc9e9b43292cef52cfeb6b0626", "score": "0.6559353", "text": "public function getElementNames()\n {\n return array_keys($this->elements);\n }", "title": "" }, { "docid": "b658bdfc9e9b43292cef52cfeb6b0626", "score": "0.6559353", "text": "public function getElementNames()\n {\n return array_keys($this->elements);\n }", "title": "" }, { "docid": "74e785edd708ed9b464c92d9fd41b2d5", "score": "0.6225863", "text": "protected function getChildren() {\n $children = \"\";\n foreach($this->children as $key=>$val) {\n $children .= $val->getXML();\n }\n return $children;\n\n }", "title": "" }, { "docid": "22d69b260466336f729cdb9d65b7ee40", "score": "0.6070832", "text": "function getNames()\n {\n return $this->structureAdapter->getItemNames();\n }", "title": "" }, { "docid": "4874fc89156d84963c7c954b31f5775c", "score": "0.5878981", "text": "public function getUiElementNames()\n {\n if (array_key_exists(\"uiElementNames\", $this->_propDict)) {\n return $this->_propDict[\"uiElementNames\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b006cbc246d2a459e91280c4c47cb809", "score": "0.57845116", "text": "public function names(): array\n {\n\n return \\array_keys( $this->_attributes );\n\n }", "title": "" }, { "docid": "4be068797d751d0740c3a7e929101791", "score": "0.5765376", "text": "public function getNames()\n {\n return array_keys($this->container);\n }", "title": "" }, { "docid": "ad8e2545e8166183eca208753e7293d0", "score": "0.57452464", "text": "public function getAttributeNames()\n {\n return array_map( function($value) { return $value->getName(); }, $this->getAttributes() );\n }", "title": "" }, { "docid": "ebd9636fd84a6a895c3935352ac42b09", "score": "0.5710977", "text": "public function itemNames() {\n return $this->_itemNames;\n }", "title": "" }, { "docid": "bd1d5300dcbf22bc657dc6f2a887daca", "score": "0.56909215", "text": "public function getNames();", "title": "" }, { "docid": "bd1d5300dcbf22bc657dc6f2a887daca", "score": "0.56909215", "text": "public function getNames();", "title": "" }, { "docid": "bd1d5300dcbf22bc657dc6f2a887daca", "score": "0.56909215", "text": "public function getNames();", "title": "" }, { "docid": "947dd422a72df7d19c4d9758be558d8a", "score": "0.568348", "text": "abstract public function getAttributeNames();", "title": "" }, { "docid": "0063161f91e9e27501ebfc1269831fad", "score": "0.5670637", "text": "public function getAttributeNames()\n {\n return array_keys($this->attributes);\n }", "title": "" }, { "docid": "bd16e084585d2e15139e8f9f8e0c2963", "score": "0.56575274", "text": "public function names()\n\t{\n\t\t$names = array();\n\n\t\tforeach ($this->items as $item)\n\t\t{\n\t\t\t$names[] = $item->name;\n\t\t}\n\n\t\treturn array_values($names);\n\t}", "title": "" }, { "docid": "f0b4d8c64339706176824ba9398c2a46", "score": "0.5625652", "text": "public function getNames()\n {\n return $this->names;\n }", "title": "" }, { "docid": "f0b4d8c64339706176824ba9398c2a46", "score": "0.5625652", "text": "public function getNames()\n {\n return $this->names;\n }", "title": "" }, { "docid": "f0b4d8c64339706176824ba9398c2a46", "score": "0.5625652", "text": "public function getNames()\n {\n return $this->names;\n }", "title": "" }, { "docid": "f0b4d8c64339706176824ba9398c2a46", "score": "0.5625652", "text": "public function getNames()\n {\n return $this->names;\n }", "title": "" }, { "docid": "f0b4d8c64339706176824ba9398c2a46", "score": "0.5625652", "text": "public function getNames()\n {\n return $this->names;\n }", "title": "" }, { "docid": "f0b4d8c64339706176824ba9398c2a46", "score": "0.5625652", "text": "public function getNames()\n {\n return $this->names;\n }", "title": "" }, { "docid": "6c4c9af600c6cdb82380cbef982ca404", "score": "0.56045586", "text": "public function getAttributeNames()\n {\n return array_keys($this->m_attrs);\n }", "title": "" }, { "docid": "df6e972b82bf79829249927b22d3a7c1", "score": "0.5597315", "text": "public function getAttributeNames() {\r\n\t\treturn(array_keys($this->aAttributes));\r\n\t}", "title": "" }, { "docid": "d98a41b36c412ae22c11918cef3c9436", "score": "0.5586124", "text": "public function getNames() {\n return array_keys($this->_fs);\n }", "title": "" }, { "docid": "ef39a687d9c5db697b85cafe5c36918a", "score": "0.5575937", "text": "public function getNames() {\n return $this->names;\n }", "title": "" }, { "docid": "ef39a687d9c5db697b85cafe5c36918a", "score": "0.5575937", "text": "public function getNames() {\n return $this->names;\n }", "title": "" }, { "docid": "ef39a687d9c5db697b85cafe5c36918a", "score": "0.5575937", "text": "public function getNames() {\n return $this->names;\n }", "title": "" }, { "docid": "eb8b54e71d4648a0bf40d2c7dafe165e", "score": "0.5564619", "text": "public function userform_get_root_elements_name() {\n $elementnames = array();\n $elementnames[] = $this->itemname;\n if (!$this->hiddenfield) {\n $elementnames[] = $this->itemname.'_static';\n }\n\n return $elementnames;\n }", "title": "" }, { "docid": "405cc1501d43f502471a7c0b15d05301", "score": "0.55555403", "text": "public function getFieldNames()\n {\n $ret = array();\n\n foreach($this->fields as $field)\n {\n $ret[] = $field->name;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "fa4f88184a1efbf942a8adbb3726c079", "score": "0.5544699", "text": "public function getChildNodes()\n {\n return $this->element->childNodes;\n }", "title": "" }, { "docid": "70ba27fa8395d6d5f2c69c2c818f812f", "score": "0.5503485", "text": "public function getChildren(){\n\t\treturn implode(',', $this->getResource()->getChildren($this, false));\n\t}", "title": "" }, { "docid": "8e8be1a681ca304ae3afba80fa06843c", "score": "0.54985774", "text": "public function children() {\n\t\treturn $this->get_children();\n\t}", "title": "" }, { "docid": "13a364ef68ac860a18843a9c407ef3be", "score": "0.5479251", "text": "public function getChildren() {\r\n\r\n $nodes = array();\r\n foreach(scandir($this->path) as $node) \r\n\t\t\tif($node!='.' && $node!='..') \r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tif($this->encoding != null)\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t{\t\r\n\t\t\t\t\t\t\t$node = mb_convert_encoding($node, 'UTF-8', $this->encoding); \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\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(Esception $encE)\r\n\t\t\t\t\t{}\r\n\t\t\t\t\t$nodes[] = $this->getChild($node);\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Sabre_DAV_Exception_FileNotFound $e)\r\n\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n return $nodes;\r\n\r\n }", "title": "" }, { "docid": "4d93dd2f7238bd013cfa3eb772e6b76d", "score": "0.54608136", "text": "public function getFieldNames() {\n $fieldNames = array();\n foreach ($this->getFields() as $field) {\n $fieldNames[$field->getName()] = $field->getName();\n }\n if ($this->extends) {\n $fieldNames = array_merge($fieldNames, $this->extends->getFieldNames());\n }\n return $fieldNames;\n }", "title": "" }, { "docid": "e8ab3642dd79a4c583eada3f314baa89", "score": "0.53873444", "text": "public static function getNames(): array\n {\n static::setup();\n\n return static::$enumeration['names'];\n }", "title": "" }, { "docid": "2ebfbba20b18f57001284e6976d3feaa", "score": "0.5377758", "text": "public function get_children() {\n\n\t\treturn $this->children;\n\n\t}", "title": "" }, { "docid": "774376026efe1c1942e1d3d981dc5a0e", "score": "0.53620917", "text": "public function getFieldNames()\n {\n return $this->metadata->getFieldNames();\n }", "title": "" }, { "docid": "298adc8e0dd51d0129d05e7053ec8f05", "score": "0.53451896", "text": "public function tagNames(): array;", "title": "" }, { "docid": "4712d4383ef3ad4134917744f554ec12", "score": "0.53382516", "text": "public function getChildren()\n {\n return $this->_nodes;\n }", "title": "" }, { "docid": "86a714db883f0960d7df3440ecd9db2c", "score": "0.53270084", "text": "public function getNamedChildCount(): int\n {\n return API::ffi()->ts_node_named_child_count($this->data);\n }", "title": "" }, { "docid": "7c0c7fea42bc51b529703cc3e34d3167", "score": "0.5322712", "text": "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "title": "" }, { "docid": "b40ca401cea9d059333d5682c5c29986", "score": "0.53227055", "text": "public function getTagNamesAttribute(): array\n {\n return $this->tagNames();\n }", "title": "" }, { "docid": "8e4b139a159e29a7216f6f7623dbe54d", "score": "0.5316117", "text": "protected function getFieldNames()\n {\n return array_keys($this->getFields());\n }", "title": "" }, { "docid": "0ca956c585f64a49f2d09c6ddcb2fe6b", "score": "0.53129363", "text": "public function getAttributeNames() {\n $result = array();\n foreach($this->fields as $key => $value) {\n $result[] = $key;\n }\n return $result;\n }", "title": "" }, { "docid": "3bb4044cca8768a4a2aecf07501cd973", "score": "0.53120124", "text": "public function getChildren()\n {\n return Sname::where('parent_id', $this->id)->get();\n }", "title": "" }, { "docid": "1ced4f4beeb4704577918a387cc8115c", "score": "0.53063846", "text": "protected function getNames(): array\n {\n return $this->names;\n }", "title": "" }, { "docid": "30389a99f4f4cef67cbc0cb5b6ca3816", "score": "0.5301286", "text": "public function names()\n {\n return $this->getSNMP()->walk1d( self::OID_IF_NAME );\n }", "title": "" }, { "docid": "c99a1c292f4c456cae86c5f74561024c", "score": "0.5270953", "text": "public function getNameValueList()\n {\n return $this->nameValueList;\n }", "title": "" }, { "docid": "f139d185b4ae2406b437d425eaa08c6f", "score": "0.5257375", "text": "public function get_fields_names()\n {\n $names = array();\n foreach ( $this->fields as $f )\n array_push( $names, $f[ 'name' ] );\n\n return $names;\n }", "title": "" }, { "docid": "0fdd7f38fe51cd6da5584effbaef61eb", "score": "0.52484834", "text": "public function getChildren() {\n\t\treturn $this->children;\n\t}", "title": "" }, { "docid": "cc68399ef086530170d5b5607b32a1d8", "score": "0.52396536", "text": "function getChildNodes() {\n\t}", "title": "" }, { "docid": "e5bdbc4a54c58161360c7cd1c540dab4", "score": "0.5235751", "text": "public static function getFieldNames() {\n\t\treturn self::$field_names;\n\t}", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "cc59898c2641b882d80a833fda0b8aaf", "score": "0.5231333", "text": "public function getChildren()\n {\n return $this->children;\n }", "title": "" }, { "docid": "dad153986b382cf6bb30a475f7b2e94e", "score": "0.5229019", "text": "public function fieldNames(){\n\t\t$res = array();\n\t\tif(!($this->Query_ID)){\n\t\t\treturn $res;\n\t\t}\n\t\t$count = $this->num_fields();\n\t\tfor($i = 0; $i < $count; $i++){\n\t\t\t$res[$i] = $this->field_name($i);\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "1a90eadead28db8766ae1ddd8ca0c9e0", "score": "0.52253807", "text": "public function getChildren() {\r\n return $this->getChildrenAL();\r\n }", "title": "" }, { "docid": "a1551c1d5b52bd82f290931ee3ec59ff", "score": "0.5224475", "text": "function GetChildren()\n\t{\n\t\t$children = array();\n\t\t$p = $this->child;\n\t\tif ($p)\n\t\t{\n\t\t\tarray_push($children, $p);\n\t\t\t$p = $p->sibling;\n\t\t\twhile ($p)\n\t\t\t{\n\t\t\t\tarray_push($children, $p);\n\t\t\t\t$p = $p->sibling;\n\t\t\t}\n\t\t}\n\t\treturn $children;\n\t}", "title": "" }, { "docid": "a1f53aa1fb1bab11f380b66741447c8c", "score": "0.5211571", "text": "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "title": "" }, { "docid": "7497629a36a7be5ad6ac63b9b75cecb8", "score": "0.52006024", "text": "public function getChildName()\n {\n return $this->childName;\n }", "title": "" }, { "docid": "de9a87c6d3346233eb9d95db9ba1ffde", "score": "0.51965797", "text": "public function tagNames(): array\n {\n return $this->tagged->map(function($item){\n return $item->tag_name;\n })->toArray();\n }", "title": "" }, { "docid": "f9300c1d01501d0f23cc0b511186658c", "score": "0.51759815", "text": "public function getChildren() {\n return $this->_item->getChildren()->toArray();\n }", "title": "" }, { "docid": "5a75716cb9d79534d9b15ecabb92db5e", "score": "0.51759726", "text": "public function getEventNames() {\n\t\treturn $this->eventNames;\n\t}", "title": "" }, { "docid": "89be78b6fa225e953140f3eaca5660b2", "score": "0.5170091", "text": "final public function getChildren() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f763d1f64956f6dfe9d157577f9b13d4", "score": "0.51677763", "text": "public function getChildren()\n {\n return self::$cacheStore->getNodeChildren($this);\n }", "title": "" }, { "docid": "931b30bba55646ed785262f356db4597", "score": "0.51620793", "text": "public function get_children()\n {\n // {\n // if (! isset($this->children))\n // {\n //\n // }\n // }\n // else\n // {\n // $this->children = array();\n // }\n return $this->children;\n }", "title": "" }, { "docid": "633ea723149c4c514ea0db2bb94b66e4", "score": "0.5157773", "text": "public function getAttrNames()\n\t{\n\t\tif (!$this->attrNames) {\n\t\t\t//for unit tests:\n\t\t\t$rules = $this->rules();\n\t\t\t$this->attrNames = is_array($rules) ? array_keys($rules) : [];\n\t\t}\n\n\t\treturn $this->attrNames;\n\t}", "title": "" }, { "docid": "1bae879e71315a865f167ebf2f93db48", "score": "0.51570696", "text": "public function get_all_tag_names()\n\t\t{\n\t\t\t$offset = 0;\n\t\t\t$tag_name_found = false;\n\t\t\t$tag_names = array();\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$tag_info = $this->get_next_tag_name($offset);\n\t\t\t\tif ($tag_info !== false)\n\t\t\t\t{\n\t\t\t\t\t$tag_name_found = true;\n\t\t\t\t\tarray_push($tag_names, $tag_info['name']);\n\t\t\t\t\t$offset = $tag_info['position'] + 1;\n\t\t\t\t}\n\t\t\t} while ($tag_info !== false);\n\t\t\tif ($tag_name_found === true)\n\t\t\t{\n\t\t\t\t$tag_names = array_unique($tag_names);\n\t\t\t\tasort(&$tag_names);\n\t\t\t\treturn $tag_names;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "169eb1b57094c26a1ed4cc1107442c57", "score": "0.51508963", "text": "public function getTagNames()\n {\n $tags = $this->getTags();\n $returnTags = [];\n foreach ($tags as $tag) {\n array_push($returnTags, $tag->tag);\n }\n return $returnTags;\n }", "title": "" }, { "docid": "c6efc21554c92b46a23ba02a8584aa55", "score": "0.51426697", "text": "public function getName()\n {\n return $this->element->getAttribute('name');\n }", "title": "" }, { "docid": "ae248599a001fca02d9604d305ca52ef", "score": "0.5123903", "text": "function GetFieldNames()\n\t{\n\t\treturn DBxp::GetFieldNames ( $this->m_tableName );\n\t}", "title": "" }, { "docid": "735e9808a52efc980b06bb29d6cda05d", "score": "0.5115406", "text": "function next_child_name($node) {\n\t$nextNode = $node->nextSibling;\n\twhile ($nextNode != null) {\n\t\tif ($nextNode instanceof DOMElement)\n\t\t\tbreak;\n\t\t$nextNode = $nextNode->nextSibling;\n\t}\n\t$nextName = null;\n\tif ($nextNode instanceof DOMElement && $nextNode != null)\n\t\t$nextName = strtolower($nextNode->nodeName);\n\n\treturn $nextName;\n}", "title": "" }, { "docid": "1de173c5d542e2037fb7a04ac9238ca2", "score": "0.5093525", "text": "public function getChildName();", "title": "" }, { "docid": "824eb54930e0cd5f99011dea98b33a04", "score": "0.50910956", "text": "public function getChildren(): array\n {\n return $this->children;\n }", "title": "" }, { "docid": "824eb54930e0cd5f99011dea98b33a04", "score": "0.50910956", "text": "public function getChildren(): array\n {\n return $this->children;\n }", "title": "" }, { "docid": "76a21b2cecc6736b1767d5812dbd081e", "score": "0.5088507", "text": "public static function getChildren(DOMNode $node, $name)\n {\n $children = [];\n foreach ($node->childNodes as $child) {\n if ($child instanceof DOMElement && $child->localName === $name) {\n $children[] = $child;\n }\n }\n\n return $children;\n }", "title": "" }, { "docid": "d852a34f4639c244112d49f9df64f54b", "score": "0.5088238", "text": "public function getComplexElementChildren()\n {\n $complexTypeElements = array();\n foreach ($this->children as $child) {\n if ($child instanceof ComplexTypeElement) {\n $complexTypeElements[] = $child;\n }\n }\n return $complexTypeElements;\n }", "title": "" }, { "docid": "8e4b0617e818d231b11f3a8727fbb476", "score": "0.5086389", "text": "public static function attributeNames();", "title": "" }, { "docid": "6b03a99d25a895ae4a715125a85596d7", "score": "0.50863117", "text": "public function listNames(): array\n {\n return array_keys($this->values);\n }", "title": "" }, { "docid": "056efc2ab3abed1ca61923c4b041f73a", "score": "0.508403", "text": "function getHeaders() {\n if (!($h= &$this->_headerElement())) return NULL;\n \n // Go through all children\n $headers= array();\n foreach (array_keys($h->children) as $idx) {\n $headers[]= &SOAPHeaderElement::fromNode(\n $h->children[$idx], \n $this->namespaces,\n $this->encoding\n );\n }\n \n return $headers;\n }", "title": "" }, { "docid": "d46913d6218b4acefa799d4b429c1ba6", "score": "0.50724995", "text": "public function getGroupNames()\n {\n $names = array();\n foreach ($this->getGroups() as $group) {\n $names[] = $group->getName();\n }\n\n return $names;\n }", "title": "" }, { "docid": "9bdbd33bfd35ec69c0c6793363a82d56", "score": "0.5063378", "text": "public function attributeNames()\n {\n return $this->__model->i18nAttributes();\n }", "title": "" }, { "docid": "005d1b9d2ba634b5a89475f89eefd7e0", "score": "0.5055398", "text": "public function getNameTagName()\n {\n return $this->nameTagName;\n }", "title": "" }, { "docid": "0df9d2cf0ece3ccf4fe0d6089ddf9763", "score": "0.5045059", "text": "public function getName()\n\t{\n\t\treturn $this->element->getAttribute('name');\n\t}", "title": "" }, { "docid": "2d3bea72f17cb2566cd39e080b4b7ef2", "score": "0.5034895", "text": "public function getChildren();", "title": "" }, { "docid": "2d3bea72f17cb2566cd39e080b4b7ef2", "score": "0.5034895", "text": "public function getChildren();", "title": "" }, { "docid": "2d3bea72f17cb2566cd39e080b4b7ef2", "score": "0.5034895", "text": "public function getChildren();", "title": "" }, { "docid": "2d3bea72f17cb2566cd39e080b4b7ef2", "score": "0.5034895", "text": "public function getChildren();", "title": "" }, { "docid": "2d3bea72f17cb2566cd39e080b4b7ef2", "score": "0.5034895", "text": "public function getChildren();", "title": "" }, { "docid": "eb2ca21163d682cf05cfe4d6ce168668", "score": "0.5028996", "text": "public function getChilds()\n {\n return $this->fields['childs'];\n }", "title": "" }, { "docid": "b67512ae3aa8cfc36e4e3dc8bdd1c4f6", "score": "0.5020693", "text": "public function getAllCrimeNames() {\n $crimes = $this->configXml->getElementsByTagName(\"Crime\");\n $crimeNames = array();\n\n foreach ($crimes as $crime) {\n $crimeNames[] = $crime->getAttribute(\"name\");\n }\n\n return $crimeNames;\n }", "title": "" }, { "docid": "47bf7725320d3f56c2ea7dcf03829995", "score": "0.5012925", "text": "public function getChildrenTypes()\n {\n return array(\n 'string',\n 'WsdlToPhp\\\\PhpGenerator\\\\Element\\\\PhpAnnotationBlock',\n 'WsdlToPhp\\\\PhpGenerator\\\\Element\\\\PhpVariable',\n );\n }", "title": "" } ]
d1f99413f36ef77ef04bbed555c22b2f
Return button with dropdown list of conditions for form filter input field.
[ { "docid": "32dda4e3808157c73ac7684f58283c54", "score": "0.0", "text": "protected function _getBtnCondition($inputCondField = null, $options = null, $title = null, $disabled = false) {\n\t\t$result = '';\n\t\tif (empty($inputCondField) || empty($options) ||\n\t\t\t!is_array($options)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\t$optionsDefault = $this->_getOptionsForElem('getBtnCondition');\n\t\t$condOptions = [\n\t\t\t'options' => $options,\n\t\t\t'title' => $title,\n\t\t] + $optionsDefault;\n\t\t$condOptions = $this->_initInputField($inputCondField, $condOptions);\n\t\t$this->ExtBs3Form->unlockField($inputCondField);\n\t\t$result = $this->ExtBs3Form->input($inputCondField, $condOptions);\n\n\t\treturn $result;\n\t}", "title": "" } ]
[ { "docid": "9bce3d663c5700772856c5269b88d653", "score": "0.73818207", "text": "public function filterButtons() {\n\t\t$output = $this->Form->submit(__('Filter'), array('div' => false, 'name' => 'data[Filter][filter]'));\n\t\t$output .= $this->Form->submit(__('Reset'), array('div' => false, 'name' => 'data[Filter][reset]'));\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "22349bf2f03456306ead5d94b460f31b", "score": "0.6908229", "text": "private function filterOptions(){\n $request = new Request();\n\n $key = $request->query->get('key') ? $this->global_helper_service->cleanDataInput($request->query->get('key')) : '';\n $date_range = $request->query->get('date_range') ? $request->query->get('date_range') : '';\n $status = $request->query->get('status') != '' ? (int)$this->global_helper_service->cleanDataInput($request->query->get('status')) : '';\n\n $array_filters = array();\n\n $array_filters['key'] = array(\n 'type' => 'input',\n 'title' => 'Search',\n 'default_value' => $key\n );\n\n $array_filters['status'] = array(\n 'type' => 'select',\n 'title' => 'Status',\n 'options' => array(\n '' => 'Choose status',\n 0 => 'UnPublish',\n 1 => 'Publish',\n ),\n 'default_value' => $status\n );\n\n $array_filters['date_range'] = array(\n 'type' => 'date_picker',\n 'title' => 'Date Range',\n 'options' => '',\n 'default_value' => $date_range\n );\n\n return $this->admincp_service->handleElementFormFilter($array_filters);\n }", "title": "" }, { "docid": "b6ff4431226967b484341b9251f89fe4", "score": "0.6677517", "text": "function ekmod_filter_form() {\n $session = isset($_SESSION['ekmod_overview_filter']) ? $_SESSION['ekmod_overview_filter'] : array();\n $filters = ekmod_filters();\n\n $i = 0;\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n '#theme' => 'exposed_filters__node',\n );\n foreach ($session as $filter) {\n list($type, $value) = $filter;\n if ($type == 'term') {\n // Load term name from DB rather than search and parse options array.\n $value = module_invoke('taxonomy', 'term_load', $value);\n $value = $value->name;\n }\n elseif ($type == 'language') {\n $value = $value == LANGUAGE_NONE ? t('Language neutral') : module_invoke('locale', 'language_name', $value);\n }\n else {\n $value = $filters[$type]['options'][$value];\n }\n $t_args = array('%property' => $filters[$type]['title'], '%value' => $value);\n if ($i++) {\n $form['filters']['current'][] = array('#markup' => t('and where %property is %value', $t_args));\n }\n else {\n $form['filters']['current'][] = array('#markup' => t('where %property is %value', $t_args));\n }\n if (in_array($type, array('type', 'language'))) {\n // Remove the option if it is already being filtered on.\n unset($filters[$type]);\n }\n }\n\n $form['filters']['status'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('clearfix')),\n '#prefix' => ($i ? '<div class=\"additional-filters\">' . t('and where') . '</div>' : ''),\n );\n $form['filters']['status']['filters'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('filters')),\n );\n foreach ($filters as $key => $filter) {\n $form['filters']['status']['filters'][$key] = array(\n '#type' => 'select',\n '#options' => $filter['options'],\n '#title' => $filter['title'],\n '#default_value' => '[any]',\n );\n }\n\n $form['filters']['status']['actions'] = array(\n '#type' => 'actions',\n '#attributes' => array('class' => array('container-inline')),\n );\n $form['filters']['status']['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => count($session) ? t('Refine') : t('Filter'),\n );\n if (count($session)) {\n $form['filters']['status']['actions']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));\n $form['filters']['status']['actions']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));\n }\n\n drupal_add_js('misc/form.js');\n\n return $form;\n}", "title": "" }, { "docid": "25016ff67ff009f310ee7bd8ac7f6eb3", "score": "0.66379434", "text": "public function index()\n {\n $filters = '';\n\n $filters .= '<div class=\"filter-item\"><label class=\"filter-item-label\" for=\"status\">สถานะ:</label><select class=\"filter-item-input form-control\" id=\"status\" name=\"status\" data-action=\"change\">'.\n '<option value=\"\">ทั้งหมด</option>'.\n '<option value=\"0\">แบบร่าง</option>'.\n '<option value=\"1\">ใช้งาน</option>'.\n '<option value=\"2\">ระงับ</option>'.\n '</select></div>';\n\n\n $filters .= '<div class=\"filter-item search textbox-wrap\">\n <input type=\"text\" class=\"filter-item-input form-control form-textbox form-icon-left\" id=\"search-input\" autocomplete=\"off\" role=\"combobox\" name=\"q\" value=\"\" required=\"\" data-action=\"search\">\n\n <svg class=\"textbox-icon\" viewBox=\"0 0 52.966 52.966\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m51.704 51.273-14.859-15.453c3.79-3.801 6.138-9.041 6.138-14.82 0-11.58-9.42-21-21-21s-21 9.42-21 21 9.42 21 21 21c5.083 0 9.748-1.817 13.384-4.832l14.895 15.491c0.196 0.205 0.458 0.307 0.721 0.307 0.25 0 0.499-0.093 0.693-0.279 0.398-0.383 0.41-1.016 0.028-1.414zm-29.721-11.273c-10.477 0-19-8.523-19-19s8.523-19 19-19 19 8.523 19 19-8.524 19-19 19z\"></path></svg>\n\n <button class=\"textbox-clear\" type=\"button\"><svg width=\"19\" height=\"19\" viewBox=\"0 0 19 19\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18.253,5.8A9.494,9.494,0,0,0,9.5,0,9.5,9.5,0,0,0,.747,5.8a9.472,9.472,0,0,0,2.035,10.41A9.526,9.526,0,0,0,5.8,18.254a9.531,9.531,0,0,0,7.394,0,9.526,9.526,0,0,0,3.022-2.043A9.5,9.5,0,0,0,18.253,5.8Zm-5.095,6.392-0.967.967L9.45,10.426,6.708,13.159l-0.967-.967L8.483,9.45,5.741,6.717l0.967-.976L9.45,8.483l2.742-2.742,0.967,0.976L10.417,9.45Z\"></path></svg></button>\n\n </div>';\n\n\n $title = 'รายชื่อติดต่อ';\n\n $datatable = [\n 'title' => $title,\n\n 'options' => [\n 'limit' => 24,\n 'status' => 1\n ],\n \"url\" => 'api/v1/contacts',\n\n 'filter' => $filters,\n 'actions_right' => '<a class=\"btn btn-primary ml-2\" href=\"/contacts/create\" data-plugin=\"lightbox\"><svg class=\"svg-icon o__tiny o__by-text\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><path d=\"M2 5v2h3v3h2V7h3V5H7V2H5v3H2z\"></path></svg> <span>เพิ่มรายชื่อ</span></a>'\n ];\n\n return view('layouts.datatable')->with( compact('title','datatable') );\n }", "title": "" }, { "docid": "b0aa8decddca497e0dad1d85dbd8492c", "score": "0.66234225", "text": "function show_filter($form_action_path, $sizes, $colors, $order_array)\n{\n global $global_txt;\n echo \"<form id='filter_method' action='\".$form_action_path.\"' method='POST' >\";\n show_combobox($global_txt['filter_order_by'], \"order\", $order_array);\n show_combobox($global_txt['filter_sizes'], \"sizes\", $sizes);\n show_combobox($global_txt['filter_colors'], \"colors\", $colors);\n echo \"<input type='submit' name='submit' value='\".$global_txt['filter_btn'].\"'></input>\";\n echo \"</form>\";\n}", "title": "" }, { "docid": "ad3ac6392f5d3c830d294a99782a66c6", "score": "0.66067606", "text": "function drealty_agent_filter_form() {\n $session = isset($_SESSION['drealty_agent_overview_filter']) ? $_SESSION['drealty_agent_overview_filter'] : array();\n $filters = drealty_agent_filters();\n\n $i = 0;\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n '#theme' => 'exposed_filters__node',\n );\n foreach ($session as $filter) {\n list($type, $value) = $filter;\n if ($type == 'term') {\n // Load term name from DB rather than search and parse options array.\n $value = module_invoke('taxonomy', 'term_load', $value);\n $value = $value->name;\n } elseif ($type == 'language') {\n $value = $value == LANGUAGE_NONE ? t('Language neutral') : module_invoke('locale', 'language_name', $value);\n } else {\n $value = $filters[$type]['options'][$value];\n }\n $t_args = array('%property' => $filters[$type]['title'], '%value' => $value);\n if ($i++) {\n $form['filters']['current'][] = array('#markup' => t('and where %property is %value', $t_args));\n } else {\n $form['filters']['current'][] = array('#markup' => t('where %property is %value', $t_args));\n }\n if (in_array($type, array('type', 'language'))) {\n // Remove the option if it is already being filtered on.\n unset($filters[$type]);\n }\n }\n\n $form['filters']['status'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('clearfix')),\n '#prefix' => ($i ? '<div class=\"additional-filters\">' . t('and where') . '</div>' : ''),\n );\n $form['filters']['status']['filters'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('filters')),\n );\n foreach ($filters as $key => $filter) {\n $form['filters']['status']['filters'][$key] = array(\n '#type' => 'select',\n '#options' => $filter['options'],\n '#title' => $filter['title'],\n '#default_value' => '[any]',\n );\n }\n\n $form['filters']['status']['actions'] = array(\n '#type' => 'actions',\n '#attributes' => array('class' => array('container-inline')),\n );\n $form['filters']['status']['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => count($session) ? t('Refine') : t('Filter'),\n );\n if (count($session)) {\n $form['filters']['status']['actions']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));\n $form['filters']['status']['actions']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));\n }\n\n drupal_add_js('misc/form.js');\n\n return $form;\n}", "title": "" }, { "docid": "53996b858dcd29677560a2ce5ee2204d", "score": "0.65349436", "text": "function FilterForm()\n\t{\tclass_exists('Form');\n\t\t$startfield = new FormLineDate('', 'start', $this->startdate, $this->datefn->GetYearList(2025, -26));\n\t\t$endfield = new FormLineDate('', 'end', $this->enddate, $this->datefn->GetYearList(2025, -26));\n\t\t$dummy_content = new CourseContent();\n\t\techo '<form class=\"akFilterForm\"><span>Type</span><select name=\"ctype\"><option value=\"\">-- show all --</option>';\n\t\tforeach ($dummy_content->types as $ctype=>$cvalue)\n\t\t{\techo '<option value=\"', $ctype, '\"', $ctype == $_GET['ctype'] ? ' selected=\"selected\"' : '', '>', $cvalue, '</option>';\n\t\t}\n\t\techo '</select><span>From</span>';\n\t\t$startfield->OutputField();\n\t\techo '<span>to</span>';\n\t\t$endfield->OutputField();\n\t\techo '<input type=\"submit\" class=\"submit\" value=\"Get\" /><div class=\"clear\"></div></form>';\n\t}", "title": "" }, { "docid": "8da25eaeb4bdac0e6fa5635e200a507c", "score": "0.64996856", "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": "97685278640bc83d4adb9a0d4122cc4b", "score": "0.64817154", "text": "private function FilterForm()\n\t{\tob_start();\n\t\techo '<form class=\"akFilterForm\" method=\"get\" action=\"', $_SERVER['SCRIPT_NAME'], '\"><span>Post Type</span><select name=\"ptype\">';\n\t\tforeach ($this->PostTypeList() as $key=>$type_name)\n\t\t{\techo '<option value=\"', $key, '\"', $key == $_GET['ptype'] ? ' selected=\"selected\"' : '', '>', $type_name, '</option>';\n\t\t}\n\t\techo '</select><input type=\"submit\" class=\"submit\" value=\"Apply Filter\" /><div class=\"clear\"></div></form><div class=\"clear\"></div>';\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "0999365eb3c7262d82effe1583abca58", "score": "0.6411882", "text": "public function composeFilterGui(): string\n {\n\n if (!empty($_GET[self::DATE_TYPE])) {\n $this->type = intval($_GET[self::DATE_TYPE]);\n }\n\n if (!empty($_GET[self::DATE_TIMESTAMP])) {\n $this->timestamp = intval($_GET[self::DATE_TIMESTAMP]);\n }\n\n // compose current URL query:\n\n $query_string = $_SERVER['QUERY_STRING'];\n $request_uri = $_SERVER['REQUEST_URI'];\n\n if (strpos($query_string, self::DATE_TYPE . \"=\") === false) {\n $request_uri .= (empty($query_string) ? \"?\" : \"&\") . self::DATE_TYPE . \"=\" . $this->type;\n }\n\n if (strpos($query_string, self::DATE_TIMESTAMP . \"=\") === false) {\n $request_uri .= (empty($query_string) ? \"?\" : \"&\") . self::DATE_TIMESTAMP . \"=\" . $this->timestamp;\n }\n\n // render filter:\n\n $html = '<div class=\"btn-group\">';\n $html .= '<button type=\"button\" class=\"btn btn-primary btn-sm\" onclick=\"location.href=\\'' . $this->composeRequestUri($request_uri, self::TYPE_DAY, time()) . '\\';\">hoy</button>';\n $html .= '<button type=\"button\" class=\"btn btn-primary btn-sm\" onclick=\"location.href=\\'' . $this->composeRequestUri($request_uri, self::TYPE_MON, time()) . '\\';\">mes</button>';\n $html .= '<button type=\"button\" class=\"btn btn-primary btn-sm\" onclick=\"location.href=\\'' . $this->composeRequestUri($request_uri, self::TYPE_YEAR, time()) . '\\';\">año</button>';\n $html .= '<div class=\"btn-group\">';\n $html .= '<button type=\"button\" class=\"btn btn-primary btn-sm dropdown-toggle\" data-toggle=\"dropdown\">';\n $html .= $this->composeDate() . '&nbsp;<span class=\"caret\"></span></button>';\n $html .= '<ul class=\"dropdown-menu\" role=\"menu\">';\n $html .= '<li><a href=\"' . $this->composeRequestUri($request_uri, self::TYPE_DAY, $this->timestamp) . '\">ver día</a></li>';\n $html .= '<li><a href=\"' . $this->composeRequestUri($request_uri, self::TYPE_MON, $this->timestamp) . '\">ver mes</a></li>';\n $html .= '<li><a href=\"' . $this->composeRequestUri($request_uri, self::TYPE_YEAR, $this->timestamp) . '\">ver año</a></li>';\n $html .= '</ul>';\n $html .= '</div>';\n $html .= '<button type=\"button\" class=\"btn btn-primary btn-sm\" onclick=\"location.href=\\'' . $this->composeRequestUri($request_uri, $this->type, $this->dateSub()) . '\\';\"><span class=\"glyphicon glyphicon-menu-left\"></span></button>';\n $html .= '<button type=\"button\" class=\"btn btn-primary btn-sm\" onclick=\"location.href=\\'' . $this->composeRequestUri($request_uri, $this->type, $this->dateAdd()) . '\\';\"><span class=\"glyphicon glyphicon-menu-right\"></span></button>';\n $html .= '</div>';\n\n return $html;\n }", "title": "" }, { "docid": "6fec5b8c86a4d4a53a5e7c47d8514d88", "score": "0.6394459", "text": "public function Display()\n {\n $content .= '\n <form class=\"form-inline\" role=\"form\" method=\"POST\" id=\"filterForm\">\n\n <div class=\"form-group\">\n <label>Filter by Org:</label>\n </div>\n\n <div class=\"form-group\">\n <select class=\"form-control\" name=\"filter\">\n <option>All</option>';\n\n foreach( $this->data as $one )\n {\n $content .= '\n <option>' . $one['Symbol'] . '</option>';\n }\n\n $content .= ' \n </select>\n </div>\n \n <button type=\"submit\" class=\"btn btn-primary\">\n <span class=\"glyphicon glyphicon-filter\" aria-hidden=\"true\"></span> Filter\n </button>\n\n </form><br>\n ';\n\n return $content;\n }", "title": "" }, { "docid": "56bacb423f955162b845bd3506725ee9", "score": "0.6298229", "text": "function filter_listing_form($conn)\n{\n $filter_array = get_filter_listing($conn)\n ?>\n <form method=\"post\" action=\"<?= htmlentities($_SERVER['PHP_SELF'], ENT_QUOTES) ?>\">\n <fieldset>\n <legend> Choose your filters: </legend>\n\n <?php\n foreach($filter_array as $filter_types)\n {\n //Get each array\n //Print the filter_type which is hopefully the key\n //\n ?>\n <?php echo($filter_types[0] . \":\") ?> <select name=\"<?= $filter_types[0]?>\">\n \n <?php\n //ignore the first element as that tells us the type\n for($i = 1; $i < count($filter_types); $i++)\n {\n //create an option for each possible value\n ?>\n <option value=\"<?= $filter_types[$i]?>\"> <?= $filter_types[$i]?> </option>\n\n <?php\n\n }\n ?>\n </select>\n <?php\n }\n ?>\n </fieldset>\n <div class=\"clearfloat\"></div>\n <input type=\"submit\" name=\"submit\" value=\"submit\"/>\n </form>\n \n<?php\n}", "title": "" }, { "docid": "2d199c64e2abbfb3b82679dea352d8e9", "score": "0.62508154", "text": "public function getFilterForm() {\n\n $department = null;\n $profile = null;\n $typetenant = null;\n\n\n $query = $this->db->select(\"*\")->from(\"tb_client_departament\")->get();\n if ($query->num_rows() > 0) {\n $department = $query->result_array();\n }\n\n $query = $this->db->select(\"*\")->from(\"tb_typetenant\")->get();\n if ($query->num_rows() > 0) {\n $typetenant = $query->result_array();\n }\n\n\n\n $filter = array(\n 'department' => $department,\n 'typetenant' => $typetenant\n );\n\n return $filter;\n }", "title": "" }, { "docid": "9461121a4a60776282ca186499963083", "score": "0.61148447", "text": "public function renderFilter()\n {\n echo \"\n <p class='card'>Please filter by title, author, subreddit by searching in the field below:</p>\n <input type='text' oninput='filter()' class='filter' placeholder='search for stuff'>\n \";\n }", "title": "" }, { "docid": "092775c9e4f6f9f9e71597f5d8395b6d", "score": "0.6109807", "text": "public function filter_dropdown() {\n\n\t\t// Exclude the Media Library screen.\n\t\tif ( 'upload.php' === $GLOBALS['pagenow'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If a page template has been selected show posts using that template.\n\t\tif ( isset( $_GET['page_template_filter'] ) ) {\n\t\t\t$template = $_GET['page_template_filter'];\n\n\t\t// Otherwise show all posts.\n\t\t} else {\n\t\t\t$template = 'all';\n\t\t}\n\n\t\t// The HTML of the dropdown select box abave the table.\n\t\t?>\n\t\t<select name=\"page_template_filter\" id=\"page_template_filter\">\n\t\t\t<option value=\"all\"><?php _e( 'All Page Templates', 'kc-network' ); ?></option>\n\t\t\t<option value=\"default\" <?php echo ( $template == 'default' ) ? ' selected=\"selected\" ' : ''; ?>><?php echo _e( 'Default Template', 'kc-network' ); ?></option>\n\t\t\t<?php page_template_dropdown( $template ); ?>\n\t\t</select>\n\t\t<?php\n\t}", "title": "" }, { "docid": "61070c2bc1f19f5cf79a0557043b2c6b", "score": "0.61057985", "text": "function renderFilterItem($name, $options)\n{\n $id = implode(\"__\", explode(\" \", strtolower($name)));\n\n $markup = \"\n <div class='filter'>\n <label for='$id' class='margin-r-s'>$name&nbsp;&colon;</label>\n <select name='$id' id='$id' class='form__input'>\n \";\n\n foreach ($options as $option) {\n $value = strtolower($option);\n if($value === 'all') {\n $value .= '-';\n $value .= $id;\n }\n $markup .= \"<option value='$value'>$option</option>\";\n }\n\n return $markup .= \"\n </select>\n </div>\n \";\n}", "title": "" }, { "docid": "bf79fd166dd930f6bc0e93f3bd2e944b", "score": "0.60651726", "text": "private function filter_options($request){\n $key = $request->input('key') ? $request->input('key') : '';\n $date_range = $request->input('date_range') ? $request->input('date_range') : '';\n\n $array_filters = array();\n\n $array_filters['key'] = array(\n 'type' => 'input',\n 'title' => 'Search',\n 'default_value' => $key\n );\n\n $array_filters['date_range'] = array(\n 'type' => 'date_picker',\n 'title' => 'Date Range',\n 'options' => '',\n 'default_value' => $date_range\n );\n\n return $this->admin_helpers->admin_handle_element_form_filter($array_filters);\n }", "title": "" }, { "docid": "f8b84c5bbb78e87afee4e163caebc192", "score": "0.60195696", "text": "function av_search_filter() {\n\t\t?>\n\n <div class=\"av_filter\">\n <div class=\"av_filter__search\">\n <?php echo do_shortcode( '[searchandfilter fields=\"search\" submit_label=\"Filter\" class=\"archive-filter__plugin\"]' ); ?>\n </div>\n <form class=\"av_filter__sort\" method=\"post\">\n <div>Sort By:</div>\n\n <div>\n <ul>\n <input type=\"radio\" id=\"sort_model_asc\" name=\"sortby\" value=\"model_asc\">\n <label for=\"sort_model_asc\">Model <img src=\"https://www.alter-verse.com/wp-content/uploads/2019/04/triangle.png\" /></label>\n <input type=\"radio\" id=\"sort_model_desc\" name=\"sortby\" value=\"model_desc\">\n <label for=\"sort_model_desc\">Model <img src=\"https://www.alter-verse.com/wp-content/uploads/2019/04/triangle.png\" /></label>\n </ul>\n </div>\n\n <div>\n <ul>\n <input type=\"radio\" id=\"sort_year_asc\" name=\"sortby\" value=\"year_asc\">\n <label for=\"sort_year_asc\">Year <img src=\"https://www.alter-verse.com/wp-content/uploads/2019/04/triangle.png\" /></label>\n <input type=\"radio\" id=\"sort_year_desc\" name=\"sortby\" value=\"year_desc\">\n <label for=\"sort_year_desc\">Year <img src=\"https://www.alter-verse.com/wp-content/uploads/2019/04/triangle.png\" /></label>\n </ul>\n </div>\n\n <div>\n <ul>\n <input type=\"radio\" id=\"sort_range_asc\" name=\"sortby\" value=\"range_asc\">\n <label for=\"sort_range_asc\">Range <img src=\"https://www.alter-verse.com/wp-content/uploads/2019/04/triangle.png\" /></label>\n <input type=\"radio\" id=\"sort_range_desc\" name=\"sortby\" value=\"range_desc\">\n <label for=\"sort_range_desc\">Range <img src=\"https://www.alter-verse.com/wp-content/uploads/2019/04/triangle.png\" /></label>\n </ul>\n </div>\n\n <div>\n <ul>\n <input type=\"radio\" id=\"sort_price_asc\" name=\"sortby\" value=\"price_asc\">\n <label for=\"sort_price_asc\">Price <img src=\"https://www.alter-verse.com/wp-content/uploads/2019/04/triangle.png\" /></label>\n <input type=\"radio\" id=\"sort_price_desc\" name=\"sortby\" value=\"price_desc\">\n <label for=\"sort_price_desc\">Price <img src=\"https://www.alter-verse.com/wp-content/uploads/2019/04/triangle.png\" /></label>\n </ul>\n </div>\n\n <div>\n <ul>\n <input type=\"radio\" id=\"sort_feature\" name=\"sortby\" value=\"feature\">\n <label for=\"sort_feature\">Featured</label>\n </ul>\n </div>\n\n\n\n </form>\n\n </div>\n\t\t<?php\n\n $sortby = $_COOKIE['archive_sort'];\n $region = $_COOKIE['site_region'];\n\n $sort_currencies = [\n 'usa' => 'usd',\n 'can' => 'can',\n 'eur' => 'euro',\n 'inr' => 'inr'\n ];\n\n $usecurrency = $sort_currencies[$region];\n\n\n $sort_args = [\n //Default\n '' => array(\n 'post_type' => 'ev',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'posts_per_page' => -1,\n 'meta_query' => array(\n array(\n 'key' => 'ev_info__feature',\n 'value' => 'enable'\n )\n )\n ),\n 'model_asc' => array(\n 'post_type' => 'ev',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'posts_per_page' => -1\n ),\n 'model_desc' => array(\n 'post_type' => 'ev',\n 'orderby' => 'name',\n 'order' => 'DESC',\n 'posts_per_page' => -1\n ),\n 'year_asc' => array(\n 'post_type' => 'ev',\n 'meta_key' => 'ev_info__start-year',\n 'orderby' => 'meta_value_num',\n 'order' => 'ASC',\n 'posts_per_page' => -1\n ),\n 'year_desc' => array(\n 'post_type' => 'ev',\n 'meta_key' => 'ev_info__start-year',\n 'orderby' => 'meta_value_num',\n 'order' => 'DESC',\n 'posts_per_page' => -1\n ),\n 'range_asc' => array(\n 'post_type' => 'ev',\n 'meta_key' => 'ev_specs__range-metric',\n 'orderby' => 'meta_value_num',\n 'order' => 'ASC',\n 'posts_per_page' => -1\n ),\n 'range_desc' => array(\n 'post_type' => 'ev',\n 'meta_key' => 'ev_specs__range-metric',\n 'orderby' => 'meta_value_num',\n 'order' => 'DESC',\n 'posts_per_page' => -1\n ),\n\n 'feature' => array(\n 'post_type' => 'ev',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'posts_per_page' => -1,\n 'meta_query' => array(\n array(\n 'key' => 'ev_info__feature',\n 'value' => 'enable'\n )\n )\n ),\n 'feature_not' => array(\n 'post_type' => 'ev',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'posts_per_page' => -1,\n 'meta_query' => array(\n array(\n 'key' => 'ev_info__feature',\n 'value' => ''\n )\n )\n ),\n 'price_asc' => array(\n 'post_type' => 'ev',\n 'meta_key' => 'ev_info__price-cad',\n 'orderby' => 'meta_value_num',\n 'order' => 'ASC',\n 'posts_per_page' => -1\n ),\n 'price_desc' => array(\n 'post_type' => 'ev',\n 'meta_key' => 'ev_info__price-cad',\n 'orderby' => 'meta_value_num',\n 'order' => 'DESC',\n 'posts_per_page' => -1\n ),\n\n ];\n\n\n\n\n av_archive_post($sort_args[$sortby]);\n\n\n if ($sortby == 'feature' || $sortby == '') {\n av_archive_post($sort_args['feature_not']);\n }\n }", "title": "" }, { "docid": "40732c08a9ddbad6192d7ec1b2e6a769", "score": "0.60070777", "text": "function get_home_filter(){\n $filertObj = new Filter();\n $dealerId = get_option(\"at_dealer_id\");\n $dealerId = explode(',',$dealerId);\n $ocassions_obj = new Ocassions();\n $filertObj->store_arg($ocassions_obj,$dealerId);\n \n\n $ocassions_page_slug = get_option(\"at_url_page_adverts\");\n $server_name = $_SERVER['SERVER_NAME'];\n $protocol = 'http://';\n if(isset($_SERVER['HTTPS'])){\n $protocol = 'https://';\n }\n\n $html = '';\n $html .= '<form action=\"'.$protocol.''.$server_name.'/'.$ocassions_page_slug.'\" method=\"GET\" id=\"merkFilter\">\n <p>\n <label for=\"a\">Merk</label>\n </p>\n <select name=\"merkId\" id=\"marks\" class=\"selectCustom\">\n <option value>Alle merken</option>';\n\n foreach ($_SESSION['all_marks'] as $key => $mark) {\n $html .= '<option value=\"'.$key.'\" class=\"markOption\">'.$mark.'</option>';\n }\n\n $html .= '</select>\n <p>\n <label for=\"b\">Model</label>\n </p>\n <select name=\"modelId\" id=\"models\" class=\"selectCustom\">\n <option value>Selecteer eerst een merk</option>\n </select>\n <button type=\"submit\" class=\"button\">Toon auto s</button>\n </form>'; \n\n return $html;\n \n }", "title": "" }, { "docid": "4d00276b25ed8e704bd065ca29389d76", "score": "0.5985528", "text": "public function onSearch()\n {\n // get the search form data\n $data = $this->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->evento_id) AND ( (is_scalar($data->evento_id) AND $data->evento_id !== '') OR (is_array($data->evento_id) AND (!empty($data->evento_id)) )) )\n {\n\n $filters[] = new TFilter('evento_id', '=', $data->evento_id);// create the filter \n }\n\n if (isset($data->nome) AND ( (is_scalar($data->nome) AND $data->nome !== '') OR (is_array($data->nome) AND (!empty($data->nome)) )) )\n {\n\n $filters[] = new TFilter('nome', 'like', \"%{$data->nome}%\");// create the filter \n }\n\n if (isset($data->dt_inicio) AND ( (is_scalar($data->dt_inicio) AND $data->dt_inicio !== '') OR (is_array($data->dt_inicio) AND (!empty($data->dt_inicio)) )) )\n {\n\n $filters[] = new TFilter('dt_inicio', '=', $data->dt_inicio);// create the filter \n }\n\n if (isset($data->dt_fim) AND ( (is_scalar($data->dt_fim) AND $data->dt_fim !== '') OR (is_array($data->dt_fim) AND (!empty($data->dt_fim)) )) )\n {\n\n $filters[] = new TFilter('dt_fim', '=', $data->dt_fim);// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n // fill the form with data again\n $this->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 $this->onReload($param);\n }", "title": "" }, { "docid": "dd45decdae1cbc95ff666e7e4c92dfc3", "score": "0.5921858", "text": "public function filter_fields() {\n $output = '';\n $strdept = get_string('filterdept', 'local_progressreview');\n $strcourse = get_string('filtercourse', 'local_progressreview');\n $strteacher = get_string('filterteacher', 'local_progressreview');\n $output .= html_writer::label($strcourse, 'filtercourse');\n $attrs = array('id' => 'filtercourse', 'name' => 'filtercourse');\n $output .= html_writer::empty_tag('input', $attrs);\n $output .= html_writer::label($strteacher, 'filterteacher');\n $attrs = array('id' => 'filterteacher', 'name' => 'filterteacher');\n $output .= html_writer::empty_tag('input', $attrs);\n return $this->output->container($output, '', 'filterfields');\n }", "title": "" }, { "docid": "69c4faedcf1feaf21b59c3af7c58d644", "score": "0.59182686", "text": "function options_form(&$form, &$form_state) {\n parent::options_form($form, $form_state);\n\n // Lock the exposed checkbox.\n $form['expose_button']['checkbox']['checkbox']['#disabled'] = TRUE;\n $form['expose_button']['checkbox']['checkbox']['#description'] = t('This filter is always exposed.');\n\n // Not sure what the 'expose' button is for as there's the checkbox, but\n // it's not wanted here.\n unset($form['expose_button']['markup']);\n unset($form['expose_button']['button']);\n\n $filters = $this->view->display_handler->handlers['filter'];\n\n if (isset($this->options['controller_filter'])) {\n // Get the handler for the controller filter.\n $controller_filter = $filters[$this->options['controller_filter']];\n\n // Take copies of the form arrays to pass to the other handler.\n $form_copy = $form;\n $form_state_copy = $form_state;\n\n // Fixup the form so the handler is fooled.\n // For some reason we need to add this for non-ajax admin operation.\n $form_copy['operator']['#type'] = '';\n\n // Get the value form from the filter handler.\n $controller_filter->value_form($form_copy, $form_state);\n $controller_values_element = $form_copy['value'];\n\n // Clean up the form element.\n if ($controller_values_element['#type'] == 'checkboxes') {\n // We have to unset the 'select all' option on checkboxes.\n unset($controller_values_element['#options']['all']);\n // Force multiple.\n $controller_values_element['#multiple'] = TRUE;\n }\n\n // Add it to our own form element in the real form.\n $form['controller_values'] = array(\n '#title' => t('Controller values'),\n '#description' => t('The values on the controller filter that will cause the dependent filters to be visible.'),\n '#default_value' => isset($this->options['controller_values']) ? $this->options['controller_values'] : array(),\n ) + $controller_values_element;\n }\n\n $options = $this->get_filter_options('dependent');\n $form['dependent_filters'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Dependent filters'),\n '#options' => $options,\n '#default_value' => isset($this->options['dependent_filters']) ? $this->options['dependent_filters'] : array(),\n '#description' => t('The filters which should only be visible and active when the controller filter has the given values.'),\n );\n if (empty($options)) {\n $form['dependent_filters']['#description'] .= ' ' . t('This filter needs other filters to be placed below it in the order to use as dependents.');\n }\n }", "title": "" }, { "docid": "63c42ccc94b3d6778add808870bdfebb", "score": "0.5914887", "text": "public function initFilter() {\n $item = new ilSelectInputGUI($this->pl->txt('user_status'), 'status');\n $states = array('' => '');\n for ($i=1;$i<=4;$i++) {\n $k = $i-1;\n $states[$i] = $this->pl->txt(\"status$k\");\n }\n $item->setOptions($states);\n $this->addFilterItemWithValue($item);\n $item = new ilDateTimeInputGUI($this->pl->txt('status_changed_from'), 'status_changed_from');\n $item->setMode(ilDateTimeInputGUI::MODE_INPUT);\n $this->addFilterItemWithValue($item);\n $item = new ilDateTimeInputGUI($this->pl->txt('status_changed_to'), 'status_changed_to');\n $item->setMode(ilDateTimeInputGUI::MODE_INPUT);\n $this->addFilterItemWithValue($item);\n }", "title": "" }, { "docid": "02785321a5a1f1cbbc8f54b9bf5efcd6", "score": "0.59013855", "text": "function mwf_frontend_ajax_form_scripts() {\n?>\n<script type=\"text/javascript\">\n jQuery(function($){\n $('#filter select').change(function() {\n var filter = $('#filter');\n // console.log(filter.serialize());\n $.ajax({\n url:filter.attr('action'),\n data:filter.serialize(), // form data\n type:filter.attr('method'), // POST\n beforeSend:function(xhr){\n filter.find('button').text('Processing...'); // changing the button label\n },\n success:function(data){\n filter.find('button').text('Apply filter'); // changing the button label back\n $('ul.products').html(data); // insert data\n }\n });\n return false;\n });\n });\n</script>\n<?php }", "title": "" }, { "docid": "d799fd4169f9a2b63e5b3417ee02a5eb", "score": "0.59001946", "text": "function bimbler_tribe_events_add_cat_filter () {\r\n \r\n $filter_html = 'Filter events: <div class=\"btn-group\" data-toggle=\"buttons\">\r\n <label class=\"btn btn-primary active\">\r\n <input type=\"checkbox\" autocomplete=\"off\" checked> Bimbles\r\n </label>\r\n <label class=\"btn btn-primary active\">\r\n <input type=\"checkbox\" autocomplete=\"off\" checked> Mingles\r\n </label>\r\n <label class=\"btn btn-primary active\">\r\n <input type=\"checkbox\" autocomplete=\"off\" checked> Social\r\n </label>\r\n</div>';\r\n\r\n echo $filter_html;\r\n\r\n error_log ('bimbler_tribe_events_add_cat_filter: applying filters.');\r\n\r\n }", "title": "" }, { "docid": "4be7b2dc9caf125b79fbe1068a223ea4", "score": "0.5852433", "text": "function ekmod_filter_form_submit($form, &$form_state) {\n $filters = ekmod_filters();\n switch ($form_state['values']['op']) {\n case t('Filter'):\n case t('Refine'):\n // Apply every filter that has a choice selected other than 'any'.\n foreach ($filters as $filter => $options) {\n if (isset($form_state['values'][$filter]) && $form_state['values'][$filter] != '[any]') {\n // Flatten the options array to accommodate hierarchical/nested options.\n $flat_options = form_options_flatten($filters[$filter]['options']);\n // Only accept valid selections offered on the dropdown, block bad input.\n if (isset($flat_options[$form_state['values'][$filter]])) {\n $_SESSION['ekmod_overview_filter'][] = array($filter, $form_state['values'][$filter]);\n }\n }\n }\n break;\n case t('Undo'):\n array_pop($_SESSION['ekmod_overview_filter']);\n break;\n case t('Reset'):\n $_SESSION['ekmod_overview_filter'] = array();\n break;\n }\n}", "title": "" }, { "docid": "50b432f35d57c1f8f2754875f44f6e60", "score": "0.58360595", "text": "public function name() {\n\t\treturn __( 'Filter Button Option', 'thrive-cb' );\n\t}", "title": "" }, { "docid": "016f1232cc28f2fc063aaf68003b6f00", "score": "0.58255666", "text": "function showOrderByFilter($filters){\n global $orderBy;\n ?>\n <label class=\"boxed-select\" id=\"order-by-filter\">\n <div>Ordenar por</div>\n <select data-class=\"order-by-filter\" name=\"orderBy\">\n <option value=\"-1\">Ninguno</option>\n <?php\n for($i = 0; $i < sizeof($filters); $i++){\n ?>\n <option value=\"<?=$i?>\" <?=$orderBy == $i ? \"selected\" : \"\"?>><?=$filters[$i]?></option>\n <?php\n } \n \n ?> \n </select>\n </label>\n <?php\n}", "title": "" }, { "docid": "bc3bc7a551c704c6a0ec3ff4d9bff248", "score": "0.5822096", "text": "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new CertificacionFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('CertificacionBundle:Certificacion')->createQueryBuilder('e');\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('CertificacionControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n \n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('CertificacionControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('CertificacionControllerFilter')) {\n $filterData = $session->get('CertificacionControllerFilter');\n $filterForm = $this->createForm(new CertificacionFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "title": "" }, { "docid": "c1091dcf294e4281b5d48070ce780718", "score": "0.5813957", "text": "public function getFilterOptions(): array;", "title": "" }, { "docid": "c3ce9c22d775acf17f5704c0af297ee5", "score": "0.57947105", "text": "protected function requestForFilter() : array\n {\n $choice = [\n 'filter' => '',\n 'models' => null,\n ];\n\n $userChoice = $this->choice('Would you like to filter the search by the model?', [\n 'none' => 'No filter',\n 'only' => 'Show only certain models',\n 'except' => 'Do not show certain models',\n ], 'none');\n\n switch ($userChoice) {\n case 'only':\n $choice['filter'] = 'only';\n $choice['models'] = $this->choice(\n 'Which models would you like to filter for?',\n $this->mediaRepository->getDistinctModelTypes()->toArray(),\n null,\n null,\n true\n );\n break;\n case 'except':\n $choice['filter'] = 'except';\n $choice['models'] = $this->choice(\n 'Which models would you like to filter out?',\n $this->mediaRepository->getDistinctModelTypes()->toArray(),\n null,\n null,\n true\n );\n break;\n case 'none':\n default:\n $choice['filter'] = 'none';\n $choice['models'] = null;\n }\n\n return $choice;\n }", "title": "" }, { "docid": "9588b32a64f2cf8aad377be48d03bdd9", "score": "0.5762774", "text": "function wpdevbk_show_booking_filters(){\n ?> <div style=\"clear:both;height:1px;\"></div>\n <div class=\"wpdevbk-filters-section \">\n\n <div class=\"wpbc-search-by-booking-id\" >\n <form name=\"booking_filters_formID\" action=\"\" method=\"post\" id=\"booking_filters_formID\" class=\" form-search\">\n <?php if (isset($_REQUEST['wh_booking_id'])) $wh_booking_id = $_REQUEST['wh_booking_id']; // {'1', '2', .... }\n else $wh_booking_id = ''; ?>\n <input class=\"input-small\" type=\"text\" placeholder=\"<?php _e('Booking ID' ,'booking'); ?>\" name=\"wh_booking_id\" id=\"wh_booking_id\" value=\"<?php echo $wh_booking_id; ?>\" >\n <button class=\"button button-secondary\" type=\"submit\"><?php _e('Go' ,'booking'); ?></button>\n </form>\n </div>\n\n <form name=\"booking_filters_form\" action=\"\" method=\"post\" id=\"booking_filters_form\" class=\"form-inline\">\n <input type=\"hidden\" name=\"page_num\" id =\"page_num\" value=\"1\" />\n <div class=\"btn-group\" style=\"float: left; margin-right: 15px;margin-bottom: 9px;\">\n <a class=\"tooltip_top button button-primary\" style=\"float: left; \"\n data-original-title=\"<?php _e('Refresh booking listing' ,'booking'); ?>\" rel=\"tooltip\" \n href=\"javascript:void(0)\"\n onclick=\"javascript:booking_filters_form.submit();\"\n ><?php _e('Apply' ,'booking'); ?> <i class=\"icon-refresh icon-white\"></i></a><a \n data-original-title=\"<?php _e('Reset filter to default values' ,'booking'); ?>\" rel=\"tooltip\" \n class=\"tooltip_top button button-secondary\" \n href=\"<?php echo 'admin.php?page=' . WPDEV_BK_PLUGIN_DIRNAME . '/'. WPDEV_BK_PLUGIN_FILENAME. 'wpdev-booking&view_mode=vm_listing'; ?>\"\n style=\"border: 1px solid #aaa;border-left: none;\"\n ><i class=\"icon-remove\"></i></a>\n </div>\n\n <?php /** ?>\n <?php\n\n $wpdevbk_id= '';\n $wpdevbk_selectors='';\n $wpdevbk_control_label='';\n $wpdevbk_help_block='Booking Status';\n $wpdevbk_default_value = '';\n $wpdevbk_selector_default_value='';\n ?>\n <div class=\"control-group\" style=\"float:left;\">\n <label for=\"<?php echo $wpdevbk_id; ?>\" class=\"control-label\"><?php echo $wpdevbk_control_label; ?></label>\n <div class=\"inline controls\">\n <!--div class=\"btn-group\" data-toggle=\"buttons-radio\" id=\"radiobutton_<?php echo $wpdevbk_id; ?>\"-->\n <div class=\"btn-group\" data-toggle=\"buttons-checkbox\" id=\"radiobutton_<?php echo $wpdevbk_id; ?>\">\n <a href=\"javascript:void(0)\" class=\"btn\">Approved</a>\n <a href=\"javascript:void(0)\" class=\"btn\">Pending</a>\n </div>\n <input type=\"hidden\" value=\"<?php echo $wpdevbk_selector_default_value; ?>\" id=\"<?php echo $wpdevbk_id; ?>\" name=\"<?php echo $wpdevbk_id; ?>\" />\n <p class=\"help-block\"><?php echo $wpdevbk_help_block; ?></p>\n </div>\n </div>\n <script type=\"text/javascript\">\n jQuery('#radiobutton_<?php echo $wpdevbk_id; ?> .btn').button();\n <?php if (1) { // Press the button ?>\n jQuery('#radiobutton_<?php echo $wpdevbk_id; ?> .btn:first').button('toggle');\n <?php } ?>\n </script>\n <?php /**/ ?>\n <?php // Approved / Pending\n $wpdevbk_id = 'wh_approved'; // {'', '0', '1' }\n $wpdevbk_selectors = array(__('Pending' ,'booking') =>'0',\n __('Approved' ,'booking') =>'1',\n 'divider0'=>'divider',\n __('Any' ,'booking') =>'');\n $wpdevbk_control_label = '';\n $wpdevbk_help_block = __('Status' ,'booking');\n // Pending, Active, Suspended, Terminated, Cancelled, Fraud\n wpdevbk_selectbox_filter($wpdevbk_id, $wpdevbk_selectors, $wpdevbk_control_label, $wpdevbk_help_block);\n ?>\n\n <?php // Booking Dates\n $wpdevbk_id = 'wh_booking_date';\n $wpdevbk_id2 = 'wh_booking_date2';\n $wpdevbk_control_label = '';\n $wpdevbk_help_block = __('Dates' ,'booking');\n $wpdevbk_width = 'span2 wpdevbk-filters-section-calendar';\n $wpdevbk_icon = '<i class=\"icon-calendar\"></i>' ;\n wpdevbk_dates_selection_for_filter($wpdevbk_id, $wpdevbk_id2, $wpdevbk_control_label, $wpdevbk_help_block, $wpdevbk_width, $wpdevbk_icon );\n ?>\n <span style=\"display:none;\" class=\"advanced_booking_filter\">\n <?php // Read / Unread\n// $wpdevbk_id = 'wh_is_new'; // {'', '1' }\n// $wpdevbk_selectors = array('','1');\n// $wpdevbk_control_label = __('Unread' ,'booking');\n// $wpdevbk_help_block = __('Only New' ,'booking');\n//\n// wpdevbk_checkboxbutton_filter($wpdevbk_id, $wpdevbk_selectors, $wpdevbk_control_label, $wpdevbk_help_block);\n \n \n $wpdevbk_id = 'wh_is_new'; // {'', '0', '1' }\n $wpdevbk_selectors = array(__('All bookings' ,'booking') =>'',\n __('New bookings' ,'booking') =>'1',\n );\n $wpdevbk_control_label = '';\n $wpdevbk_help_block = __('Show' ,'booking');\n \n wpdevbk_selectbox_filter($wpdevbk_id, $wpdevbk_selectors, $wpdevbk_control_label, $wpdevbk_help_block);\n \n \n ?>\n\n\n <?php // Creation Dates\n $wpdevbk_id = 'wh_modification_date';\n $wpdevbk_id2 = 'wh_modification_date2';\n $wpdevbk_control_label = '';\n $wpdevbk_help_block = __('Creation' ,'booking');\n $wpdevbk_width = 'span2 wpdevbk-filters-section-calendar';\n $wpdevbk_icon = '<i class=\"icon-calendar\"></i>' ;\n $exclude_items = array(0, 2, 4, 7, 8, 9);\n $default_item = 3 ;\n wpdevbk_dates_selection_for_filter($wpdevbk_id, $wpdevbk_id2, $wpdevbk_control_label, $wpdevbk_help_block, $wpdevbk_width, $wpdevbk_icon, $exclude_items, $default_item );\n ?>\n\n <?php if (function_exists('wpdebk_filter_field_bk_keyword')) {\n wpdebk_filter_field_bk_keyword();\n } ?>\n\n <?php if (function_exists('wpdebk_filter_field_bk_paystatus')) {\n wpdebk_filter_field_bk_paystatus();\n } ?>\n\n <?php if (function_exists('wpdebk_filter_field_bk_costs')) {\n wpdebk_filter_field_bk_costs();\n } ?>\n\n </span>\n\n <?php // Sort\n $wpdevbk_id = 'or_sort'; // {'', '0', '1' }\n $wpdevbk_selectors = array(__('ID' ,'booking').'&nbsp;<i class=\"icon-arrow-up \"></i>' =>'',\n __('Dates' ,'booking').'&nbsp;<i class=\"icon-arrow-up \"></i>' =>'sort_date',\n 'divider0'=>'divider',\n __('ID' ,'booking').'&nbsp;<i class=\"icon-arrow-down \"></i>' =>'booking_id_asc',\n __('Dates' ,'booking').'&nbsp;<i class=\"icon-arrow-down \"></i>' =>'sort_date_asc'\n );\n\n $wpdevbk_selectors = apply_bk_filter('bk_filter_sort_options', $wpdevbk_selectors);\n\n $wpdevbk_control_label = '';\n $wpdevbk_help_block = __('Order by' ,'booking');\n\n $wpdevbk_default_value = get_bk_option( 'booking_sort_order');\n wpdevbk_selectbox_filter($wpdevbk_id, $wpdevbk_selectors, $wpdevbk_control_label, $wpdevbk_help_block, $wpdevbk_default_value);\n ?>\n \n <?php if (function_exists('wpdevbk_booking_resource_selection_for_booking_listing')) {\n wpdevbk_booking_resource_selection_for_booking_listing();\n } ?>\n\n <?php if (class_exists('wpdev_bk_personal')) { ?>\n <div style=\"float:left;display:none;\" class=\"advanced_booking_filter btn-group\">\n\n \n <a data-original-title=\"<?php _e('Save filter settings as default template (Please, click Apply filter button, before saving!)' ,'booking'); ?>\" rel=\"tooltip\"\n class=\"tooltip_top button button-secondary\" \n onclick=\"javascript:save_bk_listing_filter( '<?php echo get_bk_current_user_id(); ?>', 'default' , '<?php echo get_params_in_url( array('page_num','wh_booking_type') ); ?>' );\"\n ><?php _e('Save as Default' ,'booking'); ?> <i class=\"icon-download\"></i></a>\n <?php \n $saved_tamplate_option = get_user_option( 'booking_listing_filter_' . 'default', get_bk_current_user_id());\n if (false != $saved_tamplate_option ) {\n ?> \n <a data-original-title=\"<?php _e('Delete your previously saved default filer template!' ,'booking'); ?>\" rel=\"tooltip\"\n class=\"tooltip_top button button-secondary\" \n onclick=\"javascript:delete_bk_listing_filter( '<?php echo get_bk_current_user_id(); ?>', 'default' );\"\n ><?php _e('Delete template' ,'booking'); ?> <i class=\"icon-trash\"></i></a>\n <?php } ?>\n\n </div>\n <?php } ?>\n <div class=\"clear\"></div>\n </form>\n\n\n\n <!--div id=\"tooltipsinit\" class=\"tooltip-demo well\">\n <p style=\"margin-bottom: 0;\" class=\"muted\">Tight pants next level keffiyeh\n <a rel=\"tooltip\" href=\"javascript:void(0)\" data-original-title=\"first tooltip\">you probably</a>\n\n haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel\n\n <a rel=\"tooltip\" href=\"javascript:void(0)\" data-original-title=\"Another tooltip\">have a</a>\n\n terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A\n\n <a title=\"Another one here too\" rel=\"tooltip\" href=\"javascript:void(0)\">really ironic</a>\n\n artisan whatever keytar, scenester farm-to-table banksy Austin\n\n <a rel=\"tooltip\" href=\"javascript:void(0)\" data-original-title=\"The last tip!\">twitter handle</a>\n\n freegan cred raw denim single-origin coffee viral.\n </p>\n </div>\n\n <script type=\"text/javascript\">\n jQuery('#tooltipsinit a').tooltip( {\n animation: true\n , delay: { show: 500, hide: 100 }\n , selector: false\n , placement: 'top'\n , trigger: 'hover'\n , title: ''\n , template: '<div class=\"wpdevbk tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>'\n });\n </script>\n\n\n <div id=\"popover\" class=\"well\">\n <a data-content=\"And here's some amazing content. It's very engaging. right?\" rel=\"popover\" class=\"btn btn-danger\" href=\"javascript:void(0)\" data-original-title=\"A Title\">hover for popover</a>\n </div>\n\n\n <script type=\"text/javascript\">\n jQuery('#popover a').popover( {\n placement: 'bottom'\n , delay: { show: 100, hide: 100 }\n , content: ''\n , template: '<div class=\"wpdevbk popover\"><div class=\"arrow\"></div><div class=\"popover-inner\"><h3 class=\"popover-title\"></h3><div class=\"popover-content\"><p></p></div></div></div>'\n });\n </script-->\n </div>\n <div style=\"clear:both;height:1px;\"></div>\n <?php\n }", "title": "" }, { "docid": "114eb0fcb57d17868f2c830a79464d7a", "score": "0.5759778", "text": "public function renderFilter()\n\t{\n\t\treturn GWF_Template::mainPHP('filter/enum.php', ['field' => $this]);\n\t}", "title": "" }, { "docid": "8689205fbfc54ee8b92526da1c08a66b", "score": "0.5748846", "text": "function extra_tablenav($which) {\n /* \techo \"<label for='bulk-action-selector-\" . esc_attr( $which ) . \"' class='screen-reader-text'>\" . __( 'Select bulk action' ) . \"</label>\";\n echo \"<select name='filter' id='bulk-action-selector-\" . esc_attr( $which ) . \"'>\\n\";\n echo \"<option value='-1' selected='selected'>\" . __( 'Bulk Actions' ) . \"</option>\\n\";\n\n foreach ( $this->_actions as $name => $title ) {\n $class = 'edit' == $name ? ' class=\"hide-if-no-js\"' : '';\n\n echo \"\\t<option value='$name'$class>$title</option>\\n\";\n }\n\n echo \"</select>\\n\";\n\n submit_button( __( 'Filter' ), 'action', false, false, array( 'id' => \"dofilter\" ) );\n echo \"\\n\"; */\n }", "title": "" }, { "docid": "fb97ef4093a0e9da634ed569f03c3088", "score": "0.574396", "text": "public function testFilterBooleanUI() {\n $this->drupalGet('admin/structure/views/nojs/add-handler/test_view/default/filter');\n $this->submitForm(['name[views_test_data.status]' => TRUE], 'Add and configure filter criteria');\n\n // Check the field widget label. 'title' should be used as a fallback.\n $result = $this->cssSelect('#edit-options-value--wrapper legend span');\n $this->assertEquals('Status', $result[0]->getHtml());\n\n // Ensure that the operator and the filter value are displayed using correct\n // layout.\n $this->assertSession()->elementExists('css', '.views-left-30 .form-item-options-operator');\n $this->assertSession()->elementExists('css', '.views-right-70 .form-item-options-value');\n\n $this->submitForm([], 'Expose filter');\n $this->submitForm([], 'Grouped filters');\n\n $edit = [];\n $edit['options[group_info][group_items][1][title]'] = 'Published';\n $edit['options[group_info][group_items][1][operator]'] = '=';\n $edit['options[group_info][group_items][1][value]'] = 1;\n $edit['options[group_info][group_items][2][title]'] = 'Not published';\n $edit['options[group_info][group_items][2][operator]'] = '=';\n $edit['options[group_info][group_items][2][value]'] = 0;\n $edit['options[group_info][group_items][3][title]'] = 'Not published2';\n $edit['options[group_info][group_items][3][operator]'] = '!=';\n $edit['options[group_info][group_items][3][value]'] = 1;\n\n $this->submitForm($edit, 'Apply');\n\n $this->drupalGet('admin/structure/views/nojs/handler/test_view/default/filter/status');\n\n $result = $this->xpath('//input[@name=\"options[group_info][group_items][1][value]\"]');\n $this->assertEquals('checked', $result[1]->getAttribute('checked'));\n $result = $this->xpath('//input[@name=\"options[group_info][group_items][2][value]\"]');\n $this->assertEquals('checked', $result[2]->getAttribute('checked'));\n $result = $this->xpath('//input[@name=\"options[group_info][group_items][3][value]\"]');\n $this->assertEquals('checked', $result[1]->getAttribute('checked'));\n\n // Test that there is a remove link for each group.\n $this->assertCount(3, $this->cssSelect('a.views-remove-link'));\n\n // Test selecting a default and removing an item.\n $edit = [];\n $edit['options[group_info][default_group]'] = 2;\n $edit['options[group_info][group_items][3][remove]'] = 1;\n $this->submitForm($edit, 'Apply');\n $this->drupalGet('admin/structure/views/nojs/handler/test_view/default/filter/status');\n $this->assertSession()->fieldValueEquals('options[group_info][default_group]', 2);\n $this->assertSession()->fieldNotExists('options[group_info][group_items][3][remove]');\n }", "title": "" }, { "docid": "3d51628d35db4a3b00a25958b9bd2803", "score": "0.57214767", "text": "function drealty_agent_filter_form_submit($form, &$form_state) {\n $filters = drealty_agent_filters();\n switch ($form_state['values']['op']) {\n case t('Filter'):\n case t('Refine'):\n // Apply every filter that has a choice selected other than 'any'.\n foreach ($filters as $filter => $options) {\n if (isset($form_state['values'][$filter]) && $form_state['values'][$filter] != '[any]') {\n // Flatten the options array to accommodate hierarchical/nested options.\n $flat_options = form_options_flatten($filters[$filter]['options']);\n // Only accept valid selections offered on the dropdown, block bad input.\n if (isset($flat_options[$form_state['values'][$filter]])) {\n $_SESSION['drealty_agent_overview_filter'][] = array($filter, $form_state['values'][$filter]);\n }\n }\n }\n break;\n case t('Undo'):\n array_pop($_SESSION['drealty_agent_overview_filter']);\n break;\n case t('Reset'):\n $_SESSION['drealty_agent_overview_filter'] = array();\n break;\n }\n}", "title": "" }, { "docid": "098d8e5235f0b20aa4ab0e91af470e6a", "score": "0.5720422", "text": "function wpdevbk_selectbox_filter($wpdevbk_id, $wpdevbk_selectors, $wpdevbk_control_label, $wpdevbk_help_block, $wpdevbk_default_value = ''){\n\n if (isset($_REQUEST[$wpdevbk_id])) $wpdevbk_value = $_REQUEST[$wpdevbk_id];\n else $wpdevbk_value = $wpdevbk_default_value;\n $wpdevbk_selector_default = array_search($wpdevbk_value, $wpdevbk_selectors);\n if ($wpdevbk_selector_default === false) {\n $wpdevbk_selector_default = key($wpdevbk_selectors);\n $wpdevbk_selector_default_value = current($wpdevbk_selectors);\n } else $wpdevbk_selector_default_value = $wpdevbk_value;\n ?>\n <div class=\"control-group\" style=\"float:left;\">\n <label for=\"<?php echo $wpdevbk_id; ?>\" class=\"control-label\"><?php echo $wpdevbk_control_label; ?></label>\n <div class=\"inline controls\">\n \n <div class=\"btn-group\"> \n <a href=\"javascript:void(0)\" data-toggle=\"dropdown\" id=\"<?php echo $wpdevbk_id;?>_selector\" class=\"button button-secondary dropdown-toggle\"><label class=\"label_in_filters\"\n ><?php echo $wpdevbk_help_block; ?>: </label> <span class=\"wpbc_selected_in_dropdown\"><?php echo $wpdevbk_selector_default; ?></span> &nbsp; <span class=\"caret\"></span></a>\n <ul class=\"dropdown-menu\">\n <?php\n foreach ($wpdevbk_selectors as $key=>$value) {\n if ($value != 'divider') {\n ?><li><a href=\"javascript:void(0)\" onclick=\"javascript:showSelectedInDropdown('<?php echo $wpdevbk_id; ?>', jQuery(this).html(), '<?php echo $value; ?>');\" ><?php echo $key; ?></a></li><?php\n } else { ?><li class=\"divider\"></li><?php }\n } ?>\n </ul>\n <input type=\"hidden\" value=\"<?php echo $wpdevbk_selector_default_value; ?>\" id=\"<?php echo $wpdevbk_id; ?>\" name=\"<?php echo $wpdevbk_id; ?>\" />\n </div>\n <p class=\"help-block\"><?php echo $wpdevbk_help_block; ?></p>\n </div>\n </div>\n <?php\n }", "title": "" }, { "docid": "be3c47e26a0fc7116030eb0e0b7b8ae6", "score": "0.57203746", "text": "public function toFilterFormElement(): FormElement;", "title": "" }, { "docid": "c0f6559f19d2d4456061d4e1511c018e", "score": "0.5716035", "text": "public static function getFilterSelect($action,$name,$lable,$value)\r\n {\r\n \t$str='<script language=\"javascript\">\r\n \t\t$(document).ready(function(){\r\n \t\t\t$(\"#fund_no\").change(function(){\r\n \t\t\t\tvar value=$(\"#fund_no option:selected\").text(); \t\t\t\t \t\t\t\t\r\n\t\t \t\t$.post(\r\n\t\t\t\t\t\t\"/jquery/filter/'.$action.'\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"fund_no\" : value\t\t\t\t\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tfunction(data){\r\n\t\t\t\t\t\t\tvar val=$(\"#'.$name.'\").val();\t\t\t\t\t\r\n\t\t\t\t\t\t\tvar temp=\"<option value=\\'\\'>--------------None-----------------</option>\";\r\n\t\t\t\t\t\t\tif(data)temp=\"<option value=\\'\\'>--------------Select-----------------</option>\";\r\n\t\t\t\t\t\t\t$(\"#'.$name.' option\").each(function(i, option){ $(option).remove(); });\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(\"#'.$name.'\").append(temp);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfor(var i=0;i<data.length;i++){\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(\"#'.$name.'\").append(\\'<option value=\"\\'+data[i].'.$value.'+\\'\">\\'+data[i].'.$lable.'+\\'</option>\\');\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(\"#'.$name.'\").val(val);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"json\"\t\t\t\t\r\n\t\t\t\t\t );\r\n\t\t\t\t\t return false;\r\n\t\t\t\t});\t\t\r\n \t\t});\r\n \t\t</script>\r\n \t';\r\n \treturn $str;\r\n }", "title": "" }, { "docid": "ab3ccf77c0388b953986d4c445de2739", "score": "0.5710601", "text": "public function getFilter()\n {\n if (false === $this->filter) {\n return '';\n }\n if (is_array($this->filter)) {\n return Form::get()->select($this->dataProvider->filtersKey . '[' . $this->name . ']', $this->filter, null, array(), '');\n }\n \n if (is_string($this->filter) && (strlen($this->filter) > 10)){\n return $this->filter;\n }\n \n return Form::get()->input($this->dataProvider->filtersKey . '[' . $this->name . ']');\n }", "title": "" }, { "docid": "bc74c7c8f0ab80c1e7d16c7b204e30c5", "score": "0.57029974", "text": "function showOrderDirectionFilter(){\n global $orderDirection;\n ?>\n <label class=\"boxed-select\" id=\"order-direction-filter\">\n <div>Orden</div>\n <select data-class=\"order-direction-filter\" name=\"orderDirection\">\n <option value=\"0\" <?=$orderDirection == 0 ? \"selected\" : \"\"?>>Ascendente</option>\n <option value=\"1\" <?=$orderDirection == 1 ? \"selected\" : \"\"?>>Descendente</option>\n </select>\n </label>\n <?php\n}", "title": "" }, { "docid": "d11d7928572c1ac3a4da4435e9434f34", "score": "0.5700245", "text": "function br_rc_add_pardot_form_filter( $post_type ) {\n global $wpdb;\n\n // If we're not dealing w/ a resource, return\n if ( $post_type !== 'br_rc_resource' ) :\n return;\n endif;\n\n // Create new query\n $query = $wpdb->prepare('\n SELECT DISTINCT pm.meta_value FROM %1$s pm\n LEFT JOIN %2$s p ON p.ID = pm.post_id\n WHERE pm.meta_key = \"%3$s\"\n AND p.post_status = \"%4$s\"\n AND p.post_type = \"%5$s\"\n ORDER BY \"%3$s\"',\n $wpdb->postmeta,\n $wpdb->posts,\n '_br_rc_pardot_form_url',\n 'publish',\n $post_type\n );\n $results = $wpdb->get_col( $query );\n\n // If we've got no results, return\n if ( empty( $results ) ) :\n return;\n endif;\n\n $pardot_form_value = isset( $_GET['pardot-form-toggle'] ) \n && '' != $_GET['pardot-form-toggle'] \n ? 1 \n : '';\n\n // Build the options\n $options[] = sprintf( '<option value=\"\">%1$s</option>', \n __( 'All Form Types', \n 'brainrider-resource-centre' ) \n );\n\n $options[] = sprintf( '<option value=\"1\"'\n . selected( 1,\n $pardot_form_value,\n false ) \n . '>%1$s</option>',\n __( 'Pardot-enabled Resources' ) );\n \n // Build the output\n $output = '<select class=\"\"';\n $output .= 'id=\"pardot-form-toggle\"';\n $output .= ' name=\"pardot-form-toggle\">';\n $output .= join( \"\\n\", $options );\n $output .= '</select>';\n\n // Echo the output\n echo $output;\n}", "title": "" }, { "docid": "7bcb0718423828de446876d01ea7d219", "score": "0.56865734", "text": "public function start_form()\n {\n $this->process('wpsearchconsole_apply_todo_filter', 'wpsearchconsole_reset_todo_filter'); ?>\n\n <form method=\"post\" action=\"\" enctype=\"multipart/form-data\">\n <div class=\"wp-filter\" style=\"padding: 20px;\">\n <div class=\"alignleft\">\n <fieldset>\n <?php $this->dropdown('priority', get_option('wpsearchconsole_todo_priority'));\n $this->dropdown('category', get_option('wpsearchconsole_todo_categories'));\n $this->dropdown('responsible', $this->authors->user_details());\n $this->dropdown('dates',\n array(\n 0 => __('All Dates', 'wpsearchconsole'),\n 1 => __('Next Day', 'wpsearchconsole'),\n 7 => __('Next Week', 'wpsearchconsole'),\n 15 => __('Next 15 Days', 'wpsearchconsole'),\n 30 => __('Next 30 Days', 'wpsearchconsole'),\n ));\n $this->dropdown('archived', get_option('wpsearchconsole_todo_archived'));\n submit_button(__('Apply Filter', 'wpsearchconsole'), 'secondary', 'wpsearchconsole_apply_todo_filter', false); ?>\n </fieldset>\n </div>\n <div class=\"alignright\">\n <fieldset>\n <a href=\"<?php echo getenv('REQUEST_ADDR'); ?>\"></a>\n <?php submit_button(__('Reset Filter', 'wpsearchconsole'), 'secondary', 'wpsearchconsole_reset_todo_filter', false); ?>\n </fieldset>\n </div>\n </div>\n </form>\n <?php\n }", "title": "" }, { "docid": "34f870f2104dd3deb822409190b81ba9", "score": "0.5676757", "text": "public function getFilteredOptions();", "title": "" }, { "docid": "504d9c8f9e7c7f13241b2271d2c92581", "score": "0.5664338", "text": "private function _getHtmlFilter() {\n\n $html = '<input type=\"text\" id=\"search\" class=\"form-control\" onkeyup=\"filter()\" placeholder=\"Ricerca per nome\" aria-describedby=\"search\" style=\"width: 100%;margin:15px\"/>\n <script>\n function filter() {\n let input, filter, ul, li, a, i, txtValue;\n input = document.getElementById(\"search\");\n filter = input.value.toUpperCase();\n ul = document.getElementById(\"list-search\");\n li = ul.getElementsByTagName(\"li\");\n \n for (i = 0; i < li.length; i++) {\n a = li[i].getElementsByTagName(\"a\")[0];\n txtValue = a.textContent || a.innerText;\n if (txtValue.toUpperCase().indexOf(filter) > -1) {\n li[i].style.display = \"\";\n } else {\n li[i].style.display = \"none\";\n }\n }\n }\n </script>\n <style>ul#list-search > li {padding: 2px;} ul#list-search > li a {font-size: 16px;}</style>';\n\n return $html;\n }", "title": "" }, { "docid": "54e4dedd8ecc4f9e9fb104234a511672", "score": "0.5663983", "text": "public function actionFiltration()\n {\n $carTransporterCities = Yii::$app->request->post('carTransporterCities', []);\n $dataProvider = CarTransporter::getMyCarTransportersDataProvider($carTransporterCities);\n return $this->renderAjax('/my-announcement/my-car-transporters-table', compact('dataProvider'));\n }", "title": "" }, { "docid": "a671e7be9a76d99b27ce22359170d087", "score": "0.5663869", "text": "protected function buildFilters() {\n\t\t// filter to be displayed as link\n\t\t$filterLabels = [];\n\t\tforeach ( [ 'featured', 'unreviewed' ] as $filter ) {\n\t\t\t// Give grep a chance to find the usages:\n\t\t\t// articlefeedbackv5-special-filter-featured, articlefeedbackv5-special-filter-unreviewed\n\t\t\t$filterLabels[$filter] =\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'a',\n\t\t\t\t\t[\n\t\t\t\t\t\t'href' => '#',\n\t\t\t\t\t\t'id' => \"articleFeedbackv5-special-filter-$filter\",\n\t\t\t\t\t\t'class' => 'articleFeedbackv5-filter-link' . ( $this->startingFilter == $filter ? ' filter-active' : '' )\n\t\t\t\t\t],\n\t\t\t\t\t$this->msg( \"articlefeedbackv5-special-filter-$filter-watchlist\" )->escaped()\n\t\t\t\t);\n\t\t}\n\n\t\t// filters to be displayed in dropdown (only for editors)\n\t\t$filterSelectHtml = '';\n\t\tif ( $this->isAllowed( 'aft-editor' ) ) {\n\t\t\t$opts = [];\n\n\t\t\t// Give grep a chance to find the usages:\n\t\t\t// articlefeedbackv5-special-filter-featured-watchlist, articlefeedbackv5-special-filter-unreviewed-watchlist,\n\t\t\t// articlefeedbackv5-special-filter-helpful-watchlist, articlefeedbackv5-special-filter-unhelpful-watchlist,\n\t\t\t// articlefeedbackv5-special-filter-flagged-watchlist, articlefeedbackv5-special-filter-useful-watchlist,\n\t\t\t// articlefeedbackv5-special-filter-resolved-watchlist, articlefeedbackv5-special-filter-noaction-watchlist,\n\t\t\t// articlefeedbackv5-special-filter-inappropriate-watchlist, articlefeedbackv5-special-filter-archived-watchlist,\n\t\t\t// articlefeedbackv5-special-filter-allcomment-watchlist, articlefeedbackv5-special-filter-hidden-watchlist,\n\t\t\t// articlefeedbackv5-special-filter-requested-watchlist, articlefeedbackv5-special-filter-declined-watchlist,\n\t\t\t// articlefeedbackv5-special-filter-oversighted-watchlist, articlefeedbackv5-special-filter-all-watchlist\n\t\t\tforeach ( $this->filters as $filter ) {\n\t\t\t\tif ( isset( $filterLabels[$filter] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$key = $this->msg( \"articlefeedbackv5-special-filter-$filter-watchlist\" )->text();\n\t\t\t\t$opts[(string)$key] = $filter;\n\t\t\t}\n\n\t\t\tif ( count( $opts ) > 0 ) {\n\t\t\t\t// Put the \"more filters\" option at the beginning of the opts array\n\t\t\t\t$opts = [ $this->msg( 'articlefeedbackv5-special-filter-select-more' )->text() => '' ] + $opts;\n\n\t\t\t\t$filterSelect = new XmlSelect( false, 'articleFeedbackv5-filter-select' );\n\t\t\t\t$filterSelect->setDefault( $this->startingFilter );\n\t\t\t\t$filterSelect->addOptions( $opts );\n\t\t\t\t$filterSelectHtml = $filterSelect->getHTML();\n\t\t\t}\n\t\t}\n\n\t\treturn Html::rawElement(\n\t\t\t\t'div',\n\t\t\t\t[ 'id' => 'articleFeedbackv5-filter' ],\n\t\t\t\timplode( ' ', $filterLabels ) .\n\t\t\t\t\tHtml::rawElement(\n\t\t\t\t\t\t'div',\n\t\t\t\t\t\t[ 'id' => 'articleFeedbackv5-select-wrapper' ],\n\t\t\t\t\t\t$filterSelectHtml\n\t\t\t\t\t)\n\t\t\t);\n\t}", "title": "" }, { "docid": "04347e9c64e6673c585dbd603d830b45", "score": "0.5658639", "text": "public function filter(Request $request)\n {\n if(isset($request->submit) && $request->submit == 'Apply')\n {\n if(isset($request->researcher))\n {\n $user=User::where('name',$request->researcher)->first();\n $services=service::where('provider',$user->id)->get();\n }\n else if(isset($request->start) && isset($request->end))\n {\n $services=service::whereBetween('price',[$request->start,$request->end])->get();\n }\n else if(isset($request->asset))\n {\n $services=service::where('asset',$request->asset)->get();\n }\n else if(isset($request->market))\n {\n $services=service::where('market',$request->market)->get();\n }\n else\n {\n return redirect()->back()->with('error','Select one Filter Type');\n }\n\n return view('pages.research')->with(array('services'=>$services));\n }\n \n }", "title": "" }, { "docid": "8ae297e324b9bb5509926c162740126c", "score": "0.5652376", "text": "public function getDateFilterForm() {\n\n\t\t// Display a form that allows filtering from a specified date.\n\n\t\t$children = MediaPage::get()->where('ParentID = ' . (int)$this->data()->ID);\n\t\t$form = Form::create(\n\t\t\t$this,\n\t\t\t'getDateFilterForm',\n\t\t\tFieldList::create(\n\t\t\t\t$dateFrom = DateField::create(\n\t\t\t\t\t\t'from', ''\n\t\t\t\t\t)->setConfig('showcalendar', true)->setConfig('min', $children->min('Date'))->setConfig('max',\n\t\t\t\t\t\t$children->max('Date'))->setAttribute('placeholder', 'From'),\n\t\t\t\t\t$dateTo = DateField::create(\n\t\t\t\t\t\t'to', ''\n\t\t\t\t\t)->setConfig('showcalendar', true)->setConfig('min', $children->min('Date'))->setConfig('max',\n\t\t\t\t\t\t$children->max('Date'))->setAttribute('placeholder', 'To'),\n\t\t\t\t\tHiddenField::create(\n\t\t\t\t\t\t'category'\n\t\t\t\t\t),\n\t\t\t\tHiddenField::create(\n\t\t\t\t\t'tag'\n\t\t\t\t)\n\t\t\t),\n\t\t\tFieldList::create(\n\t\t\t\tFormAction::create(\n\t\t\t\t\t'dateFilter',\n\t\t\t\t\t'Filter'\n\t\t\t\t),\n\t\t\t\tFormAction::create(\n\t\t\t\t\t'clearFilters',\n\t\t\t\t\t'Clear'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$form->setFormMethod('get');\n\n\t\t// Display existing request filters.\n\n\t\t$request = $this->getRequest();\n\t\t$form->loadDataFrom($request->getVars());\n\n\t\t// Validate the date request filters, as this isn't captured on page request.\n\n\t\tif ($from = $request->getVar('from')) {\n\t\t\tforeach (explode('-', $from) as $segment) {\n\t\t\t\tif (!is_numeric($segment)) {\n\t\t\t\t\t$dateFrom->setValue(null);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($to = $request->getVar('to')) {\n\t\t\tforeach (explode('-', $to) as $segment) {\n\t\t\t\tif (!is_numeric($segment)) {\n\t\t\t\t\t$dateTo->setValue(null);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Remove validation if clear has been triggered.\n\n\t\tif($request->getVar('action_clearFilters')) {\n\t\t\t$form->unsetValidator();\n\t\t}\n\n\t\t// Allow extension customisation.\n\n\t\t$this->extend('updateFilterForm', $form);\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "aead3dd2e64d2eb55bbb55893ff7168f", "score": "0.5649191", "text": "public function addOptionFilters();", "title": "" }, { "docid": "0106c756e648b27682403abe7aff450c", "score": "0.56455666", "text": "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n \n // clear session filters\n TSession::setValue(__CLASS__.'_filter_ato', NULL);\n TSession::setValue(__CLASS__.'_filter_justificativa', NULL);\n TSession::setValue(__CLASS__.'_filter_dt_nomeacao', NULL);\n TSession::setValue(__CLASS__.'_filter_dt_publicacao', NULL);\n TSession::setValue(__CLASS__.'_filter_obs', NULL);\n\n if (isset($data->ato) AND ($data->ato)) {\n $filter = new TFilter('ato', '=', $data->ato); // create the filter\n TSession::setValue(__CLASS__.'_filter_ato', $filter); // stores the filter in the session\n }\n\n\n if (isset($data->justificativa) AND ($data->justificativa)) {\n $filter = new TFilter('justificativa_ato_id', 'like', \"%{$data->justificativa}%\"); // create the filter\n TSession::setValue(__CLASS__.'_filter_justificativa', $filter); // stores the filter in the session\n }\n\n\n if (isset($data->dt_nomeacao) AND ($data->dt_nomeacao)) {\n $filter = new TFilter('dt_nomeacao', 'like', \"%{$data->dt_nomeacao}%\"); // create the filter\n TSession::setValue(__CLASS__.'_filter_dt_nomeacao', $filter); // stores the filter in the session\n }\n\n\n if (isset($data->dt_publicacao) AND ($data->dt_publicacao)) {\n $filter = new TFilter('dt_publicacao', 'like', \"%{$data->dt_publicacao}%\"); // create the filter\n TSession::setValue(__CLASS__.'_filter_dt_publicacao', $filter); // stores the filter in the session\n }\n\n\n if (isset($data->obs) AND ($data->obs)) {\n $filter = new TFilter('obs', 'like', \"%{$data->obs}%\"); // create the filter\n TSession::setValue(__CLASS__.'_filter_obs', $filter); // stores the filter in the session\n }\n\n \n // fill the form with data again\n $this->form->setData($data);\n \n // keep the search data in the session\n TSession::setValue(__CLASS__ . '_filter_data', $data);\n \n $param = array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }", "title": "" }, { "docid": "00dd9262caac39a13dd04cfe5d96302f", "score": "0.564389", "text": "public function downloads_filter() {\n\t\t$downloads = get_posts( array(\n\t\t\t'post_type' => 'download',\n\t\t\t'post_status' => 'any',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'orderby' => 'title',\n\t\t\t'order' => 'ASC',\n\t\t\t'fields' => 'ids',\n\t\t\t'update_post_meta_cache' => false,\n\t\t\t'update_post_term_cache' => false,\n\t\t) );\n\t\t?>\n\t\t<form id=\"edd-likelihood-filter\" method=\"get\" action=\"<?php echo admin_url( 'edit.php?post_type=download&page=edd-reports&tab=likelihood_calculator' ); ?>\">\n\t\t<?php\n\t\tif ( $downloads ) {\n\t\t\techo '<select name=\"download\" id=\"edd-lc-download-filter\">';\n\t\t\techo '<option value=\"0\">' . __( 'All', 'edd-likelihood-calculator' ) . '</option>';\n\t\t\tforeach ( $downloads as $download ) {\n\t\t\t\techo '<option value=\"' . $download . '\"' . selected( $download, $this->get_filtered_download() ) . '>' . esc_html( get_the_title( $download ) ) . '</option>';\n\t\t\t}\n\t\t\techo '</select>';\n\t\t\techo '<input type=\"hidden\" name=\"post_type\" value=\"download\" />';\n\t\t\techo '<input type=\"hidden\" name=\"page\" value=\"edd-reports\" />';\n\t\t\techo '<input type=\"hidden\" name=\"tab\" value=\"likelihood_calculator\" />';\n\t\t\tsubmit_button( __( 'Apply', 'edd-likelihood-calculator' ), 'secondary', 'submit', false );\n\t\t}\n\t\t?>\n\t\t</form>\n\t\t<?php\n\t}", "title": "" }, { "docid": "cbd9c9440501c54c76d38149fa1457f9", "score": "0.5643546", "text": "function filter_bar($c = null, $s= null) {\n\n\t\t$filters = array(\n\t\t\t'default-asc',\n\t\t\t'fullname-asc',\n\t\t\t'fullname-desc',\n\t\t\t'price-asc',\n\t\t\t'price-desc',\n\t\t\t'duration-asc',\n\t\t\t'duration-desc',\n\t\t);\n\n\t\t// open form wrapper\n\t\t$html = '<form action=\"\" method=\"GET\" class=\"filter-bar\">';\n\n\t\t\t// Render category filter\n\t\t\t$html .= sprintf(\n\t\t\t\t'<div class=\"filter__category\">\n\t\t\t\t\t<span>%s</span>\n\t\t\t\t\t<select name=\"category\" id=\"category\">\n\t\t\t\t\t\t%s\n\t\t\t\t\t</select>\n\t\t\t\t</div>',\n\t\t\t\tget_string('filter_category_label', 'local_moodec'),\n\t\t\t\tlocal_moodec_get_category_list($c)\n\t\t\t);\n\n\t\t\t// Render sorting filter\n\t\t\t$html .= sprintf(\n\t\t\t\t'<div class=\"filter__sort\">\n\t\t\t\t\t<span>%s</span>\n\t\t\t\t\t<select name=\"sort\" id=\"sort\">',\n\t\t\t\tget_string('filter_sort_label', 'local_moodec')\n\t\t\t);\n\n\t\t\t\t// Output all options for filters\n\t\t\t\tforeach ($filters as $f) {\n\t\t\t\t\t\n\t\t\t\t\t// Category option\n\t\t\t\t\t$html .= sprintf(\n\t\t\t\t\t\t'<option value=\"%s\" %s>%s</option>',\n\t\t\t\t\t\t$f,\n\t\t\t\t\t\t$s === $f ? 'selected=\"selected\"' : '',\n\t\t\t\t\t\tget_string('filter_sort_' . str_replace('-', '_', $f), 'local_moodec')\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t// close sort filter\n\t\t\t$html .= '</select></div>';\n\n\t\t// close filter-bar form\n\t\t$html .= '</form>';\n\n\t\treturn $html;\n\n\t}", "title": "" }, { "docid": "76adf4524a2d82b22bf6cd7d2850c338", "score": "0.56256354", "text": "public static function getFilterList();", "title": "" }, { "docid": "67b835a86a008aaf83ca2df3507f204d", "score": "0.56242335", "text": "function showFilter(){\n if(isset($this->isContent) && $this->isContent>0){\n $this->initParamFilter();\n// var_dump($this->settings);\n if(isset($this->settings['cat_params']) && $this->settings['cat_params']==1){\n $str = $this->ShowAllFilters();\n }else{\n $str = '';\n }\n// echo '$str='.$str;\n if(isset($this->settings['manufac']) && $this->settings['manufac']==1){\n $strBrand = $this->ShowBrandFilter();\n }else{\n $strBrand = '';\n }\n// echo '$strBrand='.$strBrand;\n if(isset($this->settings['price']) && $this->settings['price']==1){\n $strPrice = $this->ShowPriceFilter();\n }else{\n $strPrice = '';\n }\n// echo '$strPrice='.$strPrice;\n if(!empty($str) || !empty($strPrice) || !empty($strBrand)){\n $strSel = $this->ShowSelectedFilters();\n echo View::factory('/modules/mod_catalog/templates/param/tpl_show_filter.php')\n ->bind('name_block', $this->multi['TXT_FILTR_PROP'])\n ->bind('catLink', $this->catLink)\n ->bind('strSel', $strSel)\n ->bind('str', $str)\n ->bind('strBrand', $strBrand)\n ->bind('strPrice', $strPrice);\n }\n }\n }", "title": "" }, { "docid": "f8a9925a62257ae6b22ff923e8e83e77", "score": "0.56238794", "text": "public function booking_filters() {\n\t\tglobal $typenow, $wp_query;\n\n\t\tif ( $typenow != $this->type ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$filters = array();\n\n\t\t$products = WC_Bookings_Admin::get_booking_products();\n\n\t\tforeach ( $products as $product ) {\n\t\t\t$filters[ $product->ID ] = $product->post_title;\n\n\t\t\t$resources = wc_booking_get_product_resources( $product->ID );\n\n\t\t\tforeach ( $resources as $resource ) {\n\t\t\t\t$filters[ $resource->ID ] = '&nbsp;&nbsp;&nbsp;' . $resource->post_title;\n\t\t\t}\n\t\t}\n\n\t\t$output = '';\n\n\t\tif ( $filters ) {\n\t\t\t$output .= '<select name=\"filter_bookings\">';\n\t\t\t$output .= '<option value=\"\">' . __( 'All Bookable Products', 'woocommerce-bookings' ) . '</option>';\n\n\t\t\tforeach ( $filters as $filter_id => $filter ) {\n\t\t\t\t$output .= '<option value=\"' . absint( $filter_id ) . '\" ';\n\n\t\t\t\tif ( isset( $_REQUEST['filter_bookings'] ) ) {\n\t\t\t\t\t$output .= selected( $filter_id, $_REQUEST['filter_bookings'], false );\n\t\t\t\t}\n\n\t\t\t\t$output .= '>' . esc_html( $filter ) . '</option>';\n\t\t\t}\n\n\t\t\t$output .= '</select>';\n\t\t}\n\n\t\techo $output;\n\t}", "title": "" }, { "docid": "d4db4a9971f6bda3998a5f4974f936c0", "score": "0.56126326", "text": "public function html() {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '250px'])\n ->parameters([\n// 'dom' => 'Bfrtip',\n// 'buttons' => [['extend' => 'create', 'className' => 'btn btn-success', 'text' => 'Create Partner', 'init' => 'function(api, node, config) {\n// $(node).removeClass(\"dt-button buttons-create btn-default\")\n// }']],\n 'select' => true,\n 'initComplete' => \"function () {\n var r = $('#datatable-buttons tfoot tr');\n $('#datatable-buttons thead') . append(r);\n\n this.api().columns([0,1,2,3]).every(function () {\n var column = this; \n var input = document . createElement('input');\n $(input).addClass('form-control input-lg col-xs-12');\n $(input).appendTo($(column.footer()).empty())\n .on('change', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n });\n this.api().columns(6).every(function () {\n var column = this; \n var select = $('#table-filter')\n $(select).addClass('form-control input-lg col-xs-12')\n .appendTo($(column.footer()).empty())\n .on('change', function () {\n column.search($(this).val(), false, false).draw();\n });\n \n });\n }\"\n ]);\n }", "title": "" }, { "docid": "d16a285a3fa6c7d9ecbc3e6a6e6b9a34", "score": "0.56028634", "text": "function extra_options_form(&$form, &$form_state) {\n $options = $this->get_filter_options('controller');\n $form['controller_filter'] = array(\n '#type' => 'radios',\n '#title' => t('Controller filter'),\n '#options' => $options,\n '#default_value' => isset($this->options['controller_filter']) ? $this->options['controller_filter'] : '',\n '#description' => t('The exposed filter whose values will be used to control dependent filters. Only filters that are prior to this one in the order are allowed.'),\n );\n }", "title": "" }, { "docid": "c76ff78cdd3630c75cd0259315873c59", "score": "0.5599188", "text": "function print_filter_platform() {\n\tglobal $t_select_modifier, $t_filter;\n\n\t?>\n\t\t<!-- Platform -->\n\t\t<select <?php echo $t_select_modifier;?> name=\"<?php echo FILTER_PROPERTY_PLATFORM;?>[]\">\n\t\t\t<option value=\"<?php echo META_FILTER_ANY?>\" <?php check_selected( $t_filter[FILTER_PROPERTY_PLATFORM], META_FILTER_ANY );?>>[<?php echo lang_get( 'any' )?>]</option>\n\t\t\t<?php\n\t\t\t\tlog_event( LOG_FILTERING, 'Platform = ' . var_export( $t_filter[FILTER_PROPERTY_PLATFORM], true ) );\n\tprint_platform_option_list( $t_filter[FILTER_PROPERTY_PLATFORM] );\n\t?>\n\t\t</select>\n\t\t<?php\n}", "title": "" }, { "docid": "010e350c706fcb981c6cc396c48d7156", "score": "0.5597739", "text": "function scaffoldSearchFields(){\n\t\t$fieldSet = parent::scaffoldSearchFields();\n\n\t\t$statusField = new DropdownField('Status', 'Status', array(\n\t\t 1 => \"published\", \n\t\t 2 => \"not published\"\n\t\t));\n\t\t$statusField->setHasEmptyDefault(true);\n\t\t$fieldSet->push($statusField);\n\t\t\n\t\tif($categories = DataObject::get('ProductCategory')) {\n\t\t $categories->sort('MenuTitle');\n\t\t $categoryOptions = $categories->map(\"ID\", \"MenuTitle\");\n\t\t //$fieldSet->push(new CheckboxSetField('Category', 'Category', $categoryOptions));\n\t\t \n\t\t $dropDown = new DropdownField('Category', 'Category', $categoryOptions);\n\t\t $dropDown->setHasEmptyDefault(true);\n\t\t $fieldSet->push($dropDown);\n\t\t}\n\n\t\treturn $fieldSet;\n\t}", "title": "" }, { "docid": "957e2c9dfa2b514278bc6800c2ea1b51", "score": "0.55903155", "text": "public static function searchForm() {}", "title": "" }, { "docid": "2ffacaad65a222ab966aa88e55e86b09", "score": "0.5577081", "text": "protected function get_selection_filters() {\n // we can filter them by.\n $group_options = self::get_potential_groups();\n $user_options = self::get_potential_users();\n $role_options = self::get_role_filters();\n\n // Add the filters, which allow us to select which users the e-mail will be sent to.\n $filters = new html_table_cell();\n $filters->text =\n html_writer::tag('div', html_writer::select($role_options, '', 'none', null, array('id' => 'roles'))) .\n html_writer::tag('div', quickmail::_s('potential_sections'), array('class' => 'object_labels')) .\n html_writer::tag('div', html_writer::select($group_options, '', 'all', null, array('id' => 'groups', 'multiple' => 'multiple', 'size' => 5))) .\n html_writer::tag('div', quickmail::_s('potential_users'), array('class' => 'object_labels')) . \n html_writer::tag('div', html_writer::select($user_options, '', '', null, array('id' => 'from_users', 'multiple' => 'multiple', 'size' => 20)));\n\n // Return the newly created filter selects.\n return $filters;\n }", "title": "" }, { "docid": "521b6f145e8c39b2208b392fba96c99a", "score": "0.5569752", "text": "public function filter($fields = array()) {\n\t\t$output = '<tr class=\"filters\">';\n\n\t\tif (!empty($fields)) {\n\t\t\tforeach ($fields as $field => $options) {\n\t\t\t\tif (is_int($field)) {\n\t\t\t\t\t$field = $options;\n\t\t\t\t\t$options = array();\n\t\t\t\t}\n\t\t\t\tif (empty($field)) {\n\t\t\t\t\t$output .= '<th>&nbsp;</th>';\n\t\t\t\t} elseif ($field === true) {\n\t\t\t\t\t$output = '<th class=\"actions\">';\n\t\t\t\t\t$output .= $this->filterButtons();\n\t\t\t\t\t$output .= '</th>';\n\t\t\t\t} else {\n\t\t\t\t\t$options['group'] = 'Filter';\n\t\t\t\t\t$output .= '<th>' . $this->_input($field, $options) . '</th>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!in_array(true, $fields, true)) {\n\t\t\t$output .= '<th class=\"actions\">';\n\t\t\t$output .= $this->filterButtons();\n\t\t\t$output .= '</th>';\n\t\t}\n\t\t$output .= '</tr>';\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "de780b5f68cd2fe75144d5236a62a242", "score": "0.55637294", "text": "function ShowFilterList() {\n\n\t// Initialize\n\t$sFilterList = \"\";\n\n\t// Field feedmill\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_feedmill\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_feedmill\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Feedmill<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field feedtype\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_feedtype\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_feedtype\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Feedtype<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field sid\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_sid\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_sid\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Sid<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field date\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_date\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_date\"], \", \", EW_REPORT_DATATYPE_DATE);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Date<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Show Filters\n\tif ($sFilterList <> \"\")\n\t\techo \"CURRENT FILTERS:<br />$sFilterList\";\n}", "title": "" }, { "docid": "30ba1eb67f45a7d94edee06bea161451", "score": "0.5562034", "text": "function select()\r\n{\r\n\tglobal $a;\r\n \tglobal $showrecs;\r\n \tglobal $page;\r\n \tglobal $filter;\r\n \tglobal $filterfield;\r\n \tglobal $wholeonly;\r\n \tglobal $order;\r\n \tglobal $ordtype;\r\n\tglobal $pagerange;\r\n\t\r\n\t\r\n \tif ($a == \"reset\") {\r\n \t$filter = \"\";\r\n \t$filterfield = \"\";\r\n \t$wholeonly = \"\";\r\n \t$order = \"\";\r\n \t$ordtype = \"\";\r\n \t}\r\n\r\n \t$checkstr = \"\";\r\n \tif ($wholeonly) $checkstr = \" checked\";\r\n \tif ($ordtype == \"asc\") { $ordtypestr = \"desc\"; } else { $ordtypestr = \"asc\"; }\r\n \t$res = sql_select();\r\n \t$count = sql_getrecordcount();\r\n \tif ($count % $showrecs != 0) {\r\n \t$pagecount = intval($count / $showrecs) + 1;\r\n \t}\r\n \telse {\r\n \t$pagecount = intval($count / $showrecs);\r\n \t}\r\n \t$startrec = $showrecs * ($page - 1);\r\n \tif ($startrec < $count) {mysqli_data_seek($res, $startrec);}\r\n \t$reccount = min($showrecs * $page, $count);\r\n\t\r\n?>\r\n\t<form name=\"frmFilter\" action=\"\" method=\"post\">\r\n\t\t<table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" width=\"100%\" bgcolor=\"#EAEAEA\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"5\" align=\"left\"><b>Custom Filter</b>&nbsp;\r\n\t\t\t\t<input type=\"text\" name=\"filter\" class=\"uppercase\" value=\"<?php echo $filter ?>\">\r\n\t\t\t\t\r\n <select name=\"filter_field\">\r\n\t\t\t\t\t<option value=\"\">All Fields</option>\r\n \t<option value=\"<?php echo \"task_name\" ?>\"<?php if ($filterfield == \"task_name\") { echo \"selected\"; } ?>>\r\n\t\t\t\t\t\t<?php echo htmlspecialchars(\"Task Name\")?>\r\n </option>\r\n\t\t\t\t\t<option value=\"<?php echo \"task_description\" ?>\"<?php if ($filterfield == \"task_description\") { echo \"selected\"; } ?>>\r\n\t\t\t\t\t\t<?php echo htmlspecialchars(\"Task Description\") ?>\r\n </option>\r\n \r\n\t\t\t\t </select>\r\n \r\n\t\t\t\t<input type=\"button\" name=\"action\" value=\"Apply\" onClick=\"javascript:SearchData(this.form,'task/task.php?status=true&a=filter')\" >\r\n\t\t\t\t<input type=\"button\" name=\"action\" value=\"Reset\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','task/task.php?status=true&a=reset')\">\r\n </td>\r\n\t\t </tr>\r\n\t\t</table>\r\n\t</form>\r\n\t<hr size=\"1\" noshade>\r\n <form name=\"frmCategory\" id=\"frmCategory\" action=\"task/task.php?status=true&a=del\" method=\"post\">\r\n\t<table class=\"bd\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" width=\"100%\">\r\n\t\t<tr>\r\n\t\t\t<td align=\"left\">\r\n \t<input type=\"button\" name=\"action\" value=\"Add New Task\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','task/task.php?status=true&a=add')\">\r\n \t<input type=\"button\" name=\"btnDelete\" value=\"Delete\" onClick=\"if(onDeletes()==true){ javascript:formget(this.form,'task/processTask.php'); javascript:LoadDiv('<?php echo CENTER_DIV ?>','task/task.php?status=true');javascript:printHeader('Task');}\" >\r\n <input type=\"hidden\" name=\"action\" value=\"delete\">\r\n </td>\r\n <td align=\"right\">Rows Per Page\r\n \t <select name=\"pageperrecord\" onChange=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','task/task.php?status=true&pageId='+this.value)\">\r\n\t\t\t\t<?php echo pageRangeList($showrecs); ?>\r\n </select>\r\n\t\t\t</td>\r\n \r\n\t\t</tr>\r\n\t</table>\r\n\t<table class=\"tbl\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\"width=\"100%\">\r\n\t\t<tr>\r\n\t\t\t<td class=\"hr\"><input name=\"CheckAll\" type=\"checkbox\" id=\"CheckAll\" value=\"Y\" onClick=\"javascript:ClickCheckAll(this.form);\"></td>\r\n \r\n\t\t\t<td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','task/task.php?status=true&order=<?php echo \"task_name\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Task Name\") ?>\r\n </a>\r\n </td>\r\n\t\t\t<td class=\"hr\">\r\n \t<a class=\"hr\" href=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','task/task.php?status=true&order=<?php echo \"task_description\" ?>&type=<?php echo $ordtypestr ?>')\">\r\n\t\t\t\t\t<?php echo htmlspecialchars(\"Task Description\") ?>\r\n </a>\r\n </td>\r\n \r\n\t\t</tr>\r\n\t<?php\r\n\t$prev=\"\";\r\n \tfor ($i = $startrec; $i < $reccount; $i++)\r\n \t{\r\n \t$row = mysqli_fetch_assoc($res);\r\n \t$style = \"dr\";\r\n\t\t\r\n \tif ($i % 2 != 0) {\r\n \t\t$style = \"sr\";\r\n \t}\r\n\t\t$catCode = $row[\"task_code\"];\r\n\t\t$catField = \"task_code\";\r\n\t?>\r\n\t<tr class=\"<?php echo $style ?>\" style=\"cursor:pointer\">\r\n \t<td align=\"left\">\r\n \t<input name=\"userbox[]\" type=\"checkbox\" id=\"userbox<?php echo $i;?>\" value=\"<?php echo $row['task_code']; ?>\">\r\n </td>\r\n \r\n\t\t<td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','task/task.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n \t<?php echo htmlspecialchars(strtoupper($row[\"task_name\"])) ?>\r\n </td>\r\n \t\r\n\t\t<td align=\"left\" onClick=\"javascript:LoadDiv('<?php echo CENTER_DIV ?>','task/task.php?status=true&a=view&recid=<?php echo $i ?>')\">\r\n\t\t\t<?php echo htmlspecialchars(strtoupper($row[\"task_description\"])) ?>\r\n </td>\r\n \r\n\t</tr>\r\n\t<?php\r\n \t}//for loop\r\n \tmysqli_free_result($res);\r\n\t?>\r\n <input type=\"hidden\" name=\"hdnCount\" id=\"hdnCount\" value=\"<?php echo $i; ?>\">\r\n\t</table>\r\n </form>\r\n\t<br><center>\r\n\t<?php \r\n\t\t//showpagenav($page, $pagecount); \r\n\t\tshowpagenav($page, $pagecount,$pagerange,'task/task.php'); \r\n}", "title": "" }, { "docid": "0b945f5ef540e027e207a0163b296975", "score": "0.55589706", "text": "public function buildFilterProcess(){\n $options = array();\n $options[]\t= JHtml::_('select.option', '0', JText::_('COM_JVSOCIAL_PUBLISH_STATE_WAIT'));\n $options[]\t= JHtml::_('select.option', '1', JText::_('COM_JVSOCIAL_PUBLISH_STATE_COMPLETE'));\n return $options;\n }", "title": "" }, { "docid": "4902341d6e142c76f4df28e3f92a46dd", "score": "0.5549511", "text": "function showStateFilter(){\n global $state;\n ?>\n <label class=\"boxed-select\" id=\"active-filter\">\n <div>Estado</div>\n <select data-class=\"labeled\" name=\"state\">\n <option value=\"-1\">Todos</option>\n <option value=\"1\" data-class=\"enabled\" <?=$state == 1 ? \"selected\" : \"\" ?>>Activado</option>\n <option value=\"0\" data-class=\"disabled\" <?=$state == 0 ? \"selected\" : \"\" ?>>Desactivado</option>\n </select>\n </label>\n <?php\n}", "title": "" }, { "docid": "80712b872ad0e6b4217b4fdac7fabd18", "score": "0.5545807", "text": "public function getFilterList()\n\t{\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$filterList = \"\";\n\t\t$savedFilterList = \"\";\n\t\t$filterList = Concat($filterList, $this->fmea->AdvancedSearch->toJson(), \",\"); // Field fmea\n\t\t$filterList = Concat($filterList, $this->idFactory->AdvancedSearch->toJson(), \",\"); // Field idFactory\n\t\t$filterList = Concat($filterList, $this->dateFmea->AdvancedSearch->toJson(), \",\"); // Field dateFmea\n\t\t$filterList = Concat($filterList, $this->partnumbers->AdvancedSearch->toJson(), \",\"); // Field partnumbers\n\t\t$filterList = Concat($filterList, $this->description->AdvancedSearch->toJson(), \",\"); // Field description\n\t\t$filterList = Concat($filterList, $this->idEmployee->AdvancedSearch->toJson(), \",\"); // Field idEmployee\n\t\t$filterList = Concat($filterList, $this->idworkcenter->AdvancedSearch->toJson(), \",\"); // Field idworkcenter\n\t\t$filterList = Concat($filterList, $this->idProcess->AdvancedSearch->toJson(), \",\"); // Field idProcess\n\t\t$filterList = Concat($filterList, $this->step->AdvancedSearch->toJson(), \",\"); // Field step\n\t\t$filterList = Concat($filterList, $this->flowchartDesc->AdvancedSearch->toJson(), \",\"); // Field flowchartDesc\n\t\t$filterList = Concat($filterList, $this->partnumber->AdvancedSearch->toJson(), \",\"); // Field partnumber\n\t\t$filterList = Concat($filterList, $this->operation->AdvancedSearch->toJson(), \",\"); // Field operation\n\t\t$filterList = Concat($filterList, $this->derivedFromNC->AdvancedSearch->toJson(), \",\"); // Field derivedFromNC\n\t\t$filterList = Concat($filterList, $this->numberOfNC->AdvancedSearch->toJson(), \",\"); // Field numberOfNC\n\t\t$filterList = Concat($filterList, $this->flowchart->AdvancedSearch->toJson(), \",\"); // Field flowchart\n\t\t$filterList = Concat($filterList, $this->subprocess->AdvancedSearch->toJson(), \",\"); // Field subprocess\n\t\t$filterList = Concat($filterList, $this->requirement->AdvancedSearch->toJson(), \",\"); // Field requirement\n\t\t$filterList = Concat($filterList, $this->potencialFailureMode->AdvancedSearch->toJson(), \",\"); // Field potencialFailureMode\n\t\t$filterList = Concat($filterList, $this->potencialFailurEffect->AdvancedSearch->toJson(), \",\"); // Field potencialFailurEffect\n\t\t$filterList = Concat($filterList, $this->kc->AdvancedSearch->toJson(), \",\"); // Field kc\n\t\t$filterList = Concat($filterList, $this->severity->AdvancedSearch->toJson(), \",\"); // Field severity\n\t\t$filterList = Concat($filterList, $this->idCause->AdvancedSearch->toJson(), \",\"); // Field idCause\n\t\t$filterList = Concat($filterList, $this->potentialCauses->AdvancedSearch->toJson(), \",\"); // Field potentialCauses\n\t\t$filterList = Concat($filterList, $this->currentPreventiveControlMethod->AdvancedSearch->toJson(), \",\"); // Field currentPreventiveControlMethod\n\t\t$filterList = Concat($filterList, $this->occurrence->AdvancedSearch->toJson(), \",\"); // Field occurrence\n\t\t$filterList = Concat($filterList, $this->currentControlMethod->AdvancedSearch->toJson(), \",\"); // Field currentControlMethod\n\t\t$filterList = Concat($filterList, $this->detection->AdvancedSearch->toJson(), \",\"); // Field detection\n\t\t$filterList = Concat($filterList, $this->rpn->AdvancedSearch->toJson(), \",\"); // Field rpn\n\t\t$filterList = Concat($filterList, $this->recomendedAction->AdvancedSearch->toJson(), \",\"); // Field recomendedAction\n\t\t$filterList = Concat($filterList, $this->idResponsible->AdvancedSearch->toJson(), \",\"); // Field idResponsible\n\t\t$filterList = Concat($filterList, $this->targetDate->AdvancedSearch->toJson(), \",\"); // Field targetDate\n\t\t$filterList = Concat($filterList, $this->revisedKc->AdvancedSearch->toJson(), \",\"); // Field revisedKc\n\t\t$filterList = Concat($filterList, $this->expectedSeverity->AdvancedSearch->toJson(), \",\"); // Field expectedSeverity\n\t\t$filterList = Concat($filterList, $this->expectedOccurrence->AdvancedSearch->toJson(), \",\"); // Field expectedOccurrence\n\t\t$filterList = Concat($filterList, $this->expectedDetection->AdvancedSearch->toJson(), \",\"); // Field expectedDetection\n\t\t$filterList = Concat($filterList, $this->expectedRpn->AdvancedSearch->toJson(), \",\"); // Field expectedRpn\n\t\t$filterList = Concat($filterList, $this->expectedClosureDate->AdvancedSearch->toJson(), \",\"); // Field expectedClosureDate\n\t\t$filterList = Concat($filterList, $this->recomendedActiondet->AdvancedSearch->toJson(), \",\"); // Field recomendedActiondet\n\t\t$filterList = Concat($filterList, $this->idResponsibleDet->AdvancedSearch->toJson(), \",\"); // Field idResponsibleDet\n\t\t$filterList = Concat($filterList, $this->targetDatedet->AdvancedSearch->toJson(), \",\"); // Field targetDatedet\n\t\t$filterList = Concat($filterList, $this->kcdet->AdvancedSearch->toJson(), \",\"); // Field kcdet\n\t\t$filterList = Concat($filterList, $this->expectedSeveritydet->AdvancedSearch->toJson(), \",\"); // Field expectedSeveritydet\n\t\t$filterList = Concat($filterList, $this->expectedOccurrencedet->AdvancedSearch->toJson(), \",\"); // Field expectedOccurrencedet\n\t\t$filterList = Concat($filterList, $this->expectedDetectiondet->AdvancedSearch->toJson(), \",\"); // Field expectedDetectiondet\n\t\t$filterList = Concat($filterList, $this->expectedRpndet->AdvancedSearch->toJson(), \",\"); // Field expectedRpndet\n\t\t$filterList = Concat($filterList, $this->revisedClosureDatedet->AdvancedSearch->toJson(), \",\"); // Field revisedClosureDatedet\n\t\t$filterList = Concat($filterList, $this->revisedClosureDate->AdvancedSearch->toJson(), \",\"); // Field revisedClosureDate\n\t\t$filterList = Concat($filterList, $this->perfomedAction->AdvancedSearch->toJson(), \",\"); // Field perfomedAction\n\t\t$filterList = Concat($filterList, $this->revisedSeverity->AdvancedSearch->toJson(), \",\"); // Field revisedSeverity\n\t\t$filterList = Concat($filterList, $this->revisedOccurrence->AdvancedSearch->toJson(), \",\"); // Field revisedOccurrence\n\t\t$filterList = Concat($filterList, $this->revisedDetection->AdvancedSearch->toJson(), \",\"); // Field revisedDetection\n\t\t$filterList = Concat($filterList, $this->revisedRpn->AdvancedSearch->toJson(), \",\"); // Field revisedRpn\n\t\tif ($this->BasicSearch->Keyword != \"\") {\n\t\t\t$wrk = \"\\\"\" . Config(\"TABLE_BASIC_SEARCH\") . \"\\\":\\\"\" . JsEncode($this->BasicSearch->Keyword) . \"\\\",\\\"\" . Config(\"TABLE_BASIC_SEARCH_TYPE\") . \"\\\":\\\"\" . JsEncode($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$filterList = Concat($filterList, $wrk, \",\");\n\t\t}\n\n\t\t// Return filter list in JSON\n\t\tif ($filterList != \"\")\n\t\t\t$filterList = \"\\\"data\\\":{\" . $filterList . \"}\";\n\t\tif ($savedFilterList != \"\")\n\t\t\t$filterList = Concat($filterList, \"\\\"filters\\\":\" . $savedFilterList, \",\");\n\t\treturn ($filterList != \"\") ? \"{\" . $filterList . \"}\" : \"null\";\n\t}", "title": "" }, { "docid": "80f5c5ff061a1cdad0ca0ac07524ee20", "score": "0.5542654", "text": "public function processFilters()\n {\n $filterForm = $this->createForm($this->filterFormName);\n\n $filterForm->bind($this->getFilters());\n\n return $filterForm;\n }", "title": "" }, { "docid": "1988eb2cab0a8ee95694db471af432a5", "score": "0.5538101", "text": "function mwf_filter_form_html() {\n ?>\n <form action=\"<?php echo site_url() ?>/wp-admin/admin-ajax.php\" method=\"POST\" id=\"filter\">\n\t\t<?php\n $taxonomies = wc_get_attribute_taxonomy_names();\n // var_dump($taxonomies);\n foreach ($taxonomies as $prod_attr) {\n if ( $terms = get_terms(\n array (\n 'taxonomy' => $prod_attr,\n 'orderby' => 'name'\n )\n )) :\n echo '<select name=\"product_attributes['. $prod_attr .']\"><option value=\"\">' . ucfirst(str_replace('pa_', '', $prod_attr)) . '</option>';\n foreach ( $terms as $term ) :\n echo '<option value=\"' . $term->term_id . '\">' . $term->name . '</option>'; // ID of the category as the value of an option\n endforeach;\n echo '</select>';\n endif;\n }\n\t\t?>\n <!-- <button>Apply filter</button> -->\n <input type=\"hidden\" name=\"action\" value=\"myfilter\">\n </form>\n <?php\n}", "title": "" }, { "docid": "20dd834a359a518e1234ba9ab447d063", "score": "0.55294234", "text": "function _show_filter () {\n/*\n\t\tif (!module('articles')->USE_FILTER) return \"\";\n\t\t$replace = array(\n\t\t\t\"save_action\"\t=> \"./?object=\".'articles'.\"&action=save_filter\".(MAIN_TYPE_ADMIN ? _add_get() : \"\"),\n\t\t\t\"clear_url\"\t\t=> \"./?object=\".'articles'.\"&action=clear_filter\".(MAIN_TYPE_ADMIN ? _add_get() : \"\"),\n\t\t);\n\t\tforeach ((array)$this->_fields_in_filter as $name) {\n\t\t\t$replace[$name] = $_SESSION[$this->_filter_name][$name];\n\t\t}\n\t\t// Process boxes\n\t\tforeach ((array)$this->_boxes as $item_name => $v) {\n\t\t\t$replace[$item_name.\"_box\"] = $this->_box($item_name, $_SESSION[$this->_filter_name][$item_name]);\n\t\t}\n\t\treturn tpl()->parse('articles'.\"/search_filter\", $replace);\n*/\n\t}", "title": "" }, { "docid": "2dccc5ea82a8d0c342abe39e3236e744", "score": "0.55281526", "text": "function print_search_simple($data, $title = '', $button = 'search')\n{\n // Form header\n $string = PHP_EOL . '<!-- START search form -->' . PHP_EOL;\n $string .= '<form method=\"POST\" action=\"\" class=\"form form-inline\">' . PHP_EOL;\n $string .= '<div class=\"navbar\">' . PHP_EOL;\n $string .= '<div class=\"navbar-inner\">';\n $string .= '<div class=\"container\">';\n if ($title) { $string .= ' <a class=\"brand\">' . $title . '</a>' . PHP_EOL; }\n\n $string .= '<div class=\"nav\" style=\"margin: 5px 0 5px 0;\">';\n\n // Main\n foreach ($data as $item)\n {\n if (!isset($item['value'])) { $item['value'] = ''; }\n switch($item['type'])\n {\n case 'text':\n case 'input':\n $string .= ' <div class=\"input-prepend\">' . PHP_EOL;\n if (!$item['name']) { $item['name'] = '<i class=\"icon-list\"></i>'; }\n $string .= ' <span class=\"add-on\">'.$item['name'].'</span>' . PHP_EOL;\n $string .= ' <input type=\"'.$item['type'].'\" ';\n $string .= (isset($item['width'])) ? 'style=\"width:'.$item['width'].'\" ' : '';\n $string .= 'name=\"'.$item['id'].'\" id=\"'.$item['id'].'\" class=\"input\" value=\"'.$item['value'].'\"/>' . PHP_EOL;\n $string .= ' </div>' . PHP_EOL;\n // End 'text' & 'input'\n break;\n case 'newline':\n $string .= '<div class=\"clearfix\" id=\"'.$item['id'].'\"><hr /></div>' . PHP_EOL;\n // End 'newline'\n break;\n case 'datetime':\n $id_from = $item['id'].'_from';\n $id_to = $item['id'].'_to';\n // Presets\n if ($item['presets'])\n {\n $presets = array('sixhours' => 'Last 6 hours',\n 'today' => 'Today',\n 'yesterday' => 'Yesterday',\n 'tweek' => 'This week',\n 'lweek' => 'Last week',\n 'tmonth' => 'This month',\n 'lmonth' => 'Last month',\n 'tyear' => 'This year',\n 'lyear' => 'Last year');\n $string .= ' <select id=\"'.$item['id'].'\" class=\"selectpicker show-tick\" data-size=\"false\" data-width=\"auto\">' . PHP_EOL . ' ';\n $string .= '<option value=\"\" selected>Date/Time presets</option>';\n foreach ($presets as $k => $v)\n {\n $string .= '<option value=\"'.$k.'\">'.$v.'</option> ';\n }\n $string .= PHP_EOL . ' </select>' . PHP_EOL;\n }\n // Date/Time input fields\n $string .= ' <div class=\"input-prepend\" id=\"'.$id_from.'\">' . PHP_EOL;\n $string .= ' <span class=\"add-on btn\"><i data-time-icon=\"icon-time\" data-date-icon=\"icon-calendar\"></i> From</span>' . PHP_EOL;\n $string .= ' <input type=\"text\" class=\"input-medium\" data-format=\"yyyy-MM-dd hh:mm:ss\" ';\n $string .= 'name=\"'.$id_from.'\" id=\"'.$id_from.'\" value=\"'.$item['from'].'\"/>' . PHP_EOL;\n $string .= ' </div>' . PHP_EOL;\n $string .= ' <div class=\"input-prepend\" id=\"'.$id_to.'\">' . PHP_EOL;\n $string .= ' <span class=\"add-on btn\"><i data-time-icon=\"icon-time\" data-date-icon=\"icon-calendar\"></i> To</span>' . PHP_EOL;\n $string .= ' <input type=\"text\" class=\"input-medium\" data-format=\"yyyy-MM-dd hh:mm:ss\" ';\n $string .= 'name=\"'.$id_to.'\" id=\"'.$id_to.'\" value=\"'.$item['to'].'\"/>' . PHP_EOL;\n $string .= ' </div>' . PHP_EOL;\n // JS\n $min = '-Infinity';\n $max = 'Infinity';\n $pattern = '/^(\\d{4})-(\\d{2})-(\\d{2}) ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/';\n if (!empty($item['min']))\n {\n if (preg_match($pattern, $item['min'], $matches))\n {\n $matches[2] = $matches[2] - 1;\n array_shift($matches);\n $min = 'new Date(' . implode(',', $matches) . ')';\n }\n } \n if (!empty($item['max']))\n {\n if (preg_match($pattern, $item['max'], $matches))\n {\n $matches[2] = $matches[2] - 1;\n array_shift($matches);\n $max = 'new Date(' . implode(',', $matches) . ')';\n }\n } \n $string .= '\n <script type=\"text/javascript\">\n var startDate = '.$min.';\n var endDate = '.$max.';\n $(document).ready(function() {\n\t$(\\'#'.$id_from.'\\').datetimepicker({\n //pickSeconds: false,\n weekStart: 1,\n startDate: startDate,\n endDate: endDate\n });\n\t$(\\'#'.$id_to.'\\').datetimepicker({\n //pickSeconds: false,\n weekStart: 1,\n startDate: startDate,\n endDate: endDate\n });\n });' . PHP_EOL;\n if ($item['presets'])\n {\n $string .= '\n $(\\'select#'.$item['id'].'\\').change(function() {\n var input_from = $(\\'input#'.$id_from.'\\');\n var input_to = $(\\'input#'.$id_to.'\\');\n switch ($(this).val()) {' . PHP_EOL;\n foreach ($presets as $k => $v)\n {\n $preset = datetime_preset($k);\n $string .= \" case '$k':\\n\";\n $string .= \" input_from.val('\".$preset['from'].\"');\\n\";\n $string .= \" input_to.val('\".$preset['to'].\"');\\n\";\n $string .= \" break;\\n\";\n }\n $string .= '\n default:\n input_from.val(\"\");\n input_to.val(\"\");\n break;\n }\n });' . PHP_EOL;\n }\n $string .= '</script>' . PHP_EOL;\n // End 'datetime'\n break;\n case 'select':\n case 'multiselect':\n if ($item['type'] == 'multiselect')\n {\n $title = (isset($item['name'])) ? 'title=\"'.$item['name'].'\" ' : '';\n $string .= ' <select multiple name=\"'.$item['id'].'[]\" ' . $title;\n } else {\n $string .= ' <select name=\"'.$item['id'].'\" ';\n if ($item['name'] && !isset($item['values']['']))\n {\n $item['values'] = array('' => $item['name']) + $item['values'];\n }\n }\n $string .= 'id=\"'.$item['id'].'\" ';\n $data_width = ($item['width']) ? ' data-width=\"'.$item['width'].'\"' : ' data-width=\"auto\"';\n $data_size = (is_numeric($item['size'])) ? ' data-size=\"'.$item['size'].'\"' : ' data-size=\"15\"';\n $string .= 'class=\"selectpicker show-tick\" data-selected-text-format=\"count>1\"';\n $string .= $data_width . $data_size . '>' . PHP_EOL . ' ';\n if (!is_array($item['value'])) { $item['value'] = array($item['value']); }\n foreach ($item['values'] as $k => $v)\n {\n $k = (string)$k;\n $data_subtext = ($item['subtext']) ? ' data-subtext=\"('.$k.')\"' : '';\n $string .= '<option value=\"'.$k.'\"' . $data_subtext;\n $string .= (in_array($k, $item['value'])) ? ' selected>' : '>';\n $string .= $v.'</option> ';\n }\n $string .= PHP_EOL . ' </select>' . PHP_EOL;\n // End 'select' & 'multiselect'\n break;\n }\n }\n\n $string .= '</div>';\n\n // Form footer\n $string .= ' <ul class=\"nav pull-right\"><li>' . PHP_EOL;\n $string .= ' <input type=\"hidden\" name=\"pageno\" value=\"1\">' . PHP_EOL;\n switch($button)\n {\n case 'update':\n $string .= ' <button type=\"submit\" class=\"btn\"><i class=\"icon-refresh\"></i> Update</button>' . PHP_EOL;\n break;\n default:\n $string .= ' <button type=\"submit\" class=\"btn\"><i class=\"icon-search\"></i> Search</button>' . PHP_EOL;\n }\n $string .= ' </li></ul>' . PHP_EOL;\n $string .= '</div></div></div></form>' . PHP_EOL;\n $string .= '<!-- END search form -->' . PHP_EOL . PHP_EOL;\n\n // Print search form\n echo($string);\n}", "title": "" }, { "docid": "5c553d65ed40b0ba53bd29cc35c5e459", "score": "0.5523822", "text": "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new PaypalAccountFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('MGDBasicBundle:PaypalAccount')->createQueryBuilder('e');\n\n // Reset filter\n if ($request->getMethod() == 'POST' && $request->get('filter_action') == 'reset') {\n $session->remove('PaypalAccountControllerFilter');\n }\n\n // Filter action\n if ($request->getMethod() == 'POST' && $request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('PaypalAccountControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('PaypalAccountControllerFilter')) {\n $filterData = $session->get('PaypalAccountControllerFilter');\n $filterForm = $this->createForm(new PaypalAccountFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "title": "" }, { "docid": "452b97156e79ee6a164c69a35d71b82e", "score": "0.55154306", "text": "function widget_pzdc_search_form_options_form() {\n global $PraizedCommunity;\n $PraizedCommunity->widget_search_form_options_form();\n }", "title": "" }, { "docid": "0cbdc99b5bf72ceb41f3569dc2deab53", "score": "0.5511402", "text": "function BuildExportSelectedFilter() {\n\t\tglobal $Language, $fees_invoice;\n\t\t$nKeySelected = 0;\n\t\t$sWrkFilter = \"\";\n\t\tif ($fees_invoice->Export <> \"\") {\n\t\t\tif (ew_IsHttpPost()) {\n\t\t\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t\t\t$this->nKeySelected = count($_POST[\"key_m\"]);\n\t\t\t\t\t$this->arKeys = ew_StripSlashes($_POST[\"key_m\"]);\n\t\t\t\t}\n\t\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t\t$this->nKeySelected = count($_GET[\"key_m\"]);\n\t\t\t\t$this->arKeys = ew_StripSlashes($_GET[\"key_m\"]);\n\t\t\t}\n\t\t\tforeach ($this->arKeys as $sKey) {\n\t\t\t\t$sKeyFld = $sKey;\n\t\t\t\tif (!is_numeric($sKeyFld))\n\t\t\t\t \treturn \"\";\n\t\t\t\t$fees_invoice->invoiceID->CurrentValue = $sKeyFld;\n\t\t\t\t$sWrkFilter .= $fees_invoice->KeyFilter() . \" OR \";\n\t\t\t}\n\t\t\tif ($sWrkFilter <> \"\")\n\t\t\t\t$sWrkFilter = \"(\" . substr($sWrkFilter, 0, strlen($sWrkFilter)-4) . \")\";\n\t\t}\n\t\treturn $sWrkFilter;\n\t}", "title": "" }, { "docid": "338f69a6174a30f087782de58cfe775f", "score": "0.54963344", "text": "public function admin_filter() {\r\n\t\t$model = $this->modelClass;\r\n\t\t$filters = Set::filter($this->request->data);\t\t// set::filter gets rid of empty array elements\r\n\t\t// debug($filters);\r\n\t\t\n\t\t// Save pagination limit to session\n\t\tif (@$filters['AdminListLimit'])\r\n\t\t\t$this->Session->write(\"AdminList.limit\", @$filters['AdminListLimit']);\r\n\t\t$this->Session->write(\"AdminList.$model.filters\", @$filters['filters']);\r\n\t\t$this->Session->write(\"AdminList.$model.sort\", @$filters['sort']);\r\n\t\t\n\t\t// Send user back to index, which will pass these filters to the find() function\n\t\t$this->redirect(array('action' => 'index'));\r\n\t}", "title": "" }, { "docid": "f53b66098b07f6b347b105e0d213a275", "score": "0.5479389", "text": "function drealty_agent_filters() {\n // Regular filters\n $filters['status'] = array(\n 'title' => t('Office'),\n 'options' => array(\n '[any]' => t('any'),\n 'myoffice' => t('Belonging to my Office'),\n ),\n );\n return $filters;\n}", "title": "" }, { "docid": "eb401bc394f8f97a6dddb39e4f50cd1a", "score": "0.5474214", "text": "protected function _getListOptionsForElem() {\n\t\t$cachePath = 'DefaultOptions_Filter_' . $this->_currUIlang;\n\t\t$cached = Cache::read($cachePath, CAKE_THEME_CACHE_KEY_HELPERS);\n\t\tif (!empty($cached)) {\n\t\t\treturn $cached;\n\t\t}\n\n\t\t$inputSize = '';\n\t\t$btnSize = '';\n\t\t$formInputSize = $this->_getFormInputSize();\n\t\tif (!empty($formInputSize)) {\n\t\t\t$inputSize = ' input-' . $formInputSize;\n\t\t\t$btnSize = ' btn-' . $formInputSize;\n\t\t}\n\t\t$emptyText = $this->ViewExtension->showEmpty('');\n\n\t\t$result = [];\n\t\t$result['openFilterForm'] = [\n\t\t\t'role' => 'form',\n\t\t\t'class' => 'filter-form clone-wrapper',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'data-max-clone' => CAKE_THEME_FILTER_ROW_LIMIT\n\t\t];\n\t\t$result['paginTableRowHeaderActTitle'] = __d('view_extension', 'Actions');\n\t\t$result['createFilterTableRow'] = [\n\t\t\t'commonOptions' => [\n\t\t\t\t'label' => false,\n\t\t\t\t'required' => false,\n\t\t\t\t'secure' => false,\n\t\t\t\t'class' => 'form-control' . $inputSize\n\t\t\t],\n\t\t\t'filterText' => __d(\n\t\t\t\t'view_extension',\n\t\t\t\t'Data filter for the table: %s',\n\t\t\t\t$this->Html->tag(\n\t\t\t\t\t'code',\n\t\t\t\t\t$emptyText,\n\t\t\t\t\t[\n\t\t\t\t\t\t'data-toggle' => 'filter-conditions',\n\t\t\t\t\t\t'data-empty-text' => $emptyText\n\t\t\t\t\t]\n\t\t\t\t)\n\t\t\t),\n\t\t\t'showFilterBtn' => $this->ViewExtension->button(\n\t\t\t\t'far fa-caret-square-down',\n\t\t\t\t'btn-default',\n\t\t\t\t['class' => 'show-filter-btn',\n\t\t\t\t\t'title' => __d('view_extension', 'Show or hide filter'),\n\t\t\t\t\t'data-toggle' => 'collapse', 'data-target' => '.filter-collapse',\n\t\t\t\t\t'aria-expanded' => 'false',\n\t\t\t\t\t'data-toggle-icons' => 'fa-caret-square-down,fa-caret-square-up'\n\t\t\t\t]\n\t\t\t),\n\t\t\t'applyFilterBtn' => $this->ViewExtension->button(\n\t\t\t\t'fas fa-filter',\n\t\t\t\t'btn-info',\n\t\t\t\t[\n\t\t\t\t\t'type' => 'submit',\n\t\t\t\t\t'class' => 'exclude-clone filter-apply',\n\t\t\t\t\t'title' => __d('view_extension', 'Apply filter'),\n\t\t\t\t\t'data-toggle' => 'tooltip',\n\t\t\t\t\t'value' => 'filter-apply',\n\t\t\t\t\t'name' => 'data[FilterAction]'\n\t\t\t\t]\n\t\t\t),\n\t\t\t'clearFilterBtn' => $this->ViewExtension->button(\n\t\t\t\t'fas fa-eraser',\n\t\t\t\t'btn-warning',\n\t\t\t\t[\n\t\t\t\t\t'type' => 'reset',\n\t\t\t\t\t'class' => 'exclude-clone filter-clear',\n\t\t\t\t\t'title' => __d(\n\t\t\t\t\t\t'view_extension',\n\t\t\t\t\t\t'Clear filter'\n\t\t\t\t\t),\n\t\t\t\t\t'data-toggle' => 'tooltip'\n\t\t\t\t]\n\t\t\t),\n\t\t\t'addRowBtn' => $this->ViewExtension->button(\n\t\t\t\t'fas fa-plus',\n\t\t\t\t'btn-success',\n\t\t\t\t[\n\t\t\t\t\t'title' => __d('view_extension', 'Add row of filter'),\n\t\t\t\t\t'data-toggle' => 'btn-action-clone'\n\t\t\t\t]\n\t\t\t),\n\t\t\t'deleteRowBtn' => $this->ViewExtension->button(\n\t\t\t\t'fas fa-trash-alt',\n\t\t\t\t'btn-danger',\n\t\t\t\t[\n\t\t\t\t\t'title' => __d('view_extension', 'Delete row of filter'),\n\t\t\t\t\t'data-toggle' => 'btn-action-delete'\n\t\t\t\t]\n\t\t\t),\n\t\t\t'printBtnOptions' => [\n\t\t\t\t'title' => __d('view_extension', 'Print informations'),\n\t\t\t\t'data-toggle' => 'tooltip',\n\t\t\t\t'target' => '_blank'\n\t\t\t],\n\t\t\t'exportBtnOptions' => [\n\t\t\t\t'title' => __d('view_extension', 'Export informations'),\n\t\t\t\t'data-toggle' => 'tooltip'\n\t\t\t],\n\t\t\t'tableHeaderOptions' => [\n\t\t\t\t'data-toggle' => 'clone-source',\n\t\t\t\t'class' => 'filter-collapse collapse filter-controls-row'\n\t\t\t]\n\t\t];\n\t\t$result['createGroupActionControls'] = [\n\t\t\t'selectAllBtn' => $this->ViewExtension->button(\n\t\t\t\t'far fa-check-square',\n\t\t\t\t'btn-info',\n\t\t\t\t['escape' => false, 'class' => 'hidden-print',\n\t\t\t\t\t'title' => __d('view_extension', 'Select / deselect all'),\n\t\t\t\t\t'data-toggle' => 'btn-action-select-all',\n\t\t\t\t\t'data-toggle-icons' => 'fa-check-square,fa-square']\n\t\t\t),\n\t\t\t'groupDataProcTitle' => $this->Html->tag('strong', __d('view_extension', 'Group data processing')),\n\t\t\t'performActionBtn' => [\n\t\t\t\t'type' => 'submit',\n\t\t\t\t'escape' => false,\n\t\t\t\t'title' => __d('view_extension', 'Perform action'),\n\t\t\t\t'data-toggle' => 'tooltip', 'value' => 'group-action',\n\t\t\t\t'name' => 'data[FilterAction]', 'data-dialog-title' => __d('view_extension', 'Action to perform'),\n\t\t\t\t'data-dialog-sel-placeholder' => __d('view_extension', 'Select a action'),\n\t\t\t\t'data-dialog-btn-ok' => __d('view_extension', 'Perform'),\n\t\t\t\t'data-dialog-btn-cancel' => __d('view_extension', 'Cancel')\n\t\t\t],\n\t\t];\n\t\t$result['getBtnConditionField'] = [\n\t\t\t'options' => [\n\t\t\t\t'' => ['name' => '=', 'title' => '=',\n\t\t\t\t\t'data-subtext' => __d('view_extension', 'Equal'), 'value' => ''],\n\t\t\t\t'gt' => ['name' => '&gt;', 'title' => '&gt;',\n\t\t\t\t\t'data-subtext' => __d('view_extension', 'Greater than'), 'value' => 'gt'],\n\t\t\t\t'ge' => ['name' => '&ge;', 'title' => '&ge;',\n\t\t\t\t\t'data-subtext' => __d('view_extension', 'Greater than or equal to'), 'value' => 'ge'],\n\t\t\t\t'lt' => ['name' => '&lt;', 'title' => '&lt;',\n\t\t\t\t\t'data-subtext' => __d('view_extension', 'Less than'), 'value' => 'lt'],\n\t\t\t\t'le' => ['name' => '&le;', 'title' => '&le;',\n\t\t\t\t\t'data-subtext' => __d('view_extension', 'Less than or equal to'), 'value' => 'le'],\n\t\t\t\t'ne' => ['name' => '&ne;', 'title' => '&ne;',\n\t\t\t\t\t'data-subtext' => __d('view_extension', 'Not equal'), 'value' => 'ne'],\n\t\t\t],\n\t\t\t'title' => __d('view_extension', 'Change the logical condition of the field')\n\t\t];\n\t\t$result['getBtnConditionGroup'] = [\n\t\t\t'options' => [\n\t\t\t\t'' => ['name' => '&nbsp;&&', 'title' => '&nbsp;&&', 'data-subtext' => __d('view_extension', 'And'), 'value' => ''],\n\t\t\t\t'or' => ['name' => '&nbsp;||', 'title' => '&nbsp;||', 'data-subtext' => __d('view_extension', 'Or'), 'value' => 'or'],\n\t\t\t\t'not' => ['name' => '&nbsp;!', 'title' => '&nbsp;!', 'data-subtext' => __d('view_extension', 'Not'), 'value' => 'not'],\n\t\t\t],\n\t\t\t'title' => __d('view_extension', 'Change the logical condition of the group')\n\t\t];\n\t\t$result['getBtnCondition'] = [\n\t\t\t'type' => 'select',\n\t\t\t'title' => __d('view_extension', 'Changing the filter condition'),\n\t\t\t'style' => 'btn-default btn-filter-condition' . $btnSize,\n\t\t\t'width' => 'fit',\n\t\t\t'live-search' => false,\n\t\t\t'class' => 'form-control show-tick filter-condition' . $inputSize,\n\t\t\t'autocomplete' => 'off',\n\t\t\t'div' => false,\n\t\t\t'label' => false,\n\t\t\t'escape' => false,\n\t\t\t'required' => false,\n\t\t\t'secure' => false,\n\t\t];\n\t\t$result['prepareOptions'] = [\n\t\t\t'select' => [\n\t\t\t\t'empty' => '--' . __d('view_extension', 'Sel.') . '--',\n\t\t\t\t'style' => 'btn-default' . $btnSize\n\t\t\t],\n\t\t\t'string' => [\n\t\t\t\t'div' => false,\n\t\t\t\t'type' => 'autocomplete',\n\t\t\t\t'url' => $this->url(\n\t\t\t\t\t$this->ViewExtension->addUserPrefixUrl([\n\t\t\t\t\t\t'controller' => 'filter',\n\t\t\t\t\t\t'action' => 'autocomplete',\n\t\t\t\t\t\t'plugin' => 'cake_theme',\n\t\t\t\t\t\t'ext' => 'json',\n\t\t\t\t\t\t'prefix' => false\n\t\t\t\t\t])\n\t\t\t\t)\n\t\t\t],\n\t\t\t'integer' => [\n\t\t\t\t'div' => 'input-group'\n\t\t\t],\n\t\t\t'boolean' => [\n\t\t\t\t'options' => $this->ViewExtension->yesNoList(),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'style' => 'btn-default' . $btnSize,\n\t\t\t\t'empty' => '--' . __d('view_extension', 'Sel.') . '--'\n\t\t\t],\n\t\t\t'date' => [\n\t\t\t\t'div' => 'input-group',\n\t\t\t\t'widget-position-vertical' => 'bottom',\n\t\t\t\t'icon-type' => 'false',\n\t\t\t],\n\t\t\t'binary' => [\n\t\t\t\t'disabled' => true\n\t\t\t]\n\t\t];\n\t\tCache::write($cachePath, $result, CAKE_THEME_CACHE_KEY_HELPERS);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "bdc3725610ca2366bf99a6c050cda9e1", "score": "0.5470633", "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": "da925378b9d517f08a4c130d9fa56aa8", "score": "0.54687804", "text": "function print_filter_hide_status() {\n\tglobal $t_select_modifier, $t_filter;\n\t?><!-- Hide Status -->\n\t\t\t<select <?php echo $t_select_modifier;?> name=\"<?php echo FILTER_PROPERTY_HIDE_STATUS_ID;?>[]\">\n\t\t\t\t<option value=\"<?php echo META_FILTER_NONE?>\">[<?php echo lang_get( 'none' )?>]</option>\n\t\t\t\t<?php print_enum_string_option_list( 'status', $t_filter[FILTER_PROPERTY_HIDE_STATUS_ID] )?>\n\t\t\t</select>\n\t\t<?php\n}", "title": "" }, { "docid": "81d34ac956ebeb687b445662092a37e9", "score": "0.5467428", "text": "function ShowBrandFilter(){\n $str = '';\n// var_dump($this->arr_brand_in_this_cat);\n// var_dump($this->row_sel_brand);\n if (is_array($this->arr_brand_in_this_cat)) {\n $keys = array_keys($this->arr_brand_in_this_cat);\n $rows = count($keys);\n for($i=0;$i<$rows;$i++){\n $cod_brand = $keys[$i];\n $row = $this->arr_brand_in_this_cat[$cod_brand];\n $name = stripcslashes($row['name']);\n // Форматированный вывод текста либо ссылки параметра\n $checked = false;\n if (isset($this->row_sel_brand) && !empty($this->row_sel_brand)) {\n if(in_array($cod_brand,$this->row_sel_brand)){\n $checked = true;\n }\n }\n\n $paramLink = $this->makeParamLink('brand', -1,$cod_brand);\n\n $checkedClass = '';\n $checkedInput = '';\n $disabled = '';\n $showA = true;\n $onclick = \" onclick=\\\"return gelPropConetnt('\".$this->catLink.\"','\".$paramLink.\"');\\\"\";\n if (!isset($row['countOfProp']) || $row['countOfProp']==0) {\n $checkedClass .= ' param-no-selected';\n $showA = false;\n $disabled = ' disabled';\n }\n\n if ($checked == true) {\n $checkedClass = ' param-selected';\n $showA = true;\n $checkedInput = ' checked';\n }\n\n if(!$showA){\n $onclick = '';\n }\n ob_start();\n ?><div class=\"param-key-one-item<?=$checkedClass?>\">\n <div class=\"param-key-checkbox\">\n <div class=\"filter-checkbox\"<?=$onclick?>\n id=\"checBox_id_manufac<?=$cod_brand?>_block\"></div>\n <input type=\"checkbox\" name=\"id_manufac\" value=\"<?=$cod_brand?>\"\n <?=$checkedInput?> <?=$disabled?>\n id=\"checBox_id_manufac<?=$cod_brand?>_Input\"/>\n <script type=\"text/javascript\">\n $('#checBox_id_manufac<?=$cod_brand?>_Input').hide();\n $('#checBox_id_manufac<?=$cod_brand?>_block').show();\n </script>\n </div>\n <div class=\"param-key-label\">\n <?if($showA){\n ?><a href=\"<?=$this->catLink . $paramLink?>\"<?=$onclick?>><?\n }\n ?><label><?=$name?></label><?\n if($showA){\n ?></a><?\n }?>\n </div>\n </div><?\n $str .= ob_get_clean();\n\n }\n }\n if(!empty($str)){\n $str = '<div class=\"paramBlock\"><div class=\"paramName\">'.$this->multi['TXT_BREND'].':</div>'.$str.'</div>';\n }\n return $str;\n }", "title": "" }, { "docid": "7649282ca39b8c34281fe2bf32f1919e", "score": "0.54655516", "text": "function template_preprocess_cnapi_browse_filter_option(&$variables) {\n // id\n $variables['id'] = $variables['option']['id'];\n\n // name\n $variables['name'] = $variables['option']['name'];\n \n // active\n $variables['active'] = $variables['option']['active'];\n \n // total\n if (isset($variables['option']['total']) && !in_array($variables['option']['id'], array(64, 98))) {\n $variables['total'] = $variables['option']['total'];\n }\n \n // link\n $variables['link'] = cnapi_url_dp2dul($variables['name'], $variables['option']['url']);\n \n // link_remove\n if (isset($variables['option']['url_remove'])) {\n $url = cnapi_url_dp2dua($variables['option']['url_remove']);\n $url['options']['attributes']['class'] = array('remove');\n $variables['link_remove'] = l('×', $url['path'], $url['options']);\n }\n}", "title": "" }, { "docid": "ea2ae9c0c6abb07315a13d9b2bbbdc3e", "score": "0.54640245", "text": "function path_admin_filter_form($form, &$form_state, $keys = '') {\n $form['#attributes'] = array('class' => array('search-form'));\n $form['basic'] = array('#type' => 'fieldset',\n '#title' => t('Filter aliases'),\n '#attributes' => array('class' => array('container-inline')),\n );\n $form['basic']['filter'] = array(\n '#type' => 'textfield',\n '#title' => 'Path alias',\n '#title_display' => 'invisible',\n '#default_value' => $keys,\n '#maxlength' => 128,\n '#size' => 25,\n );\n $form['basic']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n '#submit' => array('path_admin_filter_form_submit_filter'),\n );\n if ($keys) {\n $form['basic']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset'),\n '#submit' => array('path_admin_filter_form_submit_reset'),\n );\n }\n return $form;\n}", "title": "" }, { "docid": "aef4af192aabed3ffc22f7868996d8d6", "score": "0.5463826", "text": "protected function _prepareFilterButtons()\n {\n $this->addChild(\n 'refresh_button',\n \\Magento\\Backend\\Block\\Widget\\Button::class,\n ['label' => __('Refresh'), 'onclick' => \"{$this->getJsObjectName()}.doFilter();\", 'class' => 'task']\n );\n }", "title": "" }, { "docid": "e858e6735de23395b6769f9610b77d99", "score": "0.5462544", "text": "function _show_filter () {\n// TODO\n\t}", "title": "" }, { "docid": "f01a8d8b32ed5c08d177d562f6b3a54a", "score": "0.5439483", "text": "function bulk_action($Actions) { ?>\n\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"\">\n\t\t<tr><td height=\"10\"></td></tr>\n\t\t<tr align=\"\">\n\t\t\t<td align=\"left\" style=\"padding-top: 7px;\">\n\t\t\t\t\t<select name=\"bulk_action\" id=\"bulk_action\" title=\"Select Action\" >\n\t\t\t\t\t\t<option value=\"\">Bulk Actions</option>\n\t\t\t\t\t\t<?php foreach($Actions as $key => $action) { ?>\n\t\t\t\t\t\t<option value=\"<?php echo $key; ?>\"><?php echo $action; ?></option>\n\t\t\t\t\t\t\t\t<?php }?>\n\t\t\t\t\t</select>\n\t\t\t</td>\n\t\t\t<td align=\"left\" style=\"padding-left:20px;\">\n\t\t\t\t<input type=\"submit\" onclick=\"return isActionSelected();\" class=\"submit_button\" name=\"do_action\" id=\"Apply\" value=\"Apply\" title=\"Apply\" alt=\"Apply\">&nbsp;&nbsp;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr><td height=\"10\"></td></tr>\n\t</table>\n<?php }", "title": "" }, { "docid": "172bab7af2aba27e46d173bfd2ab62d0", "score": "0.54304457", "text": "public function searchForm($list)\n {\n\n }", "title": "" }, { "docid": "488c9def27b24417ebbf920714430487", "score": "0.5429921", "text": "public function get_html_search_form() {\n $html = '';\n\n $template_form = '<form role=\"search\" method=\"get\" class=\"search-form\" action=\"\">\n <input type=\"hidden\" name=\"' . $this->query_key . '\" value=\"' . esc_attr(json_encode($this->get_active_filters())) . '\" />\n <label>\n <span class=\"screen-reader-text\">' . _x('Search for:', 'label') . '</span>\n <input type=\"search\" class=\"search-field\" placeholder=\"' . esc_attr_x('Search &hellip;', 'placeholder') . '\" value=\"' . get_search_query() . '\" name=\"%s\" />\n </label>\n <input type=\"submit\" class=\"search-submit\" value=\"' . esc_attr_x('Search', 'submit button') . '\" />\n </form>';\n\n $html = apply_filters('wpufilters_tpl_search_form', $template_form);\n $html = sprintf($html, $this->search_parameter);\n return $html;\n }", "title": "" }, { "docid": "6a6d0f649abfc59e00ccfa8acb36d475", "score": "0.54225963", "text": "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new PreobjectFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('KdigArchaeologicalBundle:Preobject')->createQueryBuilder('e');\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('PreobjectControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('PreobjectControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('PreobjectControllerFilter')) {\n $filterData = $session->get('PreobjectControllerFilter');\n $filterForm = $this->createForm(new PreobjectFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "title": "" }, { "docid": "ba064dafa0ce118de8850ebc95c5eda3", "score": "0.54086524", "text": "function bibdk_custom_search_values_admin() {\n\n $query = db_select('bibdk_custom_search_values', 'v');\n $query\n ->fields('v', array('v_uuid', 'value_title', 'sort', 'is_disabled'))\n ->orderBy('value_title', 'DESC')\n ->orderBy('sort', 'DESC');\n $result = $query->execute();\n\n $values = array();\n\n foreach ($result as $record) {\n $row = array(\n 'v_uuid' => check_plain($record->v_uuid),\n 'value_title' => check_plain($record->value_title),\n 'sort' => check_plain($record->sort),\n 'is_disabled' => check_plain($record->is_disabled),\n );\n $values[] = $row;\n }\n\n $form = _bibdk_custom_search_values_admin_form($values);\n $form['#submit'][] = '_bibdk_custom_search_values_admin_submit';\n return $form;\n}", "title": "" }, { "docid": "12224709c660e4014ffd13d09e372241", "score": "0.54081595", "text": "function rs_page_form_filter( $atts ) {\n\t//print_r($terms);\n\n\t\n$terms = get_terms( array(\n\t\t'taxonomy' => 'category',\n\t\t'hide_empty' => false,\n\t) );\n\t$rs_select_data='';\n\t$rs_select_data.='<div class=\"rs-select-wrapper\"><select class=\"js-multiple-category\" multiple=\"multiple\">';\n\n\tforeach($terms as $term){\n\n\t\t$rs_select_data.='<option data-color=\"'.get_term_meta($term->term_id, 'color', true).'\" data-page-id=\"'.get_the_ID().'\" value=\"'.$term->term_id.'\">'.$term->name.'</option>';\n\t\t//print(get_term_meta($term->term_id, 'color', true));\n\t}\n\n\t$rs_select_data.='</select></div>';\n\t$rs_select_data.='<div class=\"date_control_wrapper\">';\n\t$time = strtotime(\"-2 year\", time());\n $dateyearsago = date(\"Y-m-d\", $time);\n\t$rs_select_data.='<div class=\"start_date_wrapper\">Start Date:<br /> <input type=\"date\" name=\"start_date\" id=\"start_date\" value=\"'.$dateyearsago.'\" /></div>';\n\t$rs_select_data.='<div class=\"end_date_wrapper\">End Date:<br /> <input type=\"date\" name=\"end_date\" id=\"end_date\" value=\"'.date('Y-m-d').'\" /></div>';\n\t$rs_select_data.='</div>';\n\t//$rs_select_data.='<div class=\"view_tickbox_wrapper\"><input type=\"checkbox\" name=\"unviewed\" id=\"unviewed\" value=\"unviewed\"><label for=\"unviewed\">Unviewed only</label></div>';\n\t$rs_select_data.='<div class=\"page-viewed-tick wct-tickbox wct-tickbox-unticked\">\n\t\t\t\t\t<span class=\"wct-tick-icon\"></span>\n\t\t\t\t\t<span class=\"wct-tick-text wct-tick-text-unticked\">Unviewed Only</span>\n\t\t\t\t\t<span class=\"wct-tick-text wct-tick-text-ticked\">Unviewed pages only.</span>\n\t\t\t\t</div>';\n\t$rs_select_data.='<div class=\"navigation-sidebar navigation-sidebar-2\"><ul id=\"rs-data-list\">';\n\n\t/*\n\t $page_parent=wp_get_post_parent_id($post->ID);\n\t $rs_select_data.= wp_list_pages( array(\n\t\t\t'child_of' => $page_parent, // Only pages that are children of the current page\n\t\t\t'depth' => 1 , // Only show one level of hierarchy\n\t\t\t'sort_order' => 'asc',\n\t\t\t'title_li' => NULL,\n\t\t\t'echo' => 0\n\t ));\n\n\t */ \n\n\n\t$page_parent=wp_get_post_parent_id($post->ID);\n\t\n\t$args = array(\n\t\t'post_type' => 'page',\n\t\t'posts_per_page' => -1,\n\t\t'post_parent' => $page_parent,\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order'\n\t );\n\t \n\t$parent = new WP_Query( $args );\n\t\n\tif ( $parent->have_posts() ) : ?>\n\t\n\t\t<?php while ( $parent->have_posts() ) : $parent->the_post(); ?>\n\t\t <?php \n\t\t $page_title = get_the_title( $post->id );\n\t\t $page_permalink = get_the_permalink( $post->id );\n\t\t $page_categories = get_the_category($post->id);\t \n\t\t if(count($page_categories) != 0){\n\t\t\t $page_cirle_dot = '';\n\t\t\t foreach($page_categories as $page_category){\t\t \t\t\t \n\t\t\t\t $category_color = get_term_meta($page_category->term_id,'color',true);\n\t\t\t\t $page_cirle_dot.='<div class=\"circle\" style=\"background:#'.$category_color.'\">&nbsp;</div>';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t }\n\t\t\t $rs_select_data.=\"<li><div class='rs-category-link'><a href='\".$page_permalink.\"'>\".$page_title.\"</a></div><div class='rs-category-color'>\".$page_cirle_dot.\"</div></li>\";\n\t\t }else{\n\t\t\t $rs_select_data.=\"<li><a href='\".$page_permalink.\"'>\".$page_title.\"</a></li>\"; \n\t\t }\n\t\t \n\t\t\t?>\n\t\t<?php endwhile; ?>\n\t\n\t<?php endif; wp_reset_query(); \n\n\n\n\t$rs_select_data.='</ul></div>';\n\t\n\n\n\treturn $rs_select_data;\n\n\n}", "title": "" }, { "docid": "9b9142835b844d5e9ad086ffd44a96ef", "score": "0.54017615", "text": "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->parameters([\n// 'responsive' => 'true',\n 'initComplete' => 'function () {\n max = this.api().columns().count();\n this.api().columns().every(function (col) {\n if(col==0){\n var column = this;\n var input = document.createElement(\"input\");\n $(input).attr(\\'title\\',\\'Para uma faixa utilize hífen(-), ex:01/01/2018-31/01/2018\\');\n $(input).attr(\\'placeholder\\',\\'Filtrar Data...\\');\n $(input).addClass(\\'form-control\\');\n $(input).css(\\'width\\',\\'100%\\');\n $(input).appendTo($(column.footer()).empty())\n .on(\\'change\\', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n }else if(col==1){\n var column = this;\n var input = document.createElement(\"input\");\n $(input).attr(\\'id\\',\\'filtro_obra\\');\n $(input).attr(\\'placeholder\\',\\'Filtrar Obra...\\');\n $(input).addClass(\\'form-control\\');\n $(input).css(\\'width\\',\\'100%\\');\n $(input).appendTo($(column.footer()).empty())\n .on(\\'change\\', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n }else if(col==2){\n var column = this;\n var input = document.createElement(\"input\");\n $(input).attr(\\'id\\',\\'filtro_tarefa\\');\n $(input).attr(\\'placeholder\\',\\'Filtrar Tarefa...\\');\n $(input).addClass(\\'form-control\\');\n $(input).css(\\'width\\',\\'100%\\');\n $(input).appendTo($(column.footer()).empty())\n .on(\\'change\\', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n }else if(col==3){\n var column = this;\n var input = document.createElement(\"input\");\n $(input).attr(\\'id\\',\\'filtro_grupo\\');\n $(input).attr(\\'placeholder\\',\\'Filtrar Grupo...\\');\n $(input).addClass(\\'form-control\\');\n $(input).css(\\'width\\',\\'100%\\');\n $(input).appendTo($(column.footer()).empty())\n .on(\\'change\\', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n }else if(col==4){\n var column = this;\n var input = document.createElement(\"input\");\n $(input).attr(\\'id\\',\\'filtro_carteira\\');\n $(input).attr(\\'placeholder\\',\\'Filtrar Carteira...\\');\n $(input).addClass(\\'form-control\\');\n $(input).css(\\'width\\',\\'100%\\');\n $(input).appendTo($(column.footer()).empty())\n .on(\\'change\\', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n }else if((col+1)<max){\n var column = this;\n var input = document.createElement(\"input\");\n $(input).attr(\\'placeholder\\',\\'Filtrar...\\');\n $(input).addClass(\\'form-control\\');\n $(input).css(\\'width\\',\\'100%\\');\n $(input).appendTo($(column.footer()).empty())\n .on(\\'change\\', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n }\n });\n }' ,\n// \"lengthChange\"=> true,\n \"pageLength\"=> 5,\n 'dom' => 'Bfrltip',\n 'scrollX' => false,\n 'language'=> [\n \"url\"=> asset(\"vendor/datatables/Portuguese-Brasil.json\")\n ],\n 'buttons' => [\n 'reload'\n ]\n ]);\n }", "title": "" }, { "docid": "8867145fef40c0f498340e829d7c4d6d", "score": "0.53974366", "text": "public function actionAjaxFilter() {\n $filter_id = Yii::$app->request->post('filter_id', 0);\n $field_id = Yii::$app->request->post('field', 0);\n if (isset($filter_id) && $filter_id > 0) {\n $filter_data = SavedFilters::findOne($filter_id);\n $filterParams = json_decode($filter_data->filter_attributes, true);\n if(!empty($filterParams))\n Yii::$app->request->bodyParams=array_merge(Yii::$app->request->bodyParams,$filterParams);\n //Yii::$app->request->bodyParams += $filterParams;\n }\n // echo \"<pre>\",print_r(Yii::$app->request->bodyParams),\"</prE>\";die;\n $searchModel = new TaskSearch();\n $dataProvider = $searchModel->searchFilterGlobalProject(Yii::$app->request->bodyParams);\n $out['results'] = array();\n $val_array = array();\n foreach ($dataProvider as $key => $val) {\n if (!in_array($val, $val_array)) {\n $val1 = $val;\n if ($val == '' && !in_array('(not set)', $val_array)) {\n $val1 = '(not set)';\n $val = '(not set)';\n }\n if ($field_id == 'client_id' || $field_id == 'client_case_id') {\n $val_id1 = $key;\n } else {\n $val_id1 = $val1;\n }\n if (trim($val1) != \"\" && trim($val) != \"\") {\n $out['results'][] = ['id' => $val_id1, 'text' => $val, 'label' => $val1];\n $val_array[$val] = $val;\n }\n }\n }\n return json_encode($out);\n }", "title": "" }, { "docid": "c4216a5005a9528094a9d1d04664904a", "score": "0.53969634", "text": "function BuildExportSelectedFilter() {\r\n\t\tglobal $Language, $st_master_kelas_kelompok;\r\n\t\t$sWrkFilter = \"\";\r\n\t\tif ($st_master_kelas_kelompok->Export <> \"\") {\r\n\t\t\t$sWrkFilter = $st_master_kelas_kelompok->GetKeyFilter();\r\n\t\t}\r\n\t\treturn $sWrkFilter;\r\n\t}", "title": "" }, { "docid": "bf0a6ad370052264e11c88c833113096", "score": "0.5396711", "text": "function combo_group_filter()\r\n {\r\n global $wpdb;\r\n $o =\r\n '<select name=\"combo_group_filter\">' . '<option value=\"\">' . __( 'All groups', 'wp-bannerize' ) . '</option>';\r\n $q = \"SELECT `group` FROM `\" . $this->table_bannerize . \"` GROUP BY `group` ORDER BY `group` \";\r\n $rows = $wpdb->get_results( $q );\r\n foreach ( $rows as $row ) {\r\n if ( isset( $_REQUEST['combo_group_filter'] ) && $_REQUEST['combo_group_filter'] == $row->group ) {\r\n $sel = 'selected=\"selected\"';\r\n }\r\n else {\r\n $sel = \"\";\r\n }\r\n $o .= '<option ' . $sel . 'value=\"' . $row->group . '\">' . $row->group . '</option>';\r\n }\r\n $o .= '</select>';\r\n echo $o;\r\n }", "title": "" }, { "docid": "6f985549321d050aac6375240ab47910", "score": "0.5394985", "text": "function print_filter_do_filter_by_date( $p_hide_checkbox = false ) {\n\tglobal $t_filter;\n\t?>\n\t\t<table cellspacing=\"0\" cellpadding=\"0\">\n\t\t<?php if( !$p_hide_checkbox ) {\n\t\t?>\n\t\t<tr><td colspan=\"2\">\n\t\t\t<input type=\"checkbox\" name=\"<?php echo FILTER_PROPERTY_FILTER_BY_DATE;?>\" <?php\n\t\t\t\tcheck_checked( $t_filter[FILTER_PROPERTY_FILTER_BY_DATE], 'on' );\n\t\tif( ON == config_get( 'use_javascript' ) ) {\n\t\t\tprint \"onclick=\\\"SwitchDateFields();\\\"\";\n\t\t}?> />\n\t\t\t<?php echo lang_get( 'use_date_filters' )?>\n\t\t</td></tr>\n\t\t<?php\n\t}\n\t$t_menu_disabled = ( 'on' == $t_filter[FILTER_PROPERTY_FILTER_BY_DATE] ) ? '' : ' disabled ';\n\t?>\n\n\t\t<!-- Start date -->\n\t\t<tr>\n\t\t\t<td>\n\t\t\t<?php echo lang_get( 'start_date' )?>:\n\t\t\t</td>\n\t\t\t<td nowrap=\"nowrap\">\n\t\t\t<?php\n\t\t\t$t_chars = preg_split( '//', config_get( 'short_date_format' ), -1, PREG_SPLIT_NO_EMPTY );\n\tforeach( $t_chars as $t_char ) {\n\t\tif( strcasecmp( $t_char, \"M\" ) == 0 ) {\n\t\t\techo '<select name=\"', FILTER_PROPERTY_START_MONTH, '\"', $t_menu_disabled, '>';\n\t\t\tprint_month_option_list( $t_filter[FILTER_PROPERTY_START_MONTH] );\n\t\t\tprint \"</select>\\n\";\n\t\t}\n\t\tif( strcasecmp( $t_char, \"D\" ) == 0 ) {\n\t\t\techo '<select name=\"', FILTER_PROPERTY_START_DAY, '\"', $t_menu_disabled, '>';\n\t\t\tprint_day_option_list( $t_filter[FILTER_PROPERTY_START_DAY] );\n\t\t\tprint \"</select>\\n\";\n\t\t}\n\t\tif( strcasecmp( $t_char, \"Y\" ) == 0 ) {\n\t\t\techo '<select name=\"', FILTER_PROPERTY_START_YEAR, '\"', $t_menu_disabled, '>';\n\t\t\tprint_year_option_list( $t_filter[FILTER_PROPERTY_START_YEAR] );\n\t\t\tprint \"</select>\\n\";\n\t\t}\n\t}\n\t?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<!-- End date -->\n\t\t<tr>\n\t\t\t<td>\n\t\t\t<?php echo lang_get( 'end_date' )?>:\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t<?php\n\t\t\t$t_chars = preg_split( '//', config_get( 'short_date_format' ), -1, PREG_SPLIT_NO_EMPTY );\n\tforeach( $t_chars as $t_char ) {\n\t\tif( strcasecmp( $t_char, \"M\" ) == 0 ) {\n\t\t\techo '<select name=\"', FILTER_PROPERTY_END_MONTH, '\"', $t_menu_disabled, '>';\n\t\t\tprint_month_option_list( $t_filter[FILTER_PROPERTY_END_MONTH] );\n\t\t\tprint \"</select>\\n\";\n\t\t}\n\t\tif( strcasecmp( $t_char, \"D\" ) == 0 ) {\n\t\t\techo '<select name=\"', FILTER_PROPERTY_END_DAY, '\"', $t_menu_disabled, '>';\n\t\t\tprint_day_option_list( $t_filter[FILTER_PROPERTY_END_DAY] );\n\t\t\tprint \"</select>\\n\";\n\t\t}\n\t\tif( strcasecmp( $t_char, \"Y\" ) == 0 ) {\n\t\t\techo '<select name=\"', FILTER_PROPERTY_END_YEAR, '\"', $t_menu_disabled, '>';\n\t\t\tprint_year_option_list( $t_filter[FILTER_PROPERTY_END_YEAR] );\n\t\t\tprint \"</select>\\n\";\n\t\t}\n\t}\n\t?>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t<?php\n}", "title": "" }, { "docid": "7bf455c01f8b02c5dcefa7bf63dd38d6", "score": "0.5388023", "text": "function onSearch()\n {\n \n // get the search form data\n $data = $this->form->getData();\n \n //print_r($data);\n \n // clear session filters\n TSession::setValue('LocalizarEvento_filter_aps_id', NULL);\n TSession::setValue('LocalizarEvento_filter_aps_nome_paciente', NULL);\n TSession::setValue('LocalizarEvento_filter_aps_pfs_id', NULL);\n TSession::setValue('LocalizarEvento_filter_aps_data_agendada', NULL);\n TSession::setValue('LocalizarEvento_filter_search_today', NULL);\n \n if (isset($data->aps_id) AND ($data->aps_id)) {\n $filter = new TFilter('aps_id', 'like', \"%{$data->aps_id}%\"); // create the filter\n TSession::setValue('LocalizarEvento_filter_aps_id', $filter); // stores the filter in the session\n }\n \n if (isset($data->aps_nome_paciente) AND ($data->aps_nome_paciente)) {\n $filter = new TFilter('upper(aps_nome_paciente)', 'like', \"%\".strtoupper($data->aps_nome_paciente).\"%\"); // create the filter\n TSession::setValue('LocalizarEvento_filter_aps_nome_paciente', $filter); // stores the filter in the session\n }\n \n if (isset($data->aps_pfs_id) AND ($data->aps_pfs_id) ) \n {\n $filter = new TFilter('aps_pfs_id', '=', \"{$data->aps_pfs_id}\"); // create the filter\n TSession::setValue('LocalizarEvento_filter_aps_pfs_id', $filter); // stores the filter in the session\n }\n \n if ( (isset($data->aps_data_agendada_1) and ($data->aps_data_agendada_1)) AND (!isset($data->aps_data_agendada_2) and (!$data->aps_data_agendada_2) ) ) \n {\n $filter = new TFilter('aps_data_agendada', '=', \"{$data->aps_data_agendada_1}\"); // create the filter\n new TToast(\"teste1\");\n TSession::setValue('LocalizarEvento_filter_aps_data_agendada', $filter );\n \n }\n \n if ( (isset($data->aps_data_agendada_1) and ($data->aps_data_agendada_1)) AND (isset($data->aps_data_agendada_2) and ($data->aps_data_agendada_2) ) ) \n {\n $filter = new TFilter('aps_data_agendada', 'BETWEEN', \"{$data->aps_data_agendada_1}\",\"{$data->aps_data_agendada_2}\"); // create the filter\n new TToast(\"teste2\");\n TSession::setValue('LocalizarEvento_filter_aps_data_agendada', $filter );\n \n }\n \n \n //print_r($data);\n //$filter = new TFilter('aps_data_agendada', 'BETWEEN',$param['aps_data_agendada_1'],$param['aps_data_agendada_2']); // create the filter\n \n //$filter = new TFilter('aps_data_agendada', '=', \"'\".date('d/m/Y').\"'\");\n \n \n // fill the form with data again\n $this->form->setData($data);\n \n // keep the search data in the session\n //TSession::setValue('LocalizarEvento_filter_data', $data);\n \n $param=array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }", "title": "" }, { "docid": "34fdf2b5a152f18a3b97be600f06ff5f", "score": "0.5382505", "text": "function drealty_agent_build_filter_query(SelectQueryInterface $query) {\n // Build query\n $filter_data = isset($_SESSION['drealty_agent_overview_filter']) ? $_SESSION['drealty_agent_overview_filter'] : array();\n foreach ($filter_data as $index => $filter) {\n list($key, $value) = $filter;\n switch ($key) {\n case 'status':\n\n // Note: no exploitable hole as $key/$value have already been checked when submitted\n $dc = new dRealtyConnection();\n $connections = $dc->FetchConnections();\n $ored = db_or();\n\n foreach ($connections as $connection) {\n $and = db_and()\n ->condition('conid', $connection->conid)\n ->condition('office_id', $connection->office_id);\n\n $ored->condition($and);\n }\n $query->condition($ored);\n break;\n }\n }\n}", "title": "" }, { "docid": "f9f661002b4590a7c8ef90a5bc79111e", "score": "0.53798777", "text": "function user_filter($parameters){\n\t\t$group_filter\t= $this->check_parameters($parameters,\"group_filter\",0);\n\t\t$order_filter\t= $this->check_parameters($parameters,\"order_filter\",0);\n\t\t$filter_string\t= $this->check_parameters($parameters,\"filter_string\");\n\t\t$status\t\t\t= $this->check_parameters($parameters,\"status\",$this->check_parameters($parameters,\"identifier\",-1));\n\t\tif ($this->module_debug){$this->call_command(\"UTILS_DEBUG_ENTRY\",array($this->module_name,\"user_filter\",__LINE__,print_r($parameters,true)));}\n\t\t$out = \"\\t\\t\\t\\t<form name=\\\"user_filter_form\\\" method=\\\"get\\\" label=\\\"\".USER_TITLE_LABEL.\"\\\">\\n\";\n\t\t$out .= \"\\t\\t\\t\\t\\t<input type=\\\"hidden\\\" name=\\\"command\\\" value=\\\"USERS_LIST\\\"/>\\n\";\n\t\t$out .= \"\\t\\t\\t\\t\\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"1\\\"/>\\n\";\n\t\t$out .= \"\\t\\t\\t\\t\\t<input type=\\\"hidden\\\" name=\\\"status\\\" value=\\\"$status\\\"/>\\n\";\n\t\t$out .= \"\\t\\t\\t\\t\\t<input type=\\\"text\\\" label=\\\"\".SEARCH_KEYWORDS.\"\\\" name=\\\"filter_string\\\" size=\\\"20\\\"><![CDATA[$filter_string]]></input>\\n\";\n\t\t/**\n\t\t* retrieve the list of groups and display for selection\n\t\t*/\n\t\tif ($this->has_module_group){\n\t\t\t$group_list = $this->call_command(\"GROUP_RETRIEVE\",array($group_filter));\n\t\t\t$out .= \"\\t\\t\\t\\t\\t<select name=\\\"group_filter\\\" label=\\\"\".USER_GROUP_FILTER.\"\\\">\\n\";\n\t\t\t$out .= \"\\t\\t\\t\\t\\t\\t<option value=\\\"-1\\\">\".USER_DISPLAY_ALL_GROUPS.\"</option>\\n\";\n\t\t\t$out .= \"$group_list\";\n\t\t\t$out .= \"\\t\\t\\t\\t\\t</select>\\n\";\n\t\t}\n\t\t/**\n\t\t* display the order by filter option\n\t\t*/\n\t\t$out .= \"\\t\\t\\t\\t\\t<select name=\\\"order_filter\\\" label=\\\"\".ENTRY_ORDER_BY.\"\\\">\\n\";\n\t\tfor ($index=0,$max=count($this->display_options);$index<$max;$index++){\n\t\t\t$out .=\"\\t\\t\\t\\t\\t\\t<option value=\\\"\".$this->display_options[$index][0].\"\\\"\";\n\t\t\tif ($order_filter==$this->display_options[$index][0]){\n\t\t\t\t$out .=\" selected=\\\"true\\\"\";\n\t\t\t}\n\t\t\t$out .=\">\".$this->display_options[$index][1].\"</option>\\n\";\n\t\t}\n\t\t$out .= \"\\t\\t\\t\\t\\t</select>\\n\";\n\t\t$out .= \"\\t\\t\\t\\t\\t<input type=\\\"submit\\\" iconify=\\\"SEARCH\\\" value=\\\"\".SEARCH_NOW.\"\\\"/>\\n\";\n\t\t$out .= \"\\t\\t\\t\\t</form>\";\n\t\t/**\n\t\t* return the filter XML document\n\t\t*/\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "f7c6974f9d6cfc5615d8a296eaf729a1", "score": "0.53777856", "text": "protected function filters()\n {\n return [\n 'is_active' => [\n 'text' => 'Trạng thái:',\n 'data' => [\n '' => 'Tất cả',\n 1 => 'Active',\n 0 => 'Deactive'\n ]\n ]\n ];\n }", "title": "" }, { "docid": "39e075b66d1ece623d6dda3afa5e50ae", "score": "0.53756684", "text": "function event_table_filtering($screen){\n\tif($screen == 'event'){?>\n\t\t<select name=\"end_date\">\n\t\t\t<option value=\"all\" <?php if($_GET['end_date'] == 'all'): ?>selected=\"selected\"<?php endif ?>><?php _e('All events', 'mvnp_basic') ?></option>\n\t\t\t<option value=\"past\" <?php if($_GET['end_date'] == 'past'): ?>selected=\"selected\"<?php endif ?>><?php _e('Past events', 'mvnp_basic') ?></option>\n\t\t\t<option value=\"upcoming\" <?php if(!$_GET['end_date'] || $_GET['end_date'] == 'upcoming'): ?>selected=\"selected\"<?php endif ?>><?php _e('Upcoming events', 'mvnp_basic') ?></option>\n\t\t</select>\n\t\t<?php\n\t}\n}", "title": "" } ]
bc0e110793eea33b68cd526ff917329c
Returns true if the subform values are all empty Because form values are string in nature. values are evaluated as string whatever it takes
[ { "docid": "7437648a76517f63b6d7024ca7169e59", "score": "0.81009144", "text": "public function isSubformEmpty()\n\t{\n\t\t$values = $this->getValues();\n\t\t\n\t\tforeach ($values as $value)\n\t\t{\n\t\t\tif (is_array($value))\n\t\t\t{\n\t\t\t\tforeach ($value as $inner)\n\t\t\t\t{\n\t\t\t\t\tif ( ! empty($inner) || $inner === '0')\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( ! empty($value) || $value === '0')\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" } ]
[ { "docid": "b350ec4e725ba42433c2e541b91e8aab", "score": "0.77619994", "text": "function filled_out($form_vars) {\n foreach ($form_vars as $key => $value) {\n if ((!isset($key)) || ($value == '')) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "80251811c8e1e73bd1c2186956724d71", "score": "0.7729848", "text": "function filled_out($form_vars){\n\t\tforeach($form_vars as $key => $value){\n\t\t\tif(!isset($key) || ($value == ''))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a5a84e57e7a09ac067bf8eb57597fc12", "score": "0.765335", "text": "function filled_out($form_vars){\r\n foreach($form_vars as $key => $value){\r\n if((!isset($key)) || ($value == '')) return false;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "f36f07643810e6d14989a7518b02eb8e", "score": "0.7525264", "text": "public function FormFieldsEmptyCheck() {\n\t\t\t\n\t\t\tif($this->title == \"\" || $this->authors == \"\" || $this->publisher == \"\" || $this->sector == \"\") {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "a18b88cf0f5128b82f53e59f898bfd44", "score": "0.74959636", "text": "function filled_out($form_vars) {\n foreach($form_vars as $key => $value) {\n if(!isset($key) || $value = '') {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "1b0046dbbcd27944fc05fdc29084fd59", "score": "0.7455368", "text": "public function isEmpty()\n {\n $vars = $this->getValue();\n /* $vars = get_object_vars($this); */\n /* unset($vars['snapshot']); */\n /* unset($vars['country']); */\n unset($vars['country_iso']);\n unset($vars['origin_iso']);\n /* unset($vars['append_destination_iso']); */\n /* unset($vars['destination_country_fmt']); */\n\n $num_set_fields = 0;\n\n foreach ($vars as $value) {\n if (!empty($value)) $num_set_fields++;\n }\n $is_empty = 0 === $num_set_fields;\n return $is_empty;\n }", "title": "" }, { "docid": "a674c5fc32f69ab6fef00f9d646ce3ad", "score": "0.7274525", "text": "public function isEmpty() {\n\t\treturn $this->getValue() == null || $this->getValue() == '';\n\t}", "title": "" }, { "docid": "f41356f74564ff02ebec76bc93dbad1a", "score": "0.72321814", "text": "public function isValueEmpty(): bool\n {\n return '' === $this->value;\n }", "title": "" }, { "docid": "9d0584374faa2378380c8eed73209eac", "score": "0.72279054", "text": "public static function allValuesSet(): bool\n {\n // Gets form field names\n $fields = \\array_keys(self::$fields);\n\n foreach ($fields as $name) {\n self::setValue($name);\n\n if (self::isValueSet($name)) {\n continue;\n } else {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "a1f50b95344b9f0a48de6e80f309fbdb", "score": "0.71153414", "text": "public function isEmptyValue()\n\t{\n\t\treturn $this->value === '' ||\n\t\t\t $this->value === 0;\n\t}", "title": "" }, { "docid": "66a3e13be516adf10acd9626637a91a6", "score": "0.70889884", "text": "public function isNotEmpty() {\n foreach($this->post as $name => $value) \n {\n if(empty($value)) {\n $this->empty[$name] = $value;\n }\n }\n return empty($this->empty) ? true : $this->handleEmptyMessage(); \n }", "title": "" }, { "docid": "9e32736babec1219b927711daea4b3b7", "score": "0.7083337", "text": "public final function __isEmpty() : bool {\n\t\t\treturn (($this->value === null) || ($this->value === ''));\n\t\t}", "title": "" }, { "docid": "f1de10a50d3c0d6a1e66b9feac8a153e", "score": "0.70643026", "text": "public function isEmpty() {\n\t\treturn (is_array($this->_value) && count($this->_value) === 0) || (!is_array($this->_value) && strlen($this->_value) === 0 );\n\t}", "title": "" }, { "docid": "2dea138e837e35fa5aecae5c5cd827f7", "score": "0.702351", "text": "public function is_value_submission_empty( $form_id ) {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "381e013cd7eaa48bb501c0c73acef933", "score": "0.6981424", "text": "function not_empty($fields = []){\n if(count($fields) != 0){\n foreach($fields as $field){\n if(empty($_POST[$field]) || e($_POST[$field]) == \"\"){\n return false;\n }\n }\n return true;\n }\n }", "title": "" }, { "docid": "484bf630d495328f0d578adbd4ac505d", "score": "0.69389296", "text": "public function notEmpty()\n {\n return !empty($this->input);\n }", "title": "" }, { "docid": "287e31d0f7dae85d48f530e1816886df", "score": "0.69315", "text": "private static function checkEmptyFields($values):bool\n {\n foreach($values as $value) {\n if (empty(trim($value))) \n return false;\n }\n return true;\n }", "title": "" }, { "docid": "e49bc1cc1f196c09843023734a215c73", "score": "0.69194156", "text": "public function isEmpty(){\r\n return empty($this->val);\r\n }", "title": "" }, { "docid": "b8cc0f5a733476c79603edf194618836", "score": "0.6883912", "text": "public function isEmpty()\n {\n return (is_null($this->getValue()) && count($this->options) < 1) ? true : false;\n }", "title": "" }, { "docid": "0ebee3024ce6c4158248b1d6bac79c45", "score": "0.68813103", "text": "public function testIsEmpty()\n {\n $this->assertTrue($this->uut->setValue([])->isEmpty());\n $this->assertTrue($this->uut->setValue(['', ''])->isEmpty());\n $this->assertFalse($this->uut->setValue(['foo'])->isEmpty());\n }", "title": "" }, { "docid": "e291018000b7991950b4bb815737c0f0", "score": "0.68054414", "text": "public function isEmpty()\n {\n return count( $this->values ) === 0;\n }", "title": "" }, { "docid": "9e1fec32eacfaaebeb19e39f4f0e8108", "score": "0.6791897", "text": "public function noEmpty() {\n return $this->isEmpty() == false;\n }", "title": "" }, { "docid": "330abc072310a13507f033a6ddb596fd", "score": "0.6684772", "text": "function isDataValid() \n {\n $isValid = true;\n \n // step through each field\n for ($indx=0; $indx<count( $this->formFields ); $indx++) {\n \n $key = $this->formFields[ $indx ];\n \n // if field is empty then\n if ( $this->formValues[ $key ] == '') {\n \n // mark the error\n $isValid = false;\n $this->formErrors[ $key ] = $key.' can\\'t be empty';\n }\n \n } // next field\n \n return $isValid;\n \n }", "title": "" }, { "docid": "232d70e7ade1020cedb79a6d2d1dd4de", "score": "0.6673455", "text": "public function isBlank()\n {\n return false;\n }", "title": "" }, { "docid": "ce06c63184c1243f0220ab8f63694510", "score": "0.6671008", "text": "public function isEmpty(): bool\n {\n return !isset($this->value[0]);\n }", "title": "" }, { "docid": "ec979d97c70d50f8d5ab971b14744244", "score": "0.6650369", "text": "public function hasEmptyAttributes() {\r\n foreach ($this->getCategories() as $category) {\r\n foreach ($category->getAttributes() as $attribute) {\r\n $values = $attribute->getPartValues($this->id);\r\n $countVal = 0; \r\n foreach ($values as $value) {\r\n \t$countVal += 1;\r\n \tif ($value->value == \"\") {\r\n \treturn (true);\r\n \t}\r\n }\r\n if ($countVal == 0) {\r\n \treturn (true);\r\n }\t\r\n }\r\n }\r\n return (false);\r\n }", "title": "" }, { "docid": "c028227c0c7305eb6a4ecfe95ed5b8cc", "score": "0.6644758", "text": "protected function isNewFormEmpty(array $values, array $keys)\n {\n if (count($keys['considerNewFormEmptyFields']) == 0 || !isset($values)) return false;\n\n $emptyFields = 0;\n foreach ($keys['considerNewFormEmptyFields'] as $key)\n {\n if (is_array($values[$key]))\n {\n if (count($values[$key]) === 0)\n {\n $emptyFields++;\n }\n elseif (array_key_exists('tmp_name', $values[$key]) && $values[$key]['tmp_name'] === '' && $values[$key]['size'] === 0)\n {\n $emptyFields++;\n }\n }\n elseif ('' === trim($values[$key]))\n {\n $emptyFields++;\n }\n }\n\n if ($emptyFields === count($keys['considerNewFormEmptyFields']))\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "b04ad334d2654aeefe5de565bf0500dc", "score": "0.6643954", "text": "private function is_empty($value)\n {\n return is_array($value) ? empty($value) : !strlen(strval($value)) > 0;\n }", "title": "" }, { "docid": "762d6a7d7cf0a62acb6c810e4573ca1a", "score": "0.6640502", "text": "protected function isInputFieldEmpty(mixed $value): bool\n\t{\n\t\treturn in_array($value, ['', null, []], true);\n\t}", "title": "" }, { "docid": "dd395a1b1323bacef403961203d1241b", "score": "0.6633164", "text": "public function valueNotEmpty($value) {\n\t\t$field = array_keys($value);\n\t\t$field = $field[0];\n\t\t$value[$field] = trim($value[$field]);\n\t\tif (!empty($value[$field])) return true;\n\t\treturn ucfirst($field) . ' cannot be empty.';\n\t}", "title": "" }, { "docid": "aece6e2a163dd0939408eb3b454e986b", "score": "0.66221213", "text": "public function getIsBlank(): bool\n {\n foreach ($this as $slot) {\n if ($slot !== null) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "dfd9901e7677a9d48308c747e3ed4cd8", "score": "0.6608999", "text": "public function isEmpty()\n {\n if(!$this->isValid())\n return true;\n\n return is_array($this->CNAB) && empty($this->CNAB);\n }", "title": "" }, { "docid": "9338ebd0056dea29d505434a1e60bb53", "score": "0.6593076", "text": "public function isEmpty(): bool\n {\n return $this->submitted->empty() && $this->files->empty();\n }", "title": "" }, { "docid": "1cf8b2eed6253042c1c08bd60bdb55f7", "score": "0.65887713", "text": "function POST_EMPTY($var) {\n\treturn isset($_POST[$var]) ? trim($_POST[$var]) == '' : true;\n}", "title": "" }, { "docid": "229ab9ec7561934103aff0f95bbb3216", "score": "0.65734875", "text": "function notEmpty(){ return !$this->isEmpty(); }", "title": "" }, { "docid": "29a0e1db8a40ae003f9a1740b527a887", "score": "0.655945", "text": "function bzhy_empty($value) {\r\n\tif ($value === null) {\r\n\t\treturn true;\r\n\t}\r\n\tif (is_array($value) && empty($value)) {\r\n\t\treturn true;\r\n\t}\r\n\tif (is_string($value) && $value === '') {\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}", "title": "" }, { "docid": "c2951ce8f800294cf49cd5a954959c59", "score": "0.65552294", "text": "function blank($value)\n {\n if (is_null($value)) {\n return true;\n }\n if (is_string($value)) {\n return trim($value) === '';\n }\n if (is_numeric($value) || is_bool($value)) {\n return false;\n }\n if ($value instanceof Countable) {\n return count($value) === 0;\n }\n\n return empty($value);\n }", "title": "" }, { "docid": "0cc74378ffb103cfd8be0bc7adcd71af", "score": "0.65349007", "text": "public function is_empty()\n {\n return empty( $this->metaboxes );\n }", "title": "" }, { "docid": "429b0d3aa76d4212105c69cff5761c12", "score": "0.65256745", "text": "function blank($value)\n {\n if (is_null($value)) {\n return true;\n }\n\n if (is_string($value)) {\n return trim($value) === '';\n }\n\n if (is_numeric($value) || is_bool($value)) {\n return false;\n }\n\n if ($value instanceof Countable) {\n return count($value) === 0;\n }\n\n return empty($value);\n }", "title": "" }, { "docid": "53f3cccb5c7ea7908a7b33ee75feaff1", "score": "0.6514082", "text": "public function isEmpty() {\r\r\n return empty($this->input) && empty($this->output);\r\r\n }", "title": "" }, { "docid": "07723a32302eae3330c93e8cb0ebca82", "score": "0.6509183", "text": "function blank(mixed $value): bool\n {\n if (is_null($value)) {\n return true;\n }\n\n if (is_string($value)) {\n return trim($value) === '';\n }\n\n if (is_numeric($value) || is_bool($value)) {\n return false;\n }\n\n if ($value instanceof Countable) {\n return count($value) === 0;\n }\n\n return empty($value);\n }", "title": "" }, { "docid": "a19a6ff375b48b8f9c23ef6e9bf8a1e8", "score": "0.64705884", "text": "public function isMulti()\n {\n return $this->values()->filter('is_scalar')->length() !== $this->length();\n }", "title": "" }, { "docid": "8fb0adc52beef62966708850bcbe8688", "score": "0.6460869", "text": "public function isEmpty()\n {\n return empty($this->properties);\n }", "title": "" }, { "docid": "139183f34de8d76416a27ac67d644b41", "score": "0.64602154", "text": "function isNotEmpty(){\n\t\t$args = func_get_args();\n\t\tfor ($i=0; $i < count($args); $i++) { \n\t\t\tif (empty($args[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "45960629727d7230149b84d2ce30c2ef", "score": "0.6448481", "text": "public function isEmpty()\n\t{\n\t\t$val = $this->_value;\n\t\tif ($val !== 0 && $val!== '0' && trim($val) == '' && empty($val))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a1d21fed1b2d3a0ac933928ba1641767", "score": "0.64471054", "text": "public function isNotEmpty()\n {\n return !$this->isEmpty();\n }", "title": "" }, { "docid": "83957e8cff5011b9ae2e84d82adb007f", "score": "0.6438927", "text": "function webpunk_not_empty( &$value ) {\n\t\treturn empty( $value ) ? false : ( is_string( $value ) ? !empty( trim( $value ) ) : !empty ( $value ) );\n\t}", "title": "" }, { "docid": "16aead15175c00fb380c3e75261d0086", "score": "0.6438536", "text": "public function isEmpty(): bool\n {\n return '' === $this->data;\n }", "title": "" }, { "docid": "fbacc15fecb49bb2e4b7b5619fee27e9", "score": "0.6421019", "text": "public function isEmpty() {\n return empty($this->getName()) || empty($this->getKey());\n }", "title": "" }, { "docid": "1a3dec763fc6f15b787f3717957db545", "score": "0.64165753", "text": "function asset_type_form_validate($form, &$form_state) {\n $values = &$form_state['values'];\n // Clean up empty values.\n foreach($values['data'] as $key => $value){\n if(empty($value)) unset($values['data'][$key]);\n }\n}", "title": "" }, { "docid": "db51b67b7ea519edb15606f674550574", "score": "0.6415375", "text": "public function empty()\n {\n $empty = true;\n foreach ($this->attributes as $attribute) {\n if (!empty($attribute)) {\n $empty = false;\n }\n }\n return $empty;\n }", "title": "" }, { "docid": "6f89dc2092ae1dbac5815770e6ff69cf", "score": "0.6409869", "text": "function no_empty($data): bool\n{\n $result = false;\n if (isset($data)) {\n if (gettype(($data)) !== 'array' && gettype(($data)) !== 'object') {\n if (!empty(trim($data))) {\n $result = true;\n }\n } else {\n if (count($data) > 0) {\n $result = true;\n }\n }\n }\n return $result;\n}", "title": "" }, { "docid": "a11fe78aa7db82c137ceb4193562262b", "score": "0.64025176", "text": "public function isEmpty()\n {\n foreach ($this as $prop => $value) {\n if (!empty($this->$prop)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "8a2206a4bd45c3e51e317bf31562509c", "score": "0.6401794", "text": "public function isEmpty()\n {\n return\n empty($this->items)\n && empty($this->fields);\n }", "title": "" }, { "docid": "254ec5ba5ede68c70d7914bfef5256a2", "score": "0.63855606", "text": "public function isBlank() {\r\n\r\n if (!isset($this->node_object->required)) {\r\n return false;\r\n }\r\n\r\n if ($this->node_object->required) {\r\n if (empty($this->inputjson)) {\r\n $this->error_nodes[] = sprintf(\"Value required for '%s'\", $this->node_object->name);\r\n return true;\r\n }\r\n } else {\r\n if (empty($this->inputjson)) {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "1d67519bb741ac37e2cf26ac8f520901", "score": "0.6378784", "text": "public function isNotEmpty()\n {\n return ! $this->isEmpty();\n }", "title": "" }, { "docid": "6b790a113e48fc0fd69ed56110787fa1", "score": "0.63772565", "text": "function ensure_submit($post, $mand_str)\n{\n // make the string an array\n $post_arr = explode(',', $mand_str);\n \n // initialise the result to true\n $res = true;\n \n // if mandantory fields were entered\n if (count($post_arr) > 0)\n {\n // loop through looking for empty strings\n foreach ($post_arr as $key => $value)\n {\n if (\n strlen($post[$value]) <= 0\n || $post[$value] == 0\n )\n {\n // submitted value is empty\n $res = false;\n }\n }\n }\n \n return $res;\n}", "title": "" }, { "docid": "a3d6a0d5edc7afc2eb9c393cc0b50752", "score": "0.63615566", "text": "function emptycheck($required){\n foreach($required as $attr) {\n if(empty($_POST[$attr]))\n $error .= $attr . ', ';\n\t}\n\n\tif(isset($error)) {\n $error = substr($error, 0, strlen($error)-2);\n\t\treturn $error;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "3cef5bdf1d245d2182bd2626b93b1577", "score": "0.6351012", "text": "public function hasOnlyDefaultValues()\n {\n if ($this->quotenbr !== '') {\n return false;\n }\n\n if ($this->custid !== '') {\n return false;\n }\n\n if ($this->linenbr !== '') {\n return false;\n }\n\n if ($this->sublinenbr !== '') {\n return false;\n }\n\n if ($this->itemid !== '') {\n return false;\n }\n\n if ($this->desc1 !== '') {\n return false;\n }\n\n if ($this->desc2 !== '') {\n return false;\n }\n\n if ($this->custitemid !== '') {\n return false;\n }\n\n if ($this->vendorid !== '') {\n return false;\n }\n\n if ($this->vendoritemid !== '') {\n return false;\n }\n\n if ($this->status !== '') {\n return false;\n }\n\n if ($this->lostreason !== '') {\n return false;\n }\n\n if ($this->lostdate !== '') {\n return false;\n }\n\n if ($this->kititemflag !== '') {\n return false;\n }\n\n if ($this->hasnotes !== '') {\n return false;\n }\n\n if ($this->venddetail !== '') {\n return false;\n }\n\n if ($this->rshipdate !== '') {\n return false;\n }\n\n if ($this->leaddays !== 0) {\n return false;\n }\n\n if ($this->taxcode !== '') {\n return false;\n }\n\n if ($this->ordrqty !== '') {\n return false;\n }\n\n if ($this->ordrprice !== '') {\n return false;\n }\n\n if ($this->ordrcost !== '') {\n return false;\n }\n\n if ($this->ordrtotalprice !== '') {\n return false;\n }\n\n if ($this->ordrtotalcost !== '') {\n return false;\n }\n\n if ($this->uom !== '') {\n return false;\n }\n\n if ($this->costuom !== '') {\n return false;\n }\n\n if ($this->whse !== '') {\n return false;\n }\n\n if ($this->listprice !== '') {\n return false;\n }\n\n if ($this->stancost !== '') {\n return false;\n }\n\n if ($this->quotind !== '') {\n return false;\n }\n\n if ($this->quotqty !== 0) {\n return false;\n }\n\n if ($this->quotprice !== '') {\n return false;\n }\n\n if ($this->quotcost !== '') {\n return false;\n }\n\n if ($this->quotmkupmarg !== '') {\n return false;\n }\n\n if ($this->discpct !== '') {\n return false;\n }\n\n if ($this->spcord !== '') {\n return false;\n }\n\n if ($this->error !== '') {\n return false;\n }\n\n if ($this->errormsg !== '') {\n return false;\n }\n\n if ($this->minprice !== '') {\n return false;\n }\n\n if ($this->nsitemgroup !== '') {\n return false;\n }\n\n if ($this->shipfromid !== '') {\n return false;\n }\n\n if ($this->itemtype !== '') {\n return false;\n }\n\n if ($this->dummy !== 'x') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "title": "" }, { "docid": "f6eea5a14b7bf6f15f94e41d975e156e", "score": "0.63498497", "text": "public function filterEmpty(){\n\t\t$this->removeValue(\"\");\n\t}", "title": "" }, { "docid": "54f52b5aa7fb672767dbca7a8ec0d17c", "score": "0.6348342", "text": "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "title": "" }, { "docid": "4ebf6e3e2a4f545e9ba02ebb94140df5", "score": "0.63448435", "text": "public function is_blank_field( $post ){\n foreach( $post as $field ){\n if( $field === '' ){\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "04717b033a73eb301858f4f063ea0680", "score": "0.6342013", "text": "public function isEmpty(): bool\n {\n return $this->getVariables()->isEmpty();\n }", "title": "" }, { "docid": "41388fd5b2c571afc7b444f6dd8d3c42", "score": "0.63312167", "text": "function blank($value) {\n if (is_object($value) and method_exists($value, 'get_empty')) {\n return $value->get_empty();\n } elseif (is_string($value)) {\n $value = trim($value);\n return empty($value) and $value !== '0';\n } else {\n return empty($value) and $value !== 0;\n }\n }", "title": "" }, { "docid": "646cb4c3065f59bb7d3bf018be9fe1c9", "score": "0.6330601", "text": "public function isNotEmpty(): bool\n {\n return empty($this->data) === false;\n }", "title": "" }, { "docid": "24f3c69acc4ca2e05750cac4a82ea180", "score": "0.63255095", "text": "public function isEmpty() {\n return empty($this->data);\n }", "title": "" }, { "docid": "f8ce7008a3580364f55b61c261971735", "score": "0.6323304", "text": "public function isEmpty()\n\t{\n\t\t$doNoCount = array();\n\t\t\n\t\tforeach ($this->_data as $property => $value) {\n\t\t\tif ($value instanceof Shanty_Mongo_Document) {\n\t\t\t\tif (!$value->isEmpty()) return false;\n\t\t\t}\n\t\t\telseif (!is_null($value)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$doNoCount[] = $property;\n\t\t}\n\t\t\n\t\tforeach ($this->_cleanData as $property => $value) {\n\t\t\tif (in_array($property, $doNoCount)) continue;\n\t\t\t\n\t\t\tif (!is_null($value)) return false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "984df18f0f8af67f04d252b8d06706ff", "score": "0.6317413", "text": "public function isNotEmpty()\n\t{\n\t\treturn ! $this->isEmpty();\n\t}", "title": "" }, { "docid": "89dbf9bab2b0d6e8e8f1b8a763a5594c", "score": "0.6316049", "text": "function uploadCheckEmpty(&$model, $data){\n\t\tforeach($data as $fieldName => $field){\n\t\t\tif(!$this->__model->validate[$fieldName]['Empty']['check']) return true;\n\t\t\tif(empty($field['remove'])){\n\t\t\t\tif(!is_array($field) || empty($field['name'])){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "aaf13e82a1def640ddc4e543960048b5", "score": "0.629857", "text": "private function isEmpty($value): bool\n {\n return $value === null || $value === '' || $value === [] || ($value instanceof ArrayCollection && $value->isEmpty());\n }", "title": "" }, { "docid": "a5f39c569a02b548749d9a78fc671932", "score": "0.6295499", "text": "public function isEmpty() {\n\n // The field will not be considered empty if the youtube url, mp4 url or mpe audio file properties has a value\n return empty($this->values['youtube_url']);\n }", "title": "" }, { "docid": "fda54792a4b8af2772dd18d9bdde77cb", "score": "0.62938154", "text": "public function isEmpty()\n {\n return empty($this->datas);\n }", "title": "" }, { "docid": "2a8b5687766e2efc6d99eefffb354049", "score": "0.62920564", "text": "public function validate() {\n\t\t$this->setError( false );\n\n\t\t// remove empty value which might have been set by setValueWhenEmpty\n\t\tif( is_array( $this->_value ) ) {\n\t\t\t// find empty value in array\n\t\t\t$key\t= array_search( '', $this->_value, true );\n\t\t\tif( $key !== false ) {\n\t\t\t\tunset($this->_value[$key]);\n\t\t\t} // if\n\t\t} else {\n\t\t\tif( $this->_value === '' ) {\n\t\t\t\t$this->_value\t= null;\n\t\t\t}\n\t\t}\n\n\t\t// if not null is set and no value is set an error will occur\n\t\tif( $this->notNull() && ( $this->value() === null || count($this->value()) == 0) ) {\n\t\t\t$this->setError( 'EMPTY VALUE' );\n\t\t}\n\n\t\t$this->_isValidated\t= true;\n\t\treturn !$this->error();\n\t}", "title": "" }, { "docid": "267aec59045c07877b4265fb344af647", "score": "0.62917197", "text": "function filled(mixed $value): bool\n {\n return ! blank($value);\n }", "title": "" }, { "docid": "63b78940dce5a104a832e4607071dec0", "score": "0.62884295", "text": "public function ContainsEmptyAttribute()\n {\n foreach(CG_PinAssignment::$attributes as $key => $data)\n {\n if($key === 'input' || $key === 'output')\n {\n foreach($data as $attribute)\n {\n if($this->$attribute == '')\n {\n $this->_error = 'All attributes cannot be empty';\n return true;\n }\n }\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "5c6d862bc059dd038d5c9a8e0f1d5af0", "score": "0.628573", "text": "public function isEmpty():bool\n {\n return empty($this->parameters);\n }", "title": "" }, { "docid": "3ee73296873fef3beace6bdadf06c28b", "score": "0.62837636", "text": "function all_empty( $id )\n{\n $creditsID = str_replace('Grade', 'Credits', $id);\n $numberID = str_replace('Grade','Number', $id);\n $nameID = str_replace('Grade','Name', $id );\n $preID = str_replace('Grade','Prefix',$id);\n\n $pre = $_POST[ $preID];\n $num = $_POST[ $numberID];\n $name = $_POST[$nameID];\n $cred = $_POST[$creditsID];\n $gra = $_POST[$id];\n if( empty($pre) && empty($num) && empty($name) && empty($cred) && empty($gra) )\n {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "a46046706cb6ec0b6b19185597b3b913", "score": "0.6267715", "text": "public function isEmpty(): bool\n {\n $isEmpty = empty($this->storage);\n\n if ($isEmpty === false) {\n if ($this->length() == 1) {\n if (is_null($this->values()[0])) {\n $isEmpty = true;\n }\n }\n }\n\n return $isEmpty;\n }", "title": "" }, { "docid": "eaf8eff209f6105f818cd7fc12e0e72e", "score": "0.62509155", "text": "public function isValueEmpty($value)\n\t{\n\t\treturn empty($value);\n\t}", "title": "" }, { "docid": "1d70abcb2d916546b4dfdfbc2c5c182c", "score": "0.62498575", "text": "private function check_tag_values()\n\t{\n\t\tif (!$_POST || !isset($_POST['tag_id']) || !is_numeric($_POST['tag_id']))\n\t\t\treturn FALSE;\n\n\t\tif (Check::isStringEmptyOrNull($_POST['tag_value']) \n\t\t\t|| Check::isStringEmptyOrNull($_POST['slug'])\n\t\t\t|| Check::isStringEmptyOrNull($_POST['post_count'])\n\t\t\t|| Check::isStringEmptyOrNull($_POST['created_by'])\n\t\t\t)\n\t\t \treturn FALSE;\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "f403b41d4a3a33097579e51d418701c3", "score": "0.6249747", "text": "public static function isBlank($value) : bool\n {\n return $value === null || $value === '' || $value === [] ;\n }", "title": "" }, { "docid": "6c8c2e260a2d2d22bffe78d757fa0713", "score": "0.6245269", "text": "public function isEmpty()\n {\n $properties = get_object_vars($this);\n $properties = AttributeFilter::notEmpty($properties);\n return empty($properties);\n }", "title": "" }, { "docid": "6c8c2e260a2d2d22bffe78d757fa0713", "score": "0.6245269", "text": "public function isEmpty()\n {\n $properties = get_object_vars($this);\n $properties = AttributeFilter::notEmpty($properties);\n return empty($properties);\n }", "title": "" }, { "docid": "d780abf6cb2aa85ed732d53a7a13de3a", "score": "0.6242244", "text": "function is_empty_data($datas, $fields) {\n foreach ($fields as $field) {\n if (!empty($datas[$field])) return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "65e70197faea60e764d67a3ecc8fe7e8", "score": "0.6237921", "text": "function blankCheck() {\n\tfor($i = 0; $i < func_num_args(); $i++) {\n\t\tif (($_POST[func_get_arg($i)] == '')/* OR ($_POST[func_get_arg($i)] === 0)*/) {\n\t\t\tresponse(233, '必填项中含有空值');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "96163470514751117cc317d401ab5931", "score": "0.623433", "text": "protected function IsEmpty()\n\t\t{\n\t\t\treturn( $this->Count() == 0 );\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9e8948d41d0eaf6dbd9bd079ed4a99ab", "score": "0.62334234", "text": "function comprobarinputobligatorios($input) {\n\t\tfor ($i=0;$i<count($input);$i++) {\n\t\t\tif ($_POST[$input[$i]] == \"\") {\n\t\t\t\t$false = \"1\";\n\t\t\t}\n\t\t }\n\t\t if (!$false) {\n\t\t return true;\n\t\t }ELSE{\n\t\t return false;\n\t\t }\n\t\t}", "title": "" }, { "docid": "12091560d583701c9e40320d23b5f415", "score": "0.6224283", "text": "public function ResetValues(){\n // Loop through all the fields\n foreach($this->fields as $name=>$field){\n $this->Set('value', $name, '');\n $this->Set('error', $name, '');\n }\n\n return true;\n }", "title": "" }, { "docid": "2a11a8bddabb420d1baacf77c02d47d9", "score": "0.62234795", "text": "function is_blank($value) \n{\n return !isset($value) || trim($value) === '';\n}", "title": "" }, { "docid": "11a2575f309e5c076dce18a1c70742eb", "score": "0.62214655", "text": "function isEmptyfield($str) {\n\t\t$returnstring='';\n\t\tif(count($str)>0)\n\t\t\tforeach($str as $fieldname=>$fieldvalue)\n\t\t\t\tif(trim($fieldvalue)==NULL)\n\t\t\t\t\t$returnstring.='<strong>&bull; '.$fieldname.':</strong> You must enter a valid '.$fieldname.'. <br/>';\n\t\t\t\telse\n\t\t\t\t\t$returnstring.='';\n\t\treturn $returnstring;\n\t}", "title": "" }, { "docid": "80b5ad302ca20378f327834b66a90163", "score": "0.62210804", "text": "public function isEmpty()\n {\n return (empty($this->integratorKey) || empty($this->email) || empty($this->password));\n }", "title": "" }, { "docid": "09bb58a9db336ba7e1bdb80749a25df2", "score": "0.6216087", "text": "public function notEmpty();", "title": "" }, { "docid": "9f41ae7dac3afe6743c6384631c83e97", "score": "0.6214999", "text": "function is_array_empty($data, $excepton = array()){\n\t\t$data_empty = true;\n\n\t\t// this is a multi\n\t\tif( is_array($data[0]) ):\n\t\t\tforeach($data as $items):\n\t\t\t\tforeach($items as $item => $value):\n\t\t\t\t\tif( !empty($value) && !in_array($item, $excepton) ) // prove me wrong -> the value is there and the item is not a country field\n\t\t\t\t\t\t$data_empty = false;\n\n\t\t\t\t\tendforeach;\n\t\t\t\tendforeach;\n\t\t\telseif( is_array($data) ):\n\t\t\t\tforeach($data as $item => $value):\n\t\t\t\t\tif( !empty($value) && !in_array($item, $excepton) ) // prove me wrong -> the value is there and the item is not a country field\n\t\t\t\t\t\t$data_empty = false;\n\n\t\t\t\t\tendforeach;\n\t\t\t\tendif;\n\n\n\t\t\treturn $data_empty;\n\n\n\t}", "title": "" }, { "docid": "de3636bd3e19f4aafbef9057eeb6a909", "score": "0.6211729", "text": "public function isValid(){\n\n return ($this->isEmpty())? false : true;\n }", "title": "" }, { "docid": "de3636bd3e19f4aafbef9057eeb6a909", "score": "0.6211729", "text": "public function isValid(){\n\n return ($this->isEmpty())? false : true;\n }", "title": "" }, { "docid": "5b3114fc716155a70661749eaab96947", "score": "0.6198903", "text": "public function check_empty() {\n\t\t$this->check['empty'] = TRUE;\n\t}", "title": "" }, { "docid": "9604dde974cab4ef9e87ef8f4a77e5de", "score": "0.61928964", "text": "protected function isValueEmpty(mixed $value): bool\n {\n return false;\n }", "title": "" }, { "docid": "6af24b580444081e59b2a99254935afb", "score": "0.61893034", "text": "function empty() {\n return empty($this->data);\n }", "title": "" }, { "docid": "6f58894c845cc1b39728542017b18eb3", "score": "0.6176624", "text": "public function isEmpty()\n {\n return !$this->id || !$this->type;\n }", "title": "" }, { "docid": "4a5813f95ec88264af929343245e680f", "score": "0.61684406", "text": "private function validate()\n {\n $valid = true;\n foreach ( $this->fdata['elements'] as $k => $v ) \n {\n if ( $_POST[$k] == '' && $v['mand'] )\n {\n $this->fdata['elements'][$k]['error'] = true;\n $this->fdata['elements'][$k]['class'] = 'error';\n $valid = false;\n }\n }\n return $valid;\n }", "title": "" } ]
de9967d40ba1c07fca83070d0f58ddc3
Check to see if AverageCustomerReview is set.
[ { "docid": "071078f7863671ca4640d8baf2a9e371", "score": "0.8915548", "text": "public function isSetAverageCustomerReview()\n {\n return !is_null($this->_fields['AverageCustomerReview']['FieldValue']);\n }", "title": "" } ]
[ { "docid": "9980e1f9db167123d3de7a626532759b", "score": "0.68524504", "text": "public function setAverageCustomerReview($value)\n {\n $this->_fields['AverageCustomerReview']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "399618cf773e880db79a359273db58a8", "score": "0.68168", "text": "public function isSetNumberOfCustomerReviews()\n {\n return !is_null($this->_fields['NumberOfCustomerReviews']['FieldValue']);\n }", "title": "" }, { "docid": "6d51c5ac88117f493c1d8bb8d28ca8e9", "score": "0.64913714", "text": "public function getAverageCustomerReview()\n {\n return $this->_fields['AverageCustomerReview']['FieldValue'];\n }", "title": "" }, { "docid": "a2de9dd38ab809be02e80a8e2ce43dc7", "score": "0.63012624", "text": "public function withAverageCustomerReview($value)\n {\n $this->setAverageCustomerReview($value);\n return $this;\n }", "title": "" }, { "docid": "329f059ec9213b9c776c9f55c8939693", "score": "0.574628", "text": "function wc_review_ratings_enabled() {\n\t\treturn wc_reviews_enabled() && 'yes' === get_option( 'woocommerce_enable_review_rating' );\n\t}", "title": "" }, { "docid": "daaf280bca89cbfa4b01b2f3dfb89eec", "score": "0.56955266", "text": "public function isAlreadyReviewed($customerId)\n {\n if (!$this->BModuleRegistry->isLoaded('Sellvana_ProductReviews')) {\n return false;\n }\n return $this->Sellvana_ProductReviews_Model_Review->loadWhere(['product_id' => $this->id, 'customer_id' => (int)$customerId]);\n }", "title": "" }, { "docid": "5c283b8dce83ee71ba5cbfac98fcec00", "score": "0.5655475", "text": "public function has_reviews() {\n\t\treturn get_post_meta( get_the_ID(), reviwer_wp()->option_names->get_review_box_visibility(), true );\n\t}", "title": "" }, { "docid": "1b80f3a420ebd9b876d4dd28846e80bc", "score": "0.5603147", "text": "public function isRatingEnabled()\n {\n return Mage::getStoreConfigFlag('productreviews/general/rating_enabled');\n }", "title": "" }, { "docid": "66b5ecc9e13b2fb91e20009a8388b3a8", "score": "0.5577183", "text": "public function testGetRatingAverage()\n {\n $oRev = oxNew('oxreview');\n $oRev->setId('_testrev1');\n $oRev->oxreviews__oxobjectid = new oxField('xxx');\n $oRev->oxreviews__oxtype = new oxField('oxarticle');\n $oRev->oxreviews__oxrating = new oxField(3);\n $oRev->save();\n\n $oRev = oxNew('oxreview');\n $oRev->setId('_testrev2');\n $oRev->oxreviews__oxobjectid = new oxField('xxx');\n $oRev->oxreviews__oxtype = new oxField('oxarticle');\n $oRev->oxreviews__oxrating = new oxField(1);\n $oRev->save();\n\n $oRev = oxNew('oxreview');\n $oRev->setId('_testrev3');\n $oRev->oxreviews__oxobjectid = new oxField('yyy');\n $oRev->oxreviews__oxtype = new oxField('oxarticle');\n $oRev->oxreviews__oxrating = new oxField(5);\n $oRev->save();\n\n $oRating = oxNew('oxRating');\n $this->assertEquals(2, $oRating->getRatingAverage('xxx', 'oxarticle'));\n $this->assertEquals(2, $oRating->getRatingCount('xxx', 'oxarticle'));\n $this->assertEquals(3, $oRating->getRatingAverage('xxx', 'oxarticle', array('yyy')));\n $this->assertEquals(3, $oRating->getRatingCount('xxx', 'oxarticle', array('yyy')));\n }", "title": "" }, { "docid": "8b915b6b351b5e722118a46ebe03c95a", "score": "0.545145", "text": "public function getAverageRating()\n {\n $q = 'SELECT AVG(`review_rating`) AS `avg_rating` FROM `shop-review_review`';\n\n try {\n $stmt = $this->connection->prepare($q);\n $stmt->execute();\n } catch (\\PdoException $e) {\n trigger_error($e->getMessage(), E_USER_ERROR);\n\n return false;\n }\n\n return $stmt->fetch(\\Pdo::FETCH_OBJ);\n }", "title": "" }, { "docid": "9b4a679a0ea40f893e3bbf74a7480839", "score": "0.5386573", "text": "public function isForReview()\n {\n return $this->for_review;\n }", "title": "" }, { "docid": "f3560b2b49a22336df56c153c5fc2caf", "score": "0.5358612", "text": "public static function addAverage(Review $review)\n {\n foreach ($review->responses as $response)\n {\n $question = $response->questions->first();\n\n // 1 - score\n // 2 - text\n // 3 - boolean (inactivated)\n // 4 - select (inactivated)\n if($question->type_id === 1)\n {\n // add question average\n $averageQuestion = $question->average;\n $averageQuestion->reviews = $averageQuestion->reviews + 1;\n $averageQuestion->total = $averageQuestion->total + $response->score;\n $averageQuestion->average = $averageQuestion->reviews === 0 ? 0 : $averageQuestion->total / $averageQuestion->reviews;\n $averageQuestion->save();\n\n // add object question average\n $objectAverageQuestion = ObjectQuestionAverage::firstOrCreate([\n 'poll_id' => $review->poll_id,\n 'question_id' => $question->id,\n 'object_id' => $review->object_id,\n 'object_type' => $review->object_type\n ]);\n\n $objectAverageQuestion->reviews = $objectAverageQuestion->reviews + 1;\n $objectAverageQuestion->total = $objectAverageQuestion->total + $response->score;\n $objectAverageQuestion->average = $objectAverageQuestion->reviews === 0 ? 0 : $objectAverageQuestion->total / $objectAverageQuestion->reviews;\n $objectAverageQuestion->save();\n }\n }\n }", "title": "" }, { "docid": "52c8efb0706a70d46840c69cb42ea5a4", "score": "0.528053", "text": "public function isCustomerDefined()\n {\n return true;\n }", "title": "" }, { "docid": "3b2490075e017311423b4ab5af6a3d6c", "score": "0.5261412", "text": "function wc_reviews_enabled() {\n\t\treturn 'yes' === get_option( 'woocommerce_enable_reviews' );\n\t}", "title": "" }, { "docid": "0a0b27628b89b8ac7c9df8d2790f3905", "score": "0.5243071", "text": "function allow_reviews() {\r\n return (boolean) \\query\\main::get_option( 'allow_reviews' );\r\n}", "title": "" }, { "docid": "804049a2ddd4c3b87bb5904731cc39fa", "score": "0.52337974", "text": "public function maybe_restrict_form() {\n\t\tglobal $post;\n\n\t\tif ( $this->is_review_status( 'closed' ) || $this->is_review_status( 'disabled' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $this->is_guest_reviews_enabled() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = wp_get_current_user();\n\t\t$user_id = ( isset( $user->ID ) ? (int) $user->ID : 0 );\n\n\t\tif ( ( edd_get_option( 'edd_reviews_only_allow_reviews_by_buyer', false ) && edd_has_user_purchased( $user_id, $post->ID ) ) || ( ! edd_get_option( 'edd_reviews_only_allow_reviews_by_buyer', false ) ) ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "6651e6fc7b69e67a363f1b74c9754583", "score": "0.5226171", "text": "public function isReviewed(): bool\n {\n return true;\n }", "title": "" }, { "docid": "59737742c03fbc7f3aaddaac886d4bfe", "score": "0.51007867", "text": "function oxygen_woocommerce_rating_visible() {\n\tglobal $product;\n\n\treturn get_data( 'shop_rating_show' ) && 'no' != get_option( 'woocommerce_enable_review_rating' ) && $product->get_average_rating() > 0;\n}", "title": "" }, { "docid": "20a891088b1fcb1da950ed53a082f7f4", "score": "0.50779307", "text": "public function isCheckoutReviewPagetagEnabled($store=''){\r\n\t\treturn $this->getConfigValue(self::CONFIG_KEY_OG_PAGETAGE_CHECKOUT_REVIEW, $store);\r\n\t}", "title": "" }, { "docid": "603167190e2f8b0575214793cbc6a0da", "score": "0.507285", "text": "public function hasAvgPingMs()\n {\n return $this->avg_ping_ms !== null;\n }", "title": "" }, { "docid": "6e4e48c8471e223d6155f99729abe20c", "score": "0.5066123", "text": "public function is_guest_reviews_enabled() {\n\t\treturn edd_get_option( 'edd_reviews_enable_guest_reviews', false );\n\t}", "title": "" }, { "docid": "9b5a3199503e3dd6d2e7fa9fdf450a1b", "score": "0.5060569", "text": "private function _processReviewObject($review)\n {\n if ($this->_isModuleDisabled($review->getStoreId())) {\n return $this;\n }\n\n $givePointsForReview = true;\n\n $oldStatusId = $review->getOrigData('status_id');\n $newStatusId = $review->getStatusId();\n $customerId = $review->getCustomerId();\n $productId = $review->getEntityPkValue();\n if (Mage::helper('points/config')->isForBuyersOnly($review->getStoreId())) {\n $givePointsForReview = $this->_hasCustomerBoughtThisProduct($customerId, $productId);\n }\n if ($givePointsForReview\n && $newStatusId == Mage_Review_Model_Review::STATUS_APPROVED\n && $customerId\n && $newStatusId != $oldStatusId\n ) {\n $customer = Mage::getModel('customer/customer')->load($customerId);\n $pointsForReview = Mage::helper('points/config')->getPointsForReviewingProduct($review->getStoreId());\n $product = Mage::getModel('catalog/product')->load($productId);\n Mage::getModel('points/api')->addTransaction(\n $pointsForReview, 'review_approved', $customer, $review, array('product_name' => $product->getName())\n );\n }\n }", "title": "" }, { "docid": "2b0963d5037726671ea2a85db0ce9466", "score": "0.50568724", "text": "private function tutorHasEnteredReview($tutor)\n {\n $profile = $tutor->profile;\n\n return $profile->status == UserProfile::PENDING && $profile->admin_status == UserProfile::REVIEW;\n }", "title": "" }, { "docid": "8c3957f3bce92713896c4ccb92c74386", "score": "0.50509125", "text": "public function isGuestAllowed()\n {\n return Mage::getStoreConfigFlag('productreviews/general/guest_allowed');\n }", "title": "" }, { "docid": "a6918501277175f07c52a3a981a5e705", "score": "0.5045207", "text": "public function is_review_poster() {\n\t\t$comment = $GLOBALS['comment'];\n\n\t\t$user = wp_get_current_user();\n\t\t$user_email = ( isset( $user->user_email ) ? $user->user_email : null );\n\n\t\tif ( $comment->comment_author_email == $user_email ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a3019ff709fd5e0cfaff0a106630cf24", "score": "0.50115746", "text": "public function have_reviews() {\n\t\tglobal $wpdb, $post;\n\n\t\t$count = $wpdb->get_var(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\tSELECT COUNT(*) AS count\n\t\t\t\tFROM {$wpdb->comments}\n\t\t\t\tWHERE comment_type = 'edd_review'\n\t\t\t\tAND comment_post_ID = %d\n\t\t\t\tAND comment_approved = '1'\n\t\t\t\t\",\n\t\t\t\t$post->ID\n\t\t\t)\n\t\t);\n\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "75fa16097a138a3a55c26cb0603598c9", "score": "0.49936557", "text": "public function getReviewedAttribute(){\n return Review::where(\"provider_id\", $this->attributes[\"id\"])\n ->where(\"user_id\", Auth::user()->id)\n ->exists();\n }", "title": "" }, { "docid": "df0862c05f84c7804998b4376397d9cd", "score": "0.4982765", "text": "protected function _isCustomerCanVoteAnswer()\n {\n return Mage::getSingleton('customer/session')->isLoggedIn()\n || Mage::helper('aw_pq2/config')->isAllowGuestRateHelpfulness()\n ;\n }", "title": "" }, { "docid": "e13346f0655feb487b4b13dd76ed2aa6", "score": "0.49639517", "text": "public function isApproved($customer): bool\n {\n /** @var \\Magento\\Framework\\Api\\AttributeValue $customAttribute */\n $customAttribute = $customer->getCustomAttribute('approve_account');\n\n if (empty($customAttribute)) {\n return true;\n }\n\n return (bool)(int)$customAttribute->getValue();\n\n }", "title": "" }, { "docid": "8726ea408db08b85dfc28375440f0f35", "score": "0.49359715", "text": "public function isAccountApproved($customer)\n {\n $customAttribute = $customer->getCustomAttribute('account_approved');\n if (empty($customAttribute)) {\n return false;\n }\n $isApprovedAccount = $customAttribute->getValue();\n if ($isApprovedAccount) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c37e1a459a2c294f5082365c92c78a33", "score": "0.49356765", "text": "public function test(\n Review $reviewInitial,\n Review $review,\n Customer $customer\n ) {\n // Preconditions\n $this->login($customer);\n /** @var CatalogProductSimple $product */\n $product = $reviewInitial->getDataFieldConfig('entity_id')['source']->getEntity();\n $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');\n $this->catalogProductView->getReviewSummary()->getAddReviewLink()->click();\n $this->catalogProductView->getReviewFormBlock()->fill($reviewInitial);\n $this->catalogProductView->getReviewFormBlock()->submit();\n $this->reviewInitial = $reviewInitial;\n // Steps\n $this->customerIndex->open();\n $this->customerIndex->getCustomerGridBlock()->searchAndOpen(['email' => $customer->getEmail()]);\n $this->customerIndexEdit->getCustomerForm()->openTab('product_reviews');\n $filter = [\n 'title' => $reviewInitial->getTitle(),\n 'sku' => $product->getSku(),\n ];\n $this->customerIndexEdit->getCustomerForm()->getTab('product_reviews')->getReviewsGrid()\n ->searchAndOpen($filter);\n $this->reviewEdit->getReviewForm()->fill($review);\n $this->reviewEdit->getPageActions()->save();\n\n return ['reviewInitial' => $reviewInitial, 'product' => $product];\n }", "title": "" }, { "docid": "3a723289e3b69eab6efa170b893c3884", "score": "0.49323326", "text": "public function hasRatings(): bool {\n return 1 <= $this->getNumberRatings();\n }", "title": "" }, { "docid": "903343ace179490c9dec991ee280083c", "score": "0.49218458", "text": "public function getReviews()\n {\n $pageSize = $this->_helper->getConfigNumberOfReviews();\n if (null === $this->_reviewsCollection) {\n $this->_reviewsCollection = $this->_reviewsFactory->create()->addStoreFilter(\n $this->_storeManager->getStore()->getId()\n )->addStatusFilter(\n \\Magento\\Review\\Model\\Review::STATUS_APPROVED\n )->addEntityFilter(\n 'product',\n $this->getProduct()->getId()\n )->setDateOrder();\n }\n\n $reviews = $this->_reviewsCollection->setPageSize($pageSize)->load()->addRateVotes();\n\n if ($reviews->getSize() == 0) {\n return false;\n }\n\n foreach ($reviews as $review) {\n $rateVotes = $review->getRatingVotes()->getItems();\n foreach ($rateVotes as $votes) {\n $vote = $votes->getValue();\n $review->setData('rating', $vote);\n }\n }\n return $reviews;\n\n }", "title": "" }, { "docid": "db37d479c18e1ee21098398c87abf924", "score": "0.48831463", "text": "public function getNumberOfCustomerReviews()\n {\n return $this->_fields['NumberOfCustomerReviews']['FieldValue'];\n }", "title": "" }, { "docid": "84254f46d32429ae9ba8342436a2adb3", "score": "0.4876851", "text": "public function getAverageReviews_get()\n {\n /* code goes here */\n }", "title": "" }, { "docid": "383d92315a038988cc62bf3c0da04021", "score": "0.48763126", "text": "public function customerUpdated(Customer $customer)\n {\n if (!$customer->email\n || !NostoTagging::isEnabled(NostoTagging::MODULE_NAME)\n ) {\n return false;\n }\n // Try to update marketing permission to all store views that has share_customer flag on\n $updatedAccounts = array();\n NostoHelperContext::runInContextForEachLanguageEachShop(function () use ($customer, &$updatedAccounts) {\n $shopGroup = Shop::getContextShopGroup();\n if ($shopGroup !== null\n && (bool)$shopGroup->active\n && (bool)$shopGroup->share_customer\n ) {\n try {\n $account = NostoHelperAccount::getAccount();\n if ($account instanceof NostoSDKAccount && $account->isConnectedToNosto()) {\n $updatedAccounts[$account->getName()] =\n self::updateMarketingPermissionInCurrentContext($customer, $account);\n }\n } catch (Exception $e) {\n NostoHelperLogger::error($e);\n }\n }\n });\n // Update marketing permission for the current context, in case it's a single store\n try {\n $account = NostoHelperAccount::getAccount();\n if ($account instanceof NostoSDKAccount\n && $account->isConnectedToNosto()\n && !array_key_exists($account->getName(), $updatedAccounts)\n ) {\n $updatedAccounts[$account->getName()] =\n self::updateMarketingPermissionInCurrentContext($customer, $account);\n }\n } catch (Exception $e) {\n NostoHelperLogger::error($e);\n }\n return $this->isAllUpdated($updatedAccounts);\n }", "title": "" }, { "docid": "776293aef3cabba5716af6bda090bfb1", "score": "0.48608208", "text": "public function hasCustomer()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a9211a34a00da99a314d95ccd787fd8c", "score": "0.4844566", "text": "public function isAllowedReview($product = null)\n {\n $isModuleEnable = $this->isModuleEnabled();\n if (!$isModuleEnable) {\n return false;\n } else {\n /* @var $customerSession Mage_Customer_Model_Session */\n $customerSession = Mage::getSingleton('customer/session');\n if (Mage::getStoreConfigFlag('catalog/review/allow_guest')) {\n return true;\n } else {\n return $customerSession->isLoggedIn();\n }\n }\n }", "title": "" }, { "docid": "3953b38a18eb219074e6add12fa8676c", "score": "0.48442376", "text": "public function show(customerRating $customerRating)\n {\n //\n }", "title": "" }, { "docid": "2210f5c4446215ae014903509832d2ff", "score": "0.4843279", "text": "public function ownerReviewsAction() {\n if (!$this->_helper->requireSubject('user')->isValid())\n return;\n\n $this->_helper->content\n ->setContentName('sitemember_review_owner-reviews')\n ->setNoRender()\n ->setEnabled();\n }", "title": "" }, { "docid": "2172fc206a4f4158e06abd287506b796", "score": "0.48284596", "text": "private function checkReviewForm() {\n $required = array('title' => 'title', 'review' => 'review');\n $this->_val->setRequired($required);\n $this->_val->matches('title', '/^[A-Za-z0-9.,+]/');\n $this->_val->matches('review', \"/^[a-zA-Z0-9?$@#\\(\\)\\'!,+\\-=_:\\.&€£*%\\s]+$/\");\n $this->_val->isInt('captcha');\n $this->_val->checkSessionMatch('captcha', 'vercode');\n $this->checkValidation();\n }", "title": "" }, { "docid": "1c67a04400e478a9620589f1bbcda9e6", "score": "0.48206463", "text": "public function canReviewPayment()\n {\n return parent::canReviewPayment() && $this->_pro->canReviewPayment($this->getInfoInstance());\n }", "title": "" }, { "docid": "e0f4f1efdaeefa661f3b3f1e7bcc08fd", "score": "0.48000398", "text": "public function review()\n {\n return true;\n }", "title": "" }, { "docid": "9757458eac9f1625911581ddf59796e4", "score": "0.47936663", "text": "private function setIgnoreValidationFlag($customer)\n {\n $customer->setData('ignore_validation_flag', true);\n }", "title": "" }, { "docid": "c74d87cc23b16d76e1a13c6aa4e7f53c", "score": "0.47874725", "text": "public function review_request() {\n\t\t// Only consider showing the review request to admin users.\n\t\tif ( ! is_super_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the user has opted out of product annoucement notifications, don't\n\t\t// display the review request.\n\t\tif ( monsterinsights_get_option( 'hide_am_notices', false ) || monsterinsights_get_option( 'network_hide_am_notices', false ) ) {\n\t\t\treturn;\n\t\t}\n\t\t// Verify that we can do a check for reviews.\n\t\t$review = get_option( 'monsterinsights_review' );\n\t\t$time = time();\n\t\t$load = false;\n\n\t\tif ( ! $review ) {\n\t\t\t$review = array(\n\t\t\t\t'time' => $time,\n\t\t\t\t'dismissed' => false,\n\t\t\t);\n\t\t\tupdate_option( 'monsterinsights_review', $review );\n\t\t} else {\n\t\t\t// Check if it has been dismissed or not.\n\t\t\tif ( ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) && ( isset( $review['time'] ) && ( ( $review['time'] + DAY_IN_SECONDS ) <= $time ) ) ) {\n\t\t\t\t$load = true;\n\t\t\t}\n\t\t}\n\n\t\t// If we cannot load, return early.\n\t\tif ( ! $load ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->review();\n\t}", "title": "" }, { "docid": "7efcadbaf40b6dd0044ef30ddc481acd", "score": "0.47789395", "text": "public function hasOnlyDefaultValues()\n {\n if ($this->arcucustid !== '') {\n return false;\n }\n\n if ($this->arstshipid !== '') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "title": "" }, { "docid": "f03bf5f940bf1cc94f19401a985cb13e", "score": "0.47532892", "text": "protected function hasRequiredData() {\n return $this->Context->activity()->elevation() > 0;\n\t}", "title": "" }, { "docid": "9ec8b688811f66ee999e86e753fdac80", "score": "0.47474906", "text": "public function canRefundToCustomerBalance()\n {\n if (!Mage::helper('gueststorecredit')->canConvertGiftCardToStoreCredit()) {\n return parent::canRefundToCustomerBalance();\n }\n\n return true;\n }", "title": "" }, { "docid": "4cf13676fdb2c1edbef9b29c002834be", "score": "0.47421032", "text": "public function hasOnlyDefaultValues()\n {\n if ($this->glmaacct !== '') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "title": "" }, { "docid": "ccdb1b13a046fb0de9efd183239efdfa", "score": "0.47191817", "text": "public function set_reviews_allowed($reviews_allowed) {\n $this->getProduct()->set_reviews_allowed($reviews_allowed);\n }", "title": "" }, { "docid": "1fdf878249e05612728ebe079cb381fb", "score": "0.4703439", "text": "public function count_reviews() {\n\t\tglobal $wpdb, $post;\n\n\t\t$count = $wpdb->get_var(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\tSELECT COUNT({$wpdb->commentmeta}.meta_value)\n\t\t\t\tFROM {$wpdb->comments}\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} ON {$wpdb->comments}.comment_ID = {$wpdb->commentmeta}.comment_id\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} mt1 ON {$wpdb->comments}.comment_ID = mt1.comment_id\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} mt2 ON ({$wpdb->comments}.comment_ID = mt2.comment_id AND mt2.meta_key = 'edd_review_reply')\n\t\t\t\tWHERE ((comment_approved = '0' OR comment_approved = '1'))\n\t\t\t\tAND {$wpdb->comments}.comment_post_ID = %d\n\t\t\t\tAND {$wpdb->comments}.comment_type IN ('edd_review')\n\t\t\t\tAND (\n\t\t\t\t\t({$wpdb->commentmeta}.meta_key = 'edd_review_approved' AND {$wpdb->commentmeta}.meta_value = '1')\n\t\t\t\t\tAND (mt1.meta_key = 'edd_review_approved'\n\t\t\t\t\tAND mt1.meta_value != 'spam')\n\t\t\t\t\tAND (mt1.meta_key = 'edd_review_approved'\n\t\t\t\t\tAND mt1.meta_value != 'trash')\n\t\t\t\t\tAND mt2.comment_id IS NULL\n\t\t\t\t)\",\n\t\t\t\t$post->ID\n\t\t\t)\n\t\t);\n\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "4b72aecb98340f68f1b2f21541af776f", "score": "0.46902046", "text": "public function isCustomer()\n {\n return $this->attributes['type'] === 'CUSTOMER';\n }", "title": "" }, { "docid": "8771f95b0129b30e33a8d58202071c16", "score": "0.46897668", "text": "function locationReviewSet($location_id, $user_id, $review, $rating){\n\t\t\n\t\tif( socialRateAdd($user_id, $location_id, SOCIAL_ENTITY_LOCATION, $rating, null) && socialCommentAdd($user_id, $location_id, SOCIAL_ENTITY_LOCATION, $review, 0)) return true;\n\t\telse return false;\n\t}", "title": "" }, { "docid": "d1c90f53cea5432701791e8e7ec2ea27", "score": "0.4657356", "text": "function getCustomerReview()\n {\n $customerId = auth()->guard('customer')->user()->id;\n\n $reviews = $this->model->where(['customer_id'=> $customerId])->with('product')->get();\n\n return $reviews;\n }", "title": "" }, { "docid": "d98d84a847561479ac5482276d99c9df", "score": "0.46571153", "text": "public static function isCustomerTaggingEnabled()\n {\n $skipped = self::read(self::SKIP_CUSTOMER_TAGGING_SWITCH);\n\n return !(bool)$skipped;\n }", "title": "" }, { "docid": "8ce9f974eae8c5f56e8a37e082560d14", "score": "0.46411946", "text": "public function isSetNumberOfOffers()\n {\n return !is_null($this->_fields['NumberOfOffers']['FieldValue']);\n }", "title": "" }, { "docid": "322115bd77ed97d840d897f7d1806517", "score": "0.46329412", "text": "public function is_top_review_box() {\n\t\treturn get_post_meta( get_the_ID(), reviwer_wp()->option_names->get_review_box_top(), true );\n\t}", "title": "" }, { "docid": "9899789e84af32d13f9823d146b71ef2", "score": "0.4604973", "text": "public function canCustomerRentBook(int $customerId = null): bool\n {\n if (empty($customerId)) {\n $customerId = $this->customerId();\n }\n\n if (empty($customerId)) {\n throw new \\RuntimeException(__('No customer is logged in'));\n }\n\n $customerBooks = $this->customerBookRepository->getByCustomerId($customerId, true);\n $maxBooks = $this->config->configKey(Config::CONFIG_MAX_BOOKS);\n \n return count($customerBooks) < $maxBooks;\n }", "title": "" }, { "docid": "54b7183ee5f14c34c7df977a978db37e", "score": "0.4604621", "text": "public function customerQualifies( \\Shop\\Models\\Customers $customer )\r\n {\r\n // Set $this->__is_validated = true if YES, user qualifies for this campaign.\r\n // throw an Exception if NO, user does not qualify.\r\n\r\n /**\r\n * is the campaign published?\r\n */\r\n if (!$this->published()) \r\n {\r\n throw new \\Exception('This campaign is not valid for today');\r\n }\r\n \r\n $period_start = null;\r\n $period_end = null;\r\n switch ($this->period_type) \r\n {\r\n \tcase \"variable\":\r\n \t $period_start = date('Y-m-d', strtotime( 'today -' . (int) $this->variable_period_days . ' days'));\r\n \t $period_end = date('Y-m-d', strtotime('tomorrow')); \t \r\n \t break;\r\n \t case \"fixed\":\r\n \t $period_start = $this->fixed_period_start;\r\n \t $period_end = $this->fixed_period_end; \t \r\n \t break;\r\n \t default:\r\n \t throw new \\Exception('Invalid period type');\r\n \t break;\r\n }\r\n \r\n // has the minimum spend amount for the qualification period been met?\r\n if (!empty($this->rule_min_spent)) \r\n {\r\n \t// Get the total amount spent by the customer during the qualification period\r\n $total = $customer->fetchTotalSpent($period_start, $period_end);\r\n if ($total < $this->rule_min_spent) \r\n {\r\n throw new \\Exception('Customer has not spent enough during the qualification period');\r\n }\r\n }\r\n \r\n /**\r\n * evaluate shopper groups against $this->groups\r\n */\r\n if (!empty($this->groups))\r\n {\r\n $groups = array();\r\n\r\n if (empty($customer->id))\r\n {\r\n // Get the default group\r\n $group_id = \\Shop\\Models\\Settings::fetch()->{'users.default_group'};\r\n if (!empty($group_id)) {\r\n $groups[] = (new \\Users\\Models\\Groups)->setState('filter.id', (string) $group_id)->getItem();\r\n }\r\n }\r\n elseif (!empty($customer->id))\r\n {\r\n $groups = $customer->groups();\r\n }\r\n \r\n $group_ids = array();\r\n foreach ($groups as $group)\r\n {\r\n $group_ids[] = (string) $group->id;\r\n }\r\n \r\n switch ($this->groups_method)\r\n {\r\n case \"none\":\r\n $intersection = array_intersect($this->groups, $group_ids);\r\n if (!empty($intersection))\r\n {\r\n // TODO Chagne the error messages!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n throw new \\Exception('You do not qualify for this campaign.');\r\n }\r\n \r\n break;\r\n case \"all\":\r\n // $missing_groups == the ones from $this->groups that are NOT in $group_ids\r\n $missing_groups = array_diff($this->groups, $group_ids);\r\n if (!empty($missing_groups))\r\n {\r\n throw new \\Exception('You do not qualify for this campaign.');\r\n }\r\n \t\r\n break;\r\n case \"one\":\r\n default:\r\n $intersection = array_intersect($this->groups, $group_ids);\r\n if (empty($intersection))\r\n {\r\n throw new \\Exception('You do not qualify for this campaign.');\r\n }\r\n \r\n break;\r\n }\r\n } \r\n\r\n /**\r\n * if we made it this far, the user qualifies\r\n */ \r\n $this->__is_validated = true;\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "cb11834dbcbef75b639d6ec4a2a0417f", "score": "0.4601639", "text": "protected function _addPointsForReview($observer)\n {\n $object = $observer->getObject();\n if (($review = $object) instanceof Mage_Review_Model_Review) {\n $this->_processReviewObject($review);\n }\n }", "title": "" }, { "docid": "f1c69cdd470b8f05a97b23722f998d0b", "score": "0.45986253", "text": "public function isCustomerPriceEnabled()\n {\n $helper = $this->getHelper();\n return ($this->getHelper()->getStoreConfig($helper::XML_PATH_PRICE_ENABLE, null, $this->getStoreId()) && $this->getSession()->IsLoggedIn());\n }", "title": "" }, { "docid": "12a5c1065e819b335f2ff361fb40256c", "score": "0.45975703", "text": "public function setNumberOfCustomerReviews($value)\n {\n $this->_fields['NumberOfCustomerReviews']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "f024ce92b77f2cce51c6c994f770743e", "score": "0.45959812", "text": "public function isSetSellerFeedbackCount()\n {\n return !is_null($this->_fields['SellerFeedbackCount']['FieldValue']);\n }", "title": "" }, { "docid": "10042512a76adbe59976a4c6ed3431a0", "score": "0.45955622", "text": "public function requiresCustomerPresent() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "462741437df0836b9f08b9f719ce19f0", "score": "0.45909333", "text": "public function issetGrossTotal(): bool\n {\n return isset($this->grossTotal);\n }", "title": "" }, { "docid": "b6f090565beaf98a9267fe58d763506e", "score": "0.45798436", "text": "function rating($rating)\n {\n return isset($rating) && $rating <= 5 && $rating >= 1;\n }", "title": "" }, { "docid": "e8ee9afc5b9159ae97859650761f85e5", "score": "0.4572103", "text": "public function isCustomerUpdateApiEnabled($store=''){\r\n\t\tif(!$store){\r\n\t\t\t$store\t=\tMage::app()->getStore();\r\n\t\t}\r\n\t\treturn Mage::getStoreConfig(self::CONFIG_KEY_CUSTOMER_UPDATE_API_ENAILED, $store);\r\n\t}", "title": "" }, { "docid": "ccfdbc8a19aea58cb1bdf67320baea65", "score": "0.45504224", "text": "public function disableReviewInvitation()\n {\n $this->customerRating = self::REVIEW_DISABLE_INVITE;\n }", "title": "" }, { "docid": "0351f7affddb4a7d3d715b4618ef8464", "score": "0.4549679", "text": "public function report(User $user, Review $review)\n {\n return ($user->id !== $review->user_id\n && !ReviewReport::reported($user->id, $review->id)->count());\n }", "title": "" }, { "docid": "d35823c9dae465f8d5138cc70e59c6e1", "score": "0.45466042", "text": "public function checkReviewRating($userId, $reviewId) {\n $queryStr = \"SELECT helpful FROM review_ratings WHERE user_id = ? AND review_id = ?\";\n $this->_registry->getObject('db')->execute($queryStr, [$userId, $reviewId]);\n return ($this->_registry->getObject('db')->affectedRows() > 0) ? true : false;\n }", "title": "" }, { "docid": "d6d204d1fd601f6c6c4806fe082c3395", "score": "0.45407906", "text": "public function display_average_rating() {\n\t\t$rating = $this->average_rating( false );\n\n\t\tif ( $rating > 0 ) {\n\t\t\techo '<div class=\"edd-reviews-rating\">';\n\t\t\techo '<span class=\"edd-reviews-average-rating-label\">' . __( 'Average rating:', 'edd-reviews' ) . '</span> ' . str_repeat( '<span class=\"dashicons dashicons-star-filled\"></span>', absint( $rating ) );\n\t\t\techo '</div>';\n\t\t}\n\t}", "title": "" }, { "docid": "de9ea156825902d2dbc89e782d6b12f1", "score": "0.45390996", "text": "public function isPaymentReviewOrderSend()\n {\n return Mage::getStoreConfig(self::CONFIG_PATH_MONYPAYMENTS_PAYMENT_REVIEW_EMAIL_SEND, Mage::app()->getStore());\n }", "title": "" }, { "docid": "5c6f4d292f7b4d1d9b1d1412fc1140f6", "score": "0.453904", "text": "public function check_author( $commentdata ) {\n\t\tif ( edd_get_option( 'edd_reviews_disable_multiple_reviews', false ) && isset( $_POST['edd_action'] ) && 'reviews_process_review' == $_POST['edd_action'] ) {\n\t\t\t$args = array(\n\t\t\t\t'author_email' => $commentdata['comment_author_email'],\n\t\t\t\t'post_id' => $commentdata['comment_post_ID'],\n\t\t\t\t'meta_key' => 'edd_review_title'\n\t\t\t);\n\n\t\t\tremove_action( 'pre_get_comments', array( $this, 'hide_reviews' ) );\n\t\t\tremove_filter( 'comments_clauses', array( $this, 'hide_reviews_from_comment_feeds_compat' ), 10, 2 );\n\t\t\tremove_filter( 'comment_feed_where', array( $this, 'hide_reviews_from_comment_feeds' ), 10, 2 );\n\n\t\t\t$comments = get_comments( $args );\n\n\t\t\tadd_action( 'pre_get_comments', array( $this, 'hide_reviews' ) );\n\t\t\tadd_filter( 'comments_clauses', array( $this, 'hide_reviews_from_comment_feeds_compat' ), 10, 2 );\n\t\t\tadd_filter( 'comment_feed_where', array( $this, 'hide_reviews_from_comment_feeds' ), 10, 2 );\n\n\t\t\tif ( $comments ) {\n\t\t\t\twp_die(\n\t\t\t\t\tsprintf( __( 'You are only allowed to post one review for this %s. Multiple reviews have been disabled.', 'edd-reviews' ), strtolower( edd_get_label_singular() ) ),\n\t\t\t\t\t__( 'Multiple Reviews Not Allowed', 'edd-reviews' ),\n\t\t\t\t\tarray( 'back_link' => true )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\treturn $commentdata;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $commentdata;\n\t\t}\n\t}", "title": "" }, { "docid": "f5526bd2f42f02bf2ddd96a836a413a8", "score": "0.45371595", "text": "private function _checkCustomer($customerId)\n {\n $customer = Mage::getModel('customer/customer')->load($customerId);\n\n return (bool)$customer->getId();\n }", "title": "" }, { "docid": "c0937cac804bac4077fe667b72ae131b", "score": "0.453615", "text": "public function isSetNumberOfOffersFulfilledByAmazon()\n {\n return !is_null($this->_fields['NumberOfOffersFulfilledByAmazon']['FieldValue']);\n }", "title": "" }, { "docid": "90daad3d077cd25454d5e7c7c421f12f", "score": "0.45245025", "text": "public function getCustomerHasDefaultBilling()\n {\n $customer = $this->getCustomer();\n return (bool)$customer->getDefaultBilling();\n }", "title": "" }, { "docid": "650ed8455f36446ee860980886b3b3ff", "score": "0.45217207", "text": "private function isRated()\n\t{\n\t\t$rate = $this->rates()->find( Request()->user()->id);\n\t\treturn $rate ? $rate->pivot->rate : 0;\n\t}", "title": "" }, { "docid": "dce350af97440ba227225c3e48eed401", "score": "0.45189613", "text": "public function hasAppliedGiftCards()\n {\n return count($this->getAppliedGiftCards()) > 0;\n }", "title": "" }, { "docid": "0848fbacf0672c52a9c7d58d67e3f187", "score": "0.45187432", "text": "public function testSuccessCustomAverageRequestWithDefaultOptions()\n {\n $gateway = $this->app[CryptocomparePriceGateway::class];\n $fsyms = ['fsym' => 'BTC', 'tsym' => 'EUR'];\n $response = $gateway->getCustomAverage($fsyms);\n $content = json_decode($response, true);\n $keysResponse = ['RAW', 'DISPLAY'];\n\n array_filter($content, function ($value, $key) use ($keysResponse) {\n $this->assertContains($key, $keysResponse);\n }, ARRAY_FILTER_USE_BOTH);\n }", "title": "" }, { "docid": "a50e6bfece5b14a1e01d706e6826498e", "score": "0.45157263", "text": "public function memberReviewsAction() {\n if (!$this->_helper->requireSubject('user')->isValid())\n return;\n\n $this->_helper->content\n ->setContentName('sitemember_review_member-reviews')\n ->setNoRender()\n ->setEnabled();\n }", "title": "" }, { "docid": "d74642040b1f4803a8353d379bb7067b", "score": "0.45120668", "text": "public function getAutoApprove()\n {\n return Mage::getStoreConfigFlag('productreviews/settings/auto_approve');\n }", "title": "" }, { "docid": "59777fa26e87f5cbf507dbba31dada32", "score": "0.44920048", "text": "public function edit(customerRating $customerRating)\n {\n //\n }", "title": "" }, { "docid": "61e5c7716fa2eb6d6354a96f244d69fd", "score": "0.44897744", "text": "public function show(ClientReview $clientReview)\n {\n //\n }", "title": "" }, { "docid": "83e2ac0b670852f4e78161a35cfc2003", "score": "0.44827673", "text": "public function set_stimulus_review ($stimulus_review) {\n $this->stimulus_review = $stimulus_review;\n }", "title": "" }, { "docid": "607d48b58ab1376fee83ddfabeed47b6", "score": "0.44695607", "text": "public function isCustomerKnown()\n {\n $client_id = $this->context->customer->getClient_id();\n\n return !empty($client_id);\n }", "title": "" }, { "docid": "bccfeef28f265d665cbae90ffb987212", "score": "0.44693092", "text": "function checkIfValid(Customer $customer, $books) {\n\treturn $customer->getAmountToBorrow() >= count($books);\n}", "title": "" }, { "docid": "0590648b80d7195a924dd516ef08752b", "score": "0.4458929", "text": "public function average_rating( $echo = true, $post_id = null ) {\n\t\tglobal $post, $wpdb;\n\n\t\t$post_id = empty( $post_id ) ? $post->ID : $post_id;\n\n\t\tif ( ! $average = wp_cache_get( $post_id, 'edd_reviews_average_rating' ) ) {\n\t\t\t$average = $wpdb->get_var( $wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\tSELECT ROUND(AVG({$wpdb->commentmeta}.meta_value),2) AS average\n\t\t\t\tFROM {$wpdb->comments}\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} ON ({$wpdb->commentmeta}.comment_id = {$wpdb->comments}.comment_ID)\n\t\t\t\tLEFT JOIN {$wpdb->posts} ON ({$wpdb->comments}.comment_post_ID = {$wpdb->posts}.ID)\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} AS mt2 ON ({$wpdb->comments}.comment_ID = mt2.comment_id AND mt2.meta_key = 'edd_review_approved')\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} AS mt3 ON ({$wpdb->comments}.comment_ID = mt3.comment_id AND mt3.meta_key = 'edd_review_reply')\n\t\t\t\tWHERE {$wpdb->commentmeta}.meta_key = 'edd_rating'\n\t\t\t\tAND {$wpdb->comments}.comment_type = 'edd_review'\n\t\t\t\tAND mt2.meta_value NOT IN ('spam', 'trash')\n\t\t\t\tAND mt3.comment_id IS NULL\n\t\t\t\tAND {$wpdb->comments}.comment_post_ID = %d\n\t\t\t\tGROUP BY {$wpdb->comments}.comment_post_ID\n\t\t\t\t\", $post_id ) );\n\n\t\t\twp_cache_set( $post_id, $average, 'edd_reviews_average_rating', 300 );\n\t\t}\n\n\t\tif ( $echo ) {\n\t\t\techo $average;\n\t\t} else {\n\t\t\treturn $average;\n\t\t}\n\t}", "title": "" }, { "docid": "7c715f56ac271ce281c2adc9a152ae14", "score": "0.44577372", "text": "public function count_ratings() {\n\t\tglobal $wpdb, $post;\n\n\t\t$count = $wpdb->get_var(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\tSELECT SUM({$wpdb->commentmeta}.meta_value)\n\t\t\t\tFROM {$wpdb->comments}\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} ON {$wpdb->comments}.comment_ID = {$wpdb->commentmeta}.comment_id\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} mt1 ON {$wpdb->comments}.comment_ID = mt1.comment_id\n\t\t\t\tLEFT JOIN {$wpdb->commentmeta} mt2 ON ({$wpdb->comments}.comment_ID = mt2.comment_id AND mt2.meta_key = 'edd_review_reply')\n\t\t\t\tWHERE ((comment_approved = '0' OR comment_approved = '1'))\n\t\t\t\tAND comment_post_ID = %d\n\t\t\t\tAND comment_type IN ('edd_review')\n\t\t\t\tAND (\n\t\t\t\t\t({$wpdb->commentmeta}.meta_key = 'edd_review_approved' AND {$wpdb->commentmeta}.meta_value = '1')\n\t\t\t\t\tAND (mt1.meta_key = 'edd_review_approved'\n\t\t\t\t\tAND mt1.meta_value != 'spam')\n\t\t\t\t\tAND (mt1.meta_key = 'edd_review_approved'\n\t\t\t\t\tAND mt1.meta_value != 'trash')\n\t\t\t\t\tAND mt2.comment_id IS NULL\n\t\t\t\t)\",\n\t\t\t\t$post->ID\n\t\t\t)\n\t\t);\n\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "75f8c910b597efc5920ee4b4c3b73ed7", "score": "0.44554698", "text": "public function hasOnlyDefaultValues()\n {\n if ($this->reap_r_usuario !== 1) {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "title": "" }, { "docid": "52ddfa4ac83e816e6d124d8f3f0979a7", "score": "0.445363", "text": "function wd_is_review_exist( $post_id, $user_id ) {\n\tglobal $wpdb;\n\n\t$review = (bool) $wpdb->get_var( \"SELECT count(id) FROM {$wpdb->prefix}book_review_rating WHERE post_id=$post_id AND user_id=$user_id\");\n\n\treturn $review;\n}", "title": "" }, { "docid": "07a21bfd33592ca3b45f304c6c85fa07", "score": "0.44514802", "text": "public function isProvisional()\n {\n return $this->getGuesttype() == 'Customer'\n && $this->getProvisionalbooking()\n && $this->getProvisionalbooking()->getId()\n && !$this->isCancelled();\n }", "title": "" }, { "docid": "fc0a0fce788cf58dd3aead6ed7eaf7e1", "score": "0.44264337", "text": "public function countAvgRatings($source=\"amazon\"){\n\t\t$books = $this->bookbeatjson->getBooks();\n\t\t$avgratings=0;\n\t\tforeach ($books as $book){\n\t\t\tif (isset($book->{\"isbn\"}) && isset($book->{$source}->{\"avg_ratings\"})){\n\t\t\t\t$avgratings++;\n\t\t\t}\t\t\t\t\n\t\t}\n\t\treturn $avgratings;\t\t\n\t}", "title": "" }, { "docid": "970d4b7fc31c2b76fe6ec6bc4ce3fdd1", "score": "0.4422918", "text": "function anony_comment_rating_get_average_ratings( $id ) {\n\t$comments = get_approved_comments( $id );\n\n\tif ( $comments ) {\n\t\t$i = 0;\n\t\t$total = 0;\n\t\tforeach( $comments as $comment ){\n\t\t\t$rate = get_comment_meta( $comment->comment_ID, 'rating', true );\n\t\t\tif( isset( $rate ) && '' !== $rate ) {\n\t\t\t\t$i++;\n\t\t\t\t$total += $rate;\n\t\t\t}\n\t\t}\n\n\t\tif ( 0 === $i ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn round( $total / $i, 1 );\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "9dfc575d2f6c82a1e233fd00fb048d2d", "score": "0.44214454", "text": "public function isRated()\n {\n return $this->rating()\n ->where('user_id', auth('api')->id())\n ->exists();\n }", "title": "" }, { "docid": "2a65a29d1e8d9222b86b6615bcde396c", "score": "0.44090363", "text": "public function hasProfile()\n {\n return $this->customer;\n }", "title": "" }, { "docid": "8dc489c404c735fde266730c644ec719", "score": "0.4405013", "text": "public function canReviewPayment()\n {\n return $this->getMethodInstance()->canReviewPayment();\n }", "title": "" }, { "docid": "3373ca9170f7cc695b3e266af5cb5479", "score": "0.4403102", "text": "public function isProductTestReview($product)\n {\n return $product->getAttributeSetId() == $this->getTestReviewSetId();\n }", "title": "" }, { "docid": "1187c49e73c331bbaededd40120d6347", "score": "0.44015256", "text": "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->item_type !== 'dokeos_document') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->min_score !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->max_score !== 100) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->parent_item_id !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->previous_item_id !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->next_item_id !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->display_order !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->max_time_allowed !== '') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4dbd656863ecb2506ad378560239e745", "score": "0.43990898", "text": "public function isSetSellerReviewEnrollmentPaymentEventList()\n {\n return !empty($this->_fields['SellerReviewEnrollmentPaymentEventList']['FieldValue']);\n }", "title": "" }, { "docid": "3d365a54536829806782cf13a021e3ec", "score": "0.43940866", "text": "function maybe_adjust_for_anonymous( $data ) {\n\n\t// If the key isn't present in the data, do not do anything.\n\tif ( empty( $data['woocommerce_review_rating_verification_required'] ) ) {\n\t\treturn;\n\t}\n\n\t// If this key is in the data, we make sure the \"allow anonymous\" is turned off.\n\tdelete_option( Core\\OPTION_PREFIX . 'allow_anonymous' );\n}", "title": "" } ]
b756ddc94cf2480d2290e70fd5aab1a1
Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree.
[ { "docid": "0808c28b2fb19d31cc795f9105fad6c9", "score": "0.0", "text": "public function getOrderHint()\n {\n return $this->orderHint;\n }", "title": "" } ]
[ { "docid": "f95ac2e00b8d60497ac023c191747e16", "score": "0.594207", "text": "public function getCategoryPower(): int\n {\n if ($parent = $this->findCategory(static::CATEGORY_FLAT)) {\n $category = $this->findCategory(static::CATEGORY_POWER, (int)$parent->id);\n\n return $category ? (int)$category->id : 0;\n }\n\n return 0;\n }", "title": "" }, { "docid": "9d5662d04517ae987768c3a8c08de296", "score": "0.5606547", "text": "function category_pos() {\n\t// projde kategorie shopu v DB a vytvori souvisle rady z poradi \n\t// v jednotlivych kategoriich a podkategoriich\n\t$posititon = 0;\n\t\n\t$query = \"SELECT id, id_parent FROM \".T_CATEGORIES.\" \n\tWHERE \".SQL_C_LANG.\" ORDER BY id_parent, position\";\n\t$v = my_DB_QUERY($query,__LINE__,__FILE__);\n\t\n\twhile ($z = mysql_fetch_array($v)) {\n\t\tif ($last_parent == $z['id_parent']) {\n\t\t\t$posititon++;\n\t\t}\n\t\telse {\n\t\t\t$posititon = 1;\n\t\t\t$last_parent = $z['id_parent'];\n\t\t}\n\t\t\n\t\t$query2 = \"UPDATE \".T_CATEGORIES.\" SET position = $posititon \n\t\tWHERE id = \".$z['id'].\" AND \".SQL_C_LANG.\"\";\n\t\tmy_DB_QUERY($query2,__LINE__,__FILE__);\n\t\n\t}\n\n}", "title": "" }, { "docid": "92e252a81f718bc99892b25b7d8d8167", "score": "0.5538087", "text": "function getPriority() {\n\t\tif(!$this->owner->getField('Priority')) {\n\t\t\t$parentStack = $this->owner->parentStack();\n\t\t\t$numParents = is_array($parentStack) ? count($parentStack) - 1: 0;\n\t\t\treturn max(0.1, 1.0 - ($numParents / 10));\n\t\t} elseif($this->owner->getField('Priority') == -1) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn $this->owner->getField('Priority');\n\t\t}\n\t}", "title": "" }, { "docid": "fd9e0b3e45737e192a412f49a4ee2db6", "score": "0.5463738", "text": "public function determineSortPrice()\r\n {\r\n return 0;\r\n }", "title": "" }, { "docid": "b342b77c6e354ca91acc20f95d446226", "score": "0.53332293", "text": "function getOrder()\n {\n return 50;\n }", "title": "" }, { "docid": "4df2e9d8c071ae324bedfe6b3937e812", "score": "0.52117187", "text": "function getCompLevel() {\n\n\t\t\tif( $loadAvg = $this->_loadAvgLinux()) {\n\t\t\t} elseif( $loadAvg = $this->_loadAvgBSD()) {\n\t\t\t} else\t$loadAvg\t= $this->_loadAvgUnix();\n\n\t\t\tif( $loadAvg ) {\n\t\t\t\t$cl\t\t= ( 1 - $loadAvg ) * 10;\n\t\t\t\t$level\t= ( int ) max( min( 9, $cl ), 0 );\n\t\t\t} else {\n\t\t\t\t$level\t= 3;\n\t\t\t}\n\n\t\t\treturn $level;\n\t\t}", "title": "" }, { "docid": "04757b7cd5e7486bf24aa1409855fb0a", "score": "0.51585597", "text": "public function getOrder(): ?float\n {\n return 1;\n }", "title": "" }, { "docid": "9cca767605df7318c0f3d7322dbda9b1", "score": "0.5139244", "text": "public function get_sortFactor()\n {\n return $this->get(self::SORTFACTOR);\n }", "title": "" }, { "docid": "b85fdadde83290c1a02698433becf571", "score": "0.50948197", "text": "public function getCategoryFare(): int\n {\n if ($parent = $this->findCategory(static::CATEGORY_OTHER)) {\n $category = $this->findCategory(static::CATEGORY_FARE, (int)$parent->id);\n\n return $category ? (int)$category->id : 0;\n }\n\n return 0;\n }", "title": "" }, { "docid": "89fc4f621aaf0cf45968714f6ade20e7", "score": "0.49966744", "text": "public function getOrder()\n {\n return 100;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.49871987", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.49871987", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.49871987", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.49871987", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.49871987", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.49871987", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.49871987", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "2646fb238962d2725fc26af327b2bd47", "score": "0.49766454", "text": "function getOrder()\n {\n return 51;\n }", "title": "" }, { "docid": "8cc6e37cdbd78b32b034524353aa76de", "score": "0.49712986", "text": "public function getRootCategoryId()\n {\n return self::CATEGORY_ROOT_ID;\n }", "title": "" }, { "docid": "4066fa22909b7af76aaeb33e8f00d28a", "score": "0.4970454", "text": "public function getNewOrdering($categoryId) \n {\n $ordering = 1;\n $this->_db->setQuery('SELECT MAX(ordering) FROM #__jdownloads_files WHERE cat_id='.(int)$categoryId);\n $max = $this->_db->loadResult();\n $ordering = $max + 1;\n return $ordering;\n }", "title": "" }, { "docid": "931f5e6226bd4eb0d6a8c3ffd516be45", "score": "0.4967143", "text": "public function getOrder(): int\n\t{\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "d0c28c9d7f5b450be324c2d8bfeee49f", "score": "0.49635044", "text": "public function kodeKategori()\n {\n $this->db->select('RIGHT(tb_kategori.IdKategori,4) as Kode', FALSE);\n $this->db->order_by('IdKategori', 'DESC');\n $this->db->limit(1);\n $query = $this->db->get('tb_kategori');\n if ($query->num_rows() <> 0) {\n $data = $query->row();\n $Kode = intval($data->Kode) + 1;\n } else {\n $Kode = 1;\n }\n $KodeMax = str_pad($Kode, 4, \"0\", STR_PAD_LEFT);\n $KodeKategori = \"ID-KTG-\" . $KodeMax;\n return $KodeKategori;\n }", "title": "" }, { "docid": "bb8f7bd788b42afaf2a60923a26a6402", "score": "0.49599385", "text": "public function getRuleCategories () {\r\n \t$tempCategories = Array();\r\n \t$dbCategories = new Application_Model_DbTable_Categories();\r\n \t// first get the parent category (note: need to find out if this can be o1)\r\n \t\r\n \t$parentCategory = $this->getCategory();\r\n \t\r\n \t$categories[] = array(\"key\"=> \"^C-\".$parentCategory->letter.\"^\", \"value\"=> $parentCategory->getLabel().\"-Left Side\");\r\n \t\r\n \t// now get children -- a little trickier, because we need to keep track of occurrence.\r\n \t$ruleTransforms = $this->getRuleTransform();\r\n \t\r\n \tforeach ($ruleTransforms as $transform) {\r\n \t\t//first build array of categories so we know which ones are multiples\r\n \t\tif (isset($tempCategories[$transform->category_id])) {\r\n \t\t\t$tempCategories[$transform->category_id][\"totalCount\"] = $tempCategories[$transform->category_id][\"totalCount\"] + 1;\r\n \t\t} else {\r\n \t\t\t$tempCategories[$transform->category_id] = array(\"totalCount\" => 1);\r\n \t\t}\r\n \t}\r\n \t\r\n \t// okay, go through again, this time adding to categories array\r\n \tforeach ($ruleTransforms as $transform) {\r\n \t\t$occuranceCount = 0;\r\n \t\t// get the category\r\n \t\t$category = $dbCategories->find($transform->category_id)->current();\r\n \t\t\r\n \t\t// check $tempCategories to see if there are multiple\r\n \t\tif ($tempCategories[$category->category_id][\"totalCount\"] > 1) {\r\n \t\t\t$occuranceCount = $tempCategories[$category->category_id][\"totalCount\"]-1;\r\n \t\t\t$tempCategories[$category->category_id][\"totalCount\"] = $occuranceCount;\r\n \t\t\t$occurrenceText = \"-o\".$occuranceCount;\r\n \t\t} else {\r\n \t\t\t$occurrenceText =\"\";\r\n \t\t}\r\n \t\t\r\n \t\tif ($category->isRewritable()) {\r\n \t\t\t$keyName = \"^C-\".$category->letter.\"^\";\r\n \t\t\t$displayName = $category->getLabel();\r\n \t\t} else {\r\n \t\t\t$keyName = \"^Name-\".$category->letter.$occurrenceText.\"^\";\r\n \t\t\t$displayName = $category->getLabel();\r\n \t\t}\r\n\r\n \t\t$categories[] = array(\"key\" => $keyName, \"value\" => $displayName);\t\r\n \t\t \t\t\r\n \t}\r\n \t \r\n \treturn($categories);\r\n }", "title": "" }, { "docid": "cd2cd79777ee1cca3c48dd8c9bbaa122", "score": "0.49460614", "text": "function sortByLevel($a,$b){\n\t\n\t\tif ($a[\"N\"] == $b[\"N\"])\n\t\t\treturn 0;\n\n\t\treturn ($a[\"N\"] > $b[\"N\"]) ? -1 : 1;\n\t\t\n\t}", "title": "" }, { "docid": "139a3e976d16344e088c4789a3bbf61a", "score": "0.4939873", "text": "public function recalculateTree() {\n $px = $this->Database->DatabasePrefix;\n\n // Update the child counts and reset the depth.\n $sql = <<<SQL\nupdate {$px}Category c\njoin (\n\tselect ParentCategoryID, count(ParentCategoryID) as CountCategories\n\tfrom {$px}Category\n\tgroup by ParentCategoryID\n) c2\n\ton c.CategoryID = c2.ParentCategoryID\nset c.CountCategories = c2.CountCategories,\n c.Depth = 0;\nSQL;\n $this->Database->query($sql);\n\n // Update the first pass of the categories.\n $this->Database->query(<<<SQL\nupdate {$px}Category p\njoin {$px}Category c\n\ton c.ParentCategoryID = p.CategoryID\nset c.Depth = p.Depth + 1\nwhere p.CategoryID = -1 and c.CategoryID <> -1;\nSQL\n );\n\n // Update the child categories depth-by-depth.\n $sql = <<<SQL\nupdate {$px}Category p\njoin {$px}Category c\n\ton c.ParentCategoryID = p.CategoryID\nset c.Depth = p.Depth + 1\nwhere p.Depth = :depth;\nSQL;\n\n for ($i = 1; $i < 25; $i++) {\n $this->Database->query($sql, ['depth' => $i]);\n\n if (val('RowCount', $this->Database->LastInfo) == 0) {\n break;\n }\n }\n }", "title": "" }, { "docid": "84edbc831155a5cd19ad7cdd97b91fbb", "score": "0.4937335", "text": "public function GetRenderedCategoryTree()\n {\n $aFilterCategories = $this->GetOptions();\n $oTree = TShopCategoryTree::GetCategoryTree();\n $oTree->ResetCounter();\n foreach ($aFilterCategories as $sCategoryId => $sCategoryCount) {\n $oTree->AddItemCount($sCategoryId, $sCategoryCount);\n }\n if (is_array($this->aActiveFilterData) && count($this->aActiveFilterData) > 0) {\n $oTree->MarkActiveCategories($this->aActiveFilterData);\n }\n $sRenderedCategoryTree = $oTree->Render($this->id, true, true);\n\n return $sRenderedCategoryTree;\n }", "title": "" }, { "docid": "d6a5fad1e9ba106fa15734c3e560a3fe", "score": "0.49365243", "text": "public function CatNum() {\n\treturn $this->GetFieldValue('CatNum');\n }", "title": "" }, { "docid": "b36afd8b82804c395e3d5dd42f193728", "score": "0.49350643", "text": "private function getSortOrder()\n {\n if ($this->getDefaultCategorySorting() === CategorySorting::NOSTO_PERSONALIZED_KEY) {\n return NostoSortOrder::CMP_VALUE;\n }\n return $this->getDefaultCategorySorting();\n }", "title": "" }, { "docid": "eb947e9791eef4c4ec2f88eece58897c", "score": "0.49341315", "text": "public static function set_global_depth() {\n if (isset($GLOBALS['cPath']) && !Text::is_empty($GLOBALS['cPath'])) {\n $GLOBALS['category_depth']\n = (count($GLOBALS['category_tree']->get_children($GLOBALS['current_category_id'])) > 0)\n ? 'nested'\n : 'products';\n } else {\n $GLOBALS['category_depth'] = 'top';\n }\n }", "title": "" }, { "docid": "4baa7d238284f3c53a69c9456a53b8ab", "score": "0.49237114", "text": "function saveCategoryOrder()\n {\n global $objDatabase;\n\n if ($_POST['categories']) {\n $categories = contrexx_input2db($_POST['categories']);\n foreach ($categories as $sort => $value) {\n $sort++;\n $id = explode('_', $value);\n $query = \"UPDATE \".DBPREFIX.\"module_data_categories\n SET `sort` = \".$sort.\"\n WHERE `category_id` = \".$id[1];\n $objDatabase->Execute($query);\n }\n } else {\n header(\"HTTP/1.0 500 Internal Server Error\");\n return;\n }\n }", "title": "" }, { "docid": "32c07168d5a27bfb60263ada7178cdfb", "score": "0.49116376", "text": "public function getOrder()\n {\n return 1; // LoadCategory doit avoir lieu avant LoadAdvert\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.4898335", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.4898335", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.4898335", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.4898335", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.4898335", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "ef2559182d5529f19ecc340ff6ffbb4b", "score": "0.48961082", "text": "public function getSortCategories() {\n\t\t$db = JFactory::getDBO();\n\t\t$csvilog = JRequest::getVar('csvilog');\n\t\t\n\t\t/* Get all categories */\n\t\t$query = \"SELECT LOWER(category_name) AS category_name, category_child_id as cid, category_parent_id as pid\n\t\t\t\tFROM #__vm_category, #__vm_category_xref WHERE\n\t\t\t\t#__vm_category.category_id=#__vm_category_xref.category_child_id \";\n\t\t\n\t\t/* Execute the query */\n\t\t$db->setQuery($query);\n\t\t\n\t\t$records = $db->loadObjectList();\n\t\t$categories = array();\n\t\t\n\t\t/* Group all categories together according to their level */\n\t\tforeach ($records as $key => $record) {\n\t\t\t$categories[$record->pid][$record->cid] = $record->category_name;\n\t\t}\n\t\t\n\t\t/* Sort the categories and store the item list */\n\t\tforeach ($categories as $id => $category) {\n\t\t\tasort($category);\n\t\t\t$listorder = 1;\n\t\t\tforeach ($category as $category_id => $category_name) {\n\t\t\t\t/* Store the new sort order */\n\t\t\t\t$q = \"UPDATE #__vm_category\n\t\t\t\t\tSET list_order = '\".$listorder.\"'\n\t\t\t\t\tWHERE category_id = '\".$category_id.\"'\";\n\t\t\t\t$db->setQuery($q);\n\t\t\t\t$db->query();\n\t\t\t\tJRequest::setVar('currentline', JRequest::getInt('currentline', 0)+1);\n\t\t\t\t$csvilog->AddStats('information', \"Saved category \".$category_name.\" with order \".$listorder);\n\t\t\t\t$listorder++;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5344b91ace04d8f8df5552c8015969a9", "score": "0.48830268", "text": "public function addCategory(){\n //update category\n if ($this->type == 0) {\n $this->updated_date = date('Y-m-d H:i:s');\n $this->save(false);\n return $this->cateory_id;\n }\n //add sub category\n if ($this->type == 1) {\n $parentCat = Category::findOne(['cateory_id' => $this->idParent]);\n $category = new Category();\n $category->name = $this->name;\n $category->parent_id = $this->idParent;\n $category->level = $parentCat->level + 1;\n $category->save();\n return $category->cateory_id;\n }\n // add root category\n if ($this->type == 2) {\n $categoryRoot = new Category();\n $categoryRoot->name = $this->name;\n $categoryRoot->parent_id = 0;\n $categoryRoot->level = 1;\n\n $categoryRoot->save();\n return $categoryRoot->cateory_id;\n }\n }", "title": "" }, { "docid": "9cd8add52a5c0cad5a448a7a7f25c5d5", "score": "0.488117", "text": "public function order()\n {\n return 114;\n }", "title": "" }, { "docid": "6a15a8f06b2452cc85667f3f3dd8c339", "score": "0.48772502", "text": "protected function cmpCategory( $a, $b ) {\n\t\t$a_k = isset( $a['category'] ) ? $a['category'] : '*';\n\t\t$b_k = isset( $b['category'] ) ? $b['category'] : '*';\n\t\t$a_category_weight = isset( $a['category_weight'] ) ? $a['category_weight'] : 0;\n\t\t$b_category_weight = isset( $b['category_weight'] ) ? $b['category_weight'] : 0;\n\n\t\treturn $a_category_weight == $b_category_weight ? strcmp( $a_k, $b_k ) : $a_category_weight - $b_category_weight;\n\t}", "title": "" }, { "docid": "2bd0cbdfc9ad93d919fae930197e2bcf", "score": "0.4873439", "text": "public function valueParentsPayment()\n {\n return $this->parentCount() * $this->value_for_parent;\n }", "title": "" }, { "docid": "bcac4b263efb39acfd83743f18a8c6f7", "score": "0.48663056", "text": "public function getOrder() {\n return 0;\n }", "title": "" }, { "docid": "3047a671ea1d91ed2f803401849500a7", "score": "0.48646307", "text": "function getSort(){\n return 155;\n }", "title": "" }, { "docid": "3047a671ea1d91ed2f803401849500a7", "score": "0.48646307", "text": "function getSort(){\n return 155;\n }", "title": "" }, { "docid": "253d3231bcb952fb3abc3df08533059c", "score": "0.4864507", "text": "public function order()\n {\n return 108;\n }", "title": "" }, { "docid": "4fbece696716e489ae6329f2a99a2ed1", "score": "0.4859943", "text": "public function getCategoryDepth($catId)\n {\n $catId = (int) $catId;\n $DB = Antz::registry('db');\n if($catId == 0)return 0;\n return $DB->oneValue($this->tablename, 'depth', \"id = '{$catId}'\");\n }", "title": "" }, { "docid": "386a166579321571b1310c30830934f1", "score": "0.48582032", "text": "public function getOrder()\n {\n return 20;\n }", "title": "" }, { "docid": "386a166579321571b1310c30830934f1", "score": "0.48582032", "text": "public function getOrder()\n {\n return 20;\n }", "title": "" }, { "docid": "386a166579321571b1310c30830934f1", "score": "0.48582032", "text": "public function getOrder()\n {\n return 20;\n }", "title": "" }, { "docid": "386a166579321571b1310c30830934f1", "score": "0.48582032", "text": "public function getOrder()\n {\n return 20;\n }", "title": "" }, { "docid": "bf7c88f175ebd9a9660ad300e9da2e19", "score": "0.48566034", "text": "public function parentCategoryTotals()\n\t{\n // Saves us database calls\n $teamCategories = $team->categories->pluck('title', 'id')->toArray();\n // Build Array of Totals By Category\n $transactionsForLoop = $team->transactions()\n ->filter($request->all())\n ->orderBy('date', 'desc')\n ->get();\n $categoryTotals = [];\n foreach($transactionsForLoop as $transaction){\n $categoryId = $transaction->category_id;\n $categoryName = 'Uncategorized';\n if($categoryId && isset($teamCategories[$categoryId])) $categoryName = $teamCategories[$categoryId];\n // First Trans. in this cat, use this trans. amount\n if(!isset($categoryTotals[$categoryName])){\n $categoryTotals[$categoryName] = $transaction->amount;\n } else { // add this to the running total for cat.\n $categoryTotals[$categoryName] += $transaction->amount;\n }\n }\n\n\t}", "title": "" }, { "docid": "f1966d00c584d6a69377644358bbb705", "score": "0.48521045", "text": "public function renderCategoryTree()\r\n {\r\n return $this->categoryManager->getCategoriesTree();\r\n }", "title": "" }, { "docid": "4554bfe71ae2d4c5aa49c6a737a6b6cf", "score": "0.48489758", "text": "function getSort() {\r\n\t\treturn 100;\r\n\t}", "title": "" }, { "docid": "a994d53d62debd096e3345ce83458906", "score": "0.48480883", "text": "public function getSortOrder()\n {\n return 21;\n }", "title": "" }, { "docid": "7a5c4554ae2dc8b66ef84f8388de5e71", "score": "0.48429346", "text": "public function showDecimal()\n {\n return $this->scopeConfig->isSetFlag(\n self::XML_PATH_PHPCUONG_PRICEDECIMAL_SHOW_DECIMAL,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "c860c547cc735a40b6a32478577a87bc", "score": "0.48369214", "text": "public function getCurrencyValue()\r\n\t\t{\r\n\t\t\treturn 1;\r\n\t\t}", "title": "" }, { "docid": "d1da1787e5256ccf7b7d3d0f7d13875e", "score": "0.483466", "text": "public function setSortOrder()\n {\n parent::setSortOrder($this->maxCategoryPosition - $this->item->getPosition());\n }", "title": "" }, { "docid": "4f6196f3ba69cd3a177c082854d10988", "score": "0.48277038", "text": "public function getLevel($parentCategoryId)\n {\n// Log::debug('parentCategoryId: '.$parentCategoryId);\n if(empty($parentCategoryId) ){\n return 1;\n }\n $parentCategory = $this->repository->find($parentCategoryId);\n return ++$parentCategory->level;\n }", "title": "" }, { "docid": "572b234b68084626565b0dceb6af392e", "score": "0.4827223", "text": "public function getCategoryId() {\n return $this->catid==null ? 1 : $this->catid;\n }", "title": "" }, { "docid": "1fe21a9ffadf3c863babb2612ab08719", "score": "0.48254347", "text": "public function getStoreTreeCommissionMoney()\n {\n return $this->store_tree_commission_money;\n }", "title": "" }, { "docid": "0674397fbcbb2c4d5e37c1c82525faf0", "score": "0.480689", "text": "function getOrder($pid) {\n $this->db->select_max('sort_order');\n $this->db->where('parent_id', intval($pid));\n $query = $this->db->get('category');\n $sort_order = $query->row_array();\n return $sort_order['sort_order'] + 1;\n }", "title": "" }, { "docid": "b24dbef834a77a5a3f93f41c0bd01519", "score": "0.4802479", "text": "public function totalCategory()\n {\n return $this->category->getAll()->count();\n }", "title": "" }, { "docid": "ee959b2953e284955cd6640bb5b67459", "score": "0.48014745", "text": "public function getOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "ee959b2953e284955cd6640bb5b67459", "score": "0.48014745", "text": "public function getOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "ee959b2953e284955cd6640bb5b67459", "score": "0.48014745", "text": "public function getOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "ee959b2953e284955cd6640bb5b67459", "score": "0.48014745", "text": "public function getOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "ee959b2953e284955cd6640bb5b67459", "score": "0.48014745", "text": "public function getOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "ee959b2953e284955cd6640bb5b67459", "score": "0.48014745", "text": "public function getOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "fe36ba4365a2cebbc1b6125864bf460a", "score": "0.48003083", "text": "public function categoryTree()\n {\n return $this->categoryService->getTree();\n }", "title": "" }, { "docid": "e45cb5f1ac750e12fb30e383e3b487f3", "score": "0.47774458", "text": "function getSort(){\n return 100;\n }", "title": "" }, { "docid": "fc58cc6b52a8c9302bb12de7258418c1", "score": "0.47764024", "text": "public function getOrder()\r\n {\r\n return 10;\r\n }", "title": "" }, { "docid": "c77829dffb263328665d0cea7183eb17", "score": "0.47741902", "text": "function getSort() {\n return 190;\n }", "title": "" }, { "docid": "d0d33c23fb2600ce11b03a39d314f60b", "score": "0.4769882", "text": "function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "5107a088df886d4ed11e9ef95c7282b1", "score": "0.4766684", "text": "private function getDefaultOrderCol()\n {\n return true === $this->isAdmin()? 1 : 0;\n }", "title": "" }, { "docid": "0d2e1a7462d249657db34c044b21fe91", "score": "0.4763824", "text": "public function getSort() {\n return 30;\n }", "title": "" }, { "docid": "a8ccbf2a18238bf84074168240016d21", "score": "0.47599244", "text": "function getSort(){\n return 100;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.47578555", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.47578555", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.47578555", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.47578555", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "01a290a482fb0ec639b43c4deb941877", "score": "0.4756295", "text": "function articles_view_sortbyroot ($a,$b)\n{\n if ($GLOBALS['artviewcatinfo'][$a]['root'] == $GLOBALS['artviewcatinfo'][$b]['root']) {\n return articles_view_sortbyleft($a,$b);\n }\n return ($GLOBALS['artviewcatinfo'][$a]['root'] > $GLOBALS['artviewcatinfo'][$b]['root']) ? 1 : -1;\n}", "title": "" }, { "docid": "6287cb38997a7587e020185c3e6cb7ce", "score": "0.47525385", "text": "function getOrder()\n {\n return 700;\n }", "title": "" }, { "docid": "4e60cd389a86e54c96522a69598ef9f6", "score": "0.47392562", "text": "public function getOrder()\n {\n if ($this->previousElement === null) {\n return 1;\n } else {\n return ($this->previousElement->getOrder() + 1);\n }\n\n }", "title": "" }, { "docid": "d2c1ef3ea25820f02c5b47a2a2a8c3fe", "score": "0.4735838", "text": "function getOrder ()\n {\n return 1;\n }", "title": "" }, { "docid": "fe0376fb9be2bde438ce7e66288f0655", "score": "0.4722842", "text": "public function getOrder()\n {\n return 1200;\n }", "title": "" }, { "docid": "d622f248da04fe3f52fbdaaae84b4c21", "score": "0.47218207", "text": "function getOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "9269ef7cbe5bc25687deab82a216278e", "score": "0.47061145", "text": "protected function totalCategories() {\n\n return $this->taxonomy->count();\n }", "title": "" }, { "docid": "6fca394c3509b70fd925db28b7dbf426", "score": "0.4703838", "text": "public function priority()\n\t{\n\t\t$days = $this->days();\n\n\t\tif(is_null($days))\n\t\t\t$days = $this->frequency;\n\n\t\t//Base priority is the number of days since it was done\n\t\t//divided by the frequency it should be done.\n\t\t$priority = $days / $this->frequency;\n\t\t\n\t\t//The priority needs to be altered depending on it's importance\n\t\t$importance = $this->importance() / 2;\n\t\t$priority = $priority * ($importance / 10.0 + 1);\n\n\t\treturn number_format($priority, 2);\n\t}", "title": "" }, { "docid": "f664d9163deef4621b50b6dfacf8eb7f", "score": "0.4701068", "text": "public function getChildrenOrderDirection()\n {\n return $this->childrenOrderDirection;\n }", "title": "" }, { "docid": "6902d7bd76be59a2089b1640c3dd9ae5", "score": "0.46946967", "text": "function tx_commerce_leafCategoryData()\t{\n\t\tglobal $LANG, $BACK_PATH;\n\n\t\t$this->title='Category';//$LANG->sL('LLL:EXT:commerce/lib/locallang.php:category',1);\n\n\t\t$this->table='tx_commerce_categories';\n\t\t$this->parentTable='tx_commerce_categories';\n\t\t$this->parentField='';\n\t\t$this->mm_field='parent_category';\n\t\t$this->mm_table='tx_commerce_categories_parent_category_mm';\n\t\t$this->clause=' AND NOT deleted ORDER BY sorting,title';\n\t\t$this->fieldArray = Array('uid','title','navtitle');\n\t\t$this->defaultList = 'uid,pid,tstamp,sorting';\n\t}", "title": "" }, { "docid": "8bb8f4e93c49b55b47b2ee96e5951d49", "score": "0.46905166", "text": "public function last(): ?\\SengentoBV\\CdiscountMarketplaceSdk\\Structs\\CdiscountCategoryTree\n {\n return parent::last();\n }", "title": "" }, { "docid": "3c27d623034254ebbcb603a34b11f320", "score": "0.4672914", "text": "function pricessCategories($parent,$level)\r\n{\r\n if (!defined('CURRENCY_val')) define('CURRENCY_val',1);\r\n\t$out = array();\r\n\t$cnt = 0;\r\n\r\n\t$q1 = db_query(\"select categoryID, name, hurl from \".CATEGORIES_TABLE.' where parent='.$parent.' AND enabled=1 ORDER BY '.CONF_SORT_CATEGORY.' '.CONF_SORT_CATEGORY_BY) or die (db_error());\r\n\twhile ($row = db_fetch_row($q1))\r\n\t{\r\n\t\t//add category to the output\r\n\t\t$out[$cnt][0] = $row[0];\r\n\t\t$out[$cnt][1] = $row[1];\r\n\t\t$out[$cnt][2] = $level;\r\n\t\tif ($level > 0) {$out[$cnt][3] = CONF_MIDDLE_COLOR;} else {$out[$cnt][3] = CONF_DARK_COLOR;}\r\n\t\t$out[$cnt][4] = 0; //0 is for category, 1 - product\r\n\t\tif ($row[2] != \"\") {$out[$cnt][6] = REDIRECT_CATALOG.\"/\".$row[2];} else {$out[$cnt][6] = \"index.php?categoryID=\".$row[0];}\r\n\t\t$cnt++;\r\n\r\n\t\t//add products\r\n \r\n\t\t$q = db_query(\"select productID, name, Price, hurl, in_stock, product_code from \".PRODUCTS_TABLE.\" where categoryID=\".$row[0].\" and Price>0 and enabled=1 order by \".CONF_SORT_PRODUCT.' '.CONF_SORT_PRODUCT_BY ) or die (db_error());\r\n\t\twhile ($row1 = db_fetch_row($q))\r\n\t\t {\r\n\t\t\tif ($row1[2] <= 0)\r\n\t\t\t\t$row1[2]= \"n/a\";\r\n\t\t\telse\r\n\t\t\t\t$row1[2] = show_price($row1[2]/CURRENCY_val);\r\n\r\n\t\t\t//add product to the output\r\n\t\t\t$out[$cnt][0] = $row1[0];\r\n\t\t\t$out[$cnt][1] = $row1[1];\r\n\t\t\t$out[$cnt][2] = $level;\r\n\t\t\t$out[$cnt][3] = CONF_LIGHT_COLOR;\r\n\t\t\t$out[$cnt][4] = 1; //0 is for category, 1 - product\r\n\t\t\t$out[$cnt][5] = $row1[2];\r\n\t\t\tif ($row1[3] != \"\") {$out[$cnt][6] = REDIRECT_PRODUCT.\"/\".$row1[3];} else {$out[$cnt][6] = \"index.php?productID=\".$row1[0];}\r\n\t\t\t$out[$cnt][7] = $row1[4];\r\n\t\t\t$out[$cnt][8] = $row1[5];\r\n\t\t\t$cnt++;\r\n\r\n\t\t }\r\n\r\n\t\t//process all subcategories\r\n\t\t$sub_out = pricessCategories($row[0], $level+1);\r\n\r\n\t\t//add $sub_out to the end of $out\r\n\t\tfor ($j=0; $j<count($sub_out); $j++)\r\n\t\t{\r\n\t\t\t$out[] = $sub_out[$j];\r\n\t\t\t$cnt++;\r\n\t\t}\r\n \t}\r\n\r\n\treturn $out;\r\n\r\n}", "title": "" }, { "docid": "2b60bf761d73da256b22a38f1281ba61", "score": "0.4669957", "text": "public function calulcateOrderTotal()\n {\n \n }", "title": "" }, { "docid": "a0e1bb7d8f205295a9e0516950c83111", "score": "0.46655685", "text": "public function getOrder()\n {\n return 5;\n }", "title": "" }, { "docid": "a0e1bb7d8f205295a9e0516950c83111", "score": "0.46655685", "text": "public function getOrder()\n {\n return 5;\n }", "title": "" }, { "docid": "a0e1bb7d8f205295a9e0516950c83111", "score": "0.46655685", "text": "public function getOrder()\n {\n return 5;\n }", "title": "" }, { "docid": "07c7329a52de4bbb366d9574c85e2da0", "score": "0.46542126", "text": "public function getNavDepth() {\n return (int)c('Vanilla.Categories.NavDepth', 0);\n }", "title": "" }, { "docid": "bacddff5e7c931a8312f3b860da7b769", "score": "0.46480128", "text": "public function getCategoryId(): int\n {\n return $this->categoryId;\n }", "title": "" }, { "docid": "14592ebe637dfec4bd0f9482d725f96c", "score": "0.46431994", "text": "function getSort(){\n return 200;\n }", "title": "" }, { "docid": "8d7a791f8e4708c185e47c51838ae050", "score": "0.46378827", "text": "public function getOrder()\n {\n return 101;\n }", "title": "" }, { "docid": "499f1e598c25c8a33936d8bac791e539", "score": "0.46364582", "text": "public function getOrder() {\n // the lower the number, the sooner that this fixture is loaded\n return 1;\n }", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "292dce0fb25f89abb8c64bf979c1cafd", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('auth');\n }", "title": "" } ]
[ { "docid": "173dfa3d2c43c121d2999bbac59bd02a", "score": "0.80462193", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $this->call('make:controller', array_filter([\n 'module' => $this->getModule()['key'],\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $this->argument('name') : null,\n '--api' => $this->option('api'),\n '--querybuilder' => $this->option('querybuilder')\n ]));\n }", "title": "" }, { "docid": "271ca9b8e926903001f4cddda1e8934b", "score": "0.7937227", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('mappweb:make-controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n ]);\n }", "title": "" }, { "docid": "8de597aaa0579156990513f6c3f4f014", "score": "0.78758895", "text": "protected function createController()\r\n {\r\n $this->geamGenerate('controller');\r\n }", "title": "" }, { "docid": "f51695fb6049452a2fef7c0ab718ba95", "score": "0.7781493", "text": "protected function createController(): void\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--requests' => $this->option('requests') || $this->option('all'),\n '--container' => $this->option('container')\n ]));\n }", "title": "" }, { "docid": "15d5429e9249d1a3ab48a87d16d5b6a2", "score": "0.76958287", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "4e344abafb3daad1c379c51f89ef784d", "score": "0.7432941", "text": "protected function makeController()\n {\n $this->handleMeta();\n\n if ($this->filesystem->exists($path = $this->getPath($this->meta['class']))) {\n $confirm = $this->ask('you want to replace your controller ? [y] /', 'N');\n if($confirm == 'y')\n {\n $this->filesystem->delete($path);\n } else {\n return $this->error($this->meta['name'] . ' ' . $this->type . ' is aborded!');\n }\n }\n\n $this->makeDirectory($path);\n\n $this->filesystem->put($path, $this->compileControllerStub());\n\n $this->phpCsFixer->fix($path);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "6814871bdb6f8d91f6d863bacc689705", "score": "0.739726", "text": "public function createController()\n {\n return $this->validateController($this->controller, $this->action);\n }", "title": "" }, { "docid": "108dd1a993b29c33d7de679603ad3238", "score": "0.72959983", "text": "protected function createController(): self\n {\n $path = app_path(\"Http/Controllers/{$this->moduleClass}/{$this->singularClass}Controller.php\");\n $stub = $this->getStub('model/controller');\n\n $this->files->put($path, $this->replacePlaceholders($stub));\n $this->info('Model controller created');\n\n return $this;\n }", "title": "" }, { "docid": "21f25ba6b5e1b2f9e06f3264d3c16587", "score": "0.7200859", "text": "public function createController(){ if (class_exists($this->controller)){\n $parents = class_parents($this->controller);\n //does the class extend the controller class?\n if (in_array(\"BaseController\", $parents)){\n //does the class contain the requested method?\n if (method_exists($this->controller, $this->action)){\n return new $this->controller($this->action,$this->url_values);\n }else{\n $this->has_error =true;\n return MessageHandler::error('Invalid action');\n }\n }else{\n $this->has_error =true;\n return MessageHandler::error('Invalid controller');\n }\n }else{\n $this->has_error =true;\n return MessageHandler::error('Controller not existing!');\n }\n }", "title": "" }, { "docid": "78fb141452c021e73d6621a668ecd153", "score": "0.7194267", "text": "protected function makeController() {\n\t\t$cg = new ControllerGenerator($this->files, $this->command);\n\t\t$cg->generate($this->name, $this->schema);\n\t}", "title": "" }, { "docid": "cda5a4cfd3158f3568dcfbf30501ba0c", "score": "0.7157658", "text": "public function CreateController() {\n\t\t//does the class exist?\n\t\tif (class_exists($this->controller)) {\n\t\t\t$parents = class_parents($this->controller);\n\t\t\t//does the class extend the controller class?\n\n\t\t\tif (method_exists($this->controller,$this->action)) {\n\t\t\t\treturn new $this->controller($this->action,$this->urlvalues);\n\t\t\t} else {\n\t\t\t\t//bad method error\n\t\t\t\treturn new Error(\"badUrl\",$this->urlvalues);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t//bad controller error\n\t\t\treturn new Error(\"badUrl\",$this->urlvalues);\n\t\t}\n\t}", "title": "" }, { "docid": "9b2339223d9d4e08b5a5fdc48a931f54", "score": "0.69759357", "text": "public function createController(){\n\n\t\t\t/**\n\t\t\t * Check if controller class exists\n\t\t\t */\n\n\t\tif(class_exists($this->controller)){\n\t\t\t\n\t\t\t/**\n\t\t\t * Assign an array with the name of the parent classes of the given class.\n\t\t\t */\n\t\t\t\n\t\t\t $parents = class_parents($this->controller);\n\t\t\t \n\t\t\t/**\n\t\t\t * Check if class in question extends controller class\n\t\t\t */\n\n\t\t\tif(in_array(\"Controller\", $parents)){\n\n\t\t\t\t/**\n\t\t\t\t * Check if a controller or action method exists within class \n\t\t\t\t */\n\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * @return object Return a new controller object \n\t\t\t\t\t * @param string The second parameter in the URL\n\t\t\t\t\t * @param array Stores the controller, action and id based on the URL \n\t\t\t\t\t */\n\n\t\t\t\t\treturn new $this->controller($this->action, $this->request,$this->id);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Summary\n\t\t\t\t\t * Method does not exist\n\t\t\t\t\t * \n\t\t\t\t\t * Description\n\t\t\t\t\t * Redirects users to the 404 page if there is no corrosponding method to be called \n\t\t\t\t\t */\n\n\t\t\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * Summary \n\t\t\t\t * Base controller does not exist\n\t\t\t\t * \n\t\t\t\t * Description\n\t\t\t\t * Redirects users to the 404 page if the corrosponding controller does not exist\n\t\t\t\t */\n\n\t\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t\t}\n\t\t} else {\n\t\t\n\t\t\t/**\n\t\t\t * Summary\n\t\t\t * Controller class does not exist\n\t\t\t * \n\t\t\t * Description\n\t\t\t * Redirects users to the 404 page if corresponding class does not exist\n\t\t\t */\n\n\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t}\n\t}", "title": "" }, { "docid": "dc15096626e56d54e0cb62f9bc7d69f5", "score": "0.6845808", "text": "public static function create($controllerName)\n {\n $fileName = ucfirst($controllerName) . 'Controller.php';\n $className = \"app\\controllers\\\\\" . ucfirst($controllerName) . 'Controller';\n $filePath = './app/controllers/' . $fileName;\n require_once($filePath);\n if (!class_exists($className)) {\n throw new Exception(\"Class $className not founded!\");\n }\n return new $className();\n }", "title": "" }, { "docid": "89733bc05db4f3c92b8f4c437e9c1340", "score": "0.68361187", "text": "function &createInstance($controller)\n\t{\n\t\tatkdebug(\"atkcontroller::createInstance() \".$controller);\n\t\t//First check if another controller is active. If so make sure this\n\t\t//controller will use atkOutput to return output\n\t\t$currentController = atkController::getInstance();\n\t\tif(is_object($currentController))\n\t\t$currentController->setReturnOutput(true);\n\n\t\t//Now create new controller\n\t\t$controller = &atkController::_instance($controller, true);\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "92898f69b4c66915e6304c974764d7ea", "score": "0.68149567", "text": "public function useController()\n {\n // Require the controller\n require_once('../app/controllers/' . $this->currentController . '.php');\n\n // Instantiate controller class\n $this->currentController = new $this->currentController;\n }", "title": "" }, { "docid": "4097d4198a1dff708b62c949425ca696", "score": "0.6770579", "text": "protected function createController($controller,$action,$params) {\n $object = new $controller();\n call_user_func_array(array($object, $action), $params);\n }", "title": "" }, { "docid": "9b33775ef28976a2b27da340b07a1696", "score": "0.67380685", "text": "public static function make()\n {\n return new ControllerRequest();\n }", "title": "" }, { "docid": "cdaabb3243a1bb88c50cae3e7294116f", "score": "0.67047995", "text": "public function create()\n {\n // Estou utilizando uma outra tela de seleção ou cliente ou colaborador em AuxController\n }", "title": "" }, { "docid": "0898017955242f243f6c338b98925715", "score": "0.6617061", "text": "public static function instanceController(string $contoller) : object\n {\n $objContoller = \"App\\\\Controllers\\\\\" . $contoller;\n\n return new $objContoller;\n }", "title": "" }, { "docid": "0488e0fc3eb4fd3d3976b169952b3afe", "score": "0.65683293", "text": "public function loadController()\n {\n //create Crontroler name\n $name = $this->request->controller . \"Controller\";\n $file = ROOT . 'Controllers/' . $name . '.php';\n\n if (!file_exists($file)) {\n header(\"HTTP/1.1 404 Not Found\");\n exit();\n }\n\n //require class\n require($file);\n\n //initiate class\n $controller = new $name();\n\n return $controller;\n }", "title": "" }, { "docid": "1c558ee9e298d7548b802de6c1fa2ed3", "score": "0.65385497", "text": "protected function createController($params)\n {\n $currentPath = $this->container->get('app.context')->getModules($this->module);\n $modulesPath = $this->container->get('app.context')->getModulesPath();\n $namespace = substr($currentPath, strlen($modulesPath));\n //creo el nombre del controlador con el sufijo Controller\n $controllerName = $this->contShortName . 'Controller';\n //uno el namespace y el nombre del controlador.\n $controllerClass = str_replace('/', '\\\\', $namespace . 'Controller/') . $controllerName;\n\n try {\n $reflectionClass = new ReflectionClass($controllerClass);\n } catch (\\Exception $e) {\n throw new NotFoundException(sprintf(\"No exite el controlador \\\"%s\\\" en el Módulo \\\"%sController/\\\"\", $controllerName, $currentPath), 404);\n }\n\n $this->controller = $reflectionClass->newInstanceArgs(array($this->container));\n $this->setViewDefault($this->action);\n\n return array($this->controller, $this->action, $params);\n }", "title": "" }, { "docid": "02bd8c3ae81871f15337ca5bf36784cc", "score": "0.6527491", "text": "public function __construct()\n {\n $CONTROLLER_PATH = '../app/controllers/';\n\n // turn arguments from url after /public/ into array, where \n // [0] - controllers name\n // [1] - method name\n // [2..n] - arguments\n $url = $this->parseUrl();\n\n if (isset($url[0])) {\n if (file_exists($CONTROLLER_PATH . $url[0] . '.php')) {\n $this->controller = $url[0];\n unset($url[0]);\n }\n }\n\n require_once($CONTROLLER_PATH . $this->controller . '.php');\n\n // create a new object identified by its name \n $this->controller = new $this->controller;\n\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // save the rest of parameters into params\n $this->params = $url ? array_values($url) : [];\n\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "287e73ab51ae5f5ed5433fe3f9e9dcff", "score": "0.6526465", "text": "public function getController() {\n $page = $this->getPage();\n switch ($page) {\n case \"overview\":\n return new OverviewController();\n \n case \"addDummy\":\n default:\n return new OverviewController();\n \n }\n \n \n }", "title": "" }, { "docid": "3a693593064e4c5786a26a77fe6ffe4a", "score": "0.6518577", "text": "private function createObjFromFile(){\n\t\t\n\t\t\n\t\t$this->controller = new $this->controller;\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "1636e8507ca192826ee2c865e5e860a8", "score": "0.64963824", "text": "protected function createApiController(): self\n {\n $path = app_path(\"Http/Controllers/Api/{$this->singularClass}Controller.php\");\n $stub = $this->getStub('model/apiController');\n\n $this->files->put($path, $this->replacePlaceholders($stub));\n $this->info('Model API controller created');\n\n return $this;\n }", "title": "" }, { "docid": "860f1221cf9e7f33ca2f7d14a8352a4d", "score": "0.64851624", "text": "protected function generateController()\n {\n $translatableName = $this->translator->translate($this->argument('name'));\n $namespace = $this->getNamespace(true, $translatableName->toModelName());\n $path = $this->getPath($namespace);\n $target = \"$path/{$translatableName->toRepositoryName()}Controller.php\";\n\n // Render and create repository controller if not exists\n if (!$this->filesystem->exists($target)) {\n $this->renderTemplate('controller_class.txt', $target, [\n 'NAMESPACE' => $namespace,\n 'CLASSNAME' => \"{$translatableName->toRepositoryName()}Controller\",\n 'REPOSITORY' => \"Eloquent{$translatableName->toRepositoryName()}Repository\"\n ]);\n } else {\n $this->error(\"Controller for repository '{$translatableName->toRepositoryName()}Repository' already exists.\");\n }\n }", "title": "" }, { "docid": "ea3d1242a35f89fa036c9d15fc71bee1", "score": "0.6478574", "text": "private function generateController()\n {\n // Figure out the naming\n $controller = Str::plural(ucfirst($this->argument('model')));\n $path = 'app/Http/Controllers/Admin/'.$controller.'.php';\n $file = base_path().'/'.$path;\n\n // Copy the stub over\n if (!file_exists(dirname($file))) {\n mkdir(dirname($file), 0744, true);\n }\n if (file_exists($file)) {\n return $this->comment('Controller already exists: '.$path);\n }\n file_put_contents($file, str_replace('{{controller}}', $controller, file_get_contents($this->stubs.'/controller.stub')));\n $this->info('Controller created: '.$path);\n }", "title": "" }, { "docid": "c88508a31c4f7137cb1f32863e76ff2f", "score": "0.64593387", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n\n $organizationId = $GLOBALS['DS_CONFIG']['organization_id'];\n\n // Call the worker method\n $results = CreateNewUserService::addActiveUser(\n $organizationId,\n $this->args[\"envelope_args\"],\n $this->clientService);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Create a new user\",\n \"Admin API data response output:\",\n \"Results from Users:createUser:\",\n json_encode(($results->__toString()))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "97aa4f9f04258807de5b92717b3203a6", "score": "0.6453595", "text": "public function testCreateController()\n {\n $router = new Route('stdclass', 'stdClass');\n\n $controllerClass = $router->createController();\n\n $this->assertEquals('stdClass', get_class($controllerClass));\n }", "title": "" }, { "docid": "8770562d3bf1c23b3024e35fc387ed0e", "score": "0.64533633", "text": "public static function instantiateController( $class )\n {\n $controller = new $class();\n\n return $controller;\n }", "title": "" }, { "docid": "2801a9234e783d115aae92da3c727892", "score": "0.6442282", "text": "public function testInstantiatingController()\n {\n global $config;\n\n $action = new Action( 'indexAction' );\n\n $controller = new HomeController();\n $controller->setDispatcher( new Dispatcher() );\n $controller->addDefaultListeners( $config );\n $controller->setAction( $action );\n\n $this->assertNotNull( $controller );\n }", "title": "" }, { "docid": "da43cde9358641e0b19a7ba29a51735d", "score": "0.6391873", "text": "private function getController()\n {\n return $this->buildMockedController(ConsoleController::class, [$this->config]);\n }", "title": "" }, { "docid": "2844b870664f9dded954d2ad081e20af", "score": "0.6387934", "text": "private function registerControllerFactory()\n {\n \\Amvisie\\Core\\ControllerBuilder::current()->setControllerFactory(new \\Demo\\MyControllerFactory($this->injector));\n }", "title": "" }, { "docid": "94707d8abdcdfd2ec282538b44f008c7", "score": "0.6383847", "text": "private function getControllerInstance()\r\n {\r\n if (!class_exists($this->request->getClass()))\r\n {\r\n throw new NotFoundException('404 Not Found!');\r\n }\r\n $class = $this->request->getClass();\r\n return new $class($this->request, $this->response);\r\n }", "title": "" }, { "docid": "d4dd9e84a5f86fc7490df8e54abdd41b", "score": "0.63834715", "text": "protected function getControllerInstance($controllerClassName, Trace $trace)\n\t{\n\t\treturn new $controllerClassName;\n\t}", "title": "" }, { "docid": "16c77d99cc459739e4bbd5af7508ae2b", "score": "0.6378039", "text": "public function __construct() {\n $module = routing::getModule();\n $action = routing::getAction();\n\n // Require controller class\n require_once \"controller/${module}.php\";\n\n $controllerName = $module . 'Controller';\n if (empty($action))\n $action = $controllerName::$defaultAction;\n\n $actionName = $action . 'Action';\n\n $controller = new $controllerName();\n $controller->$actionName();\n }", "title": "" }, { "docid": "e32b447ea14c9d53dbcf5806204eb746", "score": "0.6364178", "text": "public function initController()\n {\n $controllerNamespace = $this->buildControllerNamespace();\n $this->setParam('namespace', $controllerNamespace);\n\n // throw exception if no controller class found\n if (!class_exists($controllerNamespace)) {\n throw new \\RuntimeException(sprintf('Controller [%s] not found.', $controllerNamespace), 404);\n }\n\n // check if controller class has parent controller\n if (!isset(class_parents($controllerNamespace)[Controller::class])) {\n throw new \\RuntimeException('Controller must be extending the base controller!', 400);\n }\n\n return new $controllerNamespace($this->app);\n }", "title": "" }, { "docid": "577df751ec34d0c1ff25889ffa48882f", "score": "0.6322067", "text": "function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = GetClickwrapsService::getClickwraps($this->args, $this->clientService);\n\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Get a list of clickwraps\",\n \"Get a list of clickwraps\",\n \"Results from the ClickWraps::getClickwraps method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "387dfa2364e9a29d5cddaf3d655d83da", "score": "0.6294272", "text": "static function create_controller($controller, $action){\n\n\t\t$application = Router::get_active_app();\n\n\t\t$interactive_message = \"Est&aacute; tratando de acceder a un controlador que no existe.\n\t\tKumbia puede codificarlo por usted:\n\t\t<form action='\".KUMBIA_PATH.\"$application/builder/create_controller/$controller/$action' method='post'>\n\t\t <table>\n\t\t \";\n\t\t\t$db = db::raw_connect();\n\t\t\tif($db->table_exists($controller)){\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' checked name='kind' value='standardform'></td>\n\t\t\t\t<td>Deseo crear un controlador StandardForm de la tabla '$controller'</td>\n\t\t\t\t</tr>\";\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='applicationcontroller'></td>\n\t\t\t\t<td>Deseo crear un controlador ApplicationController</td>\n\t\t\t\t</tr>\";\n\t\t\t} else {\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='applicationcontroller'></td>\n\t\t\t\t<td>Deseo crear un controlador ApplicationController</td>\n\t\t\t\t</tr>\";\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='standardform'/></td>\n\t\t\t\t<td>Deseo crear un controlador StandardForm de la tabla '$controller'</td>\n\t\t\t\t</tr>\";\n\t\t\t}\n\n\t\t$interactive_message.=\"</table>\n\t\t\".submit_tag(\"Aceptar\").\"\n\t\t<a href='#' onclick='this.parentNode.style.display=\\\"\\\"; return false'>Cancelar</a>\n\t\t</form>\";\n\t\tFlash::interactive($interactive_message);\n\t}", "title": "" }, { "docid": "d5ceecf6fad8f2ccff9081ad1d56ae16", "score": "0.6285556", "text": "function loadController(){\n\t\t$name = ucfirst($this->request->controller).'Controller';\n\t\t//inclure le controller\n\t\t$file = ROOT.DS.'controller'.DS.$name.'.php';\n\t\trequire $file;\n\t\treturn new $name($this->request);\n\t}", "title": "" }, { "docid": "5c05f088152db433195daf3c030a54d1", "score": "0.62818384", "text": "public function getController() {\r\n $sController = ucfirst(strtolower((string) $this->_aRequest['controller']));\r\n\r\n try {\r\n # Are extensions for existing controllers available? If yes, use them.\r\n if (EXTENSION_CHECK && file_exists(PATH_STANDARD . '/app/extensions/controllers/' . $sController . '.controller.php')) {\r\n require_once PATH_STANDARD . '/app/extensions/controllers/' . $sController . '.controller.php';\r\n\r\n $sClassName = '\\CandyCMS\\Controllers\\\\' . $sController;\r\n $this->oController = new $sClassName($this->_aRequest, $this->_aSession, $this->_aFile, $this->_aCookie);\r\n }\r\n\r\n # There are no extensions, so we use the default controllers\r\n elseif (file_exists(PATH_STANDARD . '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php')) {\r\n require_once PATH_STANDARD . '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php';\r\n\r\n $sClassName = '\\CandyCMS\\Core\\controllers\\\\' . $sController;\r\n $this->oController = new $sClassName($this->_aRequest, $this->_aSession, $this->_aFile, $this->_aCookie);\r\n }\r\n\r\n else {\r\n # Bugfix: Fix exceptions when upload file is missing\r\n if($sController && substr(strtolower($sController), 0, 6) !== 'upload')\r\n throw new AdvancedException('Controller not found:' . PATH_STANDARD .\r\n '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php');\r\n }\r\n }\r\n catch (AdvancedException $e) {\r\n AdvancedException::reportBoth($e->getMessage());\r\n Helper::redirectTo('/errors/404');\r\n }\r\n\r\n $this->oController->__init();\r\n return $this->oController;\r\n }", "title": "" }, { "docid": "3fcfa161f92f28bd234dcec8544a9fec", "score": "0.62801427", "text": "public function controller()\n {\n if (is_string($this->controller)\n && !is_callable($this->controller)\n && !class_exists($this->controller)\n ) {\n throw new Exception\\InvalidControllerException(sprintf(\n 'Invalid controller specified: \"%s\"',\n $this->controller\n ));\n }\n\n if (is_string($this->controller)\n && !is_callable($this->controller)\n && class_exists($this->controller)\n ) {\n $controller = $this->controller;\n $this->controller = new $controller;\n }\n\n if (!is_callable($this->controller)) {\n $controller = $this->controller;\n if (is_array($controller)) {\n $method = array_pop($controller);\n $controller = array_pop($controller);\n\n if (is_object($controller)) {\n $controller = get_class($controller);\n }\n\n $controller .= '::' . $method;\n }\n if (is_object($controller)) {\n $controller = get_class($controller);\n }\n throw new Exception\\InvalidControllerException(sprintf(\n 'Controller \"%s\" is not callable',\n $controller\n ));\n }\n\n return $this->controller;\n }", "title": "" }, { "docid": "0a49ceeeb394c1f64b577a12ec7b92c1", "score": "0.6273928", "text": "public function createController($pi, array $params)\n {\n $depends = include __DIR__ . '/depends.php';\n $container = new \\phpList\\plugin\\Common\\Container($depends);\n $page = isset($params['page']) ? $params['page'] : $params['p'];\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\Controller\\\\' . ucfirst($page);\n\n return $container->get($class);\n }", "title": "" }, { "docid": "e671f00890c8be49fcae1a0780c34135", "score": "0.62208194", "text": "public function __construct() {\n $url = $this->getUrl();\n //Check if file controller exists based on the URL from the controllers directory\n if ( file_exists('../app/controllers/' . ucwords($url[0]) . '.php') ) {\n //If controller exists, update the currentController \n $this->currentController = ucwords($url[0]); \n //unset $url[0] - Controller Name\n unset($url[0]);\n }\n // else {\n // die(\"Invalid Controller!\");\n // }\n\n //Require the controller file\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n //Instantiate a New Controller Class\n $this->currentController = new $this->currentController;\n\n //Check for the second parameter/part of the URL (i.e. the method name)\n if ( isset($url[1]) ) {\n //Check if the method exists in the controller class\n if ( method_exists($this->currentController, $url[1]) ) {\n $this->currentMethod = $url[1];\n //unset the $url[1] - Method Name\n unset($url[1]);\n }\n }\n\n //Retrieve the remaining parameters/parts of the URL\n $this->params = $url ? array_values($url) : []; \n \n //Call a callback method with parameters\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "b81aded60c440070a5eb67bf0591100f", "score": "0.6218608", "text": "private function setController()\n {\n // Create controller object\n $this->controller = new Controller($this->app);\n\n // Sitewide feed\n $this->app->match('/spaceapi/spacestate.json', array($this->controller, 'spaceapifeed'));\n\n $this->app->match('/spaceapi/spacestate', array($this->controller, 'spaceState'));\n \n $this->app->match('/spaceapi/togglestate', array($this->controller, 'toggleState'));\n \n }", "title": "" }, { "docid": "98c9023bfaf44016718eadd203b5f0e0", "score": "0.61966085", "text": "public function useController()\n {\n $args = func_get_args();\n \n // First args is always used as Controller\n $controller = $args[0];\n $real_controller = explode('@', $controller);\n \n // Other args\n $other_args = [];\n for($i = 1; $i < count($args); $i++) {\n array_push($other_args, $args[$i]);\n }\n\n $class = '\\App\\Controller\\\\' . $real_controller[0];\n $object = new $class();\n $method = $real_controller[1];\n \n if(is_array($other_args)) {\n if(count($other_args) > 0) {\n $object->$method($other_args[0]);\n } else {\n $object->$method();\n }\n }\n }", "title": "" }, { "docid": "731ac4c132b25d11301cccf4581844c3", "score": "0.6176733", "text": "public static function create($router): Controller\n {\n /*\n * --------------------------------------------------------------\n * Ensure the controller file exists and import it.\n * --------------------------------------------------------------\n */\n if (file_exists($router->controllerFile)) {\n require_once $router->controllerFile;\n } else {\n $errMsg = \"Error:: No such controller {$router->controllerFile}\";\n \n throw new InvalidControllerException($errMsg);\n }\n\n // Create and return the instance of the controller class.\n return new $router->controllerClass();\n }", "title": "" }, { "docid": "b8cf453cf0b6ad8c82139f43c158518d", "score": "0.61523783", "text": "private function createRCAController(){\r\n\t\t$route = $this->_request->getParam('controller_route');\r\n\t\t$conroller = $this->_request->getParam('controller_controller');\r\n\t\t$action = $this->_request->getParam('controller_action');\r\n\t\t$controller_type = $this->_request->getParam('controller_type');\r\n\r\n\t\t$crr = $this->_request->getParam('controller_route_regex');\r\n\t\t$ccr = $this->_request->getParam('controller_controller_regex');\r\n\t\t$car = $this->_request->getParam('controller_action_regex');\r\n\r\n\t\t$extends = $this->_request->getParam('extend_to_class');\r\n\r\n\t\t$sampleTemplate = 'sample_template.phtml';\r\n\t\t$isAdmin = false;\r\n\r\n\t\tif($controller_type == 'admin'){\r\n\t\t\t$sampleTemplate = 'admin/sample_template.phtml';\r\n\t\t\t$isAdmin = true;\r\n\t\t}\r\n\r\n\t\tif(!strlen($route)){\r\n\t\t\t$route = \"Index\";\r\n\t\t}\r\n\t\tif(!strlen($conroller)){\r\n\t\t\t$conroller = \"Index\";\r\n\t\t}\r\n\t\tif(!strlen($action)){\r\n\t\t\t$action = \"Index\";\r\n\t\t} \r\n\r\n\t\tif($route == 'system' || $route == 'System'){\r\n\t\t\t$this->returnError('400', 'System route is reserved for Opoink\\'s developer panel.');\r\n\t\t} else {\r\n\t\t\t$invalidPatternMsg = 'You will use regex for the {{path}}, but your pattern seems to be invalid. To avoid error please make sure your pattern is valid.';\r\n\t\t\tif($crr === 'yes'){\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $route)) {\r\n\t\t\t\t\t$route = 'Reg'.sha1($route);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'route', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($ccr === 'yes'){;\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $conroller)) {\r\n\t\t\t\t\t$conroller = 'Reg'.sha1($conroller);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'conroller', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($car === 'yes'){\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $action)) {\r\n\t\t\t\t\t$action = 'Reg'.sha1($action);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'action', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$conType = 'public';\r\n\t\t\t$xmlFilename = strtolower($route.'_'.$conroller.'_'.$action);\r\n\t\t\t$controllerClass = \"\\\\\".$this->vendor_name.\"\\\\\".$this->module_name.\"\\\\Controller\\\\\".ucfirst($route).\"\\\\\".ucfirst($conroller).\"\\\\\".ucfirst($action);\r\n\r\n\t\t\tif($controller_type == 'admin'){\r\n\t\t\t\t$conType = 'admin';\r\n\t\t\t\t$xmlFilename = 'admin_'.strtolower($route.'_'.$conroller.'_'.$action);\r\n\t\t\t\t$controllerClass = \"\\\\\".$this->vendor_name.\"\\\\\".$this->module_name.\"\\\\Controller\\\\Admin\\\\\".ucfirst($route).\"\\\\\".ucfirst($conroller).\"\\\\\".ucfirst($action);\r\n\t\t\t}\r\n\r\n\t\t\tif(!empty($extends)){\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/* \r\n\t\t\t\t\t * this is to try if the class to extend exists\r\n\t\t\t\t\t * if it is not injector will raise an error\r\n\t\t\t\t\t */\r\n\t\t\t\t\t$this->_di->make($extends);\r\n\t\t\t\t} catch (\\Exception $e) {\r\n\t\t\t\t\t$this->returnError('400', $e->getMessage());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->_controller->setExtends($extends);\r\n\t\t\t}\r\n\r\n\t\t\t$create = $this->_controller->setVendor($this->vendor_name)\r\n\t\t\t->setModule($this->module_name)\r\n\t\t\t->setRoute($route)\r\n\t\t\t->setController($conroller)\r\n\t\t\t->setAction($action)\r\n\t\t\t->create($conType);\r\n\r\n\t\t\tif($create){\r\n\t\t\t\t/** insert into module config */\r\n\t\t\t\tif($crr === 'yes' || $ccr === 'yes' || $car === 'yes'){\r\n\t\t\t\t\t$regexCount = 0;\r\n\t\t\t\t\twhile (isset($this->config['controllers']['regex_'.$regexCount])) {\r\n\t\t\t\t\t\t$regexCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$routerName = 'regex_'.$regexCount;\r\n\t\t\t\t\t$routerInfo = [\r\n\t\t\t\t\t\t'route' => $this->routerInfoHelper($crr, 'controller_route'),\r\n\t\t\t\t\t\t'route_regex' => $crr === 'yes' ? true : false,\r\n\t\t\t\t\t\t'controller' => $this->routerInfoHelper($crr, 'controller_controller'),\r\n\t\t\t\t\t\t'controller_regex' => $ccr === 'yes' ? true : false,\r\n\t\t\t\t\t\t'action' => $this->routerInfoHelper($crr, 'controller_action'),\r\n\t\t\t\t\t\t'action_regex' => $car === 'yes' ? true : false,\r\n\t\t\t\t\t\t'class' => $controllerClass\r\n\t\t\t\t\t];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$routerName = $xmlFilename;\r\n\t\t\t\t\t$routerInfo = $controllerClass;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->config['controllers'][$routerName] = $routerInfo;\r\n\r\n\t\t\t\t$this->_configManager->setConfig($this->config)\r\n\t\t\t\t->createConfig();\r\n\t\t\t\t/** end insert into module config */\r\n\r\n\t\t\t\t/** insert into installation config */\r\n\t\t\t\t$_config = ROOT . DS . 'etc' . DS. 'Config.php';\r\n\t\t\t\tif(file_exists($_config)){\r\n\t\t\t\t\t$_config = include($_config);\r\n\r\n\t\t\t\t\t$vm = $this->vendor_name.\"_\".$this->module_name;\r\n\t\t\t\t\tif(isset($_config['controllers'][$vm])){\r\n\t\t\t\t\t\t$_config['controllers'][$vm][$routerName] = $routerInfo;\r\n\r\n\t\t\t\t\t\t$data = '<?php' . PHP_EOL;\r\n\t\t\t\t\t\t$data .= 'return ' . var_export($_config, true) . PHP_EOL;\r\n\t\t\t\t\t\t$data .= '?>';\r\n\r\n\t\t\t\t\t\t$_writer = new \\Of\\File\\Writer();\r\n\t\t\t\t\t\t$_writer->setDirPath(ROOT . DS . 'etc' . DS)\r\n\t\t\t\t\t\t->setData($data)\r\n\t\t\t\t\t\t->setFilename('Config')\r\n\t\t\t\t\t\t->setFileextension('php')\r\n\t\t\t\t\t\t->write();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/** end insert into installation config */\r\n\r\n\t\t\t\t/** create controller xml layout here */\r\n\r\n\t\t\t\t$body = \"\\t\\t\".'<container xml:id=\"main_container\" htmlId=\"main_container\" htmlClass=\"main_container\" weight=\"1\">' . PHP_EOL;\r\n\t\t\t\t\t$body .= \"\\t\\t\\t\".'<template xml:id=\"sample_template\" vendor=\"'.$this->vendor_name.'\" module=\"'.$this->module_name.'\" template=\"'.$sampleTemplate.'\" cacheable=\"1\" max-age=\"604800\"/>' . PHP_EOL;\r\n\t\t\t\t$body .= \"\\t\\t\".'</container>' . PHP_EOL;\r\n\r\n\t\t\t\t$this->_xml->setVendor($this->vendor_name)\r\n\t\t\t\t->setModule($this->module_name)\r\n\t\t\t\t->setFileName($xmlFilename);\r\n\t\t\t\tif($isAdmin){\r\n\t\t\t\t\t$this->_xml->create(false, $isAdmin, 999, $body);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->_xml->create(true, $isAdmin, 999, $body);\r\n\t\t\t\t}\r\n\t\t\t\t/** end create controller xml layout here */\r\n\r\n\t\t\t\t/** create the sample template here */\r\n\t\t\t\t$target = ROOT.DS.'App'.DS.'Ext'.DS.$this->vendor_name.DS.$this->module_name.DS.'View'.DS.'Template';\r\n\t\t\t\tif($controller_type == 'admin'){\r\n\t\t\t\t\t$target .= DS.'admin';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$data = \"<p>\".$route.\" \".$conroller.\" \".$action.\" works</p>\";\r\n\t\t\t\t$_writer = new \\Of\\File\\Writer();\r\n\t\t\t\t$_writer->setDirPath($target)\r\n\t\t\t\t->setData($data)\r\n\t\t\t\t->setFilename('sample_template')\r\n\t\t\t\t->setFileextension('phtml')\r\n\t\t\t\t->write();\r\n\t\t\t\t/** end create the sample template here */\r\n\r\n\t\t\t\t$response = [];\r\n\t\t\t\t$response['error'] = 0;\r\n\t\t\t\t$response['message'] = 'New conroller created.';\r\n\t\t\t\t$this->jsonEncode($response);\r\n\t\t\t} else {\r\n\t\t\t\t$this->returnError('400', 'Cannot create, controller is already existing.');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8c7cfdeefe313f21055cc79a19287760", "score": "0.6144564", "text": "public function controller($controller, $namespace = 'kake', $new = true)\r\n {\r\n if (!strpos($controller, 'Controller')) {\r\n $controller = Helper::underToCamel($controller, false, '-') . 'Controller';\r\n }\r\n $class = '\\service\\controllers\\\\' . $namespace . '\\\\' . $controller;\r\n\r\n if (!$new) {\r\n return $class;\r\n }\r\n\r\n return Helper::singleton(\r\n $class,\r\n function () use ($class) {\r\n return new $class($this->id, $this->module);\r\n }\r\n );\r\n }", "title": "" }, { "docid": "cb84ae4c83e83c46d1d108dcf04a24ce", "score": "0.61302066", "text": "public function __construct(){\n // print_r($this->getUrl());\n\n $url = $this->getUrl();\n\n // Look in controllers for the first value.\n // Checks the controller folder for a php file corresponding to\n // the first parameter.\n // Using ucwords to ensure the file is uppercase, as is standard.\n if(file_exists('../app/controllers/' . ucwords($url[0]) . '.php')){\n\n // If there is such a controller, make it the current one.\n $this->currentController = ucwords($url[0]);\n // After it becomes the new current controller, remove it from the url array.\n unset($url[0]);\n }\n\n // Require the controller.\n // This will be the pages controller or the controller specified through\n // url parameters.\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n // Instantiate controller.\n $this->currentController = new $this->currentController;\n\n // Check for second part of url.\n if(isset($url[1])){\n // Check to see that the second part of the url corresponds to an existing method.\n if(method_exists($this->currentController, $url[1])){\n // If it does exist, make it the current method.\n // If it doesn't, the default is set to index.\n $this->currentMethod = $url[1];\n\n // After it becomes the current method, unset it from url.\n unset($url[1]);\n }\n }\n\n // Grab all url parameters.\n // If url is set / truthy, make params an array consisting of\n // the values of the url array; if it isn't, make it an empty array.\n $this->params = $url ? array_values($url) : [];\n\n // Call a callback with an array of params.\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "ec27e5a6e9ccce083b8c01bff0f3692a", "score": "0.6120848", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 2. Call the worker method\n $results = ListEnvelopesService::worker($this->args, $this->clientService);\n\n if ($results) {\n # results is an object that implements ArrayAccess. Convert to a regular array:\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Envelope list\",\n \"List envelopes results\",\n \"Results from the Envelopes::listStatusChanges method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "94b94d25bbe7c313f289e6d26302b5ba", "score": "0.6057803", "text": "public function __construct()\n\t{\n\t\t$router = framewerk_RouterFactory::getRouter();\n\n\t\t// Instantiate the controller\n\t\t$controller_name = $router->getController();\n\t\t$class_name = 'controller_' . $controller_name;\n\n\t\t$controller = new $class_name;\n\n\t\t$action_name = $router->getAction();\n\n\t\t// Else, try and call the action sent in request string. If that does not exist, try and get the controllers default action\n\t\t$action = is_callable(array($controller, $action_name)) ? $action_name : $controller->default_action;\n\t\t\n\t\tif(!$action)\n\t\t{\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\texit;\n\t\t}\n\n\t\t// Set some view defaults. Templates are mapped to ControllerName/actionName.tpl.php\n\t\t$controller->view->setController($controller_name);\n\t\t$controller->view->setAction($action);\n\t\t$controller->view->setRequestId($router->getRequestId());\n\n\t\t// Does this action have a definition in the controller?\n\t\t$action_definition_name = $action_name.'_definition';\n\n\t\tif(isset($controller->$action_definition_name))\n\t\t{\n\t\t\t$action_definition = $controller->$action_definition_name;\n\n\t\t\t$request_data = $router->getRequestData($action_definition['data_source']);\n\n\t\t\t// If data_source is empty, do not create the request object\n\t\t\t// This allows actions to actually check whether an action should be performed, or just view.\n\t\t\tif(!empty($request_data)) $controller->request = new framewerk_Request($action_definition, $request_data);\n\t\t}\n\n\t\t// Pass input data back to the view - before action, so action can overwrite if needed\n\t\tif($controller->request && Config::populateViewWithRequestData())\n\t\t{\n\t\t\t$controller->view->setData($controller->request->input_data_objects);\n\t\t}\n\n\n\t\t// Call the action\n\t\t$controller->$action();\n\n\t\t/*\n\t\t// Check for invalid / invalidated data, create notices\n\t\tif($controller->request)\n\t\t{\n\t\t\tif(!$controller->request->isValid())\n\t\t\t{\n\t\t\t\tforeach($controller->request->getInvalidObjects() as $field_name => $input_data_object)\n\t\t\t\t{\n\t\t\t\t\t// If this field has a message\t\t\t\t\t\n\t\t\t\t\tif( ($message = $input_data_object->getError()) ) $controller->view->setNotice($message, framewerk_Notice::TYPE_ERROR, $field_name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\t// Render the view.\n\t\t$controller->view->render();\n\t}", "title": "" }, { "docid": "7a87ff9b48792e87255828837574a1d9", "score": "0.6057443", "text": "public function getController() {\n self::load('Panda.router.Router');\n $router = new Router;\n $router->loadKnownRoutes($this->name());\n\n //Try to find a matching route\n try {\n $matchedRoute = $router->getRoute(HTTPRequest::requestURI());\n } catch (RuntimeException $error) {\n if ($error->getCode() === Router::NO_ROUTE_FOUND) {\n HTTPResponse::redirect404($this);\n }\n }\n\n $_GET = array_merge($_GET, $matchedRoute->vars());\n $controllerClass = $matchedRoute->module() . 'Controller';\n //and load the matching controller\n self::load('App.' . strtolower($this->name()) . '.module.' . strtolower($matchedRoute->module()) . '.' . $matchedRoute->module() . 'Controller');\n return new $controllerClass($this, $matchedRoute->module(), $matchedRoute->action());\n }", "title": "" }, { "docid": "2442b08fad23aff7f41270d840a240d2", "score": "0.605339", "text": "public function create()\n {\n \n return view(\"lib.class.create\");\n }", "title": "" }, { "docid": "c8b8280d386722b5546abb5d71a512d6", "score": "0.6044492", "text": "function Controller()\n {\n $this->view = new View();\n }", "title": "" }, { "docid": "0a59aa930ba57fab18dfc2dff054e452", "score": "0.60213554", "text": "protected function instantiateController($controllerName)\n {\n $reflection = new \\ReflectionClass($controllerName);\n $construct = $reflection->getConstructor();\n\n if (! $construct) {\n return $reflection->newInstance();\n }\n\n $parameters = $construct->getParameters();\n $list = $this->createArgumentList($parameters);\n\n return $reflection->newInstanceArgs($list);\n }", "title": "" }, { "docid": "44ba2c933da7f98d547b57bcc717630e", "score": "0.6002322", "text": "public function testCreate()\n {\n $http = new MockHttpClient();\n $util = new Util($http);\n $session = new MockSession();\n $http = new MockHttpClient();\n $controller = new YatzyController($util, $session, $http);\n $this->assertInstanceOf(\"\\pereriksson\\Controllers\\YatzyController\", $controller);\n }", "title": "" }, { "docid": "9481f13fa63b576059207e8eaf51880d", "score": "0.5999503", "text": "private function getControllerInstance(array $getVariables): AbstractController\n {\n if (!isset($getVariables[\"controller\"])) {\n $this->redirectToNotFoundPage();\n }\n\n $controllerName = sprintf('App\\Controller\\%sController', ucfirst($getVariables[\"controller\"]));\n\n if (!class_exists($controllerName)) {\n $this->redirectToNotFoundPage();\n }\n\n return new $controllerName();\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "d8c829809cbdf130ab92e281f35b25eb", "score": "0.5979808", "text": "public function __construct() {\n\t\t$url = $this->_parseUrl();\n\n\t\n\t\t// load new controller\n\t\tif (isset($url[0])) {\n\t\t\tif (file_exists('app/controllers/' . $url[0]. '.class.php')) {\n\t\t\t\t$this->_controller = $url[0];\n\t\t\t\tunset($url[0]);\n\t\t\t} else {\n\t\t\t\t$this->_loadError();\n\t\t\t}\n\t\t}\n\t\t\n\t\trequire_once('app/controllers/' . $this->_controller. '.class.php');\n\t\t// load new method\n\t\tif (isset($url[1])) {\n\t\t\tif (method_exists($this->_controller, $url[1])) {\n\t\t\t\t$this->_method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t} else {\n\t\t\t\t$this->_loadError();\n\t\t\t}\n\t\t}\n\n\t\t// $this->_params\n\t\tcall_user_func_array([new $this->_controller, $this->_method], $this->_params);\n\t}", "title": "" }, { "docid": "eb638069425c512d39710e5206dcf272", "score": "0.59658927", "text": "public static function Factory($requireLogin=true) {\n\t\t$router = RouteParser::Instance();\n\t\tif($router->Dispatch('controller') !== null) {\n\t\t\t$classname=ucfirst(strtolower($router->Dispatch('controller'))).'Controller';\n\t\t\tif(class_exists($classname)) {\n\t\t\t\t$controller=$classname;\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\n\t\t$controller = 'IndexController';\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "3b3aaf093f2d48490ac4d219b2f6dc6e", "score": "0.59431434", "text": "public function testMakingAControllerWithoutModulesInitialised () : void\n {\n $controller = \"NewController\";\n $this->artisan(\"make:controller\", [\"name\" => $controller]);\n\n // I should have a controller in my app dir\n $this->assertTrue(class_exists(\"App\\\\Http\\\\Controllers\\\\$controller\"));\n $this->assertTrue(is_file(app_path(\"Http/Controllers/$controller.php\")));\n unlink(app_path(\"Http/Controllers/$controller.php\"));\n }", "title": "" }, { "docid": "c58c3789f04ea2a11ec8577816069a98", "score": "0.5936409", "text": "protected function getSymfonyCmfCreate_Rest_ControllerService()\n {\n return $this->services['symfony_cmf_create.rest.controller'] = new \\Symfony\\Cmf\\Bundle\\CreateBundle\\Controller\\RestController($this->get('fos_rest.view_handler'), $this->get('symfony_cmf_create.object_mapper'), $this->get('symfony_cmf_create.rdf_type_factory'), $this->get('symfony_cmf_create.rest.handler'), 'IS_AUTHENTICATED_ANONYMOUSLY', NULL);\n }", "title": "" }, { "docid": "23422a0a7a4de2549e5b09a4170de8e5", "score": "0.5921801", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "059426939ad1ae81474d9e1d3537741c", "score": "0.59128374", "text": "function __construct(){\n\t\t$url = $this->url();\n\n\t\t//[0] => 'Controller'\n\t\t//[1] => 'Method'\n\t\t//[2~] => 'Param'\n\t\tif (!empty($url)) {\n\t\t\tif (file_exists(ROOT_CONTROLLER_FOLDER . $url[0] . \".php\")) {\n\t\t\t\t$this->controller = ucwords($url[0]);\n\n\t\t\t\tunset($url[0]);\n\t\t\t} else {\n\t\t\t\tdie(\"Controller \" . $url[0] . \" is not found on \" . ROOT_CONTROLLER_FOLDER);\n\t\t\t}\n\t\t}\n\t\t// @Include controller file\n\t\trequire_once ROOT_CONTROLLER_FOLDER . $this->controller . \".php\";\n\n\t\t$this->controller = new $this->controller;\n\t\t\n\n\t\t/**\n\t\t * Check method availability.\n\t\t */\n\t\tif (isset($url[1]) && !empty($url[1]) ) {\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t}else {\n\t\t\t\tdie(\"Method is not found\");\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Check Parameters availability.\n\t\t */\n\t\tif (isset($url)) {\n\t\t\t$this->param = $url;\n\t\t} else {\n\t\t\t$this->param = [];\n\t\t}\n\n\t\tcall_user_func_array([\n\t\t\t$this->controller,\n\t\t\t$this->method\n\t\t], $this->param);\n\n\n\t}", "title": "" }, { "docid": "d46a35c396e6b6a6b021a81aa51a8db7", "score": "0.59083337", "text": "static private function _getInstanceController()\n {\n if (!isset($_GET['controller'])) {\n $rout[0] = 'default';\n } else {\n $rout = explode('_', $_GET['controller']);\n }\n\n if (count($rout) == 1) {\n $rout[1] = 'index';\n }\n\n $controllerName = self::getConfig('controllers/' . $rout[0]);\n\n $controllerPuth = self::$_baseDir . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR .\n $controllerName . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . ucfirst($rout[1]) . 'Controller.php';\n\n if (!file_exists($controllerPuth)) {\n throw new Exception(sprintf('Controller %s not found', $controllerPuth));\n }\n\n require_once $controllerPuth;\n\n self::$autoloader->loadClassModule(self::$_baseDir . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $controllerName);\n\n $classController = $controllerName . '_Controller_' . ucfirst($rout[1]) . 'Controller';\n\n if (!class_exists($classController)) {\n throw new Exception(sprintf('File has been loaded but class %s not found', $classController));\n }\n\n new $classController;\n\n return true;\n }", "title": "" }, { "docid": "220aa77fc5d4f6030fca8a7d6c0a452b", "score": "0.59076506", "text": "public static function factory($name, $config) {\n $instance = new AdminController();\n $instance->name = $name;\n $instance->config = new $config($name);\n return $instance;\n }", "title": "" }, { "docid": "5830efbd2e7f9bdbe6c206569736bbaa", "score": "0.5871468", "text": "function get_instance() {\n return NX_framework\\NX_core\\Controller\\Controller::$instance;\n}", "title": "" }, { "docid": "628c659bcc4935d910c129eddf186721", "score": "0.586621", "text": "public function controller() {\n\t\t// starting session\n\t\tsession_cache_limiter(false);\n\t\tsession_start();\n\n\t\t// load configs\t\t\n\t\trequire_once 'config/envconfig.php';\n\t\t$this->salt = $salt;\n\n\t\t// set timezone\n\t\tdate_default_timezone_set($timezone);\n\t\t\n\t\t// composer autoload\n\t\trequire 'vendor/autoload.php';\n\n\t\t// blade parameter\n\t\trequire 'lib/MyBlade.php';\n\t\t$this->blade = new \\Lib\\MyBlade('view', 'cache');\n\t\t$blade =& $this->blade;\n\n\t\t$this->app = new \\Slim\\Slim(\n\t\t\tarray(\n\t\t\t\t'debug'\t=> $debug\n\t\t\t)\n\t\t);\n\n\t\t$this->load('helper', 'controller');\n\t\t$app =& $this->app;\n\t\t$ctr = $this;\n\t\t\n\t\t// custom 404\n\t\t$this->app->notFound(function() {\n\t\t\tprint $this->load_view('404', array('request' => $_SERVER['REQUEST_URI']));\n\t\t});\n\t\t$this->app->error(function($e) {\n\t\t\tprint $this->load_view('500', array('message' => 'Something went WRONG!'));\n\t\t});\n \n\t\t\n\t\t// auto load library\n\t\tspl_autoload_register(function($class) {\n\t\t\t$file = 'lib/' . str_replace('Lib\\\\', '', $class) . '.php';\n\t\t\tif (is_file($file)) {\n\t\t\t\trequire_once $file;\n\t\t\t\tclearstatcache();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// load semua controller file\n\t\tforeach (scandir('controller') as $file) {\n\t\t\tif (is_file('controller/' . $file)) {\n\t\t\t\trequire('controller/' . $file);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->app->run();\n\t}", "title": "" }, { "docid": "dcb3eebd33f194cf731d832d0b9ffcde", "score": "0.5861673", "text": "public function __construct ()\n\t{\n\t\t$this->_controller = new \\Game\\Controller\\CLI();\n\n\t\treturn parent::__construct();\n\t}", "title": "" }, { "docid": "a89295eabd6a2a5d5c1031a0c3e9f486", "score": "0.5857453", "text": "public function createAction() {\n echo \"create action called in IndexController!\";\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "f142db9abeddee3cfd3e6581465a3581", "score": "0.5839", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Yatzy();\n $this->assertInstanceOf(\"\\sigridjonsson\\Controller\\Yatzy\", $controller);\n }", "title": "" }, { "docid": "d87d1c2be0687b35dfeabfeb797b84b3", "score": "0.58357793", "text": "public function controllerFactory($sType)\n {\n $sDriver = Controller::driver($sType);\n\n if (!isset(self::$hControllerList[$sDriver]))\n {\n self::$hControllerList[$sDriver] = Controller::factory($sType, $this);\n }\n\n return self::$hControllerList[$sDriver];\n }", "title": "" }, { "docid": "e52216e4b015f524478ae0d0925abb91", "score": "0.5827566", "text": "function controller($params) {\n\t\tinclude \"controllers/\". $params[0] .\".php\";\n\t\tif(!class_exists($params[0], false))\n\t\t\texit(\"Class $params[0] not found\");\n\t\t$controller = new $params[0];\n\t\t// Getting and checking a method\n\t\tif(!method_exists($controller, $params[1]))\n\t\t\texit(\"Method $params[1] not found\");\n\t\t$method = (string)$params[1];\n\t\t// Method call\n\t\treturn $controller->$method();\n\t}", "title": "" }, { "docid": "388654da5e3be7df86b6233839952240", "score": "0.582698", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = json_decode(PermissionSetUserGroupService::worker($this->args, $this->clientService), true);\n \n if ($results) {\n # That need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Set a permission profile to a group of users\",\n \"Set a permission profile to a group of users\",\n \"The permission profile has been set!<br/>\n Permission profile id: {$results['groups'][0]['permissionProfileId']}<br/>\n Group id: {$results['groups'][0]['groupId']}\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "e51f285a86ddbda521abf8565cb9dfce", "score": "0.582353", "text": "protected function run(){\n $programRoute = $this->findProgramRoute();\n $parts = explode('/', $programRoute);\n $controller = \"controllers\\\\\" . ucfirst(array_shift($parts) . \"Controller\");\n $action = lcfirst(array_shift($parts));\n $params = $parts;\n $this->createController($controller,$action,$params);\n }", "title": "" }, { "docid": "1e3942d1624faaef51ef5898f15c256f", "score": "0.5820016", "text": "protected function createControllerContext(): ControllerContext\n {\n $httpRequest = new ServerRequest('POST', 'http://localhost');\n $request = ActionRequest::fromHttpRequest($httpRequest);\n $response = new ActionResponse();\n $arguments = new Arguments([]);\n $uriBuilder = new UriBuilder();\n $uriBuilder->setRequest($request);\n\n return new ControllerContext($request, $response, $arguments, $uriBuilder);\n }", "title": "" }, { "docid": "e01af9b3b9b704e2fbe81830282d9589", "score": "0.58087105", "text": "public function __construct($controller)\n {\n $this->controller = $controller;\n }", "title": "" }, { "docid": "ed4af23c1232a43dcdd34336637d19ab", "score": "0.58060294", "text": "public static function getControllerInstance($class, $request, $response, array $invokeArgs = array())\n {\n return new $class($request, $response, $invokeArgs);\n }", "title": "" }, { "docid": "6a79d5243c6c93538391cd7ed64b2424", "score": "0.5803797", "text": "public function __loadController($_controllerName)\n\t{\n\t\t$_controllerName\t=\tstr_replace(\"/\", \"\", \"\\controllers\\/\".strtolower($_controllerName));\n\t\treturn\tnew $_controllerName();\n\t}", "title": "" }, { "docid": "519c12b1c73f4a2e417d7f14eb7d9e74", "score": "0.5801946", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Mos\\Controller\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "ccd44d7229847bd580813da88f4172a4", "score": "0.5789172", "text": "public function create()\n {\n // NOT USED\n }", "title": "" }, { "docid": "fcf52de01d6330d2148d874e7010d4e3", "score": "0.57817113", "text": "function __construct() {\r\n\r\n $url = rtrim($_GET['url'], '/');\r\n $url = explode('/', $url);\r\n $counter = 0;\r\n $indexer = 0;\r\n $args = null;\r\n foreach ($url as $index) {\r\n if ($counter > 1) {\r\n $args[$indexer] = $index;\r\n $indexer++;\r\n }\r\n $counter++;\r\n }\r\n\r\n /*\r\n * Checking if any controller request has been made through the url[0] or not. if not\r\n * then the default controller will be excuted.\r\n * \r\n */\r\n\r\n if (isset($url[0])) {\r\n \r\n $file = 'controllers/' . $url[0] . '.php';\r\n if (file_exists($file)) {\r\n require $file;\r\n $app = new $url[0]();\r\n if (isset($url[1])) {\r\n if (method_exists($app, $url[1])) {\r\n $app->{$url[1]}($args);\r\n } else {\r\n error::error_handler(\"No such Method found\");\r\n }\r\n } else {\r\n if (method_exists($app, 'index')) {\r\n $app->index();\r\n }\r\n }\r\n } else {\r\n error::error_handler(\"No such controller\");\r\n \r\n }\r\n \r\n } else {\r\n echo \"Default controller\";\r\n }\r\n }", "title": "" }, { "docid": "ba64e44da499c249386142425288e474", "score": "0.577916", "text": "private function &__getController() {\n\n require_once('app/app_controller.php');\n\n\n $controller = false;\n $ctrlClass = $this->__loadController($this->params);\n if (!$ctrlClass) {\n return $controller;\n }\n $ctrlClass .= 'Controller';\n if (class_exists($ctrlClass)) {\n $controller = new $ctrlClass();\n }\n return $controller;\n }", "title": "" }, { "docid": "aaf481233643e0c7b6db695f2066b7d3", "score": "0.577622", "text": "public function newInstance($file)\n {\n if (! isset($this->map[$file])) {\n throw new NoClassForController($file);\n }\n\n $class = $this->map[$file];\n return $this->forge->newInstance($class);\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "92172974cac87df19bb67ea3d4350f7d", "score": "0.577289", "text": "public function getController()\n\t{\n\t\t$name = $this->Module ? $this->Module : 'Controller_Frontend';\n\t\t$class = new $name();\n\t\t$class->setContentPage( $this );\n\t\treturn $class;\n\t}", "title": "" }, { "docid": "63608fb0a8185f0dba4738b591092a72", "score": "0.5768055", "text": "public function makeController($controllerName)\n {\n if (is_object($controllerName)) {\n if ($controllerName instanceof Controller) return $controllerName;\n\n throw new InvalidArgumentException($controllerName);\n }\n\n $controller = mezzo()->make($this->controllerClass($controllerName));\n\n if (!($controller instanceof Controller))\n throw new ModuleControllerException('Not a valid module controller.');\n\n return $controller;\n }", "title": "" }, { "docid": "a4cb0faec86988f6db72238544d87fb4", "score": "0.5766777", "text": "public function create()\n {\n return view('fill_in_the_blanks_controllers.create');\n }", "title": "" }, { "docid": "608fab0113e466fc64c06feb8bc94c59", "score": "0.57523835", "text": "private function define_object()\r\n\t\t{\r\n\t\t\t$class_name = ucwords(self::$controller) . self::controller_posfix;\r\n\t\t\trequire AURA_APP . DS . self::$app . DS . 'controllers' . DS . $class_name . '.php';\r\n\t\t\t\r\n\t\t\t$this->object = new $class_name;\r\n\t\t}", "title": "" }, { "docid": "9bdbfd06d3768808b2075f3429c0cc24", "score": "0.5746798", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\Kimchi\\Controller\\Game21\", $controller);\n }", "title": "" }, { "docid": "751c588a56325765a0304a2f958fbc66", "score": "0.5738778", "text": "private function useController($controller, $action)\n {\n $controller = ucfirst($controller);\n $controllerName = $controller . 'Controller';\n $controllerObj = new $controllerName($controller, $action);\n }", "title": "" }, { "docid": "b12b6200d5e060e7bd7b86f69f552b8a", "score": "0.57282233", "text": "public static function controller($name) {\n\t\t\t$class_name = Inflector::classify($name);\n\t\t\t$path_name = FileUtils::join(NIMBLE_ROOT, 'app', 'controller', $class_name . 'Controller.php');\n\t\t\t$view_path = FileUtils::join(NIMBLE_ROOT, 'app', 'view', strtolower(Inflector::underscore($class_name)));\n\t\t\tFileUtils::mkdir_p($view_path);\n\t\t\t$string = \"<?php \\n\";\n\t\t\t$string .= \"\t/**\\n\t* @package controller\\n\t*\t*/\\n\";\n\t\t\t$string .= \" class {$class_name}Controller extends Controller { \\n\";\n\t\t\t$string .= self::create_view_functions($view_path);\n\t\t\t$string .= \" }\\n\";\n\t\t\t$string .= \"?>\";\n\t\n\t\t\t$db = fopen($path_name, \"w\");\n\t\t\tfwrite($db, $string);\n\t\t\tfclose($db);\n\t\t}", "title": "" }, { "docid": "8f2c0b2ff8df98756a4bc02976fbb7bb", "score": "0.57256204", "text": "public function create()\n {\n \\Log::info(__FUNCTION__);\n return view('create');\n }", "title": "" }, { "docid": "ab075d4427a33f1e9765dd429fb21b9b", "score": "0.5721565", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game(2);\n $this->assertInstanceOf(\"\\Mos\\Dice\\Game\", $controller);\n }", "title": "" }, { "docid": "ea3ca86b2bf105c904277968058737bb", "score": "0.5718793", "text": "public function testNewFrontControllerInstance()\n {\n $this->assertInstanceOf(FrontController::class, new FrontController($this->model, $this->view, $this->controller, '', []));\n }", "title": "" }, { "docid": "73a4152afb1d1664966de39acfa0061e", "score": "0.5715404", "text": "function __construct()\n {\n tmvc::instance($this,'controller');\n \n /* instantiate load library */\n $this->load = new iMVC_Load; \n\n /* instantiate view library */\n $this->view = new iMVC_View;\n }", "title": "" } ]
1e5d28ff14dd953582cdd9979dd044dd
Model & Property Settings
[ { "docid": "e3f286b0a6c4e62455ead13ae324d706", "score": "0.6821075", "text": "protected function getPropertySettings() {\n $property_settings = array(\n 'user_id' => array(\n 'required' => true,\n 'custom' => [\n array (\n 'method' => 'isUnique',\n 'parameter' => array (\n 'user_id',\n $this->user_id,\n ),\n 'error_message' => 'User already has credentials.',\n ),\n ],\n 'foreign_key' => array (\n 'class' => '\\aurora\\model\\User',\n 'requesting_branch' => $this->branch_id,\n ),\n ),\n 'user_credential_id' => array(\n 'scaffold' => false,\n ),\n 'username' => array(\n 'required' => true,\n 'format' => REGEX_USERNAME,\n 'custom' => [\n array (\n 'method' => 'isUnique',\n 'parameter' => array (\n 'username',\n $this->username,\n ),\n 'error_message' => 'Username name must be unique.',\n ),\n ],\n ),\n 'hashed_password' => array(\n 'required' => true,\n 'visible' => false,\n ),\n 'password_salt' => array(\n 'scaffold' => false,\n 'visible' => false,\n ),\n 'pin_code' => array(\n 'required' => true,\n 'range' => array (1000, 9999),\n 'custom' => [array (\n 'method' => 'isUnique',\n 'parameter' => array (\n 'pin_code',\n $this->pin_code,\n ),\n 'error_message' => 'Pin code must be unique.',\n )],\n 'shared' => false,\n ),\n 'last_activity' => array(\n 'scaffold' => false,\n ),\n 'status' => array(\n 'scaffold' => false,\n 'shared' => true,\n ),\n 'created_on' => array(\n 'scaffold' => false,\n 'shared' => false,\n ),\n 'created_by' => array(\n 'scaffold' => false,\n 'shared' => false,\n ),\n 'modified_on' => array(\n 'scaffold' => false,\n 'shared' => false,\n ),\n 'modified_by' => array(\n 'scaffold' => false,\n 'shared' => false,\n ),\n );\n\n // Append enum format\n $this->addEnumFormatValidator($this::TABLE_NAME, $property_settings);\n\n return $property_settings;\n }", "title": "" } ]
[ { "docid": "338c220d179b7cd08c88fe125f4e97e8", "score": "0.663296", "text": "private function getPropertyInCreation() {\n $property = new YiiPropertyModel();\n switch ($this->rdfType) {\n case Yii::$app->params['MoveFrom']:\n $property->value = $this->propertyFrom;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['From'];\n break;\n case Yii::$app->params['FertigationRefillWith']:\n $property->value = $this->propertyWith;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['With'];\n break;\n case Yii::$app->params['MoveTo']:\n $property->value = $this->propertyTo;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['To'];\n break;\n case Yii::$app->params['AssociatedToASensor']:\n $property->value = $this->propertyAssociatedToASensor;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['associatedToASensor'];\n break;\n case Yii::$app->params['PartReplacementBy']:\n $property->value = $this->propertyBy;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['By'];\n break;\n case Yii::$app->params['FertigationMeasurementpH']:\n $property->value = $this->propertypH;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['pH'];\n break;\n case Yii::$app->params['FertigationMeasurementConductivity']:\n $property->value = $this->propertyConductivity;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['Conductivity'];\n break;\n case Yii::$app->params['FertigationMeasurementPressure']:\n $property->value = $this->propertyPressure;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['Pressure'];\n break;\n case Yii::$app->params['FertigationAutoRefillOnWith']:\n $property->value = $this->propertyWith;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['With'];\n break;\n case Yii::$app->params['FertigationReplaceWith']:\n $property->value = $this->propertyWith;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['With'];\n break;\n case Yii::$app->params['FertigationSolutionSet']:\n $property->value = $this->propertyWith;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['With'];\n break;\n case Yii::$app->params['FertigationCycleSet']:\n $property->value = $this->propertySet;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['Set'];\n break;\n case Yii::$app->params['ArtificialLightPhotoperiodSet']:\n $property->value = $this->propertySet;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['Set'];\n break;\n case Yii::$app->params['ArtificialLightSpectrumSet']:\n $property->value = $this->propertyWith;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['With'];\n break;\n case Yii::$app->params['GerminationPlant']:\n $property->value = $this->propertyHasAmount;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['HasAmount'];\n break;\n case Yii::$app->params['GerminationGlobal']:\n $property->value = $this->propertyHasAmount;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['HasAmount'];\n break;\n case Yii::$app->params['Treatment']:\n $property->value = $this->propertyHasDocument;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['HasDocument'];\n break;\n case Yii::$app->params['SetQRList']:\n $property->value = $this->propertyHasDocument;\n $property->rdfType = $this->propertyType;\n $property->relation = Yii::$app->params['HasDocument'];\n break; \n default : \n $property = null;\n break;\n }\n return $property;\n }", "title": "" }, { "docid": "8743242bb8c5f5b05c1fa63b7553389d", "score": "0.6549547", "text": "public function loadModel()\n {\n $model = new Setting();\n $this->admin_email = $model->getSettingValueByKey(\\Globals::ADMIN_EMAIL);\n $this->api_key = $model->getSettingValueByKey(\\Globals::GOOGLE_API_KEY);\n $this->pem = $model->getSettingValueByKey(\\Globals::PEM_FILE);\n $this->exchange_rate = $model->getSettingValueByKey(\\Globals::EXCHANGE_RATE);\n $this->deal_online_rate = $model->getSettingValueByKey(\\Globals::DEAL_ONLINE_RATE);\n $this->premium_deal_online_rate = $model->getSettingValueByKey(\\Globals::PREMIUM_DEAL_ONLINE_RATE);\n $this->driver_online_rate = $model->getSettingValueByKey(\\Globals::DRIVER_ONLINE_RATE);\n $this->searching_deal_distance = $model->getSettingValueByKey(\\Globals::SEARCHING_DEAL_DISTANCE);\n $this->searching_driver_distance = $model->getSettingValueByKey(\\Globals::SEARCHING_DRIVER_DISTANCE);\n $this->exchange_fee = $model->getSettingValueByKey(\\Globals::EXCHANGE_FEE);\n $this->redeem_fee = $model->getSettingValueByKey(\\Globals::REDEEM_FEE);\n $this->transfer_fee = $model->getSettingValueByKey(\\Globals::TRANSFER_FEE);\n $this->deal_payment_fee = $model->getSettingValueByKey(\\Globals::DEAL_PAYMENT_FEE);\n $this->trip_payment_fee = $model->getSettingValueByKey(\\Globals::TRIP_PAYMENT_FEE);\n $this->page_faq = $model->getSettingValueByKey(\\Globals::PAGE_FAQ);\n $this->page_about = $model->getSettingValueByKey(\\Globals::PAGE_ABOUT);\n $this->page_help = $model->getSettingValueByKey(\\Globals::PAGE_HELP);\n $this->page_term = $model->getSettingValueByKey(\\Globals::PAGE_TERM);\n $this->key_push = $model->getSettingValueByKey('key_push');\n \n $this->invite_bonus_point = $model->getSettingValueByKey(\\Globals::INVITE_BONUS_POINT);\n $this->searching_product_distance = $model->getSettingValueByKey(\\Globals::SEARCHING_PRODUCT_DISTANCE);\n \n $this->commission_rate = $model->getSettingValueByKey(\\Globals::COMMISSION_RATE);\n \n $this->image_banner_1 = $model->getSettingValueByKey('IMAGE_BANNER_1', $this->image_banner_1);\n $this->image_banner_2 = $model->getSettingValueByKey('IMAGE_BANNER_2', $this->image_banner_2);\n $this->image_banner_3 = $model->getSettingValueByKey('IMAGE_BANNER_3', $this->image_banner_3);\n $this->image_banner_4 = $model->getSettingValueByKey('IMAGE_BANNER_4', $this->image_banner_4);\n\n }", "title": "" }, { "docid": "5c2c957ab5376f678bac95c7498b3c78", "score": "0.6545043", "text": "protected function _applyObjectProperty()\r\n\t{\r\n\t\tparent::_applyObjectProperty();\r\n\r\n\t\t$modelName = $this->_object->getModelName();\r\n\r\n\t\tswitch($modelName)\r\n\t\t{\r\n\t\t\tcase 'property':\r\n\t\t\t\t$Shop_Item_Property = $this->_object->Shop_Item_Property;\r\n\t\t\t\t$Shop_Item_Property->shop_measure_id = intval(Core_Array::getPost('shop_measure_id'));\r\n\t\t\t\t$Shop_Item_Property->prefix = Core_Array::getPost('prefix');\r\n\t\t\t\t$Shop_Item_Property->filter = intval(Core_Array::getPost('filter'));\r\n\t\t\t\t$Shop_Item_Property->show_in_group = intval(Core_Array::getPost('show_in_group'));\r\n\t\t\t\t$Shop_Item_Property->show_in_item = intval(Core_Array::getPost('show_in_item'));\r\n\t\t\t\t$Shop_Item_Property->save();\r\n\r\n\t\t\tif (Core_Array::getPost('add_value'))\r\n\t\t\t{\r\n\t\t\t\t$offset = 0;\r\n\t\t\t\t$limit = 100;\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\t$oShop_Items = $Shop_Item_Property->Shop->Shop_Items;\r\n\r\n\t\t\t\t\t$oShop_Items\r\n\t\t\t\t\t\t->queryBuilder()\r\n\t\t\t\t\t\t->offset($offset)->limit($limit);\r\n\r\n\t\t\t\t\t$aShop_Items = $oShop_Items->findAll(FALSE);\r\n\r\n\t\t\t\t\tforeach($aShop_Items as $oShop_Item)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$aProperty_Values = $this->_object->getValues($oShop_Item->id, FALSE);\r\n\r\n\t\t\t\t\t\tif (!count($aProperty_Values))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$oProperty_Value = $this->_object->createNewValue($oShop_Item->id);\r\n\r\n\t\t\t\t\t\t\tswitch($this->_object->type)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tcase 2: // Файл\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\t$oProperty_Value->value($this->_object->default_value);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t$oProperty_Value->save();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$offset += $limit;\r\n\t\t\t\t}\r\n\r\n\t\t\t\twhile (count($aShop_Items));\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\t\t\tcase 'property_dir':\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tCore_Event::notify(get_class($this) . '.onAfterRedeclaredApplyObjectProperty', $this, array($this->_Admin_Form_Controller));\r\n\t}", "title": "" }, { "docid": "16a41884d704f1516dfd293dad2b8b84", "score": "0.6493472", "text": "public function __construct()\n {\n $this->model = new Property();\n }", "title": "" }, { "docid": "209c9418c951bbd78be95e6cd222095d", "score": "0.6354296", "text": "public function initModel() {\n $this->propertyModel = new MobilepropertiesModel();\n $this->propertyModel->game_id = $this->app_id;\n $this->propertyModel->play_id = $this->play_id;\n $this->propertyModel->factoryInit($this);\n }", "title": "" }, { "docid": "0d62454afd9a0e93c265bcfb561bcc42", "score": "0.6290485", "text": "abstract protected function properties();", "title": "" }, { "docid": "3e054140389d0c8e16b3c446c1e21097", "score": "0.625964", "text": "public function setting() {\n\t}", "title": "" }, { "docid": "0609eca5c6c6feb5b38b8d1ff768b89d", "score": "0.61671", "text": "public function settings();", "title": "" }, { "docid": "99642b2adac6d0a20214d8fb313578b9", "score": "0.6091138", "text": "public function editableProperties();", "title": "" }, { "docid": "cb6a902c97e78a3338f689c6c7c38572", "score": "0.59628165", "text": "public abstract function setControllerProperties();", "title": "" }, { "docid": "5c81b97470ea90f19cf6be52b3d75b55", "score": "0.5935876", "text": "function setup(&$Model, $settings) {\n\t\tif (isset($settings['fieldList']) && count($settings['fieldList']) > 2) {\n\t\t\ttrigger_error('EnumerableBehavior doesn\\'t support more than 2 fields. (too many fields in fieldList)', E_USER_WARNING);\n\t\t}\n\t\t$this->settings[$Model->alias] = array_merge(\n\t\t\tarray(\n\t\t\t\t'cache' => false,\n\t\t\t\t'cacheName' => 'default',\n\t\t\t\t'caseInsensitive' => false,\n\t\t\t\t'conditions' => array(),\n\t\t\t\t'fieldList' => array($Model->primaryKey, $Model->displayField),\n\t\t\t),\n\t\t\t$settings\n\t\t);\n\t}", "title": "" }, { "docid": "e13a1c0e50bf6538356eb2a0fdd0bc2b", "score": "0.5927563", "text": "public function setup_properties()\n\t{\n\t\tif (isset($this->properties['report_period']))\n\t\t\t$this->properties['report_period']['options'] = array(\n\t\t\t\t\"today\" => _('Today'),\n\t\t\t\t\"last24hours\" => _('Last 24 hours'),\n\t\t\t\t\"yesterday\" => _('Yesterday'),\n\t\t\t\t\"thisweek\" => _('This week'),\n\t\t\t\t\"last7days\" => _('Last 7 days'),\n\t\t\t\t\"lastweek\" => _('Last week'),\n\t\t\t\t\"thismonth\" => _('This month'),\n\t\t\t\t\"last31days\" => _('Last 31 days'),\n\t\t\t\t\"lastmonth\" => _('Last month'),\n\t\t\t\t'last3months' => _('Last 3 months'),\n\t\t\t\t'lastquarter' => _('Last quarter'),\n\t\t\t\t'last6months' => _('Last 6 months'),\n\t\t\t\t'last12months' => _('Last 12 months'),\n\t\t\t\t\"thisyear\" => _('This year'),\n\t\t\t\t\"lastyear\" => _('Last year'),\n\t\t\t\t'custom' => _('Custom'));\n\t\tif (isset($this->properties['scheduleddowntimeasuptime']))\n\t\t\t$this->properties['scheduleddowntimeasuptime']['options'] = array(\n\t\t\t\t0 => _('Actual state'),\n\t\t\t\t1 => _('Uptime'),\n\t\t\t\t2 => _('Uptime, with difference'));\n\t\tif (isset($this->properties['sla_mode']))\n\t\t\t$this->properties['sla_mode']['options'] = array(\n\t\t\t\t0 => _('Group availability (Worst state)'),\n\t\t\t\t1 => _('Average'),\n\t\t\t\t2 => _('Cluster mode (Best state)'));\n\t\tif (isset($this->properties['rpttimeperiod'])) {\n\t\t\t$this->properties['rpttimeperiod']['options'] = array();\n\t\t\tforeach(TimePeriodPool_Model::all() as $tp) {\n\t\t\t\t$name = $tp->get_name();\n\t\t\t\t$this->properties['rpttimeperiod']['options'][$name] = $name;\n\t\t\t}\n\t\t}\n\t\tif (isset($this->properties['skin']))\n\t\t\t$this->properties['skin']['default'] = config::get('config.current_skin');\n\n\t\tif (isset($this->properties['state_types'])) {\n\t\t\t$this->properties['state_types']['description'] = _('Restrict events based on which state the event is in (soft vs hard)');\n\t\t\t$this->properties['state_types']['options'] = array(\n\t\t\t\t3 => _('Hard and soft states'),\n\t\t\t\t2 => _('Hard states'),\n\t\t\t\t1 => _('Soft states'));\n\t\t}\n\t\tif (isset($this->properties['host_filter_status'])) {\n\t\t\t$this->properties['host_filter_status']['options'] = Reports_Model::$host_states;\n\t\t\tunset($this->properties['host_filter_status']['options'][-2]);\n\t\t}\n\t\tif (isset($this->properties['service_filter_status'])) {\n\t\t\t$this->properties['service_filter_status']['options'] = Reports_Model::$service_states;\n\t\t\tunset($this->properties['service_filter_status']['options'][-2]);\n\t\t}\n\t\tif (isset($this->properties['report_timezone'])) {\n\t\t\t$this->properties['report_timezone']['options'] = reports::timezone_list();\n\t\t\t$this->properties['report_timezone']['default'] = reports::default_timezone();\n\t\t}\n\t\t$this->rename_options = array(\n\t\t\t't1' => 'start_time',\n\t\t\t't2' => 'end_time',\n\t\t\t'host' => array($this, 'rewrite_objects'),\n\t\t\t'service' => array($this, 'rewrite_objects'),\n\t\t\t'hostgroup_name' => array($this, 'rewrite_objects'),\n\t\t\t'servicegroup_name' => array($this, 'rewrite_objects'),\n\t\t\t'host_name' => array($this, 'rewrite_objects'),\n\t\t\t'service_description' => array($this, 'rewrite_objects'),\n\t\t\t'hostgroup' => array($this, 'rewrite_objects'),\n\t\t\t'servicegroup' => array($this, 'rewrite_objects'),\n\t\t\t'includesoftstates' => array($this, 'rewrite_soft'),\n\t\t);\n\t}", "title": "" }, { "docid": "24455fa9b0b2551eda3490bc8c04bf20", "score": "0.59185857", "text": "function getSettings()\n {\n $values[\"title\"] = $this->object->getTitle();\n $values[\"description\"] = $this->object->getDescription();\n $values[\"show_submissions\"] = $this->object->getShowSubmissions();\n $values[\"pass_mode\"] = $this->object->getPassMode();\n $values[\"min_number\"] = $this->object->getMinNumber();\n $values[\"notification\"] = $this->object->getNotification();\n $values[\"completion_by_submission\"] = $this->object->getCompletionBySubmission();\n $values[\"processtype\"] = $this->object->getProcesstype();\n $this->form->setValuesByArray($values);\n }", "title": "" }, { "docid": "1c6e83be38fabc7846631b8899e83172", "score": "0.5892387", "text": "public function settings()\n {\n $this->app->set('pm', $this);\n $this->app->set('model', $this->model);\n \n echo $this->theme->render('Shop/PaymentMethods/CCAvenue/Views::settings.php');\n }", "title": "" }, { "docid": "60ad47ed343db4c1c2a18a1c0281ba66", "score": "0.58239836", "text": "function setup(&$model, $settings = array())\r\n\t{ \r\n\t\t// Initialize behavior's default settings\r\n\t\t$default = array\r\n\t\t(\r\n\t\t\t'separator' => ','\r\n\t\t\t, 'tag_label' => 'tag'\r\n\t\t\t, 'table_label' => 'tags'\r\n\t\t);\r\n\r\n\t\t// If behavior's settings not set for given model then use default\r\n\t\tif (!isset($this->settings[$model->name]))\r\n\t\t{\r\n\t\t\t$this->settings[$model->name] = $default;\r\n\t\t}\r\n\r\n\t\t// Merge behavior's default settings and model's settings\r\n\t\t//$this->settings[$model->name] = am($this->settings[$model->name], ife(is_array($settings), $settings, array()));\r\n $this->settings[$model->name] = array_merge($this->settings[$model->name],$settings); \r\n\t}", "title": "" }, { "docid": "67d0668a23cb8423c70aca75ab449dde", "score": "0.580422", "text": "abstract protected function _initProperties();", "title": "" }, { "docid": "20240c2e39c6eefc76f73b6631ead4ba", "score": "0.5794589", "text": "function setup(&$model, $settings = array()) {\n $default = array();\n \n if (!isset($this->settings[$model->name])) {\n $this->settings[$model->name] = $default;\n }\n \n $this->settings[$model->name] = array_merge($this->settings[$model->name], ife(is_array($settings), $settings, array()));\n }", "title": "" }, { "docid": "dc0d87c2627bd6f25978150ebebba7af", "score": "0.5794175", "text": "public function settings()\n {\n $this->app->set('pm', $this);\n $this->app->set('model', $this->model);\n \n echo $this->theme->render('Shop/PaymentMethods/OmnipayPaypalExpress/Views::settings.php');\n }", "title": "" }, { "docid": "c99c61baf86965b1d64c37a497c808c9", "score": "0.57939345", "text": "public function model(): Property\n {\n return $this->model;\n }", "title": "" }, { "docid": "4e1864e679e77d2f7b93221b9ebe2ed2", "score": "0.577809", "text": "public function __construct()\n {\n $this->settings = Setting::first();\n }", "title": "" }, { "docid": "974c27012d453ecb9873fe5fef05c535", "score": "0.57775986", "text": "private function getProperti()\n\t{\n\t\t# code...\n\t}", "title": "" }, { "docid": "ab0f4e745ec49c139c75cc1f95dc90de", "score": "0.57494074", "text": "public function __construct()\n\t\t{\n\t\t\t//set parameter for properties\n\t\t}", "title": "" }, { "docid": "10c7b99f31f03e4aaa10f5249a1e1845", "score": "0.5732013", "text": "public function updateProperties(){\n \t$this->state = $this->states[$this->values->state];\n \t$this->type = $this->state->types[$this->values->type];\n \t$this->rates = $this->type->rates;\n \t$this->endorsements = $this->type->endorsements;\n \t//Update gov-record / deed / mort\n \t$this->values->deed = $this->type->deed;\n \t$this->values->mortgage = $this->type->mortgage;\n \t//NJ Has differend deed/mort on 0 value\n \tif($this->values->loanAmount == 0 && $this->values->state == 'NJ'){\n\t\t\t$this->values->deed = 0;\n\t\t\t$this->values->mortgage = 80;\n\t\t}\n\t\t$this->values->governmentRecording = $this->values->deed+$this->values->mortgage;\n }", "title": "" }, { "docid": "ed831791f1b17fb4d1893a2f456ccba4", "score": "0.57136774", "text": "public function modelGetter();", "title": "" }, { "docid": "18763c35a0c6572512a396469670b7c9", "score": "0.5712597", "text": "function setup(&$model, $settings = array())\n {\n // Initialize behavior's default settings\n $default = array(\n 'length' => 100,\n 'slug' => 'slug',\n 'separator' => '-',\n 'overwrite' => false,\n 'label' => array('title'),\n 'noFirstIndex' => false,\n );\n\n // If behavior's settings not set for given model then use default\n if (!isset($this->settings[$model->name])) {\n $this->settings[$model->name] = $default;\n }\n\n // If label is not set in settings as an array then set it\n if (is_array($settings) && isset($settings['label']) && !is_array($settings['label'])) {\n $settings['label'] = array($settings['label']);\n }\n\n // Merge behavior's default settings and model's settings\n if (is_array($settings)) {\n $this->settings[$model->name] = array_merge($this->settings[$model->name], $settings);\n }\n }", "title": "" }, { "docid": "252b036f6200312116207c67e8d13518", "score": "0.5709477", "text": "public function testProperty()\n {\n $model = new ModelInstance();\n\n self::assertNull($model->boolProp);\n self::assertNull($model->getProperty('boolProp'));\n\n $model->boolProp = '1';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertTrue($model->boolProp);\n\n $model->boolProp = 1;\n self::assertInternalType('boolean', $model->boolProp);\n self::assertTrue($model->boolProp);\n\n $model->boolProp = 'true';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertTrue($model->boolProp);\n\n $model->boolProp = true;\n self::assertInternalType('boolean', $model->boolProp);\n self::assertTrue($model->boolProp);\n\n $model->boolProp = 'y';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertTrue($model->boolProp);\n\n $model->boolProp = 'yes';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertTrue($model->boolProp);\n\n $model->boolProp = '0';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertFalse($model->boolProp);\n\n $model->boolProp = 0;\n self::assertInternalType('boolean', $model->boolProp);\n self::assertFalse($model->boolProp);\n\n $model->boolProp = 'false';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertFalse($model->boolProp);\n\n $model->boolProp = false;\n self::assertInternalType('boolean', $model->boolProp);\n self::assertFalse($model->boolProp);\n\n $model->boolProp = 'n';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertFalse($model->boolProp);\n\n $model->boolProp = 'no';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertFalse($model->boolProp);\n\n $model->boolProp = 'asdf';\n self::assertInternalType('boolean', $model->boolProp);\n self::assertFalse($model->boolProp);\n }", "title": "" }, { "docid": "b7833ef71dd6fcd8799e0e10a85487a4", "score": "0.5700122", "text": "protected static function properties()\n\t\t{\n\t\t\tparent::properties();\n\n\t\t\tstatic::addProperty(new Property('name','nav_text','string'));\n\t\t\tstatic::addProperty(new Property('title','title','string'));\n\t\t\tstatic::addProperty(new Property('contentTitle', 'content_title', 'html')); // the user updates this\n\t\t\tstatic::addProperty(new Property('content','content','html'));\n\t\t\tstatic::addProperty(new Property('useSlideshow','has_slideshow','bool'));\n\t\t\t// static::addProperty(new Property('bannerText','banner_text','string'));\n\t\t\tstatic::addProperty((new LinkFromMultipleProperty(\"slides\", static::SLIDE_CLASS, \"page\"))->setAutoDelete(true));\n\t\t\tstatic::addProperty(new Property('keywords','keywords','string'));\n\t\t\tstatic::addProperty(new Property('description','description','string'));\n\t\t\tstatic::addProperty(new Property('module','page_type','string'));\n\t\t\tstatic::addProperty(new LinkToProperty(\"parent\", \"parent_id\", Page::class));\n\t\t\tstatic::addProperty(new Property(\"isRedirect\"));\n\t\t\tstatic::addProperty(new Property('isExternalRedirect','external_redirect','bool'));\n\t\t\tstatic::addProperty(new Property('redirect','redirect_path','string'));\n\t\t\tstatic::addProperty(new Property('isInternalRedirect','internal_redirect','bool'));\n\t\t\tstatic::addProperty(new Property('isDuplicate','duplicate','bool'));\n\t\t\tstatic::addProperty(new LinkToProperty('original','original_id', Page::class));\n\t\t\tstatic::addProperty(new Property('onNav','display_on_nav','bool'));\n\t\t\tstatic::addProperty(new Property('onSecondaryNav','display_on_secondary_nav','bool'));\n\t\t\tstatic::addProperty(new Property('useNewWindow','new_window','bool'));\n\t\t\tstatic::addProperty(new Property('isHomepage','is_homepage','bool'));\n\t\t\tstatic::addProperty(new Property('isErrorPage','is_error_page','bool'));\n\t\t\tstatic::addProperty(new Property('path'));\n\t\t\tstatic::addProperty(new ImageProperty('image', 'auxilary_image', static::IMAGE_LOCATION, static::IMAGE_WIDTH, static::IMAGE_HEIGHT, static::IMAGE_RESIZE_TYPE));\n\t\t\t// static::addProperty(new ImageProperty('bannerImage', 'banner', static::IMAGE_LOCATION, static::BANNER_WIDTH, static::BANNER_HEIGHT, static::IMAGE_RESIZE_TYPE));\n\t\t\t// static::addProperty(new Property(\"bannerTitle\", \"banner_title\", \"string\"));\n\t\t\t// static::addProperty(new Property(\"bannerText\", \"banner_text\", \"html\"));\n\t\t\t// static::addProperty(new Property(\"bannerButton\", \"banner_button\", \"string\"));\n\t\t\tstatic::addProperty((new LinkFromMultipleProperty(\"children\", Page::class, \"parent\"))->setAutoDelete(true));\n\t\t}", "title": "" }, { "docid": "e978d13a490e2f01716ecba8d4d75415", "score": "0.56654805", "text": "protected function _applyObjectProperty()\n\t{\n\t\t$this\n\t\t\t->addSkipColumn('phone')\n\t\t\t->addSkipColumn('fax')\n\t\t\t->addSkipColumn('site')\n\t\t\t->addSkipColumn('email');\n\n\t\tparent::_applyObjectProperty();\n\n\t\t$aTmp = array();\n\n\t\t$aCompany_Sites = $this->_object->Company_Sites->findAll(FALSE);\n\t\tforeach ($aCompany_Sites as $oCompany_Site)\n\t\t{\n\t\t\tif (Core_Array::getPost('site_' . $oCompany_Site->site_id))\n\t\t\t{\n\t\t\t\t$aTmp[] = $oCompany_Site->site_id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$oCompany_Site->delete();\n\t\t\t}\n\t\t}\n\n\t\t$aSites = Core_Entity::factory('Site')->findAll(FALSE);\n\t\tforeach ($aSites as $oSite)\n\t\t{\n\t\t\tif (Core_Array::getPost('site_' . $oSite->id) && !in_array($oSite->id, $aTmp))\n\t\t\t{\n\t\t\t\t$oCompany_Site = Core_Entity::factory('Company_Site');\n\t\t\t\t$oCompany_Site->site_id = $oSite->id;\n\t\t\t\t$oCompany_Site->company_id = $this->_object->id;\n\t\t\t\t$oCompany_Site->save();\n\t\t\t}\n\t\t}\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t// Адреса, установленные значения\n\t\t$aCompany_Directory_Addresses = $this->_object->Company_Directory_Addresses->findAll();\n\t\tforeach ($aCompany_Directory_Addresses as $oCompany_Directory_Address)\n\t\t{\n\t\t\t$oDirectory_Address = $oCompany_Directory_Address->Directory_Address;\n\n\t\t\t$sAddress = trim(Core_Array::getPost(\"address#{$oDirectory_Address->id}\"));\n\t\t\t$sCountry = strval(Core_Array::getPost(\"address_country#{$oDirectory_Address->id}\"));\n\t\t\t$sPostcode = strval(Core_Array::getPost(\"address_postcode#{$oDirectory_Address->id}\"));\n\t\t\t$sCity = strval(Core_Array::getPost(\"address_city#{$oDirectory_Address->id}\"));\n\n\t\t\tif (strlen($sAddress) || strlen($sCountry) || strlen($sPostcode) || strlen($sCity))\n\t\t\t{\n\t\t\t\t$oDirectory_Address\n\t\t\t\t\t->directory_address_type_id(intval(Core_Array::getPost(\"address_type#{$oDirectory_Address->id}\", 0)))\n\t\t\t\t\t->country($sCountry)\n\t\t\t\t\t->postcode($sPostcode)\n\t\t\t\t\t->city($sCity)\n\t\t\t\t\t->value($sAddress)\n\t\t\t\t\t->save();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Удаляем пустую строку с полями\n\t\t\t\tob_start();\n\t\t\t\tCore::factory('Core_Html_Entity_Script')\n\t\t\t\t\t->value(\"$.deleteFormRow($(\\\"#{$windowId} select[name='address_type#{$oDirectory_Address->id}']\\\").closest('.row').find('.btn-delete').get(0));\")\n\t\t\t\t\t->execute();\n\t\t\t\t$this->_Admin_Form_Controller->addMessage(ob_get_clean());\n\n\t\t\t\t$oCompany_Directory_Address->Directory_Address->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Адреса, новые значения\n\t\t$aAddresses = Core_Array::getPost('address', array());\n\t\t$aAddress_Country = Core_Array::getPost('address_country', array());\n\t\t$aAddress_Postcode = Core_Array::getPost('address_postcode', array());\n\t\t$aAddress_City = Core_Array::getPost('address_city', array());\n\t\t$aAddress_Types = Core_Array::getPost('address_type', array());\n\n\t\tif (is_array($aAddresses) && count($aAddresses))\n\t\t{\n\t\t\t$i = 0;\n\t\t\tforeach ($aAddresses as $key => $sAddress)\n\t\t\t{\n\t\t\t\t$sAddress = trim($sAddress);\n\t\t\t\t$sCountry = strval(Core_Array::get($aAddress_Country, $key));\n\t\t\t\t$sPostcode = strval(Core_Array::get($aAddress_Postcode, $key));\n\t\t\t\t$sCity = strval(Core_Array::get($aAddress_City, $key));\n\n\t\t\t\tif (strlen($sAddress) || strlen($sCountry) || strlen($sPostcode) || strlen($sCity))\n\t\t\t\t{\n\t\t\t\t\t$oDirectory_Address = Core_Entity::factory('Directory_Address')\n\t\t\t\t\t\t->directory_address_type_id(intval(Core_Array::get($aAddress_Types, $key)))\n\t\t\t\t\t\t->country($sCountry)\n\t\t\t\t\t\t->postcode($sPostcode)\n\t\t\t\t\t\t->city($sCity)\n\t\t\t\t\t\t->value($sAddress)\n\t\t\t\t\t\t->save();\n\n\t\t\t\t\t$this->_object->add($oDirectory_Address);\n\n\t\t\t\t\tob_start();\n\t\t\t\t\tCore::factory('Core_Html_Entity_Script')\n\t\t\t\t\t\t->value(\"$(\\\"#{$windowId} select[name='address_type\\\\[\\\\]']\\\").eq({$i}).prop('name', 'address_type#{$oDirectory_Address->id}').closest('.row').find('.btn-delete').removeClass('hide');\n\t\t\t\t\t\t$(\\\"#{$windowId} input[name='address\\\\[\\\\]']\\\").eq({$i}).prop('name', 'address#{$oDirectory_Address->id}');\n\t\t\t\t\t\t$(\\\"#{$windowId} input[name='address_country\\\\[\\\\]']\\\").eq({$i}).prop('name', 'address_country#{$oDirectory_Address->id}');\n\t\t\t\t\t\t$(\\\"#{$windowId} input[name='address_postcode\\\\[\\\\]']\\\").eq({$i}).prop('name', 'address_postcode#{$oDirectory_Address->id}');\n\t\t\t\t\t\t$(\\\"#{$windowId} input[name='address_city\\\\[\\\\]']\\\").eq({$i}).prop('name', 'address_city#{$oDirectory_Address->id}');\n\t\t\t\t\t\t\")\n\t\t\t\t\t\t->execute();\n\n\t\t\t\t\t$this->_Admin_Form_Controller->addMessage(ob_get_clean());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Электронные адреса, установленные значения\n\t\t$aCompany_Directory_Emails = $this->_object->Company_Directory_Emails->findAll();\n\t\tforeach ($aCompany_Directory_Emails as $oCompany_Directory_Email)\n\t\t{\n\t\t\t$oDirectory_Email = $oCompany_Directory_Email->Directory_Email;\n\n\t\t\t$sEmail = trim(Core_Array::getPost(\"email#{$oDirectory_Email->id}\"));\n\n\t\t\tif (!empty($sEmail))\n\t\t\t{\n\t\t\t\t$oDirectory_Email\n\t\t\t\t\t->directory_email_type_id(intval(Core_Array::getPost(\"email_type#{$oDirectory_Email->id}\", 0)))\n\t\t\t\t\t->value($sEmail)\n\t\t\t\t\t->save();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Удаляем пустую строку с полями\n\t\t\t\tob_start();\n\t\t\t\tCore::factory('Core_Html_Entity_Script')\n\t\t\t\t\t->value(\"$.deleteFormRow($(\\\"#{$windowId} select[name='email_type#{$oDirectory_Email->id}']\\\").closest('.row').find('.btn-delete111').get(0));\")\n\t\t\t\t\t->execute();\n\n\t\t\t\t$this->_Admin_Form_Controller->addMessage(ob_get_clean());\n\t\t\t\t$oCompany_Directory_Email->Directory_Email->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Электронные адреса, новые значения\n\t\t$aEmails = Core_Array::getPost('email', array());\n\t\t$aEmail_Types = Core_Array::getPost('email_type', array());\n\n\t\tif (is_array($aEmails) && count($aEmails))\n\t\t{\n\t\t\t$i = 0;\n\t\t\tforeach ($aEmails as $key => $sEmail)\n\t\t\t{\n\t\t\t\t$sEmail = trim($sEmail);\n\n\t\t\t\tif (!empty($sEmail))\n\t\t\t\t{\n\t\t\t\t\t$oDirectory_Email = Core_Entity::factory('Directory_Email')\n\t\t\t\t\t\t->directory_email_type_id(intval(Core_Array::get($aEmail_Types, $key)))\n\t\t\t\t\t\t->value($sEmail)\n\t\t\t\t\t\t->save();\n\n\t\t\t\t\t$this->_object->add($oDirectory_Email);\n\n\t\t\t\t\t//$this->_object->add($oDirectory_Email);\n\n\t\t\t\t\tob_start();\n\t\t\t\t\tCore::factory('Core_Html_Entity_Script')\n\t\t\t\t\t\t->value(\"$(\\\"#{$windowId} select[name='email_type\\\\[\\\\]']\\\").eq({$i}).prop('name', 'email_type#{$oDirectory_Email->id}').closest('.row').find('.btn-delete').removeClass('hide');\n\t\t\t\t\t\t$(\\\"#{$windowId} input[name='email\\\\[\\\\]']\\\").eq({$i}).prop('name', 'email#{$oDirectory_Email->id}');\")\n\t\t\t\t\t\t->execute();\n\n\t\t\t\t\t$this->_Admin_Form_Controller->addMessage(ob_get_clean());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Телефоны, установленные значения\n\t\t$aCompany_Directory_Phones = $this->_object->Company_Directory_Phones->findAll();\n\t\tforeach ($aCompany_Directory_Phones as $oCompany_Directory_Phone)\n\t\t{\n\t\t\t$oDirectory_Phone = $oCompany_Directory_Phone->Directory_Phone;\n\n\t\t\t$sPhone = trim(Core_Array::getPost(\"phone#{$oDirectory_Phone->id}\"));\n\n\t\t\tif (!empty($sPhone))\n\t\t\t{\n\t\t\t\t$oDirectory_Phone\n\t\t\t\t\t->directory_phone_type_id(intval(Core_Array::getPost(\"phone_type#{$oDirectory_Phone->id}\", 0)))\n\t\t\t\t\t->value($sPhone)\n\t\t\t\t\t->save();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Удаляем пустую строку с полями\n\t\t\t\tob_start();\n\t\t\t\tCore::factory('Core_Html_Entity_Script')\n\t\t\t\t\t->value(\"$.deleteFormRow($(\\\"#{$windowId} select[name='phone_type#{$oDirectory_Phone->id}']\\\").closest('.row').find('.btn-delete').get(0));\")\n\t\t\t\t\t->execute();\n\t\t\t\t$this->_Admin_Form_Controller->addMessage(ob_get_clean());\n\n\t\t\t\t$oCompany_Directory_Phone->Directory_Phone->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Телефоны, новые значения\n\t\t$aPhones = Core_Array::getPost('phone', array());\n\t\t$aPhone_Types = Core_Array::getPost('phone_type', array());\n\n\t\tif (is_array($aPhones) && count($aPhones))\n\t\t{\n\t\t\t$i = 0;\n\t\t\tforeach ($aPhones as $key => $sPhone)\n\t\t\t{\n\t\t\t\t$sPhone = trim($sPhone);\n\n\t\t\t\tif (!empty($sPhone))\n\t\t\t\t{\n\t\t\t\t\t$oDirectory_Phone = Core_Entity::factory('Directory_Phone')\n\t\t\t\t\t\t->directory_phone_type_id(intval(Core_Array::get($aPhone_Types, $key)))\n\t\t\t\t\t\t->value($sPhone)\n\t\t\t\t\t\t->save();\n\n\t\t\t\t\t$this->_object->add($oDirectory_Phone);\n\n\t\t\t\t\tob_start();\n\t\t\t\t\tCore::factory('Core_Html_Entity_Script')\n\t\t\t\t\t\t->value(\"$(\\\"#{$windowId} select[name='phone_type\\\\[\\\\]']\\\").eq({$i}).prop('name', 'phone_type#{$oDirectory_Phone->id}').closest('.row').find('.btn-delete').removeClass('hide');\n\t\t\t\t\t\t$(\\\"#{$windowId} input[name='phone\\\\[\\\\]']\\\").eq({$i}).prop('name', 'phone#{$oDirectory_Phone->id}');\n\t\t\t\t\t\t\")\n\t\t\t\t\t\t->execute();\n\n\t\t\t\t\t$this->_Admin_Form_Controller->addMessage(ob_get_clean());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Cайты, установленные значения\n\t\t$aCompany_Directory_Websites = $this->_object->Company_Directory_Websites->findAll();\n\t\tforeach ($aCompany_Directory_Websites as $oCompany_Directory_Website)\n\t\t{\n\t\t\t$oDirectory_Website = $oCompany_Directory_Website->Directory_Website;\n\n\t\t\t$sWebsite_Address = trim(Core_Array::getPost(\"website_address#{$oDirectory_Website->id}\"));\n\n\t\t\tif (!empty($sWebsite_Address))\n\t\t\t{\n\t\t\t\t$aUrl = parse_url($sWebsite_Address);\n\n\t\t\t\t// Если не был указан протокол, или\n\t\t\t\t// указанный протокол некорректен для url\n\t\t\t\t!array_key_exists('scheme', $aUrl)\n\t\t\t\t\t&& $sWebsite_Address = 'http://' . $sWebsite_Address;\n\n\t\t\t\t$oDirectory_Website\n\t\t\t\t\t->description(Core_Array::getPost(\"website_description#{$oDirectory_Website->id}\"))\n\t\t\t\t\t->value($sWebsite_Address)\n\t\t\t\t\t->save();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Удаляем пустую строку с полями\n\t\t\t\tob_start();\n\t\t\t\tCore::factory('Core_Html_Entity_Script')\n\t\t\t\t\t->value(\"$.deleteFormRow($(\\\"#{$windowId} input[name='website_address#{$oDirectory_Website->id}']\\\").closest('.row').find('.btn-delete').get(0));\")\n\t\t\t\t\t->execute();\n\n\t\t\t\t$this->_Admin_Form_Controller->addMessage(ob_get_clean());\n\t\t\t\t$oDirectory_Website->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Сайты, новые значения\n\t\t$aWebsite_Addresses = Core_Array::getPost('website_address', array());\n\t\t$aWebsite_Names = Core_Array::getPost('website_description', array());\n\n\t\tif (is_array($aWebsite_Addresses) && count($aWebsite_Addresses))\n\t\t{\n\t\t\t$i = 0;\n\n\t\t\tforeach ($aWebsite_Addresses as $key => $sWebsite_Address)\n\t\t\t{\n\t\t\t\t$sWebsite_Address = trim($sWebsite_Address);\n\n\t\t\t\tif (!empty($sWebsite_Address))\n\t\t\t\t{\n\t\t\t\t\t$aUrl = parse_url($sWebsite_Address);\n\n\t\t\t\t\t// Если не был указан протокол, или\n\t\t\t\t\t// указанный протокол некорректен для url\n\t\t\t\t\t!array_key_exists('scheme', $aUrl)\n\t\t\t\t\t\t&& $sWebsite_Address = 'http://' . $sWebsite_Address;\n\n\t\t\t\t\t$oDirectory_Website = Core_Entity::factory('Directory_Website')\n\t\t\t\t\t\t->description(Core_Array::get($aWebsite_Names, $key))\n\t\t\t\t\t\t->value($sWebsite_Address);\n\n\t\t\t\t\t$this->_object->add($oDirectory_Website);\n\n\t\t\t\t\t$oCompany_Directory_Website = $oDirectory_Website->Company_Directory_Websites->getByCompany_Id($this->_object->id);\n\n\t\t\t\t\t//$this->_object->add($oDirectory_Email);\n\n\t\t\t\t\tob_start();\n\t\t\t\t\tCore::factory('Core_Html_Entity_Script')\n\t\t\t\t\t\t->value(\"$(\\\"#{$windowId} input[name='website_address\\\\[\\\\]']\\\").eq({$i}).prop('name', 'website_address#{$oCompany_Directory_Website->id}').closest('.row').find('.btn-delete').removeClass('hide');\n\t\t\t\t\t\t$(\\\"#{$windowId} input[name='website_description\\\\[\\\\]']\\\").eq({$i}).prop('name', 'website_description#{$oCompany_Directory_Website->id}');\n\n\t\t\t\t\t\t\")\n\t\t\t\t\t\t->execute();\n\n\t\t\t\t\t$this->_Admin_Form_Controller->addMessage(ob_get_clean());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tCore_Event::notify(get_class($this) . '.onAfterRedeclaredApplyObjectProperty', $this, array($this->_Admin_Form_Controller));\n\t}", "title": "" }, { "docid": "79cb58d743c94635cd26061344c8c813", "score": "0.5656501", "text": "public function Propertydata(){\n\t\t\treturn $this->belongsTo('App\\Property','property_id','property_id');\t\n\t\t}", "title": "" }, { "docid": "4008f6472cefcc71763149c49be622c5", "score": "0.5644948", "text": "protected function setParameters() {\n\t\t\t$model = $this->model;\n\t\t\t\n\t\t\t$key = $model->getKey();\n\t\t\t$type = $model->getResourceType();\n\t\t\t\n\t\t\t$this->id = $key;\n\t\t\t$this->type = $type;\n\t\t}", "title": "" }, { "docid": "43dbd1afb51397db0bb2b20b6b6c19d3", "score": "0.56429493", "text": "public function __construct(){\n\n $this->settings = parnassus::instance()->configuration()->Relationship_Manager;\n\n }", "title": "" }, { "docid": "9077f3d07444d7b8e0bfc1a49629e494", "score": "0.5641688", "text": "public function properties(){\n\n // Every Admin must be logged in\n // and have admin priv..\n $session = session();\n $user_login = $session->get('logged_in');\n $user_data = $session->get('logged_data');\n\n if( !$user_login || $user_data->user_role != 'admin' ){\n return redirect()->to(site_url('user/login'));\n }\n\n # load users model\n $props = model(\"PropertyModel\");\n # user list\n $user_list = false;\n # Set limit & offset\n $limit = 1;\n $offset = 0;\n $current_p = 0;\n\n if( @$this->request->getGet('page') ){\n // Check is page valid it cannot be 0\n if( $this->request->getGet('page') == 0 ){\n $offset = 0;\n } else {\n $offset = ( ( $this->request->getGet('page') - 1 ) * 50 );\n $current_p = $this->request->getGet('page');\n }\n }\n\n # Render #\n return view('admin/dashboard/properties', [\n \n 'header' => view('admin/header'),\n 'menu' => view('admin/main_menu'),\n 'nav' => view('admin/navigation'),\n 'footer' => view('admin/footer'),\n 'props' => $props->list_props($offset),\n 'current_p' => $current_p,\n 'next_page' => $current_p + 1,\n 'prev_page' => $current_p - 1\n\n ]);\n }", "title": "" }, { "docid": "f16815bc37f82031526b47f3b15f826b", "score": "0.56365746", "text": "public function saveProperties()\n\t{\n\n\t\tif (!$this->objectId) $this->objectId = \"0\";\n\t\t\n\t\t$sql = \"SELECT data FROM docmgr.dm_properties WHERE object_id='\".$this->objectId.\"'\";\n\t\t$info = $this->DB->single($sql);\n\n\t\tif (is_array($this->apidata[\"properties\"])) $this->apidata[\"properties\"] = serialize($this->apidata[\"properties\"]);\n\n\t\t$opt = null;\n\t\t$opt[\"data\"] = $this->apidata[\"properties\"];\n\n\t\tif ($info)\n\t\t{\n\t\t\t$opt[\"where\"] = \"object_id='\".$this->objectId.\"'\";\n\t\t\t$this->DB->update(\"docmgr.dm_properties\",$opt);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$opt[\"object_id\"] = $this->objectId;\n\t\t\t$this->DB->insert(\"docmgr.dm_properties\",$opt);\n\t\t}\n\n\t}", "title": "" }, { "docid": "f6ffb6e46ed8329d6a2f015f951fb829", "score": "0.5616128", "text": "protected function getExposableModelProperties()\n {\n return [\"leafName\", \"leafPath\"];\n }", "title": "" }, { "docid": "e016a89342e1bc150c7a1cd7ef61b98b", "score": "0.560925", "text": "function restws_schema_ui_property_settings(&$form, &$form_state, $resource, $map, $entity, $bundle) {\n $schema = restws_schema_get();\n\n // Get properties of the entity type.\n $info = entity_get_property_info($entity);\n $properties = isset($info['properties']) ? $info['properties'] : array();\n // Get properties of the selected bundle.\n if (isset($info['bundles'][$bundle]['properties'])) {\n $properties += $info['bundles'][$bundle]['properties'];\n }\n\n $options = array();\n foreach ($properties as $name => $info) {\n $label = array();\n foreach(array('label', 'description') as $key) {\n if (isset($info[$key])) {\n $label[] = $info[$key];\n }\n }\n $options[$name] = implode(': ', $label);\n }\n asort($options, SORT_NATURAL | SORT_FLAG_CASE);\n\n // Get restws_schema resource properties.\n foreach ($schema[$resource]['properties'] as $name => $info) {\n $property = restws_schema_ui_get_selected($form_state, $resource, $map, $name, $element);\n $form[$element] = array(\n '#title' => $info['label'],\n '#options' => $options,\n '#default_value' => $property,\n ) + restws_schema_ui_element_common();\n }\n}", "title": "" }, { "docid": "c615de41e3761ac1fa0f451319fb32da", "score": "0.5589643", "text": "function getPropertiesFormValues()\n\t{\n\t\tglobal $ilUser;\n\n\t\t$values = array();\n\n\t\t$title = $this->object->getTitle();\n\t\t$description = $this->object->getDescription();\n\t\tinclude_once(\"./Services/Object/classes/class.ilObjectTranslation.php\");\n\t\t$ot = ilObjectTranslation::getInstance($this->object->getId());\n\t\tif ($ot->getContentActivated())\n\t\t{\n\t\t\t$title = $ot->getDefaultTitle();\n\t\t\t$description = $ot->getDefaultDescription();\n\t\t}\n\n\t\t$values[\"title\"] = $title;\n\t\t$values[\"description\"] = $description;\n\t\tif ($this->object->getOnline())\n\t\t{\n\t\t\t$values[\"cobj_online\"] = true;\n\t\t}\n\t\t$values[\"lm_layout\"] = $this->object->getLayout();\n\t\t$values[\"lm_pg_header\"] = $this->object->getPageHeader();\n\t\tif ($this->object->isActiveNumbering())\n\t\t{\n\t\t\t$values[\"cobj_act_number\"] = true;\n\t\t}\n\t\t$values[\"toc_mode\"] = $this->object->getTOCMode();\n\t\tif ($this->object->publicNotes())\n\t\t{\n\t\t\t$values[\"cobj_pub_notes\"] = true;\n\t\t}\n\t\tif ($this->object->cleanFrames())\n\t\t{\n\t\t\t$values[\"cobj_clean_frames\"] = true;\n\t\t}\n\t\tif ($this->object->isActiveHistoryUserComments())\n\t\t{\n\t\t\t$values[\"cobj_user_comments\"] = true;\n\t\t}\n\t\t$values[\"layout_per_page\"] = $this->object->getLayoutPerPage();\n\t\t$values[\"rating\"] = $this->object->hasRating();\n\t\t$values[\"rating_pages\"] = $this->object->hasRatingPages();\n\t\t$values[\"disable_def_feedback\"] = $this->object->getDisableDefaultFeedback();\n\t\t$values[\"progr_icons\"] = $this->object->getProgressIcons();\n\t\t$values[\"store_tries\"] = $this->object->getStoreTries();\n\t\t$values[\"restrict_forw_nav\"] = $this->object->getRestrictForwardNavigation();\n\n\t\tinclude_once \"./Services/Notification/classes/class.ilNotification.php\";\n\t\t$values[\"notification_blocked_users\"] = ilNotification::hasNotification(\n\t\t\tilNotification::TYPE_LM_BLOCKED_USERS, $ilUser->getId(),\n\t\t\t$this->object->getId());\n\n\t\t$this->form->setValuesByArray($values);\n\t}", "title": "" }, { "docid": "328bda3988494dd78324b13ef1420398", "score": "0.55865765", "text": "private function payloadSettings()\n {\n $options = ['uri', 'ip', 'referer', 'user-agent', 'cookies', 'localstorage', 'sessionstorage', 'dom', 'origin', 'screenshot'];\n\n foreach ($options as $option) {\n if ($this->getPostValue($option) !== null) {\n $this->model('Setting')->set(\"collect_{$option}\", '1');\n } else {\n $this->model('Setting')->set(\"collect_{$option}\", '0');\n }\n }\n\n $this->model('Setting')->set(\"customjs\", $this->getPostValue('customjs'));\n\n $persistent = $this->getPostValue('persistenton');\n $this->model('Setting')->set('persistent', $persistent !== null ? '1' : '0');\n }", "title": "" }, { "docid": "8cc34170f9bd88c8dc6b63afa1978862", "score": "0.55850935", "text": "public function __construct(SettingModel $model)\n {\n $this->model = $model;\n\n $this->settings = $this->model->all();\n }", "title": "" }, { "docid": "cc4eea6ad02e9895a8d7820a0e42e2b1", "score": "0.55799025", "text": "function get_settings()\r\n {\r\n global $c5t;\r\n\r\n $properties = $this->get_property('setting_names');\r\n foreach ($properties AS $name)\r\n {\r\n if (array_key_exists($name, $c5t)) {\r\n $this->add_property($name, $c5t[$name]);\r\n }\r\n }\r\n\r\n // Default settings\r\n $this->add_property('module_path', C5T_ROOT . $c5t['module_directory'] . get_class($this) . '/');\r\n $this->add_property('system_root', C5T_ROOT);\r\n }", "title": "" }, { "docid": "1febf44d9f117b0a39a1db56057d4b2e", "score": "0.5578332", "text": "protected function setupProperties()\n {\n parent::setupProperties();\n\n $type_name = $this->getData('type')->getPackagePrefix();\n $this->choices = [];\n\n $migrations = $this->getContext()\n ->getServiceLocator()\n ->getMigrationService()\n ->getMigrationList($type_name . '::migration::view_store');\n\n foreach ($migrations as $migration) {\n $this->choices[] = sprintf('%s:%s', $migration->getVersion(), $migration->getName());\n }\n\n $this->choices[] = self::NONE_MIGRATION;\n }", "title": "" }, { "docid": "42de58a533250ae77a9e6b88633bea15", "score": "0.5575055", "text": "public function get_settings();", "title": "" }, { "docid": "42de58a533250ae77a9e6b88633bea15", "score": "0.5575055", "text": "public function get_settings();", "title": "" }, { "docid": "1c38cc5d09200070f61cc6c04f91ba62", "score": "0.5571257", "text": "public function fillModel()\n\t{\n\t\tnew ModelFormatter($this);\n\t\tnew TrustPilotDataValidator($this);\n\t}", "title": "" }, { "docid": "669b547fc520852a971a66ac2b571c34", "score": "0.556087", "text": "protected function initializeModel()\r\n {\r\n }", "title": "" }, { "docid": "f2bb93de938a188ac7c9b8cbd655d0ba", "score": "0.55522126", "text": "protected function applyCustomSettings()\n {\n if ($this->isListAction())\n {\n $this['created_at']->enable();\n }\n \n $this['is_routine']\n ->setLabel(__('Routine', null, 'ullTimeMessages'))\n ;\n \n $this['is_visible_only_for_project_manager']\n ->setLabel(__('Is visible only for project manager', null, 'ullTimeMessages'))\n ->setHelp(__('If checked other users cannot see or select this project', null, 'ullTimeMessages'))\n ;\n \n if ($this->isCreateOrEditAction())\n {\n //TODO: giving the model shouldn't be necessary.\n //It's only necessary because of a workaround (see schema)\n $this->useManyToManyRelation('Manager', 'UllUser');\n \n $this->order(array(\n 'name',\n 'description',\n 'is_active',\n 'is_routine',\n 'Manager'\n )); \n }\n\n\n }", "title": "" }, { "docid": "f5d14aab8bf222a30590b8c06e59292a", "score": "0.55507237", "text": "function setup(Model $model, $settings = array())\n {\n $field = (isset($settings['field']))?$settings['field']:'content';\n $this->settings[$model->alias] = array('field' => $field);\n }", "title": "" }, { "docid": "bccd747d985de1d07e96070c118536fa", "score": "0.55437315", "text": "public function _getSettings() {\n $this->loadModel('Setting');\n $settings = $this->Setting->find('list', array('fields' => array('field', 'value')));\n return $settings;\n }", "title": "" }, { "docid": "1376d96892c2dee2d040c971e558bcae", "score": "0.5530768", "text": "public function __construct()\n {\n parent::__construct();\n \n $settings = $this->CI->settings_model;\n \n foreach ($settings->toArray() as $param=>$value)\n {\n if( preg_match(\"/^{$this->c_table}_(\\w+)/\",$param,$match) && isset($this->photo_data[$match[1]]) ) \n {\n $this->photo_data[$match[1]] = $settings[$param];\n }\n }\n \n $this->upload_config['max_size'] = ( (@$this->CI->settings_model['upload_max_filesize']) ? $this->CI->settings_model['upload_max_filesize'] : 2048 );\n }", "title": "" }, { "docid": "7f3ff9c0771479f15e6152c3db0199b5", "score": "0.551779", "text": "public function __construct() {\n $this->testProperty = \"Test only\";\n }", "title": "" }, { "docid": "79216622f05d606687be2e4cfa15145a", "score": "0.5514697", "text": "public function AdminModel(){\n\t\t\n\t}", "title": "" }, { "docid": "abc5dbab3ec64abd4b2d3f5a6b6d3a21", "score": "0.5514372", "text": "function setup(&$model, $config = array()) { \n $this->settings = am(array('typeField' => 'type'), $config); \n $this->rootClass = $this->__getRootClassName($model); \n $this->typeField = $this->settings['typeField']; \n }", "title": "" }, { "docid": "202cb99b8bbe3832cc40c928d7dcc0f2", "score": "0.55131066", "text": "public function TemplateModel(){\n\t\t\n\t\t//Allow Plugins.\n\t\tObservable::Observable();\n\t}", "title": "" }, { "docid": "d86bec247ba8c94b556b32119abb94c0", "score": "0.55006146", "text": "public function save() {\n\t\t$this->properties->store($this->_config);\n }", "title": "" }, { "docid": "d7fff2f57125cd90293ef1e9a58d8e8e", "score": "0.54954827", "text": "function setup(&$Model, $config = array()) {\n\t\t$this->settings[$Model->alias] = Set::merge($this->_defaultSettings, $config);\n\t\tif (empty($this->__sKeys)) {\n\t\t\t$this->__sKeys = array_merge(\n\t\t\t\tarray_keys($this->settings[$Model->alias]), array('fields', 'alias', 'conditions'));\n\t\t}\n\t\tforeach ($Model->__associations as $association) {\n\t\t\t$this->__reset[$Model->alias][$association] = $Model->{$association};\n\t\t}\n\t}", "title": "" }, { "docid": "5935fa549d8269c26bda2ed51bc79d2f", "score": "0.5484259", "text": "public static function PrepareSettings($arProperty)\n\t{\n\t\t//but it just sets starting value for it\n\t\tif(\n\t\t\tis_array($arProperty[\"USER_TYPE_SETTINGS\"])\n\t\t\t&& isset($arProperty[\"USER_TYPE_SETTINGS\"][\"current_value\"])\n\t\t\t&& intval($arProperty[\"USER_TYPE_SETTINGS\"][\"current_value\"]) > 0\n\t\t)\n\t\t{\n\t\t\t$seq = new CIBlockSequence($arProperty[\"IBLOCK_ID\"], $arProperty[\"ID\"]);\n\t\t\t$seq->SetNext($arProperty[\"USER_TYPE_SETTINGS\"][\"current_value\"]);\n\t\t}\n\n\t\tif(is_array($arProperty[\"USER_TYPE_SETTINGS\"]) && $arProperty[\"USER_TYPE_SETTINGS\"][\"write\"]===\"Y\")\n\t\t\t$strWritable = \"Y\";\n\t\telse\n\t\t\t$strWritable = \"N\";\n\n\t\t$arProperty['USER_TYPE_SETTINGS'] = array(\n\t\t\t\"write\" => $strWritable,\n\t\t);\n\t\treturn $arProperty;\n\t}", "title": "" }, { "docid": "2a7d241c6212cc594e219e09344e29e2", "score": "0.5476779", "text": "function getAeModelPropertyInfo() {\n $res = array();\n foreach ($this->listPassthroughVars() as $ptv) {\n $val = false;\n if (method_exists($this, $getter = 'get'.$ptv)) $val = $this->$getter();\n else $val = $this->$ptv;\n if ($val && (!is_array($val) || count($val)))\n $res[$ptv] = $val;\n }\n if (!$this->isEnabled()) $res = array_merge($res, array('isEnabled' => $this->isEnabled()));\n $res = array_merge($res, $this->extraPropertyInfo);\n return $res;\n }", "title": "" }, { "docid": "fcab8cfee62c29c4dd1c0b1190d3d55d", "score": "0.5469946", "text": "public function run()\n {\n $model = new Setting();\n $model->id = 'company';\n $model->name = '<span class=\"headline font-weight-light\">Monoland</span><span class=\"headline font-weight-bold\">Awesome</span>';\n $model->title = '<div class=\"d-block display-1 text-uppercase\"><span class=\"font-weight-light\">let\\'s build</span><span class=\"font-weight-bold\"> awesome apps</span></div>';\n $model->quote = '<span class=\"d-block\">Lorem ipsum dolor sit amet consectetur adipisicing elit. Itaque numquam facilis assumenda dicta nihil ut aperiam vero blanditiis, cupiditate, natus, sint temporibus est odio molestias necessitatibus fuga dolore! Doloribus, cupiditate!</span>';\n $model->logo = '/images/logo-holder.png';\n $model->background = '/images/back-holder.jpg';\n $model->height = '120px';\n $model->width = '120px';\n $model->save();\n }", "title": "" }, { "docid": "e7596ca1347db6fdcd058598272ea44f", "score": "0.54646844", "text": "function __viewSettings()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //flow control\n $next = true;\n\n //------get all data for clients-------\n $result = $this->clientsoptionalfields_model->optionalFields('all');\n $this->data['debug'][] = $this->clientsoptionalfields_model->debug_data;\n\n //create tbs merge fields for each row (3 rows)\n for ($i = 1; $i < 4; $i++) {\n $e = $i - 1; //go back one number as array start from '0'\n $this->data['reg_fields'][] = \"cf$i\";\n $this->data['fields'][\"cf$i\"] = $result[$e];\n }\n\n //------get all data for projects------\n $result = $this->projectsoptionalfields_model->optionalFields('all');\n $this->data['debug'][] = $this->projectsoptionalfields_model->debug_data;\n\n //create tbs merge fields for each row (5 rows)\n for ($i = 1; $i < 6; $i++) {\n $e = $i - 1; //go back one number as array start from '0'\n $this->data['reg_fields'][] = \"pf$i\";\n $this->data['fields'][\"pf$i\"] = $result[$e];\n }\n\n }", "title": "" }, { "docid": "a107dcd95c92dc5ebb3edb051e8baeac", "score": "0.5461712", "text": "public function settings() {\n return $this->settings;\n }", "title": "" }, { "docid": "e5d92175c8fc43b37289fa863045d61d", "score": "0.54545444", "text": "private function _inspect()\n\t{\n\t\t$this->_modelClass = is_subclass_of($this->_model, 'P3\\ActiveRecord\\Collection\\Base') ? $this->_model->getContentClass() : get_class($this->_model);\n\t\t$this->_modelField = isset($this->_options['as']) ? $this->_options['as'] : str::fromCamelCase($this->_modelClass);\n\t\t$this->_action = $this->_model->isNew() ? 'create' : 'update';\n\t\t$this->_id = ($this->_model->isNew() ? 'new-' : 'edit-').str::fromCamelCase($this->_modelClass);\n\t\tif(!$this->_model->isNew()) $this->_id .= '-'.$this->_model->id();\n\n\t\tif(!isset($this->_options['id'])) $this->_options['id'] = $this->_id;\n\t}", "title": "" }, { "docid": "12dab35ecc46b0ffb7b92123add1dd69", "score": "0.54507315", "text": "function get() {\n \treturn $this->settings;\n }", "title": "" }, { "docid": "4800588cce56ec63e5851e6c552b36a7", "score": "0.5444976", "text": "private function loadProperties() {\n\t\tglobal $ilDB;\n\n\t\t$query = \"SELECT datatype_prop_id, \n\t\t\t\t\t\t\t\t\t\ttitle, \n\t\t\t\t\t\t\t\t\t\tvalue \n\t\t\t\t\t\tFROM il_dcl_field_prop fp \n\t\t\t\t\t\tLEFT JOIN il_dcl_datatype_prop AS p ON p.id = fp.datatype_prop_id\n\t\t\t\t\t\tWHERE fp.field_id = \" . $ilDB->quote($this->getId(), \"integer\");\n\n\t\t$set = $ilDB->query($query);\n\n\t\twhile ($rec = $ilDB->fetchAssoc($set)) {\n\t\t\t$this->setPropertyvalue($rec['value'], $rec['datatype_prop_id']);\n\t\t}\n\t}", "title": "" }, { "docid": "1a5bf5a4d521f99f1d9e021c7e45d56c", "score": "0.54395497", "text": "public function settings()\n {\n woocommerce_admin_fields( self::get_settings() );\n }", "title": "" }, { "docid": "badde303b0572d33d5f7472c807f595d", "score": "0.5438745", "text": "public function modelData()\n {\n return [\n 'title'=> $this->title,\n 'slug' => $this->slug,\n 'context' => $this->context,\n 'is_default_home' => $this->isSetToBeDefaultHomePage,\n 'is_default_not_found' => $this->isSetToBeDefaultNotFoundPage, \n ];\n }", "title": "" }, { "docid": "5874fbff0250b3143217a21a37ff0d5c", "score": "0.54324216", "text": "abstract public function modelDetailsConfig(): array;", "title": "" }, { "docid": "162297033249c1bae7e0b55578ccf59e", "score": "0.5428622", "text": "function _initSettingFields(){\n ;\n }", "title": "" }, { "docid": "4b008d1c65be0302540b8cde181fc50a", "score": "0.54226667", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->settings = new Setting;\n }", "title": "" }, { "docid": "09e587b4cc742dbbcd30ccf495c182f6", "score": "0.5419166", "text": "public function properties()\n {\n //um para muitos(Qual modelo quero me relacionar, 'qual id desse modelo me faz referencia' , 'qual meu id faz referencia a ele')\n return $this->hasMany(Property::class, 'user', 'id');\n }", "title": "" }, { "docid": "8e99428c96581b1e4174270d4208a611", "score": "0.5414934", "text": "public function __construct(WebsiteSettingModel $model)\n {\n $this->model = $model;\n }", "title": "" }, { "docid": "9cafc46b5ca20bfed0b8c62fdd470e41", "score": "0.54008126", "text": "public function attributeActiveFieldSettings();", "title": "" }, { "docid": "e10b68bdf776fd68644e936ebb2bee08", "score": "0.53952324", "text": "function setup(&$model, $config = array())\n {\n\n if (!$model->useTable) {\n // Model is not tied to a database table.\n return;\n }\n\n $this->settings[$model->alias] = array_merge($this->_defaults, (array) $config);\n\n if (empty($this->_userId)) {\n $this->_userId = $this->_getAuthedUserId($model);\n }\n $this->settings[$model->alias]['map'] = $this->_buildFieldMap($model);\n\n if ('model' == $this->settings[$model->alias]['auto_bind']) {\n $this->_bindModels($model);\n } else if ('embed' == $this->settings[$model->alias]['auto_bind']) {\n // auto grab the creator and updater name for those tables that have\n // creator_id and updater_id\n $local_alias = $model->alias.'1';\n if ($model->hasField($this->settings[$model->alias]['fields']['created'])) {\n $model->virtualFields['creator'] = sprintf('SELECT %s FROM users as Creator JOIN %s as %s ON Creator.id = %s.%s WHERE %s.id = %s.id',\n $this->settings[$model->alias]['display_fields']['created'], $model->table,\n $local_alias, $local_alias, $this->settings[$model->alias]['fields']['created'],\n $local_alias, $model->alias);\n }\n\n if ($model->hasField($this->settings[$model->alias]['fields']['modified'])) {\n $model->virtualFields['updater'] = sprintf('SELECT %s FROM users as Updater JOIN %s as %s ON Updater.id = %s.%s WHERE %s.id = %s.id',\n $this->settings[$model->alias]['display_fields']['modified'], $model->table,\n $local_alias, $local_alias, $this->settings[$model->alias]['fields']['modified'],\n $local_alias, $model->alias);\n }\n }\n }", "title": "" }, { "docid": "cc052158466958630ea0bd197127a924", "score": "0.5393327", "text": "public function settings() {\n $id = $this->requireLoggedInUser();\n $this->set([\n 'users' => [$this->Users->get($id)],\n ]);\n }", "title": "" }, { "docid": "aedf567e383ec2061c08fe16a7b2a235", "score": "0.5390848", "text": "function setup(&$model, $settings) {\n if(!array_key_exists($this->fieldName, $model->_schema))\n \t$this->cakeError('message', array('message'=>'The field \"'.$model->name.'.'.$this->fieldName.'\" could not be found.'));\n }", "title": "" }, { "docid": "9c13348bea8a0a8b612fd2072968c29e", "score": "0.5389707", "text": "public function testSettings()\r\n\t{\r\n\t\t$rand = mt_rand(0, 300);\r\n\t\t$rand2 = mt_rand(0, 300);\r\n\r\n\t\t// Read default setting\r\n\t\t$this->assertEquals(250, $this->mgr->get('sidebarWidth'));\r\n\r\n\t\t// Set setting which has no scope/object\r\n\t\t$this->mgr->set('sidebarWidth', $rand);\r\n\t\t$this->assertEquals($rand, $this->mgr->get('sidebarWidth'));\r\n\r\n\t\t// Set setting with scope\r\n\t\t$this->mgr->set('pageSize', $rand, 'schema.tables');\r\n\t\t$this->assertEquals($rand, $this->mgr->get('pageSize', 'schema.tables'));\r\n\t\t$this->assertEquals($rand, $this->mgr->get('pageSize', 'schema.tables', $rand));\r\n\r\n\t\t// Set setting with scope and object\r\n\t\t$this->mgr->set('pageSize', $rand, 'schema.tables', 'project_com2date');\r\n\t\t$this->assertEquals($rand, $this->mgr->get('pageSize', 'schema.tables', 'project_com2date'));\r\n\r\n\t\t// Set array\r\n\t\t$this->mgr->set('pageSize', array($rand, $rand2), 'schema.tables');\r\n\t\t$this->assertEquals('a:2:{i:0;i:' . $rand . ';i:1;i:' . $rand2 . ';}', serialize($this->mgr->get('pageSize', 'schema.tables')));\r\n\t}", "title": "" }, { "docid": "cad8795d594ba7a80757dc7b4fa43cad", "score": "0.5386751", "text": "public function property()\n {\n return $this->belongsTo('App\\Property');\n }", "title": "" }, { "docid": "3b024767e996c5c26046c6ec94213bcb", "score": "0.5383499", "text": "public function __construct()\n {\n parent::__construct(Setting::class);\n }", "title": "" }, { "docid": "b3c62f0bc393b3b89a07bfeaac968461", "score": "0.5381045", "text": "public function __construct() {\n parent::__construct();\n\n $this->targetModel = 'options_model';\n $this->page_config['tablePrimaryKey'] = $this->options_model->get_primary_key(); //pk\n /* * page_config* */\n $this->page_config['title'] = 'Option'; //search title bar\n $this->page_config['searchFields'] = 'option_key,option_value'; //search box,\n $this->get_site_setting(true);\n /* * end page_config* */\n }", "title": "" }, { "docid": "92063407fd1e9a626de10e7eaabaef63", "score": "0.5379913", "text": "protected function defineSettings()\n {\n return array(\n 'someSetting' => array(AttributeType::String, 'label' => 'Some Setting', 'default' => ''),\n );\n }", "title": "" }, { "docid": "af4f523f71124725895cf7e39fd5ff37", "score": "0.5378668", "text": "protected function __construct() {\n $this->properties = array();\n \n $this->load();\n }", "title": "" }, { "docid": "5eca03a1631b897cd31dabc0c3a10017", "score": "0.53755367", "text": "public function plugin_settings() {\r\n\t}", "title": "" }, { "docid": "822b51812543106ea1a8a84637a202bc", "score": "0.53698635", "text": "protected function _applyObjectProperty()\r\n\t{\r\n\t\t$aFormValues = $this->_formValues;\r\n\t\t$sModelName = Core_Array::get($aFormValues, 'model_name', false);\r\n\t\t$sModelCode = Core_Array::get($aFormValues, 'model_file', '');\r\n\r\n\t\tif (!$this->checkTypeClassName($sModelName)) {\r\n\t\t\tthrow new Exception(\"Неправильный формат имени класса модели значения типа данных. Имя должно иметь следующий формат: Table_Cell_Value_#Type#\", 1);\r\n\t\t}\r\n\r\n\t\t// move to constructor?\r\n\t\t// create dir path name\r\n\t\t$sDirPathName = CMS_FOLDER\r\n\t\t. 'modules'\r\n\t\t. DIRECTORY_SEPARATOR\r\n\t\t. implode(DIRECTORY_SEPARATOR,explode('_', strtolower($sModelName)));\r\n\r\n\t\t$sFilePathName = $sDirPathName . DIRECTORY_SEPARATOR . 'model.php';\r\n\r\n\t\tCore_File::mkdir($sDirPathName);\r\n\r\n\t\tif (Core_File::filesize($sFilePathName)) {\r\n\t\t\tCore_File::write($sFilePathName, $sModelCode, CHMOD_FILE);\r\n\t\t} else {\r\n\t\t\tCore_File::write($sFilePathName, $sModelCode, CHMOD_FILE);\r\n\t\t}\r\n\r\n\r\n\r\n\t\t// Core_File::mkdir();\r\n\t\tparent::_applyObjectProperty(); // saving row, now we can get Table_Row id\r\n\t\t// Core_File::file\r\n\t}", "title": "" }, { "docid": "ba16ffa16265235672534bdd732d5de1", "score": "0.53687257", "text": "public function setModel()\n {\n // set model Class\n if (!isset($this->modelClass))\n $this->modelClass = get_class($this->model);\n // set IDs\n if (is_null($this->model->id))\n $this->model->id = false;\n if (is_null($this->parent_id))\n $this->parent_id = $this->model->id;\n if (is_null($this->subdir))\n $this->subdir = $this->model->id;\n }", "title": "" }, { "docid": "ee72ba01aab269bf31243a9282052328", "score": "0.5363046", "text": "function getSetting($name){\n\nreturn Model_Settings_getSettingByName($name);\n }", "title": "" }, { "docid": "d661c4c00e39f5c2ecc4cf07b950e997", "score": "0.53574854", "text": "public function run()\n {\n $model = new Setting();\n $model->id = 'company';\n $model->name = 'Monoland';\n $model->slogan = 'Build your apps with passion';\n $model->avatar = null;\n $model->height = '120px';\n $model->width = '120px';\n $model->save();\n }", "title": "" }, { "docid": "b48271478776c501f6b802cd1e6057f2", "score": "0.5356274", "text": "public function model(): string\n {\n return Settings::class;\n }", "title": "" }, { "docid": "8577f90ce878ab74ed90c7ce14619812", "score": "0.53444916", "text": "public function property(){\n\n // Every Admin must be logged in\n // and have admin priv..\n $session = session();\n $user_login = $session->get('logged_in');\n $user_data = $session->get('logged_data');\n\n if( !$user_login || $user_data->user_role != 'admin' ){\n return redirect()->to(site_url('user/login'));\n }\n\n # Models #\n $prop_model = model('PropertyModel');\n\n # Error Handler #\n $error_handler = false;\n $success_handler = false;\n\n $errors = [\n \"1e\" => \"Cannot Access to Service Direct\",\n \"2e\" => \"Cannot Add Empty Field\",\n \"3e\" => \"Something is wrong with Database Connection\",\n \"4e\" => \"Error Occured! Undefined!\"\n ];\n\n $success = [\n\n \"1e\" => \"Property Type is added to Database! It is available now..\"\n\n ];\n\n # Check For Error #\n if( @$this->request->getGet('error') ){ \n if( array_key_exists($this->request->getGet('error'), $errors) ){\n $error_handler = $errors[$this->request->getGet('error')];\n } else {\n $error_handler = $errors['4e'];\n }\n }\n\n # Check For Response #\n if( @$this->request->getGet('success') ){ \n if( array_key_exists($this->request->getGet('success'), $success) ){\n $success_handler = $success[$this->request->getGet('success')];\n } else {\n $error_handler = $errors['4e'];\n }\n }\n\n # Render #\n return view('admin/dashboard/property', [\n \n 'header' => view('admin/header'),\n 'menu' => view('admin/main_menu'),\n 'nav' => view('admin/navigation'),\n 'footer' => view('admin/footer'),\n 'error' => $error_handler ? $error_handler : false,\n 'success' => $success_handler ? $success_handler : false,\n 'properties' => $prop_model->get_props(\"property_type\")\n\n ]);\n\n }", "title": "" }, { "docid": "42b8ffe7024b68b67f8ba9d0a350988b", "score": "0.5342827", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->load->model('settings_m');\n }", "title": "" }, { "docid": "3d2a2aaaf3143b17772322308040724f", "score": "0.53421915", "text": "public function formatted_model_data() {\n\n\t\t$model['pid'] = $this->get_id();\n\t\t$model['settings']['general'] = $this->get_general();\n\t\t$model['settings']['general']['status'] = array(\n\t\t\t'sync' => array(\n\t\t\t\t'type' => 'none',\n\t\t\t\t'pid' => 0\n\t\t\t)\n\t\t);\n\t\t$model['settings']['general'] = array_reverse( $model['settings']['general'] );\n\t\t$model['settings']['style'] = $this->get_style();\n\t\t$model['settings']['advanced'] = $this->get_advanced();\n\t\t$model['settings']['cpo_general'] = $this->get_cpo_general();\n\t\t$model['settings']['cpo_general']['main']['cpo_slug'] = $this->get_slug_ending();\n\t\t$model['settings']['cpo_suboptions'] = $this->get_cpo_suboptions();\n\t\t$model['settings']['cpo_rules'] = $this->get_cpo_rules();\n\t\t$model['settings']['cpo_conditional'] = $this->get_cpo_conditional();\n\t\t$model['settings']['cpo_validation'] = $this->get_cpo_validation();\n\n\t\treturn stripslashes_deep( $model );\n\t}", "title": "" }, { "docid": "8f4c59a8578e78faaadc19bc242f1be6", "score": "0.534126", "text": "protected function applyCustomSettings()\n {\n $this->disable(array('creator_user_id', 'created_at', 'ull_ventory_item_id'));\n \n $this['updated_at']->setMetaWidgetClassName('ullMetaWidgetDate');\n\n if ($this->isListAction())\n {\n $this['id']->disable();\n }\n\n if ($this->isAction(array('createWithType', 'edit')))\n {\n $this->disable(array('updator_user_id', 'updated_at'));\n \n $this['id']\n ->setAccess('w')\n ->setWidgetOption('is_hidden', true)\n ;\n $this['ull_ventory_item_type_attribute_id']->setWidgetOption('is_hidden', true);\n\n $typeAttribute = $this->getAttributeValue()->UllVentoryItemTypeAttribute;\n $itemAttribute = $typeAttribute->UllVentoryItemAttribute;\n \n $this['value']\n ->setValidatorOption('required', $typeAttribute->is_mandatory)\n ->setMetaWidgetClassName($itemAttribute->UllColumnType->class)\n ;\n \n if ($options = $itemAttribute->options)\n {\n $this['value']->\n setOptions(array_merge(sfToolkit::stringToArray($options), $this['value']->getOptions()))\n ;\n }\n \n $this['comment']\n ->setMetaWidgetClassName('ullMetaWidgetString')\n ->setWidgetAttribute('size', 24)\n ;\n }\n \n }", "title": "" }, { "docid": "9b0e2434a90fd7fc9300c9a7749eb078", "score": "0.5340613", "text": "public function getModel()\n\t{\n\t\tif($this->_model===null)\n\t\t\t$this->_model=Settings::model()->find(); \n\t\treturn $this->_model;\n\t}", "title": "" }, { "docid": "a2a00a1ccb5803b3be2fa2aca921bbbb", "score": "0.5336454", "text": "public function __construct() {\n global $sys;\n\n $settings = $sys->db->query(\"SELECT `setting_name`, `setting_value` FROM `settings`\");\n $settings = (false === $settings) ? array() : $settings;\n \n foreach ($settings as $setting) {\n $this->_settings[$setting['setting_name']] = $setting['setting_value'];\n }\n \n if (array_key_exists('update_settings', $_POST) && $this->is_admin()) {\n $this->update_settings();\n }\n }", "title": "" }, { "docid": "4bad715dbe9ef3935022844064f153df", "score": "0.53269243", "text": "function __construct()\n {\n global $settings;\n $this->view = new View();\n $this->model = new Model();\n $this->design_var = new stdClass();\n $this->design_var->settings = $settings;\n $this->design_var->meta_title = '';\n $this->design_var->meta_description = '';\n $this->design_var->meta_keywords = '';\n \n if(isset($_SESSION['admin_id']) && !empty($_SESSION['admin_id'])){\n $this->manager = $this->model->get_data('admin', ['id'=>$_SESSION['admin_id']]);\n $this->design_var->manager = $this->manager;\n //$this->manager_permisions = $this->design_var->manager->permisions;\n }\n \n /* if(!empty($this->design_var->manager)){\n $this->design_var->menu = $this->model->get_data('menu', ['permisions'=>$this->manager_permisions]);\n } */\n \n }", "title": "" }, { "docid": "804c93db93b8ae4e18821440b9071cf6", "score": "0.53249", "text": "public function loadSetting();", "title": "" }, { "docid": "06bf863a6fc8c45e8323ebd7677495d9", "score": "0.53241235", "text": "protected function getModel()\n {\n return new HeadSetting();\n }", "title": "" }, { "docid": "15b15fdd36ec0c37136bab792795524f", "score": "0.5320665", "text": "protected function setProperties()\n {\n $importPluginProperties = new ImportPluginProperties();\n $importPluginProperties->setText('SQL');\n $importPluginProperties->setExtension('sql');\n $importPluginProperties->setOptionsText(__('Options'));\n\n $compats = $GLOBALS['dbi']->getCompatibilities();\n if (count($compats) > 0) {\n $values = array();\n foreach ($compats as $val) {\n $values[$val] = $val;\n }\n\n // create the root group that will be the options field for\n // $importPluginProperties\n // this will be shown as \"Format specific options\"\n $importSpecificOptions = new OptionsPropertyRootGroup(\n \"Format Specific Options\"\n );\n\n // general options main group\n $generalOptions = new OptionsPropertyMainGroup(\"general_opts\");\n // create primary items and add them to the group\n $leaf = new SelectPropertyItem(\n \"compatibility\",\n __('SQL compatibility mode:')\n );\n $leaf->setValues($values);\n $leaf->setDoc(\n array(\n 'manual_MySQL_Database_Administration',\n 'Server_SQL_mode',\n )\n );\n $generalOptions->addProperty($leaf);\n $leaf = new BoolPropertyItem(\n \"no_auto_value_on_zero\",\n __('Do not use <code>AUTO_INCREMENT</code> for zero values')\n );\n $leaf->setDoc(\n array(\n 'manual_MySQL_Database_Administration',\n 'Server_SQL_mode',\n 'sqlmode_no_auto_value_on_zero',\n )\n );\n $generalOptions->addProperty($leaf);\n\n // add the main group to the root group\n $importSpecificOptions->addProperty($generalOptions);\n // set the options for the import plugin property item\n $importPluginProperties->setOptions($importSpecificOptions);\n }\n\n $this->properties = $importPluginProperties;\n }", "title": "" }, { "docid": "d46be731da88970bf1ffa7afa77f16f4", "score": "0.5320347", "text": "public function initProperties()\n {\n $this->property_values = new \\stdClass();\n $this->initDefaultProperties();\n }", "title": "" }, { "docid": "f1c2f88147c8cb4ddcc6a51dcf3019ae", "score": "0.53160465", "text": "public static function _init()\n\t{\n\t\t// \t'default_id' => array(\n\t\t// \t\t'form' => array(\n\t\t// \t\t\t'options' => function($model) {\n\t\t// \t\t\t\t$model->items;\n\t\t// \t\t\t\t$model = $model->to_array();\n\t\t// \t\t\t\treturn \\Arr::pluck($model['items'], 'name', 'id');\n\t\t// \t\t\t}\n\t\t// \t\t)\n\t\t// \t),\n\t\t// ));\n\n\t\tif (\\Auth::has_access('enum.enum[all]'))\n\t\t{\n\t\t\t\\Arr::set(static::$_properties, 'read_only.form', array(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'template' => 'switch',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tgettext('No'),\n\t\t\t\t\t\tgettext('Yes'),\n\t\t\t\t\t),\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "8e5cf1ebe48c4d8c2132bf4ba24db254", "score": "0.53094363", "text": "public function adminSetting() {\n\n\t\t$success = __('Setting is successfully updated');\n\t\t\n\t\n\t\tif($this->request->isPost())\n\t\t{\n\t\t\t$this->Setting->set( $this->request->data );\n\t\t\tif($this->Setting->validates()){\n\t\t\t\t$this->request->data['Setting']['id']='1';\n\t\t\t\t\n\t\t\t\t$this->Setting->save($this->request->data,false);\n\t\t\t\t//$this->Session->setFlash($success, 'Dialogs/enotify/growl/top_right', array('type'=>'success'), 'top_right');\n\t\t\t\t\t$this->Session->setFlash($success, 'Dialogs/top_right', array('type'=>'success'), 'top_right');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->request->data=$this->Setting->find('first',array('conditions'=>array('Setting.id'=> '1' ))); // set data for edit \n\t\t\n\t}", "title": "" }, { "docid": "06d14320c38f6661fffd1f694661573c", "score": "0.53085077", "text": "public function getProperty();", "title": "" }, { "docid": "d6264bedb5b8f3c2685243fc19cf2a3f", "score": "0.53064984", "text": "protected static function define_properties() {\n return [\n 'instanceid' => [\n 'type' => PARAM_INT,\n ],\n ];\n }", "title": "" } ]
e6166634b57de3f37ac7c965a689130c
Parse webhook data for a bill.
[ { "docid": "909994150a25c354cc0579cab0181ad9", "score": "0.46118063", "text": "public function webhook(array $data = []): ?array;", "title": "" } ]
[ { "docid": "be626d0d311d9ebe4c7eefab2d57f835", "score": "0.5971042", "text": "public function handle_webhook() {\n $payload = file_get_contents( 'php://input' );\n $data = json_decode( $payload, true );\n $event_data = $data['event']['data'];\n\n if ( ! isset( $event_data['metadata']['user_id'] ) ) {\n // Probably a charge not created by us.\n exit;\n }\n\n if ( 'charge:confirmed' == $data['event']['type'] ) {\n $user_id = $event_data['metadata']['user_id'];\n $user = User::find( $user_id );\n $user->payment_status = 2;\n $user->save();\n }\n\n exit; // 200 response for acknowledgement.\n }", "title": "" }, { "docid": "ff1d5273c0d2f7a4dd1c529ee446bce5", "score": "0.5899397", "text": "public function webhook()\n {\n $this->load->model('checkout/order');\n $webhookData = json_decode(file_get_contents('php://input'), true);\n $this->emsHelper->processWebhook($this, $webhookData);\n }", "title": "" }, { "docid": "f31db13f678bad6490791094865c40d1", "score": "0.58097404", "text": "public function parsePostData()\n {\n }", "title": "" }, { "docid": "a68c672502ccd53b35f0f4aa442d94da", "score": "0.5739139", "text": "abstract public function parsePostData();", "title": "" }, { "docid": "1ed4a9e9a3353b8883da0d41d77785ed", "score": "0.55463904", "text": "private function parsePostPayload()\n {\n $body = null;\n $from = null;\n $rawBody = $this->request->getRawBody();\n if ($rawBody) {\n if (stristr($this->request->getHeader('Content-Type'), 'application/json')) {\n $payload = Zend_Json::decode($rawBody);\n $body = $payload[\"Body\"];\n $from = $payload[\"From\"];\n }\n }\n return array($body, $from);\n }", "title": "" }, { "docid": "70536b34c5578c4b62b93fd84254013f", "score": "0.55404925", "text": "public function processWebhook()\n {\n //Listen for callback, validate with server, close checkout\n $callback = json_decode(file_get_contents('php://input'));\n\n if (!$callback) {\n throw new WebhookException('Missing parameters', 1);\n }\n\n $expectedProperties = [\n 'checkoutId',\n 'checkoutHash',\n 'reference',\n 'paid',\n 'amount',\n 'phone',\n 'transactionCode',\n 'paymentMethod',\n 'note',\n 'signature',\n ];\n\n foreach ($expectedProperties as $property) {\n if (!property_exists($callback, $property)) {\n throw new WebhookException('Missing parameters', 1);\n }\n }\n\n if (!$this->signatureValid($callback)) {\n throw new WebhookException('Callback signature validation failed', 1);\n }\n\n if (!$checkout = $this->fetchCheckout($callback->checkoutHash)) {\n throw new WebhookException('Checkout fetch failed', 1);\n }\n\n //Defense: Gava doesn't yet have automated status changes from paid to not paid.\n //And Gava will not send a webhook notification for checkouts that have not been paid for\n if (!$checkout->paid) {\n throw new WebhookException('Checkout not paid', 1);\n }\n\n return $checkout;\n }", "title": "" }, { "docid": "5f51a7c641185c23764e04b23bef9772", "score": "0.55193293", "text": "public function gatewayPostFields() {\n $ramount = '0.00';\n // Check for webhook event..\n // Not all are supported..\n if (defined('HOOK_EVENT')) {\n if (isset($this->hookevt['data']['object']['metadata']['custom'])) {\n $chop = explode('-', $this->hookevt['data']['object']['metadata']['custom']);\n $order = $this->getOrderInfo($chop[0], $chop[1]);\n if (isset($order->id)) {\n $this->writeLog($order->id, 'Webhook event received from payment gateway. Received: ' . print_r($this->hookevt));\n $_POST['custom'] = $this->hookevt['data']['object']['metadata']['custom'];\n $failCode = '';\n $txn_id = '';\n $currency = $this->hookevt['data']['object']['currency'];\n $amount = ($this->hookevt['data']['object']['amount'] / 100);\n switch($this->hookevt['type']) {\n case 'charge.refunded':\n $this->writeLog($order->id, 'Processing refund for webhook event');\n $payStatus = 'refunded';\n $ramount = ($this->hookevt['data']['object']['amount_refunded'] / 100);\n break;\n default:\n $payStatus = $this->hookevt['type'];\n break;\n }\n }\n }\n } else {\n if (isset($_POST['custom'], $_POST['id'])) {\n $chop = explode('-', $_POST['custom']);\n $order = $this->getOrderInfo($chop[0], $chop[1]);\n if (isset($order->id)) {\n $this->writeLog($order->id, 'Attempting to charge card via payment gateway');\n $params = $this->paymentParams($this->gateway);\n include(PATH . 'control/gateways/lib/stripe/init.php');\n try {\n \\Stripe\\Stripe::setApiKey((isset($params['secret-key']) ? $params['secret-key'] : 'xx'));\n $charge = \\Stripe\\Charge::create(array(\n 'amount' => ($order->grandTotal * 100),\n 'currency' => $this->settings->baseCurrency,\n 'description' => $this->lang[0],\n 'source' => $_POST['id'],\n 'metadata' => array(\n 'custom' => $_POST['custom']\n )\n ));\n if (isset($charge['id'], $charge['metadata']['custom']) && $charge['metadata']['custom'] == $_POST['custom']) {\n if ($charge['outcome']['type'] != 'authorized' || $charge['outcome']['reason'] != '' || $charge['outcome']['risk_level'] != 'normal') {\n $payStatus = 'declined_by_gateway';\n $failCode = ($charge['outcome']['reason'] ? $charge['outcome']['reason'] : '');\n $txn_id = '';\n $currency = $charge['currency'];\n $amount = ($charge['amount'] / 100);\n } else {\n $this->writeLog($order->id, 'Charge authorized by payment gateway');\n $payStatus = 'completed';\n $failCode = '';\n $txn_id = $charge['balance_transaction'];\n $currency = $charge['currency'];\n $amount = ($charge['amount'] / 100);\n }\n }\n } catch (\\Stripe\\Stripe\\Error\\Card $e) {\n $payStatus = 'declined_by_gateway';\n $this->log($order->saleID, $e->getMessage());\n } catch (\\Stripe\\Stripe\\Error\\RateLimit $e) {\n $payStatus = 'declined_by_gateway';\n $this->log($order->saleID, $e->getMessage());\n } catch (\\Stripe\\Stripe\\Error\\InvalidRequest $e) {\n $payStatus = 'declined_by_gateway';\n $this->log($order->saleID, $e->getMessage());\n } catch (\\Stripe\\Stripe\\Error\\Authentication $e) {\n $payStatus = 'declined_by_gateway';\n $this->log($order->saleID, $e->getMessage());\n } catch (\\Stripe\\Stripe\\Error\\ApiConnection $e) {\n $payStatus = 'declined_by_gateway';\n $this->log($order->saleID, $e->getMessage());\n } catch (\\Stripe\\Stripe\\Error\\Base $e) {\n $payStatus = 'declined_by_gateway';\n $this->log($order->saleID, $e->getMessage());\n } catch (Exception $e) {\n $payStatus = 'declined_by_gateway';\n $this->log($order->saleID, 'An undetermined error occured from the server');\n }\n }\n }\n }\n $arr = array(\n 'trans-id' => (isset($txn_id) ? $txn_id : ''),\n 'amount' => (isset($amount) ? number_format($amount, 2, '.', '') : ''),\n 'pay-total' => (isset($amount) ? number_format($amount, 2, '.', '') : ''),\n 'refund-amount' => (isset($ramount) ? number_format($ramount, 2, '.', '') : ''),\n 'currency' => (isset($currency) ? $currency : ''),\n 'code-id' => (isset($_POST['custom']) ? $_POST['custom'] : '0-0-x'),\n 'pay-status' => (isset($payStatus) ? $payStatus : 'failed'),\n 'fail-code' => (isset($failCode) ? $failCode : ''),\n 'pending-reason' => '',\n 'inv-status' => '',\n 'fraud-status' => ''\n );\n return $arr;\n }", "title": "" }, { "docid": "895975c00f8e20c51fa7e3049006f2cf", "score": "0.5512381", "text": "function _bonsai_messages_webhooks_page() {\n if ($_SERVER['REQUEST_METHOD'] !== 'POST') {\n drupal_not_found();\n return;\n }\n\n $input = file_get_contents('php://input');\n $data = json_decode($input, TRUE);\n\n // Temporary logging of received data; will be removed once the feature is\n // developed and tested.\n watchdog(\n 'bonsai',\n 'Received a webhook event with the following data: \"@data\"',\n array(\n '@data' => $input,\n ),\n WATCHDOG_DEBUG\n );\n\n /**\n * @Issue(\n * \"Verify webhook signature taking into account the event domain\"\n * type=\"improvement\"\n * priority=\"normal\"\n * labels=\"security\"\n * )\n * @Issue(\n * \"Prevent webhook replay attacks by checking for reused tokens\"\n * type=\"improvement\"\n * priority=\"normal\"\n * labels=\"security\"\n * )\n */\n\n // We will be issuing a request for getting the full message. Determine the\n // domain and API key to use for the request by checking if there is a\n // recipient matching with one of the supported domains.\n /**\n * @Issue(\n * \"Find the best way to detect domain/key for webhook events that would\n * work for events other than stored events as well\"\n * type=\"bug\"\n * priority=\"low\"\n * labels=\"correctedness\"\n * )\n */\n $domains = variable_get('bonsai_domains');\n if (!$domains) {\n $domains = [\n variable_get('bonsai_domain') => variable_get('bonsai_mailgun_api_key')\n ];\n }\n $domains_without_keys = array_keys($domains);\n\n $api_key = NULL;\n $domain = NULL;\n\n // First, check if the recipient domain is given in the response.\n if (!empty($data['event-data']['recipient-domain'])) {\n $domain = $data['event-data']['recipient-domain'];\n if (in_array($domain, $domains_without_keys)) {\n $api_key = $domains[$domain];\n }\n }\n // Otherwise, try to find a match from the message's recipients.\n elseif (!empty($data['event-data']['message']['recipients'])) {\n foreach ($data['event-data']['message']['recipients'] as $recipient) {\n $recipient_domain = _bonsai_email_get_domain($recipient);\n if (!in_array($recipient_domain, $domains_without_keys)) {\n continue;\n }\n\n $api_key = $domains[$recipient_domain];\n $domain = $recipient_domain;\n }\n }\n\n if (!$domain || !$api_key) {\n watchdog(\n 'bonsai',\n 'Received a webhook event for which we could not determine a supported domain/API key pair. The ID of the event is \"@event_id\".',\n array(\n '@event_id' => $data['event-data']['id'],\n ),\n WATCHDOG_ERROR\n );\n return;\n }\n\n\n // Call the appropriate function depending on the event type.\n $event_type = $data['event-data']['event'];\n $function = '_bonsai_messages_webhooks_page__' . $event_type;\n if (!function_exists($function)) {\n watchdog(\n 'bonsai',\n 'Received a webhook event of an unsupported type \"@event_type\". The ID of the event is \"@event_id\".',\n array(\n '@event_type' => $event_type,\n '@event_id' => $data['event-data']['id'],\n ),\n WATCHDOG_ERROR\n );\n return;\n }\n $repository = bonsai_get_repository(\n array(\n 'api_key' => $api_key,\n 'transform_messages' => TRUE,\n )\n );\n $function($data['event-data'], $repository);\n}", "title": "" }, { "docid": "a2230ed60b90799962e75ba2fdcd0031", "score": "0.5398035", "text": "public function webhook()\n {\n // initial verification\n if (!$this->request->is('post')) {\n $token = $this->request->query('hub_verify_token');\n if ($token && $token == $this->verify_token) {\n $content = $this->request->query('hub_challenge');\n Log::write('debug', 'Received challenge: ' . $content);\n echo $content;\n } else {\n Log::write('debug', 'Missing/invalid verify token on webhook callback.');\n }\n // webhook itself\n } else {\n Log::write('debug', 'Received webhook data: ' . print_r($this->request->data, true));\n $data = $this->request->data;\n\n if ($data['object'] == 'page') {\n // loop all entries\n foreach ($data['entry'] as $entry) {\n $page_id = $entry['id'];\n $time = $entry['time'];\n\n // check all entries\n foreach ($entry['messaging'] as $event) {\n // check event type\n if (isset($event['option'])) {\n // optin event (authentication)\n } elseif (isset($event['message'])) {\n // message event\n $this->_receivedMessage($event);\n } elseif (isset($event['delivery'])) {\n // delivery event\n } elseif (isset($event['postback'])) {\n // postback event\n $this->_receivedPostback($event);\n }\n }\n }\n }\n\n echo 'OK';\n }\n exit();\n }", "title": "" }, { "docid": "040976c0586a203b3002fff4b006642b", "score": "0.53899586", "text": "public function process_webhooks()\n\t\t{\n\t\t\tif (!(isset($_GET['listener']) && $_GET['listener'] == 'webmoney')) return;\n\t\t\tglobal $rcp_options, $wpdb, $rcp_payments_db_name;\n\n\t\t\t/**\n\t\t\t * Check for fail\n\t\t\t */\n\t\t\t$FAILREQUEST = @$_REQUEST['LMI_FAILREQUEST'];\n\t\t\t$PAYMENT_PURSE = @$_REQUEST['LMI_PAYEE_PURSE'];\n\t\t\tif (!$FAILREQUEST && !$PAYMENT_PURSE) {\n\t\t\t\texit('NOP'); // No Operation (In case when the webmoney-gateway sends prerequest form)\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Needed variables\n\t\t\t */\n\t\t\t$PAYMENT_AMOUNT = @$_REQUEST['LMI_PAYMENT_AMOUNT'];\n\t\t\t$PAYMENT_NO = @$_REQUEST['LMI_PAYMENT_NO'];\n\t\t\t$V2_HASH = @$_REQUEST['LMI_HASH2'];\n\t\t\t$MODE = @$_REQUEST['LMI_MODE'];\n\t\t\t$SYS_INVS_NO = @$_REQUEST['LMI_SYS_INVS_NO'];\n\t\t\t$SYS_TRANS_NO = @$_REQUEST['LMI_SYS_TRANS_NO'];\n\t\t\t$SYS_TRANS_DATE = @$_REQUEST['LMI_SYS_TRANS_DATE'];\n\t\t\t$PAYER_PURSE = @$_REQUEST['LMI_PAYER_PURSE'];\n\t\t\t$PAYER_WM = @$_REQUEST['LMI_PAYER_WM'];\n\t\t\t$PAYMENT_ID = ($SYS_INVS_NO && $SYS_TRANS_NO)\n\t\t\t\t? $PAYER_WM . '-' . $SYS_INVS_NO . '-' . $SYS_TRANS_NO : ('ERROR-' . time());\n\t\t\t$secret = $rcp_options['webmoney_secret'];\n\t\t\t$amount = number_format($_GET['amount'], 2, '.', '');\n\t\t\t$email = $_GET['email'];\n\t\t\t$currency = $this->currency ?: rcp_get_currency();\n\t\t\ttry {\n\t\t\t\t$to_hash = array(\n\t\t\t\t\t$PAYMENT_PURSE,\n\t\t\t\t\t$PAYMENT_AMOUNT,\n\t\t\t\t\t$PAYMENT_NO,\n\t\t\t\t\t$MODE,\n\t\t\t\t\t$SYS_INVS_NO,\n\t\t\t\t\t$SYS_TRANS_NO,\n\t\t\t\t\t$SYS_TRANS_DATE,\n\t\t\t\t\t$secret,\n\t\t\t\t\t$PAYER_PURSE,\n\t\t\t\t\t$PAYER_WM\n\t\t\t\t);\n\t\t\t\t$hash = strtoupper(hash('sha256', implode(';', $to_hash))); // Create HASH server-side for verification\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$hash = \"\";\n\t\t\t}\n\n\t\t\t$log = print_r(\n\t\t\t\tarray(\n\t\t\t\t\t'GET' => $_GET,\n\t\t\t\t\t'POST' => $_POST,\n\t\t\t\t\t'REQUEST' => $_REQUEST,\n\t\t\t\t\t'PAYEE_ACCOUNT' => $rcp_options['webmoney_payment_purse'],\n\t\t\t\t\t'hash' => $hash,\n\t\t\t\t\t'amount' => $amount,\n\t\t\t\t\t'currency' => $currency,\n\t\t\t\t\t'email' => $email\n\t\t\t\t),\n\t\t\t\t1\n\t\t\t) . PHP_EOL;\n\t\t\t$log_file = dirname(__FILE__) . '/logs/success' . $PAYMENT_ID;\n\t\t\t$log_file_failed = dirname(__FILE__) . '/logs/fail/' . $PAYMENT_NO . '-' . $PAYER_WM;\n\t\t\t// INIT LOG FILE\n\t\t\tif ($FAILREQUEST == 1) {\n\t\t\t\tfile_put_contents($log_file_failed, $log, FILE_APPEND);\n\t\t\t\texit('TRANSACTION FAILED');\n\t\t\t} else {\n\t\t\t\tfile_put_contents($log_file, $log, FILE_APPEND);\n\t\t\t}\n\t\t\tfunction log_and_exit($log_file, $msg)\n\t\t\t{\n\t\t\t\tfile_put_contents($log_file, $msg, FILE_APPEND);\n\t\t\t\texit($msg);\n\t\t\t}\n\n\t\t\t// VERIFY HASH\n\t\t\tif ($hash == $V2_HASH) {\n\t\t\t\tif ($PAYMENT_PURSE == $rcp_options['webmoney_payment_purse']) {\n\t\t\t\t\tif ($PAYMENT_AMOUNT == $amount) {\n\t\t\t\t\t\t$rcp_payments = new RCP_Payments();\n\t\t\t\t\t\t$pay = $rcp_payments->get_payment_by('subscription_key', $_GET['key']);\n\t\t\t\t\t\tif (empty($pay)) {\n\t\t\t\t\t\t\t$msg = \"Found No Subscription Data\";\n\t\t\t\t\t\t\tlog_and_exit($log_file, $msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($rcp_payments->payment_exists($PAYMENT_ID)) {\n\t\t\t\t\t\t\t$msg = \"Detected Duplicate IPN\";\n\t\t\t\t\t\t\tlog_and_exit($log_file, $msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Update payment info of rcp db\n\t\t\t\t\t\t */\n\t\t\t\t\t\t$rcp_payments->update($pay->id, array(\n\t\t\t\t\t\t\t'transaction_id' => $PAYMENT_ID,\n\t\t\t\t\t\t\t'payment_type' => 'webmoney',\n\t\t\t\t\t\t\t'status' => 'complete'\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * OPERATIVE MODE\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif ($MODE == 0) {\n\t\t\t\t\t\t\t// Update member subscription level only when it is an active-mode\n\t\t\t\t\t\t\t$membership = rcp_get_membership_by('subscription_key', $pay->subscription_key);\n\t\t\t\t\t\t\t$membership->set_recurring(false);\n\t\t\t\t\t\t\t$membership->renew();\n\t\t\t\t\t\t\t$wpdb->update($wpdb->prefix . 'rcp_memberships', array('expiration_date' => $membership->calculate_expiration(true)), array('id' => $membership->get_id()));\n\t\t\t\t\t\t\t$msg = \"SUCCESS\";\n\t\t\t\t\t\t\tlog_and_exit($log_file, $msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * TEST MODE\n\t\t\t\t\t\t */\n\t\t\t\t\t\telse if ($MODE == 1) {\n\t\t\t\t\t\t\t$msg = \"TEST:SUCCESS\";\n\t\t\t\t\t\t\tlog_and_exit($log_file, $msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * UNKNOWN MODE\n\t\t\t\t\t\t */\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$msg = \"UNKNOWN:SUCCESS :: \" . $MODE;\n\t\t\t\t\t\t\tlog_and_exit($log_file, $msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$msg = \"Does Not Match The Payment Amount\";\n\t\t\t\t\t\tlog_and_exit($log_file, $msg);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$msg = \"Does Not Match The Merchant Purse\";\n\t\t\t\t\tlog_and_exit($log_file, $msg);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$msg = \"RECEIVED HASH IS INVALID <IMPORTANT>\";\n\t\t\t\tlog_and_exit($log_file, $msg);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "abf5d02cd4b8c9a4e802904c085b9fdd", "score": "0.53637284", "text": "protected function _parse_post()\n {\n $this->_post_args = $_POST;\n if ($this->request->format)\n {\n $this->request->body = $this->input->raw_input_stream;\n }\n }", "title": "" }, { "docid": "f8eec8e22eec120899674b930fab8953", "score": "0.5356213", "text": "private function parse($data) {\n $p = explode(\"\\r\\n\\r\\n\", $data, 2);\n $this->body = isset($p[1]) ? $p[1] : '';\n\n $header_data = isset($p[0]) ? $p[0] : '';\n $this->headers = array();\n foreach (explode(\"\\r\\n\", $header_data) as $data) {\n if (substr($data, 0, 4) == 'HTTP') { $this->parseStatus($data); continue; } // status line\n $p = explode(':', $data, 2);\n if (count($p) == 2) $this->headers[$p[0]] = trim($p[1]);\n else $this->headers[$p[0]] = null;\n }\n }", "title": "" }, { "docid": "77c43866012c813fcd3d21239df17410", "score": "0.5297692", "text": "private function parse() {\n\n\t\t$payload = $this->payload;\n\n\t\t$accounts = array();\n\n\t\tforeach ( $payload as $p ) {\n\n\t\t\t$parsed = array();\n\t\t\t$fields = array();\n\n\t\t\t$fields = $p['custom_fields'];\n\t\t\tforeach ( $fields as $f ) {\n\t\t\t\t$parsed[$f['key']] = $f['value'];\n\t\t\t}\n\n\t\t\t$account = array();\n\n\t\t\t$account['account-name'] = $p['post_title'];\n\t\t\t$account['account-type'] = $parsed['_smd_account-category'];\n\n\t\t\tif ( isset( $parsed['_smd_twitter-url'] ) )\n\t\t\t\t$account['twitter'] = $parsed['_smd_twitter-url'];\n\n\t\t\tif ( isset( $parsed['_smd_google-plus-url'] ) )\n\t\t\t\t$account['google-plus'] = $parsed['_smd_google-plus-url'];\n\n\t\t\tif ( isset( $parsed['_smd_facebook-url'] ) )\n\t\t\t\t$account['facebook'] = $parsed['_smd_facebook-url'];\n\n\t\t\tif ( isset( $parsed['_smd_flickr-url'] ) )\n\t\t\t\t$account['flickr'] = $parsed['_smd_flickr-url'];\n\n\t\t\tif ( isset( $parsed['_smd_youtube-url'] ) )\n\t\t\t\t$account['youtube'] = $parsed['_smd_youtube-url'];\n\n\t\t\tif ( isset( $parsed['_smd_instagram-url'] ) )\n\t\t\t\t$account['instagram'] = $parsed['_smd_instagram-url'];\n\n\t\t\tif ( isset( $parsed['_smd_pinterest-url'] ) )\n\t\t\t\t$account['pinterest'] = $parsed['_smd_pinterest-url'];\n\n\t\t\tif ( isset( $parsed['_smd_blog-url'] ) )\n\t\t\t\t$account['blog'] = $parsed['_smd_blog-url'];\n\n\t\t\tif ( isset( $parsed['_smd_other-url'] ) )\n\t\t\t\t$account['other'] = $parsed['_smd_other-url'];\n\n\t\t\tarray_push( $accounts, $account );\n\n\t\t}\n\n\t\t$this->accounts = $accounts;\n\n\t}", "title": "" }, { "docid": "87630f4f81b0fe07178a79b0391727a2", "score": "0.5281142", "text": "public function parseRequest()\n {\n\n $raw_request = file_get_contents('php://input');\n $postmates_signature = $_SERVER['HTTP_X_POSTMATES_SIGNATURE'];\n\n if ($this->validateRequest($raw_request, $postmates_signature)) {\n return json_decode($raw_request, true);\n }\n\n return null;\n\n }", "title": "" }, { "docid": "4b8ce4ba97da39e530041509c7ddbbf7", "score": "0.52521074", "text": "public static function handleStripeWebhooks($event)\n {\n $data = $event->sender->data;\n $webhook = $data->type;\n\n if ($webhook === 'payment_intent.succeeded') {\n $intent = $data->data->object;\n }\n Yii::info('Stripe webhook ' . $webhook . 'mit Id ' . $data->data->object->id . ' wurde empfangen.', __Method__);\n }", "title": "" }, { "docid": "0de24fc3f5cfba75e5aa9d499f3e3ad4", "score": "0.5250409", "text": "private function __parseRequestData() {\n\t\t$data = $this->data;\n\t\tif ($data['Block']['public_type'] === Block::TYPE_LIMITED) {\n\t\t\t//$data['Block']['from'] = implode('-', $data['Block']['from']);\n\t\t\t//$data['Block']['to'] = implode('-', $data['Block']['to']);\n\t\t} else {\n\t\t\tunset($data['Block']['from'], $data['Block']['to']);\n\t\t}\n\n\t\tif (! $status = $this->NetCommonsWorkflow->parseStatus()) {\n\t\t\treturn;\n\t\t}\n\t\t$data['RssReader']['status'] = $status;\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "34400e1fe20ef5715b1170d58a917723", "score": "0.52297413", "text": "private function extract_post_data()\n {\n //\n $keys = array_keys( $_POST );\n $names_to_remove = array('pubkey', 'description', 'amount', 'action', 'token', 'pword', 'pword1', 'pword2', 'url');\n $meta = array();\n foreach($keys as $key)\n {\n if( !in_array( $key, $names_to_remove ) )\n {\n $meta[$key] = $_POST[$key];\n }\n $this->response[$key] = $_POST[$key];\n }\n\n // Finalize the stripe.com meta data\n //\n $this->response['meta'] = json_encode( $meta );\n }", "title": "" }, { "docid": "cd39b3aa5ec55cf37af53301205644da", "score": "0.5223276", "text": "public function webhook()\n {\n global $woocommerce;\n //obtener los agumentos de la respuesta del webhook\n $args = $_SERVER[\"REQUEST_URI\"];\n $arg_arr = explode(\"/\",$args);\n $cnt=count($arg_arr);\n $decoded=base64_decode($arg_arr[$cnt-1]);\n// list($cenpost_reference_id,$suncash_reference_id)= explode('#',$reference_id);\n $status_arr=explode(\"||\",$decoded);\n $count_status_arr=count($status_arr);\n $transaction=$status_arr[0];\n $status=$status_arr[$count_status_arr-2];\n\n $order=wc_get_orders(['transaction_id'=>$transaction]);\n foreach ($order as $item)\n {\n if($item->get_transaction_id()==$transaction);\n {\n if($status===\"success\") {\n $item->update_status('completed',\"Payment Complete by webhook\");\n $item->add_order_note($decoded);\n// $item->reduce_order_stock();\n $woocommerce->cart->empty_cart();\n\n }\n elseif($status===\"failed\"){\n $item->update_status($count_status_arr-1);\n $item->add_order_note($decoded);\n }\n }\n }\n\n update_option('webhook_debug', $_GET);\n }", "title": "" }, { "docid": "1172cdfbd79a5f84b3a3f950f7ce78b7", "score": "0.52147686", "text": "private function parseFlightsData()\n {\n $this->flights = json_decode($this->response);\n }", "title": "" }, { "docid": "481a4f781fafd5888dc441ad22a55d25", "score": "0.5207345", "text": "public function hook(Request $request)\n {\n\n\n $client = $this->buildClient();\n\n $webhook = file_get_contents('php://input');\n $webhookArray = json_decode($webhook, true);\n\n $payload = $webhookArray['payload'];\n if ($client->validate_webhook($payload)) {\n\n $resourceType = $payload['resource_type'];\n \\Log::debug('Action: ' . $payload['action']);\n\n switch ($resourceType) {\n case 'bill':\n foreach ($payload['bills'] as $bill) {\n switch ($payload['action']) {\n case 'created':\n $this->commandBus->execute(new CreatingRentBookBill($bill['source_id'], $bill['id']));\n break;\n case 'failed':\n $this->commandBus->execute(new FailRentBookBill($bill['source_id'], $bill['id']));\n break;\n case 'cancelled':\n $this->commandBus->execute(new CancelRentBookBill($bill['source_id'], $bill['id']));\n break;\n case 'paid':\n $this->commandBus->execute(new PayRentBookBill($bill['source_id'],\n $bill['id'],\n $bill['paid_at']));\n break;\n case 'withdrawn':\n $this->commandBus->execute(new WithdrawRentBookBill( $bill['id'],$bill['source_id']));\n break;\n }\n }\n break;\n case 'pre_authorization':\n foreach ($payload['pre_authorizations'] as $preAuth) {\n if ($payload['action'] == 'cancelled') {\n $this->commandBus->execute(new CancelRentBookPreAuth($preAuth['id']));\n } elseif ($payload['action'] == 'expired') {\n $this->commandBus->execute(new ExpireRentBookPreAuth($preAuth['id']));\n }\n }\n\n break;\n\n }\n\n\n return new Response('Invalid signature', 200);\n\n }\n\n return new Response('Invalid signature', 403);\n }", "title": "" }, { "docid": "faedf78fdee4c46c4440319dc43f7019", "score": "0.51993555", "text": "protected function processWebhookEvent(Webhook $webhookEvent): void\n {\n $payload = $webhookEvent->getDecodedPayload();\n $shipmentData = $payload->data->shipment;\n\n // put back json encoded shipment data\n $apiResult = $this->apiResultFactory->create();\n $apiResult->setPayload($shipmentData);\n\n $this->shipmentManager->addShipment($apiResult);\n }", "title": "" }, { "docid": "5cc0d45c17a886a627c32cb4d64a8a74", "score": "0.51500803", "text": "function edd_begateway_gateway_ipn_webhook_handler() {\n\t$webhook = new \\BeGateway\\Webhook();\n\tedd_begateway_gateway_init_begateway_gateway();\n\tedd_begateway_gateway_log( 'Received webhook json: ' . file_get_contents( 'php://input' ) );\n\tif ( $webhook->isAuthorized() ) {\n\t\t$type = $webhook->getResponse()->transaction->type;\n\t\t$transaction_status = $webhook->getStatus();\n\t\t$transaction_uid = $webhook->getUid();\n\t\t$purchase_key = $webhook->getTrackingId();\n\t\t$payment_id = edd_get_purchase_id_by_key( $purchase_key );\n\t\t$payment = new EDD_Payment( $payment_id );\n\t\t$amount = edd_get_payment_amount( $payment_id );\n\t\tif ( ! $payment ) {\n\t\t\tedd_begateway_gateway_log( 'EDD Payment for Transaction:' . $webhook->getUid() . ' was not found' );\n\t\t\treturn new WP_REST_Response();\n\t\t}\n\t\tif ( ! edd_begateway_gateway_validate_ipn_amount( $webhook, $payment_id ) ) {\n\t\t\tedd_begateway_gateway_log(\n\t\t\t\t'----------- Invalid amount webhook --------------' . PHP_EOL .\n\t\t\t\t\t'Order No: ' . $webhook->getTrackingId() . PHP_EOL .\n\t\t\t\t\t'UID: ' . $webhook->getUid() . PHP_EOL .\n\t\t\t\t'--------------------------------------------'\n\t\t\t);\n\t\t\treturn new WP_REST_Response();\n\t\t}\n\n\t\tedd_begateway_gateway_log(\n\t\t\t'Transaction type: ' . $type . PHP_EOL .\n\t\t\t'Payment status ' . $transaction_status . PHP_EOL .\n\t\t\t'UID: ' . $webhook->getUid() . PHP_EOL .\n\t\t\t'Message: ' . $webhook->getMessage()\n\t\t);\n\n\t\tif ( in_array( $type, array( 'payment', 'authorization' ), true ) ) {\n\t\t\tif ( $webhook->isSuccess() ) {\n\t\t\t\tif ( 'authorization' === $type ) {\n\t\t\t\t\tedd_update_payment_status( $payment_id, 'processing' );\n\t\t\t\t\tupdate_post_meta( $payment_id, '_begateway_transaction_captured', 'no' );\n\t\t\t\t\tupdate_post_meta( $payment_id, '_begateway_transaction_captured_amount', 0 );\n\t\t\t\t} else {\n\t\t\t\t\tedd_update_payment_status( $payment_id, 'processing' );\n\t\t\t\t\tupdate_post_meta( $payment_id, '_begateway_transaction_captured', 'yes' );\n\t\t\t\t\tupdate_post_meta( $payment_id, '_begateway_transaction_captured_amount', $amount );\n\t\t\t\t}\n\t\t\t} elseif ( $webhook->isFailed() ) {\n\t\t\t\tedd_update_payment_status( $payment_id, 'failed' );\n\t\t\t\tedd_insert_payment_note( $payment_id, $webhook->getMessage() );\n\t\t\t}\n\t\t\t// Add card data.\n\t\t\t$payment_method = $webhook->getPaymentMethod();\n\n\t\t\tif ( $payment_method && isset( $webhook->getResponse()->transaction->$payment_method->token ) ) {\n\t\t\t\tupdate_post_meta( $payment_id, '_begateway_transaction_payment_method', $payment_method );\n\t\t\t\t// Save card data.\n\t\t\t\t$card = $webhook->getResponse()->transaction->$payment_method;\n\t\t\t\tupdate_post_meta( $payment_id, '_begateway_card_last_4', $card->last_4 );\n\t\t\t\tupdate_post_meta( $payment_id, '_begateway_card_brand', 'master' !== $card->brand ? $card->brand : 'mastercard' );\n\t\t\t}\n\n\t\t\tupdate_post_meta( $payment_id, '_begateway_transaction_refunded_amount', 0 );\n\t\t\tupdate_post_meta( $payment_id, '_begateway_transaction_id', $transaction_uid );\n\t\t}\n\t} else {\n\t\tedd_begateway_gateway_log(\n\t\t\t'----------- Unauthorized webhook --------------' . PHP_EOL .\n\t\t\t\t'Order No: ' . $webhook->getTrackingId() . PHP_EOL .\n\t\t\t\t'UID: ' . $webhook->getUid() . PHP_EOL .\n\t\t\t'--------------------------------------------'\n\t\t);\n\t}\n\treturn new WP_REST_Response();\n}", "title": "" }, { "docid": "e39fb7cb3d41ddcb363c1a958ee985d9", "score": "0.5139297", "text": "protected function parseResponsePostRecords() : void\n {\n $data = current($this->responseData['data']);\n $this->status = $data['status'];\n $this->recordId = array_key_exists('id', $data['details']) ? $data['details']['id'] : null;\n }", "title": "" }, { "docid": "f577d4d837a680262eb6918ca8820a59", "score": "0.5121233", "text": "protected function parse()\n {\n list($statusLine, $request) = explode(\"\\r\\n\", $this->message, 2);\n list($this->protocol, $this->statusCode, $this->statusText) = explode(' ', trim($statusLine), 3);\n $this->headers = [];\n @list($headers, $this->body) = explode(\"\\r\\n\\r\\n\", $request, 2);\n $this->parseHeaders($headers);\n $this->decodeBody();\n $charset = $this->getCharset();\n if ($charset !== null && strcasecmp('utf-8', $charset)) {\n $this->body = mb_convert_encoding($this->body, 'utf-8', $charset);\n }\n }", "title": "" }, { "docid": "18b465fcc68cf5c4de75f64e04c06b02", "score": "0.51018816", "text": "function parseRequestData($data)\n{\n\treturn [\n\t\t'status' => $data['status'],\n\t\t'msg' => $data['msg'],\n\t\t'jwt_token' => $data['data']['jwt_token'],\n\t\t'level' => $data['data']['userGroup'],\n\t\t'userId' => $data['data']['userId'],\n\t\t'fname' => $data['data']['fname'],\n\t\t'lname' => $data['data']['lname'],\n\t\t'email' => $data['data']['email'],\n\t\t'mobile' => $data['data']['mobile'],\n\t\t'username' => $data['data']['username']\n\t];\n}", "title": "" }, { "docid": "b87e18f754f66082cb421ad14e452b06", "score": "0.5087874", "text": "public function webhook ()\n {\n\n\n }", "title": "" }, { "docid": "3a36ff901ace6cdbb1fe87bf06a8f8c5", "score": "0.5064198", "text": "public function stripe_webhook_charge_endpoint() {\n \n // if (isset($_GET['wps-listener']) && $_GET['wps-listener'] == 'charge.succeeded') {\n // we will process the events here\n \n // Set your secret key: remember to change this to your live secret key in production\n // See your keys here https://dashboard.stripe.com/account/apikeys\n \\Stripe\\Stripe::setApiKey($this->stripe_private_key);\n // Retrieve the request's body and parse it as JSON\n $input = file_get_contents(\"php://input\");\n\n\n $charge_json = json_decode($input, TRUE);\n // Do something with $event_json\n $this->save_stripe_charge($charge_json);\n \n http_response_code(500); // PHP 5.4 or greater\n return;\n // }\n }", "title": "" }, { "docid": "295096442c7ebfbcbf45346f22bd717b", "score": "0.5060655", "text": "public function parse($data): void\n {\n // These attributes are shared between Habbo and Friends\n $this->setId($data['uniqueId']);\n $this->setHabboName($data['name']);\n $this->setMotto($data['motto']);\n if (isset($data['figureString'])) {\n $this->setFigureString($data['figureString']);\n } elseif (isset($data['habboFigure'])) {\n $this->setFigureString($data['habboFigure']);\n }\n\n // These could be missing..\n if (isset($data['memberSince'])) {\n $this->setMemberSince($data['memberSince']);\n }\n\n if (isset($data['profileVisible'])) {\n $this->setProfileVisible($data['profileVisible']);\n }\n\n if (isset($data['selectedBadges'])) {\n foreach ($data['selectedBadges'] as $badge) {\n $selectedBadge = new Badge();\n $selectedBadge->parse($badge);\n $this->addSelectedBadge($selectedBadge);\n }\n }\n\n // New sandbox 2020 additions\n if (isset($data['online'])) {\n $this->setOnline($data['online']);\n }\n if (isset($data['lastAccessTime'])) {\n $this->setLastAccessTime($data['lastAccessTime']);\n }\n if (isset($data['currentLevel'])) {\n $this->setCurrentLevel($data['currentLevel']);\n }\n if (isset($data['currentLevelCompletePercent'])) {\n $this->setCurrentLevelCompleted($data['currentLevelCompletePercent']);\n }\n if (isset($data['totalExperience'])) {\n $this->setTotalExperience($data['totalExperience']);\n }\n if (isset($data['starGemCount'])) {\n $this->setStarGemCount($data['starGemCount']);\n }\n }", "title": "" }, { "docid": "24b1e1c18def65d9dbe52d936b14d0df", "score": "0.5051442", "text": "public function validate(array $get, array $post)\n {\n // Initialize API\n $api = $this->getApi($this->meta['client_id'], $this->meta['client_secret'], $this->meta['sandbox']);\n $payments = new PaypalCheckoutPayments($api);\n\n // Fetch webhook payload\n $payload = file_get_contents('php://input');\n $webhook = json_decode($payload);\n\n // Discard all webhook events, except when the order is completed or approved\n $events = ['CHECKOUT.ORDER.APPROVED', 'PAYMENT.CAPTURE.COMPLETED'];\n if (!in_array($webhook->event_type ?? '', $events)) {\n return;\n }\n\n $this->log('validate', json_encode($webhook), 'input', !empty($webhook));\n\n // Capture payment\n if ($webhook->event_type == 'CHECKOUT.ORDER.APPROVED') {\n $orders = new PaypalCheckoutOrders($api);\n $response = $orders->capture(['id' => $webhook->resource->id]);\n\n $this->log('capture', json_encode($response->response()), 'output', empty($response->errors()));\n\n // Output errors\n if (($errors = $response->errors())) {\n $this->Input->setErrors($errors);\n\n return;\n }\n\n return [\n 'client_id' => $webhook->resource->purchase_units[0]->custom_id ?? null,\n 'amount' => $webhook->resource->purchase_units[0]->amount->value ?? null,\n 'currency' => $webhook->resource->purchase_units[0]->amount->currency_code ?? null,\n 'invoices' => $this->unserializeInvoices($webhook->resource->purchase_units[0]->reference_id ?? ''),\n 'status' => 'pending',\n 'reference_id' => null,\n 'transaction_id' => $webhook->resource->id ?? null,\n 'parent_transaction_id' => null\n ];\n }\n\n // Set the payment\n $payment = $webhook->resource ?? (object) [];\n\n // Fetch the transaction\n $transaction = (object) [];\n if (isset($payment->supplementary_data->related_ids->order_id)) {\n $orders = new PaypalCheckoutOrders($api);\n $response = $orders->get(['id' => $payment->supplementary_data->related_ids->order_id]);\n $transaction = $response->response()->purchase_units[0] ?? (object) [];\n }\n\n $this->log('validate', json_encode($transaction), 'output', !empty($transaction));\n\n if (empty($transaction)) {\n return;\n }\n\n // Set status\n $status = 'error';\n $success = false;\n switch ($payment->status ?? 'ERROR') {\n case 'COMPLETED':\n $status = 'approved';\n $success = true;\n break;\n case 'APPROVED':\n $status = 'pending';\n $success = true;\n break;\n case 'VOIDED':\n $status = 'void';\n $success = true;\n break;\n }\n\n if (!$success) {\n return;\n }\n\n // Output errors\n if (($errors = $response->errors())) {\n $this->Input->setErrors($errors);\n\n return;\n }\n\n return [\n 'client_id' => $transaction->custom_id ?? null,\n 'amount' => $payment->amount->value ?? null,\n 'currency' => $payment->amount->currency_code ?? null,\n 'invoices' => $this->unserializeInvoices($transaction->reference_id ?? ''),\n 'status' => $status,\n 'reference_id' => $payment->id ?? null,\n 'transaction_id' => $transaction->id ?? null,\n 'parent_transaction_id' => null\n ];\n }", "title": "" }, { "docid": "5e9f9cf5e8f87024db0004c5c3f5b08e", "score": "0.5051357", "text": "public function parse($data);", "title": "" }, { "docid": "5e9f9cf5e8f87024db0004c5c3f5b08e", "score": "0.5051357", "text": "public function parse($data);", "title": "" }, { "docid": "cb8f721defab5a3c9ce2ee5ed1be15f6", "score": "0.5046397", "text": "public function callBackStripe(){\t\t\n\t\t// retrieve the request's body and parse it as JSON\n\t\t$webhook_response = @file_get_contents('php://input'); \t\t\n\t\t\t\t\n\t\t// grab the event information\n\t\t$event_json = json_decode($webhook_response);\t\t\n\t\t\n\t\t$event_id = $event_json->id;\t\n\t\t$external_invoice = $event_json->data->object;\t\n\t\t$recipient_data = $external_invoice->charges->data[0]->billing_details;\n\t\t//echo \"<pre>\";print_r($recipient_data);\n\t\t$recipient_email = $recipient_data->name;\t\n\t\t\n\t\t$ticket_amount = $external_invoice->amount / 100; // amount comes in as amount in cents, so we need to convert to dollars\n\t\t$show_name = $external_invoice->description;\n\t\t$emlBody = $this->getEmailBody($ticket_amount, $show_name);\n\t\t\n\t\t$this->do_email($emlBody, \"CONFIRMED! You're ready to Watch Live Now!\",array($recipient_email,'info@standupglobal.com','sumit@multiplat.in'));\n\t\t\n\t\t$dirPath = 'assets/stripelog/'.date('Y').'/'.date('m').'/'.date('d');\t\n \t\t@mkdir($dirPath,0755, true );\t\t\n\t\tfile_put_contents($dirPath.'/WLN_'.$recipient_email.'_'.time().'.txt', $webhook_response);\n\t\t\n\t\t\n\t\t//print_r($event_json);exit;\t\t\n \t}", "title": "" }, { "docid": "2eb7bf709991ad7978a8cb2798c1deb7", "score": "0.5022034", "text": "protected function parseRequestBody() {\n if (0 === strpos($this->request->headers->get('Content-Type'), 'application/json')) {\n $data = json_decode($this->request->getContent(), true);\n $this->request->request->replace(is_array($data) ? $data : array());\n }\n }", "title": "" }, { "docid": "750036ab55955cc50faaa5aa0b932212", "score": "0.5019371", "text": "public function webhook() {\r\n \r\n\t\t\r\n\t \t}", "title": "" }, { "docid": "8165d91236ea9ed7ce4757a90313ae82", "score": "0.50023484", "text": "public function parse()\n\t{\n\t\t// Parse headers\n\t\t$this->headers()->parse($this->result, $this->info);\n\n\t\t// Parse body\n\t\t$body = $this->result;\n\t\tif (!empty($this->headers()->get())) {\n\t\t\t$body = substr($body, $this->info['header_size']);\n\t\t}\n\t\t$body = trim($body);\n\n\t\t$this->body = $body;\n\t}", "title": "" }, { "docid": "f0cca5ae450c1300c67cac95fc5d49a0", "score": "0.4992997", "text": "public function process_webhook( $response ) {\n // Check transaction event\n\t\tswitch ( $response->event ) {\n case WC_Wompi_API::EVENT_TRANSACTION_UPDATED:\n\t\t\t\t$this->process_webhook_payment( $response );\n\t\t\t\tbreak;\n default :\n WC_Wompi_Logger::log( 'TRANSACTION Event Not Found' );\n status_header( 400 );\n\t\t}\n\t}", "title": "" }, { "docid": "38dc03ed36efe6696bbeb1c37eece98a", "score": "0.49850887", "text": "protected function parseBody()\n {\n $data=null;\n $raw = $this->request->getBody()->getContents();\n if (empty($raw)) {\n return $this->request->getParsedBody();\n }\n $cutted = explode('&', $raw);\n foreach ($cutted as $param) {\n list($key, $value) = explode('=', $param);\n $data[$key] = $value;\n }\n return $data;\n }", "title": "" }, { "docid": "f47a51b9fd7914db5e93e49899fec64e", "score": "0.49843088", "text": "public function fetchServiceInputBojectData(){\n\t\t\t$json = file_get_contents('php://input');\n\t\t\treturn json_decode($json);\n\t\t}", "title": "" }, { "docid": "3f3107024e8c5865675f21865eba8566", "score": "0.49753627", "text": "public function parse($data)\n\t{\n\t\tif (is_string($data))\n\t\t{\n\t\t\t$data = Encoding::convertEncoding($data, SITE_CHARSET, 'UTF-8');\n\t\t}\n\n\t\t$parsed = is_array($data) ? $data : Json::decode($data);\n\t\tif ($parsed['error'])\n\t\t{\n\t\t\t$errorMessage = $parsed['error']['error_msg'];\n\t\t\tswitch ((string) $parsed['error']['error_code'])\n\t\t\t{\n\t\t\t\tcase '100':\n\t\t\t\t\t$errorMessage = Loc::getMessage(\n\t\t\t\t\t\t'SEO_RETARGETING_SERVICE_RESPONSE_VKONTAKTE_ERROR_100',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'%code%' => htmlspecialcharsbx($parsed['error']['error_code']),\n\t\t\t\t\t\t\t'%msg%' => htmlspecialcharsbx($parsed['error']['error_msg']),\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\t$errorMessage = Loc::getMessage('SEO_RETARGETING_SERVICE_RESPONSE_VKONTAKTE_ERROR')\n\t\t\t\t. ': '\n\t\t\t\t. $errorMessage;\n\t\t\t$this->addError(new Error($errorMessage, $parsed['error']['error_code']));\n\t\t}\n\n\t\t$result = array();\n\t\tif ($parsed['response'])\n\t\t{\n\t\t\t$result = $parsed['response'];\n\t\t}\n\t\telse if(!isset($parsed['error']))\n\t\t{\n\t\t\t$result = $parsed;\n\t\t}\n\n\t\t$this->setData(is_array($result) ? $result : array($result));\n\t}", "title": "" }, { "docid": "1462b4b9eb398467c77c690b1a767c24", "score": "0.49661994", "text": "public function getParsedPostData()\n {\n $rawPostData = $this->getPostData();\n\n // First try parsing json\n $data = @json_decode($rawPostData);\n\n // If failed, try parse_str\n if (!$data) {\n $data = [];\n parse_str($rawPostData, $data);\n }\n\n return $data;\n }", "title": "" }, { "docid": "d915398b57c8e942cceb2a706d7750d0", "score": "0.4962089", "text": "public function parse_incoming_data()\n {\n foreach ( $_GET as $k => $v ) self::$_incoming[$k] = filter_var( $v, FILTER_SANITIZE_STRING );\n foreach ( $_POST as $k => $v ) self::$_incoming[$k] = filter_var( $v, FILTER_SANITIZE_STRING );\n \n if ( ( ! array_key_exists( 'controller', self::$_incoming ) ) AND ( strlen( $_SERVER['QUERY_STRING'] ) > 0 ) )\n {\n $urlString = filter_var( $urlString, FILTER_SANITIZE_URL );\n $urlBits = explode( '/', $urlString );\n \n array_shift( $urlBits );\n \n self::$_incoming['controller'] = isset( $urlBits[0] ) ? $urlBits[0] : null;\n self::$_incoming['action'] = isset( $urlBits[1] ) ? $urlBits[1] : 'forums';\n self::$_params = array_slice( $urlBits, 2 );\n \n if ( count( self::$_params ) > 0 )\n {\n for ( $i = 0; $i < self::$_params; $i++ )\n {\n if ( isset( self::$_params[$i + 1] ) )\n {\n self::$_incoming[self::$_params[$i]] = filter_var( urldecode( self::$_params[$i + 1] ), FILTER_SANITIZE_STRING );\n }\n }\n }\n }\n }", "title": "" }, { "docid": "6a88b82f8be0e8d1f909020a33098e80", "score": "0.49569413", "text": "public function process_webhook( $response ) {\n // Check transaction event\n\t\tswitch ( $response->Status ) {\n case WC_Safetypay_API::EVENT_TRANSACTION_UPDATED:\n\t\t\t\t$this->process_webhook_payment( $response );\n\t\t\t\tbreak;\n default :\n WC_Safetypay_Logger::log( 'TRANSACTION Event Not Found' );\n status_header( 400 );\n\t\t}\n\t}", "title": "" }, { "docid": "9079e86dbeaa5da4e163584607d9fc2f", "score": "0.4936474", "text": "public function parse () {\n\n $this->_Message = new Message\\Message();\n\n $this->_Parameters = new Parameters();\n\n $this->_handleGetData();\n\n $this->_handlePostData();\n\n // Set requested override format from parameters received\n // so far. This allows mismatched request and response formats.\n if (isset($this->_parametersPost['RFMformat'])) {\n $this->_format = $this->_parametersPost['RFMformat'];\n }\n if (isset($this->_parametersQueryString['RFMformat'])) {\n $this->_format = $this->_parametersQueryString['RFMformat'];\n }\n\n $this->_parseFormattedData();\n\n $this->_setParameters();\n\n // Set RFMurl encoding format.\n if (isset($this->_Parameters->RFMfixFM01)) {\n Url::setEncoding(Url::RFMfixFM01);\n }\n if (isset($this->_Parameters->RFMfixFM02)) {\n Url::setEncoding(Url::RFMfixFM02);\n }\n\n // Set requested override method.\n if (isset($this->_Parameters->RFMmethod)) {\n $this->method = strtoupper($this->_Parameters->RFMmethod);\n if (isset($this->_genericMethodNames[$this->method])) {\n $this->method = $this->_genericMethodNames[$this->method];\n }\n }\n\n $this->_Credentials = new Credentials($this->_Parameters);\n }", "title": "" }, { "docid": "7f38ed6c59dbde62ceed50383b244d6f", "score": "0.49364546", "text": "public function parseRequest($wp)\n {\n if (isset($wp->query_vars['f51-ajax'])) {\n switch($wp->query_vars['f51-ajax']) {\n case 'activity-structure':\n $this->presentActivityAsJSON(!empty($wp->query_vars['f51-activity-id']) ? $wp->query_vars['f51-activity-id'] : 0);\n exit;\n\n case 'create-activity':\n $this->createActivity();\n exit;\n\n }\n\n }\n }", "title": "" }, { "docid": "14209ac5bf5acfab4a3ddd71c88c99f0", "score": "0.49249312", "text": "public function handle_webhook() {\n\n\t\t$webhook_handler = new WC_Coinqvest_Webhook_Handler($this->api_secret);\n\t\t$webhook_handler->handle_webhook();\n\t}", "title": "" }, { "docid": "e672c4d31ddfede956652ebb37515741", "score": "0.4920864", "text": "protected function parse_data() {\n\t\t// Create a normalized feed array (to be served later)\n\t\t$parsed_data = array();\n\n\t\t// Let's loop through each post\n\t\tforeach($this->data['data'] as $post) {\n\t\t\t// Set reusable timestamp variable\n\t\t\t$timestamp = strtotime($post['created_time']);\n\n\t\t\t// If the message data is empty, but the name/title isn't, just set the message to have the value of the name\n\t\t\tif (empty($post['message']) && !empty($post['name'])) {\n\t\t\t\t$post['message'] = $post['name'];\n\t\t\t}\n\n\t\t\t// If the post's message is empty $this->remove_empty_message_posts is set to true\n\t\t\tif (empty($post['message']) && $this->remove_empty_message_posts) {\n\t\t\t\t// Just skip adding the post\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$parsed_data[] = array(\n\t\t\t\t'source' => 'Facebook',\n\t\t\t\t'title' => $post['from']['name'],\n\t\t\t\t'userid' => $post['from']['id'],\n\t\t\t\t'rawtime' => $post['created_time'],\n\t\t\t\t'timestamp' => $timestamp,\n\t\t\t\t'datetime' => \\PSU::html5_datetime($timestamp),\n\t\t\t\t'time_ago' => \\PSU::date_diff($timestamp, time(), 'simple'),\n\t\t\t\t'url' => $post['actions'][0]['link'],\n\t\t\t\t'text' => $post['message'],\n\t\t\t);\n\t\t}\n\n\t\treturn $parsed_data;\n\n\t}", "title": "" }, { "docid": "1e5f1f582e0cc217f45832b8a50d49d8", "score": "0.49034312", "text": "public function parsePostData() {\n\t\t$PreparedUpdate = $this->prepareUpdateStatement();\n\t\t$Factory = new PluginFactory();\n\n\t\tforeach ($Factory->completeData() as $Plugin) {\n\t\t\t$id = $Plugin['id'];\n\n\t\t\tif (isset($_POST['plugin_modus_'.$id]) && isset($_POST['plugin_order_'.$id])) {\n\t\t\t\t$this->updatePlugin($PreparedUpdate, $Plugin, (int)$_POST['plugin_modus_'.$id], (int)$_POST['plugin_order_'.$id]);\n\t\t\t}\n\t\t}\n\n\t\t$Factory->clearCache();\n\t}", "title": "" }, { "docid": "8342b9a779687590547bf8c225928af6", "score": "0.49005562", "text": "protected function getIncomingData()\n\t{\n\t\t// Get POST parameters\n\t\tif ($this->parameters->isTokenValid()) {\n\t\t\t$fe = GeneralUtility::_POST('FE');\n\t\t\tif (isset($fe) && is_array($fe)) {\n\t\t\t\t$feDataArray = $fe[$this->theTable];\n\t\t\t\tSecuredData::secureInput($feDataArray, false);\n\t\t\t\t$this->modifyRow($feDataArray, false);\n\t\t\t\t$feDataArray = array_merge($feDataArray, SessionData::readPassword($this->extensionKey));\n\t\t\t\t$this->setDataArray($feDataArray);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f536455361f9121b36eda5f0ea223b25", "score": "0.48764643", "text": "public function webhook() {\n \n\t\t\n \n\t \t}", "title": "" }, { "docid": "00e16e6ee047a548247e8aad378272fa", "score": "0.4860765", "text": "private function readPayload() {\n $this->payload = (array) json_decode(file_get_contents('php://input'), TRUE);\n }", "title": "" }, { "docid": "22a893de3a54b1ba72c028c3bdd89d68", "score": "0.4811629", "text": "private function set_wp_data_from_http_message() {\n\n\t\t$data = \\json_decode( (string) $this->http_message->getBody() );\n\n\t\tparent::set_data( \\is_scalar( $data ) ? $data : (array) $data );\n\t}", "title": "" }, { "docid": "498ffc666b6dd8cc87e38cd39ed09cbb", "score": "0.48103112", "text": "public function formatWebhook(array $requestData);", "title": "" }, { "docid": "22b4b56a055954c0fb264fe443d1c0fa", "score": "0.4795979", "text": "public static function handleNotification()\n {\n MailLog::info(file_get_contents('php://input'));\n $messages = json_decode(file_get_contents('php://input'), true);\n\n if ($messages == [['msys' => []]]) {\n MailLog::info('Webhook verified OK');\n // return 200, it just does not work\n return response('Webhook verified OK', 200);\n }\n\n foreach($messages as $message) {\n if (!array_key_exists('message_event', $message['msys'])) {\n MailLog::warning('Unknown notification type');\n continue;\n\n // Sample of 'unknown notification type'\n // [{\"msys\":{\"track_event\":{\"rcpt_meta\":{},\"event_id\":\"84559159220532969\",\"transmission_id\":\"30515955248391749\",\"template_id\":\"template_30515955248391749\",\"template_version\":\"0\",\"rcpt_tags\":[],\"user_agent\":\"Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)\",\"delv_method\":\"esmtp\",\"rcpt_to\":\"louisitvn@gmail.com\",\"type\":\"open\",\"sending_ip\":\"35.160.182.156\",\"message_id\":\"0001a195d458e5216b36\",\"customer_id\":\"9187\",\"ip_address\":\"66.249.84.222\",\"timestamp\":\"1490326971\",\"ip_pool\":\"shared\",\"msg_size\":\"8956\",\"routing_domain\":\"gmail.com\",\"subject\":\"Welcome to test Mail List\",\"num_retries\":\"0\",\"msg_from\":\"msprvs1=172565Byap5t2=bounces-9187@spmailt.com\",\"queue_time\":\"394\",\"friendly_from\":\"test@sender.com\",\"geo_ip\":{\"country\":\"US\",\"region\":\"CA\",\"city\":\"Mountain View\",\"latitude\":37.4192,\"longitude\":-122.0574},\"raw_rcpt_to\":\"test@example.com\"}}}]\n }\n\n $type = $message['msys']['message_event']['type'];\n switch ($type) {\n case 'bounce':\n case 'out_of_band':\n case 'policy_rejection':\n self::handleBounce($message);\n break;\n case 'spam_complaint':\n self::handleSpamComplaint($message);\n break;\n default:\n MailLog::warning('Unknown notification type: ' . $type);\n }\n }\n }", "title": "" }, { "docid": "44b777c09c769a19a6aeb813026a6bda", "score": "0.47958", "text": "public function check_for_webhook() {\n\n\t\tif ( ! WC_Wompi_Helper::is_webhook(true) ) {\n\t\t\treturn false;\n\t\t}\n\n $response = json_decode( file_get_contents('php://input') );\n if ( is_object( $response ) ) {\n WC_Wompi_Logger::log( 'Webhook response: ' . print_r( $response, true ) );\n $this->process_webhook( $response );\n } else {\n WC_Wompi_Logger::log( 'Response ERROR' );\n status_header( 400 );\n }\n\t}", "title": "" }, { "docid": "efb06d9f08ef19a3bb8bb94fdd5af731", "score": "0.47733882", "text": "public function check_for_webhook() {\n\n\t\tif ( ! WC_Safetypay_Helper::is_webhook(true) ) {\n\t\t\treturn false;\n\t\t}\n $this->originalResponse = file_get_contents('php://input');\n $response = $this->format_data( file_get_contents('php://input') );\n \n $string = $response->RequestDateTime.$response->MerchantSalesID.$response->ReferenceNo.$response->CreationDateTime.$response->Amount.$response->CurrencyID.$response->PaymentReferenceNo.$response->Status;\n\n if ( $this->redirect($response) ){\n status_header( 200 );\n $this->csv($response);\n die();\n }\n \n if ( WC_Safetypay_Helper::checkSignature($string, $response->Signature) ) {\n //WC_Safetypay_Logger::log( 'Signature request: '.$response->Signature );\n //WC_Safetypay_Logger::log( 'Signature: TRUE' );\n WC_Safetypay_Logger::log( 'Webhook DATA: ' . $this->originalResponse );\n WC_Safetypay_Logger::log( 'Webhook start: ' . print_r( $response, true ) );\n\n $public_key = WC_Safetypay::$settings['testmode'] === 'yes' ? WC_Safetypay::$settings['test_public_key'] : WC_Safetypay::$settings['public_key'];\n if($response->ApiKey == $public_key){\n \n $this->process_webhook( $response );\n }else{\n WC_Safetypay_Logger::log( 'The api key is not equal' );\n }\n \n } else {\n WC_Safetypay_Logger::log( 'Signature: FALSE' );\n status_header( 400 );\n die();\n }\n\t}", "title": "" }, { "docid": "2083f97df82fa9499a3f31ceb8d68f08", "score": "0.47604415", "text": "abstract function parse($data);", "title": "" }, { "docid": "af1202fd2c428888b97aa886d95db77a", "score": "0.47594163", "text": "public function webhook($callback=null)\n {\n\n $merchant_secret = 'sk_live_JsrB8wDujH0CZSE1KZiz8EQwpqUXv2hGmuye38lzkFLx';\n\n // Create and initialize variables to be sent to confirm the that the ongoing transaction is associated with the current merchant\n\n $received_transaction_merchant_secret = null;//create an empty received_transaction_merchant_secret\n $received_transaction_uid = null;//create an empty received_transaction_uid\n $received_transaction_status = null;//create an empty received_transaction_status\n $received_transaction_details = null;//create an empty received_transaction_details\n $received_transaction_token = null;//create an empty received_transaction_token\n $authenticated = 'false'; //create an authentication boolean and initialize it at false\n $received_transaction_amount = null;\n $received_transaction_type = null;\n $received_transaction_receiver_currency = null;\n\n //extracting data from the post and filling the variable above\n if(isset($_POST['merchant_secret'])){\n $received_transaction_merchant_secret = $_POST['merchant_secret']; //Get the merchant_secret posted by WeCashUp.\n\n }\n\n if(isset($_POST['transaction_uid'])){\n $received_transaction_uid = $_POST['transaction_uid']; //Get the transaction_uid posted by WeCashUp\n }\n if(isset($_POST['transaction_status'])){\n $received_transaction_status = $_POST['transaction_status']; //Get the transaction_status posted by WeCashUp\n }\n if(isset($_POST['transaction_amount'])){\n $received_transaction_amount = $_POST['transaction_amount']; //Get the transaction_amount posted by WeCashUp\n }\n\n if(isset($_POST['transaction_receiver_currency'])){\n $received_transaction_receiver_currency = $_POST['transaction_receiver_currency']; //Get the transaction_amount posted by WeCashUp\n }\n\n if(isset($_POST['transaction_details'])){\n $received_transaction_details = $_POST['transaction_details']; //Get the transaction_details posted by WeCashUp\n }\n\n if(isset($_POST['transaction_token'])){\n $received_transaction_token = $_POST['transaction_token']; //Get the transaction_token posted by WeCashUp\n }\n\n if(isset($_POST['transaction_type'])){\n $received_transaction_type = $_POST['transaction_type']; //Get the transaction_type posted by WeCashUp\n }\n\n echo '<br><br> received_transaction_merchant_secret : '.$received_transaction_merchant_secret;\n echo '<br><br> received_transaction_uid : '.$received_transaction_uid;\n echo '<br><br> received_transaction_token : '.$received_transaction_token;\n echo '<br><br> received_transaction_details : '.$received_transaction_details;\n echo '<br><br> received_transaction_amount : '.$received_transaction_amount;\n echo '<br><br> received_transaction_status : '.$received_transaction_status;\n echo '<br><br> received_transaction_type : '.$received_transaction_type;\n\n /***** SAVE THIS IN YOUD DATABASE - start ****************/\n\n $file = $received_transaction_uid.'.txt';\n $txt = \"received_transaction_merchant_secret : \".$received_transaction_merchant_secret.\"\\n\".\n \"received_transaction_uid : \".$received_transaction_uid.\"\\n\".\n \"received_transaction_token : \".$received_transaction_token.\"\\n\".\n \"received_transaction_details : \".$received_transaction_details.\"\\n\".\n \"received_transaction_amount : \".$received_transaction_amount.\"\\n\".\n \"received_transaction_receiver_currency : \".$received_transaction_receiver_currency.\"\\n\".\n \"received_transaction_status : \".$received_transaction_status.\"\\n\".\n \"received_transaction_type : \".$received_transaction_type.\"\\n\";\n\n $myfile = fopen($file, \"w\") or die(\"Unable to open file!\");\n fwrite($myfile, $txt);\n fclose($myfile);\n\n /***** SAVE THIS IN YOUD DATABASE - end ****************/\n\n\n\n//Authentication |We make sure that the received data come from a system that knows our secret key (WeCashUp only)\n if($received_transaction_merchant_secret !=null && $received_transaction_merchant_secret == $merchant_secret){\n //received_transaction_merchant_secret is Valid\n\n echo '<br><br> merchant_secret [MATCH]';\n\n //Now check if you have a transaction with the received_transaction_uid and received_transaction_token\n\n $database_transaction_uid = 'TEST_UID';//************* LOAD FROM YOUR DATABASE ****************\n $database_transaction_token = 'TEST_TOKEN';//************* LOAD FROM YOUR DATABASE ****************\n\n if($received_transaction_uid != null && $received_transaction_uid == $database_transaction_uid){\n //received_transaction_merchant_secret is Valid\n\n echo '<br><br> transaction_uid [MATCH]';\n\n if($received_transaction_token != null && $received_transaction_token == $database_transaction_token){\n //received_transaction_token is Valid\n\n echo '<br><br> transaction_token [MATCH]';\n\n //All the 3 parameters match, so...\n $authenticated = 'true';\n }\n }\n }\n\n echo '<br><br>authenticated : '.$authenticated;\n\n if($authenticated == 'true'){\n\n //Update and process your transaction\n\n if($received_transaction_status ==\"PAID\"){\n //Save the transaction status in your database and do whatever you want to tell the user that it's transaction succeed\n echo '<br><br> transaction_status : '.$received_transaction_status;\n\n }else{ //Status = FAILED\n\n //Save the transaction status in your database and do whatever you want to tell the user that it's transaction failed\n echo '<br><br> transaction_status : '.$received_transaction_status;\n }\n\n /***** SAVE THIS IN YOUD DATABASE - start ****************/\n\n $file = 'transactions.txt';\n $txt = \"received_transaction_merchant_secret : \".$received_transaction_merchant_secret.\"\\n\".\n \"received_transaction_uid : \".$received_transaction_uid.\"\\n\".\n \"received_transaction_token : \".$received_transaction_token.\"\\n\".\n \"received_transaction_details : \".$received_transaction_details.\"\\n\".\n \"received_transaction_status : \".$received_transaction_status.\"\\n\".\n \"received_transaction_type : \".$received_transaction_type.\"\\n\";\n\n $myfile = fopen(\"newfile.txt\", \"w\") or die(\"Unable to open file!\");\n fwrite($myfile, $txt);\n fclose($myfile);\n /***** SAVE THIS IN YOUD DATABASE - end ****************/\n\n /*\n NOTE : \tYou can analyze each variable in order to process further operations like sending\n an email to the customer to inform him that his transaction failed or launching the\n delivery process if the transaction succeed.\n */\n\n }\n }", "title": "" }, { "docid": "09903388f2dd4520454eb9d6a95ec4e6", "score": "0.47490847", "text": "abstract protected function parseData($data);", "title": "" }, { "docid": "57001fa919b61bc55fa72d975d47504e", "score": "0.47489253", "text": "protected function parseDataFromResponse()\n {\n $content = $this->rawResponse->getBody();\n $config = new RequestPaymentConfig();\n $config->parseFromXml($content);\n return $config->getPayer();\n }", "title": "" }, { "docid": "50708065e06603db26af38fe2527e1b0", "score": "0.4740201", "text": "private function init(){\n\t\t\t//dump( __LINE__, __METHOD__, $_POST );\n\t\t\t\n\t\t\t//This class shoudl only fire if there is form data to be processed. \n\t\t\tif( !isset( $_POST ) || empty( $_POST ) ){\n\t\t\t\tprint( 'Form data is not set or is empty!' );\n\t\t\t\texit;\n\t\t\t} \n\t\t\t\n\t\t\t//Sanitize incoming POST data. \n\t\t\t$post = filter_var_array( $_POST, FILTER_SANITIZE_STRING );\n\t\t\t\n\t\t\t//Check if Nonce is set. \n\t\t\tif ( ! isset( $post['_nn_payment_nonce'] ) || ! wp_verify_nonce( $post['_nn_payment_nonce'], 'nn_pay_'.$post[ 'enrollment_type' ] ) \n\t\t\t) {\n\t\t\t print 'Sorry, your payment request did not validate.';\n\t\t\t exit;\n\t\t\t} \n\t\t\t\n\t\t\t//If response is not false...\n\t\t\tif( ( $response = $this->process( $post ) ) !== false ){\n\t\t\t\t\n\t\t\t\t$json = json_encode( $response, JSON_FORCE_OBJECT );\n\t\t\t\t\n\t\t\t\t//dump( __LINE__, __METHOD__, $json );\n\t\t\t\t\n\t\t\t\t//If a successful transaction has been completed, let's format data for use with the system first. \n\t\t\t\t/* $formatter = new misc/NNDataFormat( $response, '' );\n\t\t\t\n\t\t\t\t//Incomplete... needs work. \n\t\t\t\t$formatter->add_post_data( $post );\n\t\t\t\t\n\t\t\t\t$formatted = $formatter->do_formatting();\n\t\t\t\t\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t$next_step = $this->next_step( $post, $response );\n\t\t\t\t\n\t\t\t\t//$arr = nn_format_data( $response, 'Stripe' );\n\t\t\t\t//format data\n\t\t\t\t\n\t\t\t\tswitch( $this->type ){\n\t\t\t\t\tcase 'subscription':\n\t\t\t\t\t\t$tx_id = $response[ 'latest_invoice' ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t$tx_id = $response[ 'id' ]; //?\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'payment':\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$tx_id = $response[ 'id' ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$params = array(\n\t\t\t\t\t'tx_id' => $tx_id,\n\t\t\t\t\t//'register' => true,\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$redirect = ( !empty( $next_step ) )? $next_step : $post[ 'return_success' ];\n\t\t\t\t\n\t\t\t\t$this->redirect( $redirect, $params );\n\t\t\t\t//dump( __LINE__, __METHOD__, $post );\n\t\t\t\t//dump( __LINE__, __METHOD__, $response );\n\t\t\t\t//dump( __LINE__, __METHOD__, $params );\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$this->redirect( $post[ 'return_fail' ] );\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}", "title": "" }, { "docid": "394af90d707f359d4263221d079aa7aa", "score": "0.4732441", "text": "public function parseNotification()\n {\n\n }", "title": "" }, { "docid": "ae41cad26025833167ac018232f73c44", "score": "0.47107413", "text": "protected function _handleGetData () {\n $queryString = new RFMfixQueryString(TRUE);\n\n // Identify RFM* query string parameters.\n $this->_parametersQueryString = $queryString->getRegex('/^RFM.*/');\n\n // Return immediately unless we are called with GET.\n if (strtoupper($this->method != 'GET')) {\n return;\n }\n\n // Handle data.\n if (isset($queryString->RFMdata)) {\n // Allow document embedded in RFMdata parameter. Store for\n // later format parsing.\n $this->data = $queryString->RFMdata;\n unset($this->_parametersQueryString['RFMdata']);\n } else {\n // All submitted data is in query string, we will populate\n // \\RESTfm\\Message\\Message ourselves.\n $getData = $queryString->getRegex('/^(?!RFM).+/'); // NOT RFM*\n if (count($getData) > 0) {\n $this->_Message->addRecord(new Message\\Record(NULL, NULL, $getData));\n }\n }\n }", "title": "" }, { "docid": "788e6241c1f781ef9d731b83f01874e2", "score": "0.4709247", "text": "abstract protected function parse($data);", "title": "" }, { "docid": "77edd40f41e351d921fadb041a15a9d4", "score": "0.46925578", "text": "public function handleWebhook(Request $request)\n {\n\n $subscription = $this->organization->subscription()->first();\n $billing = Billing::where('uuid', $subscription->last_billing_uuid)->get()->first();\n\n if ($request->input('status') == 'success') {\n\n $subscription->is_active = true;\n $subscription->save();\n\n $billing->status = \"SUCCESS\"; //TODO DEFINIR DES CODES DERREURS ?\n $billing->is_billed = true;\n $billing->save();\n\n } else {\n\n $billing->status = \"ERROR\";\n $billing->save();\n\n }\n }", "title": "" }, { "docid": "d491b6994907ed98122cda030262ddb1", "score": "0.46908653", "text": "public function getDeserializePayload();", "title": "" }, { "docid": "d491b6994907ed98122cda030262ddb1", "score": "0.46908653", "text": "public function getDeserializePayload();", "title": "" }, { "docid": "ea6746025114142237f332547972bdab", "score": "0.46865696", "text": "private function get_payload()\n {\n $input_stream = file_get_contents('php://input');\n\n // Assume it is JSON-encoded data and return it\n return json_decode($input_stream);\n\n }", "title": "" }, { "docid": "179eb33103fcdb13ae09e70aa244c43c", "score": "0.46843886", "text": "protected function parse() {\n $this->parseNote(['usage_period_note', 'usage_area_note', 'note']);\n }", "title": "" }, { "docid": "bb2f5ee3759b81e27361d9582aa2be60", "score": "0.46833488", "text": "protected function getData() {\n\t\tif ($body = @file_get_contents('php://input')) {\n\t\t\treturn @json_decode($body, true);\n\t\t}\n\t}", "title": "" }, { "docid": "8301f03118dbd49e1fd06818aed4574e", "score": "0.46805248", "text": "public function store(Request $request, Bill $bill)\n {\n $info = $request->input('data');\n $bill->tienda_id = $info['tienda_id'];\n $bill->item_id = $info['item_id'];\n $bill->vendor_id = $info['vendor_id'];\n $bill->description = $info['description'];\n $bill->qty = $info['qty'];\n $bill->price = $info['price'];\n $bill->product_amount = $info['product_amount'];\n $bill->unit = $info['unit'];\n $bill->status = \"open\";\n $bill->fecha_bill = $info['fecha_bill'];\n $bill->created_at = Carbon::now('America/New_York')->format('Y-m-d h:i:s');\n $bill->updated_at = Carbon::now('America/New_York')->format('Y-m-d h:i:s');\n\n $bill->save();\n\n return response()->json($bill);\n }", "title": "" }, { "docid": "4baf9f38f468bb6d96af12f26850b961", "score": "0.46791145", "text": "function parse_plugin_request() {\n\n\t\t\t// if ajax is processing, don't do anything\n\t\t\tif( defined('DOING_AJAX') && DOING_AJAX ){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// parameters\n\t\t\t$action = CalcUtils::get_param('action');\n\t\t\t$util_action = CalcUtils::get_param('util_action');\n\n\t\t\tif( 'st_pricecalc' === $util_action ){\n\t\t\t\tself::process_pricecalc();\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "f5e2e76dda71021d96b5f46abb32c597", "score": "0.46786875", "text": "public function callbackEvent() {\n if ((strtoupper($_SERVER['REQUEST_METHOD']) != 'POST' ) || !array_key_exists('HTTP_X_PAYSTACK_SIGNATURE', $_SERVER) ) \n exit();\n\n // Retrieve the request's body\n $input = @file_get_contents(\"php://input\");\n\n // validate event do all at once to avoid timing attack\n if($_SERVER['HTTP_X_PAYSTACK_SIGNATURE'] !== hash_hmac('sha512', $input, env('PAYSTACK_SECRET_KEY')))\n exit();\n\n http_response_code(200);\n\n // parse event (which is json string) as object\n // Do something - that will not take long - with $event\n $event = json_decode($input);\n\n if('success' == $event->data->status) {\n\n $customer_email = $event->data->customer->email;\n $user = User::where('email_address', $customer_email)->first();\n\n $business_subscription = BusinessSubscription::where('account_id', $user->id)->first();\n\n $subscription = Subscriptions::find($business_subscription->subscription_id);\n\n $business_subscription->start_at = time();\n $business_subscription->end_at = strtotime(\"+$subscription->duration\", time());\n $business_subscription->save();\n\n // subscription renewed mail.\n Mail::to($user)->queue(new SubscriptionRenewed($user, $subscription));\n \n // log this\n $log_event = new EventsPayload();\n $log_event->payload = json_encode($input);\n $log_event->business_subscription_id = $business_subscription->id;\n $log_event->save();\n\n Trials::where('user_id', auth()->user()->id)->update(['active' => 0])->save();\n }\n\n exit();\n }", "title": "" }, { "docid": "4db28210093c36b3ff1e12853ccef504", "score": "0.46706688", "text": "private function _receivedPostback($event)\n {\n $sender = $event['sender']['id'];\n $payload = $event['postback']['payload'];\n $this->_processPostback($sender, $payload);\n\n }", "title": "" }, { "docid": "1ea9a669a8fb7c733ab60d6eba27157c", "score": "0.46676004", "text": "protected function parseData($data)\n\t{\n\t\t$this->app->setBody(json_encode($data));\n\t}", "title": "" }, { "docid": "70bf2fcd92f617b4db602e868b078016", "score": "0.46622193", "text": "function processDetailsValidationPageBills($input) {\n\n //Check if the input is the back character\n\n if ($input === $this->getSessionVar(self::BACK_OPTION_CHARACTER)) {\n\n //Navigate back\n\n $this->navigateBack();\n\n return;\n } //Check if the input is home character\n else if ($input === $this->getSessionVar(self::HOME_OPTION_CHARACTER)) {\n\n //Go Home\n\n $this->GoHome();\n\n return;\n } //Check if the input empty\n else if (empty($input)) {\n\n //Warning text\n //Actual Text: You have enter empty input. Please enter again:\n\n $warning = $this->loadText(\"EmptyInput\");\n\n\n\n $this->DetailsValidationPageBills($warning);\n\n return;\n } //Check if the input is not a number\n else if (!$this->isValidNumber($input)) {\n\n //Warning text\n //Actual Text: Invalid input. Please enter a valid number::\n\n $warning = $this->loadText(\"NonNumericInput\");\n\n\n\n $this->DetailsValidationPageBills($warning);\n\n return;\n } //Check if the input entered is in the range gotten\n else if (!in_array($input, array(1, 2))) {\n\n //Warning text\n //Actual Text: Invalid input. Please select a valid option:\n\n $warning = $this->loadText(\"InvalidInput\");\n\n\n\n $this->DetailsValidationPageBills($warning);\n\n return;\n }\n\n\n\n //Switch the statement\n\n switch ($input) {\n\n //Check if the value\n //Yes\n\n case 1:\n\n //Log\n\n $this->logMessage(\"Processing bills from wallet\");\n\n break;\n\n //No\n\n case 2:\n\n $this->GoHome();\n\n return;\n }\n\n\n\n //Set the chosen account\n\n $accountData = $this->getCustomerData();\n\n $accountData = $accountData[self::DATA][self::CUSTOMER_ACCOUNTS][$input];\n\n\n\n //Get the saved bill\n\n $bill = $this->getSessionVar(self::CHOSEN_BILL);\n\n\n\n /*\n\n * <Payload>\n\n * <serviceID>BILL_PAY</serviceID>\n\n * <flavour>open</flavour>\n\n * <pin>313233343536373831323334353637380e987f37d375c9d85bffee51a3d710d204824b95eb8bdda1b8a7cbcbc65777fe9d6d0b59cd2e854458047533bf</pin>\n\n * <accountAlias>Andrew_254704050143</accountAlias>\n\n * <accountID>367</accountID>\n\n * <amount>100</amount>\n\n * <merchantCode>HMCONE</merchantCode>\n\n * <enroll>null</enroll>\n\n * <CBSID>1</CBSID>\n\n * <columnA>254704050143</columnA>\n\n * <columnC>HMCONE</columnC>\n\n * <columnD>null</columnD>\n\n * </Payload>\n\n * */\n\n\n\n //Get the serviceID\n\n $serviceID = $this->getSessionVar(self::SERVICES);\n\n $serviceID = $serviceID[\"BILLS\"][\"ServiceID\"];\n\n\n\n //Process the transaction\n\n $payload = array(\n \"serviceID\" => $serviceID,\n \"flavour\" => \"open\",\n \"pin\" => $this->getSessionVar(self::ENCRYPTED_PIN),\n \"accountAlias\" => $accountData[self::ACCOUNT_ALIAS],\n \"accountID\" => $accountData[self::CBS_ACCOUNT_ID],\n \"amount\" => $bill[self::BILL_AMOUNT],\n \"merchantCode\" => $bill[self::BILL_SERVICE_CODE],\n \"enroll\" => null,\n \"CBSID\" => $this->getSessionVar(self::WALLET_CBS_ID),\n \"columnA\" => $this->_msisdn,\n \"columnC\" => $bill[self::BILL_SERVICE_CODE],\n \"columnD\" => null\n );\n\n\n\n //Call wallet and get the response\n\n $response = $this->asynchronousProcessing($payload);\n\n\n\n //Log\n\n $this->logMessage(\"The response received is: \", $response);\n\n\n\n //Check if the response was successful\\\n\n if ($response[self::DATA][self::WALLET_STAT_CODE] !== 1) {\n\n //Log, error\n\n $this->logMessage(\"Unable to process balance enquiry, the error was:\"\n , $response, self::LOG_LEVEL_ERROR);\n\n\n\n //Load error message\n //Actual text: Unable to process your request at this time. Please try again later\n\n $text = $this->loadText(\"ErrorMessage\");\n\n\n\n //Display error\n\n $this->presentData($text, null, null, self::SESSION_STATE_END);\n\n return;\n }\n\n\n\n //Log\n\n $this->logMessage(\"Successfully posted pay bill request, the response received is: \", $response);\n\n\n\n //Set the text\n\n $text = $this->loadText(\"SuccessMsg\", array(self::ECOBANK_NAME));\n\n\n\n //Display message\n\n $this->FinalPage($text);\n }", "title": "" }, { "docid": "d41ef8b1f1fc98ecffe817786cf0cd3c", "score": "0.4661415", "text": "protected function _handlePostData () {\n\n // Return immediately unless we are called with POST.\n if (strtoupper($this->method) != 'POST') {\n return;\n }\n\n // Find POST form data.\n $postData = array();\n if (isset($this->_parametersQueryString['RFMformat'])) {\n // This format is already explicitly defined, do nothing and leave\n // this for the format parsers.\n return;\n } elseif (stripos($_SERVER['CONTENT_TYPE'], 'application/x-www-form-urlencoded') !== FALSE) {\n // Use our parser, not PHP's.\n $parser = new RFMfixQueryString();\n $parser->parse_str($this->data, $postData);\n } elseif (stripos($_SERVER['CONTENT_TYPE'], 'multipart/form-data') !== FALSE ) {\n // At the moment we are at the mercy of PHP's parsing. This\n // _will_ damage anything with dots and spaces, by mangling into\n // underscores. (This was a part of the old legacy support for\n // globals in PHP).\n $postData = $_POST;\n } else {\n // Not form data, so we leave this for the format parsers.\n return;\n }\n\n // Handle extra encoding for FileMaker 13 httppost: (Get From URL)\n // RFMfixFM02 parameter may be in POST ($postData), or in the already\n // parsed query string.\n if (isset($postData['RFMfixFM02']) ||\n isset($this->_parametersQueryString['RFMfixFM02'])) {\n $decodedData = array();\n foreach ($postData as $key => $value) {\n $decodedData[RFMfixFM02::postDecode($key)] =\n RFMfixFM02::postDecode($value);\n }\n $postData = $decodedData;\n }\n\n // Identify and store RFM* parameters then remove from $postData.\n $toDelete = array();\n foreach ($postData as $key => $value) {\n if (preg_match('/^RFM*/', $key)) {\n if ('RFMdata' == $key) {\n continue;\n }\n $this->_parametersPost[$key] = $value;\n $toDelete[] = $key;\n }\n }\n foreach ($toDelete as $key) {\n unset($postData[$key]);\n }\n\n // Handle postData.\n if (isset($postData['RFMdata'])) {\n // Allow document embedded in RFMdata parameter. Store for\n // later format parsing.\n $this->data = $postData['RFMdata'];\n } else {\n // All submitted data is in array, we will populate\n // \\RESTfm\\Message\\Message ourselves.\n $this->_Message->addRecord(new Message\\Record(NULL, NULL, $postData));\n unset($this->data);\n }\n }", "title": "" }, { "docid": "83aa5a6202e5bec344d29e5e8fdc46be", "score": "0.4661046", "text": "private function parseInfo() {\r\n \r\n // Parse new data\r\n if(isset($_POST['amount'], $_POST['requiredAmount'])) {\r\n $this->dataManager->SetDebtAmounts($_SESSION['UserID'], $this->path[1], $_POST['amount'], $_POST['requiredAmount']);\r\n }\r\n elseif(isset($_POST['newPay'])) {\r\n $this->dataManager->AddDebtAmount($_SESSION['UserID'], $this->path[1], $_POST['newPay']);\r\n }\r\n\r\n // Reload info\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') \r\n $this->debtData = $this->dataManager->GetDebtInfo($this->path[1], $_SESSION['ClassInfo']['ClassID']);\r\n\r\n $logs = $this->dataManager->GetPaylog($this->path[1]);\r\n $this->infoDOM = '';\r\n foreach($logs as $log) {\r\n $this->infoDOM .= '<tr>\r\n <td>'.$log['Date'].'</td>\r\n <td>'.$this->logEventToText($log['Type']).'</td>\r\n <td>'.$this->logAmountToText($log['Type'], $log['Amount']).'</td>\r\n <td>'.htmlentities($log['FullName']).'</td>\r\n </tr>'.PHP_EOL;\r\n }\r\n\r\n }", "title": "" }, { "docid": "0de40e7f3daa18fbff2cf4c32cbf2cc6", "score": "0.4659073", "text": "public function webhook(Request $request){\n // Do something\n }", "title": "" }, { "docid": "ac75115b1cc6c6d72cb8b2e441c04546", "score": "0.46552876", "text": "private function __getPostContent(){\n $data = file_get_contents(\"php://input\");\n $this->jsonDecodedRequestedData = json_decode($data);\n }", "title": "" }, { "docid": "4a357364ad3c1f932614359bdc3158eb", "score": "0.4651027", "text": "protected function _parse_patch()\n {\n // It might be a HTTP body\n if ($this->request->format)\n {\n $this->request->body = $this->input->raw_input_stream;\n }\n else if ($this->input->method() === 'patch')\n {\n // If no filetype is provided, then there are probably just arguments\n $this->_patch_args = $this->input->input_stream();\n }\n }", "title": "" }, { "docid": "2d99999872543b51042e8731ff0cbeda", "score": "0.4647613", "text": "public static function processBilling($data = [] , $filename = '')\r\n {\r\n $billing_hdr = BillingInformation::where('billing_information_filename', '=', $filename)->first();\r\n if ($billing_hdr) {\r\n $error = [\r\n 'field_name' => 'File Uploaded',\r\n 'message' => 'CSV file already exists: '.$filename,\r\n ];\r\n\r\n $response = [\r\n 'code' => '422',\r\n 'status' => \"UE003\",\r\n 'message' => [$error]\r\n ];\r\n return $response;\r\n\r\n } else {\r\n $sold_to_code = \"\";//TO HOLD VALUE FOR EFGR\r\n $ship_to_code = \"\";//TO HOLD VALUE FOR ACTUAL STORE CODE\r\n if (!empty($data)) {\r\n $data = Excel::load($data, function($reader) {\r\n $reader->noHeading = true;\r\n }, 'ISO-8859-1')->get();\r\n $row_count = $data->count();\r\n $parsed_error = [];\r\n $error = [];\r\n\r\n // added by luis 6192019\r\n // checking for non-pylon store\r\n $billing_hdr_row = $data[0];\r\n $billing_dtl_first_row = $data[1];\r\n // 8 = db_billing_hdr_fields.sold_to_code\r\n // 11 = db_billing_dtl_fields.ship_to_code\r\n $isEFGR = ($billing_hdr_row[8] != $billing_dtl_first_row[11]) ? 1 : 0;\r\n\r\n foreach($data as $row => $value) {\r\n if ($value[0] != 'HDR') {\r\n if ($value[0] != 'DTL') {\r\n $error = [\r\n 'field_name' => 'File Uploaded',\r\n 'message' => 'CSV file '.$filename.\r\n ' format is invalid. Column 1 value is invalid!',\r\n ];\r\n $parsed_error[] = $error;\r\n }\r\n }\r\n $row_number = ($row == 0) ? 1 : $row + 1;\r\n if ($value[0] == 'HDR') {\r\n $billing_header = new BillingInformationHdr();\r\n foreach(config('app.db_billing_hdr_fields') as $index => $field) {\r\n\r\n if ($value[$index] !== null) {\r\n\r\n if ($field == 'delivery_number') {\r\n //call Billing Information Header model for checking if delivery number is existing\r\n $is_exist = BillingInformationHdr::whereDeliveryNumber($value[$index])->first();\r\n if ($is_exist) {\r\n $error = [\r\n 'field_name' => $field,\r\n 'message' => 'Delivery Number already exist. Error in row number '.$row_number.\r\n ' in file '.$filename,\r\n ];\r\n $parsed_error[] = $error;\r\n }\r\n }\r\n\r\n if ($field == 'delivery_date' || $field == 'po_date') {\r\n $billing_header->$field = date('Y-m-d', strtotime($value[$index]));\r\n } else {\r\n $billing_header->$field = $value[$index];\r\n }\r\n\r\n // added by luis 6192019\r\n // checking for non-pylon store\r\n if(!$isEFGR)\r\n {\r\n //checking if store id is valid\r\n if ($field == 'sold_to_code' || $field == 'ship_to_code') {\r\n $is_exist = Store::where(\"selecta_code_id\", \"=\", $value[$index])->first();\r\n if (!$is_exist) {\r\n $error = [\r\n 'field_name' => $field,\r\n 'message' => 'Please check if store code already created on store management module. Error in row number '.$row_number.\r\n ' in filename '.$filename,\r\n ];\r\n\r\n $parsed_error[] = $error;\r\n }\r\n }\r\n }\r\n if ($field == 'sold_to_code') {\r\n $sold_to_code = (string)$value[$index];\r\n }\r\n\r\n } else {\r\n //error log\r\n if ($field !== 'customer_po_reference_number') {\r\n $error = [\r\n 'field_name' => $field,\r\n 'message' => 'Must be required on row number '.$row_number.\r\n ' in filename '.$filename,\r\n ];\r\n $parsed_error[] = $error;\r\n }\r\n }\r\n }\r\n } else if ($value[0] == 'DTL') {\r\n foreach(config('app.db_billing_dtl_fields') as $index => $field) {\r\n if($field == 'ship_to_code'){\r\n $ship_to_code = $value[$index];break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n Log::info(\"SOLD TO CODE: \".$sold_to_code);//DIFFERENT VALUE FROM ship_to_code IF EFGR\r\n Log::info(\"SHIP TO CODE: \".$ship_to_code);\r\n $upload_response = FileHelper::moveFileDestination(public_path().\r\n \"/uploads/csv/billing_extracted\", \"Extracted_\".$filename, public_path().\r\n \"/uploads/csv/billing\");\r\n\r\n //generate UUID\r\n $uuid1 = Uuid::uuid1();\r\n $csv_data_file = BillingInformation::create([\r\n 'billing_information_uuid' => $uuid1->toString(),\r\n 'billing_information_filename' => $filename,\r\n 'parsed_date' => Carbon::now()->toDateTimeString(),\r\n 'upload_date' => Carbon::now()->toDateTimeString(),\r\n 'synched_status' => 1,\r\n 'is_failed' => ($parsed_error) ? 1 : 0,\r\n 'error_log' => ($parsed_error) ? json_encode($parsed_error) : NULL, // response()->json($parsed_error)\r\n ]);\r\n if ($parsed_error) {\r\n $response = [\r\n 'code' => '422',\r\n 'status' => \"UE003\",\r\n 'message' => $parsed_error\r\n ];\r\n return $response;\r\n } else {\r\n\r\n if ($csv_data_file) {\r\n $billing_header->billing_information_id = $csv_data_file->billing_information_id;\r\n $billing_header->sold_to_code = $sold_to_code;\r\n if ($billing_header->save()) {\r\n $count = BillingInformationHdr::whereDeliveryDate($billing_header->delivery_date)->whereSoldToCode($ship_to_code)->count();\r\n $seq_per_day = ($count == 1) ? 0 : $count - 1;\r\n Log::info(\"Sequence per day : \".$seq_per_day);\r\n $store = Store::whereSelectaCodeId($ship_to_code)->first();\r\n $row_dtl = 0;\r\n $count_total_rows = 0;\r\n foreach($data as $row_dtl => $value_dtl) {\r\n if ($value_dtl[0] == 'DTL') {\r\n $billing_detail = new BillingInformationDtl();\r\n $billing_detail->billing_information_hdr_id = $billing_header->billing_information_hdr_id;\r\n foreach(config('app.db_billing_dtl_fields') as $index => $field) {\r\n // if($field == 'seq_num') {\r\n // $billing_detail->$field = (string)\"NULL\";\r\n // } else {\r\n $billing_detail->$field = $value_dtl[$index];\r\n // }\r\n }\r\n $billing_detail->save();\r\n $count_total_rows++;\r\n }\r\n }\r\n\r\n $billing_information_dtl = BillingInformationDtl::where('billing_information_hdr_id', '=', $billing_header->billing_information_hdr_id)->get();\r\n //get shipment delivery details\r\n $shipment_delivery = ShipmentDelivery::whereDeliveryNumber($billing_header->delivery_number)->orderByRaw('shipment_delivery_id DESC')->first();\r\n $shipment_assignment = ShipmentAssignment::where('shipment_id', '=', $shipment_delivery->shipment_id)->where('dispatch_time', '<>', NULL)->where('is_active', '=', 1)->first();\r\n $truck_personnel_team = TruckPersonnelTeam::whereTruckPersonnelTeamId($shipment_assignment->truck_personnel_team_id)->first();\r\n $truck_personnel = TruckPersonnel::whereTruckPersonnelId($truck_personnel_team->truck_personnel_id)->first();\r\n $truck_team_helper = TruckTeamHelper::whereTruckPersonnelTeamId($shipment_assignment->truck_personnel_team_id)->get();\r\n\r\n $details = [];\r\n\r\n $pod_invoice_number = ($billing_header) ? $billing_header->invoice_number : '';\r\n\r\n foreach(config('app.db_dlv_hdr_fields') as $index => $field) {\r\n if ($field == 'H') {\r\n $value = 'H';\r\n }\r\n elseif($field == 'Supplier') {\r\n $value = 'SD1';\r\n }\r\n elseif($field == 'Delivery Date') {\r\n //$value = ($billing_header) ? date('Y-m-d',strtotime($billing_header->delivery_date)) : '0000-00-00';\r\n $value = ($billing_header) ? date('Y-m-d', strtotime('-1 day', strtotime($billing_header->invoice_date))) : '0000-00-00';\r\n }\r\n elseif($field == 'Store') {\r\n $value = $store->account_group_store_id;\r\n }\r\n elseif($field == 'PO Number') {\r\n //$value = ($billing_header) ? $billing_header->customer_po_reference_number : '0';\r\n\r\n if (!empty($billing_header->customer_po_reference_number)) {\r\n $value = $billing_header->customer_po_reference_number;\r\n } else {\r\n $value = (string) \"0\";\r\n }\r\n }\r\n elseif($field == 'Total Items') {\r\n $value = $count_total_rows;\r\n }\r\n elseif($field == 'Constant Value') {\r\n $value = '1';\r\n } else {\r\n $value = '';\r\n }\r\n $hdata[] = $value;\r\n\r\n }\r\n\r\n Log::info('CSV Data: '.json_encode($hdata));\r\n\r\n $csv_data[] = $hdata;\r\n $iteratedLineno = 1;\r\n foreach($billing_information_dtl as $dtl => $val) {\r\n //$item_mapping = ItemMapping::whereSelectaItemCode($billing_detail->material_code)->first();\r\n $item_mapping = ItemMapping::where('selecta_item_code', '=', $val['material_code'])->where('store_id', '=', $store->store_id)->where('effectivity_start_date', '<=', Carbon::now())->where('effectivity_end_date', '>=', Carbon::now())->orderby('created_at', 'DESC')->first();\r\n\r\n if(!in_array((string)$sold_to_code, config('app.efgr'))) {//EFGR\r\n $qty_conversion = ($item_mapping->uom_conversion <> 0) ? $item_mapping->uom_conversion : 1;\r\n $value_cost = ($val['list_price_after_tax'] / $val['invoiced_qty']);\r\n $qty_ratio = ($value_cost / $qty_conversion);\r\n $cost = round($qty_ratio, 2);\r\n $invoiced_qty = ($val['invoiced_qty'] * $qty_conversion);\r\n $unit_cost = ($val['list_price_after_tax'] / $invoiced_qty);\r\n } else {\r\n $qty_conversion = ($item_mapping->uom_conversion <> 0) ? $item_mapping->uom_conversion : 1;\r\n $value_cost = 0;\r\n $qty_ratio = 0;\r\n $cost = 0;\r\n $invoiced_qty = ($val['invoiced_qty'] * $qty_conversion);\r\n $unit_cost = 0;\r\n $item_mapping->retail_price = 0;\r\n }\r\n \r\n\r\n //create POD PDF items\r\n $details[] = [\r\n \"item_code\" => $item_mapping->account_group_material_code,\r\n \"description\" => $val['material_description'],\r\n \"unit_cost\" => $unit_cost,\r\n \"retail_price\" => ($item_mapping) ? $item_mapping->retail_price : '',\r\n \"quantity_received\" => $invoiced_qty,\r\n ];\r\n\r\n if(!in_array((string)$sold_to_code, config('app.efgr'))) {//EFGR\r\n\r\n Log::info(\"DLV Items : \".json_encode($item_mapping));\r\n\r\n foreach(config('app.db_dlv_dtl_fields') as $index => $field) {\r\n if ($field == 'D') {\r\n $value = 'D';\r\n }\r\n elseif($field == 'Supplier') {\r\n $value = 'SD1';\r\n }\r\n elseif($field == 'Category') {\r\n $value = ($item_mapping) ? $item_mapping->account_group_material_category : '';\r\n }\r\n elseif($field == 'Item Code') {\r\n $value = ($val) ? $item_mapping->account_group_material_code : '';\r\n }\r\n elseif($field == 'Invoice Number') {\r\n $value = ($billing_header) ? $billing_header->invoice_number : '';\r\n }\r\n elseif($field == 'Delivery Date') {\r\n //$value = ($billing_header) ? date('Y-m-d',strtotime($billing_header->delivery_date)) : '0000-00-00';\r\n $value = ($billing_header) ? date('Y-m-d', strtotime('-1 day', strtotime($billing_header->invoice_date))) : '0000-00-00';\r\n }\r\n elseif($field == 'QTY') {\r\n $value = ($val) ? $invoiced_qty : '';\r\n }\r\n elseif($field == 'Disc_Cost') {\r\n $value = ($val) ? round($cost,2) : '0.00';\r\n }\r\n elseif($field == 'Cost') {\r\n $value = ($val) ? round($cost,2) : '0.00';\r\n }\r\n elseif($field == 'Retail') {\r\n $value = ($item_mapping) ? $item_mapping->retail_price : '0.00';\r\n } else {\r\n $value = '';\r\n }\r\n $ddata[] = $value;\r\n }\r\n $csv_data[] = $ddata;\r\n $ddata = [];\r\n\r\n /* trr creation */\r\n foreach(config('app.db_trr_fields') as $index => $field_trr) {\r\n if ($field_trr == 'storeno') {\r\n $value_trr = '166';\r\n }\r\n elseif($field_trr == 'trndate') {\r\n $value_trr = date('m/d/Y', strtotime($billing_header->invoice_date));\r\n }\r\n elseif($field_trr == 'supp_code') {\r\n $value_trr = 'SD1'; // should be string as SD1\r\n }\r\n elseif($field_trr == 'invoice') {\r\n $value_trr = ($billing_header) ? $billing_header->invoice_number : '';\r\n }\r\n elseif($field_trr == 'itemcode') {\r\n $value_trr = ($item_mapping) ? $item_mapping->account_group_material_code : '';\r\n }\r\n elseif($field_trr == 'catcode') {\r\n $value_trr = '22';\r\n }\r\n elseif($field_trr == 'qty') {\r\n // $value_trr = ($billing_detail->invoiced_qty * $item_mapping->uom_conversion);\r\n $value_trr = ($val) ? $invoiced_qty : '';\r\n }\r\n elseif($field_trr == 'retail') {\r\n $value_trr = round($item_mapping->retail_price, 2);\r\n }\r\n elseif($field_trr == 'cost') {\r\n // $value_trr = round(($billing_detail->list_price_after_tax / $item_mapping->uom_conversion), 2);\r\n $value_trr = round($cost,2); // computation of how the cost of DLV was generated.\r\n }\r\n elseif($field_trr == 'vat') {\r\n $value_trr = '0.00';\r\n }\r\n elseif($field_trr == 'totcost') {\r\n // Column 11 (total cost) = cost (col9) * piece[qty] (col7)\r\n $value_trr = round($cost * $invoiced_qty, 2); \r\n }\r\n elseif($field_trr == 'totretail') {\r\n // Column 12 (total retail) = retail (col8) * piece[qty] (col7)\r\n $value_trr = round($item_mapping->retail_price * $invoiced_qty, 2);\r\n }\r\n elseif($field_trr == 'lineno') {\r\n $value_trr = $iteratedLineno;\r\n }\r\n elseif($field_trr = 'disc') {\r\n $value_trr = '0.00';\r\n }\r\n elseif($field_trr == 'ponum') {\r\n $value_trr = ($billing_header == '') ? $billing_header->po_number : 0;\r\n }\r\n elseif($field_trr == 'docno') {\r\n $value_trr = '0';\r\n }\r\n $trr_hdata[] = $value_trr;\r\n }\r\n $trr_csv_data[] = $trr_hdata;\r\n\r\n $trr_hdata = []; // reset record after loop getting all the details\r\n $iteratedLineno++;\r\n } else {\r\n Log::info(\"EFGR : \".json_encode($item_mapping));\r\n }\r\n } // end of foreach($billing_information_dtl as $dtl => $val)\r\n\r\n $document_number = rand();\r\n $document_id = strtoupper(str_random(9));\r\n $pdf_filename = 'POD_'.$shipment_delivery->account_group_store_id.\r\n '_'.date(\"Ymdhis\", strtotime(Carbon::now()->toDateTimeString())).\r\n '.pdf';\r\n sort($details);//TO MAKE SURE BATCHED ITEMS GO AFTER ANOTHER\r\n\r\n $hold = 0;\r\n $holdQty = 0;\r\n $holdRtl = 0;\r\n $holdCost = 0;\r\n $newArray = array();\r\n foreach($details as $key => $value){\r\n if($hold == $value['item_code']){\r\n $holdQty += $value['quantity_received'];\r\n $holdRtl += $value['retail_price'];\r\n $holdCost += $value['unit_cost'];\r\n $newArray[sizeOf($newArray)-1]['quantity_received'] = $holdQty;\r\n $newArray[sizeOf($newArray)-1]['retail_price'] = $holdRtl;\r\n $newArray[sizeOf($newArray)-1]['unit_cost'] = $holdCost;\r\n continue;\r\n }\r\n $newArray[] = $details[$key];\r\n $hold = $value['item_code'];\r\n $holdQty = $value['quantity_received'];\r\n $holdRtl = $value['retail_price'];\r\n $holdCost = $value['unit_cost'];\r\n }\r\n \r\n Log::info(\"--- DETAILS: \".json_encode($newArray));\r\n $pdf_data = [\r\n 'shipment_delivery_uuid' => $shipment_delivery->shipment_delivery_uuid,\r\n 'store_name' => $shipment_delivery->store_name,\r\n 'ship_to_code' => $shipment_delivery->account_group_store_id,\r\n 'delivery_date' => date('m/d/Y', strtotime($shipment_delivery->delivery_date)),\r\n 'print_date' => date('m/d/Y H:i A', strtotime(Carbon::now()->toDateTimeString())),\r\n 'document_id' => $document_id,\r\n 'document_number' => $pod_invoice_number, \r\n 'truck_personnel_name' => $truck_personnel->truck_personnel_name,\r\n 'helper_name' => $truck_team_helper,\r\n 'store_email_address' => ($shipment_delivery->store_email_address) ? $shipment_delivery->store_email_address : $store->store_email_address,\r\n 'store_personnel_name' => $shipment_delivery->store_personnel_name,\r\n 'store_personnel_signature_filename' => $shipment_delivery->store_personnel_signature_filename,\r\n 'store_personnel_image_filename' => $shipment_delivery->store_personnel_image_filename,\r\n 'delivery_items' => $newArray,\r\n 'filename' => $pdf_filename,\r\n ];\r\n\r\n $update_pod = Pod::whereShipmentDeliveryId($shipment_delivery->shipment_delivery_id)->first();\r\n if ($update_pod) {\r\n $update_pod->pod_pdf_filename = $pdf_filename;\r\n $update_pod->document_number = $document_number;\r\n $update_pod->document_id = $document_id;\r\n $update_pod->updated_at = Carbon::now()->toDateTimeString();\r\n //$update_pod->save();\r\n\r\n if ($update_pod->save()) {\r\n PdfHelper::generate_pdf($pdf_data);\r\n }\r\n }\r\n foreach(config('app.db_dlv_tail_fields') as $index => $field) {\r\n\r\n if ($field == 'T') {\r\n $value = 'T';\r\n }\r\n elseif($field == 'Supplier') {\r\n $value = 'SD1';\r\n }\r\n elseif($field == 'Delivery Date') {\r\n //$value = ($billing_header) ? date('Y-m-d',strtotime($billing_header->delivery_date)) : '0000-00-00';\r\n // Force to use invoice date instead\r\n $value = ($billing_header) ? date('Y-m-d', strtotime('-1 day', strtotime($billing_header->invoice_date))) : '0000-00-00';\r\n }\r\n elseif($field == 'Store') {\r\n $value = $store->account_group_store_id;\r\n }\r\n elseif($field == 'PO Number') {\r\n //$value = ($billing_header) ? $billing_header->customer_po_reference_number : '0';\r\n\r\n if (!empty($billing_header->customer_po_reference_number)) {\r\n $value = $billing_header->customer_po_reference_number;\r\n } else {\r\n $value = (string) \"0\";\r\n }\r\n }\r\n elseif($field == 'Total Items') {\r\n $value = $count_total_rows;\r\n }\r\n elseif($field == 'Constant Value') {\r\n $value = '1';\r\n } else {\r\n $value = '';\r\n }\r\n $tdata[] = $value;\r\n }\r\n $csv_data[] = $tdata;\r\n\r\n }\r\n Log::info(\"CSV Data : \".json_encode($csv_data));\r\n // $csv_data[] = $hdata;\r\n // $csv_data[] = $ddata;\r\n // $csv_data[] = $tdata;\r\n // //Create DLV file\r\n\r\n if(!in_array((string)$sold_to_code, config('app.efgr'))) {//EFGR\r\n try {\r\n $file_type = 'DLV';\r\n //DLV Creation\r\n $filename_dlv = 'DLV.SC'.$store->account_group_store_id.date(\"md\", strtotime($billing_header->invoice_date)).\r\n '8'.$seq_per_day;\r\n Log::info(\"DLV Filename : \".$filename_dlv);\r\n $file_path_dlv = Excel::create($filename_dlv, function($excel) use($csv_data) {\r\n $excel->sheet('DLV', function($sheet) use($csv_data) {\r\n $sheet->fromArray($csv_data, null, 'A1', false, false);\r\n });\r\n })->store('csv', public_path().\r\n '/uploads/csv/dlv', true);\r\n\r\n FileHelper::sftpUploadFile($file_path_dlv['full'], $file_type, $filename_dlv);\r\n\r\n //DRA Creation\r\n /*$filename_dra = 'SC'.$store->account_group_store_id.date(\"md\", strtotime($billing_header->invoice_date)).'8'.$seq_per_day.'.DRA';\r\n Log::info(\"DRA Filename : \".$filename_dra);\r\n $file_path_dra = Excel::create($filename_dra, function($excel) use ($csv_data) {\r\n $excel->sheet('DRA', function($sheet) use ($csv_data)\r\n {\r\n $sheet->fromArray($csv_data, null, 'A1', false, false);\r\n });\r\n })->store('csv', public_path().'/uploads/csv/dlv',true);\r\n\r\n FileHelper::sftpUploadFile($file_path_dra['full'], $file_type, $filename_dra);*/\r\n // if($update_pod)\r\n // PdfHelper::generate_pdf($pdf_data);\r\n\r\n \r\n $filename_dra = 'TRR.SC'.$store->account_group_store_id.date(\"mdy\", strtotime($billing_header->invoice_date));\r\n Log::info(\"TRR Filename : \".$filename_dra);\r\n $file_path_dra = Excel::create($filename_dra, function($excel) use($trr_csv_data) {\r\n $excel->sheet('TRR', function($sheet) use($trr_csv_data) {\r\n $sheet->fromArray($trr_csv_data, null, 'A1', false, false);\r\n });\r\n })->store('csv', public_path().\r\n '/uploads/csv/trr', true);\r\n\r\n FileHelper::sftpUploadFile($file_path_dra['full'], 'TRR', $filename_dra);\r\n\r\n } catch (Exception $e) {\r\n // Nothing to do\r\n Log::info(\"DLV Not saved on DB\");\r\n }\r\n }\r\n\r\n $response = [\r\n 'code' => '201',\r\n 'status' => \"SC001\",\r\n 'message' => \"Successfully sync Billing information\"\r\n ];\r\n return $response;\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3fda08cefa3e43f4d63bb32d00ad25fc", "score": "0.46454114", "text": "public function __construct($data, $receipt_handle = '')\n {\n if (is_string($data)) {\n $this->data = json_decode($data, true);\n } else {\n $this->data = $data;\n }\n\n // Assign the data values and receipt handle to the object\n $this->receipt_handle = $receipt_handle;\n }", "title": "" }, { "docid": "fc84b7b2a8710d450e9dfbd5b03c669f", "score": "0.46413267", "text": "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "title": "" }, { "docid": "40ccaf3a96dbc4887a80e53e76965bb4", "score": "0.4637014", "text": "public function webHookReceiver($eventArr) {\n\t\t$cm = __CLASS__ . __METHOD__;\n\t\t\n\t\t//\n\t\t// Handle transfers for subscriptions to add to log transaction and update memreas_master\n\t\t// - invoice.payment.succeeded (subscription payment)\n\t\t// - invoice.payment.failed (subscription payment failed - send email)\n\t\t//\n\t\t\n\t\tif ($eventArr ['type'] == 'invoice.payment_succeeded') {\n\t\t\t//\n\t\t\t// Log transaction - note float balance is not incremented for subscriptions\n\t\t\t//\n\t\t\t$account_memreas_float = $this->memreasStripeTables->getAccountTable ()->getAccountByUserName ( MemreasConstants::ACCOUNT_MEMREAS_FLOAT );\n\t\t\t$stripe_subscription_amount = $eventArr ['data'] ['object'] ['lines'] ['data'] [0] ['amount'];\n\t\t\tif ($stripe_subscription_amount > 0) {\n\t\t\t\t$subscription_amount = $stripe_subscription_amount / 100; // convert stripe to $'s\n\t\t\t} else {\n\t\t\t\t$subscription_amount = 0;\n\t\t\t}\n\t\t\t$transactionDetail = array (\n\t\t\t\t\t'account_id' => $account_memreas_float->account_id,\n\t\t\t\t\t'transaction_type' => 'subscription_payment_float',\n\t\t\t\t\t'amount' => $subscription_amount,\n\t\t\t\t\t'currency' => 'USD',\n\t\t\t\t\t'transaction_request' => $eventArr ['type'],\n\t\t\t\t\t'transaction_response' => $eventArr,\n\t\t\t\t\t'transaction_sent' => MNow::now (),\n\t\t\t\t\t'transaction_receive' => MNow::now () \n\t\t\t);\n\t\t\t$memreas_transaction = new Memreas_Transaction ();\n\t\t\t$memreas_transaction->exchangeArray ( $transactionDetail );\n\t\t\t$transaction_id = $this->memreasStripeTables->getTransactionTable ()->saveTransaction ( $memreas_transaction );\n\t\t\t\n\t\t\t//\n\t\t\t// Transfer funds to memreas_master\n\t\t\t// Stripe transfer parameters\n\t\t\t//\n\t\t\tif ($subscription_amount > 0) {\n\t\t\t\t$account_memreas_master = $this->memreasStripeTables->getAccountTable ()->getAccountByUserName ( MemreasConstants::ACCOUNT_MEMREAS_MASTER );\n\t\t\t\t$transferParams = array (\n\t\t\t\t\t\t'amount' => $stripe_subscription_amount, // stripe stores in cents\n\t\t\t\t\t\t'currency' => 'USD',\n\t\t\t\t\t\t'destination' => $account_memreas_master->stripe_account_id,\n\t\t\t\t\t\t'description' => \"transfer subscription payment to memreas master\" \n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// Create transaction to log transfer\n\t\t\t\t//\n\t\t\t\t$transaction = new Memreas_Transaction ();\n\t\t\t\t$transaction->exchangeArray ( array (\n\t\t\t\t\t\t'account_id' => $account_memreas_master->account_id,\n\t\t\t\t\t\t'transaction_type' => 'subscription_payment_float_to_master',\n\t\t\t\t\t\t'transaction_status' => 'subscription_payment_float_to_master_fail',\n\t\t\t\t\t\t'pass_fail' => 0,\n\t\t\t\t\t\t'amount' => $subscription_amount,\n\t\t\t\t\t\t'currency' => \"USD\",\n\t\t\t\t\t\t'transaction_request' => json_encode ( $transferParams ),\n\t\t\t\t\t\t'transaction_sent' => MNow::now () \n\t\t\t\t) );\n\t\t\t\t$transaction_id = $this->memreasStripeTables->getTransactionTable ()->saveTransaction ( $transaction );\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// Make call to stripe for seller payee transfer\n\t\t\t\t//\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t$transferResponse = $this->stripeClient->createTransfer ( $transferParams );\n\t\t\t\t} catch ( ZfrStripe\\Exception\\BadRequestException $e ) {\n\t\t\t\t\treturn array (\n\t\t\t\t\t\t\t'status' => 'Failure',\n\t\t\t\t\t\t\t'message' => $e->getMessage () \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$memreas_master_transfer_id = $transferResponse ['id'];\n\t\t\t\tMlog::addone ( $cm . __LINE__ . '::$payee_transfer_id--->', $memreas_master_transfer_id );\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// Update transaction for response\n\t\t\t\t//\n\t\t\t\t\n\t\t\t\t$transaction->exchangeArray ( array (\n\t\t\t\t\t\t'transaction_status' => 'subscription_payment_float_to_master_success',\n\t\t\t\t\t\t'pass_fail' => 1,\n\t\t\t\t\t\t'transaction_response' => json_encode ( $transferResponse ),\n\t\t\t\t\t\t'transaction_receive' => MNow::now () \n\t\t\t\t) );\n\t\t\t\t$memreas_master_transaction_id = $transaction_id = $this->memreasStripeTables->getTransactionTable ()->saveTransaction ( $transaction );\n\t\t\t\t\n\t\t\t\tif ($memreas_master_transaction_id) {\n\t\t\t\t\t//\n\t\t\t\t\t// Send email to admin to check account\n\t\t\t\t\t//\n\t\t\t\t\t$subject = \"Stripe::Subscription payment success!\";\n\t\t\t\t\t$data ['memreas_master_transaction_id'] = $memreas_master_transaction_id;\n\t\t\t\t\t$data ['transaction_type'] = 'subscription_payment_float_to_master';\n\t\t\t\t\t$data ['amount'] = $subscription_amount;\n\t\t\t\t\t$data ['event_data'] = $eventArr;\n\t\t\t\t\t$this->aws->sendSeSMail ( array (\n\t\t\t\t\t\t\tMemreasConstants::ADMIN_EMAIL \n\t\t\t\t\t), $subject, json_encode ( $eventArr, JSON_PRETTY_PRINT ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ($eventArr ['type'] == 'invoice.payment_failed') {\n\t\t\t//\n\t\t\t// Log transaction\n\t\t\t//\n\t\t\t$account_memreas_float = $this->memreasStripeTables->getAccountTable ()->getAccountByUserName ( MemreasConstants::ACCOUNT_MEMREAS_FLOAT );\n\t\t\t$stripe_customer_id = $eventArr ['data'] ['object'] ['customer'];\n\t\t\t$transactionDetail = array (\n\t\t\t\t\t'account_id' => $account_memreas_float->account_id,\n\t\t\t\t\t'transaction_type' => 'subscription_payment_failed_float',\n\t\t\t\t\t'amount' => 0,\n\t\t\t\t\t'currency' => 'USD',\n\t\t\t\t\t'transaction_request' => $eventArr ['type'],\n\t\t\t\t\t'transaction_response' => $eventArr,\n\t\t\t\t\t'transaction_sent' => MNow::now (),\n\t\t\t\t\t'transaction_receive' => MNow::now () \n\t\t\t);\n\t\t\t$memreas_transaction = new Memreas_Transaction ();\n\t\t\t$memreas_transaction->exchangeArray ( $transactionDetail );\n\t\t\t$transaction_id = $this->memreasStripeTables->getTransactionTable ()->saveTransaction ( $memreas_transaction );\n\t\t\t\n\t\t\t//\n\t\t\t// lookup customer by stripe customer id\n\t\t\t//\n\t\t\t$account_for_stripe_customer_id = $this->memreasStripeTables->getAccountTable ()->getAccountByStripeCustomerId ( $stripe_customer_id );\n\t\t\tif ($account_for_stripe_customer_id) {\n\t\t\t\t//\n\t\t\t\t// Send email to admin to check account\n\t\t\t\t//\n\t\t\t\t\n\t\t\t\t$subject = \"Stripe Error::Subscription payment failed!\";\n\t\t\t\t$data ['username'] = $account->username;\n\t\t\t\t$data ['user_id'] = $account->user_id;\n\t\t\t\t$data ['stripe_email_address'] = $account->stripe_email_address;\n\t\t\t\t$data ['stripe_customer_id'] = $account->stripe_customer_id;\n\t\t\t\t$data ['event_data'] = $eventArr;\n\t\t\t\t$this->aws->sendSeSMail ( array (\n\t\t\t\t\t\tMemreasConstants::ADMIN_EMAIL \n\t\t\t\t), $subject, json_encode ( $eventArr, JSON_PRETTY_PRINT ) );\n\t\t\t}\n\t\t}\n\t\tdie ();\n\t}", "title": "" }, { "docid": "bb1eab6b525df21a3110d06af0d7f692", "score": "0.4636582", "text": "public function fromFormat($data)\n {\n $input = file_get_contents('php://input');\n $output = $this->parseRawHttpRequest($input);\n return $output;\n }", "title": "" }, { "docid": "c568e5fc5074c17068f72428ed0a2f3c", "score": "0.46334052", "text": "function parse_body(){\r\n\t\tlist($header, $body) = explode(\"\\n\\n\", $this->email, 2);\r\n\t\t$parsed_body = $this->strip_body($body);\r\n\t\treturn $parsed_body;\r\n\t}", "title": "" }, { "docid": "61d072e8af9acc2dcd5e597342f86852", "score": "0.46280974", "text": "function processPost($formvalues) {\n\t\t// trim spaces from the name field\n\t\tif(isArrayKeyAnEmptyString('status', $formvalues)){\n\t\t\tunset($formvalues['status']); \n\t\t}\n\t\tif(isArrayKeyAnEmptyString('method', $formvalues)){\n\t\t\tunset($formvalues['method']); \n\t\t}\n\t\tif(isArrayKeyAnEmptyString('fieldsize', $formvalues)){\n\t\t\tunset($formvalues['fieldsize']); \n\t\t}\n\t\tif(isArrayKeyAnEmptyString('fieldsizeunit', $formvalues)){\n\t\t\tunset($formvalues['fieldsizeunit']); \n\t\t}\n\t\tif(isArrayKeyAnEmptyString('netcapital', $formvalues)){\n\t\t\tunset($formvalues['netcapital']); \n\t\t}\n\t\t\n\t\t// loan details\n\t\tif(!isArrayKeyAnEmptyString('financetype', $formvalues)){\n\t\t\tif($formvalues['financetype'] == 3 || $formvalues['financetype'] == 4 || $formvalues['financetype'] == 5){\n\t\t\t\t$formvalues['loans'][0]['financetype'] = $formvalues['financetype'];\n\t\t\t\t$formvalues['loans'][0]['userid'] = $formvalues['userid'];\n\t\t\t\tisArrayKeyAnEmptyString('principal', $formvalues) ? $formvalues['loans'][0]['principal'] = NULL : $formvalues['loans'][0]['principal'] = $formvalues['principal'];\n\t\t\t\tisArrayKeyAnEmptyString('interestrate', $formvalues) ? $formvalues['loans'][0]['interestrate'] = NULL : $formvalues['loans'][0]['interestrate'] = $formvalues['interestrate'];\n\t\t\t\tisArrayKeyAnEmptyString('paybackamount', $formvalues) ? $formvalues['loans'][0]['paybackamount'] = NULL : $formvalues['loans'][0]['paybackamount'] = $formvalues['paybackamount'];\n\t\t\t\tisArrayKeyAnEmptyString('installment', $formvalues) ? $formvalues['loans'][0]['installment'] = NULL : $formvalues['loans'][0]['installment'] = $formvalues['installment'];\n\t\t\t\tisArrayKeyAnEmptyString('installmentunit', $formvalues) ? $formvalues['loans'][0]['installmentunit'] = NULL : $formvalues['loans'][0]['installmentunit'] = $formvalues['installmentunit'];\n\t\t\t\tisArrayKeyAnEmptyString('paybackperiod', $formvalues) ? $formvalues['loans'][0]['paybackperiod'] = NULL : $formvalues['loans'][0]['paybackperiod'] = $formvalues['paybackperiod'];\n\t\t\t\tisArrayKeyAnEmptyString('paybackperiodunit', $formvalues) ? $formvalues['loans'][0]['paybackperiodunit'] = NULL : $formvalues['loans'][0]['paybackperiodunit'] = $formvalues['paybackperiodunit'];\n\t\t\t\tisArrayKeyAnEmptyString('creditdate', $formvalues) ? $formvalues['loans'][0]['creditdate'] = NULL : $formvalues['loans'][0]['creditdate'] = changeDateFromPageToMySQLFormat($formvalues['creditdate']);\n\t\t\t\tisArrayKeyAnEmptyString('financesourceid', $formvalues) ? $formvalues['loans'][0]['financesourceid'] = NULL : $formvalues['loans'][0]['financesourceid'] = $formvalues['financesourceid'];\n\t\t\t\tisArrayKeyAnEmptyString('financesourcetext', $formvalues) ? $formvalues['loans'][0]['financesourcetext'] = NULL : $formvalues['loans'][0]['financesourcetext'] = $formvalues['financesourcetext'];\n\t\t\t\tisArrayKeyAnEmptyString('clientid', $formvalues) ? $formvalues['loans'][0]['clientid'] = NULL : $formvalues['loans'][0]['clientid'] = $formvalues['clientid'];\n\t\t\t\tisArrayKeyAnEmptyString('quantity', $formvalues) ? $formvalues['loans'][0]['quantity'] = NULL : $formvalues['loans'][0]['quantity'] = $formvalues['quantity'];\n\t\t\t\tisArrayKeyAnEmptyString('quantityunit', $formvalues) ? $formvalues['loans'][0]['quantityunit'] = NULL : $formvalues['loans'][0]['quantityunit'] = $formvalues['quantityunit'];\n\t\t\t\tisArrayKeyAnEmptyString('price', $formvalues) ? $formvalues['loans'][0]['price'] = NULL : $formvalues['loans'][0]['price'] = $formvalues['price'];\n\t\t\t\tisArrayKeyAnEmptyString('clienttype', $formvalues) ? $formvalues['loans'][0]['clienttype'] = NULL : $formvalues['loans'][0]['clienttype'] = $formvalues['clienttype'];\n\t\t\t\tisArrayKeyAnEmptyString('sourcetype', $formvalues) ? $formvalues['loans'][0]['sourcetype'] = NULL : $formvalues['loans'][0]['sourcetype'] = $formvalues['sourcetype'];\n\t\t\t\tisArrayKeyAnEmptyString('contract', $formvalues) ? $formvalues['loans'][0]['contract'] = NULL : $formvalues['loans'][0]['contract'] = $formvalues['contract'];\n\t\t\t} else {\n\t\t\t\t$formvalues['loans'] = array();\n\t\t\t}\n\t\t}\n\t\t// debugMessage($formvalues); // exit();\n\t\tparent::processPost($formvalues);\n\t}", "title": "" }, { "docid": "a8d48ad3785fd346e162a326a5036b44", "score": "0.46223256", "text": "private function getPostRequest($buffer) {\n $data = json_encode(array(\"schema\" => self::POST_REQ_SCHEMA, \"data\" => $buffer));\n return $data;\n }", "title": "" }, { "docid": "3d9521074b02d640cd20276914310422", "score": "0.46179506", "text": "public function parseEvent()\n {\n if ($_SERVER['REQUEST_METHOD'] !== 'POST') {\n http_response_code(405);\n\n throw new \\Exception(\"Method not allowed\");\n }\n\n $entityBody = file_get_contents('php://input');\n\n if (strlen($entityBody) === 0) {\n\n http_response_code(400);\n\n throw new \\Exception(\"Missing request body\");\n }\n\n if (! Auth::hash_equals(Auth::sign($entityBody, $this->lineChannelSecret), $_SERVER['HTTP_X_LINE_SIGNATURE'])) {\n\n http_response_code(400);\n\n throw new \\Exception(\"Invalid signature value\");\n }\n\n $data = json_decode($entityBody, true);\n\n if (!isset($data['events'])) {\n\n http_response_code(400);\n\n throw new \\Exception(\"Invalid request body: missing events property\");\n\n }\n\n $event = $data['events'][0];\n\n return $event;\n }", "title": "" }, { "docid": "4bc677aa64dbb73c6c9c4e4492bfc3c9", "score": "0.4611433", "text": "public function getIncomingWebhook($validate = TRUE, $data = '', $hmac_header = '') {\n $webhook = new IncomingWebhook($this->shared_secret);\n if ($validate) {\n try {\n $webhook->validate($data, $hmac_header);\n } catch (WebhookException $e) {\n throw new ClientException('Invalid webhook: ' . $e->getMessage(), 0, $e, $this);\n }\n }\n return $webhook->getData();\n }", "title": "" }, { "docid": "daf6a5b209f68ca80410c2958b4dbe20", "score": "0.4606681", "text": "private function validatePost($_POST){\n $this->notification_type = (isset($_POST['notificationType']) && trim($_POST['notificationType']) != \"\") ? trim($_POST['notificationType']) : NULL;\n $this->notification_code = (isset($_POST['notificationCode']) && trim($_POST['notificationCode']) != \"\") ? trim($_POST['notificationCode']) : NULL;\n }", "title": "" }, { "docid": "94a16c06065b63b4bbe82436e0b44e58", "score": "0.46054348", "text": "public function processRequest() {\r\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\r\n }", "title": "" }, { "docid": "759834f90d3f37b11db986be4723fe81", "score": "0.45983237", "text": "protected function _getPostData()\n {\n $data = parent::_getPostData();\n\n if ($this->_apiToken == '') {\n throw new Pay_Exception('apiToken not set', 1);\n } else {\n $data['token'] = $this->_apiToken;\n }\n if (empty($this->_serviceId)) {\n throw new Pay_Exception('apiToken not set', 1);\n } else {\n $data['serviceId'] = $this->_serviceId;\n }\n if (empty($this->_amount)) {\n throw new Pay_Exception('Amount is niet geset', 1);\n } else {\n $data['amount'] = $this->_amount;\n }\n if (!empty($this->_currency)) {\n $data['transaction']['currency'] = $this->_currency;\n }\n if (!empty($this->_paymentOptionId)) {\n $data['paymentOptionId'] = $this->_paymentOptionId;\n }\n if (empty($this->_finishUrl)) {\n throw new Pay_Exception('FinishUrl is niet geset', 1);\n } else {\n $data['finishUrl'] = $this->_finishUrl;\n }\n if (!empty($this->_exchangeUrl)) {\n $data['transaction']['orderExchangeUrl'] = $this->_exchangeUrl;\n }\n\n if (!empty($this->_description)) {\n $data['transaction']['description'] = $this->_description;\n }\n\n if (!empty($this->_paymentOptionSubId)) {\n $data['paymentOptionSubId'] = $this->_paymentOptionSubId;\n }\n\n\n $data['ipAddress'] = empty($this->_ipAddress) ? $_SERVER['REMOTE_ADDR'] : $this->_ipAddress;\n\n // I set the browser data with dummydata, because most servers dont have the get_browser function available\n $data['browserData'] = array('browser_name_regex' => '^mozilla/5\\.0 (windows; .; windows nt 5\\.1; .*rv:.*) gecko/.* firefox/0\\.9.*$', 'browser_name_pattern' => 'Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:*) Gecko/* Firefox/0.9*', 'parent' => 'Firefox 0.9', 'platform' => 'WinXP', 'browser' => 'Firefox', 'version' => 0.9, 'majorver' => 0, 'minorver' => 9, 'cssversion' => 2, 'frames' => 1, 'iframes' => 1, 'tables' => 1, 'cookies' => 1,);\n if (!empty($this->_products)) {\n $data['saleData']['invoiceDate'] = date('d-m-Y');\n $data['saleData']['deliveryDate'] = date('d-m-Y', strtotime('+1 day'));\n $data['saleData']['orderData'] = $this->_products;\n }\n\n if (!empty($this->_enduser)) {\n $data['enduser'] = $this->_enduser;\n }\n\n if (!empty($this->_extra1)) {\n $data['statsData']['extra1'] = $this->_extra1;\n }\n if (!empty($this->_extra2)) {\n $data['statsData']['extra2'] = $this->_extra2;\n }\n if (!empty($this->_extra3)) {\n $data['statsData']['extra3'] = $this->_extra3;\n }\n if (!empty($this->_promotorId)) {\n $data['statsData']['promotorId'] = $this->_promotorId;\n }\n if (!empty($this->_info)) {\n $data['statsData']['info'] = $this->_info;\n }\n if (!empty($this->_tool)) {\n $data['statsData']['tool'] = $this->_tool;\n }\n if (!empty($this->_object)) {\n $data['statsData']['object'] = $this->_object;\n }\n if (!empty($this->_domainId)) {\n $data['statsData']['domain_id'] = $this->_domainId;\n }\n if (!empty($this->_transferData)) {\n $data['statsData']['transferData'] = $this->_transferData;\n }\n\n return $data;\n }", "title": "" }, { "docid": "2b1dfbf7a46a85396369edb981957b97", "score": "0.45954722", "text": "function processBillDetailsValidationPageBills($input) {\n\n //Check if the input empty\n\n if (empty($input) && $input !== \"0\") {\n\n //Warning text\n //Actual Text: You have enter empty input. Please enter again:\n\n $warning = $this->loadText(\"EmptyInput\");\n\n\n\n $this->DetailsValidationPageBills($warning);\n\n return;\n }\n\n\n\n //Check if the input is the back character\n else if ($input === $this->getSessionVar(self::BACK_OPTION_CHARACTER)) {\n\n //Navigate back\n\n $this->navigateBack();\n\n return;\n }\n\n\n\n //Check if the input is home character\n else if ($input === $this->getSessionVar(self::HOME_OPTION_CHARACTER)) {\n\n //Go Home\n\n $this->GoHome();\n\n return;\n }\n\n\n\n //Check if the input is not a number\n else if (!$this->isValidNumber($input)) {\n\n //Warning text\n //Actual Text: Invalid input. Please enter a valid number::\n\n $warning = $this->loadText(\"NonNumericInput\");\n\n\n\n $this->DetailsValidationPageBills($warning);\n\n return;\n }\n\n\n\n //Check if the input entered is in the range gotten\n else if (!in_array($input, array(1, 2))) {\n\n //Warning text\n //Actual Text: Invalid input. Please select a valid option:\n\n $warning = $this->loadText(\"InvalidInput\");\n\n\n\n $this->DetailsValidationPageBills($warning);\n\n return;\n }\n\n\n\n //Switch the statement\n\n switch ($input) {\n\n //Check if the value\n //Yes\n\n case 1:\n\n //Log\n\n $this->logMessage(\"Processing bills from wallet\");\n\n break;\n\n //No\n\n case 2:\n\n $this->GoHome();\n\n return;\n }\n\n\n\n //Process bill transaction\n\n $this->ProcessBillTransaction();\n }", "title": "" }, { "docid": "8b0d15ca9a261fb1d2d5fdae89e7c46c", "score": "0.45896268", "text": "function payment_received( $info ) {\n\n if ( $info['post_id'] ) {\n $this->handle_post_publish( $info['post_id'] );\n } else if ( $info['pack_id'] ) {\n $this->new_subscription( $info['user_id'], $info['pack_id'] );\n }\n }", "title": "" }, { "docid": "be37691119c6a8dd5b232a7abf8715e2", "score": "0.45895743", "text": "public function process($data)\n {\n\n // Translate network strings to db fields\n $translate = array(\n 'Status = ' => 'status',\n 'OwnerDisplayName = ' => 'ownerdisplayname',\n 'Email = ' => 'email',\n 'personID = ' => 'personid',\n 'hostname = ' => 'hostname');\n\n //clear any previous data we had\n foreach ($translate as $search => $field) {\n $this->$field = '';\n }\n // Parse data\n foreach (explode(\"\\n\", $data) as $line) {\n // Translate standard entries\n foreach ($translate as $search => $field) {\n if (strpos($line, $search) === 0) {\n $value = substr($line, strlen($search));\n \n $this->$field = $value;\n break;\n }\n }\n } //end foreach explode lines\n\n $this->save();\n }", "title": "" }, { "docid": "def4154fbf71c440bf26ce6e2d59a855", "score": "0.4586527", "text": "protected function _parsePostData() {\n $postData = $this->getRequest()->getRawBody();\n if (!$postData) {\n return array();\n }\n try {\n $postData = Zend_Json::decode($postData);\n } catch (Zend_Json_Exception $e) {\n throw new Garp_Content_Api_Rest_Exception(\n sprintf(Garp_Content_Api_Rest::EXCEPTION_INVALID_JSON, $e->getMessage())\n );\n }\n return $postData;\n }", "title": "" }, { "docid": "c42afc2fc111fb2dbef1eb10162fbb79", "score": "0.45863172", "text": "public function webhook() {\r\n\r\n if (!empty($_POST['payment_status']) && sanitize_text_field($_POST['payment_status']) == 'Successful') {\r\n $order = wc_get_order( sanitize_text_field($_POST['custom_4']) );\r\n\r\n // The text for the note\r\n $make_notes = 'Payment Status: '.sanitize_text_field($_POST['payment_status']).', Total Amount: '.sanitize_text_field($_POST['amount']).', Paysenz Txn ID: '.sanitize_text_field($_POST['psz_txnid']).', Merchant Txn ID: '.sanitize_text_field($_POST['merchant_txnid']).', Type: '.sanitize_text_field($_POST['payment_type']).', Currency: '.sanitize_text_field($_POST['merchant_currency']).'';\r\n\r\n // Add the note\r\n $order->add_order_note( $make_notes );\r\n \r\n // save\r\n $order->save();\r\n\r\n $order->payment_complete();\r\n\r\n if($this->get_option('SUCCESS_URL')){\r\n $redirect_url = $this->get_option('SUCCESS_URL');\r\n }else{\r\n $redirect_url = site_url();\r\n }\r\n wp_redirect($redirect_url);\r\n\r\n }else if (!empty($_GET['payment_status']) && sanitize_text_field($_GET['payment_status']) == 'Successful') {\r\n\r\n $order = wc_get_order( sanitize_text_field($_GET['custom_4']) );\r\n\r\n // The text for the note\r\n $make_notes = 'Payment Status: '.sanitize_text_field($_POST['payment_status']).', Total Amount: '.sanitize_text_field($_POST['amount']).', Paysenz Txn ID: '.sanitize_text_field($_POST['psz_txnid']).', Merchant Txn ID: '.sanitize_text_field($_POST['merchant_txnid']).', Type: '.sanitize_text_field($_POST['payment_type']).', Currency: '.sanitize_text_field($_POST['merchant_currency']).'';\r\n\r\n // Add the note\r\n $order->add_order_note( $make_notes );\r\n \r\n // save\r\n $order->save();\r\n\r\n $order->payment_complete();\r\n //$order->wc_reduce_stock_levels();\r\n\r\n if($this->get_option('SUCCESS_URL')){\r\n $redirect_url = $this->get_option('SUCCESS_URL');\r\n }else{\r\n $redirect_url = site_url();\r\n }\r\n wp_redirect($redirect_url);\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "7234fe78aec16ec51ef06c6ecced61d7", "score": "0.45836198", "text": "private function DeserializeFields()\n\t{\n\t\tif (!is_array($this->Recipients))\n\t\t\t$this->Recipients = json_decode($this->Recipients);\n\t\tif (!is_array($this->FailedRecipients))\n\t\t\t$this->FailedRecipients = json_decode($this->FailedRecipients);\n\t}", "title": "" }, { "docid": "65206ca265ec4f2159604f6da6f1ed60", "score": "0.45787323", "text": "function breakData(&$parser, $data) {\n\t\t$data = preg_split('/(&.+?;)/',$data,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\tforeach ( $data as $chunk ) {\n\t\t\t$this->orig_obj->{$this->orig_method}($this, $chunk);\n\t\t}\n\t}", "title": "" } ]
1ef68043b64fb807071b8a26d23c8017
Build and minify CSS
[ { "docid": "6de01bdaa493a86dff610610f0a00c85", "score": "0.0", "text": "private function _deploy_css($force = TRUE, $file_name = NULL, $group = NULL)\n\t{\n\t\tif ($this->enabled === FALSE)\n\t\t{\n\t\t\treturn $this->_simple_output('css', $group);\n\t\t}\n\n\t\tif ($this->auto_names or $file_name === 'auto')\n\t\t{\n\t\t\t$file_name = md5(serialize($this->css_array[$group])) . '.css';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$file_name = ($group === 'default') ? $file_name : $group . '_' . $file_name;\n\t\t}\n\n\t\t$this->_set('css_file', $file_name);\n\n\t\t$this->_scan_files('css', $force, $group);\n\n\t\tif ($this->versioning)\n\t\t{\n\t\t\t$this->_css_file = $this->_css_file . '?v=' . $this->_version_number($this->_css_file);\n\t\t}\n\n\t\treturn [$this->_css_file];\n\t}", "title": "" } ]
[ { "docid": "4c1a657ef996ebab76fd74b5babd9ab1", "score": "0.7367801", "text": "public function minify($css, array $options = array());", "title": "" }, { "docid": "1ddeb86243cfd3714eff22714f0ed6d0", "score": "0.7067176", "text": "public function build_css() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "5f467970beee7fc8b1991207d75f4807", "score": "0.6812186", "text": "public static function minifyCSSFiles()\n {\n if (file_exists(Init::ROOT_DIR.'/Systems/Skin/Skins/defaultSkin') === FALSE) {\n return;\n }\n\n $cssFiles = array();\n $skins = FileSystem::listDirectories(\n Init::ROOT_DIR.'/Systems/Skin/Skins/defaultSkin'\n );\n\n $mozFiles = array();\n $ie7Files = array();\n $ie8Files = array();\n $webkitFiles = array();\n $mozCSS = '';\n $ie7CSS = '';\n $ie8CSS = '';\n $webkitCSS = '';\n\n $skins[''] = Init::ROOT_DIR.'/Systems/ImageGallery/web';\n foreach ($skins as $widgetName => $widgetPath) {\n $files = FileSystem::listDirectory($widgetPath, array('.css'));\n\n foreach ($files as $file) {\n if (strpos($file, '_moz.css') !== FALSE\n || strpos($file, '_ie.css') !== FALSE\n || strpos($file, '_ie7.css') !== FALSE\n || strpos($file, '_ie8.css') !== FALSE\n || strpos($file, '_webkit.css') !== FALSE\n ) {\n continue;\n }\n\n $content = file_get_contents($file);\n $content = self::replaceURLforCSSminification($content);\n\n // ImageGallery has a custom CSS displayed in the backend vipers and\n // frontend together. For the backend display, it needs to be prefixed\n // for each WYSIWYG locations such as custom form edit or content sharing\n // WYSIWYG. This code does the whole thing at once.\n if ($file === 'ImageGallery.css') {\n $editingPrefixed = Util::replaceCSSPrefix($content, 'EditingAsset');\n $screenPrefixed = Util::replaceCSSPrefix($content, 'EditingScreenModes');\n $astSettingsPrefixed = Util::replaceCSSPrefix($content, 'EditEditingModeWidgetType-assetSettings');\n $cntentSharingPrefixed = Util::replaceCSSPrefix($content, 'ViperContentSharingDialog');\n\n $content .= $editingPrefixed;\n $content .= $screenPrefixed;\n $content .= $astSettingsPrefixed;\n $content .= $cntentSharingPrefixed;\n }\n\n $mozFiles[] = $file;\n $ie7Files[] = $file;\n $ie8Files[] = $file;\n $webkitFiles[] = $file;\n\n $mozCSS .= $content;\n $ie7CSS .= $content;\n $ie8CSS .= $content;\n $webkitCSS .= $content;\n\n $mozCSSFilename = str_replace('.css', '_moz.css', $file);\n $ieCSSFilename = str_replace('.css', '_ie.css', $file);\n $ie7CSSFilename = str_replace('.css', '_ie7.css', $file);\n $ie8CSSFilename = str_replace('.css', '_ie8.css', $file);\n $webkitCSSFilename = str_replace('.css', '_webkit.css', $file);\n\n if (file_exists($mozCSSFilename) === TRUE) {\n $bContent = file_get_contents($mozCSSFilename);\n $bContent = self::replaceURLforCSSminification($bContent);\n $mozCSS .= $bContent;\n } else if (file_exists($ieCSSFilename) === TRUE) {\n $bContent = file_get_contents($ieCSSFilename);\n $bContent = self::replaceURLforCSSminification($bContent);\n $ie7CSS .= $bContent;\n $ie8CSS .= $bContent;\n } else if (file_exists($ie7CSSFilename) === TRUE) {\n $bContent = file_get_contents($ie7CSSFilename);\n $bContent = self::replaceURLforCSSminification($bContent);\n $ie7CSS .= $bContent;\n } else if (file_exists($ie8CSSFilename) === TRUE) {\n $bContent = file_get_contents($ie8CSSFilename);\n $bContent = self::replaceURLforCSSminification($bContent);\n $ie8CSS .= $bContent;\n } else if (file_exists($webkitCSSFilename) === TRUE) {\n $bContent = file_get_contents($webkitCSSFilename);\n $bContent = self::replaceURLforCSSminification($bContent);\n $webkitCSS .= $bContent;\n }//end if\n }//end foreach\n }//end foreach\n\n include_once 'Libs/Util/Util.inc';\n file_put_contents(\n Init::WEB_DIR.'/styles_moz.css',\n Util::minifyCSS($mozCSS, 80)\n );\n file_put_contents(\n Init::WEB_DIR.'/styles_ie7.css',\n Util::minifyCSS($ie7CSS, 80)\n );\n file_put_contents(\n Init::WEB_DIR.'/styles_ie8.css',\n Util::minifyCSS($ie8CSS, 80)\n );\n file_put_contents(\n Init::WEB_DIR.'/styles_webkit.css',\n Util::minifyCSS($webkitCSS, 80)\n );\n\n }", "title": "" }, { "docid": "2b688265045b1b56672c59dc39b9d70b", "score": "0.6731209", "text": "public function minify_css( $css ) {\n\t\t$csstidy = TablePress::load_class( 'TablePress_CSSTidy', 'class.csstidy.php', 'libraries/csstidy' );\n\t\t$csstidy->optimise = new TablePress_CSSTidy_custom_sanitize( $csstidy );\n\t\t$csstidy->set_cfg( 'remove_bslash', false );\n\t\t$csstidy->set_cfg( 'compress_colors', true );\n\t\t$csstidy->set_cfg( 'compress_font-weight', true );\n\t\t$csstidy->set_cfg( 'lowercase_s', false );\n\t\t$csstidy->set_cfg( 'optimise_shorthands', 1 );\n\t\t$csstidy->set_cfg( 'remove_last_;', true );\n\t\t$csstidy->set_cfg( 'case_properties', false );\n\t\t$csstidy->set_cfg( 'sort_properties', false );\n\t\t$csstidy->set_cfg( 'sort_selectors', false );\n\t\t$csstidy->set_cfg( 'discard_invalid_selectors', false );\n\t\t$csstidy->set_cfg( 'discard_invalid_properties', true );\n\t\t$csstidy->set_cfg( 'merge_selectors', false );\n\t\t$csstidy->set_cfg( 'css_level', 'CSS3.0' );\n\t\t$csstidy->set_cfg( 'preserve_css', false );\n\t\t$csstidy->set_cfg( 'timestamp', false );\n\t\t$csstidy->set_cfg( 'template', 'highest' );\n\n\t\t$csstidy->parse( $css );\n\t\treturn $csstidy->print->plain();\n\t}", "title": "" }, { "docid": "9ff1526b8a9489843c51d31bf9b8c3f2", "score": "0.6624101", "text": "function generate_min_file()\n { \n // Theme\n $scss_dir = get_template_directory() . '/assets/scss/';\n $css_dir = get_template_directory() . '/assets/css/';\n $css_file = $css_dir . 'theme.min.css';\n // Child Theme\n $child_scss_dir = get_stylesheet_directory() . '/assets/scss/';\n $child_css_dir = get_stylesheet_directory() . '/assets/css/';\n $child_css_file = $child_css_dir . 'child-theme.min.css';\n\n $this->scssc = new \\Leafo\\ScssPhp\\Compiler();\n $this->scssc->setImportPaths( $scss_dir );\n\n $_options = $scss_dir . 'options.scss';\n\n $this->redux->filesystem->execute( 'put_contents', $_options, array(\n 'content' => $this->options_output()\n ) );\n $this->scssc->setFormatter( 'Leafo\\ScssPhp\\Formatter\\Crunched' );\n \n // Theme\n $this->redux->filesystem->execute( 'put_contents', $css_file, array(\n 'content' => $this->scssc->compile( '@'.'import \"theme.scss\"' )\n ) );\n // Child Theme\n if(is_child_theme()){\n $this->redux->filesystem->execute( 'put_contents', $child_css_file, array(\n 'content' => $this->scssc->compile( '@'.'import \"child-theme.scss\"' )\n ) );\n }\n }", "title": "" }, { "docid": "6e63eccef6904cfbf492ec9b412ac659", "score": "0.64429337", "text": "protected function _rebuild($filepath) {\n $minify = Kohana::$config->load('media.minify_css');\n $minifier = new Minify\\CSS();\n $content = '';\n\n foreach ($this->_files as $file) {\n if ($minify) {\n $minifier->add($file);\n }\n else {\n $content .= file_get_contents($file);\n }\n }\n \n if ($minify) {\n file_put_contents($filepath, $minifier->minify());\n }\n else {\n file_put_contents($filepath, $content);\n }\n }", "title": "" }, { "docid": "dee145543a89a20708887ab91408efef", "score": "0.6419339", "text": "function business_minify_css( $css ) {\r\n\r\n\t// Normalize whitespace.\r\n\t$css = preg_replace( '/\\s+/', ' ', $css );\r\n\r\n\t// Remove spaces before and after comment.\r\n\t$css = preg_replace( '/(\\s+)(\\/\\*(.*?)\\*\\/)(\\s+)/', '$2', $css );\r\n\r\n\t// Remove comment blocks, everything between /* and */, unless preserved with /*! ... */ or /** ... */.\r\n\t$css = preg_replace( '~/\\*(?![\\!|\\*])(.*?)\\*/~', '', $css );\r\n\r\n\t// Remove ; before }.\r\n\t$css = preg_replace( '/;(?=\\s*})/', '', $css );\r\n\r\n\t// Remove space after , : ; { } */ >.\r\n\t$css = preg_replace( '/(,|:|;|\\{|}|\\*\\/|>) /', '$1', $css );\r\n\r\n\t// Remove space before , ; { } ( ) >.\r\n\t$css = preg_replace( '/ (,|;|\\{|}|\\(|\\)|>)/', '$1', $css );\r\n\r\n\t// Strips leading 0 on decimal values (converts 0.5px into .5px).\r\n\t$css = preg_replace( '/(:| )0\\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );\r\n\r\n\t// Strips units if value is 0 (converts 0px to 0).\r\n\t$css = preg_replace( '/(:| )(\\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css );\r\n\r\n\t// Converts all zeros value into short-hand.\r\n\t$css = preg_replace( '/0 0 0 0/', '0', $css );\r\n\r\n\t// Shorten 6-character hex color codes to 3-character where possible.\r\n\t$css = preg_replace( '/#([a-f0-9])\\\\1([a-f0-9])\\\\2([a-f0-9])\\\\3/i', '#\\1\\2\\3', $css );\r\n\r\n\treturn trim( $css );\r\n\r\n}", "title": "" }, { "docid": "f96b77b36497e9c184446fd4947a909b", "score": "0.63734", "text": "function minify_css( $css ) {\n\t\t$css = preg_replace( '#\\s+#', ' ', $css );\n\t\t$css = preg_replace( '#/\\*.*?\\*/#s', '', $css );\n\t\t$css = str_replace( '; ', ';', $css );\n\t\t$css = str_replace( ': ', ':', $css );\n\t\t$css = str_replace( ' {', '{', $css );\n\t\t$css = str_replace( '{ ', '{', $css );\n\t\t$css = str_replace( ', ', ',', $css );\n\t\t$css = str_replace( '} ', '}', $css );\n\t\t$css = str_replace( ';}', '}', $css );\n\n\t\treturn trim( $css );\n\t}", "title": "" }, { "docid": "6d2e07350363ebdf94c9ff3456772a32", "score": "0.6349839", "text": "protected function cssminify($content) {\n $content = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $content);\n $content = str_replace(': ', ':', $content);\n $content = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\"), '', $content);\n $content = preg_replace(\"/ {2,}/\", ' ', $content);\n $content = str_replace(array('} '), '}', $content);\n $content = str_replace(array('{ '), '{', $content);\n $content = str_replace(array('; '), ';', $content);\n $content = str_replace(array(', '), ',', $content);\n $content = str_replace(array(' }'), '}', $content);\n $content = str_replace(array(' {'), '{', $content);\n $content = str_replace(array(' ;'), ';', $content);\n $content = str_replace(array(' ,'), ',', $content);\n return $content;\n }", "title": "" }, { "docid": "2ebd6182ad62abfa8eb97b65c3fa3296", "score": "0.63315743", "text": "public static function minify($css, $options = array()) \n {\n $options = array_merge(array(\n 'compress' => true,\n 'removeCharsets' => true,\n 'preserveComments' => true,\n 'currentDir' => null,\n 'docRoot' => $_SERVER['DOCUMENT_ROOT'],\n 'prependRelativePath' => null,\n 'symlinks' => array(),\n ), $options);\n \n if ($options['removeCharsets']) {\n $css = preg_replace('/@charset[^;]+;\\\\s*/', '', $css);\n }\n if ($options['compress']) {\n if (! $options['preserveComments']) {\n $css = Minify_CSS_Compressor::process($css, $options);\n } else {\n $css = Minify_CommentPreserver::process(\n $css\n ,array('Minify_CSS_Compressor', 'process')\n ,array($options)\n );\n }\n }\n if (! $options['currentDir'] && ! $options['prependRelativePath']) {\n return $css;\n }\n if ($options['currentDir']) {\n return Minify_CSS_UriRewriter::rewrite(\n $css\n ,$options); \n } else {\n return Minify_CSS_UriRewriter::prepend(\n $css\n ,$options['prependRelativePath']\n );\n }\n }", "title": "" }, { "docid": "2899928bc8c90aadaea386acf71164d4", "score": "0.6227123", "text": "public function minify(): self\n {\n $this->parseCss = $this->minify = true;\n return $this;\n }", "title": "" }, { "docid": "c630e9612f94754a9c5f5d691bce6e44", "score": "0.62059355", "text": "public function join_css()\n\t{\n\t\t$css = $this->css_array;\n\t\tif (file_exists($this->css))\n\t\t\t$x = filemtime($this->css);\n\t\telse\n\t\t\t$x = 0;\n\n\t\t$z = 0;\n\t\tif (is_array($css)) {\n\t\t\tforeach ($css as $c) {\n\t\t\t\t$filename = $this->css_dir . \"/\" . $c;\n\t\t\t\t$z = filemtime($filename);\n\t\t\t\tif ($z > $x)\n\t\t\t\t\t$this->_merge_css($filename);\n\t\t\t}\n\t\t} else {\n\t\t\t$filename = $this->css_dir . \"/\" . $css;\n\t\t\t$z = filemtime($css);\n\t\t\tif ($z > $x)\n\t\t\t\t$this->_merge_css($css);\n\t\t}\n\t}", "title": "" }, { "docid": "a86e5a45519c21aa220b8235e99e03b7", "score": "0.61989754", "text": "public static function removeMinifiedCSSFiles()\n {\n $files = array(\n 'styles_moz.css',\n 'styles_ie7.css',\n 'styles_ie8.css',\n );\n\n foreach ($files as $file) {\n $cssFilePath = Init::WEB_DIR.'/'.$file;\n if (file_exists($cssFilePath) === TRUE) {\n unlink($cssFilePath);\n }\n }\n\n }", "title": "" }, { "docid": "fe75f9b227b09ab3efe94948991f48ba", "score": "0.6160544", "text": "protected function doCompressCss()\n {\n if ($this->compressCss) {\n if (!empty($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssCompressHandler'])) {\n // Use external compression routine\n $params = [\n 'cssInline' => &$this->cssInline,\n 'cssFiles' => &$this->cssFiles,\n 'cssLibs' => &$this->cssLibs,\n 'headerData' => &$this->headerData,\n 'footerData' => &$this->footerData\n ];\n GeneralUtility::callUserFunction($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssCompressHandler'], $params, $this);\n } else {\n $this->cssLibs = $this->getCompressor()->compressCssFiles($this->cssLibs);\n $this->cssFiles = $this->getCompressor()->compressCssFiles($this->cssFiles);\n }\n }\n }", "title": "" }, { "docid": "61a729b85d65a97e412a56457293a5db", "score": "0.6146887", "text": "abstract public function minify();", "title": "" }, { "docid": "2457dfeacee43949643bfb915c719fcf", "score": "0.6142585", "text": "public static function customizer_css() {\n\t\t$css = array();\n\n\t\t$css[] = self::get_customizer_colors_css();\n\n\t\t$css_string = join( PHP_EOL, $css );\n\n\t\tif ( $css_string ) {\n\t\t\twp_add_inline_style( 'buildpress-main', $css_string );\n\t\t}\n\t}", "title": "" }, { "docid": "7c532a9d73fd1fa250d7c86c5ee23caa", "score": "0.60988545", "text": "private function _merge_css($filename)\n\t{\n\n\t\t$handle = fopen($filename, \"r\");\n\t\t$contents = fread($handle, filesize($filename));\n\t\tfclose($handle);\n\n\t\tif ($this->compress)\n\t\t\t$contents = $this->_process($contents);\n\n\t\tif (! is_writable($this->assets_dir))\n\t\t\tdie(\"Can't write to assets directory: {$this->assets_dir}\");\n\n\t\t$fh = fopen($this->assets_dir . '/' . $this->css_file, 'a');\n\t\tfwrite($fh, $contents);\n\t\tfclose($fh);\n\n\t}", "title": "" }, { "docid": "41beb633022016e151a27235a7aa3af6", "score": "0.6093463", "text": "private static function buildCss()\n\t{\n\t\trequire_once 'HTML/Template/IT.php';\n\t\t$tpl = new \\HTML_Template_IT(ROOT_FOLDER);\n\t\t$tpl->loadTemplatefile('students-template.css');\n\t\t$tpl->setCurrentBlock('css');\n\t\t$tpl->parse('css');\n\t\treturn $tpl->get('css');\n\t}", "title": "" }, { "docid": "ae0c52ffc319662c46305087f2259a10", "score": "0.6074534", "text": "public function minify() {\n\n if (!empty($this->context['css'])) {\n $this->context['css'] = VTCore_CSSBuilder_Minify_CSS::minify($this->context['css']);\n }\n\n if (!empty($this->context['js'])) {\n $this->context['js'] = VTCore_CSSBuilder_Minify_JS::minify($this->context['js']);\n }\n\n return $this;\n }", "title": "" }, { "docid": "29ff7439869a9af7af33df6409ad21ab", "score": "0.6044545", "text": "public function make_css() {\n\t\tif ( ! self::$final_css || empty( self::$final_css ) ) {\n\t\t\t$helpers = self::$helpers;\n\t\t\tself::$final_css = $helpers->dynamic_css_cached();\n\t\t}\n\t\treturn self::$final_css;\n\t}", "title": "" }, { "docid": "247cd39d0e8b5b70f45a2a6a424e81a3", "score": "0.60406315", "text": "public static function compiled_css()\n\t{\n\t\tif(Assets::will_compile())\n\t\t{\n\t\t\treturn parent::style(self::$_assets->url_for_asset(self::$_assets->compile_css()));\n\t\t}\n\t\t\n\t\treturn '';\n\t}", "title": "" }, { "docid": "9abe7c595ba1bba6fd989e24d23b7842", "score": "0.6034386", "text": "private function minifyCss($css) {\n return $css;\n }", "title": "" }, { "docid": "cb524bed9eccf0d1aca6518574301af7", "score": "0.60131127", "text": "public function enableCompressCss()\n {\n $this->compressCss = true;\n }", "title": "" }, { "docid": "4484714391ebf5ccf79edf23940e4fa5", "score": "0.6007544", "text": "public function buildStyles()\n {\n // check for and add external css\n if (is_array($this->styles) && count($this->styles)) {\n foreach ($this->styles as $style) {\n $css_handle = '\"' . $style['handle'] . '\"';\n $css_src = '\"' . $style[\"src\"] . '\"';\n if (isset($style[\"deps\"]) && $style[\"deps\"] !== '') {\n $css_deps = explode(',', $style[\"deps\"]);\n $css_deps_str = 'array( ';\n // build array string\n foreach ($css_deps as $css_dep) {\n $css_deps_str .= \"'$css_dep'\";\n }\n $css_deps_str .= ' )';\n }else{\n $css_deps_str = 'array()';\n }\n $css_ver = '\"' . $style[\"ver\"] . '\"';\n $css_media = '\"' . $style[\"media\"] . '\"';\n $this->shortcode_code .= <<<STRING\n\nwp_enqueue_style( $css_handle, $css_src, $css_deps_str, $css_ver, $css_media );\nSTRING;\n }\n }\n }", "title": "" }, { "docid": "e1d25aee97a3848f8fea3fa5777713df", "score": "0.60016274", "text": "public static function css()\n\t\t{\n\t\t\tdo_action(\"ws_plugin__s2member_before_css\", get_defined_vars());\n\n\t\t\tif(!empty($_GET[\"ws_plugin__s2member_css\"]))\n\t\t\t{\n\t\t\t\tstatus_header(200); // 200 OK status header.\n\n\t\t\t\theader(\"Content-Type: text/css; charset=UTF-8\");\n\t\t\t\theader(\"Expires: \".gmdate(\"D, d M Y H:i:s\", strtotime(\"+1 week\")).\" GMT\");\n\t\t\t\theader(\"Last-Modified: \".gmdate(\"D, d M Y H:i:s\").\" GMT\");\n\t\t\t\theader(\"Cache-Control: max-age=604800\");\n\t\t\t\theader(\"Pragma: public\");\n\n\t\t\t\twhile(@ob_end_clean()) ; // Clean output buffers.\n\n\t\t\t\t$u = $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"dir_url\"];\n\t\t\t\t$i = $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"dir_url\"].\"/src/images\";\n\n\t\t\t\tob_start(\"c_ws_plugin__s2member_utils_css::compress_css\");\n\n\t\t\t\tinclude_once dirname(dirname(__FILE__)).\"/s2member.css\";\n\n\t\t\t\tdo_action(\"ws_plugin__s2member_during_css\", get_defined_vars());\n\n\t\t\t\texit(); // Clean exit.\n\t\t\t}\n\t\t\tdo_action(\"ws_plugin__s2member_after_css\", get_defined_vars());\n\t\t}", "title": "" }, { "docid": "2ae56bb49fa17055c93dca6b5d0df137", "score": "0.5990638", "text": "public static function minifyCss(string $css): string\n {\n // Remove comments\n $css = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $css);\n // Remove space after colons\n // Remove whitespace\n return str_replace(\n array(': ', \"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '),\n array(':', '', '', '', '', '', '', ''),\n $css\n );\n }", "title": "" }, { "docid": "abcee835e4411fc977e16c6d90306e5a", "score": "0.59725064", "text": "protected function default_styles()\n {\n $develop_src = false !== strpos( \\ecjia::VERSION, '-src' );\n\n if ( ! config('system.script_debug') ) {\n $suffix = '.min';\n } else {\n $suffix = '';\n }\n\n $dev_suffix = $develop_src ? '' : '.min';\n\n $base_url = dirname(dirname(dirname(RC_App::app_dir_url(__FILE__)))) . '/statics';\n\n $this->styles->remove('bootstrap');\n $this->styles->remove('bootstrap-reset');\n\n $this->styles->add( 'bootstrap', \t $base_url.\"/mh-css/bootstrap.min.css\" );\n $this->styles->add( 'bootstrap-reset', $base_url.\"/mh-css/bootstrap-reset.css\" );\n $this->styles->add( 'ecjia-merchant-ui',\t\t $base_url.\"/mh-css/ecjia-merchant.ui.css\", array('bootstrap') );\n\n // lib css\n $this->styles->add( 'ecjia-mh-font-awesome', $base_url.\"/mh-css/font-awesome.min.css\" );\n $this->styles->add( 'ecjia-mh-owl-carousel', $base_url.\"/mh-css/owl.carousel.css\" );\n $this->styles->add( 'ecjia-mh-owl-theme', $base_url.\"/mh-css/owl.theme.css\" );\n $this->styles->add( 'ecjia-mh-owl-transitions', $base_url.\"/mh-css/owl.transitions.css\" );\n $this->styles->add( 'ecjia-mh-table-responsive', $base_url.\"/mh-css/table-responsive.css\" );\n\n $this->styles->add( 'ecjia-mh-jquery-easy-pie-chart', $base_url.\"/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.css\" );\n\n $this->styles->add( 'ecjia-mh-function', \t\t$base_url.\"/mh-css/ecjia.function.css\" );\n $this->styles->add( 'ecjia-mh-page', \t\t $base_url.\"/mh-css/page.css\" );\n $this->styles->add( 'ecjia-mh-chosen', \t\t $base_url.\"/assets/chosen/chosen.css\" );\n\n $this->styles->add( 'googleapis-fonts', \t $base_url.\"/mh-css/fonts/fonts.googleapis.css\" );\n\n $this->styles->add( 'ecjia-mh-bootstrap-fileupload-css', $base_url.\"/assets/bootstrap-fileupload/bootstrap-fileupload.css\" );\n $this->styles->add( 'ecjia-mh-editable-css', $base_url.'/assets/x-editable/bootstrap-editable/css/bootstrap-editable.css' );\n\n }", "title": "" }, { "docid": "7630f600f57d61d0a1a72bc4547cc9fe", "score": "0.5970995", "text": "protected function minify(string $css): string\n {\n $appendCss = '\n /* From CssMinify */\n #asset-status section::after {\n content: \"\\2705 CssMinify\"; /* WHITE HEAVY CHECK MARK */\n }\n ';\n return $css . $appendCss;\n }", "title": "" }, { "docid": "4fd761a44cff4be8439c74b240a40e0f", "score": "0.59618175", "text": "public function css()\n {\n foreach ($this->getCSS() as $id => $property) {\n wp_enqueue_style($id, $this->getAssetUrl($property['src']), $property['deps'], $property['ver'], $property['media']);\n }\n }", "title": "" }, { "docid": "c6aba47d52c92a3db4e49ed5e86ebc7f", "score": "0.58641595", "text": "public function css()\n {\n $output = '';\n\n $collection = $this->sortDependencies($this->collection->get('css'), 'css');\n\n foreach ($collection as $key => $value) {\n $output .= '<link rel=\"stylesheet\" href=\"'.$value.'\">'.\"\\n\";\n }\n\n return $output;\n }", "title": "" }, { "docid": "892f1627c40adf38430d28734828fc77", "score": "0.5863277", "text": "function minify_stylesheet($stylesheet)\n{\n\t// Remove comments.\n\t$stylesheet = preg_replace('@/\\*.*?\\*/@s', '', $stylesheet);\n\t// Remove whitespace around symbols.\n\t$stylesheet = preg_replace('@\\s*([{}:;,])\\s*@', '\\1', $stylesheet);\n\t// Remove unnecessary semicolons.\n\t$stylesheet = preg_replace('@;}@', '}', $stylesheet);\n\t// Replace #rrggbb with #rgb when possible.\n\t$stylesheet = preg_replace('@#([a-f0-9])\\1([a-f0-9])\\2([a-f0-9])\\3@i','#\\1\\2\\3',$stylesheet);\n\t$stylesheet = trim($stylesheet);\n\treturn $stylesheet;\n}", "title": "" }, { "docid": "04c3694f452be52ca8017787c2044101", "score": "0.5815241", "text": "private function _generateCSS() {\n $html = '';\n foreach ($this->_css as $path) {\n $html .= \"<link rel='stylesheet' type='text/css' href='$path'/>\\n\";\n }\n return $html;\n }", "title": "" }, { "docid": "d3d2fdb9398628acac1cf318e019cb5f", "score": "0.5810754", "text": "public function compress() {\n\n $this->context = array(\n 'css' => '',\n 'js' => '',\n 'inline' => '',\n 'id' => uniqid('custom-'),\n );\n\n foreach ($this->get('queues')->extract() as $name => $data) {\n\n if (!$this->get('library')->get($name)) {\n continue;\n }\n\n foreach ($this->get('library')->get($name) as $type => $files) {\n $content = '';\n\n foreach ($files as $filename => $file) {\n if (file_exists($file['path'])) {\n $content .= file_get_contents($file['path']);\n }\n\n if (isset($file['inline'])) {\n $this->context['inline'] .= implode(\"\\n\", $file['inline']);\n }\n\n if (isset($file['localize'])) {\n $this->get('library')\n ->add($this->context['id'] . '.js.' . $this->context['id'] . '.localize', $file['localize']);\n }\n }\n\n\n if ($type == 'css') {\n $this->base = trailingslashit(dirname($file['url']));\n $content = preg_replace_callback('/url\\(\\s*[\\'\"]?(?![a-z]+:|\\/+)([^\\'\")]+)[\\'\"]?\\s*\\)/i', array(\n $this,\n 'fixCssPath'\n ), $content);\n }\n\n if ($type == 'js' && substr($content, -1) != ';') {\n $content .= \";\\n\";\n }\n\n $this->context[$type] .= $content;\n }\n\n $this->get('queues')->processed($name);\n }\n\n // Merge inline css last\n $this->context['css'] .= $this->context['inline'];\n\n if ($this->get('minify')) {\n $this->minify();\n }\n\n if (!empty($this->context['css'])) {\n\n // Remove multiple @charset\n $this->context['css'] = preg_replace('/^@charset\\s+[\\'\"](\\S*?)\\b[\\'\"];/i', '', $this->context['css']);\n\n $upload = VTCore_Wordpress_Utility::uploadBits($this->context['id'] . '.css', $this->context['css'], array('vtcore-assets'));\n\n if (!$upload['error']) {\n $this->get('queues')->add($this->context['id'], TRUE);\n $this->get('library')\n ->add($this->context['id'] . '.css.' . $this->context['id'] . '.url', $upload['url']);\n $this->get('library')\n ->add($this->context['id'] . '.css.' . $this->context['id'] . '.path', $upload['file']);\n }\n }\n\n if (!empty($this->context['js'])) {\n $upload = VTCore_Wordpress_Utility::uploadBits($this->context['id'] . '.js', $this->context['js'], array('vtcore-assets'));\n\n if (!$upload['error']) {\n $this->get('queues')->add($this->context['id'], TRUE);\n $this->get('library')\n ->add($this->context['id'] . '.js.' . $this->context['id'] . '.url', $upload['url']);\n $this->get('library')\n ->add($this->context['id'] . '.js.' . $this->context['id'] . '.path', $upload['file']);\n\n }\n }\n\n // Add the compressed file map to compressed library\n // @bugfix compressed file never got removed\n $this->add('compressed.' . $this->hash, array(\n 'id' => $this->context['id'],\n 'assets' => $this->get('library')->get($this->context['id']),\n ));\n\n // free memory\n $this->context = array();\n unset($this->context);\n\n return $this;\n }", "title": "" }, { "docid": "1eef0dbd32558ab4eb508b5c86b1c441", "score": "0.5785644", "text": "function minify_styles($todo)\r\n\t{\r\n\t\tglobal $wp_styles;\r\n\r\n\t\t$total = sizeof($todo);\r\n\t\t$count = 0;\r\n\t\t$queued = 0;\r\n\t\t$temp = array();\r\n\t\t$this->print_positions['style_ignore'] = apply_filters('bwp_minify_style_ignore', array());\r\n\t\t$this->print_positions['style_direct'] = apply_filters('bwp_minify_style_direct', array('admin-bar'));\r\n\t\t$this->print_positions['style_allowed'] = apply_filters('bwp_minify_allowed_styles', 'all');\r\n\r\n\t\tforeach ($todo as $key => $handle)\r\n\t\t{\r\n\t\t\t$count++;\r\n\t\t\t// Take the src from registred stylesheets, do not proceed if the src is external\r\n\t\t\t// Also do not proceed if we can not print any more (except for login page)\r\n\t\t\t$the_style = $wp_styles->registered[$handle];\r\n\t\t\t$src = $the_style->src;\r\n\t\t\t$ignore = false;\r\n\t\t\t// Check for is_bool @since 1.0.2\r\n\t\t\tif ($this->is_in($handle, 'style_ignore') || is_bool($src))\r\n\t\t\t\t$ignore = true;\r\n\t\t\telse if (!$this->is_source_static($src))\r\n\t\t\t\t$ignore = true;\r\n\t\t\t// If style handle is not allowed\r\n\t\t\telse if ('all' != $this->print_positions['style_allowed'] && !$this->is_in($handle, 'style_allowed'))\r\n\t\t\t\t$ignore = true;\r\n\t\t\telse if ($this->is_in($handle, 'style_direct'))\r\n\t\t\t{\r\n\t\t\t\t$src = $this->process_media_source($src);\r\n\t\t\t\t$the_style->src = $this->get_minify_src($src);\r\n\t\t\t\t$the_style->ver = NULL;\r\n\t\t\t\t$ignore = true;\r\n\t\t\t}\r\n\t\t\telse if ((has_action('login_head') || true == $this->printable) && !empty($src) && $this->is_local($src))\r\n\t\t\t{\r\n\t\t\t\t$src = $this->process_media_source($src);\r\n\t\t\t\t// If styles have been printed, ignore this style\r\n\t\t\t\tif (did_action('bwp_minify_after_styles'))\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!$this->is_added($src, 'styles', $handle))\r\n\t\t\t\t\t\t$temp[] = $handle;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// If this style has a different media type rather than 'all', '',\r\n\t\t\t\t// we will have to append it to other strings\r\n\t\t\t\t$the_style->args = (isset($the_style->args)) ? trim($the_style->args) : '';\r\n\t\t\t\tif (!empty($the_style->args) && 'all' != $the_style->args)\r\n\t\t\t\t{\r\n\t\t\t\t\t$media = $the_style->args;\r\n\t\t\t\t\t// if this style has dependency, make sure it is added after all parent media styles\r\n\t\t\t\t\t$media_array = (isset($the_style->deps[0])) ? $this->dynamic_media_styles : $this->media_styles;\r\n\t\t\t\t\tif (!isset($media_array[$media]))\r\n\t\t\t\t\t\t$media_array[$media] = array();\r\n\t\t\t\t\t$media_array[$media][$handle] = $src;\r\n\t\t\t\t\t// pass the media styles back\r\n\t\t\t\t\tif (isset($the_style->deps[0]))\r\n\t\t\t\t\t\t$this->dynamic_media_styles = $media_array;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$this->media_styles = $media_array;\r\n\t\t\t\t}\r\n\t\t\t\t// If this style needs conditional statement (e.g. IE-specific stylesheets) \r\n\t\t\t\t// or is an alternate stylesheet (@see http://www.w3.org/TR/REC-html40/present/styles.html#h-14.3.1), \r\n\t\t\t\t// we will not enqueue it (but still minify it).\r\n\t\t\t\telse if ((isset($the_style->extra['conditional']) && $the_style->extra['conditional']) || (isset($the_style->extra['alt']) && $the_style->extra['alt']))\r\n\t\t\t\t{\r\n\t\t\t\t\t$the_style->src = $this->get_minify_src($src);\r\n\t\t\t\t\t$the_style->ver = NULL;\r\n\t\t\t\t\t$temp[] = $handle;\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// If this 'all' style has dependencies that are put inside a media link tag, we need to \r\n\t\t\t\t\t// add this style to dynamic_media_styles and ignore it here\r\n\t\t\t\t\tif (isset($the_style->deps[0]) && $this->are_deps_added_to_media($handle))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (!isset($this->dynamic_media_styles['all']))\r\n\t\t\t\t\t\t\t$this->dynamic_media_styles['all'] = array();\r\n\t\t\t\t\t\t$this->dynamic_media_styles['all'][] = $src;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$queued++;\r\n\t\t\t\t\t$this->append_minify_string($this->styles, $queued, $src, $count == $total, true, 'styles');\r\n\t\t\t\t\t// If this style has support for rtl language and the locale is rtl, \r\n\t\t\t\t\t// we will have to append the rtl stylesheet also\r\n\t\t\t\t\tif ('rtl' === $wp_styles->text_direction && isset($the_style->extra['rtl']) && $the_style->extra['rtl'])\r\n\t\t\t\t\t\t$this->append_minify_string($this->styles, $queued, $this->rtl_css_href($handle), $count == $total, false, 'styles');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If this style has inline styles, add them too\r\n\t\t\t\tif (true == self::has_inline($handle))\r\n\t\t\t\t\t$this->inline_styles[] = $handle;\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$this->ignores_style($handle, $temp, $the_style->deps);\r\n\r\n\t\t\tif (true == $ignore)\r\n\t\t\t\t$this->ignores_style($handle, $temp, $the_style->deps);\r\n\t\t}\r\n\r\n\t\t//$this->printable = false;\r\n\r\n\t\treturn $temp;\r\n\t}", "title": "" }, { "docid": "6d55112175936982dfa3994e77abc303", "score": "0.5784426", "text": "protected function doConcatenateCss()\n {\n if ($this->concatenateFiles || $this->concatenateCss) {\n if (!empty($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssConcatenateHandler'])) {\n // use external concatenation routine\n $params = [\n 'cssFiles' => &$this->cssFiles,\n 'cssLibs' => &$this->cssLibs,\n 'headerData' => &$this->headerData,\n 'footerData' => &$this->footerData\n ];\n GeneralUtility::callUserFunction($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssConcatenateHandler'], $params, $this);\n } else {\n $cssOptions = [];\n if (TYPO3_MODE === 'BE') {\n $cssOptions = ['baseDirectories' => $GLOBALS['TBE_TEMPLATE']->getSkinStylesheetDirectories()];\n }\n $this->cssLibs = $this->getCompressor()->concatenateCssFiles($this->cssLibs, $cssOptions);\n $this->cssFiles = $this->getCompressor()->concatenateCssFiles($this->cssFiles, $cssOptions);\n }\n }\n }", "title": "" }, { "docid": "321a8a020086a6e9b91d624bfe698a9e", "score": "0.5741264", "text": "function bareskin_meta_box_minify_css_actions( $settings ){\n\n\t$form_fields = array ('bareskin_create_dev_style', 'bareskin_minify_dev_style' ); // this is a list of the form field contents I want passed along between page views\n\t$method = ''; // Normally you leave this an empty string and it figures it out by itself, but you can override the filesystem method here\n\t\t\n\tif ( isset( $_POST['bareskin_create_dev_style'] ) || isset( $_POST['bareskin_minify_dev_style'] ) ){\n\t\t$url = wp_nonce_url('themes.php?page=theme-settings');\n\t\tif (false === ($creds = request_filesystem_credentials($url, $method, false, false, $form_fields) ) ) {\n\t\t\n\t\t\t// if we get here, then we don't have credentials yet,\n\t\t\t// but have just produced a form for the user to fill in, \n\t\t\t// so stop processing for now\n\t\t\t\n\t\t\treturn true; // stop the normal page form from displaying\n\t\t}\n\t\t\t\n\t\t// now we have some credentials, try to get the wp_filesystem running\n\t\tif ( ! WP_Filesystem($creds) ) {\n\t\t\t// our credentials were no good, ask the user for them again\n\t\t\trequest_filesystem_credentials($url, $method, true, false, $form_fields);\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\t/* Create dev style from original style */\n\tif ( isset( $_POST['bareskin_create_dev_style'] ) ) {\n\t\t\t\t\n\t\t$filename_orig = trailingslashit( get_stylesheet_directory() ).'style.css';\n\t\t$filename_dev = trailingslashit( get_stylesheet_directory() ).'style.dev.css';\n\n\t\t// by this point, the $wp_filesystem global should be working, so let's use it to create a file\n\t\tglobal $wp_filesystem;\n\t\t\n\t\t$style_orig = $wp_filesystem->get_contents( $filename_orig );\n\t\tif ( ! $wp_filesystem->put_contents( $filename_dev, $style_orig, FS_CHMOD_FILE) ) {\n\t\t\twp_die( __( 'Couldn\\'t read data from style.css', bareskin_get_textdomain() ) );\n\t\t}\n\t}\n\t\n\tif ( isset( $_POST['bareskin_minify_dev_style'] ) ) {\n\t\n\t\t$filename_orig = trailingslashit( get_stylesheet_directory() ).'style.css';\n\t\t$filename_dev = trailingslashit( get_stylesheet_directory() ).'style.dev.css';\n\n\t\t// by this point, the $wp_filesystem global should be working, so let's use it to create a file\n\t\tglobal $wp_filesystem;\n\t\n\t\t/* Set option to preserve important comments ( comments that begin with /*! ) */\n\t\t$options = array( 'preserveComments' );\n\t\t\n\t\t/* Get contents of style.dev.css */\n\t\tif( $style = $wp_filesystem->get_contents( $filename_dev ) ){\n\t\t\t\n\t\t\t/* Minify the contents */\n\t\t\t$style = Minify_CommentPreserver::process( $style, array('Minify_CSS_Compressor', 'process') ,array($options) );\n\t\t\t\n\t\t\t/* Get theme header */\t \n\t\t\t$start = strpos($style, '/*'); \n $end = strpos($style, '*/', $start + 2);\n\t\t\t \n\t\t\t$theme_header = '/*' .substr($style, $start + 2, $end - $start) ;\n\t\t\t\n\t\t\t/* Make shure all new lines were removed. Apperantly minify doesn't strip all new lines */\t\t\n\t\t\t$style = preg_replace('(\\r|\\n|\\t)', ' ', $style);\t\n\t\t\t/* Remove the theme header that was preserved initialy because now it is only on one line */\n\t\t\t$style = preg_replace('(/\\*.*?\\*/)', \"\\r\\n\", $style);\n\t\t\t/* Add the initial theme header that contains new lines */\n\t\t\t$style = $theme_header.$style;\n\t\t\t\n\t\t\t/* Write the minified contents to style.css */\t\t\t\n\t\t\tif ( ! $wp_filesystem->put_contents( $filename_orig, $style, FS_CHMOD_FILE) ) {\n\t\t\t\twp_die( __( 'Couldn\\'t write data to style.css', bareskin_get_textdomain() ) );\n\t\t\t}\n\t\t}\n\t\telse wp_die( __( 'Couldn\\'t read data from style.dev.css', bareskin_get_textdomain() ) );\n\t}\t\n\t\n\t/* Return the theme settings. */\n\treturn $settings;\n\n}", "title": "" }, { "docid": "5a8f8cdb70ba8589e16d66162d6c452a", "score": "0.5733798", "text": "public function minify(): string;", "title": "" }, { "docid": "bad5e84d13150ab58076a67df4b7f8b9", "score": "0.5727095", "text": "private function _cssmin($data)\n\t{\n\t\trequire_once(APPPATH . 'libraries/minify/cssmin-v3.0.1.php');\n\n\t\treturn CssMin::minify($data);\n\t}", "title": "" }, { "docid": "64077dded354c53a8ae0e9b89bf95dae", "score": "0.57051617", "text": "protected static function minifyCss($css) {\n\t\treturn trim(\n\t\t\tstr_replace(\n\t\t\t\tarray('; ', ': ', ' {', '{ ', ', ', '} ', ';}'), \n\t\t\t\tarray(';', ':', '{', '{', ',', '}', '}' ), \n\t\t\t\tpreg_replace('/\\s+/', ' ', $css)\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "cbbbfb33378c66b720ae863e10ca6905", "score": "0.5703013", "text": "static function css($url, $options = [], $minify = true) {\n if ($minify === true) {\n $url = self::getMiniFile($url);\n }\n $url = self::getPrefixedUrl($url);\n\n return self::csslink($url, $options);\n }", "title": "" }, { "docid": "e1621f05f94f7062bc35a70cb326c3d3", "score": "0.57021475", "text": "private function compileBrandings()\n {\n $command = new \\Metagist\\ServerBundle\\Command\\CompileBrandingsCommand();\n $command->setContainer($this->container);\n \n $lessFile = $command->writeLess($this->get('kernel')->getCacheDir());\n $targetPath = $this->get('kernel')->getRootDir() . '/../web/css/brandings.css';\n $command->compileBrandings($lessFile, $targetPath);\n }", "title": "" }, { "docid": "333152f66d548c49bba2ccb72c9d6c3b", "score": "0.56975055", "text": "public function getInstallationCss()\n {\n Common::sendHeader('Content-Type: text/css');\n Common::sendHeader('Cache-Control: max-age=' . (60 * 60));\n\n $files = array(\n 'plugins/Morpheus/stylesheets/base/bootstrap.css',\n 'plugins/Morpheus/stylesheets/base/icons.css',\n 'libs/jquery/themes/base/jquery-ui.min.css',\n 'libs/bower_components/materialize/dist/css/materialize.min.css',\n 'plugins/Morpheus/stylesheets/base.less',\n 'plugins/Morpheus/stylesheets/general/_forms.less',\n 'plugins/Installation/stylesheets/installation.css'\n );\n\n return AssetManager::compileCustomStylesheets($files);\n }", "title": "" }, { "docid": "80bf21abdce572a8e524dd84dbe84017", "score": "0.56723213", "text": "public function disableCompressCss()\n {\n $this->compressCss = false;\n }", "title": "" }, { "docid": "fc1a9683937688c5350b8a5687de82e4", "score": "0.56702745", "text": "public function enableConcatenateCss()\n {\n $this->concatenateCss = true;\n }", "title": "" }, { "docid": "2848d9d645f4b3d20d997f11b4acd71c", "score": "0.56403834", "text": "function compileScss() {\n \t$this->taskScss([\n\t \t'resources/assets/sass/app.scss' => 'public/css/app.css'\n\t ])\n\t ->importDir('assets/styles')\n\t ->run();\n }", "title": "" }, { "docid": "7b6d0ec9134aa7c02c15bc336b6c90fa", "score": "0.5635733", "text": "function bareskin_meta_box_display_style_minify() {\n\t$domain = bareskin_get_textdomain(); \n\t\n\tif( ! file_exists( trailingslashit( get_stylesheet_directory() ) .'style.dev.css' ) ){\n\t\t?>\t\n\t\t\t<p>\n\t\t\t\t<span class=\"description\"><?php _e( 'It appears that you do not have a style.dev.css in your theme directory. You can either create one manualy by copying the style.css or click below and one will be created for you. Be sure that the theme info comments begin with /*! or else they will be striped when you minify.', $domain ); ?></span>\n\t\t\t</p>\n\t\t\t<input type=\"submit\" name=\"bareskin_create_dev_style\" value=\"<?php _e( 'Create dev style', $domain ) ?>\" class=\"button\">\n\t\t<?php \n\t}\n\t\n\telse{\n\t\t?>\n\t\t\t<p>\n\t\t\t\t<span class=\"description\"><?php _e( 'Select below which style you want to use: ', $domain ); ?></span>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"radio\" name=\"<?php echo bareskin_settings_field_name( 'style_to_use' ) ?>\" value=\"style\" id=\"style\" <?php checked( bareskin_get_setting( 'style_to_use' ), 'style' ); ?>/>\t\t\t\t\n\t\t\t\t<label for=\"style\"><?php _e( 'style.css', $domain )?></label>\n\t\t\t\t<input type=\"radio\" name=\"<?php echo bareskin_settings_field_name( 'style_to_use' ) ?>\" value=\"style_dev\" id=\"style_dev\" <?php checked( bareskin_get_setting( 'style_to_use' ), 'style_dev' ); ?>/>\t\n\t\t\t\t<label for=\"style_dev\"><?php _e( 'style.dev.css', $domain )?></label>\t\t\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<span class=\"description\"><?php _e( 'Click below if you want to minify style.dev.css to style.css: ', $domain ); ?></span>\n\t\t\t</p>\n\t\t\t<input type=\"submit\" name=\"bareskin_minify_dev_style\" value=\"<?php _e( 'Minify Now', $domain ) ?>\" class=\"button\">\n\t\t<?php\t\n\t}\t\n}", "title": "" }, { "docid": "f0801e4960aa7cb464df3a180b8b834e", "score": "0.5615347", "text": "function bareskin_meta_box_add_style_minify() {\n\tglobal $bareskin_settings_page;\n\t\n\tif( $bareskin_settings_page != null )\n\t\tadd_meta_box( 'bareskin-meta-box-style-minify', __( 'Style Minify', bareskin_get_textdomain() ), 'bareskin_meta_box_display_style_minify', $bareskin_settings_page, 'normal', 'high' );\n}", "title": "" }, { "docid": "96c39419ee0c483db64089082c9cbba4", "score": "0.56052935", "text": "public function to_exportable_css(){\n $css = '';\n $used_breakpoints = [];\n foreach ($this->utilized_breakpoints_and_classes as $breakpoint_alias => $breakpoint_classes) {\n $derived_condition = $this->MediaQueryRegistry->get_breakpoint_config_by_alias($breakpoint_alias)['derived_condition'];\n if (!isset($used_breakpoints[$derived_condition])) {\n $used_breakpoints[$derived_condition] = [];\n }\n foreach ($breakpoint_classes as $minified_utility_class_name => $value) {\n array_push(\n $used_breakpoints[$derived_condition],\n '.'.$minified_utility_class_name.'{'.$value.'}'\n );\n }\n }\n foreach (static::$prepared_breakpoint_addons as $derived_condition => $css_statements) {\n if (!isset($used_breakpoints[$derived_condition])) {\n $used_breakpoints[$derived_condition] = [];\n }\n foreach ($css_statements as $css_statement) {\n array_push(\n $used_breakpoints[$derived_condition],\n $css_statement\n );\n }\n }\n foreach ($used_breakpoints as $derived_condition => $css_statements) {\n $css .= $derived_condition.'{';\n foreach ($css_statements as $css_statement) {\n $css .= $css_statement;\n }\n $css .= '}'; \n }\n return $css;\n }", "title": "" }, { "docid": "b8e28a7f5b17ccb15e2831e17830ee3d", "score": "0.5604431", "text": "private function _buildCssFileList()\n {\n $currentThemeName = $this->_helper->config->getConfig('currentTheme');\n $currentThemePath = Tools_System_Tools::normalizePath(\n realpath($this->_websiteConfig['path'] . $this->_themeConfig['path'] . $currentThemeName)\n );\n\n $cssFiles = Tools_Filesystem_Tools::findFilesByExtension($currentThemePath, 'css', true);\n\n $cssTree = array();\n foreach ($cssFiles as $file) {\n // don't show concat css for editing\n if (preg_match(\n '/' . MagicSpaces_Concatcss_Concatcss::FILE_NAME_PREFIX . '[a-zA-Z0-9]+\\.css/i',\n strtolower(basename($file))\n )\n ) {\n continue;\n }\n\n preg_match_all(\n '~^' . $currentThemePath . '/([a-zA-Z0-9-_\\s/.]+/)*([a-zA-Z0-9-_\\s.]+\\.css)$~i',\n Tools_System_Tools::normalizePath($file),\n $sequences\n );\n $subfolders = $currentThemeName . '/' . $sequences[1][0];\n $files = array();\n foreach ($sequences[2] as $key => $value) {\n $files[$subfolders . $value] = $value;\n }\n\n if (!array_key_exists($subfolders, $cssTree)) {\n $cssTree[$subfolders] = array();\n }\n $cssTree[$subfolders] = array_merge($cssTree[$subfolders], $files);\n\n }\n\n return $cssTree;\n }", "title": "" }, { "docid": "8bcb0b3ae5169a71a205d2f90326718a", "score": "0.5601419", "text": "function global_css_filter(){\r\n global $wp_query;\r\n\r\n if ($this->opt('login_query'))\r\n $login_query = $this->opt('login_query');\r\n else\r\n $login_query = 'hide_my_wp';\r\n\r\n $new_style_path=trim($this->opt('new_style_name'),' /');\r\n //$this->h->ends_with($_SERVER[\"REQUEST_URI\"], 'main.css') || <- For multisite\r\n if ( (isset($wp_query->query_vars['style_wrapper']) && $wp_query->query_vars['style_wrapper'] && $this->is_permalink() ) ){\r\n\r\n\r\n if ($this->opt('full_hide')&& $this->opt('admin_key')) {\r\n if (!isset($_GET[$this->short_prefix . $login_query]) || $_GET[$this->short_prefix . $login_query] != $this->opt('admin_key'))\r\n return false;\r\n\r\n }\r\n\r\n if (is_multisite() && isset($wp_query->query_vars['template_wrapper']))\r\n $css_file = str_replace(get_stylesheet(), $wp_query->query_vars['template_wrapper'], get_stylesheet_directory()).'/style.css';\r\n else\r\n $css_file = get_stylesheet_directory().'/style.css';\r\n\r\n\r\n status_header( 200 );\r\n //$expires = 60*60*24; // 1 day\r\n $expires = 60*60*24*3; //3 day\r\n header(\"Pragma: public\");\r\n header(\"Cache-Control: maxage=\".$expires);\r\n header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');\r\n header('Content-type: text/css; charset=UTF-8');\r\n\r\n $css = file_get_contents($css_file);\r\n\r\n if ($this->opt('minify_new_style') ) {\r\n if ($this->opt('minify_new_style')=='quick' ) {\r\n $to_remove=array ('%\\n\\r%','!/\\*.*?\\*/!s', '/\\n\\s*\\n/',\"%(\\s){1,}%\");\r\n $css = preg_replace($to_remove, ' ', $css);\r\n }elseif ($this->opt('minify_new_style')=='safe') {\r\n require_once('lib/class.CSS-minify.php');\r\n $css = Minify_CSS_Compressor::process($css, array());\r\n }\r\n\r\n\r\n }\r\n\r\n if ($this->opt('clean_new_style') ) {\r\n if (strpos($css, 'alignright')===false ){ //Disable it if it uses import or so on\r\n if (is_multisite()) {\r\n $opts = get_blog_option(BLOG_ID_CURRENT_SITE, self::slug);\r\n $opts['clean_new_style']='';\r\n update_blog_option(BLOG_ID_CURRENT_SITE, self::slug, $opts);\r\n }else{\r\n $opts = get_option(self::slug);\r\n $opts['clean_new_style']='';\r\n update_option(self::slug, $opts);\r\n }\r\n }else{\r\n $old = array ('wp-caption', 'alignright', 'alignleft','alignnone', 'aligncenter');\r\n $new = array ('x-caption', 'x-right', 'x-left','x-none', 'x-center');\r\n $css = str_replace($old, $new, $css);\r\n }\r\n\t\t\t //We replace HTML, too\r\n }\r\n\r\n // if (is_child_theme())\r\n // $css = str_replace('/thematic/', '/parent/', $css);\r\n\r\n echo $css;\r\n\r\n // if(extension_loaded('zlib'))\r\n // ob_end_flush();\r\n\r\n exit;\r\n }\r\n\r\n }", "title": "" }, { "docid": "b7c0a88a2863511563c7a467e4a9a445", "score": "0.559542", "text": "public static function assetsMinification()\n {\n $config = \\Phalcon\\DI::getDefault()->getShared('config');\n\n foreach (array('Css', 'Js') as $asset) {\n $get = 'get' . $asset;\n $filter = '\\Phalcon\\Assets\\Filters\\\\' . $asset . 'min';\n\n foreach (\\Phalcon\\DI::getDefault()->getShared('assets')->$get() as $resource) {\n $min = new $filter();\n $resource->setSourcePath(ROOT_PATH . '/public/' . $resource->getPath());\n $resource->setTargetUri('min/' . $resource->getPath());\n\n if ($config->app->env != 'production') {\n if (!is_dir(dirname(ROOT_PATH . '/public/min/' . $resource->getPath()))) {\n $old = umask(0);\n mkdir(dirname(ROOT_PATH . '/public/min/' . $resource->getPath()), 0777, true);\n umask($old);\n }\n\n if ($config->app->env == 'development' || !file_exists(ROOT_PATH . '/public/min/' . $resource->getPath())) {\n file_put_contents(ROOT_PATH . '/public/min/' . $resource->getPath(), $min->filter($resource->getContent()));\n } elseif (md5($min->filter($resource->getContent())) != md5_file(ROOT_PATH . '/public/min/' . $resource->getPath())) {\n file_put_contents(ROOT_PATH . '/public/min/' . $resource->getPath(), $min->filter($resource->getContent()));\n }\n }\n }\n }\n }", "title": "" }, { "docid": "eebf012d21480454507b51cd40c57e7d", "score": "0.5594226", "text": "public static function hd_css() {\n\t$x=stylesheet_formate('assets/plugin/datatables/media/css/dataTables.bootstrap.min.css');\n\t$x.=stylesheet_formate('assets/plugin/datatables/extensions/Responsive/css/responsive.bootstrap.min.css');\n\t$x.=stylesheet_formate('assets/styles/jquery-ui.css');\n\t$x.=stylesheet_formate('elfinder/css/elfinder.min.css');\n\t$x.=stylesheet_formate('elfinder/css/theme.css');\n\t$x.=stylesheet_formate('assets/plugin/lightview/css/lightview/lightview.css');\n\t\n\t\t\n\t\t\n\techo $x;\n }", "title": "" }, { "docid": "a8ce6144e2317814ff019e5903e88b8e", "score": "0.55870223", "text": "public static function MiniTocCss()\n\t{\n\t\tglobal $core;\n\n\t\t$plop =\n\t\t\t$core->blog->themes_path.'/'.\n\t\t\t$core->blog->settings->theme.'/minitoc.css';\n\t\t\n\t\t$tagada = \n\t\t\t$core->blog->themes_path.\n\t\t\t'/default/minitoc.css';\n\t\t\n\t\tif (file_exists($plop)) { /* s'il y a une minitoc.css dans le thème actif, on la prend */\n\t\t\t$css =\n\t\t\t$core->blog->settings->themes_url.'/'.\n\t\t\t$core->blog->settings->theme.'/minitoc.css';\n\t\t}\n\t\telseif (file_exists($tagada)) { /* si pas dans le thème actif on regarde dans le theme par défaut */\n\t\t\t$css =\n\t\t\t$core->blog->settings->themes_url.'/default/minitoc.css';\n\t\t}\n\t\telse { /* et si aucune des deux celle dans le rep du ploug */\n\t\t\t$css =\n\t\t\t\t$core->blog->url.\n\t\t\t\t(($core->blog->settings->url_scan == 'path_info')?'?':'').\n\t\t\t\t'pf=miniToc/minitoc.css';\n\t\t}\n\t\t$res =\n\t\t\t\"\\n<?php \\n\".\n\t\t\t\t\"echo '<style type=\\\"text/css\\\" media=\\\"screen\\\">@import url(\".$css.\");</style>';\\n\".\n\t\t\t\"?>\\n\";\n\t\t\t\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "625d2645458a8396a0446f84e9542c2d", "score": "0.5578048", "text": "public function generate()\n {\n if ($this->conf->add_css_inline != 'yes') {\n return;\n }\n\n if (!isset($this->parsed[ 'content' ])) {\n return;\n }\n\n $global_css = '';\n $composed_css = '';\n $reached_css = array();\n $reached_selectors = array();\n\n foreach ($this->parsed[ 'files-css' ] as $file) {\n if (file_exists($this->conf->css_path.$file)) {\n $global_css .= file_get_contents($this->conf->css_path.$file);\n }\n }\n $global_css_array = $this->BreakCSS($global_css);\n $global_selectors = array_keys($global_css_array);\n\n // find if parsed selector are occur into global selector list\n foreach ($global_selectors as $global_selector) {\n foreach ($this->parsed[ 'selectors' ] as $parsed_selector) {\n if (strstr($parsed_selector, $global_selector)) {\n if (!isset($reached_selectors[ $global_selector ])) {\n $reached_selectors[ $global_selector ] = $global_css_array[ $global_selector ];\n } else {\n $reached_selectors[ $global_selector ] = array_merge($global_css_array[ $global_selector ], (array) $reached_selectors[ $global_selector ]);\n };\n }\n }\n }\n\n // collect exist inline styles in string\n foreach ($this->parsed[ 'styles' ] as $css_string) {\n $css_string = $css_string;\n if (!empty($css_string)) {\n $composed_css .= $css_string;\n }\n };\n\n // collect founded global styles in string\n foreach ($reached_selectors as $selector => $rules) {\n $composed_css .= \"$selector{ \";\n foreach ($rules as $key => $val) {\n $composed_css .= \"$key: $val;\\n \";\n }\n $composed_css .= \"}\";\n };\n\n $composed_css = str_replace(array(\" \", \"\\n\", \"\\r\", \"\\t\"), \"\", $composed_css);\n $composed_css = str_replace(\"{\", \"{\\n \", $composed_css);\n $composed_css = str_replace(\";\", \";\\n \", $composed_css);\n $composed_css = str_replace(\"}\", \"\\n}\\n\", $composed_css);\n\n $this->parsed[ 'composed_css' ] = $composed_css;\n\n $this->saveBackgroundImages();\n\n return $this;\n }", "title": "" }, { "docid": "1a2438ad1795212991d20393892af0c2", "score": "0.557166", "text": "public function clean($config) {\n\t\t$css = isset($config['css']) ? $config['css'] : '';\n\t\t$url = isset($config['url']) ? $config['url'] : '';\n\t\t$compress = isset($config['compress']) ? $config['compress'] : '';\n\t\t// load from file and write file\n\t\tif (strpos($css, \".css\") && is_file($css)) {\n\t\t\t$this->code = file_get_contents($css);\n\t\t} else {\n\t\t\t$this->code = $css;\n\t\t}\n\n\t\t$cssObject = Array();\n\t\t$cssText = \"\";\n\t\t$css = $this->ParseCSS($this->code);\n\t\t// run through properties and add appropriate compatibility\n\t\tforeach ($css as $cssID => $cssProperties) {\n\t\t\t$properties = Array();\n\t\t\tif (gettype($cssProperties) === \"string\") {\n\t\t\t\t$cssObject[$cssID] = $cssProperties;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tforeach ($cssProperties as $value) {\n\t\t\t\t$type = $value[\"type\"];\n\t\t\t\t$value = $value[\"value\"];\n\t\t\t\tif(in_array($type, $this->defGradientProperties)) {\n\t\t\t\t\tif (substr(trim($value), 0, 4) === \"url(\") {\n\t\t\t\t\t\t$value = substr(trim($value), 5, -1);\n\t\t\t\t\t\t$value = str_replace(Array(\"'\",'\"'), Array(''), $value);\n\t\t\t\t\t\t$value = 'url(\"' . $url . $value . '\")';\n\t\t\t\t\t} else if (strpos($value, \"gradient\") !== false) { // background-gradient\n\t\t\t\t\t\t$value = $this->parseGradient($type, $value);\n\t\t\t\t\t} else { // background-color as \"background\"\n\t\t\t\t\t\t$doFallback = in_array($type, $this->defColorFallback);\n\t\t\t\t\t\t$value = $this->parseColors($this->splitByColor($value), $doFallback);\n\t\t\t\t\t}\n\t\t\t\t} else if (in_array($type, $this->defColorProperties)) {\n\t\t\t\t\t$doFallback = in_array($type, $this->defColorFallback);\n\t\t\t\t\t$value = $this->parseColors($this->splitByColor($value), $doFallback);\n\t\t\t\t}\n\t\t\t\t$alias = Array();\n\t\t\t\tforeach ($this->defAlias as $property) {\n\t\t\t\t\tif (in_array($type, $property)) { // direct conversion between vendors\n\t\t\t\t\t\tforeach ($property as $key) {\n\t\t\t\t\t\t\tif ($key == \"-moz-transition\") {\n\t\t\t\t\t\t\t\t$tmp = explode(\" \", $value);\n\t\t\t\t\t\t\t\tif ($tmp[0] == \"transform\") $tmp[0] = \"-moz-transform\";\n\t\t\t\t\t\t\t\t$tmp = implode($tmp, \" \");\n\t\t\t\t\t\t\t\t$alias[$key] = $tmp;\n\t\t\t\t\t\t\t} else if ($key == \"-moz-transition-property\") {\n\t\t\t\t\t\t\t\t$tmp = $value;\n\t\t\t\t\t\t\t\tif ($tmp == \"transform\") $tmp = \"-moz-transform\";\n\t\t\t\t\t\t\t\t$alias[$key] = $tmp;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$alias[$key] = $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}\n\t\t\t\tif (count($alias)) {\n\t\t\t\t\t$value = $alias;\n\t\t\t\t}\n\t\t\t\t$merged = false;\n\t\t\t\tforeach ($properties as $key => $property) {\n\t\t\t\t\t$typeof = gettype($property[\"value\"]);\n\t\t\t\t\tif ($property[\"type\"] == $type && gettype($value) === \"array\") {\n\t\t\t\t\t\tif ($typeof == \"string\") {\n\t\t\t\t\t\t\t$property[\"value\"] = Array(\n\t\t\t\t\t\t\t\t\"hex\" => $property[\"value\"]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$properties[$key][\"value\"] = array_merge(\n\t\t\t\t\t\t\t$property[\"value\"],\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$merged = true;\n\t\t\t\t\t} else if ($typeof == \"array\" && $property[\"value\"][$type]) {\n\t\t\t\t\t\tif ($type === \"filter\") {\n\t\t\t\t\t\t\t$value = Array(\n\t\t\t\t\t\t\t\t\"filter\" => $type.\": \".$value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$properties[$key][\"value\"] = array_merge(\n\t\t\t\t\t\t\t$property[\"value\"],\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$merged = true;\n\t\t\t\t\t} else {\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($merged === false) {\n\t\t\t\t\tarray_push($properties, Array(\n\t\t\t\t\t\t\"type\" => $type,\n\t\t\t\t\t\t\"value\" => $value\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cssObject[$cssID] = $properties;\n\t\t}\n\t\t$newline = $compress ? \"\" : \"\\n\";\n\t\t$space = $compress ? \"\" : \" \";\n\t\t$tab = $compress ? \"\" : \"\\t\";\n\t\t// composite $cssObject into $cssText\n\t\t$cssArray = Array();\n\t\tforeach ($cssObject as $cssID => $cssProperties) {\n\t\t\tif (gettype($cssProperties) === \"string\") {\n\t\t\t\t$cssText = substr($cssProperties, strpos($cssProperties, \"{\")+1);\n\t\t\t\t$cssText = \"\\t\" . trim(substr($cssText, 0, strrpos($cssText, \"}\"))) . \"\\n\";\n\t\t\t\tarray_push($cssArray, Array(\n\t\t\t\t\t\"text\" => $cssText,\n\t\t\t\t\t\"key\" => $cssID\n\t\t\t\t));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$cssText = \"\";\n\t\t\tforeach ($cssProperties as $value) {\n\t\t\t\t$type = $value[\"type\"];\n\t\t\t\t$value = $value[\"value\"];\n\t\t\t\tif (gettype($value) == \"string\") { // general properties\n\t\t\t\t\tif ($compress) $value = str_replace(\", \", \",\", $value);\n\t\t\t\t\t$value = str_replace(Array('\\\"',\"\\'\"), Array('\"',\"'\"), $value);\n\t\t\t\t\t$cssText .= $tab . $type . \":{$space}\" . $value . \";{$newline}\";\n\t\t\t\t} else { // multiple values\n\t\t\t\t\tforeach ($value as $key => $tmp) {\n\t\t\t\t\t\tif ($compress) $tmp = str_replace(\", \", \",\", $tmp);\n\t\t\t\t\t\t$tmp = str_replace(Array('\\\"',\"\\'\"), Array('\"',\"'\"), $tmp);\n\t\t\t\t\t\tif ($key == \"hex\" || $key == \"rgba\" || in_array($key, $this->defGradientLinear)) { // color or gradient variants\n\t\t\t\t\t\t\tif ($key == \"filter\") { // microsoft values\n\t\t\t\t\t\t\t\t$cssText .= $tab . $tmp . \";{$newline}\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$cssText .= $tab . $type . \":{$space}\" . $tmp . \";{$newline}\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // direct conversion of vender variants\n\t\t\t\t\t\t\t$cssText .= $tab . $key . \":{$space}\" . $tmp . \";{$newline}\";\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\tarray_push($cssArray, Array(\n\t\t\t\t\"text\" => $cssText,\n\t\t\t\t\"key\" => $cssID\n\t\t\t));\n\t\t}\n\t\t$cssText = \"\";\n\t\tforeach ($cssArray as $n => $value) {\n\t\t\t$cssID = $value[\"key\"];\n\t\t\t$content1 = $cssArray[$n][\"text\"];\n\t\t\t$content2 = $cssArray[$n + 1][\"text\"];\n\t\t\tif ($content1 === $content2) {\n\t\t\t\t$cssText .= $cssID . $space . \",\" . $newline;\n\t\t\t} else {\n\t\t\t\t$cssText .= $cssID . $space . \"{\" . $newline;\n\t\t\t\t$cssText .= $content1;\n\t\t\t\t$cssText .= \"}\" . $newline;\n\t\t\t}\n\t\t}\n\n\t\treturn $cssText;\n\t}", "title": "" }, { "docid": "2f25ed2f7e3a1b2e6ae939aa9d072d60", "score": "0.5570735", "text": "public function cssAction()\n {\n header('Content-type:text/css;charset=utf-8');\n $css = file_get_contents(__dir__ . \"/../../assets/toastr.min.css\");\n\n echo $css;\n exit;\n }", "title": "" }, { "docid": "f355aec3ff2935166a3af4b8bee222a7", "score": "0.5568952", "text": "function project_css($nom) {\r\n\t\treturn base_url() . \"css/\" . $nom . '.css';\r\n\t}", "title": "" }, { "docid": "d536d0670db3d787a3dcc44913041489", "score": "0.5530214", "text": "function neatline_queueLayoutBuilderCssAndJs()\n{\n\n queue_js('admin/layout_builder', 'javascripts');\n queue_js('admin/toggle_button', 'javascripts');\n\n queue_css('layout-builder');\n\n}", "title": "" }, { "docid": "3dbea4d16e1a7079e01c01bc61591bbe", "score": "0.55150247", "text": "public function concat(){\n\t\t\n\t\t$files = Zend_Registry::get('concat');\n\t\t$outputFiles = array();\n\t\t$config = Zend_Registry::get('config');\n\t\t\n\t\t\n\t\tforeach(array_keys($files) as $fileType){\n\t\t\t\n\t\t\tif ( !empty($files[$fileType]) ){\n\t\t\t\t\n\t\t\t\t// Only have valid files\n\t\t\t\t$validFiles = array();\n\t\t\t\tforeach( $files[$fileType] as $i => $filename ){\n\t\t\t\t\t$file = ROOT_DIR.'/application'. self::UNCOMPILED_DIR.$fileType.'/'.$filename;\t\t\n\t\t\t\t\tif ( is_readable($file) ){\n\t\t\t\t\t\t$validFiles[] = $file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// This should work out that each css filename will be unquie.\n\t\t\t\t// Slim chance it won't.\n\t\t\t\t$compileFilename = ROOT_DIR.'/application/'.self::COMPILED_DIR.$fileType.'/'\n\t\t\t\t\t\t\t\t .hash('md5',implode(',',$validFiles) ).'.'.$fileType;\n\t\t\t\t\t\t\t\t \n\t\t\t\t$outputFiles[$fileType] = 'scripts/'.$fileType.'/'.basename($compileFilename);\n\t\t\t\tif ( is_readable($compileFilename) ){\n\t\t\t\t\t// No need to redo what we already have.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Temp file\n\t\t\t\t$fileContents = '';\n\t\t\t\tforeach( $validFiles as $file ){\n\t\t\t\t\t// I have a feeling which is most likely incorrect that I may need a new line for CSS files.\n\t\t\t\t\t$fileContents .= file_get_contents($file).PHP_EOL;\n\t\t\t\t}\n\t\t\t\tif ( empty($fileContents) ){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Write to file. Using zlib for the writing of the file as amazon\n\t\t\t\t// s3 doesn't send compress the data for you when you send the \n\t\t\t\t// compress header.\n\t\t\t\t$fileResource = gzopen($compileFilename,'w9');\t\t\t\t\n\t\t\t\tgzwrite($fileResource,$fileContents);\n\t\t\t\tgzclose($fileResource);\n\t\t\t\t\n\t\t\t\t// Upload file to s3.\n\t\t\t\t$s3 = new Zend_Service_Amazon_S3();\n\t\t\t\t\n\t\t\t\t$outputFiles[$fileType] = 'scripts/'.$fileType.'/'.basename($compileFilename);\n\t\t\t\t\n\t\t\t\t$s3->putFile($compileFilename, $config->aws->bucket.'/'.$outputFiles[$fileType], \n\t\t\t\t\t\t\t array(Zend_Service_Amazon_S3::S3_ACL_HEADER => Zend_Service_Amazon_S3::S3_ACL_PUBLIC_READ,\n\t\t\t\t\t\t\t \t\t'Content-Encoding' => 'gzip',\n\t\t\t\t\t\t\t \t\t'Expires' => date('D, j M Y H:i:s', time() + (86400 * 365 * 10)) . ' GMT') );\n\t\t\t\t\t\t\t \t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $outputFiles;\t\t\n\t}", "title": "" }, { "docid": "48afe176dd95473d0ce09c0fc0c4d7de", "score": "0.5514532", "text": "function minifyImage(){}", "title": "" }, { "docid": "5906b8e844a284a47dbb3bb9cb0a8e47", "score": "0.55093366", "text": "public function css() {\n\n\t\t$stylesheets = $this->settings['add_css'];\n\n\t\tif ( is_array( $stylesheets ) && count( $stylesheets ) > 0 ) {\n\t\t\tforeach ( $stylesheets as $name => $stylesheet ) {\n\t\t\t\twp_enqueue_style( $name, SITE_URL . '/css/' . $stylesheet );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fe3d4ff7377e4899a95c2df2000c3fc6", "score": "0.54992545", "text": "private function _minify($data)\n\t{\n\t\trequire_once(APPPATH . 'libraries/minify/cssminify.php');\n\t\t$cssminify = new cssminify();\n\n\t\treturn $cssminify->compress($data);\n\t}", "title": "" }, { "docid": "b308866eaa01b6f7c5aa928b66c75f9c", "score": "0.54968536", "text": "function mg_create_frontend_css() {\t\r\n\tob_start();\r\n\trequire(MG_DIR.'/frontend_css.php');\r\n\t\r\n\t$css = ob_get_clean();\r\n\tif(trim($css) != '') {\r\n\t\tif(!file_put_contents(MG_DIR.'/css/custom.css', $css, LOCK_EX)) {$error = true;}\r\n\t}\r\n\telse {\r\n\t\tif(file_exists(MG_DIR.'/css/custom.css'))\t{ unlink(MG_DIR.'/css/custom.css'); }\r\n\t}\r\n\t\r\n\tif(isset($error)) {return false;}\r\n\telse {return true;}\r\n}", "title": "" }, { "docid": "234227fc3ac2c3a8c993dc593bf1fd1f", "score": "0.54956424", "text": "public function minifyImage () {}", "title": "" }, { "docid": "f3b41e33d33ea20ca4f108123f485898", "score": "0.5494947", "text": "function generate_hint_style()\n { \n $scss_dir = get_template_directory() . '/assets/scss/hint/';\n $css_dir = get_template_directory() . '/assets/libs/hint/';\n\n $this->scssc = new \\Leafo\\ScssPhp\\Compiler();\n $this->scssc->setImportPaths( $scss_dir );\n\n $css_file_min = $css_dir . 'hint.min.css';\n $this->scssc->setFormatter( 'Leafo\\ScssPhp\\Formatter\\Crunched' );\n\n $this->redux->filesystem->execute( 'put_contents', $css_file_min, array(\n 'content' => $this->scssc->compile( '@'.'import \"hint.scss\"' )\n ) );\n }", "title": "" }, { "docid": "5aebe13c2f3547046fb3714a72c78a6d", "score": "0.5488528", "text": "private function affiche_style() {\r\n\t\tforeach ($this->css as $s) {\r\n\t\t\techo \"<link rel='stylesheet' href='css/\".$s.\".css' />\\n\";\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "a5942e38cef0aec1a3a434443bfda0d5", "score": "0.5461768", "text": "function _setup_css() {\n if (file_exists(SITE_ROOT . \"/view/\" . $this->view . \"/css\")) {\n // Loop through them and echo js includsion\n $js_dir = new DirectoryIterator(SITE_ROOT . \"/view/\" . $this->view . \"/css\");\n foreach ($js_dir as $fileinfo) {\n if ($fileinfo->getFilename() !== \".\" AND $fileinfo->getFilename() !== \"..\" AND $fileinfo->getExtension () === \"css\") {\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . SITE_URL . \"view/\" . $this->view . \"/css/\" . $fileinfo->getFilename() . '\">';\n } \n }\n }\n }", "title": "" }, { "docid": "6c36f3541f42d5430c1a90d8c0775a2f", "score": "0.54524857", "text": "function origin_css() {\n\twp_enqueue_style(\"main-stylesheet\", get_stylesheet_directory_uri().\"/style.css\", array(), \"\", \"all\");\n}", "title": "" }, { "docid": "5c78e22f6b69e406a295d27d5d87d7bc", "score": "0.543646", "text": "public function css() {\n\t\twp_register_style(\n\t\t\t'better-related',\n\t\t\tplugins_url( basename( $this->plugin_dir ) . '/css/admin.css' ),\n\t\t\tnull,\n\t\t\t'0.0.1'\n\t\t);\n\t\twp_enqueue_style( 'better-related' );\n\t}", "title": "" }, { "docid": "114cab9d5063e015f7aad7f03e486c13", "score": "0.5434945", "text": "function green_compile_less($options) {\n\t\trequire_once( green_get_file_dir('lib/less/Less.php') );\n\t\t$parser = new Less_Parser( array( \n\t\t\t'compress' => green_get_theme_option('debug_mode')=='no'\n\t\t) );\n\t\n\t\tlist($less_vars, $main_styles) = green_prepare_less($options);\n\t\t\n\t\t// Collect .less files in parent and child themes\n\t\t$theme_dir = get_template_directory();\n\t\t$list = green_collect_files($theme_dir, 'less');\n\t\t$child_dir = get_stylesheet_directory();\n\t\tif ($theme_dir != $child_dir) $list = array_merge($list, green_collect_files($child_dir, 'less'));\n\t\t\n\t\t// Prepare separate array with less utils (not compile it alone - only with main files)\n\t\t$utils = array();\n\t\t$utils_time = 0;\n\t\tif (count($list) > 0) {\n\t\t\tforeach($list as $k=>$file) {\n\t\t\t\t$fname = basename($file);\n\t\t\t\tif ($fname[0]=='_') {\n\t\t\t\t\t$utils[] = $file;\n\t\t\t\t\t$list[$k] = '';\n\t\t\t\t\t$tmp = filemtime($file);\n\t\t\t\t\tif ($utils_time < $tmp) $utils_time = $tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Complile all .less files\n\t\tif (count($list) > 0) {\n\t\t\tforeach($list as $file) {\n\t\t\t\tif (empty($file)) continue;\n\t\t\t\t// Check if time of .css file after .less - skip current .less\n\t\t\t\t$file_css = substr_replace($file , 'css', strrpos($file , '.') + 1);\n\t\t\t\t$css_time = filemtime($file_css);\n\t\t\t\tif (file_exists($file_css) && $css_time >= filemtime($file) && ($utils_time==0 || $css_time > $utils_time)) continue;\n\t\t\t\t// Compile current .less file\n\t\t\t\ttry {\n\t\t\t\t\t// Parse main file\n\t\t\t\t\t$parser->parseFile( $file, '');\n\t\t\t\t\t// Parse less utils\n\t\t\t\t\tif (count($utils) > 0) {\n\t\t\t\t\t\tforeach($utils as $utility) {\n\t\t\t\t\t\t\t$parser->parseFile( $utility, '');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Parse less vars (from Theme Options)\n\t\t\t\t\t$parser->parse($less_vars);\n\t\t\t\t\t// Add styles to the theme stylesheet\n\t\t\t\t\tif ($file == $theme_dir . '/style.less') {\n\t\t\t\t\t\t$parser->parse($main_styles);\n\t\t\t\t\t}\n\t\t\t\t\t$css = $parser->getCss();\n\t\t\t\t\t$parser->Reset();\n\t\t\t\t\t// If it main theme style - append CSS after header comments\n\t\t\t\t\tif ($file == $theme_dir . '/style.less') {\n\t\t\t\t\t\t// Append to the main Theme Style CSS\n\t\t\t\t\t\t$theme_css = green_fgc( get_template_directory() . '/style.css' );\n\t\t\t\t\t\t$css = green_substr($theme_css, 0, green_strpos($theme_css, '*/')+2) . \"\\n\\n\" . $css;\n\t\t\t\t\t}\n\t\t\t\t\t// Save compiled CSS\n\t\t\t\t\tgreen_fpc( substr_replace($file , 'css', strrpos($file , '.') + 1), $css);\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\tif (green_get_theme_option('debug_mode')=='yes') dfl($e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dc3bb42796b1c47ce5bc681c944c4a34", "score": "0.5432758", "text": "public function minify(string $filename, string $outputFilename, bool $createGzip = FALSE) : string\n {\n $filesToMerge = [];\n\t\t\n // temp fix as sass compiler compiles and minifies aleady\n foreach (Configure::read('CakeMinify.Stylesheets.'.$filename) as $filename) {\n $filePath = sprintf('%s%s', $this->baseDir, $filename);\n \n if (!file_exists($filePath)) {\n $filePath = sprintf('%s%s%s', WWW_ROOT, Configure::read('App.cssBaseUrl'), $filename);\n if (!file_exists($filePath)) {\n throw new Exception(\"The file {$filePath} could not be found. Run sass compiler again?\");\n continue; \n } \n }\n \n $filesToMerge[] = $filePath;\n }\n \n if (empty($filesToMerge)) {\n throw new Exception(\"The file {$filePath} could not be found. Run sass compiler again?\");\n }\n \n // cssDir\n\t\t$compressor = new Minifier();\n \n $success = TRUE;\n $timestamp = time();\n\n $contents = Helper::getConcatenatedContentOfFiles($filesToMerge);\n $output_css = $compressor->run($contents);\n \n $newFilename = sprintf('%s%s.css', $outputFilename, $timestamp);\n $newFilePath = sprintf('%s%s', $this->baseDir, $newFilename);\n\n // compress, save and gzip\n $success = $success && Helper::createFile($newFilePath, $output_css);\t\n if ($createGzip) {\n $success = $success && Helper::createGzipFile($newFilePath, $output_css);\n }\n\n if (!$success) {\n throw new Exception(\"Failed creating a minified CSS version {$newFilePath}\");\n }\n \n return $newFilename;\n\t}", "title": "" }, { "docid": "4e3282f9dc24b4b893f3af31fccc1b12", "score": "0.543197", "text": "public function getMungedFiles() {\n if ( $this->options['blacklist'] && $this->isBlacklisted() ) {\n // Blacklisted browsers do not get any CSS.\n return array();\n }\n $output_files = array();\n foreach( $this->files as $filename => $media ) {\n $ua = Useragent::current();\n $real_filename = $this->getRealFilename($filename);\n if ( ! $real_filename || ! file_exists($real_filename) ) continue; // File doesn't exist!\n $cache_filename = $this->options['cache_dir']\n . '/'\n . md5(serialize($this->options))\n . str_replace('/','_',$filename)\n . ( $this->options['sniffer'] ? '.' . $ua->browser_short . round($ua->version*10)/10 . $ua->platform_short : '' )\n . '.css';\n $output_files[$cache_filename] = $media;\n if ( $this->options['cache'] && file_exists($cache_filename) \n && filemtime($cache_filename) > filemtime($real_filename) ) {\n // File is cached, no need to regenerate\n continue; \n }\n $css = file_get_contents($real_filename);\n\n // Rewrite all URIs as absolute - also enforces double quotes for url()\n require_once( dirname(__FILE__).'/cssmin/UriRewriter.php' );\n $rewriter = new Minify_CSS_UriRewriter();\n $css = $rewriter->rewrite( $css, dirname($real_filename) );\n\n // SASS\n if ( $this->options['sass'] ) {\n // Only parse .scss files\n if ( substr(strrchr($filename, '.'), 1) == 'scss' ) {\n require_once( dirname(__FILE__).'/phpsass/sass/SassParser.php' );\n $sass = new SassParser($this->getSassOpts($filename));\n // Run CSS through the SASS parser\n $css = $sass->toCss($css, false); \n }\n }\n // Sniffer\n if ( $this->options['sniffer'] ) {\n require_once( dirname(__FILE__).'/sniffer/Sniffer.php' );\n $sniffer = new Sniffer($this->getSnifferOpts());\n $sniffer->loadString($css, $real_filename);\n $css = $sniffer->toString();\n }\n // Minify\n if ( $this->options['minify'] ) {\n require_once( dirname(__FILE__).'/cssmin/CSS.php' );\n $m = new Minify_CSS();\n $css = $m->minify( $css, $this->getMinifyOpts() );\n }\n // Write file\n if ( ! $this->options['combine'] ) {\n $css = $this->file_header($media, $filename) . $css;\n }\n file_put_contents($cache_filename, $css);\n }\n if ( ! $this->options['combine'] ) {\n return $output_files;\n }\n // Combine files - retain media types\n $combined = array();\n foreach( $output_files as $filename => $media ) {\n if ( ! isset($combined[$media]) ) $combined[$media] = array();\n $combined[$media][] = $filename;\n }\n $output_files = array();\n foreach( $combined as $media => $files ) {\n $latest_modification_time = false;\n foreach( $files as $file ) {\n $latest_modification_time = max(filemtime($file), $latest_modification_time);\n }\n if ( $this->options['combined_filename'] ) {\n $cache_filename = $this->options['cache_dir']\n . '/'\n . ( $this->options['sniffer'] ? $ua->browser_short . round($ua->version*10)/10 . $ua->platform_short : '' ).'_'\n . basename($this->options['combined_filename']);\n } else {\n $cache_filename = $this->options['cache_dir']\n . '/'\n . 'combined_' \n . ( $this->options['sniffer'] ? $ua->browser_short . round($ua->version*10)/10 . $ua->platform_short : '' ).'_'\n . md5(implode('-',$files)).'.css'; \n }\n $output_files[$cache_filename] = $media;\n if ( $this->options['cache'] \n && file_exists($cache_filename) && filemtime($cache_filename) > $latest_modification_time ) {\n continue; // This file is cached\n }\n // Cache combined file\n $fh = fopen($cache_filename, 'w');\n fwrite($fh, $this->file_header($media, $files));\n foreach( $files as $file ) {\n fwrite($fh, file_get_contents($file).\"\\n\");\n }\n fclose($fh);\n }\n return $output_files;\n }", "title": "" }, { "docid": "e389278919098fdef871d326258b9b34", "score": "0.5417259", "text": "function generate_owl_style()\n { \n $scss_dir = get_template_directory() . '/assets/scss/owlcarousel/';\n $css_dir = get_template_directory() . '/assets/libs/owl/';\n\n $this->scssc = new \\Leafo\\ScssPhp\\Compiler();\n $this->scssc->setImportPaths( $scss_dir );\n\n $css_file = $css_dir . 'owl.carousel.css';\n $css_file_min = $css_dir . 'owl.carousel.min.css';\n $this->scssc->setFormatter( 'Leafo\\ScssPhp\\Formatter\\Crunched' );\n \n $this->redux->filesystem->execute( 'put_contents', $css_file, array(\n 'content' => $this->scssc->compile( '@'.'import \"owl.carousel.scss\"' )\n ) );\n\n $this->redux->filesystem->execute( 'put_contents', $css_file_min, array(\n 'content' => $this->scssc->compile( '@'.'import \"owl.carousel.scss\"' )\n ) );\n }", "title": "" }, { "docid": "ca576d60ba324ae3556ab2e49df4fa9b", "score": "0.54080886", "text": "function wfc_build_css_string( $minified = true ) {\n\n\t$css = '';\n\n $fallback_font = get_theme_mod( 'fallback_font', 'Arial, Helvetica Neue, Helvetica, sans-serif' );\n\n /* Body */\n\t$base_font = get_theme_mod( 'base_font', '' );\n\t$text_color = get_theme_mod( 'text_color', '#212529' );\n\n if ( ! empty( $base_font ) || ! empty( $text_color ) ) {\n\t\t$css .= 'body {';\n\t\t$css .= ! empty( $base_font ) ? sprintf( 'font-family: \\'%s\\', %s;', $base_font, $fallback_font ) : '';\n\t\t$css .= ! empty( $text_color ) ? sprintf( 'color: %s;', $text_color ) : '';\n\t\t$css .= '}';\n }\n\n /* Heading */\n $heading_font = get_theme_mod( 'heading_font', '' );\n\n if ( ! empty( $heading_font ) ) {\n \t$css .= 'h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {';\n \t$css .= sprintf( 'font-family: \\'%s\\', %s;', $heading_font, $fallback_font );\n \t$css .= '}';\n }\n\n /* Button and Input */\n $button_input_font = get_theme_mod( 'button_input_font', '' );\n\n if ( ! empty( $button_input_font ) ) {\n \t$css .= 'button, input, select, textarea {';\n \t$css .= sprintf( 'font-family: \\'%s\\', %s;', $button_input_font, $fallback_font );\n \t$css .= '}';\n }\n\n /* Button colors */\n $button_color_primary = get_theme_mod( 'button_color_primary', '#007bff' );\n $button_color_secondary = get_theme_mod( 'button_color_secondary', '#6c757d' );\n $button_color_tertiary = get_theme_mod( 'button_color_tertiary', '#28a745' );\n\n /* Button Primary */\n if ( ! empty( $button_color_primary ) ) {\n \t$css .= '.btn-primary {';\n \t$css .= sprintf( 'background-color: %s;', $button_color_primary );\n \t$css .= '}';\n\n \t$css .= '.btn-outline-primary {';\n \t$css .= sprintf( 'color: %s;', $button_color_primary );\n \t$css .= sprintf( 'border-color: %s;', $button_color_primary );\n \t$css .= '}';\n }\n\n /* Button Secondary */\n if ( ! empty( $button_color_secondary ) ) {\n \t$css .= '.btn-secondary {';\n \t$css .= sprintf( 'background-color: %s;', $button_color_secondary );\n \t$css .= '}';\n\n \t$css .= '.btn-outline-secondary {';\n \t$css .= sprintf( 'color: %s;', $button_color_secondary );\n \t$css .= sprintf( 'border-color: %s;', $button_color_secondary );\n \t$css .= '}';\n }\n\n /* Button Tertiary */\n if ( ! empty( $button_color_tertiary ) ) {\n \t$css .= '.btn-tertiary {';\n \t$css .= sprintf( 'background-color: %s;', $button_color_tertiary );\n \t$css .= '}';\n\n \t$css .= '.btn-outline-tertiary {';\n \t$css .= sprintf( 'color: %s;', $button_color_tertiary );\n \t$css .= sprintf( 'border-color: %s;', $button_color_tertiary );\n \t$css .= '}';\n }\n\n /* Header */\n\t$header_background_color = get_theme_mod( 'header_background_color', '#007bff' );\n\t$header_text_color = get_theme_mod( 'header_text_color', '#ffffff' );\n\n\tif ( ! empty( $header_background_color ) ) {\n\t\t$css .= '.site-header {';\n\t\t$css .= sprintf( 'background-color: %s;', $header_background_color );\n\t\t$css .= '}';\n\t}\n\n\tif ( ! empty( $header_text_color ) ) {\n\t\t$css .= '.site-header, .site-header * {';\n\t\t$css .= sprintf( 'color: %s;', $header_text_color );\n\t\t$css .= '}';\n\t}\n\n /* Color Pallete helper classes */\n\t$color_count = get_theme_mod( 'color_count', 8 );\n\n\tfor ( $i = 1; $i < 10; $i++ ) { \n\t\t$color = get_theme_mod( 'color_palette_' . $i, '' );\n\n\t\tif ( ! empty( $color ) ) {\n\t\t\t$css .= sprintf( '.text%1$d, .htext%1$d:hover {', $i );\n\t\t\t$css .= sprintf( 'color: %s !important;', $color );\n\t\t\t$css .= '}';\n\n\t\t\t$css .= sprintf( '.bg%1$d, .hbg%1$d:hover {', $i );\n\t\t\t$css .= sprintf( 'background-color: %s !important;', $color );\n\t\t\t$css .= '}';\n\n\t\t\t$css .= sprintf( '.border%1$d, .hborder%1$d:hover {', $i );\n\t\t\t$css .= sprintf( 'border-color: %s !important;', $color );\n\t\t\t$css .= '}';\n\t\t}\n\t}\n\n\t/* Links */\n\t$link_color = get_theme_mod( 'link_color', '#007bff' );\n\n\tif ( ! empty( $link_color ) ) {\n\t\t$css .= sprintf( 'a {' );\n\t\t$css .= sprintf( 'color: %s;', $link_color );\n\t\t$css .= '}';\n\t}\n\n\t/**\n\t * Filter `wfc_dynamic_css`.\n\t * \n\t * Filter used to extend the theme dynamic css styles \n\t * when the customizer settings has been saved.\n\t * \n\t * @param String $css The theme dynamic css styles.\n\t */\n\t$css = apply_filters( 'wfc_dynamic_css', $css );\n\n\tif ( $minified ) {\n\t\t$css = preg_replace( '/\\s\\s+/', '', $css );\n\t\t$css = preg_replace( '/\\s\\{+/', '{', $css );\n\t\t$css = preg_replace( '/\\:\\s+/', ':', $css );\n\t}\n\n\treturn $css;\n\n}", "title": "" }, { "docid": "58ce22f73310850c515a792f9d9b7ad4", "score": "0.54048693", "text": "function generate_editor_style()\n { \n $scss_dir = get_template_directory() . '/assets/scss/';\n $css_dir = get_template_directory() . '/assets/admin/css/';\n\n $this->scssc = new \\Leafo\\ScssPhp\\Compiler();\n $this->scssc->setImportPaths( $scss_dir );\n\n $editor_file = $css_dir . 'editor.css';\n $admin_file = $css_dir . 'admin.css';\n $this->scssc->setFormatter( 'Leafo\\ScssPhp\\Formatter\\Crunched' );\n \n $this->redux->filesystem->execute( 'put_contents', $editor_file, array(\n 'content' => $this->scssc->compile( '@'.'import \"editor.scss\"' )\n ) );\n $this->redux->filesystem->execute( 'put_contents', $admin_file, array(\n 'content' => $this->scssc->compile( '@'.'import \"admin.scss\"' )\n ) );\n }", "title": "" }, { "docid": "322c67ec5d2a6757682382cf6fd3cd47", "score": "0.5404778", "text": "protected function constructCSS () {\n\t\t$output =\n\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"/ViewItems/CSS/UIFrame.css\">';\n\t\t\n\t\treturn ($output);\n\t}", "title": "" }, { "docid": "e6cc28152e664611e44fd2e30f8d5f69", "score": "0.5403706", "text": "public function minifyimage(){}", "title": "" }, { "docid": "73732da728dcf750ad8866370f209481", "score": "0.5391581", "text": "function fabric_auto_enqueue_css() {\n\n\t$styles = fabric_find_assets( 'css', FABRIC_CSS_ASSETS_PUBLIC_DIR, FABRIC_CSS_ASSETS_DIR );\n\n\tif( !$styles )\n\t\treturn;\n\n\tforeach( $styles as $style )\n\t{\n\t\tif( $style['in_footer'] && !did_action( 'wp_print_styles' ) )\n\t\t\tcontinue;\n\t\twp_enqueue_style( $style['handle'], $style['src'], $style['deps'], $style['ver'] );\n\t}\n}", "title": "" }, { "docid": "644288a11686d7fb7941c1196895942e", "score": "0.5389381", "text": "public function admin_css() {\n\t\t\t$ret = require('css/module-css.inc');\n\t\t\treturn $ret;\n\t\t}", "title": "" }, { "docid": "0675bc490b2575bf9a9872d0d32d96b8", "score": "0.53889734", "text": "function defenestrate_css_js() {\n\n\tif ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {\n\n\t\twp_enqueue_style( 'src-font-sourcesanspro', get_stylesheet_directory_uri(). '/src_css/sourcesanspro.css' );\n\t\twp_enqueue_style( 'src-font-anticslab', get_stylesheet_directory_uri(). '/src_css/anticslab.css' );\n\t\twp_enqueue_style( 'src-font-genericons', get_stylesheet_directory_uri(). '/src_css/genericons.css' );\n\t\twp_enqueue_style( 'src-font-sourcecodepro', get_stylesheet_directory_uri(). '/src_css/sourcecodepro.css' );\n\t\twp_enqueue_style( 'src-prism', get_stylesheet_directory_uri(). '/src_css/prism.css' );\n\t\twp_enqueue_style( 'src-defenestrate', get_stylesheet_directory_uri(). '/src_css/style.css', array( 'src-font-sourcesanspro', 'src-font-anticslab', 'src-font-genericons', 'src-font-sourcecodepro' ) );\n\n\t\twp_enqueue_script( 'src-prism', get_stylesheet_directory_uri(). '/src_js/prism.js', array( 'jquery' ), 1, true );\n\t\twp_enqueue_script( 'src-defenestrate', get_stylesheet_directory_uri(). '/src_js/functions.js', array( 'jquery' ), 1, true );\n\n\t} else {\n\t\t// concat's and minify'd with grunt\n\t\twp_enqueue_style( 'defenestrate', get_stylesheet_directory_uri() .'/css/defenestrate.min.css', array(), '01' );\n\t\twp_enqueue_script( 'defenestrate', get_stylesheet_directory_uri() .'/js/defenestrate.min.js', array( 'jquery' ), '01', true );\n\n\t}\n\n\tif ( is_single() ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n}", "title": "" }, { "docid": "f85586b856fa6094d74904d7fce48f88", "score": "0.53887993", "text": "public function disableConcatenateCss()\n {\n $this->concatenateCss = false;\n }", "title": "" }, { "docid": "d71eded1bc95974ccd8262daec6e0caf", "score": "0.53853023", "text": "public function format(): self\n {\n $this->parseCss = true;\n $this->minify = false;\n return $this;\n }", "title": "" }, { "docid": "463dfbcddcc6841bb3ff2f3b17c8771b", "score": "0.5374636", "text": "function juggle_filetree_css() {\n //add our css\n wp_enqueue_style('juggle_filetree_css', plugins_url('/css/juggle-filetree.css', __FILE__));\n /*\n * Swap this for your theme-level style by adding this to your theme's function.php\n * wp_dequeue_style('juggle_filetree_css');\n * wp_enqueue_style('juggle_filetree_css', get_template_directory_uri() . '/local.css' );\n */\n}", "title": "" }, { "docid": "84715abcac3b4bbf171f1cb88ddf98aa", "score": "0.5372046", "text": "public function compileStyles()\n {\n $styles = $this->prepareStylesForProcessing();\n\n $prefix = is_null($this->charset) ? '' : $this->charset;\n\n return $prefix . join(\n '',\n array_map(\n function ($styleGroup) {\n $media = key($styleGroup);\n $rules = reset($styleGroup);\n\n return $this->parseMediaToString($media, $rules);\n },\n $styles\n )\n );\n }", "title": "" }, { "docid": "591b5fcaafcbd6a66db54b2838fc3a47", "score": "0.53656733", "text": "function PortaMx_loadCSS()\n{\n\tglobal $context, $modSettings;\n\n\tif(!empty($context['pmx']['customCSS']))\n\t{\n\t\t$tmp = PortaMx_compressCSS($context['pmx']['customCSS']);\n\t\tif(isset($context['pmx']['customCSS']) && !empty($context['pmx']['customCSS']))\n\t\t\techo '\n\t<style type=\"text/css\">'.\"\\n\\t\\t\". PortaMx_compressCSS($context['pmx']['customCSS']) .'\n\t</style>';\n\t}\n}", "title": "" }, { "docid": "68a047b892714ef8183aa9768c5d833a", "score": "0.53517145", "text": "private function returnAppCss() {\n $text = '';\n $files = scandir($this->p('app', 'assets/css'));\n if ($files !== false) {\n foreach ($files as $file) {\n $path = $this->p('app', 'assets/css/' . $file);\n if (is_file($path)) {\n $text .= $this->minifyCss(file_get_contents($path)) . PHP_EOL;\n }\n }\n }\n $response = new TextResponse(Http::OK, 'text/css', $text);\n $response->cache();\n $this->m->Routing->respond($response);\n }", "title": "" }, { "docid": "9970b39d84d5868141718880db0fe011", "score": "0.5348159", "text": "function ttfmake_builder_css() {\n\tif ( ttfmake_is_builder_page() ) {\n\t\t$sections = ttfmake_get_section_data( get_the_ID() );\n\n\t\tif ( ! empty( $sections ) ) {\n\t\t\tforeach ( $sections as $id => $data ) {\n\t\t\t\tif ( isset( $data['section-type'] ) ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Allow section-specific CSS rules to be added to the document head of a Builder page.\n\t\t\t\t\t *\n\t\t\t\t\t * @since 1.4.5\n\t\t\t\t\t *\n\t\t\t\t\t * @param array $data The Builder section's data.\n\t\t\t\t\t * @param int $id The ID of the Builder section.\n\t\t\t\t\t */\n\t\t\t\t\tdo_action( 'make_builder_' . $data['section-type'] . '_css', $data, $id );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "459dd5ace0e64a2faeba75d29746518c", "score": "0.53433305", "text": "private function _generateCss(){ \r\n\t\t$total = $this->_totalSize();\r\n\t\t$top = $total['height']; \r\n\t\t$css = '.'.$this->cssSpriteClass.'{background-image:url(sprite.png);}'.\"\\n\";\r\n\t\t// for 16x16 icons\r\n\t\t$css .= '.'.$this->cssIconClass.'{display:inline;overflow:hidden;padding-left:18px;background-repeat:no-repeat;background-image:url(sprite.png);}'.\"\\n\";\r\n\t\t\r\n\t\tforeach($this->_images as $image) \r\n\t\t{ \r\n\t\t\t$css .= '.'.$image['name'].'{';\r\n\t\t\t$css .= 'background-position:'.($image['width'] - $total['width']).'px '.($top - $total['height']).'px;'; \r\n\t\t\t$css .= 'width:'.$image['width'].'px;';\r\n\t\t\t$css .= 'height:'.$image['height'].'px;';\r\n\t\t\t$css .= '}'.\"\\n\";\r\n\t\t\t$top -= $image['height']; \r\n\t\t} \r\n\t\t$fp = $this->getPublishedAssetsPath().DIRECTORY_SEPARATOR.'sprite.css';\r\n\t\tfile_put_contents($fp, $css);\r\n\t}", "title": "" }, { "docid": "c3bb3fda6c3e099b6b494983214778a9", "score": "0.5338596", "text": "protected function compileAssets()\n {\n $this->runCommand('npm update');\n $this->runCommand('npm run dev');\n }", "title": "" }, { "docid": "34bf30212e986c835378c763ee503ec8", "score": "0.53368247", "text": "function css($files, $options = array()) {\n\t\treturn $this->PackerCss->add($files, $options);\n\t}", "title": "" }, { "docid": "590107a1b24ad7300bcc5999d428e221", "score": "0.53337747", "text": "public function css() {\n\t\twp_register_style(\n\t\t\t'better-related-frontend',\n\t\t\tplugins_url( basename( $this->plugin_dir ) . '/css/better-related.css' ),\n\t\t\tnull,\n\t\t\t'0.3.5'\n\t\t);\n\t\twp_enqueue_style( 'better-related-frontend' );\n\t}", "title": "" }, { "docid": "84a73463c1b153d0efd202ea4f691d93", "score": "0.5325278", "text": "public function allcss() {\n\t\t$cssPath = APPLICATION_PATH . \"/../public/css/\";\n\t\t$files = scandir ( $cssPath );\n\t\tsort ( $files );\n\t\t$css = '';\n\t\tforeach ( $files as $f ) {\n\t\t\tif (substr ( $f, - 4 ) != '.css') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$css .= <<<EOD\n<link rel=\"stylesheet\" href=\"{$this->view->baseUrl()}/css/$f\" type=\"text/css\">\nEOD;\n\t\t}\n\t\treturn $css;\n\t}", "title": "" }, { "docid": "70d7e2a758fac242a5bc1a6de30ec30b", "score": "0.5324616", "text": "function insert_getCSSFiles() {\n\n global $CSS_VERSION, $cacheObj, $smarty;\n\n foreach($smarty->styles as $media => $browsers) {\n foreach($browsers as $browser => $versions) {\n if($browser != 'all') {\n foreach($versions as $version => $files) {\n\n $cachefile = [];\n\n $cachefile[] = $cacheObj->cssFName($browser, $version);\n $cachefile[] = $CSS_VERSION;\n $cachefile = DOC_ROOT.REL_ROOT.UPLOAD.'smarty/public/cache/'.implode('.', $cachefile).'.css';\n\n $cachefile = str_replace(DOC_ROOT, '', $cachefile);\n\n preg_match_all('/([\\w]*)([\\d]+)/', $version, $matches);\n $if = '<!--[if ';\n if(isset($matches['1'][0])) {\n $if .= $matches['1'][0];\n }\n $if .= strtoupper($browser).' '.$matches[2][0].']>';\n $if .= '<link rel=\"stylesheet\" href=\"'.$cachefile.'\" type=\"text/css\" media=\"'.$media.'\" />';\n $if .= '<![endif]-->';\n $cssTag[] = $if;\n\n }\n } else {\n\n $cachefile = [];\n $cachefile[] = $cacheObj->cssFName();\n $cachefile[] = $CSS_VERSION;\n $cachefile = DOC_ROOT.REL_ROOT.UPLOAD.'smarty/public/cache/'.implode('.', $cachefile).'.css';\n $cachefile = str_replace(DOC_ROOT, '', $cachefile);\n\n $cssTag[] = '<link rel=\"stylesheet\" href=\"'.$cachefile.'\" type=\"text/css\" media=\"'.$media.'\" />';\n\n }\n }\n }\n\n return \"\\n\".implode(\"\\n\", $cssTag).\"\\n\";\n}", "title": "" }, { "docid": "f4b849f13e56498a332a6efc3dfdc1a1", "score": "0.532079", "text": "protected function compress(View $view)\r\n\t{\r\n\t\t// Compiling js files into one\r\n\t\tif ($view->jsFiles && $this->jsFileCompile && !in_array(Yii::$app->id, $this->excludeApps)) {\r\n\t\t\t// Excluding specified js files\r\n\t\t\tforeach ($view->jsFiles as $jsFile => $v) {\r\n\t\t\t\tif (in_array(basename($jsFile), $this->excludeFiles)){\r\n\t\t\t\t\tunset($view->jsFiles[$jsFile]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tYii::beginProfile('Compress JS files');\r\n\t\t\tforeach ($view->jsFiles as $pos => $files) {\r\n\t\t\t\tif ($files) {\r\n\t\t\t\t\t$view->jsFiles[$pos] = $this->compileJsFiles($files);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tYii::endProfile('Compress JS files');\r\n\t\t}\r\n\r\n\t\t// Compiling js code on the page\r\n\t\tif ($view->js && $this->jsMinifyHtml) {\r\n\t\t\tYii::beginProfile('Compress JS code');\r\n\t\t\tforeach ($view->js as $pos => $parts) {\r\n\t\t\t\tif ($parts) {\r\n\t\t\t\t\t$view->js[$pos] = $this->compressJs($parts);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tYii::endProfile('Compress JS code');\r\n\t\t}\r\n\r\n\t\t// Compiling css files into one\r\n\t\tif ($view->cssFiles && $this->cssFileCompile && !in_array(Yii::$app->id, $this->excludeApps)) {\r\n\t\t\t// Excluding specified css files\r\n\t\t\tforeach ($view->cssFiles as $cssFile => $v) {\r\n\t\t\t\tif (in_array(basename($cssFile), $this->excludeFiles)){\r\n\t\t\t\t\tunset($view->cssFiles[$cssFile]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tYii::beginProfile('Compress CSS files');\r\n\t\t\t$view->cssFiles = $this->compileCssFiles($view->cssFiles);\r\n\t\t\tYii::endProfile('Compress CSS files');\r\n\t\t}\r\n\r\n\t\t// Compiling css code on the page\r\n\t\tif ($view->css && $this->cssMinifyHtml) {\r\n\t\t\tYii::beginProfile('Compress CSS code');\r\n\t\t\t$view->css = $this->compressCss($view->css);\r\n\t\t\tYii::endProfile('Compress CSS code');\r\n\t\t}\r\n\t\t\r\n\t\t// Move CSS down\r\n\t\tif ($view->cssFiles && $this->cssFileBottom)\r\n\t\t{\r\n\t\t\tYii::beginProfile('Moving CSS files bottom');\r\n\t\t\tif ($this->cssFileBottomLoadOnJs)\r\n\t\t\t{\r\n\t\t\t\tYii::beginProfile('Load CSS on JS');\r\n\t\t\t\t$cssFilesString = implode('', $view->cssFiles);\r\n\t\t\t\t$view->cssFiles = [];\r\n\t\t\t\t$script = Html::script(new JsExpression(<<<JS\r\n document.write('{$cssFilesString}');\r\nJS\r\n\t\t\t\t));\r\n\t\t\t\tif (ArrayHelper::getValue($view->jsFiles, View::POS_END)){\r\n\t\t\t\t\t$view->jsFiles[View::POS_END] = ArrayHelper::merge($view->jsFiles[View::POS_END], [$script]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$view->jsFiles[View::POS_END][] = $script;\r\n\t\t\t\t}\r\n\t\t\t\tYii::endProfile('Load CSS on JS');\r\n\t\t\t} else {\r\n\t\t\t\tif (ArrayHelper::getValue($view->jsFiles, View::POS_END)){\r\n\t\t\t\t\t$view->jsFiles[View::POS_END] = ArrayHelper::merge($view->cssFiles, $view->jsFiles[View::POS_END]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$view->jsFiles[View::POS_END] = $view->cssFiles;\r\n\t\t\t\t}\r\n\t\t\t\t$view->cssFiles = [];\r\n\t\t\t}\r\n\t\t\tYii::endProfile('Moving CSS files bottom');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c60cec1271c50f9590e5e8b151619321", "score": "0.53177035", "text": "protected function inline_css()\n {\n ob_start();\n $primary_color = sunix_get_theme_opt( 'primary_color', apply_filters('sunix_primary_color', sunix_configs('primary_color')) );\n $accent_color = sunix_get_theme_opt( 'accent_color', apply_filters('sunix_accent_color', sunix_configs('accent_color')) );\n // Menu links color for options page\n //--------------------------------------------------\n $body_padding = sunix_get_page_opt( 'site_bordered_w', ['padding-top' => '', 'padding-right' => '', 'padding-bottom' => '','padding-left' => ''] );\n if(!empty( $body_padding['padding-top'])){\n\n printf(\n '.site-bordered{\n padding-top: %s;\n }',\n esc_attr($body_padding['padding-top'])\n );\n }\n if(!empty( $body_padding['padding-right'])){\n\n printf(\n '.site-bordered{\n padding-right: %s;\n }',\n esc_attr($body_padding['padding-right'])\n );\n }\n if(!empty( $body_padding['padding-bottom'])){\n\n printf(\n '.site-bordered{\n padding-bottom: %s;\n }',\n esc_attr($body_padding['padding-bottom'])\n );\n }\n if(!empty( $body_padding['padding-left'])){\n\n printf(\n '.site-bordered{\n padding-left: %s;\n }',\n esc_attr($body_padding['padding-left'])\n );\n }\n $header_link_colors = sunix_get_page_opt( 'header_link_colors', ['regular' => '', 'hover' => '', 'active' => ''] );\n // menu regular\n if(!empty($header_link_colors['regular'])){\n printf(\n '.menu-default > li > a,\n .header-default a{\n color: %s!important;\n }',\n esc_attr($header_link_colors['regular'])\n );\n printf(\n '.header-default a:hover{\n color: %s!important;\n }',\n esc_attr($header_link_colors['hover'])\n );\n printf(\n '.header-default a:active,\n .header-default a.active{\n color: %s!important;\n }',\n esc_attr($header_link_colors['active'])\n );\n // Mobile Menu Icon\n printf(\n '.header-default .btn-nav-mobile:before, \n .header-default .btn-nav-mobile:after, \n .header-default .btn-nav-mobile span{\n background-color: %s!important;\n }',\n esc_attr($header_link_colors['regular'])\n );\n printf(\n '.header-default .btn-nav-mobile:hover:before, \n .header-default .btn-nav-mobile:hover:after, \n .header-default .btn-nav-mobile:hover span{\n background-color: %s!important;\n }',\n esc_attr($header_link_colors['hover'])\n );\n }\n // menu hover\n if(!empty($header_link_colors['hover'])){\n printf(\n '.menu-default > li:hover > a,\n .menu-default > li:focus > a,\n .menu-default a:hover,\n .menu-default a:focus {\n color: %s!important;\n }',\n esc_attr($header_link_colors['hover'])\n );\n printf(\n '.menu-default > li:hover > a:after,\n .menu-default > li:focus > a:after {\n background-color: %s!important;\n }',\n esc_attr($header_link_colors['hover'])\n );\n }\n // menu active\n if(!empty($header_link_colors['active'])){\n printf(\n '.menu-default li.current_page_item > a,\n .menu-default li.current-menu-item > a,\n .menu-default li.current_page_ancestor > a,\n .menu-default li.current-menu-ancestor > a,\n .menu-default a:active {\n color: %s!important;\n }',\n esc_attr($header_link_colors['active'])\n );\n printf(\n '.menu-default li.current_page_item > a:after,\n .menu-default li.current-menu-item > a:after,\n .menu-default li.current_page_ancestor > a:after,\n .menu-default li.current-menu-ancestor > a:after {\n background-color: %s!important;\n }',\n esc_attr($header_link_colors['active'])\n );\n }\n // OnTop Menu\n $ontop_link_colors = sunix_get_page_opt( 'ontop_link_colors', ['regular' => '', 'hover' => '', 'active' => ''] );\n // menu regular\n if(!empty($ontop_link_colors['regular'])){\n printf(\n '.menu-ontop > li > a,.header-ontop .btn-nav-mobile{\n color: %s!important;\n }',\n esc_attr($ontop_link_colors['regular'])\n );\n printf(\n '.header-ontop .btn-nav-mobile:before, .header-ontop .btn-nav-mobile:after, .header-ontop .btn-nav-mobile span{\n background: %s!important;\n }',\n esc_attr($ontop_link_colors['regular'])\n );\n }\n // menu hover\n if(!empty($ontop_link_colors['hover'])){\n printf(\n '.menu-ontop > li:hover > a,\n .menu-ontop > li:focus > a,\n .menu-ontop a:hover,\n .header-ontop .btn-nav-mobile:hover,\n .menu-ontop a:focus {\n color: %s!important;\n }',\n esc_attr($ontop_link_colors['hover'])\n );\n printf(\n '.menu-ontop > li:hover > a:after,\n .menu-ontop > li:focus > a:after,\n .header-ontop .btn-nav-mobile:before, .header-ontop .btn-nav-mobile:after, .header-ontop .btn-nav-mobile span{\n background-color: %s!important;\n }',\n esc_attr($ontop_link_colors['hover'])\n );\n }\n // menu active\n if(!empty($ontop_link_colors['active'])){\n printf(\n '.menu-ontop li.current_page_item > a,\n .menu-ontop li.current-menu-item > a,\n .menu-ontop li.current_page_ancestor > a,\n .menu-ontop li.current-menu-ancestor > a,\n .menu-ontop a:active,\n .header-ontop .btn-nav-mobile.opened{\n color: %s!important;\n }',\n esc_attr($ontop_link_colors['active'])\n );\n printf(\n '.menu-ontop li.current_page_item > a:after,\n .menu-ontop li.current-menu-item > a:after,\n .menu-ontop li.current_page_ancestor > a:after,\n .menu-ontop li.current-menu-ancestor > a:after,\n .header-ontop .btn-nav-mobile:before, .header-ontop .btn-nav-mobile:after, .header-ontop .btn-nav-mobile span.opened{\n background-color: %s!important;\n }',\n esc_attr($ontop_link_colors['active'])\n );\n }\n /*header height*/\n $header_height = sunix_get_theme_opt('header_height', ['height' => apply_filters('sunix_header_height',sunix_configs('header_height'))] );\n $header_height_page = sunix_get_page_opt('header_height', ['height' => apply_filters('sunix_header_height',sunix_configs('header_height'))] );\n if ($header_height_page['height'] !== 'px'){\n $header_height = $header_height_page;\n }\n if (($header_height['height'] !== 'px') && $header_height['height'] !== ''){\n echo '@media (min-width: 1200px){';\n printf(\n '.red-header-menu > li > a{\n height: %s;\n }', esc_attr($header_height['height'])\n );\n echo '}';\n }\n /**\n * Header side menu \n *\n */\n $header_sidewidth = sunix_get_theme_opt('header_sidewidth', ['width' => ''] );\n $header_sidewidth_page = sunix_get_page_opt('header_sidewidth', ['width' => ''] );\n if($header_sidewidth_page['width'] !== 'px' && $header_sidewidth_page['width'] !== $header_sidewidth['width']){\n $header_sidewidth['width'] = $header_sidewidth_page['width'];\n }\n if('' !== $header_sidewidth['width'] && 'px' !== $header_sidewidth['width']){\n echo '@media (min-width: 1200px){';\n printf(\n 'body.header-3:not(.side-header-ontop){\n padding-%s: %s !important;\n }', sunix_align(), esc_attr($header_sidewidth['width'])\n );\n // Header side menu width\n printf(\n '.side-header{\n width: %s !important;\n }', esc_attr($header_sidewidth['width'])\n );\n // Fix loading position\n printf(\n 'body.header-3 #red-loading{\n margin-%s: calc(%s / -2) !important;\n }', sunix_align(), esc_attr($header_sidewidth['width'])\n );\n echo '}';\n }\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "b6f43dfe77148d1ac672ec58b57a26c4", "score": "0.53169554", "text": "public static function process(string $css, array $settings = []): string\n {\n //Load settings\n $settings = $settings + self::default_settings();\n\n // 1. Process the file with LESS \n if ($settings['less']) {\n $less = new Tinyfier_CSS_LESS();\n $css = $less->process($css, $settings);\n }\n\n // 2. Optimize, compress and add vendor prefixes\n $optimizer = new css_optimizer(\n [\n 'compress' => $settings['compress'],\n 'optimize' => $settings['optimize'],\n 'extra_optimize' => $settings['extra_optimize'],\n 'remove_ie_hacks' => false,\n 'prefixes' => $settings['prefixes'] ?? $settings['prefix'],\n ]\n );\n $css = $optimizer->process($css);\n\n return $css;\n }", "title": "" }, { "docid": "329cf0a44e2e826a6a40e8183df534cd", "score": "0.5312381", "text": "private function renderCssFiles()\n {\n ksort($this->stylesheets);\n return HTML::stylesheets($this->stylesheets);\n }", "title": "" }, { "docid": "0cef73b2327baf094c0dc271cd00cd09", "score": "0.5306985", "text": "public function cp_css_end()\n {\n\t\t$css = '';\n\n\t\t$hide_files_button = file_get_contents( PATH_THIRD . '/control_panel_tweaks/css/hide-files-button.css');\n\t\t$hide_developer_button = file_get_contents( PATH_THIRD . '/control_panel_tweaks/css/hide-developer-button.css');\n\t\t$hide_preview_button = file_get_contents( PATH_THIRD . '/control_panel_tweaks/css/hide-preview-button.css');\n\n //Hide navigation for non-Super Admins\n if (ee()->session->userdata('group_id') != 1) {\n $css .= $hide_files_button;\n $css .= $hide_developer_button;\n $css .= $hide_preview_button;\n }\n\n $user_css_location = ee()->config->item('control_panel_tweaks_user_css');\n\n if($user_css_location) {\n $user_css = file_get_contents($user_css_location);\n $css .= $user_css;\n }\n\n\t\t$other_css = [];\n\n\t\t//If another extension shares the same hook\n\t\tif (ee()->extensions->last_call !== false) {\n\t\t\t$other_css[] = ee()->extensions->last_call;\n\t\t}\n\n \treturn implode('', $other_css) . $css;\n }", "title": "" }, { "docid": "2e09e74483ac38d0354a7b155176a577", "score": "0.5302584", "text": "public function minifyimage()\n {\n }", "title": "" }, { "docid": "949027e2e985298ae7e6398513fe307c", "score": "0.5299838", "text": "protected function copyAndOptimizePhalconC()\n {\n $platforms = array_keys($this->settings);\n\n // Init generated content\n $generated = array();\n foreach ($platforms as $platform) {\n $generated[$platform] = '';\n }\n\n // Generate line by line\n $filePath = $this->sourceBuildDir . '/phalcon.c';\n foreach (file($filePath) as $line) {\n $this->filterLine($line, $generated);\n }\n\n // Output result\n foreach ($platforms as $platform) {\n file_put_contents($this->settings[$platform]['dir'] . '/phalcon.c', $generated[$platform]);\n }\n }", "title": "" }, { "docid": "6bd616201782e10b60ab8b4a7916c58d", "score": "0.5293201", "text": "function dog_files() {\n wp_enqueue_style( 'bootstrap', '//cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css');\n wp_enqueue_style('dog_styles', get_stylesheet_uri('/build/css/style.min.css'), NULL, microtime());\n wp_enqueue_style('fonts', \"https://fonts.googleapis.com/css2?family=Oswald&display=swap\");\n wp_enqueue_style('font-awesome', 'https://pro.fontawesome.com/releases/v5.10.0/css/all.css');\n\n wp_enqueue_script( 'bootstrap-js', '//cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.min.js', array('jquery'), true);\n}", "title": "" } ]
be3223a7d6eb942cfcdf1b2a27127d80
This hook disables the post queue for accounts registered with a trusted email address.
[ { "docid": "872921fa8655573c317ef88d66500ad3", "score": "0.6667896", "text": "function hook_trusted_users(&$hook)\n{\n\tglobal $config, $user;\n\n\t/**\n\t * Skip when the queue is disabled, or this is an administration\n\t * session so we don't break the ACP, chances are that administrators\n\t * have moderation permissions or more posts than required to post any way.\n\t */\n\tif ($config['enable_queue_trigger'] && !$user->data['session_admin'] && preg_match('#@example\\.com$#i', $user->data['user_email']))\n\t{\n\t\t$config['enable_queue_trigger'] = 0; // Disable the post queue for our trusted users\n\t}\n}", "title": "" } ]
[ { "docid": "f617b2725a177b5942d4c4423a87e6d8", "score": "0.5889793", "text": "function deactivate(){\n wp_clear_scheduled_hook('cp_email_notification');\n}", "title": "" }, { "docid": "735ba16702d66b69713e5b08be968346", "score": "0.5834569", "text": "function disableReceiver($uid, $bounce_type) {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "09cbbcca4457f2aab795f1be7bd25131", "score": "0.5797498", "text": "function edd_pup_clear_queue() {\n\n\tif ( ! wp_verify_nonce( $_REQUEST['nonce'], 'clear-queue-'.$_REQUEST['email'] ) ) {\n\t\techo 'noncefail';\n\t\texit;\n\t}\n\n\tglobal $wpdb;\n\n\t// Clear queue\n\tif ( $_POST['email'] == 'all' ) {\n\n\t\t// Build array of queued emails before clearing table\n\t\t$queueemails = edd_pup_queue_emails();\n\n\t\t// Build array of sent email data before clearing table\n\t\tforeach ( $queueemails as $email => $id ) {\n\t\t\t$recipients[$id] = edd_pup_check_queue( $id );\n\t\t}\n\n\t\t// Clear the database table\n\t\t$qr = $wpdb->query( \"TRUNCATE TABLE $wpdb->edd_pup_queue\" );\n\n\t} else {\n\n\t\t$recipients = edd_pup_check_queue( $_POST['email'] );\n\n\t\t// Delete the rows WHERE the specified email_id matches\n\t\t$qr = $wpdb->delete( \"$wpdb->edd_pup_queue\", array( 'email_id' => $_POST['email'] ), array( '%d' ) );\n\n\t}\n\n\t// If clear queue fails, bail out of function with error message, otherwise change post statuses\n\tif ( false === $qr ) {\n\t\twp_die( __( 'Error: could not complete database query.', 'edd-pup' ), __( 'Clear Queue Error', 'edd-pup' ) );\n\n\t} else {\n\n\t\tif ( !empty( $queueemails ) ) {\n\n\t\t\tforeach ( $queueemails as $email => $id ) {\n\t\t\t\t$post[] = wp_update_post( array( 'ID' => $id, 'post_status' => 'abandoned' ) );\n\t\t\t\tupdate_post_meta ( $id, '_edd_pup_recipients', $recipients[$id] );\n\t\t\t}\n\n\t\t} else if ( absint( $_POST['email'] ) != 0 ) {\n\n\t\t\t$post = wp_update_post( array( 'ID' => $_POST['email'], 'post_status' => 'abandoned' ) );\n\t\t\tupdate_post_meta ( $post, '_edd_pup_recipients', $recipients );\n\n\t\t} else {\n\n\t\t\twp_die( __( 'Error: Valid email ID not supplied.', 'edd-pup' ), __( 'Clear Queue Error', 'edd-pup' ) );\n\t\t}\n\t}\n\n\tdie();\n}", "title": "" }, { "docid": "76da53259f7f064d6e866de4bd0709bd", "score": "0.57923865", "text": "public function disablePostAuthentication()\n {\n $this->sessionStorage->user['twofactor_activated'] = false;\n }", "title": "" }, { "docid": "c8964d53fe6fdb65356755470c67d3f1", "score": "0.5707475", "text": "function edd_pup_ajax_end(){\n\tglobal $wpdb;\n\t$user = get_current_user_id();\n\n\tif ( !empty( $_POST['emailid'] ) && ( absint( $_POST['emailid'] ) != 0 ) ) {\n\t\t$email_id = $_POST['emailid'];\n\n\t} else {\n\t\t$email_id = get_transient( 'edd_pup_sending_email_'. $user );\n\t}\n\n\t// Refresh email ID transient\n\tset_transient( 'edd_pup_sending_email_'. $user, $email_id, 60);\n\n\t// Update email post status to publish\n\twp_publish_post( $email_id );\n\n\t// Clear queue for next send\n\t$wpdb->delete( \"$wpdb->edd_pup_queue\", array( 'email_id' => $email_id ), array( '%d' ) );\n\n\t// Flush remaining transients\n\tdelete_transient( 'edd_pup_sending_email_'. $user );\n\tdelete_transient( 'edd_pup_all_customers' );\n\tdelete_transient( 'edd_pup_subject' );\n\tdelete_transient( 'edd_pup_email_body_header' );\n\tdelete_transient( 'edd_pup_email_body_footer' );\n\tdelete_transient( 'edd_pup_from_name' );\n\n}", "title": "" }, { "docid": "ada7a53d513baac05e403864692fee67", "score": "0.56470853", "text": "public function execute( $queue ) {\n $user = User::find()->trashed()->id($this->userId)->one();\n\t\tYalumbaApiModule::getInstance()->api->disableYalumbaCustomer($user);\n\t}", "title": "" }, { "docid": "5be63ab58a515b8387661b2debf44a12", "score": "0.55448645", "text": "public function disableDeferredPostMode(): void\n\t{\n\t\t$this->deferredPostMode = false;\n\t}", "title": "" }, { "docid": "847a16de28c7b99a51b91835b548a0f1", "score": "0.5537953", "text": "public function queue_cleanup_personal_data() {\n\t\tself::$background_process->schedule_ended_subscription_anonymization();\n\t}", "title": "" }, { "docid": "ad6ffb124cf288b789a385ff433a4be8", "score": "0.5512647", "text": "function thistle_disable_admin_email_password_change_notification() {\n remove_action( 'after_password_reset', 'wp_password_change_notification' );\n }", "title": "" }, { "docid": "10ec7c081b6c64034969c36fbad15f2c", "score": "0.5451688", "text": "function urn_uuid_deactivate() {\n $these_posts = get_posts( array(\n 'offset' => 0,\n 'orderby' => 'rand',\n 'posts_per_page' => -1,\n 'post_type' => 'post' ));\n\n foreach ($these_posts as $postkey => $post) {\n wp_clear_scheduled_hook('urn_uuid_firstrunner', array( $post->ID, NULL, false));\n }\n register_deactivation_hook(__FILE__, 'urn_uuid_deactivate');\n }", "title": "" }, { "docid": "44609819e7272903ae9cdb5b1e28fcef", "score": "0.53831464", "text": "function spamfree_denied_post_proxy($approved) {\r\r\n\r\r\n\t// Update Count\r\r\n\tupdate_option( 'spamfree_count', get_option('spamfree_count') + 1 );\r\r\n\t// Akismet Accuracy Fix :: BEGIN\r\r\n\t$ak_count_pre\t= get_option('ak_count_pre');\r\r\n\t$ak_count_post\t= get_option('akismet_spam_count');\r\r\n\tif ($ak_count_post > $ak_count_pre) {\r\r\n\t\tupdate_option( 'akismet_spam_count', $ak_count_pre );\r\r\n\t\t}\r\r\n\t// Akismet Accuracy Fix :: END\r\r\n\t\r\r\n\t$spamfree_proxy_error_message_detailed = '<span style=\"font-size:12px;\"><strong>Your comment has been blocked because the blog owner has set their spam filter to not allow comments from users behind proxies.</strong><br/><br/>If you are a regular commenter or you feel that your comment should not have been blocked, please contact the blog owner and ask them to modify this setting.<br /><br /></span>'.\"\\n\";\r\r\n\t\r\r\n\twp_die( __($spamfree_proxy_error_message_detailed) );\r\r\n\treturn false;\r\r\n\t// REJECT PROXY COMMENTERS :: END\r\r\n\t}", "title": "" }, { "docid": "e1c5239baf7cac7452ac2e3ea30a91ab", "score": "0.53673804", "text": "function wpcom_vip_disable_post_flair() {\n\tadd_filter( 'post_flair_disable', '__return_true' );\n}", "title": "" }, { "docid": "c4a350f8b8e0621d39ab687b7dd4c452", "score": "0.5290282", "text": "function send_mail_to_subscribers($post_ID) {\n global $wpdb;\n \n if( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) ) {\n $mailqueue = $wpdb->prefix . 'mailqueue';\n $wpdb->query($wpdb->prepare(\"INSERT INTO $mailqueue SET post_id = %d\", $post_ID));\n }\n \n return $post_ID;\n}", "title": "" }, { "docid": "a4b0bf22460f78d09f0fd00fd53048af", "score": "0.52859926", "text": "public function disableEmailStatus()\n\t{\n\t\t$this->setState('email_status', 0);\n\t}", "title": "" }, { "docid": "894096771c515700a3516a6dacca5cbb", "score": "0.5239392", "text": "public static function adminPostProcessQueue() : void {\n $method = $_SERVER['REQUEST_METHOD'];\n if ( 'POST' !== $method ) {\n $msg = \"Invalid method in request to admin-post.php (wp2static_process_queue): $method\";\n }\n\n $nonce = isset( $_POST['_wpnonce'] ) ? $_POST['_wpnonce'] : false;\n $nonce_valid = $nonce && wp_verify_nonce( $nonce, 'wp2static_process_queue' );\n if ( ! $nonce_valid ) {\n $msg = 'Invalid nonce in request to admin-post.php (wpstatic_process_queue)';\n }\n\n if ( isset( $msg ) ) {\n WsLog::l( $msg );\n throw new \\RuntimeException( $msg );\n }\n\n Controller::wp2staticProcessQueue();\n }", "title": "" }, { "docid": "18b3ccff49c925fe520afe91b8edc37f", "score": "0.5237581", "text": "public function queueContact($email) \n {\n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n $query = $db->prepare('INSERT INTO ctct_email_cache VALUES(:email);');\n $query->execute(array('email' => $email));\n }", "title": "" }, { "docid": "3b4d4080364a07bd1ed831463e4a2db7", "score": "0.5223051", "text": "function _admin_notice_post_locked()\n {\n }", "title": "" }, { "docid": "16ffe97dbe43fad81ead002dda09209b", "score": "0.51741594", "text": "public function postProcess() {\n $this->bounceIfSimpleMailLimitExceeded(count($this->_contactIds));\n $formValues = $this->controller->exportValues($this->getName());\n $this->submit($formValues);\n }", "title": "" }, { "docid": "6305c4922b5bd4b3e38b0d0d028bf5bb", "score": "0.5163891", "text": "function spamfree_denied_post_wp_blacklist($approved) {\r\r\n\r\r\n\t// Update Count\r\r\n\tupdate_option( 'spamfree_count', get_option('spamfree_count') + 1 );\r\r\n\t// Akismet Accuracy Fix :: BEGIN\r\r\n\t$ak_count_pre\t= get_option('ak_count_pre');\r\r\n\t$ak_count_post\t= get_option('akismet_spam_count');\r\r\n\tif ($ak_count_post > $ak_count_pre) {\r\r\n\t\tupdate_option( 'akismet_spam_count', $ak_count_pre );\r\r\n\t\t}\r\r\n\t// Akismet Accuracy Fix :: END\r\r\n\t\r\r\n\t$spamfree_blacklist_error_message_detailed = '<span style=\"font-size:12px;\"><strong>Your comment has been blocked based on the blog owner\\'s blacklist settings.</strong><br/><br/>If you feel this is in error, please contact the blog owner by some other method.<br /><br /></span>'.\"\\n\";\r\r\n\t\r\r\n\twp_die( __($spamfree_blacklist_error_message_detailed) );\r\r\n\treturn false;\r\r\n\t// REJECT BLACKLISTED COMMENTERS :: END\r\r\n\t}", "title": "" }, { "docid": "605f4339f19375bdff4116d872f7ec93", "score": "0.5156947", "text": "protected function useEmailNotificationsDeduplication()\n {\n return false;\n }", "title": "" }, { "docid": "70d03425a7e3cb0f172c755923ed94fd", "score": "0.51457083", "text": "function spamfree_denied_post($approved) {\r\r\n\t\r\r\n\t// Update Count\r\r\n\tupdate_option( 'spamfree_count', get_option('spamfree_count') + 1 );\r\r\n\t// Akismet Accuracy Fix :: BEGIN\r\r\n\t// Akismet's counter is currently taking credit for some spams killed by WP-SpamFree - the following ensures accurate reporting.\r\r\n\t// The reason for this fix is that Akismet may have marked the same comment as spam, but WP-SpamFree actually kills it - with or without Akismet.\r\r\n\t$ak_count_pre\t= get_option('ak_count_pre');\r\r\n\t$ak_count_post\t= get_option('akismet_spam_count');\r\r\n\tif ($ak_count_post > $ak_count_pre) {\r\r\n\t\tupdate_option( 'akismet_spam_count', $ak_count_pre );\r\r\n\t\t}\r\r\n\t// Akismet Accuracy Fix :: END\r\r\n\r\r\n\t$spamfree_filter_error_message_standard = '<span style=\"font-size:12px;\">Comments have been temporarily disabled to prevent spam. Please try again later.</span>'; // Stop spammers without revealing why.\r\r\n\t\r\r\n\t$spamfree_filter_error_message_detailed = '<span style=\"font-size:12px;\"><strong>Hmmm, your comment seems a bit spammy. We\\'re not real big on spam around here.</strong><br /><br />'.\"\\n\";\r\r\n\t$spamfree_filter_error_message_detailed .= 'Please go back and try again.</span>'.\"\\n\";\r\r\n\r\r\n\twp_die( __($spamfree_filter_error_message_detailed) );\r\r\n\treturn false;\r\r\n\t// REJECT SPAM :: END\r\r\n\t}", "title": "" }, { "docid": "802a3e01098a3fbd8fe14cced8aef73a", "score": "0.5094269", "text": "public function anonymizeWoocommerceEntries($email)\n {\n $order_statuses = wc_get_order_statuses();\n $customer_orders = wc_get_orders( array(\n 'meta_key' => '_billing_email',\n 'meta_value' => $email,\n 'post_status' => array_keys($order_statuses),\n 'numberposts' => -1\n ) );\n if($customer_orders){\n foreach($customer_orders as $order )\n {\n if($order->get_status() != \"processing\"){\n \\WC_Privacy_Erasers::remove_order_personal_data($order);\n } \n }\n }\n }", "title": "" }, { "docid": "0d85ef4292b4011ee6a742472ddbd058", "score": "0.5084742", "text": "function fbComments_deactivate() {\n\tglobal $fbc_options;\n\t\n\t$to = get_bloginfo('admin_email');\n\t$subject = \"[Facebook Comments for WordPress] Your current XID\";\n\n\t$message = \"Thanks for trying out Facebook Comments for WordPress!\\n\\n\" .\n\t\t\t \"We just thought you'd like to know that your current XID is: {$fbc_options['xid']}.\\n\\n\" .\n\t\t\t \"This should be saved in your website's database, but in case it gets lost, you'll need this unique key to retrieve your comments should you ever choose to activate this plugin again.\\n\\n\" .\n\t\t\t \"Have a great day!\";\n\n\t// Wordwrap the message and strip slashes that may have wrapped quotes\n\t$message = stripslashes(wordwrap($message, 70));\n\n\t$headers = \"From: Facebook Comments for WordPress <$to>\\r\\n\" .\n\t\t\t \"Reply-To: $to\\r\\n\" .\n\t\t\t \"X-Mailer: PHP\" . phpversion();\n\n\t// Send the email notification\n\tfbComments_log(\"Sending XID via email to $to\");\n\tif (wp_mail($to, $subject, $message, $headers)) {\n\t\tfbComments_log(sprintf(' Sent XID via email to %s', $to));\n\t} else {\n\t\tfbComments_log(sprintf(' FAILED to send XID via email to %s', $to));\n\t}\n}", "title": "" }, { "docid": "256f2097290dc0d17cd76ff69fd599b4", "score": "0.5079943", "text": "public static function blacklisted_email_notice() {\n\t\tglobal $pagenow;\n\n\t\tif ( $pagenow != 'options-general.php' || ! self::$blacklisted_email || self::$blacklisted_email != get_option( 'admin_email' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$notice = sprintf( __( 'Email provider of \"%1$s\" address do not allow to use their email addresses by other servers. The \"%2$s\" address will be used to send out emails.', APP_TD ), self::$blacklisted_email, self::get_default_email() );\n\t\techo scb_admin_notice( $notice, 'error' );\n\t}", "title": "" }, { "docid": "c9105770470ff76957dfd26c2e05f500", "score": "0.5027854", "text": "public function disableSubmit(){\n $this->disableSubmit = true;\n $this->allowSubmitOnEnter = true;\n }", "title": "" }, { "docid": "e464f8c3a2b65ea7ad73d5d7c1d0763c", "score": "0.50226223", "text": "private static function canRemoveEmail() {\n\t\treturn\n\t\t\tRights::hasRight(Right::getByName('Premanager', 'registerWithoutEmail'));\n\t}", "title": "" }, { "docid": "6f28f38f8db35149e32619895f7c9ca5", "score": "0.5016777", "text": "function give_mysite_dequque_posttype_script() {\n\n\t// Change the conditional here to dequeue where you need.\n\tif ( is_singular( 'post_type' ) ) {\n\t\twp_deregister_script( 'give' );\n\t\twp_dequeue_script( 'give' );\n\t}\n}", "title": "" }, { "docid": "6f28f38f8db35149e32619895f7c9ca5", "score": "0.5016777", "text": "function give_mysite_dequque_posttype_script() {\n\n\t// Change the conditional here to dequeue where you need.\n\tif ( is_singular( 'post_type' ) ) {\n\t\twp_deregister_script( 'give' );\n\t\twp_dequeue_script( 'give' );\n\t}\n}", "title": "" }, { "docid": "645705ba61d4dd8c44325e6c3120039e", "score": "0.49949798", "text": "function nbcs_moderation_queue_alerts_check_queue() {\n\t$options = get_option( 'nbcs-moderation-queue' );\n\t$options['email'] = nbcs_moderation_queue_check_email( $options['email'] );\n\t\n\tif ( false !== get_transient( 'nbcs-moderation-queue-delay' ) || false === $options['minimum'] || false === $options['frequency'] || empty( $options['email'] ) ) {\n\t\treturn; // Don't do anything if the settings have not been set\n\t}\n\n\t$comment_count = get_comment_count();\n\tif ( $comment_count['awaiting_moderation'] >= intval( $options['minimum'] ) ) {\n\t\tif ( intval( $options['frequency'] ) > 0 ) {\n\t\t\tset_transient( 'nbcs-moderation-queue-delay', true, 60 * intval( $options['frequency'] ) );\n\t\t}\n\n\t\t$blog_name = get_bloginfo( 'name' );\n\t\t$subject = sprintf( __( '%s Moderation Queue Alert', 'nbcs-moderation-queue' ), $blog_name );\n\t\t$message = sprintf( __( 'There are currently %d comments in the %s moderation queue.', 'nbcs-moderation-queue' ), $comment_count['awaiting_moderation'], $blog_name );\n\t\tif ( $options['frequency'] > 0 ) {\n\t\t\t$message .= sprintf( __( ' You will not receive another alert for %d minutes.', 'nbcs-moderation-queue' ), $options['frequency'] );\n\t\t}\n\t\t$message .= '</p><p><a href=\"' . site_url( '/wp-admin/edit-comments.php' ) . '\">' . __( 'Go to comments page', 'nbcs-moderation-queue' ) . '</a></p>';\n\t\t\n\t\t$headers = array( 'Content-Type: text/html' );\n\t\t\n\t\t$subject = apply_filters( 'nbcs-moderation-queue-subject', $subject, $comment_count['awaiting_moderation'] );\n\t\t$message = apply_filters( 'nbcs-moderation-queue-message', $message, $comment_count['awaiting_moderation'] );\n\t\t\n\t\twp_mail( $options['email'], $subject, $message, $headers );\n\t}\n}", "title": "" }, { "docid": "c45aeb46b1d8a1e7ac36b47fc3face61", "score": "0.49928448", "text": "public function deactivate_plugin() {\n\n\t\tadd_filter( 'rewrite_rules_array', function ( $rules ) {\n\t\t \t\tforeach ( $rules as $rule => $rewrite ) {\n\t\t \t\tif ( preg_match( '/email_page\\//', $rule ) ) {\n\t\t \t\t\tunset( $rules[$rule] );\n\t\t \t\t}\n\t\t \t\t}\n\t\t \t\treturn $rules;\n\t\t\t}\n\t\t);\n\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "e472e92c398b7db30155618d15ff362f", "score": "0.49912822", "text": "public function filter_jambo_email( Array $email, FormUI $form )\n\t{\n\t\tif ( $form->honeypot->value || !self::verify_token($form->token->value, $form->token_time->value) ) {\n\t\t\tob_end_clean();\n\t\t\theader('HTTP/1.1 403 Forbidden');\n\t\t\tdie(\n\t\t\t\t'<h1>' . _t('The selected action is forbidden.', 'jambo') . '</h1>' .\n\t\t\t\t'<p>' . _t('You are submitting the form too fast and look like a spam bot.', 'jambo') . '</p>'\n\t\t\t);\n\t\t}\n\n\t\t// FIXME implement a blacklist or something.\n\t\treturn $email;\n\t}", "title": "" }, { "docid": "9df801062a08b1d095cad8ecb30761e3", "score": "0.49849588", "text": "public static function queue_transactional_email() {\n if ( is_a( self::$background_emailer, 'WeDevs\\PM\\Core\\Notifications\\Background_Emailer' ) ) {\n self::$background_emailer->push_to_queue( array(\n 'filter' => current_filter(),\n 'args' => func_get_args(),\n ) );\n } else {\n call_user_func_array( array( __CLASS__, 'send_transactional_email' ), func_get_args() );\n }\n }", "title": "" }, { "docid": "661904de7bfd6e20c06bb61e59d417c7", "score": "0.49847513", "text": "function edd_pup_emails_processing() {\r\n\t$args = array(\r\n\t\t'post_type' => 'edd_pup_email',\r\n\t\t'post_status' => 'pending',\r\n\t\t'numberposts' => -1\r\n\t);\r\n\r\n\t$emails = get_posts( $args );\r\n\t$queued = array();\r\n\t$processing = array();\r\n\r\n\tforeach ( $emails as $email ) {\r\n\r\n\t\t$sending = get_transient( 'edd_pup_sending_email_'. $email->post_author );\r\n\r\n\t\tif ( false === $sending || $email->ID != $sending ) {\r\n\t\t\t$queued[] = $email->ID;\r\n\t\t} else {\r\n\t\t\t$processing[] = $email->ID;\r\n\t\t}\r\n\t}\r\n\r\n\treturn array( 'queued' => $queued, 'processing' => $processing );\r\n}", "title": "" }, { "docid": "9a4fe05254dff361c191971823b62696", "score": "0.49792257", "text": "function disableAccount($accountId)\n\t\t{\n\t\t\tmysql_query(\"UPDATE argus_accounts SET status = 'DISABLED' WHERE account_id = '\".$accountId.\"' AND status = 'ENABLED'\") or die(mysql_error());\n\t\t\t\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "2b7cd18f9ea98ae3bcbf00a5156ff679", "score": "0.4976537", "text": "function wpcom_vip_disable_postpost() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "title": "" }, { "docid": "eedb727d1955adbd494f8b0842d82800", "score": "0.49698076", "text": "function maybe_prevent_deletion( $post_id ) {\r\n\t\r\n\tglobal $sendback;\r\n\t\r\n\t$post = get_post( $post_id );\r\n\t\r\n\tif( $post->post_type === 'wpass_status' ) {\r\n\t\t\r\n\t\tif( true === is_status_assigned_to_open_ticket( $post ) ) {\r\n\t\t\twp_redirect( add_query_arg( array( 'deleted' => 0, 'ids' => $post_id, 'status_delete' => 'failed' ), $sendback ) );\r\n\t\t\texit;\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "bb1cbf5f7fd171fa4bbda1ed4f560a12", "score": "0.49645266", "text": "function dttheme_disable_bp_registration() {\n remove_action( 'bp_init', 'bp_core_wpsignup_redirect' );\n remove_action( 'bp_screens', 'bp_core_screen_signup' );\n}", "title": "" }, { "docid": "58fc64b6f1da50c2aa22be106b0c5cac", "score": "0.49540734", "text": "public function cancelEmail()\n {\n $this->emailUpdate = false;\n $this->email = $this->customer->email;\n }", "title": "" }, { "docid": "a8e956dbe1aa481ee2f824b4835a0cc1", "score": "0.49538508", "text": "public function onDisable() {\n\t}", "title": "" }, { "docid": "1e4cc90278a745e9bfe433ae903764d6", "score": "0.49386424", "text": "function rpDeactivation()\n{\n wp_clear_scheduled_hook( 'rpUpdatePostsHourlyEvent' );\n}", "title": "" }, { "docid": "c4c95b1612c94797b6ba2cd486637c6c", "score": "0.49370012", "text": "function themeblvd_builder_disable_nag() {\n\tglobal $current_user;\n if ( isset( $_GET['tb_nag_ignore'] ) )\n add_user_meta( $current_user->ID, $_GET['tb_nag_ignore'], 'true', true );\n}", "title": "" }, { "docid": "88498e118eeee210e425f9ee7d739123", "score": "0.49345544", "text": "public static function email_unlock_account() {\n\n if ($u = static::check_record_existence()) {\n\n # definindo conta como não confirmada.\n $u->hash_unlock_account = \\Security::random(32);\n if (!$u->edit())\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n\n $m = auth_model();\n if ($m::first(array('where' => 'id = \\'' . $u->id . '\\''))->emailUnlockAccount())\n flash('Email com as instruções para Desbloqueamento de conta enviado para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "title": "" }, { "docid": "74d45fbe595b0147aec570cfeecb32eb", "score": "0.49270868", "text": "function unprotect($account) {\n $mail = explode('.', $account->mail);\n if (end($mail) != 'test') {\n return;\n }\n\n array_pop($mail);\n $account->mail = implode('.', $mail);\n db_query(\"UPDATE users SET mail = '%s' WHERE uid = '%d'\", $account->mail, $account->uid);\n}", "title": "" }, { "docid": "44faa14ef124224187e128eafa5c10ec", "score": "0.49137765", "text": "function run_leaving_activity_pre()\n\t\t{\n\t\t\t//actually we never send emails when cancelling\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "9abedbd9a499ffcfb65c403b522d881b", "score": "0.49134678", "text": "protected function disable_emails() {\n\n if( class_exists('WC_Emails') ) {\n\n $email_class = \\WC_Emails::instance();\n\n remove_action( 'woocommerce_low_stock_notification', array( $email_class, 'low_stock' ) );\n remove_action( 'woocommerce_no_stock_notification', array( $email_class, 'no_stock' ) );\n remove_action( 'woocommerce_product_on_backorder_notification', array( $email_class, 'backorder' ) );\n \n // New order emails\n remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $email_class->emails['WC_Email_New_Order'], 'trigger' ) );\n remove_action( 'woocommerce_order_status_pending_to_completed_notification', array( $email_class->emails['WC_Email_New_Order'], 'trigger' ) );\n remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $email_class->emails['WC_Email_New_Order'], 'trigger' ) );\n remove_action( 'woocommerce_order_status_failed_to_processing_notification', array( $email_class->emails['WC_Email_New_Order'], 'trigger' ) );\n remove_action( 'woocommerce_order_status_failed_to_completed_notification', array( $email_class->emails['WC_Email_New_Order'], 'trigger' ) );\n remove_action( 'woocommerce_order_status_failed_to_on-hold_notification', array( $email_class->emails['WC_Email_New_Order'], 'trigger' ) );\n \n // Processing order emails\n remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $email_class->emails['WC_Email_Customer_Processing_Order'], 'trigger' ) );\n remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $email_class->emails['WC_Email_Customer_Processing_Order'], 'trigger' ) );\n \n // Completed order emails\n remove_action( 'woocommerce_order_status_completed_notification', array( $email_class->emails['WC_Email_Customer_Completed_Order'], 'trigger' ) );\n \n // Note emails\n remove_action( 'woocommerce_new_customer_note_notification', array( $email_class->emails['WC_Email_Customer_Note'], 'trigger' ) );\n\n }\n \n\n // Turn off E-mails not included in the above, from wc-update-functions.php\n remove_all_actions( 'woocommerce_order_status_refunded_notification' );\n remove_all_actions( 'woocommerce_order_partially_refunded_notification' );\n remove_action( 'woocommerce_order_status_refunded', array( 'WC_Emails', 'send_transactional_email' ) );\n remove_action( 'woocommerce_order_partially_refunded', array( 'WC_Emails', 'send_transactional_email' ) );\n\n\n }", "title": "" }, { "docid": "b6013455484d9bcc6784d38a0059bfab", "score": "0.49089602", "text": "function whatsappmvl_deactivation() {\n\n // clear the permalinks to remove our post type's rules from the database\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "f9b6b68902d2fe09b644a54d0922ebdc", "score": "0.49030167", "text": "function ciniki_core_emailQueueProcess(&$ciniki) {\n\n foreach($ciniki['emailqueue'] as $email) {\n if( isset($email['mail_id']) ) {\n //\n // Load the settings for the tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'private', 'getSettings');\n $rc = ciniki_mail_getSettings($ciniki, $email['tnid']);\n if( $rc['stat'] != 'ok' ) {\n error_log(\"MAIL-ERR: Unable to load tenant mail settings for $tnid (\" . serialize($rc) . \")\");\n continue;\n }\n $settings = $rc['settings']; \n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'private', 'sendMail');\n $rc = ciniki_mail_sendMail($ciniki, $email['tnid'], $settings, $email['mail_id']);\n if( $rc['stat'] != 'ok' ) {\n error_log(\"MAIL-ERR: Error sending mail: \" . $email['mail_id'] . \" (\" . serialize($rc) . \")\");\n }\n } \n elseif( isset($email['user_id']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'hooks', 'emailUser');\n if( isset($email['htmlmsg']) ) {\n ciniki_users_hooks_emailUser($ciniki, 0, $email);\n } else {\n ciniki_users_hooks_emailUser($ciniki, 0, $email);\n }\n }\n elseif( isset($email['to']) ) {\n //\n // Get the tenant mail settings\n //\n if( isset($email['tnid']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'private', 'getSettings');\n $rc = ciniki_mail_getSettings($ciniki, $email['tnid']);\n if( $rc['stat'] == 'ok' && isset($rc['settings']) ) {\n $settings = $rc['settings'];\n }\n }\n //\n // If mailgun is enabled\n //\n if( isset($settings['mailgun-domain']) && $settings['mailgun-domain'] != ''\n && isset($settings['mailgun-key']) && $settings['mailgun-key'] != ''\n ) {\n //\n // Setup the message\n //\n $msg = array(\n 'from' => $settings['smtp-from-name'] . ' <' . $settings['smtp-from-address'] . '>',\n 'subject' => $email['subject'],\n 'html' => (isset($email['htmlmsg']) && $email['htmlmsg'] != '' ? $email['htmlmsg'] : $email['textmsg']),\n 'text' => $email['textmsg'],\n );\n if( isset($ciniki['config']['ciniki.mail']['force.mailto']) ) {\n if( isset($email['to_name']) && $email['to_name'] != '' ) {\n $msg['to'] = $email['to_name'] . ' <' . $ciniki['config']['ciniki.mail']['force.mailto'] . '>';\n } else {\n $msg['to'] = $ciniki['config']['ciniki.mail']['force.mailto'];\n }\n $msg['subject'] .= ' [' . $email['to'] . ']';\n } else {\n if( isset($email['to_name']) && $email['to_name'] != '' ) {\n $msg['to'] = $email['to_name'] . ' <' . $email['to'] . '>';\n } else {\n $msg['to'] = $email['to'];\n }\n }\n\n //\n // Check for replyto_email\n //\n if( isset($email['replyto_email']) && $email['replyto_email'] != '' ) { \n if( isset($email['replyto_name']) && $email['replyto_name'] != '' ) {\n $msg['h:Reply-To'] = $email['replyto_name'] . ' <' . $email['replyto_email'] . '> ';\n } else {\n $msg['h:Reply-To'] = $email['replyto_email'];\n }\n }\n\n //\n // Add attachments\n //\n $file_index = 1;\n if( isset($email['attachments']) ) {\n foreach($email['attachments'] as $attachment) {\n if( isset($attachment['string']) ) {\n $tmpname = tempnam(sys_get_temp_dir(), 'mailgun');\n file_put_contents($tmpname, $attachment['string']);\n $cfile = curl_file_create($tmpname);\n $cfile->setPostFilename($attachment['filename']);\n $msg['file_' . $file_index] = $cfile;\n $file_index++;\n }\n }\n }\n\n //\n // Send to mailgun api\n //\n if( isset($ciniki['config']['ciniki.mail']['block.outgoing']) ) {\n error_log('EMAIL BLOCK BY CONFIG: ' . $msg['to'] . ' - ' . $msg['subject']);\n } else {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, 'api:' . $settings['mailgun-key']);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');\n curl_setopt($ch, CURLOPT_URL, 'https://api.mailgun.net/v3/' . $settings['mailgun-domain'] . '/messages');\n curl_setopt($ch, CURLOPT_POSTFIELDS, $msg);\n\n $rsp = json_decode(curl_exec($ch));\n\n $info = curl_getinfo($ch);\n if( $info['http_code'] != 200 ) {\n error_log(\"MAIL-ERR: [\" . $email['to'] . \"] \" . $rsp->message);\n }\n curl_close($ch);\n }\n } \n //\n // Otherwise use SMTP mailer\n //\n else {\n require_once($ciniki['config']['ciniki.core']['lib_dir'] . '/PHPMailer/class.phpmailer.php');\n require_once($ciniki['config']['ciniki.core']['lib_dir'] . '/PHPMailer/class.smtp.php');\n\n $mail = new PHPMailer;\n $mail->IsSMTP();\n\n $use_config = 'yes';\n if( isset($email['tnid']) \n && isset($settings['smtp-servers']) && $settings['smtp-servers'] != ''\n && isset($settings['smtp-username']) && $settings['smtp-username'] != ''\n && isset($settings['smtp-password']) && $settings['smtp-password'] != ''\n && isset($settings['smtp-secure']) && $settings['smtp-secure'] != ''\n && isset($settings['smtp-port']) && $settings['smtp-port'] != ''\n ) {\n $mail->Host = $settings['smtp-servers'];\n $mail->SMTPAuth = true;\n $mail->Username = $settings['smtp-username'];\n $mail->Password = $settings['smtp-password'];\n $mail->SMTPSecure = $settings['smtp-secure'];\n $mail->Port = $settings['smtp-port'];\n $use_config = 'no';\n\n if( isset($settings['smtp-secure']) && $settings['smtp-secure'] != ''\n && isset($settings['smtp-port']) && $settings['smtp-port'] != '' ) {\n $mail->From = $settings['smtp-from-address'];\n $mail->FromName = $settings['smtp-from-name'];\n } else {\n $mail->From = $ciniki['config']['ciniki.core']['system.email'];\n $mail->FromName = $ciniki['config']['ciniki.core']['system.email.name'];\n }\n } \n \n //\n // If not enough information, or none provided, default back to system email\n //\n if( $use_config == 'yes' ) {\n if( !isset($ciniki['config']['ciniki.core']['system.email']) ) {\n // If the system.email is not set, don't send any emails, dev system.\n return array('stat'=>'ok');\n }\n $mail->Host = $ciniki['config']['ciniki.core']['system.smtp.servers'];\n if( isset($ciniki['config']['ciniki.core']['system.smtp.username']) ) {\n $mail->SMTPAuth = true;\n $mail->Username = $ciniki['config']['ciniki.core']['system.smtp.username'];\n $mail->Password = $ciniki['config']['ciniki.core']['system.smtp.password'];\n }\n if( isset($ciniki['config']['ciniki.core']['system.smtp.secure']) ) {\n $mail->SMTPSecure = $ciniki['config']['ciniki.core']['system.smtp.secure'];\n }\n if( isset($ciniki['config']['ciniki.core']['system.smtp.port']) ) {\n $mail->Port = $ciniki['config']['ciniki.core']['system.smtp.port'];\n }\n\n $mail->From = $ciniki['config']['ciniki.core']['system.email'];\n $mail->FromName = $ciniki['config']['ciniki.core']['system.email.name'];\n }\n\n if( isset($ciniki['config']['ciniki.mail']['force.mailto']) ) {\n if( isset($email['to_name']) && $email['to_name'] != '' ) {\n $mail->AddAddress($ciniki['config']['ciniki.mail']['force.mailto'], $email['to_name']);\n } else {\n $mail->AddAddress($ciniki['config']['ciniki.mail']['force.mailto']);\n }\n $email['subject'] .= ' [' . $email['to'] . ']';\n } else {\n if( isset($email['to_name']) && $email['to_name'] != '' ) {\n $mail->AddAddress($email['to'], $email['to_name']);\n } else {\n $mail->AddAddress($email['to']);\n }\n }\n \n // Add reply to if specified\n if( isset($email['replyto_email']) && $email['replyto_email'] != '' ) {\n if( isset($email['replyto_name']) && $email['replyto_name'] != '' ) {\n $mail->addReplyTo($email['replyto_email'], $email['replyto_name']);\n } else {\n $mail->addReplyTo($email['replyto_email']);\n }\n }\n\n $mail->Subject = $email['subject'];\n if( isset($email['htmlmsg']) && $email['htmlmsg'] != '' ) {\n $mail->IsHTML(true);\n $mail->Body = $email['htmlmsg'];\n $mail->AltBody = $email['textmsg'];\n } else {\n $mail->IsHTML(false);\n $mail->Body = $email['textmsg'];\n }\n\n //\n // Check for attachments\n //\n if( isset($email['attachments']) ) {\n foreach($email['attachments'] as $attachment) {\n if( isset($attachment['string']) ) {\n $mail->addStringAttachment($attachment['string'], $attachment['filename']);\n }\n }\n }\n\n if( isset($ciniki['config']['ciniki.mail']['block.outgoing']) ) {\n error_log('EMAIL BLOCK BY CONFIG: ' . $email['to'] . ' - ' . $email['subject']);\n } elseif( !$mail->Send() ) {\n error_log(\"MAIL-ERR: [\" . $email['to'] . \"] \" . $mail->ErrorInfo . \" (trying again)\");\n if( !$mail->Send() ) {\n error_log(\"MAIL-ERR: [\" . $email['to'] . \"] \" . $mail->ErrorInfo);\n }\n }\n }\n }\n }\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "72b83e3066dec13c361354995375954e", "score": "0.48866826", "text": "function ah_disable_emoji_dequeue_script() {\n wp_dequeue_script( 'emoji' ); \n}", "title": "" }, { "docid": "d0b20634001ae7f4576fed1136f47742", "score": "0.48738208", "text": "public static function whitelist(string $email) {\n static::$whitelist[] = $email;\n }", "title": "" }, { "docid": "9ed8d653447945f45c9d39a77b5c8a11", "score": "0.48681095", "text": "function disable_user($email) {\n // Build the query\n $query = \"UPDATE UserAccount SET enabled=0 WHERE email = ?\";\n // Execute the query\n $result = $this->db->query($query, $email);\n // Check if the row was affected\n if ($this->db->affected_rows() == 1) {\n $message = \"Success: account disabled.\";\n } else {\n $message = \"Error: failed to disable account.\";\n }\n // Return the result message\n return $message;\n }", "title": "" }, { "docid": "5897a8ee73bfb5399ec3164b3b8b56a6", "score": "0.48663464", "text": "function wp_ajax_wp_remove_post_lock()\n {\n }", "title": "" }, { "docid": "6f7462d19acda754758fd01106ce8768", "score": "0.48651212", "text": "function spamfree_allowed_post($approved) {\r\r\n\t$spamfree_options\t\t\t= get_option('spamfree_options');\r\r\n\t$CookieValidationName \t\t= $spamfree_options['cookie_validation_name'];\r\r\n\t$CookieValidationKey \t\t= $spamfree_options['cookie_validation_key'];\r\r\n\t$FormValidationFieldJS \t\t= $spamfree_options['form_validation_field_js'];\r\r\n\t$FormValidationKeyJS \t\t= $spamfree_options['form_validation_key_js'];\r\r\n\t$KeyUpdateTime \t\t\t\t= $spamfree_options['last_key_update'];\r\r\n\t$WPCommentValidationJS \t\t= $_COOKIE[$CookieValidationName];\r\r\n\t//$WPFormValidationPost \t\t= $_POST[$FormValidationFieldJS]; //Comments Post Verification\r\r\n\t//if( $WPCommentValidationJS == $CookieValidationKey ) { // Comment allowed\r\r\n\tif( $_COOKIE[$spamfree_options['cookie_validation_name']] == $spamfree_options['cookie_validation_key'] ) { // Comment allowed\r\r\n\t\t// Clear Key Values and Update\r\r\n\t\t$GetCurrentTime = time();\r\r\n\t\t$ResetIntervalHours = 24; // Reset interval in hours\r\r\n\t\t$ResetIntervalMinutes = 60; // Reset interval minutes default\r\r\n\t\t$ResetIntervalMinutesOverride = $ResetIntervalMinutes; // Use as override for testing; leave = $ResetIntervalMinutes when not testing\r\r\n if ( $ResetIntervalMinutesOverride != $ResetIntervalMinutes ) {\r\r\n\t\t\t$ResetIntervalHours = 1;\r\r\n\t\t\t$ResetIntervalMinutes = $ResetIntervalMinutesOverride;\r\r\n\t\t\t}\r\r\n\t\t$TimeThreshold = $GetCurrentTime - ( 60 * $ResetIntervalMinutes * $ResetIntervalHours ); // seconds * minutes * hours\r\r\n\t\t// This only resets key if over x amount of time after last reset\r\r\n\t\tif ( $TimeThreshold > $KeyUpdateTime ) {\r\r\n\t\t\tspamfree_update_keys(1);\r\r\n\t\t\t}\r\r\n\t\treturn $approved;\r\r\n\t\t}\r\r\n\telse { // Comment spam killed\r\r\n\t\r\r\n\t\t// Update Count\r\r\n\t\tupdate_option( 'spamfree_count', get_option('spamfree_count') + 1 );\r\r\n\t\t// Akismet Accuracy Fix :: BEGIN\r\r\n\t\t// Akismet's counter is currently taking credit for some spams killed by WP-SpamFree - the following ensures accurate reporting.\r\r\n\t\t// The reason for this fix is that Akismet may have marked the same comment as spam, but WP-SpamFree actually kills it - with or without Akismet.\r\r\n\t\t$ak_count_pre\t= get_option('ak_count_pre');\r\r\n\t\t$ak_count_post\t= get_option('akismet_spam_count');\r\r\n\t\tif ($ak_count_post > $ak_count_pre) {\r\r\n\t\t\tupdate_option( 'akismet_spam_count', $ak_count_pre );\r\r\n\t\t\t}\r\r\n\t\t// Akismet Accuracy Fix :: END\r\r\n\r\r\n\t\t$spamfree_jsck_error_ck_test = $_COOKIE['SJECT']; // Default value is 'CKON'\r\r\n\t\t\r\r\n\t\tif ( $spamfree_jsck_error_ck_test == 'CKON' ) {\r\r\n\t\t\t$spamfree_jsck_error_ck_status = 'PHP detects that cookies appear to be enabled.';\r\r\n\t\t\t}\r\r\n\t\telse {\r\r\n\t\t\t$spamfree_jsck_error_ck_status = 'PHP detects that cookies appear to be disabled. <script type=\"text/javascript\">if (navigator.cookieEnabled==true) { document.write(\\'(However, JavaScript detects that cookies are enabled.)\\'); } else { document.write(\\'\\(JavaScript also detects that cookies are disabled.\\)\\'); }; </script>';\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\t$spamfree_jsck_error_message_standard = 'Sorry, there was an error. Please be sure JavaScript and Cookies are enabled in your browser and try again.';\r\r\n\r\r\n\t\t$spamfree_jsck_error_message_detailed = '<span style=\"font-size:12px;\"><strong>Sorry, there was an error. JavaScript and Cookies are required in order to post a comment.</strong><br /><br />'.\"\\n\";\r\r\n\t\t$spamfree_jsck_error_message_detailed .= '<noscript>Status: JavaScript is currently disabled.<br /><br /></noscript>'.\"\\n\";\r\r\n\t\t$spamfree_jsck_error_message_detailed .= '<strong>Please be sure JavaScript and Cookies are enabled in your browser. Then, please hit the back button on your browser, and try posting your comment again. (You may need to reload the page)</strong><br /><br />'.\"\\n\";\r\r\n\t\t$spamfree_jsck_error_message_detailed .= '<br /><hr noshade />'.\"\\n\";\r\r\n\t\tif ( $spamfree_jsck_error_ck_test == 'CKON' ) {\r\r\n\t\t\t$spamfree_jsck_error_message_detailed .= 'If you feel you have received this message in error (for example <em>if JavaScript and Cookies are in fact enabled</em> and you have tried to post several times), there is most likely a technical problem (could be a plugin conflict or misconfiguration). Please contact the author of this blog, and let them know they need to look into it.<br />'.\"\\n\";\r\r\n\t\t\t$spamfree_jsck_error_message_detailed .= '<hr noshade /><br />'.\"\\n\";\r\r\n\t\t\t}\r\r\n\t\t$spamfree_jsck_error_message_detailed .= '</span>'.\"\\n\";\r\r\n\t\t//$spamfree_jsck_error_message_detailed .= '<span style=\"font-size:9px;\">This message was generated by WP-SpamFree.</span><br /><br />'.\"\\n\";\r\r\n\t\r\r\n\t\t$spamfree_imgphpck_error_message_standard = 'Sorry, there was an error. Please enable Images and Cookies in your browser and try again.';\r\r\n\t\t\r\r\n\t\t$spamfree_imgphpck_error_message_detailed = '<span style=\"font-size:12px;\"><strong>Sorry, there was an error. Images and Cookies are required in order to post a comment.<br/>You appear to have at least one of these disabled.</strong><br /><br />'.\"\\n\";\r\r\n\t\t$spamfree_imgphpck_error_message_detailed .= '<strong>Please enable Images and Cookies in your browser. Then, please go back, reload the page, and try posting your comment again.</strong><br /><br />'.\"\\n\";\r\r\n\t\t$spamfree_imgphpck_error_message_detailed .= '<br /><hr noshade />'.\"\\n\";\r\r\n\t\t$spamfree_imgphpck_error_message_detailed .= 'If you feel you have received this message in error (for example <em>if Images and Cookies are in fact enabled</em> and you have tried to post several times), please alert the author of this blog, and let them know they need to look into it.<br />'.\"\\n\";\r\r\n\t\t$spamfree_imgphpck_error_message_detailed .= '<hr noshade /><br /></span>'.\"\\n\";\r\r\n\t\t//$spamfree_imgphpck_error_message_detailed .= '<span style=\"font-size:9px;\">This message was generated by WP-SpamFree.</span><br /><br />'.\"\\n\";\r\r\n\r\r\n\t\tif( $spamfree_options['use_alt_cookie_method_only'] ) {\r\r\n\t\t\twp_die( __($spamfree_imgphpck_error_message_detailed) );\r\r\n\t\t\t}\r\r\n\t\telse {\r\r\n\t\t\twp_die( __($spamfree_jsck_error_message_detailed) );\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\treturn false;\r\r\n\t\t}\r\r\n\t// TEST TO PREVENT COMMENT SPAM FROM BOTS :: END\r\r\n\t}", "title": "" }, { "docid": "1d47749bf59036a2421dc5fecbc9bae4", "score": "0.48477462", "text": "public function deactivation() {\n\n global $pmpro_sequence_deactivating, $wpdb;\n $pmpro_sequence_deactivating = true;\n\n flush_rewrite_rules();\n\n // Easiest is to iterate through all Sequence IDs and set the setting to 'sendNotice == 0'\n\n $sql = \"\n\t\t SELECT *\n\t\t FROM {$wpdb->posts}\n\t\t WHERE post_type = 'pmpro_sequence'\n\t \t\";\n\n $seqs = $wpdb->get_results( $sql );\n\n // Iterate through all sequences and disable any cron jobs causing alerts to be sent to users\n foreach($seqs as $s) {\n\n $this->init( $s->ID );\n\n if ( $this->options->sendNotice == 1 ) {\n\n // Set the alert flag to 'off'\n $this->options->sendNotice = 0;\n\n // save meta for the sequence.\n $this->save_sequence_meta();\n\n wp_clear_scheduled_hook( 'pmpro_sequence_cron_hook', array( $s->ID ) );\n $this->dbgOut('Deactivated email alert(s) for sequence ' . $s->ID);\n }\n }\n\n /* Unregister the default Cron job for new content alert(s) */\n wp_clear_scheduled_hook( 'pmpro_sequence_cron_hook' );\n }", "title": "" }, { "docid": "7d327dd3a7021cd5d1aa6dcefd97a79c", "score": "0.4840748", "text": "public function senBounceWebhookNoticeToAdmins($recipient) {\n $subject = 'Пользователь ' . $recipient['email'] . ' был удален из системы.';\n $message = 'Пользователь с email-ом ' . $recipient['email'] . ' был удален из системы из-за статуса bad_mailbox, invalid_domain';\n $this->sendEmails($subject, $message);\n }", "title": "" }, { "docid": "60888448371a5f37c7a1d9c89b030085", "score": "0.48375794", "text": "public function hookDisable(): void\n {\n $this->say(\"Executing the Plugin's disable hook...\");\n $this->_exec(\"php ./src/hook_disable.php\");\n }", "title": "" }, { "docid": "2557e1719ea4366dbe04daab0cf67515", "score": "0.48269242", "text": "function iwBookingDeactive() {\n $timestamp = wp_next_scheduled('clear_invalid_booking_order_cronjob');\n // unschedule previous event if any\n wp_unschedule_event($timestamp, 'clear_invalid_booking_order_cronjob');\n }", "title": "" }, { "docid": "4d1cad9c190eeb4bf74492ee90bbf9d3", "score": "0.48210025", "text": "public function action_suppress_no_accounts_notice() {\n\t\tupdate_user_meta(get_current_user_id(), 'social_suppress_no_accounts_notice', 'true');\n\t}", "title": "" }, { "docid": "e5f03062cc7ffa7cb82017fd70521cc0", "score": "0.4812686", "text": "function disable_active_event_notification($cond=array())\r\n\t{\r\n\t\t$c_filter = '';\r\n\t\tif (is_domain_user() == true) {\r\n\t\t\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\r\n\t\t}\r\n\t\tif (valid_array($cond)) {\r\n\t\t\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\r\n\t\t}\r\n\t\t$temp_query = '\tupdate user u1\r\n\t\t\t\t\tinner join user u2\r\n\t\t\t\t\ton u2.user_id = u1.user_id\r\n\t\t\t\t\tset u1.user_name = u2.email';\r\n\t\t\r\n\t\t$query = 'update timeline_event_user_map TEU1\r\n\t\t\t\tinner join timeline_event_user_map TEU2 on TEU2.origin = TEU1.origin\r\n\t\t\t\tJOIN timeline TL\r\n\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\tJOIN timeline_event_user_map TEU3 ON TEU3.timeline_fk=TL.origin\r\n\t\t\t\tJOIN user U on U.user_id=TEU3.user_id and TEU3.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\tset TEU1.viewed_datetime=\"'.db_current_datetime().'\"\r\n\t\t\t\twhere TEU3.viewed_datetime IS NULL AND TEU2.origin=TEU3.origin AND TL.event_origin=TLE.origin '.$c_filter.' ';\r\n\t\treturn $this->CI->db->query($query);\r\n\t}", "title": "" }, { "docid": "ed0230c9bedb033662fd3120730205bb", "score": "0.4807848", "text": "function unhook_those_pesky_emails($email_class)\n {\n\n /**\n * Hooks for sending emails during store events\n **/\n remove_action('woocommerce_low_stock_notification', array($email_class, 'low_stock'));\n remove_action('woocommerce_no_stock_notification', array($email_class, 'no_stock'));\n remove_action('woocommerce_product_on_backorder_notification', array($email_class, 'backorder'));\n\n // New order emails\n remove_action('woocommerce_order_status_pending_to_processing_notification', array($email_class->emails['WC_Email_New_Order'], 'trigger'));\n remove_action('woocommerce_order_status_pending_to_completed_notification', array($email_class->emails['WC_Email_New_Order'], 'trigger'));\n remove_action('woocommerce_order_status_pending_to_on-hold_notification', array($email_class->emails['WC_Email_New_Order'], 'trigger'));\n remove_action('woocommerce_order_status_failed_to_processing_notification', array($email_class->emails['WC_Email_New_Order'], 'trigger'));\n remove_action('woocommerce_order_status_failed_to_completed_notification', array($email_class->emails['WC_Email_New_Order'], 'trigger'));\n remove_action('woocommerce_order_status_failed_to_on-hold_notification', array($email_class->emails['WC_Email_New_Order'], 'trigger'));\n\n // Processing order emails\n remove_action('woocommerce_order_status_pending_to_processing_notification', array($email_class->emails['WC_Email_Customer_Processing_Order'], 'trigger'));\n remove_action('woocommerce_order_status_pending_to_on-hold_notification', array($email_class->emails['WC_Email_Customer_Processing_Order'], 'trigger'));\n\n // Completed order emails\n remove_action('woocommerce_order_status_completed_notification', array($email_class->emails['WC_Email_Customer_Completed_Order'], 'trigger'));\n\n // Note emails\n remove_action('woocommerce_new_customer_note_notification', array($email_class->emails['WC_Email_Customer_Note'], 'trigger'));\n }", "title": "" }, { "docid": "741b5b18cf27a3398da1b1f918c9a040", "score": "0.47986466", "text": "static function disable_once() {\n\t\tself::remove();\n\t\tadd_action( 'phpmailer_init', array( __CLASS__, '_reset' ) );\n\t}", "title": "" }, { "docid": "1efa5df499e19727cc46f3bfb6d627a6", "score": "0.47944754", "text": "function post_notification_fe_subscribe_comment(){\r\n\tglobal $post_notification_addr, $post_notification_code, $post_notification_action, $wpdb;\r\n\t$addr = &$post_notification_addr;\r\n\t$code = &$post_notification_code;\r\n\t$action = &$post_notification_action;\r\n\t$t_emails = $wpdb->prefix . 'post_notification_emails';\r\n\t\t\r\n\tif(isset($_POST['PID'])){\r\n\t\t$PID = $_POST['PID'];\r\n\t} else {\r\n\t\t$PID = $_GET['PID'];\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\tif(!is_email($addr)){ //We havent't got an Email - Lets get one\r\n\t\t$ret = post_notification_ldfile('subscribe_comment_email.tmpl');\r\n\t\t$post = get_post($PID);\r\n\r\n\t\t$ret['header'] = str_replace('@@title',$post->post_title,$ret['header']);\r\n\t\t$ret['body'] = str_replace('@@title',$post->post_title,$ret['body']);\r\n\t\t$ret['body'] = str_replace('@@addr',$addr,$ret['body']);\r\n\t\t\r\n\t\t$forminput .= '<input type=\"hidden\" name=\"PID\" value=\"' . $PID . '\">';\r\n\t\t$forminput .= '<input type=\"hidden\" name=\"action\" value=\"subscribe_comment\">';\r\n\t\t\t\t\r\n\t\t$ret['body'] = str_replace('@@vars',$forminput,$ret['body']);\r\n\t\t$ret['body'] = str_replace('@@action',post_notification_get_link(). 'POST_NOTIFICATION_FE_CHECK=1',$ret['body']);\r\n\t\t//var_dump($ret);\r\n\t\treturn $ret;\r\n\t\t\r\n\t} else {\r\n\t\tif($addr != post_notification_get_addr()){\r\n\t\t\tsetcookie('comment_author_email_' . COOKIEHASH, $addr, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);\r\n\t\t}\r\n\t\t$res = $wpdb->get_row(\"SELECT id, gets_mail FROM $t_emails WHERE email_addr = '$addr'\");\r\n\t\t//post_notification_vardump($res);\r\n\t\tif($res === false){\r\n\t\t\t//There is no entry. Lets add one\r\n\t\t\tpost_notification_add_email($addr);\r\n\t\t\t$res = $wpdb->get_row(\"SELECT id, gets_mail FROM $t_emails WHERE email_addr = '$addr'\");\r\n\t\t\t//Now there should be an entry\r\n\t\t}\r\n\t\tif($_GET['unsub'] == 1){ //This si always GET!\r\n\t\t\t//echo \"----------UNSUB\";\r\n\t\t\tpost_notification_fe_update_subscriptions($res->id, array($PID),2,2);\r\n\t\t} else{\r\n\t\t\tpost_notification_fe_update_subscriptions($res->id, array($PID),2,0);\r\n\t\t}\r\n\t\tif($res->gets_mail == 1){\r\n\t\t\t$link = get_permalink($PID) . '#commentform';\r\n\t\t} else {\r\n\t\t\t$link = post_notification_get_link() . 'addr=' . urlencode($addr) . '&action=subscribe';\r\n\t\t}\r\n\t\twp_redirect($link);\r\n\t\techo \"Redirecting to <a href=\\\"$link\\\">$link</a>\";\r\n\t\texit();\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n}", "title": "" }, { "docid": "ebc46289e7b680e43d094d69f0d1fc63", "score": "0.47684973", "text": "public function disable() {}", "title": "" }, { "docid": "1f3d74e055d9ee8233e277ce041f55dc", "score": "0.47644126", "text": "public function uninstall_post_message()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "0871d82732026d3caee7535980923d99", "score": "0.47635496", "text": "function transport_email_admin(){\n}", "title": "" }, { "docid": "51a5311e66cf690a7ac57733d29ef4a4", "score": "0.4760939", "text": "public function hook_check_email() {\n $this->check_email();\n }", "title": "" }, { "docid": "2e5016d3877dec4ac5aa63fb05620e9c", "score": "0.47552276", "text": "function email_confirmation_attempt( $nonce ) {\n\t\t$nonce = (string) $nonce;\n\t\tif ( $this->validate_nonce( 'email', $nonce ) ) {\n\t\t\t$this->delete_nonce( 'email' );\n\t\t\twp_update_post([ 'ID' => $this->post->ID, 'post_status' => 'pending' ]);\n\t\t\tsend_moderator_email( $this );\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2dfdf1865f0396fef5038a85e5c39fa8", "score": "0.47492102", "text": "public function disable()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_DISABLE, $payload);\n }", "title": "" }, { "docid": "0810f54d7eaeb65fcbf30ff0fea8edfc", "score": "0.4748822", "text": "function temporarily_disable_payment() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5c440fd0dd5196a024d900d7dbb1f4f0", "score": "0.47480506", "text": "public function unconfirmEmail()\n {\n $this->verified = false;\n $this->token = str_random(30);\n $this->save();\n }", "title": "" }, { "docid": "48e113fdd189034f86b3aab43f7b4486", "score": "0.47471184", "text": "function export_queueFinally(){\n $this->Fields->Token->set( uniqid() );\n $this->Fields->UserId->set( SessionUser::getId() );\n }", "title": "" }, { "docid": "d0117b54ec7d89a844294d8e3098c6c8", "score": "0.4745945", "text": "public function registerEmailMessages()\n {\n\n }", "title": "" }, { "docid": "845342a3b3db07abd799d3e2bbc4c3dc", "score": "0.47446027", "text": "public static function detach_woocommerce_transactional_email( $hook = '', $priority = 10 ) {\n\n\t\tif ( '' === $hook ) {\n\t\t\t$hook = current_filter();\n\t\t}\n\n\t\t// Emails might be queued or sent immediately so we need to remove both\n\t\tremove_action( $hook, array( 'WC_Emails', 'queue_transactional_email' ), $priority );\n\t\tremove_action( $hook, array( 'WC_Emails', 'send_transactional_email' ), $priority );\n\t}", "title": "" }, { "docid": "aa3fcb7e1bc81e835bdfe68f7a045370", "score": "0.4744359", "text": "public function DeleteQueueemail() {\n\t\t\t$this->objQueueemail->Delete();\n\t\t}", "title": "" }, { "docid": "cf7b17ccd0856e9d1a5b4a51e3534c69", "score": "0.47435772", "text": "public function HideEmailBox(){\n\t\tglobal $post;\n\t\tif( isset($post->ID) ){\n\t\t\t$meta = maybe_unserialize( get_post_meta( $post->ID, 'cu_pr_upload_img_notification', TRUE ) );\n\t\t\t\n\t\t\tif( is_array($meta) && $meta['sent']==1 ){\n\t\t\t\t$at = date('F j, Y, g:i a', $meta['at']);\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\t\tjQuery('#acf-email_subject').hide();\n\t\t\t\t\t\tjQuery('#acf-email_content').hide()\n\t\t\t\t\t\t\t.next().prepend('<p>You have already notified the customer on <?php echo $at; ?>. If you want to send it again press the button bellow.</p>');\n\t\t\t\t\t\tjQuery('#notify_for_image_upload').addClass('inactive');\n\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c15352acbb42854e5e4e7accb5fac62d", "score": "0.4741746", "text": "function tb_string_swap_disable_nag() {\n\n\tglobal $current_user;\n\n\tif ( ! isset($_GET['nag-ignore']) ) {\n\t\treturn;\n\t}\n\n\tif ( strpos($_GET['nag-ignore'], 'tb-nag-') !== 0 ) { // meta key must start with \"tb-nag-\"\n\t\treturn;\n\t}\n\n\tif ( isset($_GET['security']) && wp_verify_nonce( $_GET['security'], 'themeblvd-string-swap-nag' ) ) {\n\t\tadd_user_meta( $current_user->ID, $_GET['nag-ignore'], 'true', true );\n\t}\n}", "title": "" }, { "docid": "fb9fd6c27a76bf11fd6ca61c52669029", "score": "0.47342512", "text": "function pre_confirmation_check() {\r\n return false;\r\n }", "title": "" }, { "docid": "fb422b543a7f3ce4089b5041576869ce", "score": "0.4733591", "text": "public function flushEventQueue() {\n\t\t\t$this->pruneEventQueue();\n\t\t\t\n\t\t\t// iterate event queue\n\t\t\tforeach ($this->eventQueue as $event => $data) {\n\t\t\t\tif ($event == 'NODE_PREVIEW') {\n\t\t\t\t\t//require_once(dirname(__FILE__).'/../../../wp-admin/includes/post.php');\n\t\t\t\t\t//wp_create_post_autosave($data['id']);\n\t\t\t\t}\n\t\t\t\t// push event authenticating using api key\n\t\t\t\t$url = $this->getApiUrlPrefix().'event?key='.$this->getApiKey().'&kernel=wordpress&domain='.urlencode($this->domain).'&scope='.urlencode($this->blogId).'&event='.urlencode($event).'&data='.urlencode(serialize($data));\n\t\t\t\twp_remote_get($url);\n\t\t\t\tif ($event == 'NODE_PREVIEW') {\n\t\t\t\t\tupdate_post_meta($data['id'],'bricks_basic_pages_bridge_previewed',true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($_GET['twentysteps_bricks_bridge_wp_invalidate_all']) && current_user_can('manage_options') && check_admin_referer('twentysteps-bricks-bridge-wp')) {\n\t\t\t\t// push event authenticating using api key\n\t\t\t\t$url = $this->getApiUrlPrefix().'event?key='.$this->getApiKey().'&kernel=wordpress&domain='.urlencode($this->domain).'&scope='.urlencode($this->blogId).'&event='.urlencode('INVALIDATE_ALL').'&data='.urlencode(serialize($data));\n\t\t\t\twp_remote_get($url);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "faa6baf41564142c8bc5dc5ebe14d282", "score": "0.47317016", "text": "function mme_addemail($email) {\n\t$option_name = \"custom_emails\";\n\tif ( get_option( $option_name ) !== false ) {\n\n \t// The option already exists, so we just update it.\n \tupdate_option( $option_name, $email );\n\t} else {\n\n\t // The option hasn't been added yet. We'll add it with $autoload set to 'no'.\n\t $deprecated = null;\n\t $autoload = 'no';\n\t add_option( $option_name, $email, $deprecated, $autoload );\n\t}\n}", "title": "" }, { "docid": "80582e4eef0364d12a15427c1d869092", "score": "0.47218695", "text": "public function action_suppress_enable_notice() {\n\t\tupdate_user_meta(get_current_user_id(), 'social_suppress_enable_notice', 'true');\n\t}", "title": "" }, { "docid": "62cfca2930ab67fc1fb8ae607600c0b1", "score": "0.4715167", "text": "function checkEmailAgainstBlacklist($email) {\n return $this->checkAgainstBlacklist('email', $email);\n }", "title": "" }, { "docid": "f6098dc4dc497f963e48e47ea47cf153", "score": "0.47144824", "text": "public function maybe_check_mail() {\n if ( isset( $_GET['bbt_manual_check_mail_test_config'] ) ) {\n $this->hook_check_email();\n }\n }", "title": "" }, { "docid": "bd3f5d3a6f5e9a29b562284465a31a54", "score": "0.47138184", "text": "public function beforeTokenEmail()\r\n\t{\r\n\t\t//Import Plugin configs\r\n\t\t$config_path = (string)$this->getDir() . '\\pluginConfig.php';\r\n\t\t$plugin_configs = include($config_path);\r\n\t\t\r\n\t\t$oEvent = $this->getEvent();\r\n\t\t$surveyId = (string)$oEvent->get('survey');\r\n\t\t$typeOfEmail = $oEvent->get(\"type\");\r\n\r\n\t\t// Before changing any settings we need to check that:\r\n\t\t\t// 1. the sendSMSService is enabled by the admin for this specific survey\r\n\t\t$pluginEnabled = strcmp($this->get('EnableSendSMS','survey',$surveyId),'1')==0;\r\n\t\t\t// 2. Check the type of email, invitaiton or reminder => send, confirmation just ignore (not included in my plans :/).\r\n\t\t$vaildEmailType = (((strcmp($typeOfEmail,'invitation')==0) or (strcmp($typeOfEmail,'reminder')==0)) or (strcmp($typeOfEmail,'confirm')==0));\r\n\t\t$ourTokenData = $oEvent->get(\"token\");\r\n\t\tif($pluginEnabled and $vaildEmailType){\r\n\t\t\t// Then we need to check if the admin added an extra attribute\r\n\t\t\tif(isset($ourTokenData['attribute_1'])){\r\n\t\t\t\t// 3. This invite should be send via SMS and not to the Email account\r\n\t\t\t\t$mobile = (string)$ourTokenData['token'];\r\n\t\t\t\t$client = (string)$ourTokenData['attribute_1'];\r\n\t\t\t\tif(strcmp($client,'NA')!=0 and !empty($client)){\r\n\t\t\t\t\t// disable sending email for this token and send SMS\r\n\t\t\t\t\t$this->event->set(\"send\",false);\r\n\r\n\t\t\t\t\t// we get the token data and prepare the survey link \r\n\t\t\t\t\t$SMS_message = $this->get('MessageBody','survey',$surveyId);\t// The MessageBody entered by the admin\r\n\t\t\t\t\t$participantToken = $ourTokenData['token'];\r\n\t\t\t\t\t$participantFirstName = (string)$ourTokenData['firstname'];\r\n\t\t\t\t\t$participantLastName = (string)$ourTokenData['lastname'];\r\n\t\t\t\t\t$surveyLink = 'http://'. $_SERVER['SERVER_NAME'] . '/index.php/survey/index/sid/' . $surveyId . '/token/' . $participantToken;\t\t\r\n\r\n\t\t\t\t\t// Setting up the default SMS message in case the admin left it empty.\r\n\t\t\t\t\tif(empty($SMS_message)){\r\n\t\t\t\t\t\t$SMS_message = \"Dear {FIRSTNAME} {LASTNAME}, \\n We invite you to participate in the survey: \\n {SURVEYURL} \\n Survey Team\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Replacing the placeholders in the Admin message, so as to have the participant's data.\r\n\t\t\t\t\t$SMS_message_with_Replacement = str_replace(\"{FIRSTNAME}\",$participantFirstName,$SMS_message);\r\n\t\t\t\t\t$SMS_message_with_Replacement = str_replace(\"{LASTNAME}\",$participantLastName,$SMS_message_with_Replacement);\r\n\t\t\t\t\t$SMS_message_ready_to_be_sent = str_replace(\"{SURVEYURL}\",$surveyLink,$SMS_message_with_Replacement);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Since I don't want to send confirmation SMS, only for reminder and confirmation\r\n\t\t\t\t\tif((strcmp($typeOfEmail,'invitation')==0) or (strcmp($typeOfEmail,'reminder')==0)){\r\n\t\t\t\t\t\t// setting up the connection with SMS Service Provider then sending SMS msg\r\n\t\t\t\t\t\t$twilio_sid => $plugin_configs[$client].['Twilio_Account_SID'];\r\n\t\t\t\t\t\t$twilio_token => $plugin_configs[$client].['Twilio_Auth_Token'];\r\n\t\t\t\t\t\t$twilio_from => $plugin_configs[$client].['Twilio_Number'];\r\n\t\t\t\t\t\t$mobile;\r\n\t\t\t\t\t\t$SMS_message_ready_to_be_sent;\r\n\t\t\t\t\t\t$result_of_post = $this->callTwilio($twilio_sid,$twilio_token,$twilio_from,$mobile,$SMS_message_ready_to_be_sent);\r\n\t\t\t\t\t\tif($result_of_post === FALSE){\r\n\t\t\t\t\t\t\techo(\"SMS not sent. Please contact the administrator at survey_admin@xyz.com\");\r\n\t\t\t\t\t\t\texit;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{}\t// Confirmation don't want to send --> change this if you want to enter message and send confirmation SMS\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\techo(\"sendTwilioInvites Plugin is enabled. If you do not wish to send SMS invitations, disable it. If you intend to use it, the SMS was not sent. Please add an extra attribute with the mobile number or NA for emails.\");\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t}else{} // The SendSMSPlugin is not enabled. Don't change anything!\t\r\n\t}", "title": "" }, { "docid": "dd95039b7ec03dbb2b46d3544cfed6be", "score": "0.4713678", "text": "function invit0r_deactivate()\r\n{\r\n\twp_clear_scheduled_hook('invit0r_cron_hook');\r\n}", "title": "" }, { "docid": "48a2055d406b3f2b12820467f5338496", "score": "0.470963", "text": "public static function disablePayment(){\n\t\t$db = \\Config\\Database::connect();\n\t\thelper('settingsviews');\n\t\t$clientDetails = \\SettingsViews::getClientDetails();\n\t\tif(!empty($clientDetails)){\n\t\t\t$email_id = $clientDetails['email_id'];\n\t\t\t$validation_id = $clientDetails['validation_id'];\n\t\t\t$sellerdb = $clientDetails['sellerdb'];\n\t\t\t$store_hash = $clientDetails['store_hash'];\n\t\t\t$acess_token = $clientDetails['acess_token'];\n\t\t\t\n\t\t\t$url = getenv('bigcommerceapp.STORE_URL').$store_hash.'/v2/pages';\n\t\t\t$header = array(\n\t\t\t\t\"X-Auth-Token: \".$acess_token,\n\t\t\t\t\"Accept: application/json\",\n\t\t\t\t\"Content-Type: application/json\"\n\t\t\t);\n\t\t\ttry{\n\t\t\t\t\\SettingsViews::deleteScripts($sellerdb,$acess_token,$store_hash,$email_id,$validation_id);\n\t\t\t}catch(\\Exception $e){\n\t\t\t\tlog_message('info', 'exception:'.$e->getMessage());\n\t\t\t}\n\t\t\t\t$data = [\n\t\t\t\t\t'is_enable' => 0\n\t\t\t\t];\n\t\t\t$builderupdate = $db->table('payu_token_validation'); \n\t\t\t$builderupdate->where('email_id', $email_id); \n\t\t\t$builderupdate->update($data);\n\t\t}\n\t}", "title": "" }, { "docid": "8c5a75b904cad57e00b09cf4726a3864", "score": "0.47091424", "text": "static function check_email_for_duplicates() {\r\n die( WP_CRM_F::check_email_for_duplicates( $_REQUEST['email'], $_REQUEST['user_id'] ) );\r\n }", "title": "" }, { "docid": "a77f5bd1836c9cc5d997982729e8a6f7", "score": "0.47071347", "text": "function mail_queue($email = [])\n\t{\n\t\t$ci = &get_instance();\n\t\t$email = is_array($email) ? (object)$email : $email; \n\n\t\t$email->is_test = IS_LOCAL ? '1' : '0';\n\t\t$email->created_at = date('Y-m-d H:i:s');\n\t\tif (isset($email->_attachment)) {\n\t\t\tif (is_array($email->_attachment))\n\t\t\t\t$email->_attachment = json_encode($email->_attachment);\n\t\t\telseif (is_object($email->_attachment))\n\t\t\t\t$email->_attachment = json_encode((array)$email->_attachment);\n\t\t\telse \n\t\t\t\t$email->_attachment = json_encode([$email->_attachment]);\n\t\t}\n\n\t\tif (!$result = $ci->db->insert('mail_queue', $email))\n\t\t\treturn [FALSE, ['message' => 'Database Error: '.$ci->db->error()['message']]];\n\t\t\n\t\treturn [TRUE, NULL];\n\t}", "title": "" }, { "docid": "c429442eba081967158e615c0f297fd7", "score": "0.47031274", "text": "public function enableDeferredPostMode(): void\n\t{\n\t\t$this->deferredPostMode = true;\n\t}", "title": "" }, { "docid": "37f2d335335fd926bdab288c15d3af77", "score": "0.47024527", "text": "public function stopSendingNotices() {\n\n $this->dbgOut(\"Removing alert notice hook for sequence # \" . $this->sequence_id );\n\n wp_clear_scheduled_hook( 'pmpro_sequence_cron_hook', array( $this->sequence_id ) );\n }", "title": "" }, { "docid": "1b3c5aa37e79d3ae3a031c372891290c", "score": "0.4701499", "text": "public function net_frontend_remove_hook(){\n $post_id = $_POST['post_id'];\n $nonce = $_POST['nonce'];\n $result = 'no';\n $redirect = '';\n \n if( is_user_logged_in() && wp_verify_nonce( $nonce, 'net_remove_post' ) && abs($post_id)>0 ){\n $result = 'yes';\n $redirect = TT_C::get_author_uri(get_current_user_id());\n // wp_trash_post( abs($post_id) );\n wp_delete_post( abs($post_id), true );\n }\n\n echo json_encode( array('result' => $result, 'redirect'=>$redirect) );\n\n exit;\n }", "title": "" }, { "docid": "f3143209b57de4eec8dc8f0d7a7d0860", "score": "0.46968192", "text": "function edd_pup_ajax_trigger(){\n\n\tglobal $wpdb;\n\n\t// Define email_id from AJAX process and make sure it's a number\n\tif ( !empty( $_POST['email_id'] ) && ( absint( $_POST['email_id'] ) != 0 ) ) {\n\t\t$email_id = $_POST['email_id'];\n\n\t// If not available via AJAX, pull it from the transient; Throw an error if transient doesn't exist\n\t} else if ( ( $email_id = get_transient( 'edd_pup_sending_email_'. get_current_user_id() ) ) === false ) {\n\t\techo 'epat_id_err';\n\t\texit;\n\t}\n\n\t// Refresh email ID transient\n\tset_transient( 'edd_pup_sending_email_'. get_current_user_id(), $email_id, 60);\n\n\t$batch = $_POST['iteration'];\n\t$sent = $_POST['sent'];\n\t$limit = 10;\n\t$rows = array();\n\t$testmode = edd_get_option( 'edd_pup_test' );\n\n\t/* Throttle emails if enabled in settings\n\tglobal $edd_options;\n\tif ( isset( $edd_options['edd_pup_throttle'] ) ) {\n\n\t\t$last = $wpdb->query( \"SELECT UNIX_TIMESTAMP(sent_date) FROM $wpdb->edd_pup_queue WHERE email_id = $email_id AND sent = 1 ORDER BY sent_date DESC LIMIT 1\" )\n\t\t$now = time();\n\n\t\tif ( ( $now - $last ) < $edd_options['edd_pup_throttle_int'] ) {\n\t\t\techo json_encode(array('status'=>'new','sent'=>0,'total'=>absint($total),'processed'=>absint($processed+$count)));\n\t\t\texit;\n\t\t}\n\t}*/\n\n\t$query = \"SELECT * FROM $wpdb->edd_pup_queue WHERE email_id = $email_id AND sent = 0 LIMIT $limit\";\n\t$customers = $wpdb->get_results( $query , ARRAY_A);\n\n\n\t// Throw an error if MYSQL returns an error. This will only work if WP_DEBUG_DISPLAY is off.\n\tif ( $wpdb->last_error ) {\n\t\techo 'epat_res_err';\n\t\texit;\n\t}\n\n\tforeach ( $customers as $customer ) {\n\n\t\t\t$trigger = edd_pup_ajax_send_email( $customer['customer_id'], $email_id, $testmode );\n\n\t\t\tif( !$testmode && ( $trigger && 'nothig' !== $trigger ) ){\n\t\t\t\t// Reset file download limits for customers' eligible updates\n\t\t\t\t$customer_updates = edd_pup_get_customer_updates( $customer['customer_id'], $email_id );\n\n\t\t\t\tif ( is_array( $customer_updates ) ) {\n\t\t\t\t\tforeach ( $customer_updates as $download ) {\n\t\t\t\t\t\t$limit = edd_get_file_download_limit( $download['id'] );\n\t\t\t\t\t\tif ( ! empty( $limit ) ) {\n\t\t\t\t\t\t\tedd_set_file_download_limit_override( $download['id'], $customer['customer_id'] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif ( true == $trigger || 'nothig' == $trigger ) {\n\t\t\t\t$rows[] = $customer['eddpup_id'];\n\t\t\t\t$sent++;\n\t\t\t}\n\t}\n\n\t// Designate emails in database as having been sent\n\tif ( ! empty( $rows ) ) {\n\t\t$updateids = implode(',',$rows);\n\t\t$wpdb->query( \"UPDATE $wpdb->edd_pup_queue SET sent=1 WHERE eddpup_id IN ($updateids)\" );\n\t}\n\n\tif ( $wpdb->last_error ) {\n\t\techo 'epat_up_err';\n\t\texit;\n\t}\n\n\techo $sent;\n\texit;\n}", "title": "" }, { "docid": "39fb63582018584c8860d2c7dad68202", "score": "0.46933198", "text": "public function markThreadAsOrphaned($args)\n {\n // Get the thread related to invitation\n $thread = $args['invitation'];\n\n // Check whether the thread is related to automatically sent invitation\n $result = Database::getInstance()->query(\n \"SELECT COUNT(*) AS autoinvited FROM {mibew_autoinvite} WHERE threadid = :threadid\",\n array(':threadid' => $thread->id),\n array('return_rows' => Database::RETURN_ONE_ROW)\n );\n\n if ($result && isset($result['autoinvited']) && ($result['autoinvited'] > 0)) {\n // A visitor was invited automatically, change thread state\n $thread->state = Thread::STATE_WAITING;\n $thread->nextAgent = 0;\n $thread->save(true);\n // Forget about the thread\n $this->forgetThread($args);\n }\n }", "title": "" }, { "docid": "bc1f11d0b865e1dc854219ee65383ddc", "score": "0.46869278", "text": "function wpcom_vip_disable_zemanta_for_all_users() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "title": "" }, { "docid": "f798d9be7764d07f3913b12c724db5be", "score": "0.46630597", "text": "function flipcard_deactivation() {\n unregister_post_type( 'flipcard' );\n // clear the permalinks to remove our post type's rules from the database\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "46619041fe4398ef7df9e17f39adb278", "score": "0.46576923", "text": "function system_twitter_cancelUserToken($email) {\n\t\t\n\t\t$query = \"DELETE FROM twitter_keys WHERE user_id = :email\";\n\t\t$query_params = array(':email' => $email);\n\t\t\n\t\ttry {\n\t\t\t$stmt = $this->db->prepare($query);\n\t\t\t$result = $stmt->execute($query_params);\n\t\t} catch(PDOException $ex) {\n\t\t\t$this->error_message($ex);\n\t\t}\n\t\t\n\t\tif($stmt->rowCount() == 1) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "9bf2b56a9151bb70bd32e9897e77cb32", "score": "0.46564892", "text": "function btpay_config_mails_fn()\n{\n if (!current_user_can('manage_options'))\n {\n wp_die('You do not have sufficient permissions!');\n }\n\n btpay_mail_config_action();\n}", "title": "" }, { "docid": "d0ee3f263e7f9b19621068ec0180b073", "score": "0.46380872", "text": "public function disable2FA(): void\n {\n $this->client->api($this->client::REQUEST_POST, '/profile/tfa-disable');\n }", "title": "" }, { "docid": "ac4d3b8551b3da792f136679b8be9a66", "score": "0.46334827", "text": "function block_spam_deletion_detect_post_spam() {\n global $DB, $USER, $OUTPUT, $PAGE, $SITE;\n\n $postform = optional_param('_qf__mod_forum_post_form', 0, PARAM_BOOL);\n if (!$postform) {\n return;\n }\n\n $postcontent = optional_param_array('message', array(), PARAM_RAW);\n if (!isset($postcontent['text'])) {\n return;\n }\n\n $postsubject = optional_param('subject', null, PARAM_RAW);\n if (!block_spam_deletion_message_is_spammy($postcontent['text'])\n && !block_spam_deletion_message_is_spammy($postsubject)) {\n\n return;\n }\n\n $sql = 'SELECT count(id) FROM {forum_posts} WHERE userid = :userid AND created < :yesterday';\n $params = array('userid' => $USER->id, 'yesterday' => (time() - DAYSECS));\n $postcount = $DB->count_records_sql($sql, $params);\n\n if ($postcount >= 1) {\n // Do nothing, they've got some non-spammy posts.\n return;\n }\n\n // OK - looks like a spammer. Lets stop the post from continuining and notify the user.\n\n // It sucks a bit that we die() becase the user can't easily edit their post if they are real, but\n // this seems to be the best way to make it clear.\n\n $PAGE->set_context(context_system::instance());\n $PAGE->set_url('/');\n $PAGE->set_title(get_string('error'));\n $PAGE->set_heading($SITE->fullname);\n\n echo $OUTPUT->header();\n echo $OUTPUT->heading(get_string('messageblockedtitle', 'block_spam_deletion'));\n echo $OUTPUT->box(get_string('messageblocked', 'block_spam_deletion'));\n echo $OUTPUT->box(html_writer::tag('pre', s($postcontent['text']), array('class' => 'notifytiny')));\n echo $OUTPUT->footer();\n\n die();\n}", "title": "" }, { "docid": "5b59500f62e64a648b0295f11bb63f62", "score": "0.46271136", "text": "protected function useEmailNotifications()\n {\n return true;\n }", "title": "" }, { "docid": "29caeba6af480f796167ad4c28a3f0bd", "score": "0.4619125", "text": "public function disable(): void;", "title": "" }, { "docid": "88f436c2614ee4a4524b7c19796e8cf8", "score": "0.46187288", "text": "function pauseMailQueueClear()\n{\n\tglobal $context, $txt, $time_start;\n\n\t// Try to get more time...\n\t@set_time_limit(600);\n\tif (function_exists('apache_reset_timeout'))\n\t\t@apache_reset_timeout();\n\n\t// Have we already used our maximum time?\n\tif (microtime(true) - $time_start < 5)\n\t\treturn;\n\n\t$context['continue_get_data'] = '?action=admin;area=mailqueue;sa=clear;te=' . $_GET['te'] . ';sent=' . $_GET['sent'] . ';' . $context['session_query'];\n\t$context['page_title'] = $txt['not_done_title'];\n\t$context['continue_post_data'] = '';\n\t$context['continue_countdown'] = '2';\n\twetem::load('not_done');\n\n\t// Keep browse selected.\n\t$context['selected'] = 'browse';\n\n\t// What percent through are we?\n\t$context['continue_percent'] = round(($_GET['sent'] / $_GET['te']) * 100, 1);\n\n\t// Never more than 100%!\n\t$context['continue_percent'] = min($context['continue_percent'], 100);\n\n\tobExit();\n}", "title": "" } ]
55be9cfeb1076ca2f1dc32cf0d5bb6e4
Operation priceModificationCommandUsingPUTAsync Batch offer price modification
[ { "docid": "e829d42ac5cc1617b9e1fc045ddfc029", "score": "0.46670306", "text": "public function priceModificationCommandUsingPUTAsync($command_id, $offer_price_change_command, string $contentType = self::contentTypes['priceModificationCommandUsingPUT'][0])\n {\n return $this->priceModificationCommandUsingPUTAsyncWithHttpInfo($command_id, $offer_price_change_command, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
[ { "docid": "e0c0d3686de4c9d8c26f482127cac720", "score": "0.6271517", "text": "public function updateprices()\n {\n\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"updateval\");\n if (is_array($aParams)) {\n foreach ($aParams as $soxId => $aStockParams) {\n $this->addprice($soxId, $aStockParams);\n }\n }\n }", "title": "" }, { "docid": "873a3e22648d0022078c936f2f785fe6", "score": "0.61679715", "text": "public function api_update_price(){\n $watchlists = $this->wr->all();\n foreach($watchlists as $watchlist)\n {\n $current_price = $this->get_quotes($watchlist->id);\n\n $this->wr->update([\n 'current_price' => $current_price,\n ],$watchlist->id);\n }\n }", "title": "" }, { "docid": "766198824da167db14938dd12b31a6d4", "score": "0.584577", "text": "public function setPrice($sku='',$price='', $array = array()){\n if(!empty($array) ){\n $finalResult = array();\n foreach($array as $sku=>$price){\n $vars = $this->getProduct($sku);\n $vars['price'] = $price;\n $varss['product'] = $vars;\n $vars = json_encode($varss);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->urlPath.\"/rest/V1/products/\".$sku);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $headers = array();\n $headers[] = 'Authorization: Bearer '.$this->apiKey;\n $headers[] = 'Content-Type: application/json';\n $headers[] = 'Accept: application/json';\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n $result = curl_exec($ch);\n\n curl_close ($ch);\n\n $finalResult[$sku] = $result;\n }\n return $finalResult;\n }\n else{\n $vars = $this->getProduct($sku);\n $vars['price'] = $price;\n $varss['product'] = $vars;\n $vars = json_encode($varss);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->urlPath.\"/rest/V1/products/\".$sku);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $headers = array();\n $headers[] = 'Authorization: Bearer '.$this->apiKey;\n $headers[] = 'Content-Type: application/json';\n $headers[] = 'Accept: application/json';\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n $result = curl_exec($ch);\n\n curl_close ($ch);\n return $result;\n }\n\n }", "title": "" }, { "docid": "bcb5c2c08be377c478e42dbd3b7f1ec7", "score": "0.5827376", "text": "public function updatePrices($contractId, $priceList);", "title": "" }, { "docid": "c5d1a2474821b1bfafac7619edbe15ef", "score": "0.5790157", "text": "public function update(Request $request, Price $price)\n {\n //\n }", "title": "" }, { "docid": "c5d1a2474821b1bfafac7619edbe15ef", "score": "0.5790157", "text": "public function update(Request $request, Price $price)\n {\n //\n }", "title": "" }, { "docid": "5077feea361b51632a20a4973551b827", "score": "0.565012", "text": "public function actionUpdateProductBuyBoxPrice()\n {\n $userData = User::find()->andWhere(['IS NOT', 'u_mws_seller_id', null])->all();\n\n foreach ($userData as $user) {\n $productData = FbaAllListingData::find()->andWhere(['created_by' => $user->u_id])->all();\n $skuData = AppliedRepriserRule::find()->select(['arr_sku'])->where(['arr_user_id' => $userData->u_id])->column();\n\n foreach ($productData as $product) {\n $productBuyBox = \\Yii::$app->api->getProductCompetitivePrice($product->seller_sku);\n $product->buybox_price = $productBuyBox;\n\n if(in_array($product->seller_sku, $skuData)) {\n $magicPrice = \\Yii::$app->api->getMagicRepricerPrice($product->seller_sku, $productBuyBox, $product->repricing_min_price, $product->repricing_max_price, $product->repricing_rule_id);\n if($magicPrice) {\n $product->repricing_cost_price = $magicPrice;\n }\n }\n\n if ($product->save(false)) {\n echo $product->asin1 . \" is Updated.\";\n }\n sleep(2);\n }\n sleep(1);\n }\n }", "title": "" }, { "docid": "e5ef9afbb97e22f03b8be9efe2b972e7", "score": "0.5647806", "text": "public function priceModificationCommandUsingPUTRequest($command_id, $offer_price_change_command, string $contentType = self::contentTypes['priceModificationCommandUsingPUT'][0])\n {\n\n // verify the required parameter 'command_id' is set\n if ($command_id === null || (is_array($command_id) && count($command_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $command_id when calling priceModificationCommandUsingPUT'\n );\n }\n\n // verify the required parameter 'offer_price_change_command' is set\n if ($offer_price_change_command === null || (is_array($offer_price_change_command) && count($offer_price_change_command) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $offer_price_change_command when calling priceModificationCommandUsingPUT'\n );\n }\n\n\n $resourcePath = '/sale/offer-price-change-commands/{commandId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($command_id !== null) {\n $resourcePath = str_replace(\n '{' . 'commandId' . '}',\n ObjectSerializer::toPathValue($command_id),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.allegro.public.v1+json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($offer_price_change_command)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($offer_price_change_command));\n } else {\n $httpBody = $offer_price_change_command;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if (!empty($this->config->getAccessToken())) {\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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'PUT',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "90cec2e0050ecd5971be612c49157c4a", "score": "0.55458945", "text": "public function testUpdateSupplierUsingPUT()\n {\n }", "title": "" }, { "docid": "b3412b5a5b54674cef51bf2fe2cd7368", "score": "0.54488504", "text": "public function setPrice($price)\n {\n return $this->set('price', $price);\n }", "title": "" }, { "docid": "6dbcb2119a82b2398d79fb64932dc43f", "score": "0.535158", "text": "function setPrice($new_price)\n {\n $this->price = $new_price;\n }", "title": "" }, { "docid": "33e7799b25adfeedd3c63c5aafa42db6", "score": "0.5346908", "text": "function ciniki_sapos_invoiceUpdatePrices($ciniki, $tnid, $invoice_id, $args) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashIDQuery');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'private', 'itemCalcAmount');\n\n //\n // Get the items from the invoice that have an object defined\n //\n $strsql = \"SELECT id, object, object_id, price_id, quantity, \"\n . \"unit_amount, unit_discount_amount, unit_discount_percentage, unit_preorder_amount \"\n . \"FROM ciniki_sapos_invoice_items \"\n . \"WHERE invoice_id = '\" . ciniki_core_dbQuote($ciniki, $invoice_id) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'item');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['rows']) ) {\n // No items to update\n return array('stat'=>'ok');\n }\n $items = $rc['rows'];\n\n //\n // Update the item prices\n //\n foreach($items as $item) {\n //\n // Get the new price for the object\n //\n if( $item['object'] != '' && $item['object_id'] != '' ) {\n list($pkg,$mod,$obj) = explode('.', $item['object']);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'sapos', 'itemLookup');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $tnid, array(\n 'object'=>$item['object'],\n 'object_id'=>$item['object_id'],\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['item']) ) {\n if( $rc['item']['price_id'] != $item['price_id'] ) {\n $update_args['price_id'] = $rc['item']['price_id'];\n }\n if( $rc['item']['unit_amount'] != $item['unit_amount'] ) {\n $update_args['unit_amount'] = $rc['item']['unit_amount'];\n }\n if( $rc['item']['unit_discount_amount'] > 0\n && $rc['item']['unit_discount_amount'] != $item['unit_discount_amount'] ) {\n $update_args['unit_discount_amount'] = $rc['item']['unit_discount_amount'];\n }\n if( $rc['item']['unit_discount_percentage'] > 0 \n && $rc['item']['unit_discount_percentage'] != $item['unit_discount_percentage'] ) {\n $update_args['unit_discount_percentage'] = $rc['item']['unit_discount_percentage'];\n }\n if( $rc['item']['unit_preorder_amount'] > 0 \n && $rc['item']['unit_preorder_amount'] != $item['unit_preorder_amount'] ) {\n $update_args['unit_preorder_amount'] = $rc['item']['unit_preorder_amount'];\n }\n }\n }\n }\n\n //\n // Calculate new item totals\n //\n $rc = ciniki_sapos_itemCalcAmount($ciniki, array(\n 'quantity'=>$item['quantity'],\n 'unit_amount'=>(isset($update_args['unit_amount'])?$update_args['unit_amount']:$item['unit_amount']),\n 'unit_discount_amount'=>(isset($update_args['unit_discount_amount'])?$update_args['unit_discount_amount']:$item['unit_discount_amount']),\n 'unit_discount_percentage'=>(isset($update_args['unit_discount_percentage'])?$update_args['unit_discount_percentage']:$item['unit_discount_percentage']),\n 'unit_preorder_amount'=>(isset($update_args['unit_preorder_amount'])?$update_args['unit_preorder_amount']:$item['unit_preorder_amount']),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $update_args['subtotal_amount'] = $rc['subtotal'];\n $update_args['discount_amount'] = $rc['discount'];\n $update_args['total_amount'] = $rc['total'];\n\n //\n // Update the item \n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.sapos.invoice_item', \n $item['id'], $update_args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.sapos');\n return $rc;\n }\n }\n\n\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "ed54af226e0e9597846eb3ca43080b2b", "score": "0.53258723", "text": "public function edit(Price $price)\n {\n //\n }", "title": "" }, { "docid": "ed54af226e0e9597846eb3ca43080b2b", "score": "0.53258723", "text": "public function edit(Price $price)\n {\n //\n }", "title": "" }, { "docid": "c5d89a25e3a631849297b401203d4fca", "score": "0.5297702", "text": "public function editPriceMoney(){\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "10c0eef4168d2ae7a7461060b00bb5b5", "score": "0.5263277", "text": "public function testUpdateFinancialStatementUsingPut()\n {\n }", "title": "" }, { "docid": "1ee207fe7d75ec634d8e984f5f5b0795", "score": "0.52481246", "text": "public function setPrice($price)\n {\n $this->price = $price;\n }", "title": "" }, { "docid": "baf42bb6454307d6da79fafb759d1e66", "score": "0.5224044", "text": "function update_price($symbol = null) {\n\n $whereCondition = \"WHERE user_id = \".$this->user->user_id.\" AND symbol = '\".$symbol.\"';\";\n DB::instance(DB_NAME)->update(\"transactions\", $_POST, $whereCondition);\n\n }", "title": "" }, { "docid": "db75bd73a7c9dcae9c7af4e67561abc0", "score": "0.51957464", "text": "static function updateAmazonPrice( $item, $target_price, $verbose ) {\n\n // make sure we don't go below min_price\n if ( $item->min_price ) {\n $target_price = max( $target_price, $item->min_price );\n }\n\n // make sure we don't go above max_price (prevent feed error)\n if ( $item->max_price ) {\n $target_price = min( $target_price, $item->max_price );\n }\n\n // skip if there is no change in price\n if ( $target_price == $item->price ) {\n if ( $verbose ) wpla_show_message( $item->sku.': price was not altered to stay within min/max boundaries.' );\n WPLA()->logger->info('updateAmazonPrice(): '.$item->sku.': price was not altered to stay within min/max boundaries.');\n return false;\n }\n\n\n // update amazon price in WooCommerce\n update_post_meta( $item->post_id, '_amazon_price', $target_price );\n\n // update price in listings table\n $data = array( \n 'price' => $target_price,\n 'pnq_status' => 1, // mark price as changed\n );\n WPLA_ListingsModel::updateWhere( array( 'id' => $item->id ), $data );\n\n\n // show message\n if ( $verbose ) wpla_show_message( $item->sku.': price was changed from '.$item->price.' to <b>'.$target_price.'</b>' );\n WPLA()->logger->info('updateAmazonPrice(): '.$item->sku.': price was changed from '.$item->price.' to '.$target_price);\n\n // price was changed\n return true;\n\n }", "title": "" }, { "docid": "612c0c6a17fb13c9d95d77be6b4ff046", "score": "0.5177804", "text": "function setPrice($price)\n {\n $this->price = $price;\n }", "title": "" }, { "docid": "82aefd63d365c15535d5a5a43b616cd9", "score": "0.51644903", "text": "function update_magento_stocks($token,$items){\r\n\r\n $headers = array('Content-Type:application/json','Authorization:Bearer '.$token);\r\n\r\n $ch = curl_init();\r\n\r\n foreach($items as $item){\r\n \r\n try {\r\n $apiProdUrl = \"https://your-domain/rest/V1/products/\".$item[\"code\"];\r\n \r\n $product = [ \r\n \"product\" => [ \r\n \"sku\" => $item[\"code\"],\r\n \"extension_attributes\"=> [ \r\n \"stock_item\"=> [ \r\n \"qty\"=> $item[\"stock\"],\r\n \"is_in_stock\"=> 1\r\n ]\r\n ]\r\n ]\r\n ];\r\n \r\n \r\n $product_string = json_encode($product);\r\n \r\n $ch = curl_init();\r\n curl_setopt($ch,CURLOPT_URL, $apiProdUrl);\r\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $product_string);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\r\n $response = curl_exec($ch);\r\n \r\n $response = json_decode($response, TRUE);\r\n curl_close($ch);\r\n \r\n echo \"Item with sku: \". $item[\"code\"] . \" updated into magento!\";\r\n \r\n }\r\n catch(Exception $e){\r\n echo 'Caught exception: ', $e->getMessage(), \"\\n\";\r\n }\r\n\r\n }\r\n\r\n \r\n \r\n\r\n\r\n}", "title": "" }, { "docid": "17c3b548d71afd498b66168f3165f7c6", "score": "0.51309884", "text": "function editPrices() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\t\tglobal $id;\n\t\t$HTML->details(1);\n\n\t\t$this->getPrices();\n\n\t\t$price_groups = $this->priceGroupClass->getItems();\n\t\t$countries = $this->countryClass->getItems();\n\n\t\t$_ = '';\n\t\t$_ .= '<div class=\"c init:form form:action:'.$page->url.'\" id=\"container:prices\">';\n\t\t$_ .= '<div class=\"c\">';\n\n\t\t$_ .= $HTML->inputHidden(\"id\", $id);\n\t\t$_ .= $HTML->inputHidden(\"item_id\", $id);\n\n\t\t$_ .= $HTML->head(\"Prices\", \"2\");\n\n\t\tif(Session::getLogin()->validatePage(\"prices_update\")) {\n\t\t\t$_ .= $HTML->inputHidden(\"page_status\", \"prices_update\");\n\t\t}\n\n\t\tif($this->item() && count($this->item[\"id\"]) == 1) {\n\n\t\t\tforeach($countries[\"id\"] as $country_key => $country_id) {\n\n\t\t\t\t$_ .= '<div class=\"ci33\">';\n\n\t\t\t\t\t$_ .= $HTML->head($countries[\"values\"][$country_key], 3);\n\n\t\t\t\t\tforeach($price_groups[\"uid\"] as $index => $price_group_uid) {\n\t\t\t\t\t\t$price = ($this->item[\"price\"][0] && isset($this->item[\"price\"][0][$country_id][$price_group_uid])) ? $this->item[\"price\"][0][$country_id][$price_group_uid] : \"\";\n\t\t\t\t\t\t$_ .= $HTML->input($price_groups[\"values\"][$index], \"prices[$country_id][$price_group_uid]\", $price);\n\t\t\t\t\t}\n\n\t\t\t\t\t$_ .= $HTML->separator();\n\t\t\t\t$_ .= '</div>';\n\n\t\t\t}\n\t\t}\n\n\t\t$_ .= '</div>';\n\n\t\t$_ .= $HTML->smartButton($this->translate(\"Cancel\"), false, \"prices_cancel\", \"fleft key:esc\");\n\t\t$_ .= $HTML->smartButton($this->translate(\"Save\"), false, \"prices_update\", \"fright key:s\");\n\n\t\t$_ .= '</div>';\n\n\t\treturn $_;\n\t}", "title": "" }, { "docid": "9eb34cda0241bee4e008e9814a16682c", "score": "0.5127553", "text": "public function testUpdateMetadata2UsingPUT()\n {\n }", "title": "" }, { "docid": "a26b1c5017a94aef9ba0bc9dc7644ade", "score": "0.5123173", "text": "public function saved(Price $price)\n {\n PriceItem::where('price_id', $price->id)->delete();\n\n $productId = request()->input('product_id');\n\n foreach (request()->input('prices', []) as $priceInput) {\n $priceCategoryAttributes = [\n 'product_id' => $productId,\n ];\n\n foreach (config('app.locales') as $lang => $locale) {\n $priceCategoryAttributes[\"title_{$lang}\"] = $priceInput['category'][$lang];\n }\n\n $priceCategory = PriceCategory::firstOrCreate($priceCategoryAttributes);\n\n $priceItemAttributes = [\n 'price_id' => $price->id,\n 'price_category_id' => $priceCategory->id,\n ];\n foreach ($priceInput['items'] as $item) {\n $priceItemAttributes['price'] = $item['price'];\n $priceItemAttributes['date_start'] = $item['date_start'];\n $priceItemAttributes['date_end'] = $item['date_end'];\n\n foreach (config('app.locales') as $lang => $locale) {\n $priceItemAttributes[\"title_{$lang}\"] = $item['title'][$lang];\n }\n }\n\n PriceItem::create($priceItemAttributes);\n }\n }", "title": "" }, { "docid": "95bc5137871211972c475f9db86981db", "score": "0.5122008", "text": "public function gETPriceIdPriceListRequest($price_id)\n {\n // verify the required parameter 'price_id' is set\n if ($price_id === null || (is_array($price_id) && count($price_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $price_id when calling gETPriceIdPriceList'\n );\n }\n\n $resourcePath = '/prices/{priceId}/price_list';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($price_id !== null) {\n $resourcePath = str_replace(\n '{' . 'priceId' . '}',\n ObjectSerializer::toPathValue($price_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\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\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": "36d6fada0c02d7dcd7a5edbe00b5cf8d", "score": "0.51032436", "text": "public function testUpdateCategoryUsingPUT()\n {\n }", "title": "" }, { "docid": "007409c94b8713b5ced235c73680ac85", "score": "0.5086826", "text": "function setItem_price($price){\n $this->item_price = $price;\n }", "title": "" }, { "docid": "7680e535ddc097a7c7467f63a1aaeab1", "score": "0.5081839", "text": "public function testUpdateMetadata1UsingPUT()\n {\n }", "title": "" }, { "docid": "8b9a95aa47bb556b702eb7be6044fa88", "score": "0.50712687", "text": "static public function set($price)\n {\n try {\n if(!preg_match(\"([1-9][0-9]*)\", $price))\n throw new \\Exception(\"___ Wrong price \" . $price . \" ___\");\n } catch (\\Exception $e) {\n exit($e->getMessage());\n }\n\n $private_key = 'privatekey';\n $public_key = 'publickey';\n\n $data = base64_encode(json_encode(array(\n 'public_key' => $public_key,\n 'version' => '3',\n 'action' => 'pay',\n 'amount' => $price,\n 'currency' => 'UAH',\n 'description' => \" Payment for car\",\n 'sandbox' => '1')));\n\n\n $signature = base64_encode( sha1($private_key . $data . $private_key, 1 ));\n return json_encode(array(\"data\" => $data, \"signature\" => $signature));\n }", "title": "" }, { "docid": "992fa5332c94c974ca11f9fac5b9561f", "score": "0.50599295", "text": "function updateAmazonProductsPrices($items)\n{\n\tif (sizeof($items) > 0) {\n\t\t$data['lastmod'] = time();\n\t\t$data['lastmod_user'] = getAmazonSessionUserId();\n\t\t$data['lastpriceupdate'] = time();\n\t\t$data['submitedProduct'] = 0;\n\t\t$data['submitedPrice'] = 0;\n\t\t$data['upload'] = 1;\n\t\t$caseStandardPrice = \"StandardPrice = CASE\";\n\t\tforeach($items as $key => $item)\n\t\t{\n\t\t\t$caseStandardPrice.= \"\\n WHEN id_product = \" . $items[$key]['id_product'] . \" THEN \" . $items[$key]['price'];\n\t\t\t$productsIds[] = $items[$key]['id_product'];\n\t\t}\n\t\t$caseStandardPrice.= \"\n\t\t\tEND\n\t\t\tWHERE id_product IN (\" . implode(\", \", $productsIds) . \")\n\t\t\";\n\t\t$addWhere\t = $caseStandardPrice;\n\t\tSQLUpdate('amazon_products', $data, $addWhere, 'shop', __FILE__, __LINE__);\n\t}\n}", "title": "" }, { "docid": "4e5cb3226b807de3a1dac912922e72a9", "score": "0.5052047", "text": "public function update($id)\n\t{\n\t\t// TODO: Implement update() method.\n//\t\treturn Input::all();\n//\t\tpricemin: 900000\n//pricevalue: 90041\n\t\tif (!Input::has('pricevalue')) throw new \\Exception( 'Need Price Value' );\n\t\tif (!Input::has('pricemin')) throw new \\Exception( 'Need Price Minimal' );\n\t\t$price = Input::get('pricevalue');\n\t\t$pricemin = Input::get('pricemin');\n\t\tif (intval($pricemin) > intval($price)) return Response::json(['success' => false, 'reason' => 'Nilai harga Minimal tidak boleh lebih besar dari Harga']);\n\n\t\t$setPrice = $this->price->findOrFail($id);\n\t\t$setPrice->price = $price;\n\t\t$setPrice->pricemin = $pricemin;\n\t\t$saved = $setPrice->save();\n\t\treturn ( $saved ) ? Response::json(array_merge($setPrice->toArray(), [\n\t\t\t'success' => true,\n\t\t\t'reason' => 'Updated Price berhasil dilakukan'\n\t\t]))\n\t\t\t: Response::json(['success' => false, 'reason' => 'Gagal Update, Silahkan Coba lagi']);\n\t}", "title": "" }, { "docid": "c26a27c37037ace9405646ff83256d0e", "score": "0.4981121", "text": "public function setPrice ($price){\n\t\tif(!is_numeric($price)){\n\t\t\treturn;\n\t\t}\n\t\t$this->Item['price'] = $price;\n\t}", "title": "" }, { "docid": "b79902832d07b1c0f5f32e8bc842d08a", "score": "0.4976065", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|unique:prices,name,' . $id,\n 'order' => 'required|unique:prices,order,' . $id\n ]);\n if ($validator->fails()) {\n $message = '';\n foreach ($validator->errors()->all() as $error) {\n $message .= $error . ' | ';\n }\n Session::flash('message', $message);\n Session::flash('alert-class', 'alert-error');\n return Redirect::back()->withInput();\n }\n\n $dataUser = Auth::user();\n $price = Price::find($id);\n $price->name = Input::get('name');\n $price->pct = Input::get('pct');\n $price->pct_min = Input::get('pct_min');\n $price->amount = Input::get('amount');\n $price->amount_min = Input::get('amount_min');\n $price->cant_min = Input::get('cant_min');\n $price->cant_max = Input::get('cant_max');\n $price->date_min = Input::get('date_min');\n $price->date_max = Input::get('date_max');\n $price->order = Input::get('order');\n $price->main = Input::get('main');\n $price->active = Input::get('active');\n $price->updated_by = $dataUser->id;\n $price->save();\n\n $price->pagos()->sync($request->input('pagos', []));\n $price->items()->sync($request->input('items', []));\n\n\n Session::flash('message', 'Precio actualizado correctamente');\n return Redirect::to('prices');\n }", "title": "" }, { "docid": "03b1c1f089ac6af5ecc84a5d1b689892", "score": "0.49662656", "text": "public function updateTaskPricesAndValues()\n\t{\n\t $tasks = Auth::user()->assigned_tasks();\n foreach($tasks as $task)\n {\n if(false) $task = new Task();\n $price = $task->getPrice();\n if($price > 0) continue;\n $task->setPrice($this->base_price);\n $task->save();\n \t\t}\n\n\t}", "title": "" }, { "docid": "46074fe0348774a685a4e0ca01f9a07e", "score": "0.49657834", "text": "function woocommerce_rrp_add_bulk_on_edit() {\n\t\t\tglobal $typenow;\n\t\t\t$post_type = $typenow;\n\t\t\t\n\t\t\tif($post_type == 'product') {\n\t\t\t\t\n\t\t\t\t// get the action\n\t\t\t\t$wp_list_table = _get_list_table('WP_Posts_List_Table'); // depending on your resource type this could be WP_Users_List_Table, WP_Comments_List_Table, etc\n\t\t\t\t$action = $wp_list_table->current_action();\n\t\t\t\t\n\t\t\t\t$allowed_actions = array(\"set_price_to_rrp\");\n\t\t\t\tif(!in_array($action, $allowed_actions)) return;\n\t\t\t\t\n\t\t\t\t// security check\n\t\t\t\tcheck_admin_referer('bulk-posts');\n\t\t\t\t\n\t\t\t\t// make sure ids are submitted. depending on the resource type, this may be 'media' or 'ids'\n\t\t\t\tif(isset($_REQUEST['post'])) {\n\t\t\t\t\t$post_ids = array_map('intval', $_REQUEST['post']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(empty($post_ids)) return;\n\t\t\t\t\n\t\t\t\t// this is based on wp-admin/edit.php\n\t\t\t\t$sendback = remove_query_arg( array('price_setted_to_rrp', 'untrashed', 'deleted', 'ids'), wp_get_referer() );\n\t\t\t\tif ( ! $sendback )\n\t\t\t\t\t$sendback = admin_url( \"edit.php?post_type=$post_type\" );\n\t\t\t\t\n\t\t\t\t$pagenum = $wp_list_table->get_pagenum();\n\t\t\t\t$sendback = add_query_arg( 'paged', $pagenum, $sendback );\n\t\t\t\t\n\t\t\t\tswitch($action) {\n\t\t\t\t\tcase 'set_price_to_rrp':\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if we set up user permissions/capabilities, the code might look like:\n\t\t\t\t\t\t//if ( !current_user_can($post_type_object->cap->export_post, $post_id) )\n\t\t\t\t\t\t//\twp_die( __('You are not allowed to export this post.') );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$price_setted_to_rrp = 0;\n\t\t\t\t\t\tforeach( $post_ids as $post_id ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$buy_price = get_post_meta($post_id, 'buy_price', true);\n\t\t\t\t\t\t\t$rrp_calc_params = array(\n\t\t\t\t\t\t\t\t'ads_cost' => get_rrp_param($post_id, 'ads_cost'),\t\n\t\t\t\t\t\t\t\t'shipping_cost' => get_rrp_param($post_id, 'shipping_cost'),\t\n\t\t\t\t\t\t\t\t'package_cost' => get_rrp_param($post_id, 'package_cost'),\t\n\t\t\t\t\t\t\t\t'min_profit' => get_rrp_param($post_id, 'min_profit'),\t\n\t\t\t\t\t\t\t\t'desired_profit' => get_rrp_param($post_id, 'desired_profit'),\t\n\t\t\t\t\t\t\t\t'tax_rate' => get_rrp_param($post_id, 'tax_rate'),\n\t\t\t\t\t\t\t);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$caluculated_rrp = calculate_rrp($buy_price, $rrp_calc_params);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdate_post_meta( $post_id, '_regular_price', $caluculated_rrp );\n\t\t\t\n\t\t\t\t\t\t\t$price_setted_to_rrp++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sendback = add_query_arg( array('price_setted_to_rrp' => $price_setted_to_rrp, 'ids' => join(',', $post_ids) ), $sendback );\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault: return;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback );\n\t\t\t\t\n\t\t\t\twp_redirect($sendback);\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d45feb6b371dfafc7ac18fff8511e0da", "score": "0.4964113", "text": "public function test_comicEntityIsCreated_prices_setPrices()\n {\n $sut = $this->getSUT();\n $prices = $sut->getPrices();\n $expected = [\n Price::create(\n 'printPrice',\n 19.99\n ),\n ];\n\n $this->assertEquals($expected, $prices);\n }", "title": "" }, { "docid": "646e618aa3fad0c320235d0d7134fd37", "score": "0.4963213", "text": "public function update(Request $request, ProductPrice $productPrice)\n {\n $productPrice->update($request->all());\n return response()->json($productPrice);\n }", "title": "" }, { "docid": "c0ded34b50f3aff1a79f896aab777df6", "score": "0.49617633", "text": "public function update(Request $request, $id)\n {\n $price=PriceRange::find($id);\n $price->minprice = $request->minprice;\n $price->maxprice = $request->maxprice;\n $price->update();\n }", "title": "" }, { "docid": "aa4978594d4a9c79fbd8cbe6af5e2301", "score": "0.4947258", "text": "public function item_setprice($item)\n {\n if ($item['product_type'] != 2 || $item['product_payment'] != 'prepay') return;\n\n $db = db(config('db'));\n\n if ($_POST)\n {\n $db -> beginTrans();\n\n switch ($item['objtype'])\n {\n case 'room':\n $data = $this -> _format_room_price($item);\n\n // close old price\n $where = \"`supply`='EBK' AND `supplyid`=:sup AND `payment`=3 AND `hotel`=:hotel AND `room`=:room AND `date`>=:start AND `date`<=:end\";\n $condition = array(':sup'=>$item['pid'], ':hotel'=>$item['objpid'], ':room'=>$item['id'], ':start'=>$_POST['start'], ':end'=>$_POST['end']);\n $rs = $db -> prepare(\"UPDATE `ptc_hotel_price_date` SET `close`=1, `price`=0 WHERE {$where}\") -> execute($condition);\n if ($rs === false)\n json_return(null, 6, '保存失败,请重试');\n\n if ($data)\n {\n $data = array_values($data);\n list($column, $sql, $value) = array_values(insert_array($data));\n\n $_columns = update_column(array_keys($data[0]));\n $rs = $db -> prepare(\"INSERT INTO `ptc_hotel_price_date` {$column} VALUES {$sql} ON DUPLICATE KEY UPDATE {$_columns};\") -> execute($value); //var_dump($rs); exit;\n if (false == $rs)\n {\n $db -> rollback();\n json_return(null, 7, '数据保存失败,请重试~');\n }\n }\n break;\n\n case 'auto':\n $data = $this -> _format_auto_price($item);\n\n // close old price\n $where = \"`auto`=:auto AND `date`>=:start AND `date`<=:end\";\n $condition = array(':auto'=>$item['objpid'], ':start'=>$_POST['start'], ':end'=>$_POST['end']);\n $rs = $db -> prepare(\"UPDATE `ptc_auto_price_date` SET `close`=1, `price`=0 WHERE {$where}\") -> execute($condition);\n if ($rs === false)\n json_return(null, 6, '保存失败,请重试');\n\n if ($data)\n {\n $data = array_values($data);\n list($column, $sql, $value) = array_values(insert_array($data));\n\n $_columns = update_column(array_keys($data[0]));\n $rs = $db -> prepare(\"INSERT INTO `ptc_auto_price_date` {$column} VALUES {$sql} ON DUPLICATE KEY UPDATE {$_columns};\") -> execute($value); //var_dump($rs); exit;\n if (false == $rs)\n {\n $db -> rollback();\n json_return(null, 7, '数据保存失败,请重试~');\n }\n }\n break;\n }\n\n if (false === $db -> commit())\n json_return(null, 9, '数据保存失败,请重试~');\n else\n json_return($rs);\n }\n\n $month = !empty($_GET['month']) ? $_GET['month'] : date('Y-m');\n\n $first = strtotime($month.'-1');\n $first_day = date('N', $first);\n\n $start = $first_day == 7 ? $first : $first - $first_day * 86400;\n $end = $start + 41 * 86400;\n\n switch ($item['objtype'])\n {\n case 'room':\n $_date = $db -> prepare(\"SELECT `key`,`date`,`price`,`breakfast`,`allot`,`sold`,`filled`,`standby`,`close` FROM `ptc_hotel_price_date` WHERE `supply`='EBK' AND `supplyid`=:sup AND `hotel`=:hotel AND `room`=:room AND `date`>=:start AND `date`<=:end AND `close`=0\")\n -> execute(array(':sup'=>$item['pid'], ':hotel'=>$item['objpid'], ':room'=>$item['id'], ':start'=>$start, ':end'=>$end));\n break;\n\n case 'auto':\n $_date = $db -> prepare(\"SELECT `key`,`date`,`price`,`child`,`baby`,`allot`,`sold`,`filled`,`close` FROM `ptc_auto_price_date` WHERE `auto`=:auto AND `date`>=:start AND `date`<=:end AND `close`=0\")\n -> execute(array(':auto'=>$item['objpid'], ':start'=>$start, ':end'=>$end));\n break;\n }\n\n $date = array();\n foreach ($_date as $v)\n {\n $date[$v['date']] = $v;\n }\n unset($_date);\n\n include dirname(__FILE__).'/product/price_'.$item['objtype'].'.tpl.php';\n }", "title": "" }, { "docid": "c96098ae9b7b727d9ff88bef6e4d8649", "score": "0.49440366", "text": "function setPrice($classId, $price) {\r\n $data['classPrice'] = $price;\r\n $this->db->where('id', $classId);\r\n $this->db->update('class', $data);\r\n }", "title": "" }, { "docid": "ba78b120ec2c680e03f541c4e57382cc", "score": "0.49427488", "text": "public function setPriceAttribute($value)\n {\n $this->attributes['price'] = $value * 100;\n }", "title": "" }, { "docid": "9af7cb5977eba48466338ba85d584f60", "score": "0.4911663", "text": "public function setPriceAttribute($value)\n {\n $this->attributes['price'] = $value*100;\n }", "title": "" }, { "docid": "cb002f5e3273105353630cbc97d90435", "score": "0.49044", "text": "private function updateHistoryTransaction($editprice)\n {\n $history_of_transaction = HistoryTransaction::where('id_user_park', $editprice['id_user_park'])\n ->update(\n [\n 'price' => $editprice['price'],\n 'updated_at' => now(),\n ]\n );\n return $history_of_transaction;\n }", "title": "" }, { "docid": "b73ce2e5f91b0e324fe94add71d31411", "score": "0.4899046", "text": "function setSyncItemsPriceAction()\n {\n }", "title": "" }, { "docid": "ef9eb86b27321f97f488e3eca01fb62d", "score": "0.48729673", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->prices = $model->getAllPrices();\n $modelPrice = [new InventoryPrice()];\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n $prices = Yii::$app->request->post();\n $oldPrices = ArrayHelper::map($model->prices, 'id', 'id');\n $currentPrices = ArrayHelper::map($prices['Inventory']['prices'], 'id', 'id');\n $deletedPrices = array_diff($oldPrices, array_filter($currentPrices));\n\n $transaction = Yii::$app->db->beginTransaction();\n try {\n $model->save();\n\n // detete price\n if (!empty($deletedPrices)) {\n InventoryPrice::deleteAll(['id' => $deletedPrices]);\n }\n\n foreach ($prices['Inventory']['prices'] as $key => $item) {\n if (empty($item['id'])) {\n $modelPrice = new InventoryPrice();\n $modelPrice->created_at = time();\n $modelPrice->created_by = Yii::$app->user->id;\n } else {\n $modelPrice = InventoryPrice::find()->where(['id' => $item['id']])->one();\n }\n $modelPrice->inventory_id = $model->id;\n $modelPrice->vendor_id = $item['vendor_id'];\n $modelPrice->vendor_name = @Inventory::getVendorName($modelPrice->vendor_id);\n $modelPrice->price = $item['price'];\n $modelPrice->due_date = $item['due_date'];\n $modelPrice->active = !isset($item['active']) ? InventoryPrice::STATUS_INACTIVE : $item['active'];\n\n\n if ($modelPrice->price && $modelPrice->vendor_id) {\n $modelPrice->save(false);\n }\n }\n\n\n $transaction->commit();\n Yii::$app->session->setFlash('success', 'เพิ่มสินค้าใหม่เรียบร้อย');\n return $this->redirect(['view', 'id' => $model->id]);\n } catch (Exception $e) {\n $transaction->rollBack();\n Yii::$app->session->setFlash('error', $e->getMessage());\n return $this->redirect(['update', 'id' => $model->id]);\n }\n\n\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'modelPrice' => $modelPrice,\n ]);\n }\n }", "title": "" }, { "docid": "328516a27150137c8858423515d44e58", "score": "0.48615438", "text": "public function update( $data ){\n\t\t$response = $this->curl->put( $this->api_url . '/' . $data['id'], [ \n\t\t\t'access_token' \t\t\t\t=> $this->token,\n\t\t\t'name'\t\t\t\t\t\t=> $data['name'],\n\t\t\t'url'\t\t\t\t\t\t=> $data['url'],\n\t\t\t'price'\t\t\t\t\t\t=> $data['price'],\n\t\t\t'description'\t\t\t\t=> $data['description'],\n\t\t\t'preview_url'\t\t\t\t=> $data['preview_url'],\n\t\t\t'countries_available'\t\t=> $data['countries_available'],\n\t\t\t'max_purchase_count'\t\t=> $data['max_purchase_count'],\n\t\t\t'customizable_price'\t\t=> $data['customizable_price'],\n\t\t\t'webhook'\t\t\t\t\t=> $data['webhook'],\n\t\t\t'require_shipping'\t\t\t=> $data['require_shipping'],\n\t\t\t'shown_on_profile'\t\t\t=> $data['shown_on_profile'],\n\t\t\t'custom_receipt'\t\t\t=> $data['custom_receipt'],\n\t\t\t'custom_summary'\t\t\t=> $data['custom_summary'],\n\t\t\t'custom_product_type'\t\t=> $data['custom_product_type'],\n\t\t\t'custom_filetype'\t\t\t=> $data['custom_filetype'],\n\t\t\t'custom_permalink'\t\t\t=> $data['custom_permalink']\n\t\t]);\n\t\t\n\t\treturn $response;\n \t}", "title": "" }, { "docid": "ed3897c733213dd61182dcf529f493f9", "score": "0.48504838", "text": "public function index() {\n\t\t\n\t\t$this->document->setTitle($this->language->get('商品批量修改')); \n $this->data['breadcrumbs'] = array();\n\n\t\t$this->data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('text_home'),\n\t\t\t'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),\n\t\t\t'separator' => false\n\t\t);\n\n\t\t$this->data['breadcrumbs'][] = array(\n\t\t\t'text' => \"商品批量修改\",\n\t\t\t'href' => $this->url->link('batch/product_update', 'token=' . $this->session->data['token'], 'SSL'), \t\t\n\t\t\t'separator' => ' :: '\n\t\t);\n\n\t\t$this->data['download'] = $this->url->link('batch/product_update/download', 'token=' . $this->session->data['token'], 'SSL');\n\t\t$this->data['upload'] = $this->url->link('batch/product_update/upload', 'token=' . $this->session->data['token'], 'SSL');\t\n $this->data['token'] = $this->session->data['token'];\n\t\t\n\t\tif (isset($this->error['warning'])) {\n\t\t\t$this->data['error_warning'] = $this->error['warning'];\n\t\t} else {\n\t\t\t$this->data['error_warning'] = '';\n\t\t}\n\n\t\tif (isset($this->session->data['success'])) {\n\t\t\t$this->data['success'] = $this->session->data['success'];\n\n\t\t\tunset($this->session->data['success']);\n\t\t} else {\n\t\t\t$this->data['success'] = '';\n\t\t}\n\t $this->template = 'batch/product_update.tpl';\n\t\t$this->children = array(\n\t\t\t'common/header',\n\t\t\t'common/footer'\n\t\t);\n\n\t\t$this->response->setOutput($this->render());\n\t}", "title": "" }, { "docid": "483e45857ad7222f0697e04db4ebb0e5", "score": "0.48481694", "text": "public function updateJobWithSalesAndPrices(array $updateData, int $jobId);", "title": "" }, { "docid": "ea21d67046bf2cfe81c601f8b84d508a", "score": "0.48304328", "text": "public function place_put() {\n $payloadData = json_decode($this->put('payload'), TRUE);\n $payment_method = $this->put('payment_method');\n $address_id = $this->put('address_id');\n $medium = $this->put('medium');\n\n if (empty($payloadData)) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Invalid payload data.'));\n }\n\n // validates json payload and paramenters\n $requiredParams = array('product_id', 'quantity');\n $productArray = array();\n\n foreach ($payloadData as $pKey => $prodRow) {\n foreach ($requiredParams as $reqKey) {\n if (!array_key_exists($reqKey, $prodRow) || empty($prodRow[$reqKey])) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => $reqKey . ' key required in json payload array position ' . $pKey));\n }\n }\n array_push($productArray, $prodRow['product_id']);\n }\n\n if (empty($payment_method)) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Invalid payment_method param.'));\n }\n if (empty($address_id)) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Invalid address_id param.'));\n }\n //if ($medium != '1' || $medium != '0') {\n if (!($medium == '1' || $medium == '0')) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Invalid medium param.'));\n }\n\n $productData = $this->order->get_products($productArray, array('prod_id as product_id', 'prod_title as title', 'prod_price as price', 'price_unit as unit ', 'uacct_id as supplier_id', 'prod_discount as discount', 'flat_discount', 'delivery_charge')\n );\n\n if (count($productData) != count($payloadData)) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => \"Invalid product_id in json payload.\"));\n }\n\n foreach ($productData as $pKey => $prodRow) {\n $productData[$pKey]['quantity'] = $payloadData[$pKey]['quantity'];\n if ((int) $prodRow['discount'] == 0) {\n unset($productData[$pKey]['discount']);\n }\n if ((int) $prodRow['flat_discount'] == 0) {\n unset($productData[$pKey]['flat_discount']);\n }\n }\n\n $totalAmount = $totalDiscount = $totalDeliveryCharge = 0;\n\n foreach ($productData as $pKey => $prodRow) {\n if (!is_array($prodRow)) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Invalid json payload.'));\n }\n\n $totalAmount = $totalAmount + ($prodRow['price'] * $prodRow['quantity']);\n $productAmount = ($prodRow['price'] * $prodRow['quantity']);\n\n if (isset($prodRow['flat_discount']) && !empty($prodRow['flat_discount'])) {\n\n if ($prodRow['flat_discount'] > $prodRow['price']) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Invalid product flat_discount key near array position ' . $pKey . ' in payload.'));\n }\n\n $totalDiscount = $totalDiscount + ($prodRow['flat_discount'] * $prodRow['quantity']);\n $productData[$pKey]['total_amount'] = ($prodRow['price'] * $prodRow['quantity']);\n $productData[$pKey]['total_discount'] = ($prodRow['flat_discount'] * $prodRow['quantity']);\n }\n\n if (isset($prodRow['discount']) && !empty($prodRow['discount'])) {\n $productDiscount = ($prodRow['discount'] * $prodRow['price'] / 100) * $prodRow['quantity'];\n $totalDiscount = $totalDiscount + $productDiscount;\n $productData[$pKey]['total_amount'] = ($prodRow['price'] * $prodRow['quantity']);\n $productData[$pKey]['total_discount'] = $productDiscount;\n }\n if (isset($prodRow['sale_id']) && !empty($prodRow['sale_id'])) {\n $saleData = array();\n // add sale logic here\n }\n\n if (!isset($productData[$pKey]['total_amount'])) {\n $productData[$pKey]['total_amount'] = $productAmount;\n }\n if (!isset($productData[$pKey]['total_discount'])) {\n $productData[$pKey]['total_discount'] = 0;\n }\n $totalDeliveryCharge = $totalDeliveryCharge + $prodRow['delivery_charge'];\n $productData[$pKey]['total_amount'] = $productData[$pKey]['total_amount'];\n }\n \n $order = FALSE;\n $acct_balance = '';\n switch ($payment_method) {\n case '1':\n $acct_balance = $this->order->get_balance($this->customer_id);\n\n if ($acct_balance < ($totalAmount - $totalDiscount)) {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Your account balance is low.'));\n }\n case '2':\n $order = $this->order->place_wallet_order(\n array('products' => $productData,\n 'amount' => array('total_bill' => $totalAmount,\n 'total_discount' => $totalDiscount,\n 'total_delivery_charge' => $totalDeliveryCharge,\n 'net_bill' => ($totalAmount - $totalDiscount)+$totalDeliveryCharge),\n 'customer_id' => $this->customer_id,\n 'address_id' => $address_id,\n 'sale_id' => $this->put('sale_id'),\n 'acct_balance' => $acct_balance,\n 'order_id' => orderId(),\n 'medium' => $medium,\n 'payment_method' => $payment_method\n ));\n break;\n\n default:\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Invalid payment method.'));\n break;\n }\n\t\t//echo '<pre>'; print_r($this->cu_profile); exit;\n if ($order) {\n if(!empty($this->cu_profile->mobile)){\n $this->load->library('sms_notification');\n $this->sms_notification->textmessage = \"Dear {$this->cu_profile->name}, your order {$order['order_id']} with {$productData[0]['title']} has been placed successfully.\";\n $this->sms_notification->sendMessage($this->cu_profile->mobile);\n unset($this->sms_notification);\n }\n $orderData = $this->list_post($order['order_pk']);\n $this->response(array('status' => REST_CONTROLLER::HTTP_OK, 'data' => array('message' => 'Order has been placed successfully.', 'data' => $orderData, 'extra' => $order)));\n } else {\n $this->response(array('status' => REST_CONTROLLER::HTTP_BAD_REQUEST, 'data' => 'Unable to place order right now, please try again after some time.'));\n }\n }", "title": "" }, { "docid": "65d8f9344eb257e751b8fc807eb912ca", "score": "0.48273498", "text": "public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }", "title": "" }, { "docid": "f1a647740a82292ac6437e10e2f16724", "score": "0.48169118", "text": "public function setPriceAttribute($value)\n {\n if ( ! is_array($value)) {\n return;\n }\n foreach ($value as $currency => $price) {\n ProductPrice::updateOrCreate([\n 'product_id' => $this->id,\n 'currency_id' => Currency::where('code', $currency)->firstOrFail()->id,\n ], [\n 'price' => $price,\n ]);\n }\n }", "title": "" }, { "docid": "8a69478fbb78a1f3b8bbb8fee8b2540b", "score": "0.48090908", "text": "public function update(Request $request)\n {\n if($request->hasFile('filePrice')){\n $path = $request->file('filePrice')->getRealPath();\n $data = \\Excel::load($path)->get();\n if($data->count()){\n foreach ($data as $key => $value) {\n $item = $value->toArray();\n $km = $item['km'];\n if(substr_count($km, '-')) {\n $minMax = explode('-', $km);\n $min = trim($minMax[0]);\n $max = trim($minMax[1]);\n } elseif (substr_count($km, '+')) {\n $minMax = explode('+', $km);\n $min = trim($minMax[0]);\n $max = time();\n } else {\n $min = $max = $km;\n }\n $arr[] = ['km' => $km, 'price' => $item['price'], 'unit' => $item['unit'], 'min' => $min, 'max' => $max];\n }\n\n if(!empty($arr)){\n DB::table('price')->truncate();\n DB::table('price')->insert($arr);\n }\n }\n }\n\n return redirect()->route('setting.index')->withSuccess(trans('setting.message.update success'));\n }", "title": "" }, { "docid": "64fb5d4841271f66af87e0083046f150", "score": "0.48090068", "text": "public function savePrice(FipeVehiclePrice $price){\n $em = $this->getEntityManager();\n $em->persist($price);\n $em->flush();\n }", "title": "" }, { "docid": "871d62b2d6cdc07a06a79f41c5625b45", "score": "0.48087123", "text": "public function updatePriceID($data)\n {\n $i_data = array_merge(['price_id' => Price::uniqueId()], $data);\n Price::where('sellable_id', '=', $data['sellable_id'])\n ->where('sellable_type', '=', $data['sellable_type'])\n ->update($i_data, ['upsert' => true]);\n }", "title": "" }, { "docid": "acf9277b1e2fe49029ae817a5e0e298d", "score": "0.48064604", "text": "public function setPrice($price){\n $this->price = $price;\n return $this;\n }", "title": "" }, { "docid": "822e477ad189062a5405029e4ddeff6c", "score": "0.4805954", "text": "public function testUpdateMetadata3UsingPUT()\n {\n }", "title": "" }, { "docid": "4797b4f568b4ab1d7a4a2bde54b13964", "score": "0.47990924", "text": "public function editAction()\n {\n $this->_title($this->__('Request price'))\n ->_title($this->__('Manage request price'));\n\n // 1. Instance RP model\n// /* @var $model Test_Requestprice_Model_Requestprice */\n $model = Mage::getModel('test_requestprice/requestprice');\n\n //2. Id ID exists check it and load data\n $reqpriceId = $this->getRequest()->getParam('id');\n if ($reqpriceId) {\n $model->load($reqpriceId);\n\n if (!$model->getId()) {\n $this->_getSession()->addError(\n Mage::helper('test_requestprice')->__('Request price item does not exist.')\n );\n return $this->_redirect('*/*/');\n }\n // prepare title\n $this->_title($model->getTitle());\n $breadCrumb = Mage::helper('test_requestprice')->__('Edit Item');\n } else {\n $this->_title(Mage::helper('test_requestprice')->__('New Item'));\n $breadCrumb = Mage::helper('test_requestprice')->__('New Item');\n }\n // init breadcrumbs\n $this->_initAction()->_addBreadcrumb($breadCrumb, $breadCrumb);\n\n // 3. Set entered data if there was an error during save\n $data = Mage::getSingleton('adminhtml/session')->getFormData(true);\n if (!empty($data)) {\n $model->addData($data);\n }\n\n // 4. Register model to use later in blocks\n Mage::register('requestprice_item', $model);\n\n // 5. Render layout\n $this->renderLayout();\n }", "title": "" }, { "docid": "6fa423536e3fe5c2d67f50d44ad6b7a9", "score": "0.4797692", "text": "public function providerPriceUpdate(Request $request, $id)\n {\n $productos = Producto::where('proveedor_id', '=', $id)->get();\n $percent = $request->percent;\n\n $results = array();\n\n foreach($productos as $producto){\n\n $producto->costopesos = $this->calcSumPricePercent($producto->costopesos, $percent);\n $producto->costodolar = $this->calcSumPricePercent($producto->costodolar, $percent);\n $producto->costoeuro = $this->calcSumPricePercent($producto->costoeuro, $percent);\n //dd('Costo dolar: '.$producto->costodolar.'| Costo pesos: '. $producto->costopesos.'| Costo euro: '.$producto->costoeuro);\n //$producto->save();\n $results[$producto->nombre]['costopesos'] = $producto->costopesos;\n $results[$producto->nombre]['costodolar'] = $producto->costodolar;\n $results[$producto->nombre]['costoeuro'] = $producto->costoeuro;\n \n }\n\n return response()->json([\n \"results\" => $results\n ]);\n }", "title": "" }, { "docid": "525bcf047b84b102df027fa2ce209cb2", "score": "0.4796246", "text": "public function modifyPublic(){\n// DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n $modelNames = DB::table('components')->get()->pluck('name');\n try{\n\n for($i=56;$i<57;$i++){\n $this->add = 0;\n $model = 'App\\IC\\\\'.$modelNames[$i];\n $instance = new $model();\n $id = DB::table('components')->where('name',$modelNames[$i])->first()->product_id;\n DB::table($instance->getTable())->chunkById(100,function($queries) use($instance,$id){\n\n for ($t=0 ; $t<count($queries);$t++) {\n $this->key = $t;\n DB::table($instance->getTable())->where('id', $queries[$t]->id)->update(['product_id' => $id]);\n\n }\n });\n\n }\n\n }catch (\\Exception $exception){\n dd($exception);\n }\n return 200;\n }", "title": "" }, { "docid": "b91a1638dc1b2f365ae836a4f50adf55", "score": "0.47940764", "text": "public function update(Request $request, $id)\n {\n $count = $request->get('rowCountStore');\n\n $details = [];\n for ($i = 1; $i <= $count; $i++) {\n\n\n $detail = [\n\n 'client_category_id' => $request->get('selectCat' . $i),\n 'client_id' => $request->get('selectClient' . $i),\n 'item_price' => $request->get('item_price' . $i),\n\n\n ];\n if ($request->get('optionsRadios' . $i) == 'no') {\n $detail['item_pricing_type_id'] = 101;\n } else {\n $detail['item_pricing_type_id'] = 100;\n }\n\n if ($request->get('item_price' . $i)) {\n array_push($details, $detail);\n }\n }\n\n\n\n\n \\Log::info($detail);\n\n $counterrrr = $request->get('counterStore');\n\n $detailsUpdate = [];\n\n for ($i = 1; $i <= $counterrrr; $i++) {\n\n\n\n $detailUpdate = [\n 'id' => $request->get('item_price_id' . $i),\n\n 'item_price' => $request->get('item_priceup' . $i),\n\n ];\n array_push($detailsUpdate, $detailUpdate);\n }\n DB::beginTransaction();\n try {\n\n foreach ($details as $Item) {\n\n $Item['item_id'] = $id;\n Items_price::create($Item);\n }\n\n\n foreach ($detailsUpdate as $updates) {\n $itm = Items_price::where('id', $updates['id'])->first();\n\n Items_price::where('id', $updates['id'])->update($updates);\n }\n DB::commit();\n\n return redirect()->route($this->routeName . 'index')->with('flash_success', 'تم إضافة سعر للصنف !');\n } catch (\\Throwable $e) {\n // throw $th;\n DB::rollBack();\n\n return redirect()->back()->with('flash_success', $e->getMessage());\n }\n }", "title": "" }, { "docid": "eb952ba2ac6abc39f89453c237c571da", "score": "0.4786098", "text": "public function bulkproducts() {\n\n $this->checkPlugin();\n\n if ( $_SERVER['REQUEST_METHOD'] === 'POST' ){\n //insert products\n $requestjson = file_get_contents('php://input');\n\n $requestjson = json_decode($requestjson, true);\n\n if (!empty($requestjson) && count($requestjson) > 0) {\n\n $this->addProducts($requestjson);\n }else {\n $this->response->setOutput(json_encode(array('success' => false)));\n }\n\n }else if ( $_SERVER['REQUEST_METHOD'] === 'PUT' ){\n //update products\n $requestjson = file_get_contents('php://input');\n $requestjson = json_decode($requestjson, true);\n\n if (!empty($requestjson) && count($requestjson) > 0) {\n $this->updateProducts($requestjson);\n }else {\n $this->response->setOutput(json_encode(array('success' => false)));\n }\n\n }\n }", "title": "" }, { "docid": "d97e315c308cdd9524c967524cd7141f", "score": "0.4776481", "text": "public function update($id)\n {\n $update = 'added new price';\n $v = Validator::make(Input::all(),\n [\n 'finalproductdescription' => 'required',\n 'finalpriceperperson' => 'required',\n 'member' => 'min:1'\n\n ]\n );\n\n if (!$v->passes()) {\n return Response::json(['errors' => $v->errors()]);\n } else {\n $invoiceproduct = InvoiceProduct::find($id);\n\n if (Input::has('isupdate')) {\n $update = 'updated';\n $invoiceproductprice = InvoiceProductPrice::find(Input::get('isupdate'));\n if ($invoiceproductprice->exists) {\n $invoiceproductprice->price = Input::get('finalpriceperperson');\n $invoiceproductprice->description = Input::get('finalproductdescription');\n $invoiceproductprice->save();\n\n DB::table('invoice_lines')->where('invoice_product_price_id', '=', $invoiceproductprice->id)->delete();\n } else {\n return Response::json(['errors' => 'Could not find Product price']);\n }\n } else {\n $invoiceproductprice = new InvoiceProductPrice();\n $invoiceproductprice->invoice_product_id = $invoiceproduct->id;\n $invoiceproductprice->price = Input::get('finalpriceperperson');\n $invoiceproductprice->description = Input::get('finalproductdescription');\n $invoiceproductprice->save();\n }\n\n if (Input::has('member')) {\n $i = 0;\n foreach (Input::get('member') as $m) {\n $invoiceline = new InvoiceLine();\n $invoiceline->invoice_product_price_id = $invoiceproductprice->id;\n $invoiceline->member_id = $m;\n $invoiceline->save();\n if ($invoiceline->exists) {\n $i++;\n }\n }\n }\n\n return Response::json(['success' => true, 'message' => $invoiceproduct->name . ' Successfully ' . $update . ', '\n . $invoiceproductprice->price . ' per person.'\n . $i . ' Total persons' ]);\n }\n }", "title": "" }, { "docid": "3e6ffaa9960fb23de44cc6f7fcd74b80", "score": "0.47686738", "text": "public function setPrice($var)\n {\n GPBUtil::checkInt64($var);\n $this->price = $var;\n\n return $this;\n }", "title": "" }, { "docid": "1a28f45ddc27d7bdc6cef3484f0e6b8c", "score": "0.4766935", "text": "public function update(Request $request, FoodPrice $foodPrice)\n {\n //\n }", "title": "" }, { "docid": "62825703395ee87cbfa668ccbd9ba5c2", "score": "0.47556683", "text": "public function testUpdateProductUsingPOST()\n {\n }", "title": "" }, { "docid": "f6268607b17cc825b2a0d2056b8ea619", "score": "0.4751836", "text": "public function setPrice(float $price):void\n {\n $this->price = $price;\n }", "title": "" }, { "docid": "ae9f0227fedfbf89c8c2908e9e58a642", "score": "0.47438267", "text": "public function publishAbstractPriceProductPriceList(array $priceProductPriceListIds): void;", "title": "" }, { "docid": "c14df7c28169e6e721e08f97cb644bc3", "score": "0.47367904", "text": "function actionsForPutMethod()\n {\n if (isset($this->id)) {\n /* Check first that there is actually an element with the id before modifying */\n $info = $this->api->get($this->id);\n array_pop($info);\n\n /* If $info is different from 0, the element exists, therefore proceed to modify */\n if (count($info) != 0) {\n /* Decode the body of the request and save it in an array */\n parse_str(html_entity_decode($this->bodyRequest), $array);\n\n $this->api->data = $this->renderizeData(array_keys($array), array_values($array));\n $this->api->id = $this->id;\n $data = $this->api->put();\n\n if ($data) {\n $data = $this->api->get($this->id);\n\n if (count($data) == 0) {\n $this->print_json(200, false, null);\n } else {\n array_pop($data);\n $this->print_json(200, \"OK\", $data);\n }\n } else {\n $this->print_json(200, false, null);\n }\n } else { /* If $info is equal to 0, the element does not exist and there is nothing to modify */\n $this->print_json(404, \"Not Found\", null);\n }\n } else {\n $this->print_json(405, \"Method Not Allowed\", null);\n }\n }", "title": "" }, { "docid": "35010b787b8f5739c7906cc80373b0b5", "score": "0.4718535", "text": "public function setPrice(float $price) : void\n {\n $this->set('price', $price, 'products');\n }", "title": "" }, { "docid": "424914c95bfaa342426a13e56ddcaf8e", "score": "0.47184953", "text": "public function publishConcretePriceProductPriceList(array $priceProductPriceListIds): void;", "title": "" }, { "docid": "8ed84ea241fbf6c457f82d1e93df88b9", "score": "0.4699015", "text": "public function setPriceAttribute($value)\n {\n $this->attributes['price'] = Utils::numbersOnly($value);\n }", "title": "" }, { "docid": "38b293f68aea812ffc92ce2084ed7972", "score": "0.46982193", "text": "function edit_builder_price($id = null) {\n\n if( $this->request->is('post') || $this->request->is('put') ) {\n if( $this->Item->save($this->request->data) ) {\n $this->redirect(array( 'action' => 'builder_price', $this->request->data['Item']['id'] ));\n }\n else {\n $this->Session->setFlash(__('The item could not be saved. Please, try again.'), 'default', array( 'class' => 'text-error' ));\n }\n }\n $item = $this->Item->find('first', array( 'conditions' => array( 'Item.id' => $id ) ));\n\n $this->set(compact('item'));\n }", "title": "" }, { "docid": "eb94f08b1e51f0dc7c7f2875c1fac605", "score": "0.46841186", "text": "function setPrice( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Price = $value;\n setType( $this->Price, \"double\" );\n }", "title": "" }, { "docid": "eb078f50f2000291eef056043df1908d", "score": "0.46829152", "text": "public function getPriceModificationCommandTasksStatusesUsingGETRequest($command_id, $limit = 100, $offset = 0, string $contentType = self::contentTypes['getPriceModificationCommandTasksStatusesUsingGET'][0])\n {\n\n // verify the required parameter 'command_id' is set\n if ($command_id === null || (is_array($command_id) && count($command_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $command_id when calling getPriceModificationCommandTasksStatusesUsingGET'\n );\n }\n\n if ($limit !== null && $limit > 1000) {\n throw new \\InvalidArgumentException('invalid value for \"$limit\" when calling BatchOfferModificationApi.getPriceModificationCommandTasksStatusesUsingGET, must be smaller than or equal to 1000.');\n }\n if ($limit !== null && $limit < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$limit\" when calling BatchOfferModificationApi.getPriceModificationCommandTasksStatusesUsingGET, must be bigger than or equal to 1.');\n }\n \n if ($offset !== null && $offset > 999) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling BatchOfferModificationApi.getPriceModificationCommandTasksStatusesUsingGET, must be smaller than or equal to 999.');\n }\n if ($offset !== null && $offset < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling BatchOfferModificationApi.getPriceModificationCommandTasksStatusesUsingGET, must be bigger than or equal to 0.');\n }\n \n\n $resourcePath = '/sale/offer-price-change-commands/{commandId}/tasks';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $limit,\n 'limit', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $offset,\n 'offset', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n // path params\n if ($command_id !== null) {\n $resourcePath = str_replace(\n '{' . 'commandId' . '}',\n ObjectSerializer::toPathValue($command_id),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.allegro.public.v1+json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if (!empty($this->config->getAccessToken())) {\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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "637659cc5db7c52a09382b0bd81be2ee", "score": "0.46829113", "text": "public function publishAbstractPriceProductPriceListByIdPriceList(int $idPriceList): void;", "title": "" }, { "docid": "7e3d889d04944edd0261d072a72ee86d", "score": "0.46801332", "text": "public function quoteDraftsV2Put($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id)\n {\n list($response) = $this->quoteDraftsV2PutWithHttpInfo($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id);\n return $response;\n }", "title": "" }, { "docid": "94fddb5586ae226df6ea3d2c46df2bfb", "score": "0.46761772", "text": "public function update(Request $request, Price $price)\n {\n $price->update($request->all());\n return redirect()->route('prices.show', $price);\n }", "title": "" }, { "docid": "d53cd52a7f76b5d11d667ef5077ff12a", "score": "0.467228", "text": "public function testUpdateBrandUsingPUT()\n {\n }", "title": "" }, { "docid": "b81a5823a8c3fe51667ab347a01058b4", "score": "0.4666073", "text": "public function getUpdateProductData();", "title": "" }, { "docid": "9c2f7de2009cb7572acf44da753c8b19", "score": "0.4663301", "text": "protected function doActionSetSalePrice()\n {\n $form = new \\XLite\\Module\\CDev\\Sale\\View\\Form\\SaleSelectedDialog();\n $form->getRequestData();\n\n if ($form->getValidationMessage()) {\n \\XLite\\Core\\TopMessage::addError($form->getValidationMessage());\n } elseif (!$this->getSelected() && $ids = $this->getActionProductsIds()) {\n $qb = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->createQueryBuilder();\n $alias = $qb->getMainAlias();\n $qb->update('\\XLite\\Model\\Product', $alias)\n ->andWhere($qb->expr()->in(\"{$alias}.product_id\", $ids));\n\n foreach ($this->getUpdateInfoElement() as $key => $value) {\n $qb->set(\"{$alias}.{$key}\", \":{$key}\")\n ->setParameter($key, $value);\n }\n\n $qb->execute();\n\n \\XLite\\Core\\TopMessage::addInfo('Products information has been successfully updated');\n } else {\n \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')->updateInBatchById($this->getUpdateInfo());\n \\XLite\\Core\\TopMessage::addInfo('Products information has been successfully updated');\n }\n\n $this->setReturnURL($this->buildURL('product_list', '', ['mode' => 'search']));\n }", "title": "" }, { "docid": "9b5db0c697d78067cf9fa915d4064da8", "score": "0.46543995", "text": "public function setProductPrice($product_price){\n $this->product_price = $product_price;\n }", "title": "" }, { "docid": "b0f3f90bd84d29cbc126551a37412a93", "score": "0.46519503", "text": "public function quantityModificationCommandUsingPUTRequest($command_id, $offer_quantity_change_command, string $contentType = self::contentTypes['quantityModificationCommandUsingPUT'][0])\n {\n\n // verify the required parameter 'command_id' is set\n if ($command_id === null || (is_array($command_id) && count($command_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $command_id when calling quantityModificationCommandUsingPUT'\n );\n }\n\n // verify the required parameter 'offer_quantity_change_command' is set\n if ($offer_quantity_change_command === null || (is_array($offer_quantity_change_command) && count($offer_quantity_change_command) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $offer_quantity_change_command when calling quantityModificationCommandUsingPUT'\n );\n }\n\n\n $resourcePath = '/sale/offer-quantity-change-commands/{commandId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($command_id !== null) {\n $resourcePath = str_replace(\n '{' . 'commandId' . '}',\n ObjectSerializer::toPathValue($command_id),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.allegro.public.v1+json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($offer_quantity_change_command)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($offer_quantity_change_command));\n } else {\n $httpBody = $offer_quantity_change_command;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if (!empty($this->config->getAccessToken())) {\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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'PUT',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "3e6bf4ed9ebbe5d378e960865cdf5309", "score": "0.46482372", "text": "public function setPrice($price)\r\n {\r\n $this->price = $price;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "6804a8c162dab8f6dd8df0c356dd3bf3", "score": "0.4644539", "text": "function editPrices($item, $_options = false) {\n\t\tglobal $model;\n\t\tglobal $page;\n\n\t\t$currency_options = $model->toOptions($page->currencies(), \"id\", \"id\");\n\t\t$default_currency = $page->currency();\n\n\t\t$vatrate_options = $model->toOptions($page->vatrates(), \"id\", \"name\");\n\n\t\t$type_options = array(\"default\" => \"Standard price\", \"offer\" => \"Special offer\", \"bulk\" => \"Bulk price\");\n\n\t\t$_ = '';\n\n\t\t$_ .= '<div class=\"prices i:defaultPrices i:collapseHeader item_id:'.$item[\"id\"].'\"'.$this->jsData([\"prices\"]).'>';\n\t\t$_ .= '<h2>Prices</h2>';\n\n\t\t$_ .= $this->priceList($item[\"item_id\"]);\n\n\t\t$_ .= $model->formStart($this->path.\"/addPrice/\".$item[\"id\"], array(\"class\" => \"labelstyle:inject\"));\n\t\t$_ .= '<fieldset>';\n\t\t$_ .= $model->input(\"item_price\");\n\t\t$_ .= $model->input(\"item_price_currency\", array(\"type\" => \"select\", \"options\" => $currency_options, \"value\" => $default_currency));\n\t\t$_ .= $model->input(\"item_price_vatrate\", array(\"type\" => \"select\", \"options\" => $vatrate_options));\n\t\t$_ .= $model->input(\"item_price_type\", array(\"type\" => \"select\", \"options\" => $type_options));\n\t\t$_ .= $model->input(\"item_price_quantity\");\n\t\t$_ .= '</fieldset>';\n\n\t\t$_ .= '<ul class=\"actions\">';\n\t\t$_ .= $model->submit(\"Add new price\", array(\"class\" => \"primary\", \"wrapper\" => \"li.save\"));\n\t\t$_ .= '</ul>';\n\t\t$_ .= $model->formEnd();\n\t\t$_ .= '</div>';\n\n\t\treturn $_;\n\t}", "title": "" }, { "docid": "dfca3361e80e280519ddea654e1d18cb", "score": "0.4635697", "text": "public function setPrice($var)\n {\n GPBUtil::checkString($var, True);\n $this->price = $var;\n\n return $this;\n }", "title": "" }, { "docid": "dc65d670dc4ce579245bcb61c02c681c", "score": "0.46263152", "text": "public function quoteDraftsV2PutAsync($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id)\n {\n return $this->quoteDraftsV2PutAsyncWithHttpInfo($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "0575dc0fab5161dfb978ed069ff541d9", "score": "0.46123222", "text": "public function setPriceAttribute($input)\n {\n $this->attributes['price'] = $input ? $input : null;\n }", "title": "" }, { "docid": "0575dc0fab5161dfb978ed069ff541d9", "score": "0.46123222", "text": "public function setPriceAttribute($input)\n {\n $this->attributes['price'] = $input ? $input : null;\n }", "title": "" }, { "docid": "e45e72777d81a617e53879e30c2a5be8", "score": "0.460955", "text": "public function update(Request $request, $id)\n {\n $pricelist = $this->pricelist->find($id);\n $pricelist->fill($request->except('pricelist_items'));\n $pricelist->save();\n\n $priceListItem = [];\n $requestPricelistItems = json_decode($request->pricelist_items);\n\n foreach ( $requestPricelistItems as $pricelistItem) {\n $priceListItem = [\n 'price_list_id' => $id,\n 'waste_id' => $pricelistItem->pivot->waste_id,\n 'unit_id' => $pricelistItem->unit_id,\n 'unit_price' => (double)$pricelistItem->pivot->unit_price\n ];\n $priceListItemToBeUpdated = $this->pricelistItem->where('waste_id',$pricelistItem->pivot->waste_id)\n ->where('price_list_id',$id)->first();\n if ($priceListItemToBeUpdated->count() > 0) {\n \n $priceListItemToBeUpdated->unit_price = (double)$pricelistItem->pivot->unit_price;\n $priceListItemToBeUpdated->unit_id = $pricelistItem->unit_id;\n $priceListItemToBeUpdated->save();\n\n } else {\n $pricelist->wastes()->attach($priceListItem);\n }\n }\n\n return redirect()->route('settings.pricelists')\n ->with('success', 'Pricelist has been updated!');\n }", "title": "" }, { "docid": "20493013175d24d9c10653693e7db024", "score": "0.46090126", "text": "public function placeLimitSellOrder(float $size, float $price): \\GDAX\\Types\\Response\\Authenticated\\Order;", "title": "" }, { "docid": "e44fc8bf8a75a669d9c358f712f46412", "score": "0.4596524", "text": "public function setPrice($price) {\n $this->_price = $price;\n return $this;\n }", "title": "" }, { "docid": "3823a938a34749a38ba37c89d73f7cce", "score": "0.45944178", "text": "public function publishConcretePriceProductPriceListByIdPriceList(int $idPriceList): void;", "title": "" }, { "docid": "db9a62af87c2211f532bff504bb88ba8", "score": "0.45926037", "text": "public function actionModify()\n {\n $customerEntity = $this->_getCustomerEntity();\n \n if (!$customerEntity) {\n return false;\n }\n\n $quote = Mage::getModel('sales/quote')->loadByIdWithoutStore($this->_getEntityId());\n \n $request = Mage::helper('marketingsoftware/rest_request');\n $request->prepare();\n\n if (Mage::helper('marketingsoftware/config')->getRemoveFinishedQuoteItem()) {\n $quoteItemCollection = Mage::helper('marketingsoftware/config')->getQuoteItemCollectionId();\n\n if ($quoteItemCollection) {\n $response = $request->get(\n '/profile/'.$customerEntity->getProfileId().'/subprofiles/'.$quoteItemCollection, array( \n 'fields' => array('quote_id=='.$this->_getEntityId())\n )\n );\n }\n\n foreach ($response['data'] as $subprofile) {\n $request->delete('/subprofile/'.$subprofile['ID']); \n }\n } else {\n foreach ($quote->getAllItems() as $quoteItem) {\n $quoteItemEntity = Mage::getModel('marketingsoftware/copernica_entity_quote_item');\n $quoteItemEntity->setQuoteItem($quoteItem);\n \n $restQuoteItem = $quoteItemEntity->getRestQuoteItem();\n $restQuoteItem->syncWithQuote($customerEntity, $quote->getId());\n }\n }\n\n $request->commit();\n\n return true;\n }", "title": "" }, { "docid": "97a931a313bff967d9cc6de182f5c816", "score": "0.45867798", "text": "public function setPrice(float $price)\n {\n $this->parameters['price'] = $price;\n\n return $this;\n }", "title": "" }, { "docid": "f41a08e54760ef53cee448e5897c9145", "score": "0.4583383", "text": "public function productquantity() {\n\n $this->checkPlugin();\n\n if ($_SERVER['REQUEST_METHOD'] === 'PUT') {\n //update products\n $requestjson = file_get_contents('php://input');\n $requestjson = json_decode($requestjson, true);\n\n if (!empty($requestjson) && count($requestjson) > 0) {\n $this->updateProductsQuantity($requestjson);\n } else {\n $this->response->setOutput(json_encode(array('success' => false)));\n }\n } else {\n $json['success'] = false;\n $json['error'] = \"Invalid request method, use PUT method.\";\n $this->sendResponse($json);\n }\n }", "title": "" }, { "docid": "8fc4f04322b99421c00bb80fa215857b", "score": "0.45833376", "text": "function cps_changeset_publish_batch_update($changeset, $entity_type, &$context) {\n $changeset_id = $changeset->changeset_id;\n\n // Use the $context['sandbox'] at your convenience to store the\n // information needed to track progression between successive calls.\n if (empty($context['sandbox'])) {\n $entity_info = entity_get_info($entity_type);\n $context['sandbox'] = array();\n $context['sandbox']['progress'] = 0;\n $context['sandbox']['current_item'] = 0;\n $context['message'] = t('Marking unchanged @entity_type content', array('@entity_type' => $entity_info['label']));\n }\n\n $limit = 100;\n $count = cps_add_untracked_entities($changeset_id, $entity_type, $context['sandbox']['current_item'], $limit);\n\n $context['results']['changeset'] = $changeset;\n\n if (!$count) {\n $context['finished'] = TRUE;\n }\n else {\n $context['finished'] = FALSE;\n $context['sandbox']['current_item'] = $context['sandbox']['current_item'] + $count;\n }\n}", "title": "" }, { "docid": "ddbfbf0f0eaa8fc63d711abcf53f747c", "score": "0.4579209", "text": "public function update(Request $request, $id)\n {\n $price = Price::find($id);\n $this->validate(request(), [\n 'product_id' => 'required|numeric', \n 'name' => 'required',\n 'price' => 'required|regex:/^\\d*([\\,\\.]\\d{2})?$/|max:8'\n ]);\n $price->product_id = $request->get('product_id'); \n $price->name = $request->get('name');\n $price->price = str_replace(',', \".\", $request->get('price'));\n $price->save();\n return redirect('products')->with('success','Cena został zmieniona');\n }", "title": "" }, { "docid": "17c7f51ae53d8ce3f36533acee1c26ef", "score": "0.4574558", "text": "public function setPrice($price) {\n return false;\n }", "title": "" }, { "docid": "307e398a42e7b1dcec9ea5d5bc96d65c", "score": "0.45675576", "text": "public function editAction(Request $request)\n { $id=$request->get('id');\n $privatelocation=$this->getDoctrine()->getRepository('AppBundle:PrivateLocationPrice')->find($id);\n $editForm = $this->createForm('AppBundle\\Form\\Back\\PrivateLocationType', $privatelocation,array(\n 'action' => '#','attr' => array('id' => 'updateForm')))\n ->add('submit', SubmitType::class, array('label' => 'Modifier'));\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n\n $em = $this->getDoctrine()->getManager();\n $em->persist($privatelocation);\n $em->flush();\n return new JsonResponse(array($privatelocation->getId(),$privatelocation->getLocation()->getName(),$privatelocation->getPrice(),$privatelocation->getMinCapacity(),$privatelocation->getMaxCapacity(),$privatelocation->getZipCode(),$privatelocation->getDistance(),'<span class=\"glyphicon glyphicon-pencil opicon\" onclick=\"updateRow('.$privatelocation->getId().',this)\"></span><span class=\"glyphicon glyphicon-trash opicon\" onclick=\"deleteRow('.$privatelocation->getId().',this)\"></span>'));\n }\n\n return new JsonResponse(array(\"html\" => $this->render('@App/Back/DBParametrage/Forms/bsform.html.twig', array(\n 'privatelocation' => $privatelocation,\n 'form' => $editForm->createView(),\n ))->getContent()));\n }", "title": "" }, { "docid": "6a683b1461145e53da89e7b46e153c4f", "score": "0.45586023", "text": "public function edit(Price $price)\n {\n return response()->view('price.edit', compact('price'));\n }", "title": "" } ]
320d9d23ddb98af902654e7dcc25eec2
Test ... is left asis
[ { "docid": "405b8e70f9e5f0639133dd64bc23aab1", "score": "0.0", "text": "#[@test]\n public function ttIsLeftAsIs() {\n $this->assertEquals(\n 'The class <tt>lang.types.ArrayList</tt> is ...',\n $this->builder->markupFor('The class <tt>lang.types.ArrayList</tt> is ...')\n );\n }", "title": "" } ]
[ { "docid": "cb757f486e3a938ad0776a367a48c50f", "score": "0.8001144", "text": "private function test() {\n\t}", "title": "" }, { "docid": "063ccd36fa2cb95cc6c6419b48d30145", "score": "0.796431", "text": "protected abstract function test();", "title": "" }, { "docid": "9bb7d6a32f7db4bf20830ab46f52b6b9", "score": "0.7319841", "text": "public function testMe()\n\t{\n\t}", "title": "" }, { "docid": "a8b90ed2fd13ec5d8225e1e613fb0672", "score": "0.7227975", "text": "protected abstract function runTest($test);", "title": "" }, { "docid": "c291a3d15eff6b82c33b9754f678164b", "score": "0.7099967", "text": "public function testJustForFun()\n {\n }", "title": "" }, { "docid": "f6c4d8a9b97949a5f7a1d89b6beb1496", "score": "0.708865", "text": "public function test()\n\t{\n\n\t}", "title": "" }, { "docid": "fb2f51506c057acce8e115ca879d5f1b", "score": "0.69397366", "text": "final public function test() {}", "title": "" }, { "docid": "6f4aa4365789c750126954146fddbffa", "score": "0.688656", "text": "function test() { }", "title": "" }, { "docid": "71516b045b99433a8aa78e48c5873ab3", "score": "0.6877965", "text": "public static function test() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0fa070801fe0d3550e265387066573fc", "score": "0.68433785", "text": "function testGet() {\n }", "title": "" }, { "docid": "0cf1cd9fd52fa543bc87f20fd33f38e1", "score": "0.67539084", "text": "function test() {\n }", "title": "" }, { "docid": "2875753eec02f578dbe96925ebde310a", "score": "0.67509633", "text": "public function testNothing()\n {\n }", "title": "" }, { "docid": "48e5fa0670622d809c48f18e0b702191", "score": "0.67482466", "text": "function testFail() {\n\t}", "title": "" }, { "docid": "095c1d6f679cce1ca8789c25569d5297", "score": "0.67403144", "text": "public function testOne()\n {\n }", "title": "" }, { "docid": "8ff5e0b9f51cc1a62bd3131824c41dd3", "score": "0.67373306", "text": "public static function test() {\n }", "title": "" }, { "docid": "e04aa2d907f103bd431a6d677a427d1d", "score": "0.6698754", "text": "public function testBasicExample()\n\t{\n\n\t}", "title": "" }, { "docid": "49bdad07e4cc0c1c10cc1468ed686c5b", "score": "0.66689235", "text": "function test()\n {\n }", "title": "" }, { "docid": "5bd1ef3633cfeacc57a0a7620cd52009", "score": "0.6559895", "text": "public function testDummy()\n {\n }", "title": "" }, { "docid": "1530d01caaf3ef98f203e5e68bf080e2", "score": "0.65372944", "text": "public function testFiller()\n {\n }", "title": "" }, { "docid": "2af57d55cdff871280409bc319e78d97", "score": "0.65264153", "text": "public function test()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "96448936cebae6742708c7633001f8e7", "score": "0.6517289", "text": "function runtests() {\n\t\t// This is blank, just here when I need it.\n\t}", "title": "" }, { "docid": "781e992105ab5350d7b6803e68439e7c", "score": "0.651251", "text": "public function testExample()\n {\n }", "title": "" }, { "docid": "c9a70fd94e60db2f95296584ac750738", "score": "0.65052384", "text": "function test4()\n {\n }", "title": "" }, { "docid": "f7966c192a8d080a33ebbd4daa46fb78", "score": "0.6502505", "text": "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "28683b0c0c66912e9a20ba6dabc886ca", "score": "0.6496389", "text": "public function testFoo()\n { }", "title": "" }, { "docid": "f406ec516843945a0f68e0e83a4bf067", "score": "0.6484134", "text": "public function testFirst() {\r\r\n $this->assertFalse(1 < 0);\r\r\n }", "title": "" }, { "docid": "49f629bcff3446f33ff3e736da26c6d4", "score": "0.6438175", "text": "public function TestOne()\n {\n Assert::AreEqual( 1, 2 );\n }", "title": "" }, { "docid": "998be3d713d78ddb36b38f5179ca9168", "score": "0.6434307", "text": "public function test(): void {\r\n }", "title": "" }, { "docid": "af9e9f5a7ce6bc064c59cbc087e412c7", "score": "0.643136", "text": "function executeTest($test){\n global $testInfo;\n if($testInfo->ToTest == \"parse-only\"){\n return parseOnlyTest($test, $testInfo->ParseScript);\n }\n elseif($testInfo->ToTest == \"int-only\"){\n return intOnlyTest($test, $testInfo->IntScript);\n }else{\n return bothTest($test, $testInfo->ParseScript, $testInfo->IntScript);\n }\n }", "title": "" }, { "docid": "92b1586174a50adc63129116cb6e62df", "score": "0.64274806", "text": "public function testDummy() {\n\n }", "title": "" }, { "docid": "f340efec77c85cad121d939b81001dec", "score": "0.6416986", "text": "abstract public function test($value);", "title": "" }, { "docid": "8144d40e464305c1e3dfbaaf2cfacd55", "score": "0.6412686", "text": "abstract public function testFunctions();", "title": "" }, { "docid": "f96be7c7ad437f35e5ada648cc8e4273", "score": "0.6401783", "text": "public function testRun()\n {\n }", "title": "" }, { "docid": "330c83bb342e97d6fe6bd825dedc7397", "score": "0.63876384", "text": "public function testGet()\n {\n }", "title": "" }, { "docid": "15baf3b6373076491be44c04b15569bd", "score": "0.6370126", "text": "public function test()\n\t{\n\t\texit;\n\t\t\n\t}", "title": "" }, { "docid": "c86d12ad32cd777e6cbd727ed73d67a8", "score": "0.6368929", "text": "public function dummy_test()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "cdf9bedd8ac66e21cc382b102930a69a", "score": "0.6367116", "text": "public function test_should_return_one_of_the_results() {\n }", "title": "" }, { "docid": "ad70b39a37ff5cd5856651c04da2efdb", "score": "0.63548523", "text": "function test3()\n {\n }", "title": "" }, { "docid": "8678c9855b2037a06e0ab935f7b0c909", "score": "0.63477147", "text": "public function TestTwo()\n {\n Assert::AreEqual( 1, 1 );\n }", "title": "" }, { "docid": "53cacae4771a4982e45696e6530f80bd", "score": "0.6327031", "text": "public function testGet3()\n {\n }", "title": "" }, { "docid": "8138d865085084d1497fa28807eb3905", "score": "0.6326756", "text": "function test6()\n {\n }", "title": "" }, { "docid": "f44480eb694029ce9da02b94802e0a6d", "score": "0.63101685", "text": "public function testSetPass() {\n\t}", "title": "" }, { "docid": "95ced182fb6acf934206a9c62884e73b", "score": "0.63000613", "text": "public function testInicial()\n {\n //2.1) sin tropas\n //2.2) con todas las tropas\n $this->assertTrue(true, \"Probando BD\");\n }", "title": "" }, { "docid": "e7b2443f2745f839c94397f4b8681e70", "score": "0.62751436", "text": "public function testWillPass()\n {\n echo \"This will pass.\";\n }", "title": "" }, { "docid": "bb777f458da32ac70c61ad6619423e3c", "score": "0.6263274", "text": "public function testReviseKpok()\n {\n }", "title": "" }, { "docid": "ac82c2cdcc41a9ad9f96cdbb070485ea", "score": "0.6255745", "text": "public function testRunImmediately()\n {\n }", "title": "" }, { "docid": "a46cea30a65543a0e0d76eb7d06ca4d1", "score": "0.6237273", "text": "function test19 () {\n\n}", "title": "" }, { "docid": "4ef3e4ba78388ddc814819b7e6c9837b", "score": "0.62298495", "text": "public function test_should_return_an_alternative() {\n }", "title": "" }, { "docid": "2a849c524691af4a4ba38eb659da8798", "score": "0.6225357", "text": "abstract public function testValidation();", "title": "" }, { "docid": "727af09e80d8a68094a2202b4baa4b3b", "score": "0.62230223", "text": "function test28() {\n\n}", "title": "" }, { "docid": "9a2fcc2f8eaee76e143cbd93cc7da228", "score": "0.62196493", "text": "function test_error()\n {\n }", "title": "" }, { "docid": "446a54767a3623e89e166769c7fc0b50", "score": "0.6213674", "text": "function test() {\n}", "title": "" }, { "docid": "92762e0566f8061bf3d6744a0ed4d6a6", "score": "0.62103605", "text": "function test_tests() {\n $this->assertTrue( true );\n }", "title": "" }, { "docid": "83305b3fb9cf6ea444c429d40e89622c", "score": "0.619655", "text": "public function testExample() {\n $this->assertTrue(true); // uvijek mora proci\n }", "title": "" }, { "docid": "1627170a32078211a29cf29e14e58878", "score": "0.61876374", "text": "public function testCheckEligibility()\n {\n }", "title": "" }, { "docid": "0979880c44f9974d7dfe60947b0dcd06", "score": "0.6180352", "text": "function test_sample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "a8136254f5a6c1a7692381973a6bb7bc", "score": "0.61739033", "text": "function test11() {\n\n}", "title": "" }, { "docid": "e11421f04aaec9173f09a68a66c1662f", "score": "0.61733454", "text": "public function testShowSucceeds(): void\n {\n }", "title": "" }, { "docid": "551df492f92d6202b09e4bd9f105e43a", "score": "0.6157169", "text": "public function testHasCovers2()\n {\n }", "title": "" }, { "docid": "87d6d7151f9868436fcc5b8b7c2ba94f", "score": "0.61453784", "text": "public function testExtract(): void { }", "title": "" }, { "docid": "0b9608075f2593e39fe4d54314f3d5ed", "score": "0.6141078", "text": "public function testSucceedOnCorrectData()\n {\n\n }", "title": "" }, { "docid": "72511db7c21bc1c5e90ccd3c42846c28", "score": "0.6136153", "text": "public function testGet_content_type0()\n{\n\n // Traversed conditions\n // for (...) == false (line 281)\n\n $actual = $this->cI_Output->get_content_type();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "d684c97c069050eb4e4456c5ef5c83f2", "score": "0.61168134", "text": "public function testConstruct()\n {\n }", "title": "" }, { "docid": "958dc705591ff61692abffd135e95c68", "score": "0.6113792", "text": "function runTests() {\r\n\t$count = 0;\r\n\t$prefix = \"test\";\r\n\t$names = get_defined_functions () ['user'];\r\n\tforeach ($names as $name) {\r\n\t\tif (substr($name, 0, strlen($prefix)) === $prefix) {\r\n\t\t\t$count ++;\r\n\t\t\techo \".\";\r\n\t\t\tcall_user_func($name);\r\n\t\t}\r\n\t}\r\n\tsummary($count, fail('', false));\r\n}", "title": "" }, { "docid": "87801f6277d0c371bcd70112fd0355c3", "score": "0.6102726", "text": "public function testHandle1()\n{\n\n // Traversed conditions\n // if (!$this->confirmToProceed()) == false (line 34)\n // if ($this->needsSeeding()) == true (line 50)\n\n $actual = $this->freshCommand->handle();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "f6bd30e84219e6b5a92f1c326b6b1770", "score": "0.6100258", "text": "abstract protected function testCaseJudge($testno, $jaildir);", "title": "" }, { "docid": "504221d8ff8a16861bf57cc6b0aa760e", "score": "0.60961837", "text": "public function getTypicalTest();", "title": "" }, { "docid": "d4f52185cdd92007c35b5c08cf94bb73", "score": "0.60880095", "text": "public static function randomTests()\n {\n }", "title": "" }, { "docid": "0dee6985264789627f97129197bb0d22", "score": "0.60875356", "text": "public function testGetPlannedKpok()\n {\n }", "title": "" }, { "docid": "333c386181a8561d87a7ea310a019a7e", "score": "0.6086754", "text": "function test7() {\n}", "title": "" }, { "docid": "d30fa5b7212c1e4224ae06e29b789df1", "score": "0.6080366", "text": "public function testHandle0()\n{\n\n // Traversed conditions\n // if (!$this->confirmToProceed()) == false (line 34)\n // if ($this->needsSeeding()) == false (line 50)\n\n $actual = $this->freshCommand->handle();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "939016c4d55631d463b54ded42c1c0ae", "score": "0.60714734", "text": "abstract public function testConstruct(): void;", "title": "" }, { "docid": "010cdaac6df857b7b4e5eb34bff12a47", "score": "0.60647124", "text": "public function testGetRejectedKpok()\n {\n }", "title": "" }, { "docid": "eae7375da000d7bb27b5d07cda1042e5", "score": "0.606055", "text": "public function testPurchaseCalculatorHorizon()\n {\n }", "title": "" }, { "docid": "55798086742f8091cb2544b59379dd1e", "score": "0.6055483", "text": "public function testSample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "b8467be6e281df57b06ab4315327fe3a", "score": "0.6055216", "text": "public function testGetGroup()\n {\n }", "title": "" }, { "docid": "d16499c0969112029476f21c48c55369", "score": "0.6053049", "text": "public function testHasCovers1()\n {\n }", "title": "" }, { "docid": "ca15766e3fed6163fdcc0c7d34f43050", "score": "0.6040685", "text": "public function testCheck()\n {\n// $this->assertTrue(false);\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "7fe4c78453a17ceb16121e9f733ff66d", "score": "0.6035414", "text": "public function test_instance();", "title": "" }, { "docid": "01186ee9f9d936b355dcc5b26e647d0b", "score": "0.6034558", "text": "public function testValidation()\n {\n\n }", "title": "" }, { "docid": "b943ca38304d7e5996e542e6046b1aa6", "score": "0.60333174", "text": "public function testPlaceOrderPositiveAsap() {\n\n }", "title": "" }, { "docid": "3ed0703710a14a4e394afcfd1fca6497", "score": "0.60316855", "text": "function test14() {\n\n}", "title": "" }, { "docid": "a39cc29d33538fa973265c8ee20b251e", "score": "0.60284853", "text": "public function testValues()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "046bec32ef3a99473b4ad075ba4eeb0d", "score": "0.60247135", "text": "public function testGetInfo()\n {\n }", "title": "" }, { "docid": "bcb62d15f68cb92409d2a46ec4467ff4", "score": "0.60200477", "text": "function test($test)\n{\n return $test;\n\n}", "title": "" }, { "docid": "b695efa58cbbc57db2d162a9c9575b4c", "score": "0.60178477", "text": "public function test_error()\n\t{\n $this->markTestIncomplete('to do');\n\t}", "title": "" }, { "docid": "03aec302f8f064291b6f566a3011b705", "score": "0.6009925", "text": "function test4() {\n\n}", "title": "" }, { "docid": "03aec302f8f064291b6f566a3011b705", "score": "0.6009925", "text": "function test4() {\n\n}", "title": "" }, { "docid": "38c4abc4907c49cd260b640d20879762", "score": "0.60084546", "text": "public function test_debug()\n\t{\n $this->markTestIncomplete('to do');\n\t}", "title": "" }, { "docid": "57abcd37adfaebb8f3d89f4d08950eef", "score": "0.6008157", "text": "public function testGetExportResult()\n {\n\n }", "title": "" }, { "docid": "2597bf094fcafaf47a48ed417445dce7", "score": "0.6002399", "text": "function test3() {\n\n}", "title": "" }, { "docid": "2597bf094fcafaf47a48ed417445dce7", "score": "0.6002399", "text": "function test3() {\n\n}", "title": "" }, { "docid": "a65c624b25882e1e6cb61a39455c8b7e", "score": "0.5993383", "text": "function testConstruct()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "e6521783e56af0d8f907315d16848595", "score": "0.59917355", "text": "public function test___construct() {\n\t\t}", "title": "" }, { "docid": "8b7afd97fe81c2a6b9107ca20b4fe4c8", "score": "0.5990257", "text": "public function testGetUserGreetings()\n {\n }", "title": "" }, { "docid": "718cfcaf272b1ce4f4c35d14709eed54", "score": "0.59886736", "text": "public function test()\n {\n\n }", "title": "" }, { "docid": "3be12a57c645f6abe360935f13b12318", "score": "0.59870005", "text": "public function testCreate()\n {\n }", "title": "" }, { "docid": "87adc23725c8b89fa12648e9100c7870", "score": "0.59820163", "text": "public function testdDsplayRandomErrorValidation()\n {\n $this->assertTrue(1 == 1); \n }", "title": "" }, { "docid": "b4798ea5cc3653073ce96e5f4349d738", "score": "0.5980293", "text": "public function testfunc() //!< A test method.\n {\n\t\techo \"Hello World!\";\n }", "title": "" }, { "docid": "dbc716803c4621abf2d9ce7910903773", "score": "0.597953", "text": "public function testSomeLogic(): void\n {\n // and exercise the logic of MyClass we want to test\n }", "title": "" }, { "docid": "5d3824d4afc4113a270ec6cbebd5f921", "score": "0.59793854", "text": "protected function protectedTest() {\n\n }", "title": "" } ]
799e294817240e02ca07bcba260da657
look in provided path for files and folders and return names of files or folders
[ { "docid": "dc1ee5f79e5a8b3fdf1b6921df2465f0", "score": "0.0", "text": "function load_resources($path) \n{\n\t$dir_handle = @opendir($path) or die(\"Appllication's directory structure problem.\");\n\t$content_list = array ();\n\t\twhile (($file = readdir($dir_handle)) != FALSE) \n\t\t{\n\t\t\tif($file!=\".\" && $file!=\"..\") // not system folders\n\t\t\t {\n\t\t\t\t$content_list []= $file;\n\t\t\t }\n\t\t} // loop\n\t\t\tclosedir($dir_handle);\n\t\t\tnatcasesort($content_list);\n\t\t\treturn $content_list;\n}", "title": "" } ]
[ { "docid": "42a995f3d868c35c9eddd414f3772386", "score": "0.70180887", "text": "private static function getFilesInFolderHelper ($strPath) {\r\n\t\t// Remove trailing slash if it's there\r\n\t\tif ($strPath[strlen($strPath) - 1] == \"/\") {\r\n\t\t\t\t$strPath = substr($strPath, 0, -1);\r\n\t\t}\r\n\t\t$result = array();\r\n\t\t$dh = opendir($strPath);\r\n\t\twhile (($file = readdir($dh)) !== false) {\r\n\t\t\t\tif($file != \".\" && $file != \"..\") {\r\n\t\t\t\t\t\tif (!is_dir($file)) {\r\n\t\t\t\t\t\t\t\tarray_push($result, $file);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dh);\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "df601f1077385390a6111e9899fa4462", "score": "0.6854872", "text": "public static function listFilesInsidePath ($path) {\n return scandir ($path);\n }", "title": "" }, { "docid": "f73b161cc5f66859e2775a40635a625b", "score": "0.68394077", "text": "function __searchDirectory($path = null) {\n\t\tif ($path === null) {\n\t\t\t$path = $this->path .DS;\n\t\t}\n\t\t$files = glob(\"$path*.{php,ctp,thtml,inc,tpl}\", GLOB_BRACE);\n\t\t$dirs = glob(\"$path*\", GLOB_ONLYDIR);\n\n\t\tforeach ($dirs as $dir) {\n\t\t\tif (!preg_match(\"!(^|.+/)(CVS|.svn)$!\", $dir)) {\n\t\t\t\t$files = array_merge($files, $this->__searchDirectory(\"$dir\" . DS));\n\t\t\t\tif (($id = array_search($dir . DS . 'extract.php', $files)) !== FALSE) {\n\t\t\t\t\tunset($files[$id]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "d1bb65ce623d38c41820abbb3c654bcc", "score": "0.67919177", "text": "private function scanFolders($path)\n {\n $dirs = scandir($path);\n $post = [];\n if ($dirs) {\n foreach ($dirs as $i => $folder) {\n if (!in_array($folder, ['.', '..'])) {\n $post[] = $folder;\n }\n }\n }\n\n return $post;\n }", "title": "" }, { "docid": "df745b301fc824bcec00a47cd3318ec2", "score": "0.67770237", "text": "private function find($path)\n {\n if ( ! file_exists($path) ) {\n return;\n }\n\n $subdirectories = glob( $path . '*', GLOB_ONLYDIR );\n\n return $subdirectories;\n }", "title": "" }, { "docid": "17af9b4adced35ace87a0ce5ac79d363", "score": "0.667006", "text": "function scanDirectory($path)\n{\n $i = 0;\n $files = glob($path . '/*') + glob($path . '/*');\n while (isset($files[$i])) {\n $file = $files[$i];\n if (is_dir($file)) {\n $files = array_merge($files, glob($file.'/*') + glob($file.'/*.*'));\n }\n $i++;\n }\n return $files;\n}", "title": "" }, { "docid": "d5de4a4a1af5411bf7eae04aae1b1781", "score": "0.66655284", "text": "protected function listFiles($path) {\n $files = array();\n if (is_file($path)) {\n $files[] = $path;\n }\n elseif (is_dir($path)) {\n $all_files = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($path));\n foreach ($all_files as $file) {\n /** @var \\SplFileInfo $file */\n if (basename($file->getPathname()) != '.' && basename($file->getPathname()) != '..') {\n $files[] = $file->getPathname();\n }\n }\n }\n return $files;\n }", "title": "" }, { "docid": "1c9e1e2879b5d9323b3c9d1dc60365eb", "score": "0.6618283", "text": "function getFileList($path)\n\t{\n\t\tif (is_file($path))\n\t\t{\n\t\t\t$pathParts=explode('/', $path);\n\t\t\t$fileName=$pathParts[count($pathParts)-1];\n\t\t\t$output=array($fileName=>$path);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (file_exists($path))\n\t\t\t{\n\t\t\t\t$output=array();\n\t\t\t\t$files=explode(\"\\n\", `ls -1 \"$path\" 2> /dev/null`);\n\t\t\t\tforeach ($files as $file)\n\t\t\t\t{\n\t\t\t\t\t$trimmedFile=trim($file);\n\t\t\t\t\tif ($trimmedFile) $output[$trimmedFile]=\"$path/$trimmedFile\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse return false;\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "e17047f6feded6de0b2c7e44c0586136", "score": "0.65905434", "text": "public function getDirectoryFilenames($path) {\n\t\t$filenames = array();\n\t\t$remove = array(\n\t\t\t'.',\n\t\t\t'..',\n\t\t\t'index.html'\n\t\t);\n\t\t$dir = opendir($path);\n\t\twhile ($finename = readdir($dir)) {\n\t\t\t$filenames[] = $finename;\n\t\t}\n\t\tforeach ($filenames AS $k => $v) {\n\t\t\tif (in_array($v, $remove)) {\n\t\t\t\tunset($filenames[$k]);\n\t\t\t}\n\t\t}\n\t\treturn $filenames;\n\t}", "title": "" }, { "docid": "395aa8589831df1eba1d9d99314412e6", "score": "0.65753186", "text": "function walk_path( $client, array $path, $root = null ) {\n\tif ( ! isset( $root ) ) {\n\t\t$root_path = \\Sgdg\\Options::$root_path->get();\n\t\t$root = end( $root_path );\n\t}\n\tif ( 0 === count( $path ) ) {\n\t\treturn list_files( $client, $root );\n\t}\n\t$page_token = null;\n\tdo {\n\t\t$params = array(\n\t\t\t'q' => '\"' . $root . '\" in parents and mimeType = \"application/vnd.google-apps.folder\" and trashed = false',\n\t\t\t'supportsAllDrives' => true,\n\t\t\t'includeItemsFromAllDrives' => true,\n\t\t\t'pageToken' => $page_token,\n\t\t\t'pageSize' => 1000,\n\t\t\t'fields' => 'nextPageToken, files(id, name)',\n\t\t);\n\t\t$response = $client->files->listFiles( $params );\n\t\tif ( $response instanceof \\Sgdg\\Vendor\\Google_Service_Exception ) {\n\t\t\tthrow $response;\n\t\t}\n\t\tforeach ( $response->getFiles() as $file ) {\n\t\t\tif ( $file->getName() === $path[0] ) {\n\t\t\t\tarray_shift( $path );\n\t\t\t\treturn walk_path( $client, $path, $file->getId() );\n\t\t\t}\n\t\t}\n\t\t$page_token = $response->getNextPageToken();\n\t} while ( null !== $page_token );\n\tthrow new \\Exception( esc_html__( 'No such directory found - it may have been deleted or renamed. ', 'skaut-google-drive-gallery' ) );\n}", "title": "" }, { "docid": "1009a7880eee45499b23ebe3f5001871", "score": "0.6530626", "text": "public function files($path)\n {\n return scandir($path);\n }", "title": "" }, { "docid": "a60610113aeaf8f2189b800df30baa73", "score": "0.65227026", "text": "function get_directory_list($path)\n {\n if( empty($path) || !is_dir($path) ) {\n return false;\n }\n \n $search_path = $path;\n \n if( !preg_match('#^(.*)' . DIR_SEP . '$#', $path) ) {\n $search_path = $path = $path . DIR_SEP;\n }\n\n if( !preg_match('#^(.*)\\*$#', $search_path) ) {\n $search_path = $search_path . '*';\n }\n \n $dirs = glob( $search_path , GLOB_ONLYDIR);\n \n if( !empty($dirs) ) {\n $_result = array();\n \n foreach($dirs as $key=>$val) {\n if( is_dir($val) ) {\n $_result[] = str_replace($path, '', $val);\n }\n }\n \n return $_result;\n }\n \n return false;\n }", "title": "" }, { "docid": "35bc98beede9ced34cd90c075d76ca20", "score": "0.6491772", "text": "function files($path, $filter = '.', $recurse = false, $fullpath = false, $exclude = array('.svn', 'CVS'))\n\t{\n\t\t// Initialize variables\n\t\t$arr = array();\n\n\t\t// Check to make sure the path valid and clean\n\t\t$path = JPath::clean($path);\n\n\t\t// Is the path a folder?\n\t\tif (!is_dir($path)) {\n\t\t\tJError::raiseWarning(21, 'JFolder::files: ' . JText::_('Path is not a folder'), 'Path: ' . $path);\n\t\t\treturn false;\n\t\t}\n\n\t\t// read the source directory\n\t\t$handle = opendir($path);\n\t\twhile (($file = readdir($handle)) !== false)\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..') && (!in_array($file, $exclude))) {\n\t\t\t\t$dir = $path . DS . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\tif ($recurse) {\n\t\t\t\t\t\tif (is_integer($recurse)) {\n\t\t\t\t\t\t\t$arr2 = JFolder::files($dir, $filter, $recurse - 1, $fullpath);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$arr2 = JFolder::files($dir, $filter, $recurse, $fullpath);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$arr = array_merge($arr, $arr2);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (preg_match(\"/$filter/\", $file)) {\n\t\t\t\t\t\tif ($fullpath) {\n\t\t\t\t\t\t\t$arr[] = $path . DS . $file;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$arr[] = $file;\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\tclosedir($handle);\n\n\t\tasort($arr);\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "5cfe0dd38205a7eae7d076ce322a2099", "score": "0.64698607", "text": "function get_files($path, $filter, $internal_call = FALSE)\n{\n\t$listing = array_diff(scandir(ADROIT_PATH.'/'.$path), array('.', '..'));\n\t$dirs = array();\n\tforeach ($listing as $dir)\n\t{\n\t\tif (is_dir(ADROIT_PATH.'/'.$path.'/'.$dir))\n\t\t{\n\t\t\t$dirs = array_merge($dirs, get_files($path.'/'.$dir, $filter, TRUE));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$dirs[] = ADROIT_PATH.'/'.$path.'/'.$dir;\n\t\t}\n\t}\n\t\n\tif ($internal_call === TRUE)\n\t\treturn $dirs;\n\t\n\treturn preg_grep($filter, $dirs);\n}", "title": "" }, { "docid": "878000dd212f5e32ec0bbb8a58a00ae6", "score": "0.64368486", "text": "function readDirectory($path, &$errors)\n{\n $files = array();\n\n //extract the path and extension from $path\n if (preg_match('%^(.+/)?\\*\\.(.+)$%', $path, $matches)) {\n //see comment at the top of page about relative URLs\n\n //if there was no path matched, it's the current folder\n $directoryPath = empty($matches[1]) ? '' : substr($matches[1], 0, -1); //strip off trailing slash\n $desiredEnding = \".\" . $matches[2]; //.js for example\n $desiredEndingLength = strlen($desiredEnding);\n\n //read filenames in directory:\n $directoryContents = opendir('./test/' . $directoryPath);\n\n //don't forget to actually give the path along with the actual filename\n $pathPrefix = './' === $directoryPath ? '' : $directoryPath;\n\n while (false !== ($filename = @readdir($directoryContents))) {\n //if the file name ends with .js for example\n if (substr($filename, -$desiredEndingLength) === $desiredEnding) {\n $files[] = $pathPrefix . (empty($pathPrefix) ? '' : '/') . $filename;\n }\n\t\t\telseif(is_dir($directoryPath.'/'.$filename) && '.' !== $filename && '..' !== $filename){\n\t\t\t\t$files = array_merge($files, readDirectory($directoryPath.'/'.$filename.'/*'.$desiredEnding, $errors));\n\t\t\t}\n }\n } else {\n $errors[] = 'readDirectory: path cannot be interpreted';\n }\n\n return $files;\n}", "title": "" }, { "docid": "3fb079889834c27e3da4a952446048ec", "score": "0.64152646", "text": "public function files($path) {\n $path = $this->filesystemRoot() . $path;\n\n return $this->list_directory($path, 'files');\n }", "title": "" }, { "docid": "7b16c577d21e5d199b3326ae49353dc7", "score": "0.63841075", "text": "public function getFiles($path)\n {\n //$access = krynAcl::check(3, $path, 'read', true);\n //if (!$access) return false;\n $fs = $this->getAdapter($path);\n $path = $this->normalizePath($path);\n\n if ($path == '/trash') {\n #return $this->getTrashFiles();\n }\n\n $items = $fs->getFiles($path);\n if (!is_array($items)) {\n return $items;\n }\n\n if (count($items) == 0) {\n return array();\n }\n\n $items = $this->wrap($items);\n\n usort($items, function($a, $b){\n return strnatcasecmp($a ? $a->getPath() : '', $b ? $b->getPath() : '');\n });\n\n return $items;\n }", "title": "" }, { "docid": "c1d6d6f6518b6f05d2232e659b716d28", "score": "0.63753897", "text": "function getFolder($path) {\n\t\t$files=$this->getFiles();\n\t\t$folderContent=array();\n\t\t$pathLength=strlen($path);\n\t\tforeach($files as $file) {\n\t\t\tif($file[0]=='/') {\n\t\t\t\t$file=substr($file, 1);\n\t\t\t}\n\t\t\tif(substr($file, 0, $pathLength)==$path and $file!=$path) {\n\t\t\t\t$result=substr($file, $pathLength);\n\t\t\t\tif($pos=strpos($result, '/')) {\n\t\t\t\t\t$result=substr($result, 0, $pos+1);\n\t\t\t\t}\n\t\t\t\tif(array_search($result, $folderContent)===false) {\n\t\t\t\t\t$folderContent[]=$result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $folderContent;\n\t}", "title": "" }, { "docid": "aa735f3481ac7507c24a11c1fc536c81", "score": "0.63543713", "text": "function getAllFiles($path, $filter = '', $exclude = '.git|tmp|.temp|logs|usermedia|.install') {\n $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);\n \n $files = array(); \n foreach ($rii as $file) {\n if ($file->isFile()) { \n $tempPath = $file->getPathname();\n \n if(!empty($exclude) && preg_match(\"/{$exclude}/\", $tempPath)) {\n continue;\n }\n \n if(empty($filter) || preg_match(\"/{$filter}/\", $tempPath)) {\n $files[] = $tempPath;\n }\n }\n }\n \n// $files = array_filter(iterator_to_array($rii), function($file) {\n// return $file->isFile();\n// });\n\n return $files;\n}", "title": "" }, { "docid": "df41028b1f3ebcf299b0df4fd3107d83", "score": "0.6329986", "text": "public function listDirectory($path);", "title": "" }, { "docid": "4d962eb796407a60365367ea2a1bbcd4", "score": "0.6326818", "text": "private function GetFileNamesFrom($path) {\n $array = array();\n $counter = 0;\n $dir = new DirectoryIterator($path);\n \n foreach ($dir as $fileinfo) {\n $name = $fileinfo->getFilename();\n \n if($name == '.' || $name == '..')\n continue;\n\n if($this->IsPHP($name)) {\n $array[$counter] = $name;\n $counter++;\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "23a01ad43f65a749d9c96856f8d3468a", "score": "0.6285755", "text": "private function _scandir($path)\n {\n $structure = array(\n 'dirs' => array(), \n 'files' => array(), \n );\n\n $entries = scandir($path);\n foreach ($entries as $entry) {\n if ($entry == '.') {\n continue;\n }\n if ($entry == '..' && realpath($path) == $this->container->getParameter('vortexgin.file_browser.dir')) {\n continue;\n }\n $relativePath = str_ireplace($this->container->getParameter('vortexgin.file_browser.dir'), '', realpath($path).'/'.$entry);\n if (is_dir($path.'/'.$entry)) {\n $structure['dirs'][$entry] = $relativePath;\n } else {\n $structure['files'][$entry] = $relativePath;\n }\n }\n return $structure;\n }", "title": "" }, { "docid": "9164553af75add3a2d5b6b27d65f2001", "score": "0.62831455", "text": "protected function getDirectories($path)\n\t{\n\t\tif ($this->files->exists($path) === false) {\n\t\t\tabort(404);\n\t\t}\n\n\t\t$directories = $this->files->directories($path);\n\t\t$folders = array();\n\n\t\tif (count($directories) > 0) {\n\t\t\tforeach ($directories as $dir) {\n\t\t\t\t$dir = str_replace('\\\\', '/', $dir);\n\t\t\t\t$folder = explode('/', $dir);\n\t\t\t\t$folders[] = end($folder);\n\t\t\t}\n\t\t}\n\n\t\treturn $folders;\n\t}", "title": "" }, { "docid": "0fd098835cb807e34748a3cef9e61214", "score": "0.62493294", "text": "private function _getFiles($path = '') {\r\n $result = array();\r\n $path = rtrim($path, '/');\r\n $root = $this->get('config')->get('root');\r\n\r\n foreach ((array)glob($path.'/*', GLOB_ONLYDIR) as $item) {\r\n if (strlen($item) > strlen($path)) {\r\n $result = array_merge($result, $this->_getFiles($item));\r\n }\r\n }\r\n\r\n foreach ((array)glob($path.'/*.php') as $item) {\r\n $shortPath = substr($item, strlen($root) + 1);\r\n if (!in_array($shortPath, $this->_excludeFilesFromLoad)) {\r\n $result[] = $item;\r\n }\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "1d8c453cdb582fb1617abcebb1d44e4c", "score": "0.62443477", "text": "function get_files_in_folder($path, $extension = '', $getFileName = false)\n{\n $childFiles = [];\n if (is_dir($path)) {\n $files = scandir($path);\n if (is_array($files)) {\n if ($extension != '') {\n foreach ($files as $file) {\n $pathFile = $path . '/' . $file;\n if (strpos($file, '.') !== false && !is_dir($pathFile) && pathinfo($path . '/' . $file, PATHINFO_EXTENSION) == $extension) {\n if ($getFileName) {\n $childFiles[] = pathinfo($path . '/' . $file, PATHINFO_FILENAME);\n } else {\n $childFiles[] = $file;\n }\n }\n }\n } else {\n foreach ($files as $file) {\n if (strpos($file, '.') !== false && !is_dir($path . '/' . $file)) {\n $childFiles[] = $file;\n }\n }\n }\n }\n }\n return $childFiles;\n}", "title": "" }, { "docid": "d77d84b04ec5e4fc302073ed7948973b", "score": "0.62413347", "text": "function scandirs ( $pPath ) {\n\t$results = scandir ( $pPath );\n\n\tforeach ($results as $result) {\n\t\t// Skip all hidden files\n\t\tif ( $result[0] === '.' ) continue;\n\n\t\tif ( is_dir ( $pPath . '/' . $result ) ) {\n\t\t\t$dirs[] = $result;\n\t\t}\n\t}\n\t\n\treturn ( $dirs );\n}", "title": "" }, { "docid": "642028fbbb7ac58a9a8ee57b5b848a8e", "score": "0.6237903", "text": "private static function _filesRecursiv($path, $filter = '[.css|.js]$')\n\t{\n\t\t$arr = array();\n\t\t$handle = opendir($path);\n\n\t\twhile (($file = readdir($handle)) !== false)\n\t\t{\n\t\t\tif ($file != '.' && $file != '..')\n\t\t\t{\n\t\t\t\t$fullpath = $path . DIRECTORY_SEPARATOR . $file;\n\n\t\t\t\tif (is_dir($fullpath))\n\t\t\t\t{\n\t\t\t\t\t$arr = array_merge($arr, self::_filesRecursiv($fullpath, $filter));\n\t\t\t\t}\n\t\t\t\telseif (preg_match(\"/$filter/\", $file))\n\t\t\t\t{\n\t\t\t\t\t$arr[] = $fullpath;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "aebefca3f06b056d48ff1da2c4fce26a", "score": "0.62115675", "text": "public function getDirectoryOfPath($path)\n {\n $this->logDebug(\"hipservNasService - getDirectoryOfPath: \" . $path);\n \n $folders = explode('/', $path);\n $isFirst = true;\n $currentDirectory = null;\n \n foreach ($folders as $folder) {\n $this->logDebug('Search part: ' . $folder);\n if ($folder !== '') {\n if ($isFirst) {\n $isFirst = false;\n \n $this->logDebug('Search root folder ' . $folder);\n foreach ($this->rootMediaSources as $root) {\n if ($root->name == $folder) {\n $this->logDebug('root folder found');\n $currentDirectory = $root;\n }\n }\n\n if ($currentDirectory == null) {\n $this->logDebug('root folder not found');\n return null;\n }\n } else {\n $this->logDebug('Search folder ' . $folder);\n\n $mediaSources = $this->getDirectoryContent($currentDirectory->href);\n $folderFound = false;\n\n foreach ($mediaSources as $mediaSource) {\n if ($mediaSource->type == 'folder') {\n if ($mediaSource->name == $folder) {\n $this->logDebug('Folder found');\n $currentDirectory = $mediaSource;\n $folderFound = true;\n }\n } else {\n $this->logDebug('item is not a folder, it is a ' . $mediaSource->type);\n }\n }\n\n if ($folderFound == false) {\n $this->logDebug('Folder not found');\n return null;\n }\n }\n }\n }\n\n return $currentDirectory;\n }", "title": "" }, { "docid": "b1e9190178b1b9eb65d7c9e9d19b25ac", "score": "0.6172197", "text": "static function ReadFolderFiles($path, $fileExtensions = '*')\n\t{\n\t\t$arrFiles = array();\n\t\tif ($handle = opendir($path))\n\t\t{\n\t\t\t$arrExtensions = explode('|', strtolower($fileExtensions));\n\t\t\twhile (false !== ($entry = readdir($handle))) \n\t\t\t{\n\t\t\t\tif ($entry != \".\" && $entry != \"..\") \n\t\t\t\t{\n\t\t\t\t\t$addFile = false;\n\t\t\t\t\tif ($fileExtensions == '*')\n\t\t\t\t\t\t$addFile = true;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = pathinfo($entry, PATHINFO_EXTENSION);\n\t\t\t\t\t\t$extension = strtolower($extension);\n\t\t\t\t\t\tif (in_array($extension, $arrExtensions))\n\t\t\t\t\t\t\t$addFile = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($addFile)\n\t\t\t\t\t\tarray_push($arrFiles, $entry);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\tif (count($arrFiles) == 0) $arrFiles = null;\n\t\treturn $arrFiles;\n\t}", "title": "" }, { "docid": "bdda8fac957c659e467a6eb0133bd668", "score": "0.6158893", "text": "function getFiles($path,$child=false){\n $files=array();\n if(!$child){\n if(is_dir($path)){\n $dp = dir($path);\n }else{\n return null;\n }\n while ($file = $dp ->read()){\n if($file !=\".\" && $file !=\"..\" && is_file($path.$file)){\n $files[] = $file;\n }\n }\n $dp->close();\n }else{\n scanfiles($files,$path);\n }\n return $files;\n}", "title": "" }, { "docid": "d5c7e0354f084c9e353def2b404b2148", "score": "0.6156452", "text": "function phpikiReadDir($path)\n{\n\t$results = array();\n\tif ($handle = @opendir($path)) \n\t{\n\t\twhile (false !== ($file = readdir($handle))) \n\t\t{\n\t\t\tif ($file != \".\" && $file != \"..\" && $file != \".git\") \n\t\t\t{\n\t\t\t\t$results[] = $path.\"/\".$file;\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\t}\n\treturn $results;\n}", "title": "" }, { "docid": "d4573aa9690e1e2756b206a8e2f4a796", "score": "0.6137106", "text": "public static function themes($path = NULL)\n\t{\n\t\t// Create an array for the files\n\t\t$found = array();\n\n\t\tif (is_dir($path))\n\t\t{\n\t\t\t// Create a new directory iterator\n\t\t\t$dir = new DirectoryIterator($path);\n\n\t\t\tforeach ($dir as $file)\n\t\t\t{\n\t\t\t\t// Get the file name\n\t\t\t\t$filename = $file->getFilename();\n\n\t\t\t\tif ($filename[0] === '.' OR $filename[strlen($filename)-1] === '~')\n\t\t\t\t{\n\t\t\t\t\t// Skip all hidden files and UNIX backup files\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Relative filename is the array key\n\t\t\t\t$key = $filename;\n\n\t\t\t\tif ($file->isDir()) $found[$key] = $key;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// Sort the results alphabetically\n\t\tksort($found);\n\n\t\treturn $found;\n\t}", "title": "" }, { "docid": "d4194ea7fef1866726a8e163a52e6748", "score": "0.6096756", "text": "public static function listFilesInFolder($strPath, $blnSkipFolders = true, $strFilenamePattern = null) {\r\n\t\t// strip off the trailing slash if it's there\r\n\t\tif ($strPath[strlen($strPath) - 1] == \"/\") {\r\n\t\t\t$strPath = substr($strPath, 0, -1);\r\n\t\t}\r\n\t\t\r\n\t\t$result = array();\r\n\t\t\r\n\t\t$originalSet = self::getFilesInFolderHelper($strPath);\r\n\t\tforeach ($originalSet as $item) {\r\n\t\t\t$childPath = $strPath . \"/\" . $item;\r\n\t\t\tif (is_dir($childPath)) {\r\n\t\t\t\t\t$childItems = self::listFilesInFolder($childPath);\r\n\t\t\t\t\tforeach ($childItems as $child) {\r\n\t\t\t\t\t\t\t$result[] = $item . \"/\" . $child;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!$blnSkipFolders || !is_dir($childPath)) {\r\n\t\t\t\tif (!$strFilenamePattern || ($strFilenamePattern && preg_match($strFilenamePattern, $item))) {\r\n\t\t\t\t\t$result[] = $item;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "c4e3a3fa3d67060c7223bed71f3fd465", "score": "0.6087623", "text": "public static function getFiles($path, $recurse = false, $filter = null){\n\n\t\t$result = array();\n\t\t$iterator = $recurse ? new \\RecursiveDirectoryIterator($path, \\RecursiveDirectoryIterator::SKIP_DOTS) : new \\FilesystemIterator($path, \\FilesystemIterator::SKIP_DOTS);\n\n\t\tif ($recurse){\n\t\t\t$iterator = new \\RecursiveIteratorIterator($iterator);\n\t\t}\n\n\t\tif (!is_null($filter)){\n\t\t\t$iterator = new \\RegexIterator($iterator, $filter, \\RegexIterator::ALL_MATCHES);\n\t\t}\n\n\t\tforeach ($iterator as $item){\n\t\t\tif ((!is_null($filter) && is_array($item) && !is_dir($item[0][0]) || !$item->isDir())){\n\t\t\t\t$sep = substr($path, strlen($path) - 1, 1) === DIRECTORY_SEPARATOR ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$result[] = $path . $sep . ($recurse ? $iterator->getSubPathName() : $iterator->getFilename());\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "056e840ad0edafc584619330cf64b065", "score": "0.6060813", "text": "public function listFiles($path)\n {\n $files = array();\n $it = $this->iterateDir($path);\n\n while ($it->valid() === true) {\n $files[] = $it->key();\n\n $it->next();\n }\n\n return $files;\n }", "title": "" }, { "docid": "2efa1b6e9a0ecf0cf4762732cfbc9e8e", "score": "0.6059651", "text": "public function filesDirs($path) {\n $path = $this->filesystemRoot() . $path;\n\n return $this->listdirsfiles($path);\n }", "title": "" }, { "docid": "daf6d935fcfb41c49197f1789e29c764", "score": "0.60552263", "text": "function file_list($folder) {\n\t$file_list = array();\n\n\t$files = scandir($folder);\n\tforeach ($files as $file) {\n\t\t// markdown files in this directory\n\t\tif (!is_dir($file) && substr($file, -strlen(\".md\")) === \".md\") {\n\t\t\t$file_list[] = $folder . \"/\" . $file;\n\t\t}\n\t\t// look into the deeper directories\n\t\tif (is_dir($folder . \"/\" . $file) && $file != \".\" && $file != \"..\") {\n\t\t\t$more_files = file_list($folder . \"/\" . $file);\n\t\t\tforeach ($more_files as $more_file) {\n\t\t\t\t$file_list[] = $more_file;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $file_list;\n}", "title": "" }, { "docid": "f02abeaf7cf23c204596a1c39262a5c0", "score": "0.6054409", "text": "public function get_file_list($path = '') {\n if (!$path) {\n return $this->get_albums();\n } else {\n return $this->get_album_photos($path);\n }\n }", "title": "" }, { "docid": "29f257780768a4be9e75e0412f62dcd3", "score": "0.6042799", "text": "function list_dir($dir,$path){\n $dirs=array();\n $imgs=array();\n $others=array();\n $d=dir($dir);\n while (false != ($entry = $d->read())){\n if (is_dir(implode('/',array($dir,$entry)))){\n if (($entry!='.') && ($entry!='..')){\n $dirs[]=$entry;\n }\n }else if (is_image_file($entry,$path)){\n $bits=explode('.',$entry);\n $imgs[]=$bits[0];\n }else{\n $others[]=$entry;\n }\n }\n $results=array(\n 'dirs' => $dirs,\n 'imgs' => $imgs,\n 'others' => $others\n );\n return $results;\n}", "title": "" }, { "docid": "3bcfc717bcd64ea97351526380055050", "score": "0.6030371", "text": "protected function _scandir($path) {\n\t\t$files = [];\n\t\tif ($path === $this->root) {\n\t\t\tforeach ($this->enabledFiles as $file => $name) {\n\t\t\t\t$files[] = $path.'/'.$file;\n\t\t\t}\n\t\t}\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "da94f064f00a5721c3a1f325c54baeef", "score": "0.6014653", "text": "function list_directories( $path ) {\n global $gmz_directories, $ignore_folders;\n if( $handle = @opendir( $path ) ) {\n while( false !== ( $filename = readdir( $handle ) ) ) {\n if ( ! in_array( $filename, [ '.', '..', '.git', '.svn' ], true ) ) {\n $file_path = substr( $path . '/' . $filename, strlen( GFE_ROOT_DIR ) + 1, strlen( $path . '/' . $filename ) );\n if( is_dir( $path . '/' . $filename ) ) {\n if( ! in_array( $file_path, $ignore_folders, true ) ) {\n $gmz_directories[] = $file_path;\n }\n list_directories( $path . '/' . $filename );\n }\n }\n }\n closedir( $handle );\n } else {\n display_error( 'Invalid Directory' );\n }\n}", "title": "" }, { "docid": "25d64c3e22aa96a92015122e719ee2f3", "score": "0.6009746", "text": "public function determineFilesFromFilePath(string $path): array\n {\n return $this->determineFromFilePath($path, true, false);\n }", "title": "" }, { "docid": "21dd92289d0193dd56d51c08c5ab2072", "score": "0.6004639", "text": "public function chasil_scanDir(){\n return array_diff(scandir(dirname(__FILE__) . '/files/'), array('..', '.'));\n }", "title": "" }, { "docid": "539cf4adb28e42ad23cc05035e8361c6", "score": "0.59994143", "text": "function readDirs($path) {\n\t\t$dirs = array();\n\t\t$d = dir(DP_BASE_DIR . '/' . $path);\n\t\twhile (false !== ($name = $d->read())) {\n\t\t\tif (is_dir(DP_BASE_DIR . '/' . $path . '/' . $name) && $name != '.' && $name != '..'\n\t\t\t && $name != 'CVS' && $name != '.svn') {\n\t\t\t\t$dirs[$name] = $name;\n\t\t\t}\n\t\t}\n\t\t$d->close();\n\t\treturn $dirs;\n\t}", "title": "" }, { "docid": "65c1bfdf942ec9b87b7b828195fb2fff", "score": "0.5997954", "text": "public function getdirlist($path,$folders=\"1\")\r\n\t{\r\n\t\t/*\r\n\t\t * FOLDERS\r\n\t\t * 1-FILES & FOLDERS\r\n\t\t * 2-FILES ONLY\r\n\t\t * 3-FOLDERS ONLY\r\n\t\t */\r\n\t\t$flist=NULL;\r\n\t\tif($folders==\"1\")\r\n\t\t{\r\n\t\t\t$co=0;\r\n\t\t\tif (is_dir($path)) {\r\n\t\t\t\tif ($dh = opendir($path)) {\r\n\t\t\t\t\twhile (($file = readdir($dh)) !== BOOL_FAILURE) {\r\n\t\t\t\t\t\t$flist[$co][\"filename\"]=$file;\r\n\t\t\t\t\t\t$flist[$co][\"type\"]=filetype($path . $file);\r\n\t\t\t\t\t\t$co++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tclosedir($dh);\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn $flist;\r\n\t\t}\r\n\t\telse\r\n\t\t\tif($folders==\"2\")\r\n\t\t{\r\n\t\t\t$co=0;\r\n\t\t\tif (is_dir($path)) {\r\n\t\t\t\tif ($dh = opendir($path)) {\r\n\t\t\t\t\twhile (($file = readdir($dh)) !== BOOL_FAILURE) {\r\n\t\t\t\t\t\tif(filetype($path . $file)!=\"dir\")continue;\r\n\t\t\t\t\t\t$flist[$co][\"filename\"]=$file;\r\n\t\t\t\t\t\t$flist[$co][\"type\"]=filetype($path . $file);\r\n\t\t\t\t\t\t$co++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclosedir($dh);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $flist;\r\n\t\t}\r\n\t\telse\r\n\t\t\tif($folders==\"3\")\r\n\t\t\t{\r\n\t\t\t\t$co=0;\r\n\t\t\t\tif (is_dir($path)) {\r\n\t\t\t\t\tif ($dh = opendir($path)) {\r\n\t\t\t\t\t\twhile (($file = readdir($dh)) !== BOOL_FAILURE) {\r\n\t\t\t\t\t\t\tif(filetype($path . $file)==\"dir\")continue;\r\n\t\t\t\t\t\t\t$flist[$co][\"filename\"]=$file;\r\n\t\t\t\t\t\t\t$flist[$co][\"type\"]=filetype($path . $file);\r\n\t\t\t\t\t\t\t$co++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tclosedir($dh);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn $flist;\r\n\t\t\t}\r\n\t}", "title": "" }, { "docid": "68b5ca182e3b7c34eebaac2287f557e4", "score": "0.5995279", "text": "public static function getFiles($path, $pattern=\"\", SearchOption $searchOption=null) {\r\n $directoryInfo = new DirectoryInfo($path);\r\n $files = $directoryInfo->getFiles($pattern, $searchOption);\r\n $names = array();\r\n \r\n foreach($files as $file)\r\n {\r\n array_push($names, $file->name());\r\n }\r\n\r\n return $names;\r\n }", "title": "" }, { "docid": "69dd53a9d7a6e977ddc2b16b25002b45", "score": "0.59950286", "text": "public function fabrikReadDirectory($path, $filter='.', $recurse=false, $fullpath=false, $aFolderFilter=array(), $foldersOnly = false)\r\n\t{\r\n\t\t$arr = array();\r\n\t\tif (!@is_dir($path)) {\r\n\t\t\treturn $arr;\r\n\t\t}\r\n\t\t$handle = opendir($path);\r\n\t\twhile ($file = readdir($handle)) {\r\n\r\n\t\t\t$dir = JPath::clean($path.'/'.$file);\r\n\t\t\t$isDir = is_dir($dir);\r\n\t\t\tif ($file != \".\" && $file != \"..\") {\r\n\r\n\t\t\t\tif (preg_match(\"/$filter/\", $file)) {\r\n\r\n\t\t\t\t\tif (($isDir && $foldersOnly) || !$foldersOnly) {\r\n\t\t\t\t\t\tif ($fullpath) {\r\n\t\t\t\t\t\t\t$arr[] = trim(JPath::clean($path.'/'.$file));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$arr[] = trim($file);\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\t$goDown = true;\r\n\t\t\t\tif ($recurse && $isDir) {\r\n\t\t\t\t\tforeach ($aFolderFilter as $sFolderFilter) {\r\n\t\t\t\t\t\tif (strstr($dir, $sFolderFilter)) {\r\n\t\t\t\t\t\t\t$goDown = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($goDown) {\r\n\t\t\t\t\t\t$arr2 = FabrikWorker::fabrikReadDirectory($dir, $filter, $recurse, $fullpath,$aFolderFilter, $foldersOnly);\r\n\t\t\t\t\t\t$arrDiff = array_diff($arr, $arr2);\r\n\t\t\t\t\t\t$arr = array_merge($arrDiff);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($handle);\r\n\t\tasort($arr);\r\n\t\treturn $arr;\r\n\t}", "title": "" }, { "docid": "825e0d5e619ce6ef0d4b7beaa9661b8b", "score": "0.5988949", "text": "function listFolderFiles($folder){\n\n\t$all_files = scandir($folder); \t\t\t\t\n\n\tforeach ($all_files as $file) {\n\t\t$file_info = pathinfo($folder.\"/\".$file); \n\t\n\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t//$file is a directory -> go to this directory \t\n\t\t\tif(is_dir($folder.'/'.$file)){\n\t\t\t\tlistFolderFiles($folder.'/'.$file);\n\t\t\t\n\t\t\t}\n\t\t\t//$file is a file -> check the file type\n\t\t\telse{\n\t\t\t\t//valide image types\n\t\t\t\t$imagetypes= array(\"jpg\", \"jpeg\", \"gif\", \"png\");\n\t\t\t\t//$file is an image\n\t\t\t\tif(in_array($file_info['extension'], $imagetypes)){ ?>\n\t\t\t\t\t<a href=\"<?php echo $file_info['dirname'].\"/\".$file_info['basename']; ?> \">\n \t\t\t\t<img src=\"<?php echo $file_info['dirname'].\"/\".$file_info['basename'];?>\" alt=\"etwas ist schief gelaufen...\" width=\"250\" height=\"250\">\n \t\t\t\t\t</a> \n\t\t\t\t<?php }\n\t\t\t}\n\t\t}\n \t}\n}", "title": "" }, { "docid": "ae42f6de31d16599eb11281b26c2c43f", "score": "0.598616", "text": "public function getLayoutsFiles($path)\n {\n $result = array();\n $dirIterator = new DirectoryIterator($path);\n foreach ($dirIterator as $dir) {\n if (!$dir->isDir() && $dir->isFile()\n && strripos($dir->getBasename(), '.') !== 0) {\n $result[$dir->getBasename('.phtml')] = $dir->getBasename();\n }\n }\n return $result;\n }", "title": "" }, { "docid": "bb9296e5f18b4485fddd02eeaa0b850b", "score": "0.59748757", "text": "private function getFullDirectoryListing($path)\n {\n $listings = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($path));\n $listingArr = array_keys(\\iterator_to_array($listings));\n\n // Remove dots :)\n $listingArr = array_map(function ($listing) {\n return rtrim($listing, '\\/\\.');\n }, $listingArr);\n\n return array_unique($listingArr);\n }", "title": "" }, { "docid": "da741ebf3c04ffbcccb7ca6b0d4feabc", "score": "0.59747714", "text": "public function get($path) {\n $path = $this->filesystemRoot() . $path;\n\n $ListFiles = array();\n $Files = array();\n\n $scannedFiles = array_diff(scandir($path), ['.', '..']);\n $Files = array_merge($scannedFiles, $ListFiles);\n\n return $Files;\n }", "title": "" }, { "docid": "d29b039eb386462f17952b4d076cfe1e", "score": "0.5965799", "text": "public static function sub_folders($path)\n {\n $path = realpath($path);\n $folders = [];\n /**\n * @var $fileInfo SplFileInfo\n */\n foreach (new FilesystemIterator($path, FilesystemIterator::SKIP_DOTS) as $fileInfo) {\n if(!$fileInfo->isDir())\n continue;\n\n $folders[] = $fileInfo->getPathname();\n }\n return $folders;\n }", "title": "" }, { "docid": "9f1b388005f8526381760a8166ade6b6", "score": "0.5962034", "text": "function getAllFilesAndFoldersInPath($fileArr, $extPath)\n {\n $extList = '';\n $fileArr[] = $extPath;\n $fileArr = array_merge($fileArr,\n GeneralUtility::getFilesInDir($extPath, $extList, 1, 1));\n\n $dirs = GeneralUtility::get_dirs($extPath);\n if (is_array($dirs)) {\n reset($dirs);\n while (list(, $subdirs) = each($dirs)) {\n if ($subdirs) {\n $fileArr = $this->getAllFilesAndFoldersInPath($fileArr, $extPath . $subdirs . '/');\n }\n }\n }\n\n return $fileArr;\n }", "title": "" }, { "docid": "9f0f1c0051392ee33fd132443b19bdb0", "score": "0.5945859", "text": "public static function readTheDir($path) {\n\t\tif ($dir = opendir($path)) {\n\t\t\twhile (($file = readdir($dir)) !== false) {\n\t\t\t\tif ($file != '.' AND $file != '..') {\n\t\t\t\t\t$keys[$file] = self::readTheFile($path . '/' . $file);\n\t\t\t\t}\n\t\t\t}\n \tclosedir($dir);\n\t\t\treturn $keys;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "f139810d9437a0aa19b817cef393a53f", "score": "0.5926862", "text": "public function list_folder($path, $recursive = FALSE, $include_media_info = FALSE, $include_has_explicit_shared_members = FALSE) {\n $endpoint = \"https://api.dropboxapi.com/2/files/list_folder\";\n $headers = array(\n \"Content-Type: application/json\",\n );\n $postdata = json_encode(array( \"path\" => $path, \"recursive\" => $recursive, \"include_media_info\" => $include_media_info, \"include_has_explicit_shared_members\" => $include_has_explicit_shared_members));\n $returnData = Dropbox::postRequest($endpoint, $headers, $postdata);\n if (isset($returnData[\"error\"])) {\n return $returnData[\"error_summary\"];\n }\n else {\n return $returnData;\n }\n }", "title": "" }, { "docid": "884f6346e4526caf6bbeb3771a2cd4a2", "score": "0.59238595", "text": "public static function scanDirectory($path, $incFilePath = false, $recursively = true) {\n\t\t$foundFiles = array();\n\t\t$path = (string)trim($path = (substr($path, strlen($path)-1) == DIRECTORY_SEPARATOR) ? $path : $path . DIRECTORY_SEPARATOR);\n\t\tif(!$path) {\n\t\t\tthrow new Exceptions_SeotoasterException('Scaning directory: path to the directrory is empty.');\n\t\t}\n\t\tif(!is_dir($path)) {\n\t\t\tthrow new Exceptions_SeotoasterException('Scaning directory: path is not a directrory.');\n\t\t}\n\t\t$foundFiles = @scandir($path);\n\t\t$files = array();\n\t\tif(is_array($foundFiles) && !empty ($foundFiles)) {\n\t\t\tforeach ($foundFiles as $key => $file) {\n\t\t\t\tif(in_array($file, self::$_excludedFiles)) {\n\t\t\t\t\tunset($foundFiles[$key]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($recursively) {\n\t\t\t\t\tif(is_dir($path . $file)) {\n\t\t\t\t\t\tunset($foundFiles[array_search($file, $foundFiles)]);\n\t\t\t\t\t\t$files = array_merge($files, self::scanDirectory($path . $file, $incFilePath));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($incFilePath) {\n\t\t\t\t\tarray_push($files, $path . $file);\n\t\t\t\t} else {\n\t\t\t\t\tarray_push($files, $file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "b98e183c69abb114721d09210bef90af", "score": "0.5894612", "text": "function get_child_folder($path)\n{\n $directories = scandir($path);\n $childFolders = [];\n foreach ($directories as $directory) {\n if (strpos($directory, '.') === false && is_dir($path . '/' . $directory)) {\n $childFolders[] = $directory;\n }\n }\n return $childFolders;\n}", "title": "" }, { "docid": "f846df9f4125b54acb3b9a7917ca2d32", "score": "0.58735603", "text": "function readFiles($path, $filter='.') {\n\t\t$files = array();\n\n\t\tif (is_dir($path) && ($handle = opendir($path))) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != '.' && $file != '..' && preg_match(('/' . $filter . '/'), $file)) {\n\t\t\t\t\t$files[$file] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "b249783876a217d7f7419bf82a382eec", "score": "0.5872762", "text": "public function getFilemanagerDirectories($path) {\n $directories = [];\n\n switch ($path) {\n case '':\n case '/':\n $directories[] = (object)[\n 'name' => 'Nahrané',\n 'path' => '/uploaded'\n ];\n break;\n }\n\n return $directories;\n }", "title": "" }, { "docid": "7bd458859e6e4147e24372519e00ca14", "score": "0.5858145", "text": "function getItems(\n\t$path , //The path of the folder to read.\n\t$recurse = true, //True to recursively search into sub-folders, or an integer to specify the maximum depth.\n\t$filter_allow = '/./', //A filter for file names.\n\t$filter_exclude = '', //Regexp of files to exclude\n\t$filter_exclude_path = '', //Regexp of path to exclude\n\t$findfiles = true, //True to read the files, false to read the folders\n\t$scipfolders = true, //Scip folders from result\n\t$counthash = false // Method used for count file hash, false - for disable\n){\n\t//@set_time_limit(ini_get('max_execution_time'));\n\n\t// Is the path a folder?\n\tif (!is_dir($path)){\n\t\techo '<b>No valid folder path</b>';\n\t\treturn false;\n\t}\n\n\t// use RecursiveDirectoryIterator where it possible, php 5.2.x partiall suport\n\tif (class_exists('RecursiveDirectoryIterator')) {//version_compare(PHP_VERSION, '5.3.0', 'ge')\n\t\treturn _getItemsDirectoryIterator($path, $recurse, $filter_allow,\n\t\t\t\t$filter_exclude, $filter_exclude_path, $findfiles, $scipfolders, $counthash);\n\t}\n\n\t$arr = array();\n\n\t// Read the source directory\n\tif (!($handle = @opendir($path))){\n\t\treturn $arr;\n\t}\n\n\twhile (($file = readdir($handle)) !== false){\n\t\t// Compute the fullpath\n\t\t$fullpath = $path . '/' . $file;\n\n\t\t// Compute the isDir flag\n\t\t$isDir = is_dir($fullpath);\n\n\t\tif ($file != '.' && $file != '..'\n\t\t\t&& (empty($filter_exclude_path) || !preg_match($filter_exclude_path, $fullpath))\n\t\t\t&& (empty($filter_exclude) || !preg_match($filter_exclude, $file))\n\t\t){\n\n\t\t\tif ((($isDir && !$scipfolders) || ($findfiles && !$isDir))\n\t\t\t\t&& (empty($filter_allow) || preg_match($filter_allow, $file))\n\t\t\t){\n\n\t\t\t\t$about_file = array(\n\t\t\t\t\t'path' => '',\n\t\t\t\t\t'filename' => '',\n\t\t\t\t\t'ext' => '',\n\t\t\t\t\t'size' => 0, //size in bytes\n\t\t\t\t\t'type' => '', //file, folder, link\n\t\t\t\t\t'mtime' => '', //time of last modification (Unix timestamp)\n\t\t\t\t\t'ctime'\t=> '', //time of last inode change (Unix timestamp)\n\t\t\t\t\t'mode' => '', //inode protection mode, permissions , base_convert($file_info['mode'],10,8);\n\t\t\t\t\t'hash' => '',\n\t\t\t\t\t'state' => '',//1.same;2.changed;3.new;4.removed\n\t\t\t\t);\n\n\t\t\t\t$about_file['path'] = $fullpath;\n\t\t\t\t$about_file['filename'] = pathinfo($file, PATHINFO_FILENAME);\n\t\t\t\t$about_file['ext'] = pathinfo($file, PATHINFO_EXTENSION);\n\t\t\t\t$about_file['type'] = filetype($fullpath);\n\n\t\t\t\tif($about_file['type'] != 'link'){\n\t\t\t\t\t$stat = stat($fullpath);\n\n\t\t\t\t\t$about_file['size'] = $stat['size'];\n\t\t\t\t\t$about_file['mtime'] = $stat['mtime'];\n\t\t\t\t\t$about_file['ctime'] = $stat['ctime'];\n\t\t\t\t\t$about_file['mode'] = $stat['mode'];\n\t\t\t\t}\n\n\t\t\t\tif (is_readable($fullpath)){\n\t\t\t\t\t$about_file['hash'] = $counthash ? hash_file($counthash, $fullpath) : '';\n\t\t\t\t} else {\n\t\t\t\t\t//echo 'File not readable: '.$fullpath.'<br />';\n\t\t\t\t\t$about_file['hash'] = 'Not Readable!';\n\t\t\t\t}\n\n\t\t\t\t$arr[$fullpath] = $about_file;\n\t\t\t}\n\n\t\t\t// Search recursively\n\t\t\tif ($isDir && $recurse){\n\t\t\t\tif (is_int($recurse)){\n\t\t\t\t\t// Until depth 0 is reached\n\t\t\t\t\t$arr = array_merge($arr, getItems($fullpath, $recurse - 1, $filter_allow,\n\t\t\t\t\t\t\t$filter_exclude, $filter_exclude_path, $findfiles, $scipfolders, $counthash));\n\t\t\t\t}else{\n\t\t\t\t\t$arr = array_merge($arr, getItems($fullpath, $recurse, $filter_allow,\n\t\t\t\t\t\t\t$filter_exclude, $filter_exclude_path, $findfiles, $scipfolders, $counthash));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tclosedir($handle);\n\treturn $arr;\n}", "title": "" }, { "docid": "127a657a7f0c4ffde3be2e51e3254dde", "score": "0.5814535", "text": "public function folders($path) {\n $path = $this->filesystemRoot() . $path;\n\n return $this->list_directory($path, 'folders');\n }", "title": "" }, { "docid": "46eda82729da3a64de1de93cbed48c88", "score": "0.5811669", "text": "public function test_files_with_folder_path() : void\n {\n $this->flysystem_prophecy\n ->getMetadata('/dir/')\n ->willReturn(['type' => 'dir', 'path' => '/dir/']);\n\n $this->flysystem_prophecy\n ->listContents('/dir/', true)\n ->willReturn([\n ['type' => 'dir', 'path' => '/dir/'],\n ['type' => 'file', 'path' => '/dir/file-2.php'],\n ['type' => 'dir', 'path' => '/dir/subdir/'],\n ['type' => 'file', 'path' => '/dir/subdir/file-3.php'],\n ]);\n\n // create the source adapter\n $adapter = new FlysystemSource($this->flysystem_prophecy->reveal());\n\n // get the files and check we have the right ones\n $files = $adapter->files('/dir/');\n $this->assertCount(2, $files);\n $this->assertContainsOnlyInstancesOf(FileInfoInterface::class, $files);\n $this->assertCount(1, array_filter($files, function (FileInfoInterface $fileInfo) {\n return $fileInfo->path() === '/dir/file-2.php';\n }));\n $this->assertCount(1, array_filter($files, function (FileInfoInterface $fileInfo) {\n return $fileInfo->path() === '/dir/subdir/file-3.php';\n }));\n }", "title": "" }, { "docid": "8662ec73f894db9e29ae21ef79bc3616", "score": "0.58084154", "text": "function file_check_path(&$path) {\n // Check if path is a directory.\n if (file_check_directory($path)) {\n return '';\n }\n\n // Check if path is a possible dir/file.\n $filename = basename($path);\n $path = dirname($path);\n if (file_check_directory($path)) {\n return $filename;\n }\n\n return FALSE;\n}", "title": "" }, { "docid": "8cd2ba2960bd981d570d3ddee91148cb", "score": "0.5805749", "text": "function getFiles( $Dir, $Recursive=false, $OnlyFiles=false );", "title": "" }, { "docid": "941babd3a2263eb3684e9154223d99d6", "score": "0.580464", "text": "function list_files($dir)\n{\n global $recursive, $search_in;\n\n $result = array();\n if (is_dir($dir)) {\n if ($dh = opendir($dir)) {\n while (($file = readdir($dh)) !== false) {\n if (!($file == '.' || $file == '..')) {\n $file = $dir . '/' . $file;\n if (is_dir($file) && $recursive == true && $file != './.' && $file != './..') {\n $result = array_merge($result, list_files($file));\n } else if (!is_dir($file)) {\n if (in_array(get_file_extension($file), $search_in)) {\n $result[] = $file;\n }\n }\n }\n }\n }\n }\n return $result;\n}", "title": "" }, { "docid": "f89c24bcaff0294adf069e54d67198c3", "score": "0.5804063", "text": "protected function getFiles($namespace, $path)\n {\n if (is_dir($path)) {\n $files = scandir($path);\n foreach ($files as $fileName) {\n if (!is_dir($fileName)) {\n $file = $path .'/'.$fileName;\n if ($this->validate($namespace,$file)) {\n $this->requireFile($file);\n }\n\n }\n }\n\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "815ed5cbf3263159cb746a8b0d7ae19a", "score": "0.5797501", "text": "protected function getFiles($path = null)\n {\n $files = $this->disk->files($path?:'');\n $canExclude = $this->getKey('extensions.filter');\n\n foreach($files as $key => $file){\n if($canExclude){\n foreach($this->excludedExtensions() as $ext){\n if($this->getExtension($file) == $ext){\n unset($files[$key]);\n }\n }\n }\n\n if($this->willFilterExtensions()){\n foreach($this->allowedExtensions() as $ext){\n if(str_contains($file, '.'.$ext)){\n $response[] = str_replace('.'.$ext, '', $file);\n }\n }\n }\n }\n\n return isset($response) ? $response : $files;\n }", "title": "" }, { "docid": "57c4ce528d74b59d6f771e3d1dc51b07", "score": "0.57969755", "text": "function get_files_list($path, $extentions = [], $files_only = false)\n {\n if( empty($path) || !is_dir($path) ) {\n return false;\n }\n \n if( array_count($extentions) > 1 ) {\n $extentions = '*.{' . implode(',', $extentions) . '}';\n $flag = GLOB_BRACE;\n } else if( array_count($extentions) == 1 ) {\n $extentions = '*.' . reset($extentions);\n $flag = null;\n } else {\n $extentions = '*';\n $flag = null;\n }\n\n $files = glob( $path . DIR_SEP . $extentions , $flag);\n \n if( !empty($files) ) {\n $_result = [];\n \n foreach($files as $key=>$val) {\n if( is_file($val) ) {\n \t if( !$files_only ) {\n \t \t $_result[ str_replace($path . DIR_SEP, '', $val) ] = filesize($val);\n\t\t\t\t } else {\n\t\t\t\t\t $_result[] = str_replace($path . DIR_SEP, '', $val);\n\t\t\t\t }\n }\n }\n \n return $_result;\n }\n \n return false;\n }", "title": "" }, { "docid": "c2d97339e866cddc4c7c2145c05de175", "score": "0.5794687", "text": "function ListFolder($path)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t $dir_handle = @opendir($path) or die(\"Unable to open $path\");\n\t\t\t\t\t\t \n\t\t\t\t\t\t //Leave only the lastest folder name\n\t\t\t\t\t\t $dirname = end(explode(\"/\", $path));\n\t\t\t\t\t\t $dirname_value=str_replace(STORAGE_DIR, \"\", $path);\n\t\t\t\t\t\t $dirname_value=ltrim($dirname_value,\"/\");\n\t\t\t\t\t\t \n\t\t\t\t\t\t //display the target folder.\n\t\t\t\t\t\t echo \"<li><label><input name='folder_select' value='$dirname-$dirname_value/' type='radio' style='float:left'/> <i class=\\\"fa fa-folder left margin10right\\\" style='padding:2px 0px 0px 5px'><a>$dirname /</a></i><div style='clear:both'></div></label>\\n\";\n\t\t\t\t\t\t echo \"<ul id=\\\"navlist\\\">\\n\";\n\t\t\t\t\t\t while (false !== ($file = readdir($dir_handle))) \n\t\t\t\t\t\t {\n\t\t\t\t\t\t if($file!=\".\" && $file!=\"..\")\n\t\t\t\t\t\t {\n\t\t\t\t\t\t if (is_dir($path.\"/\".$file))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t //Display a list of sub folders.\n\t\t\t\t\t\t ListFolder($path.\"/\".$file);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t echo \"</ul>\\n\";\n\t\t\t\t\t\t echo \"</li>\\n\";\n\t\t\t\t\t\t \n\t\t\t\t\t\t //closing the directory\n\t\t\t\t\t\t closedir($dir_handle);\n\t\t\t\t\t\t}", "title": "" }, { "docid": "03d36a7b294c1338b41d5a0600fcb32e", "score": "0.57925165", "text": "function FilesForDirectory($dirPath, $recursive = true, $returnObject = false)\n{\n $iterator = new DirectoryIterator($dirPath);\n \n $files = array();\n \n foreach($iterator as $file)\n {\n if($file->isFile())\n {\n if($returnObject)\n {\n $files[] = $file->getFileInfo();\n }\n else\n {\n $files[] = $file->getPathname();\n }\n }\n elseif($file->isDir() && !$file->isDot() && $recursive === true)\n {\n $subdirFiles = FilesForDirectory($file->getPathname(), true, $returnObject);\n \n foreach($subdirFiles as $subdirFile)\n {\n $files[] = $subdirFile;\n }\n }\n }\n \n return $files;\n}", "title": "" }, { "docid": "b14effca61dd80b6601563b7af0f2c9e", "score": "0.57794195", "text": "public function folder_files ($folder)\n {\t\n $file_list = array();\n if (! is_dir($folder))\n return $file_list;\n if (! ($handle = opendir($folder)))\n return $file_list;\n while (false !== ($file = readdir($handle))) {\n if ($file == \".\" || $file == \"..\")\n \n continue;\n $file_list[] = $file;\n \n }\n closedir($handle);\n return $file_list;\n }", "title": "" }, { "docid": "99f6c080e9a2830a9aeb9e9e2fca3f69", "score": "0.57781327", "text": "function preg_ls($path=\".\", $rec=false, $pat=\"/.*/\") {\n $pat=preg_replace(\"|(/.*/[^S]*)|s\", \"\\\\1S\", $pat);\n //Remove trailing slashes from path\n while (substr($path,-1,1)==\"/\") $path=substr($path,0,-1);\n //also, make sure that $path is a directory and repair any screwups\n if (!is_dir($path)) $path=dirname($path);\n //assert either truth or falsehoold of $rec, allow no scalars to mean truth\n if ($rec!==true) $rec=false;\n //get a directory handle\n $d=dir($path);\n //initialise the output array\n $ret=Array();\n //loop, reading until there's no more to read\n while (false!==($e=$d->read())) {\n //Ignore parent- and self-links\n if (($e==\".\")||($e==\"..\")) continue;\n //If we're working recursively and it's a directory, grab and merge\n if ($rec && is_dir($path.\"/\".$e)) {\n $ret=array_merge($ret,preg_ls($path.\"/\".$e,$rec,$pat));\n continue;\n }\n //If it don't match, exclude it\n if (!preg_match($pat,$e)) continue;\n //In all other cases, add it to the output array\n $ret[]=$path.\"/\".$e;\n }\n //finally, return the array\n return $ret;\n}", "title": "" }, { "docid": "2ffb91fed57b0a20860d65ead7f3b5b8", "score": "0.5766851", "text": "private function getFoldersOrTokensFromPath($path = '/')\n {\n // guarantee input into the function\n $path = Token::formatPath($path);\n\n $index = substr_count($path, '/') + 1;\n\n $folders = (usingsqlite()) ?\n Token::select('path AS folder') :\n Token::selectRaw('SUBSTRING_INDEX(path, \"/\", ?) AS folder', array($index));\n\n $concat = (usingsqlite()) ? '? || \"%\"' : 'CONCAT(? ,\"%\")';\n\n $folders = $folders\n ->distinct()\n ->where('user_id', auth()->guard()->user()->id)\n ->whereRaw('path LIKE ' . $concat, array($path))\n ->orderBy('folder', 'ASC')\n ->get()->toArray();\n\n // sqlite has no equivalent of SUBSTRING_INDEX so we have to do this bit manually\n if (usingsqlite()) {\n // shorten all the folders to the desired sections\n $folders = array_map(function ($folder) use ($index) {\n $folder['folder'] = implode('/', array_slice(explode('/', $folder['folder']), 0, $index));\n\n return $folder;\n }, $folders);\n\n // filter out duplicate folders\n $folders = array_intersect_key($folders, array_unique(array_map('serialize', $folders)));\n }\n\n // if there is only one folder, make sure it matches the path\n // so this doesn't break it if theres only one token in the app\n if (count($folders) == 1 && $folders[0]['folder'] == $path) {\n return Token::where('user_id', auth()->guard()->user()->id)\n ->where('path', $path)\n ->first();\n }\n\n $folders = array_map(function ($folder) {\n $folder['image'] = $this->getImageForFolderOrToken($folder['folder']);\n\n return $folder;\n }, $folders);\n\n return $folders;\n }", "title": "" }, { "docid": "fcc664be5cd4f3f38dd2486a48dbaa74", "score": "0.57658255", "text": "function find_all_files($dir) {\r\n $root = scandir($dir);\r\n foreach($root as $value) {\r\n if($value === '.' || $value === '..') {continue;}\r\n $result[]=\"$dir/$value\";\r\n if(is_file(\"$dir/$value\")) {continue;}\r\n foreach(find_all_files(\"$dir/$value\") as $value)\r\n {\r\n $result[]=$value;\r\n }\r\n }\r\n return $result;\r\n}", "title": "" }, { "docid": "fe4c74e51d0984d2ab448ea68edf3e44", "score": "0.57624", "text": "public static function searchdir ( $path , $maxdepth = -1 , $mode = \"DIRS\" , $d = 0, $except_folders ) {\n \n if ( substr ( $path , strlen ( $path ) - 1 ) != '/' ) { $path .= '/' ; }\n $dirlist = array () ;\n if ( $mode != \"FILES\" ) {\n if (!in_array($path, $except_folders)){\n $dirlist[] = $path ;\n } \n }\n if ( $handle = opendir ( $path ) ) {\n while ( false !== ( $file = readdir ( $handle ) ) ) {\n if ( $file != '.' && $file != '..' && substr($file, 0, 1) !== '.') {\n $file = $path . $file ;\n if ( ! is_dir ( $file ) ) {\n if ( $mode != \"DIRS\" ) {\n $dirlist[] = $file ;\n }\n }\n elseif ( $d >=0 && ($d < $maxdepth || $maxdepth < 0) ) {\n $result = self::searchdir ( $file . '/' , $maxdepth , $mode , $d + 1, $except_folders ) ;\n $dirlist = array_merge ( $dirlist , $result ) ;\n }\n }\n }\n closedir ( $handle ) ;\n }\n if ( $d == 0 ) { \n natcasesort($dirlist);\n $dirlist = array_values($dirlist);\n }\n return ( $dirlist ) ;\n }", "title": "" }, { "docid": "656f1dca014c1687bafcbd2c6fbf21dd", "score": "0.5756797", "text": "function dir_list($path){\r\n\r\n $files = array();\r\n\r\n if (is_dir($path)){\r\n $handle = opendir($path);\r\n while ($file = readdir($handle)) {\r\n if ($file[0] == '.'){ continue; }\r\n\r\n if (is_file($path.$file)){\r\n $files[] = $file;\r\n }\r\n }\r\n closedir($handle);\r\n sort($files);\r\n }\r\n\r\n return $files;\r\n\r\n}", "title": "" }, { "docid": "80b30fce7d93e58b32ce6153e4ef29e6", "score": "0.57561", "text": "function getFileNames ($folder) {\r\n\t$f_path = array ();\r\n\t$count = 0;\r\n\tif ($handle = opendir(\"images/events/$folder\")) {\r\n\t\twhile (false !== ($entry = readdir($handle))) {\r\n\t\t\tif ($entry != \".\" && $entry != \"..\" && strpos($entry, '.jpg',1)) {\r\n\t\t\t\t$f_path[$count] = \"images/events/$folder/$entry\";\t\r\n\t\t\t\t$count++;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tclosedir($handle);\r\n\t}\r\n\treturn $f_path;\r\n}", "title": "" }, { "docid": "f5fd2e822b8e975b6f041eb1a8fca229", "score": "0.5755219", "text": "function folderIterator($start_path, $iteration_path=\"\", $exclude=array(), $extensions=false, $files=false) {\n\t\tif(!$files) {\n\t\t\t$files = array();\n\t\t}\n\n\t\t$handle = opendir(\"$start_path/$iteration_path\");\n\t\twhile($file = readdir($handle)) {\n\t\t\tif(FileSystem::validFolder($file, $exclude, $extensions)) {\n\t\t\t\tif(is_dir(\"$start_path/$iteration_path$file\")) {\n\t\t\t\t\t$files = FileSystem::folderIterator($start_path, \"$iteration_path$file/\", $exclude, $extensions, $files);\n\t\t\t\t}\n\t\t\t\telse if((!$extensions || array_search(substr($file, -4), $extensions) !== false) && !array_search(\"$start_path/$iteration_path$file\", $files)) {\n\t\t\t\t\t$files[] = \"$start_path/$iteration_path$file\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "e8cc0fc7373bdcb419b7cd50289f53de", "score": "0.5753162", "text": "public function scanDir()\n {\n // only possible in directories\n if (!$this->isDir() || !$this->exists()) {\n return null;\n }\n\n $fileList = [];\n $fileNameList = scandir($this->absoluteFileName);\n foreach ($fileNameList as $fileName) {\n // do not add . and ..\n if ($fileName === \".\" or $fileName === \"..\") {\n continue;\n }\n $absoluteFileName = $this->absoluteFileName . \"/\" . $fileName;\n $fileList [] = new File ($absoluteFileName);\n }\n\n return $fileList;\n }", "title": "" }, { "docid": "c82f036c42a825e92fbc9dd1ad23e097", "score": "0.573655", "text": "function browse_folder($path)\r\n {\r\n \r\n $html='';\r\n $list=glob($path.\"/*\");\r\n $html.='<div class=\"left\"><p><i><a href=\"?q=new_agent&dir='.substr($path,0,strrpos($path,\"/\")).'\" class=\"status_inline green\">UP to '.substr($path,0,strrpos($path,\"/\")).'</a>&nbsp;\r\n <a href=\"?q=new_agent&dir='.$_SERVER['DOCUMENT_ROOT'].'\" class=\"status_inline red\">Back to DOCUMENT_ROOT '.$_SERVER['DOCUMENT_ROOT'].'</a></i></p>';\r\n $html.='<ul style=list-style:none;\"\">';\r\n\t foreach($list as $l)\r\n\t {\r\n\t $html.='<li>'.(is_file($l)?$this->draw_file4browse('?q=new_agent&patch='.$l.'&dir='.((isset($_GET['dir']))?$_GET['dir']:\"\"),'?q=new_agent&unpatch='.$l.'&dir='.((isset($_GET['dir']))?$_GET['dir']:\"\"),$l):$this->draw_folder4browse('?q=new_agent&dir='.$l,$l)).'</li>';\r\n\t }\r\n $html.='</ul></div>';\r\n return $html;\r\n }", "title": "" }, { "docid": "cf8d64fd3c4d06c8822579af7e4d4e6b", "score": "0.5733848", "text": "function listFolderFiles($dir=null)\n{\n $rtn = array();\n if (is_dir($dir)) {\n #echo '<ol>';\n foreach (new DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n // echo '<li>' . $fileInfo->getFilename();\n\n if ($fileInfo->isDir()) {\n //echo 'directory';\n //$rtn = array_merge($rtn, listFolderFiles($fileInfo->getPathname()));\n } else {\n //echo 'file';\n //$rtn[] = $fileInfo->getFilename();\n\t\t\t\t\t$url= $dir.$fileInfo->getFilename();\n\t\t\t\t\t$rtn[] =$url;\n\t\t\t\t\t\n }\n #echo '</li>';\n }\n }\n #echo '</ol>';\n } else {\n echo \"No such directory '$dir'\";\n }\n return $rtn;\n}", "title": "" }, { "docid": "bb9351c870f236d7bede3351b46f4c19", "score": "0.5729853", "text": "public function getPaths();", "title": "" }, { "docid": "7336c042845accd1350b66956df7d3cc", "score": "0.57288814", "text": "function list_files( $client, $root ) {\n\t$ret = array();\n\t$page_token = null;\n\tdo {\n\t\t$params = array(\n\t\t\t'q' => '\"' . $root . '\" in parents and mimeType = \"application/vnd.google-apps.folder\" and trashed = false',\n\t\t\t'supportsAllDrives' => true,\n\t\t\t'includeItemsFromAllDrives' => true,\n\t\t\t'pageToken' => $page_token,\n\t\t\t'pageSize' => 1000,\n\t\t\t'fields' => 'nextPageToken, files(id, name)',\n\t\t);\n\t\t$response = $client->files->listFiles( $params );\n\t\tif ( $response instanceof \\Sgdg\\Vendor\\Google_Service_Exception ) {\n\t\t\tthrow $response;\n\t\t}\n\t\tforeach ( $response->getFiles() as $file ) {\n\t\t\t$ret[] = $file->getName();\n\t\t}\n\t\t$page_token = $response->getNextPageToken();\n\t} while ( null !== $page_token );\n\treturn $ret;\n}", "title": "" }, { "docid": "db8886b91eb3b38fe0dac436d77d5b31", "score": "0.5714649", "text": "public function listFiles(string $path): \\Traversable;", "title": "" }, { "docid": "c39f71fc6b520921f1d7f3e2361593b8", "score": "0.56919545", "text": "protected function _subdirs($path)\n {\n\n $dirs = false;\n if (is_dir($path) && is_readable($path)) {\n if (class_exists('FilesystemIterator', false)) {\n $dirItr = new ParentIterator(\n new RecursiveDirectoryIterator($path,\n FilesystemIterator::SKIP_DOTS |\n FilesystemIterator::CURRENT_AS_SELF |\n (defined('RecursiveDirectoryIterator::FOLLOW_SYMLINKS') ?\n RecursiveDirectoryIterator::FOLLOW_SYMLINKS : 0)\n )\n );\n $dirItr->rewind();\n if ($dirItr->hasChildren()) {\n $dirs = true;\n $name = $dirItr->getSubPathName();\n while ($dirItr->valid()) {\n if (!$this->attr($path . DIRECTORY_SEPARATOR . $name, 'read', null, true)) {\n $dirs = false;\n $dirItr->next();\n $name = $dirItr->getSubPathName();\n continue;\n }\n $dirs = true;\n break;\n }\n }\n } else {\n $path = strtr($path, array('[' => '\\\\[', ']' => '\\\\]', '*' => '\\\\*', '?' => '\\\\?'));\n return (bool)glob(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);\n }\n }\n return $dirs;\n }", "title": "" }, { "docid": "830f063b712fab0cd0de4622b3eeb82a", "score": "0.5688654", "text": "public static function\tlistFiles($path, $recursive = false, $filter = '') {\n $list = array();\n $path = realpath($path);\n if ($handle = opendir($path)) {\n while (false !== ($entry = readdir($handle)))\n if ($entry != '.' && $entry != '..') {\n if ($filter == '' || fnmatch($filter, $entry))\n $list[] = \"$path/$entry\";\n if ($recursive && is_dir(\"$path/$entry\"))\n $list = array_merge($list, FS::listFiles(\"$path/$entry\", true, $filter));\n }\n closedir($handle);\n }\n return $list;\n }", "title": "" }, { "docid": "443808dec9a4fb940b3c8037d6d0e83e", "score": "0.5684769", "text": "function browse_content ($path = '') {\n $path = rtrim(basepath(\"content/$path\"), '/');\n \n $files = glob(\"$path/*\");\n \n return array_filter($files, function ($file) {\n return strpos($file, '.') || !is_dir($file);\n });\n}", "title": "" }, { "docid": "b1718210297d474d4e5024dc00920605", "score": "0.56816494", "text": "public function getFiles($options = array())\n {\n $options = array_merge($this->options, $options);\n\n $folder = $options['file_base_path'] . '/' . $options['folder'];\n if (file_exists($folder))\n {\n $dirs = glob(\"$folder/originals/*\");\n $fullPath = isset($options['full_path']) ? $options['full_path'] : false;\n if ($fullPath)\n {\n return $dirs;\n }\n if (!is_array($dirs)) {\n $dirs = array();\n }\n $result = array_map(function($s) { return preg_replace('|^.+[\\\\/]|', '', $s); }, $dirs);\n return $result;\n }\n else\n {\n return array();\n }\n }", "title": "" }, { "docid": "44af97c7fb9f7d6427a9004560c26310", "score": "0.5673632", "text": "function list_directories_files( $path ) {\n global $gmz_files, $gmz_directories, $extensions, $ignore_files, $ignore_ext, $ignore_folders, $directories_before_current_path, $current_directory_path;\n if( $handle = @opendir( $path ) ) {\n while( false !== ( $filename = readdir( $handle ) ) ) {\n if( ! in_array( $filename, [ '.', '..', '.git', '.svn' ], true ) ) {\n if( is_file( $path . '/' . $filename ) && ! in_array( $directories_before_current_path . $current_directory_path . $filename, $ignore_files, true ) ) {\n $file_ext = strtolower( pathinfo( $filename, PATHINFO_EXTENSION ) );\n if( ! in_array( $file_ext, $ignore_ext, true ) ) {\n $gmz_files[] = [ 'name' => $filename, 'ext' => $file_ext, 'type' => ! empty( $extensions[$file_ext][0] ) ? $extensions[$file_ext][0] : 'Unknown', 'size' => filesize( $path . '/' . $filename ), 'date' => filemtime( $path . '/' . $filename ) ];\n }\n }\n if( is_dir( $path . '/' . $filename ) && ! in_array( $directories_before_current_path . $current_directory_path . $filename, $ignore_folders, true ) ) {\n $gmz_directories[] = [ 'name' => $filename, 'size' => dir_size( $path . '/' . $filename ), 'date' => filemtime( $path . '/' . $filename ) ];\n }\n }\n }\n closedir( $handle );\n } else {\n display_error( 'Invalid Directory' );\n }\n}", "title": "" }, { "docid": "bd46d834f679378c73db96680a86c0e4", "score": "0.56717724", "text": "public function getDirectoryContents($path) {\n $results = [];\n\n try {\n $iterator = new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS);\n foreach ($iterator as $i) {\n $results[] = $i;\n if ($i->isDir()) {\n $results = array_merge($results, $this->getDirectoryContents($i));\n }\n }\n } catch (UnexpectedValueException $e) {\n // $results is already an empty array so nothing to do here, we'll just return it as is.\n }\n\n return $results;\n }", "title": "" }, { "docid": "1e9b272e4b148a928e60510867c72d19", "score": "0.5665925", "text": "public static function searchDirectoryIteratively($path, $filename) : string {\n $ret = \"\";\n $entries = scandir($path);\n\n return $ret;\n }", "title": "" }, { "docid": "05f66d38b69b7b6da695a8ab32f4a82d", "score": "0.5655603", "text": "protected function _subjects($path) {\n\t\tif (is_file($path)) {\n\t\t\t$current = new SplFileInfo($path);\n\t\t\treturn $current->getExtension() === 'php' ? array($current) : array();\n\t\t}\n\t\t$files = new RecursiveCallbackFilterIterator(\n\t\t\tnew RecursiveDirectoryIterator($path),\n\t\t\tfunction($current, $key, $iterator) {\n\t\t\t\t$noDescend = array(\n\t\t\t\t\t'.git',\n\t\t\t\t\t'libraries',\n\t\t\t\t\t'vendor'\n\t\t\t\t);\n\t\t\t\tif ($iterator->hasChildren()) {\n\t\t\t\t\tif ($current->isDir() && in_array($current->getBasename(), $noDescend)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ($current->isFile()) {\n\t\t\t\t\treturn $current->getExtension() === 'php';\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t);\n\t\treturn iterator_to_array(new RecursiveIteratorIterator($files));\n\t}", "title": "" }, { "docid": "6100587b20e3c9d3ae00a9e585e5b5f0", "score": "0.5646783", "text": "public static function getFileSytemEntries($path, $pattern=\"\") \r\n {\r\n $info = new DirectoryInfo($path);\r\n $entries = $info->getFileSystemInfos($pattern);\r\n $names = array();\r\n \r\n foreach($entries as $entry)\r\n {\r\n array_push($names, $entry->name());\r\n }\r\n \r\n return $names;\r\n }", "title": "" }, { "docid": "a9f34b5d356959072bb237fe4f50e09d", "score": "0.5644693", "text": "function ba_getFilesList($folder){\n $all_files = array();\n $fp=opendir($folder);\n while($cv_file=readdir($fp)) {\n if(is_file($folder.\"/\".$cv_file)) {\n $all_files[]=$folder.\"/\".$cv_file;\n }elseif($cv_file!=\".\" && $cv_file!=\"..\" && is_dir($folder.\"/\".$cv_file)){\n GetListFiles($folder.\"/\".$cv_file,$all_files);\n }\n }\n closedir($fp);\n return $all_files;\n}", "title": "" }, { "docid": "df6daa9b19694a57aa55180d22f52115", "score": "0.5644037", "text": "public function getFiles ($path, $lang, $recursive = false, $exclude = []) {\n \n if ($recursive) {\n $files = File::allFiles(base_path($path), $recursive);\n } else {\n $files = File::files(base_path($path), $recursive);\n }\n \n $filesData = [];\n\n foreach ($files as $file) {\n $shouldBeExcluded = false;\n foreach ($exclude as $excludedPath) {\n if ($shouldBeExcluded === false) {\n $shouldBeExcluded = (strpos($file->getRelativePath(), $excludedPath) !== false);\n }\n }\n if (!$shouldBeExcluded) {\n $filesData[] = [\n 'name' => $file->getBasename('.php'),\n 'path' => $file->getRelativePath(),\n 'full_path' => $path.'/'.$file->getRelativePath().'/'.$file->getFilename()\n ];\n }\n }\n\n return $filesData;\n }", "title": "" }, { "docid": "e9de6e84611b6822e267b6a0b9da7dad", "score": "0.56406283", "text": "function fileExists($path) {\n\t\t$files=$this->getFiles();\n\t\tif((array_search($path, $files)!==false) or (array_search($path.'/', $files)!==false)) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\t$folderPath=$path;\n\t\t\tif(substr($folderPath, -1, 1)!='/') {\n\t\t\t\t$folderPath.='/';\n\t\t\t}\n\t\t\t$pathLength=strlen($folderPath);\n\t\t\tforeach($files as $file) {\n\t\t\t\tif(strlen($file)>$pathLength and substr($file, 0, $pathLength)==$folderPath) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($path[0]!='/') {//not all programs agree on the use of a leading /\n\t\t\treturn $this->fileExists('/'.$path);\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e26804d01fc9a10dab0cb69392018c37", "score": "0.5632574", "text": "public function getFolderByName($path)\n {\n $root = $this->getFolderById(0);\n\n foreach(explode(\"/\",$path) as $n => $name){\n // Trivial tests\n if(!$name) continue;\n $found = false;\n // Walk through our hierarchy and find the currently named target\n foreach($root->item_collection->entries as $item){\n if(!$found && $item->type == 'folder' && $item->name == $name){\n // Set root to be the folder object of found ID\n $root = $this->getFolderById($item->id);\n $found = true;\n break;\n }\n }\n if(!$found) return false;\n }\n return $root;\n }", "title": "" }, { "docid": "83b6718e1d10f92cfb3d850e5731c853", "score": "0.5631209", "text": "function list_files_to_upload($path, $from_dir = '', $to_dir = '')\n{\n\t$files = array();\n\n\t$d = dir($path.'/'.$from_dir);\n\twhile ($f = $d->read())\n\t{\n\t\tif (!in_array($f, array('.', '..', '.svn', 'Thumbs.db', 'LICENSE', 'README')) && !preg_match('/^(readme|update).*?\\.txt$/', $f))\n\t\t{\n\t\t\tif (is_dir($path.'/'.$from_dir.'/'.$f))\n\t\t\t\t$files = array_merge($files, list_files_to_upload($path, $from_dir.'/'.$f, $to_dir.'/'.$f));\n\t\t\telse\n\t\t\t\t$files[ltrim($from_dir.'/'.$f, '/')] = $to_dir.'/';\n\t\t}\n\t}\n\n\treturn $files;\n}", "title": "" }, { "docid": "22e9332cadabbe20884199eb15cba9ec", "score": "0.5623876", "text": "public function find_paths($path) \n\t{\n\t\tglobal $CONFIG;\n\n\t\t$paths = array();\n\n\t\tforeach ($this->paths['application'] as $application_path) {\n\t\t\t$real_path = realpath($application_path.DS.$path);\n\n\t\t\tif($real_path && file_exists($real_path))\n\t\t\t\t$paths[] = $real_path;\n\t\t}\n\n\t\treturn $paths;\n\t}", "title": "" }, { "docid": "efb624cb7f4a208b00ad6dbe69e2e87e", "score": "0.5615698", "text": "private function getConfigurationFiles($path) {\n $files = [];\n $configPath = realpath($path);\n\n foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) {\n $directory = $this->getNestedDirectory($file, $configPath);\n\n $files[$directory.basename($file->getRealPath(), '.php')] = $file->getRealPath();\n }\n\n ksort($files, SORT_NATURAL);\n\n return $files;\n }", "title": "" }, { "docid": "30055238dca35c303d57a17af2563ee4", "score": "0.5608274", "text": "function getImagesFromDir($path) {\n $images = array();\n if ( $img_dir = @opendir($path) ) {\n while ( false !== ($img_file = readdir($img_dir)) ) {\n // checks for gif, jpg, png\n if ( preg_match(\"/(\\.gif|\\.jpg|\\.png)$/\", $img_file) ) {\n $images[] = $img_file;\n }\n }\n closedir($img_dir);\n }\n return $images;\n}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.0", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" } ]
[ { "docid": "a5a742c5eb76d32c32823659c256e71f", "score": "0.783437", "text": "public function actionCreate() {\n $this->render('resource_create');\n }", "title": "" }, { "docid": "246a2b1ff9c2e296275420128d62692d", "score": "0.7765723", "text": "public function create()\n {\n return view(\"aasource.addform\");\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "012fdc290aa72d4266b090e3a18611f3", "score": "0.7522791", "text": "public function create()\n\t{\n return View::make('resources.create');\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "5d140c321df7acb8c739eadcc5bc3d54", "score": "0.746548", "text": "public function create()\n {\n return view('laramanager::resources.create');\n }", "title": "" }, { "docid": "4408460962e2d641154ff1e778cccd2d", "score": "0.7411503", "text": "public function create()\n {\n $view_elements = [];\n \n $view_elements['page_title'] = 'Resources'; \n $view_elements['component'] = 'resources'; \n $view_elements['menu'] = 'resources'; \n $view_elements['breadcrumbs']['All Resources'] = array(\"link\"=>'/resources',\"active\"=>'1');\n \n\n $view = viewName('resources.add');\n return view($view, $view_elements);\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "e3088f55fa2e4660ea43003f9f05103e", "score": "0.738591", "text": "public function create()\n\t{\n\t\treturn view('subResourceDetails.create');\n\t}", "title": "" }, { "docid": "8346857a727217603e3b507224e6f4fb", "score": "0.7360721", "text": "public function create()\n {\n return view(\"form\");\n }", "title": "" }, { "docid": "a88dfafe57fd2497dd585577ba27a652", "score": "0.7350552", "text": "public function create()\n {\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('pages.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "d56752c440e87fca7ccd76e6743512e6", "score": "0.7350431", "text": "public function create()\n\t{\n\t\treturn View::make('catalogue.form');\t\n\t}", "title": "" }, { "docid": "33b0ce2d35b3db36c2ec35ffb91a2cba", "score": "0.733998", "text": "public function showCreateForm(){\n return view('client.create');\n }", "title": "" }, { "docid": "e1c4a637db2fd84ef7dabb5b305e9961", "score": "0.7336561", "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": "e6adbf3fbac4429738c92777eeac55a6", "score": "0.7333788", "text": "public function create()\n {\n $this->authorize('create', Form::class);\n\n return view('forms.create');\n }", "title": "" }, { "docid": "d3a655273e3662ac11954ec099dd187c", "score": "0.7281861", "text": "public function create()\n {\n //\n $data = array('new' => True,\n 'contentTitle' => 'Registrar Livro',);\n return view('bookform', $data);\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "70a09b9f9f3cf55e7b53ed7137155a00", "score": "0.7273827", "text": "public function create()\n {\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('countries.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "c5dd91fcabe4863a8febd91fd23029bc", "score": "0.7238648", "text": "public function create()\n {\n return view ('penilaian.form');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "21f60e4229ecd12f595a1f02490e2be5", "score": "0.7207343", "text": "public function create()\n\t{\n\t\tdd('show create form');\n\t}", "title": "" }, { "docid": "99deb8b0d3d11f3aacdf9b0837643062", "score": "0.7185418", "text": "public function create()\n {\n return view('Meringue/Form/views/new');\n }", "title": "" }, { "docid": "f5c4717b4547490715e81217fb91fcef", "score": "0.71719545", "text": "public function create() {\n $this->setObject();\n $record = $this->object;\n $page_title = \"Create {$this->singular_name}\";\n $route = $this->route;\n $form_fields = $this->setLabelClass($this->fields_config['form_fields']); \n return view($this->view . '.create', compact('record', 'page_title', 'route', 'form_fields'));\n }", "title": "" }, { "docid": "a46b2fb11623e72b333198e2c3c5bf3c", "score": "0.71715325", "text": "public function create()\n {\n $this->authorize('create', [ShowBusinessIdeas::class]);\n\n return view('resourceRoute.create');\n }", "title": "" }, { "docid": "f2873502c738e8bf31240f26e62893fc", "score": "0.71546483", "text": "public function create()\n {\n\t\t\treturn view('partner.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": "c403d39d383b8b091f07950a420dc3f5", "score": "0.7114736", "text": "public function create()\n\t{\n\n\t\treturn view('new');\n\n\n\t}", "title": "" }, { "docid": "05a788f6cee6a481e60579669c5fc2cd", "score": "0.71131325", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make(\"newUserForm\");\n\t}", "title": "" }, { "docid": "52886d3e49bbf4a926e71b6960578798", "score": "0.7101583", "text": "public function create()\n {\n //displaying form to create task\n return view('crud.create');\n }", "title": "" }, { "docid": "d304f8f134892d68ca540b0b858fd6cd", "score": "0.7088207", "text": "public function create()\n {\n return view('Home.add-new');\n }", "title": "" }, { "docid": "d1aa4707a9c6ebf5c8103249dbc1a2a3", "score": "0.7087244", "text": "public function create()\n {\n $view = 'create';\n\n $active = $this->active;\n $word = $this->create_word;\n $model = null;\n $select = null;\n $columns = null;\n $actions = null;\n $item = null;\n\n return view('admin.crud.form', compact($this->compact));\n }", "title": "" }, { "docid": "5dcbca5c2b296e16817ce45da193474b", "score": "0.70829123", "text": "public function create()\n {\n return view ('nafila.add');\n }", "title": "" }, { "docid": "dc7d007f8e9a89a82e7dd48856914140", "score": "0.7073015", "text": "public function newAction()\n {\n \t$this->_helper->noCacheHeader();\n\n \t// check if the backButton is diabled if so redirect\n\t\tif (isset($this->_namespace->noBackButton)) {\n\t\t\t$this->_redirectToDefault();\n\t\t}\n\n \t$this->view->form =\t$this->_service->getPopulatedForm(null, false);\n \t$this->_viewRenderer->render($this->_viewFolder . '/form', null, true);\n }", "title": "" }, { "docid": "533cfd54aea57067b2e130dc0d9b0d25", "score": "0.7060761", "text": "public function create()\n {\n return view('conection.form');\n }", "title": "" }, { "docid": "05e2241ee7d60144e91c052c80c01ae0", "score": "0.70603824", "text": "public function newAction()\n {\n $entity = new Book();\n $form = $this->formFactory->create(new BookType(), $entity);\n\n return $this->templating->renderResponse('elseymShelfBundle:Book:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "29f2d81a8230f1a71f0b822e8888c4b6", "score": "0.70505977", "text": "public function create()\n\t{\n\t\t//load the create form\n\t\treturn View::make('products.create');\n\t}", "title": "" }, { "docid": "eef8c1edfb3ab338d65c165479d67819", "score": "0.70433134", "text": "public function create()\n {\n return view('.form');\n }", "title": "" }, { "docid": "201ef6ea5f0160eb38fbe375126231cb", "score": "0.7032151", "text": "public function create()\n\t{\n\t\treturn View('materi.create');\n\t}", "title": "" }, { "docid": "b4abce55cb4a2ce8c33525b5a465907f", "score": "0.7024339", "text": "public function create()\n {\n return view(\"dashboard.car.create-edit\");\n }", "title": "" }, { "docid": "69091643d0249f6381b6ffd4215df94c", "score": "0.70228004", "text": "public function create()\n {\n return view('admin.books.book-form');\n }", "title": "" }, { "docid": "a1f0d1fef33570d235574b68a0aebcaf", "score": "0.7007119", "text": "public function create()\n {\n return view('fp4forms.create');\n }", "title": "" }, { "docid": "8c02f51227a2ebf45d5aa88aa1fbdd14", "score": "0.70046675", "text": "public function create()\n {\n return view('forms.create_late');\n }", "title": "" }, { "docid": "e3b7436816780585c955089205ac6539", "score": "0.69987273", "text": "public function newAction()\n {\n $this->view->form = new PersonajeForm(null, array('edit' => true));\n }", "title": "" }, { "docid": "9ba9ef4da9377c7d495a4dbf879551a4", "score": "0.69980985", "text": "public function create()\n\t{\n\t\treturn 'This should render the view to create a new resource!!';\n\t}", "title": "" }, { "docid": "21ac5bcda502a99b37477c3732d29a10", "score": "0.6997003", "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(\"Usuario\", $this->get(\"router\")->generate(\"usuario\"));\n $breadcrumbs->addItem(\"Nuevo\", $this->get(\"router\")->generate(\"usuario_new\"));\n\n $entity = new Usuario();\n $form = $this->createForm(new UsuarioType(), $entity);\n\n return $this->render('UsuarioBundle:Usuario:new.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "1cd57fc10fe9533cb291e668546ebc3f", "score": "0.69927114", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->userForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "fd33fc0da35476a9bd97bd2366215cad", "score": "0.69897515", "text": "public function actionCreate()\n {\n return $this->render('create');\n }", "title": "" }, { "docid": "fd33fc0da35476a9bd97bd2366215cad", "score": "0.69897515", "text": "public function actionCreate()\n {\n return $this->render('create');\n }", "title": "" }, { "docid": "552c23a4878608a4c2d75ce4352fa7ec", "score": "0.6985989", "text": "public function create()\n {\n return view('add.create');\n }", "title": "" }, { "docid": "19bcb614303c40b1d1ee9ab328c61c1b", "score": "0.69832903", "text": "public function showCreateForm(){\n\t\t\n\t\t// Set the state and tell plugins.\n\t\t$this->setState('SHOW_CREATE_FORM');\n\t\t$this->notifyObservers();\n\t\t\n\t\t//Get Create Form Title\n\t\t$title = $this->openFile(\"core/fragments/users/newUserTitle.phtml\");\n\t\t\n\t\t//Get Create Form\n\t\t$form = $this->openFile(\"core/fragments/users/newUser.phtml\");\n\n\t\t//Set form content to show\n\t\t$this->setContentTitle($title);\n\t\n\t\t//Set form content to show\n\t\t$this->setContent($form);\n\t}", "title": "" }, { "docid": "cab3875b40e1926cadf5d240d5755c33", "score": "0.69831926", "text": "public function create()\n\t{\n\t\treturn view('add');\n\t}", "title": "" }, { "docid": "7b27be70fa64e0a7965ca1f5f2324b8d", "score": "0.6981883", "text": "public function create()\n {\n //\n return view('new.create');\n }", "title": "" }, { "docid": "a4ac77c2b41d5381f9f521f9a9ef9c15", "score": "0.69774544", "text": "public function create()\n {\n return view('manage::create');\n }", "title": "" }, { "docid": "16ebda2fce028f53ff9acd2cdb27e61a", "score": "0.6973155", "text": "public function create()\n {\n return view('prijave.create');\n }", "title": "" }, { "docid": "1c39811f7717ee4b671fb0dabc86d306", "score": "0.69695777", "text": "public function create()\n {\n //\n return view('Sponsors/Admin/form');\n }", "title": "" }, { "docid": "f6da1d0450698bec5313ba023877e2c9", "score": "0.6969481", "text": "public function create()\n {\n return view(\"librarians.create\");\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.6968916", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "67affbe8defecaec0068c8df880bef78", "score": "0.6957839", "text": "public function create()\n {\n return view('hr::create');\n }", "title": "" }, { "docid": "3ff55b7631fd394f17ff84e6d8858428", "score": "0.6957047", "text": "public function create()\n {\n \n return view('pabrik.create');\n }", "title": "" }, { "docid": "faab52446786eb57de6d45ef5c9751a9", "score": "0.6954935", "text": "public function create()\n {\n $countries = Country::all();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('cities.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "13cfb81541a9764e54a683020f59b8bd", "score": "0.6952626", "text": "public function create() {\n $breadcrumb = [\n 'pageLable' => 'Create '.$this->className,\n 'links' => [\n ['name' => 'Create '.$this->className]\n ]\n ];\n return view('backend.layouts.form.create',\n $this->preparedCreateForm())\n ->with(['className' => $this->className, 'breadcrumb' => $breadcrumb])\n ->with('formAttributes', $this->formAttributes);\n }", "title": "" }, { "docid": "8ed65484ff2ee4c220e635b0137f51c9", "score": "0.69491976", "text": "public function create()\n {\n return view('show.create');\n }", "title": "" }, { "docid": "edcff5ad61f56a5f713509f282ab987f", "score": "0.694893", "text": "public function create()\n {\n //return form\n return view('admin.store.create');\n }", "title": "" }, { "docid": "07b43788dfee25823f1bfa779101007b", "score": "0.69488627", "text": "public function create()\n {\n return view('hrm::create');\n }", "title": "" }, { "docid": "86e74634806a61ed0f710d1b4aa1b622", "score": "0.69432896", "text": "public function create()\n {\n //return create view\n return view($this->getViewFolder().'.create',[\n 'properties' => $this->model->getPropertiesCreate(),\n 'resource' => $this->resource\n ]);\n }", "title": "" }, { "docid": "5e44d678b4e0518c96aebd2237cd5c11", "score": "0.69430643", "text": "public function create()\n {\n return view('dashboard.post.form_create');\n }", "title": "" }, { "docid": "9d347981a9dc58fed97cdffb7431509a", "score": "0.69423616", "text": "public function create()\n\t{\n\t\treturn view('admin.marca.new');\n\t}", "title": "" }, { "docid": "c8545d13c92a2bfc49784e47f3eece3a", "score": "0.6937241", "text": "public function create()\n {\n // Menampilkan form create\n return view('mahasiswa.create');\n }", "title": "" }, { "docid": "a8643f5298a2feeab2dd1817ae9a5e62", "score": "0.69359756", "text": "public function create(){\r\n\t\t\t$this->view('create');\r\n\t\t}", "title": "" }, { "docid": "62264d4253eb3b74399ec1e90a8bbcda", "score": "0.69322455", "text": "public function newAction()\n {\n $entity = new Phone();\n $form = $this->createForm(new PhoneType(), $entity);\n\n return $this->render('JblStudioBundle:Phone:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "03eea4206e77f982ad1e30911c57b32a", "score": "0.6929893", "text": "public function create()\n {\n return view('matakuliahs.create');\n }", "title": "" }, { "docid": "58cf4220e8a5e664b1119cbca77648f3", "score": "0.6928969", "text": "public function create()\n {\n $data = array_merge([\n 'tabs' => TabManager::get($this->getModel()->getTable()),\n $this->getResourceName() => $this->getModel(),\n ], $this->getFormData('create'));\n\n return view(\"{$this->viewPath}.create\", $data);\n }", "title": "" }, { "docid": "64f42d4ca1c0601a437ae6c5d9a1f2a9", "score": "0.6928629", "text": "public function create()\n {\n return view(\"residentials.add\");\n }", "title": "" }, { "docid": "8e841fda4e78530e752dec74ec809b42", "score": "0.69278556", "text": "public function create()\n {\n return view('ryutsuisen::role.form');\n }", "title": "" }, { "docid": "0fb248e24532b7357981b8412bbcd700", "score": "0.6917571", "text": "public function create()\n {\n return view('buku.form');\n }", "title": "" }, { "docid": "4e929a4b2808dee4d30b9afc14bcf480", "score": "0.6917477", "text": "public function create()\n {\n return view('landlord.add');\n }", "title": "" }, { "docid": "6945326379d789dcaf379e8368057f99", "score": "0.6915064", "text": "public function newAction()\n {\n $entity = new Rezyser();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:Rezyser:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a09a0efe9eece0c7f21dac4f5e096ee9", "score": "0.6912519", "text": "public function create()\n {\n return view('objectAdmin.create');\n }", "title": "" }, { "docid": "efb1a49f7e393c53db8698527f5440e8", "score": "0.69094497", "text": "public function create()\n\t{\n\t\treturn view('admin.book.create');\n\t}", "title": "" }, { "docid": "74bad321580cd692d72a5bc68292375c", "score": "0.6907924", "text": "public function create()\n {\n return view('projects.form', ['project' => new Project()]);\n }", "title": "" }, { "docid": "d135d57cf231c80bd81581e84bc5d101", "score": "0.689978", "text": "public function create()\n {\n return view(\"pages.mahasiswa.form\");\n }", "title": "" }, { "docid": "e193be5267ce5df3d9a89c422be1cdf0", "score": "0.6896789", "text": "public function newAction()\n {\n $repertoire = new Repertoire();\n $form = $this->createForm( RepertoireType::class, $repertoire);\n\n \n\t\treturn $this->render('repertoire/new.html.twig', array( 'repertoire' => $repertoire,\n 'form' => $form->createView(), ));\n }", "title": "" }, { "docid": "1e595d1c40410662eea090eb45d97ba4", "score": "0.6890229", "text": "public function create()\n {\n $model = $this->model;\n $role = Role::pluck('title', 'id')->all();\n return view(\"{$this->view}.form\", compact('model', 'role'));\n }", "title": "" }, { "docid": "e7931b0c0f69aa6a52b8b61f7d2e9a87", "score": "0.68901664", "text": "public function newAction() { \t\n \t$this->view->form = $this->_form; \t\n }", "title": "" }, { "docid": "e4e19ff4b09ce0b41c6e81d7794d0b45", "score": "0.6888766", "text": "public function create()\n {\n return view('product-create-form');\n }", "title": "" }, { "docid": "1964a7650dd5906a93274754d7b9a2d1", "score": "0.68877786", "text": "public function newAction()\n {\n $entity = new Regiao();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CMSConfiguracoesBundle:Regiao:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'error' => null\n ));\n }", "title": "" }, { "docid": "e7b489419b81ae7a77026305a8b01920", "score": "0.6885279", "text": "public function create()\n {\n return view('procrm::create');\n }", "title": "" }, { "docid": "e5666dcb2071335d352cdbc90f7e0f4d", "score": "0.6883182", "text": "public function create() { dd($this);\n return view('forms.create');\n }", "title": "" }, { "docid": "fddc7b44639ba32c68e6fa179d42af11", "score": "0.6882655", "text": "public function create() {\n\t\treturn view('admin::create');\n\t}", "title": "" }, { "docid": "e541aa1606e75bbf5778d3a7f0256cb1", "score": "0.6881101", "text": "public function create() {\n return view('admin.new');\n }", "title": "" }, { "docid": "2185bccd0ff9ecd23830f83e5ad143d4", "score": "0.6879935", "text": "public function create()\n {\n return view('regimen.create');\n }", "title": "" }, { "docid": "9f6a0c281e47a1d0a3dec201147718e6", "score": "0.68771493", "text": "public function newAction()\n {\n $entity = new BaseForms();\n\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:BaseForms:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "edef682535630deffcd3d6a6fdcdbe2f", "score": "0.6877042", "text": "public function create()\n {\n //\n return view('pages/createitemform');\n }", "title": "" }, { "docid": "64134e0334d9a96a3451da65dbded2e2", "score": "0.6874127", "text": "public function newAction()\n {\n $this->readAndSetExtendsTemplate();\n $entity = new Status();\n $form = $this->createForm(new StatusType(), $entity);\n\n return $this->render('HttpiCoreBundle:Status:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'extendsTemplate' => $this->extendsTemplate\n ));\n }", "title": "" }, { "docid": "4a3a37470b286041123bc977ccd01097", "score": "0.6870055", "text": "public function create()\n {\n return view('backend.forms.etudiant.create');\n }", "title": "" }, { "docid": "64be16e54c6140be0cde6c7bfb89beab", "score": "0.68632406", "text": "public function create()\n {\n return view('admin.show.create');\n }", "title": "" }, { "docid": "ad131f9e123018caa9b4e43a222f86af", "score": "0.68617475", "text": "public function create()\n {\n return view ('prelims.create');\n }", "title": "" }, { "docid": "bde062793a4b4defae59a778a806e252", "score": "0.68591446", "text": "public function create()\n\t{\n\t\t$tool = new Tool;\n\t\t$form_data = ['route' => self::$prefixRoute . 'store', 'method' => 'POST'];\n\n\t\treturn view(self::$prefixView . 'form', compact('tool', 'form_data'));\n\t}", "title": "" } ]
ca427bb131f236026d66a3679f4d00fb
Defines the sizes attribute.
[ { "docid": "a6b123b944d6f75371bc07960851b131", "score": "0.77029103", "text": "public function sizes($value = null){\n return $this->attr(ATTR_SIZES, $value);\n }", "title": "" } ]
[ { "docid": "17f6d901a19e352070d24824942cf109", "score": "0.7200127", "text": "public static function setSize($size) {}", "title": "" }, { "docid": "43924b043207656876481234620077cd", "score": "0.71121246", "text": "public function sizes();", "title": "" }, { "docid": "b78fa4021fce13a2c09cb86ebe4877af", "score": "0.7094363", "text": "function setSize( $value )\n {\n $this->Size = $value;\n }", "title": "" }, { "docid": "a0728afee75886d732d5e6a5d7f774b3", "score": "0.6971866", "text": "public function setSize($value){\r\n $this->size =$value;\r\n }", "title": "" }, { "docid": "7354f7d65f4b850855943e1d7f510208", "score": "0.6860149", "text": "public function setSize(array $size)\n {\n }", "title": "" }, { "docid": "452d2514020976eb4944a200e935e5b6", "score": "0.6833711", "text": "public function setSize($size){\n\t\t$this->size = $size;\n\t}", "title": "" }, { "docid": "c5ebcd8b12ce3276904def051bd0a33c", "score": "0.67790693", "text": "public function setSize($size) {\n\t\t$this->size = $size;\n\t}", "title": "" }, { "docid": "c6fd44297192ed88abb52e790a7b16e0", "score": "0.6723", "text": "public function setSize($size)\n\t{\n\t\t$this->_size = $size;\n\t}", "title": "" }, { "docid": "04c6628de2508902cc4672580ac408ba", "score": "0.6715487", "text": "public function size($value = null)\n\t{\n\t\t$this->attributes['size'] = $value;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "5aebe4b16f202d817922f7c65b6b805f", "score": "0.6710005", "text": "public function getSizeAttribute($size)\n\t{\n\t $units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n\t $power = $size > 0 ? floor(log($size, 1024)) : 0;\n\t return number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];\n\t}", "title": "" }, { "docid": "1df8f542ca88e62077ada507f12043df", "score": "0.66890806", "text": "public function sizes() : array\n {\n return $this->sizes;\n }", "title": "" }, { "docid": "abb37a7655b7c44f49d590c85a1b31cc", "score": "0.66869897", "text": "public function setSize($size)\n {\n $this->size = $size;\n }", "title": "" }, { "docid": "6d962f07a3bb46ec711a58faeb06e11f", "score": "0.6678935", "text": "public function size($size = 0)\n {\n return $this->_attribute('size', intval($size));\n }", "title": "" }, { "docid": "6d962f07a3bb46ec711a58faeb06e11f", "score": "0.6678935", "text": "public function size($size = 0)\n {\n return $this->_attribute('size', intval($size));\n }", "title": "" }, { "docid": "303441800d2bc7ff829ab614599d2193", "score": "0.66626227", "text": "public function size($value){\r\n $this->option[$this->borderAttrName]['@attributes']['w:sz'] = $value;\r\n\t\treturn $this;\r\n }", "title": "" }, { "docid": "76829712ab7425324fe81e4aa099ebfc", "score": "0.6659223", "text": "public function setSize($value)\n {\n $this->setProperty(\"Size\", $value, true);\n }", "title": "" }, { "docid": "18e4c637af44e547f6c348dffe182caf", "score": "0.6653175", "text": "public function setSize($sSize) {\r\n\t\t$this->setAtributo(\"size\", $sSize);\r\n\t}", "title": "" }, { "docid": "98d6c842fdd14f1bf182af1c22f183ce", "score": "0.6647645", "text": "public function setSize( $size )\n\t\t{\n\t\t\t$this->size = $size;\n\t\t}", "title": "" }, { "docid": "10f330524e8c9375afdad603e8064ad0", "score": "0.663276", "text": "public function setSize($size) {\n $this->_size = $size;\n }", "title": "" }, { "docid": "035a25b85ac98bb789fd31001256263b", "score": "0.6505608", "text": "public final function setSize($size)\n {\n $this->_size = $size;\n }", "title": "" }, { "docid": "49e618b0b5edf7851434d5b50d6f3046", "score": "0.64826465", "text": "public static function add_image_sizes(): void {\n\t\tforeach ( static::$sizes as $name => $data ) {\n\t\t\tadd_image_size( $name, $data['width'], $data['height'], $data['crop'] );\n\t\t}\n\t}", "title": "" }, { "docid": "821454fe03c55dd58e15a5e2430a9b5b", "score": "0.64793825", "text": "public function setSize($value)\n {\n return $this->set('Size', $value);\n }", "title": "" }, { "docid": "419af68ab8d2410991426b6774d78f7b", "score": "0.6479106", "text": "public function getSize() {\r\n\t\treturn $this->getAtributo(\"size\");\r\n\t}", "title": "" }, { "docid": "b233d4757f911f0ac89ef915a7a72d44", "score": "0.64652336", "text": "public function setSize($var)\n {\n GPBUtil::checkInt32($var);\n $this->size = $var;\n\n return $this;\n }", "title": "" }, { "docid": "c0c2dc06f0a8b457394eb2fbb69c5811", "score": "0.644549", "text": "public function getSize()\n {\n return (int) $this->getAttribute('size');\n }", "title": "" }, { "docid": "07388444ba1d1f12e199bff316e06997", "score": "0.642511", "text": "function definesSize()\n\t{\n\t\t$layout_node = $this->getMAItemNode($this->hier_id, $this->purpose,\n\t\t\t$this->getPcId(), \"/Layout\");\n\t\tif (is_object($layout_node))\n\t\t{\n\t\t\treturn $layout_node->has_attribute(\"Width\");\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2d4e025ba63635de2bf1e2982ebb9bc9", "score": "0.63702196", "text": "private function add_image_sizes() {}", "title": "" }, { "docid": "ab93dfa669f74d4014acc0aa2acd5925", "score": "0.6353795", "text": "public function setSize(int $size):void;", "title": "" }, { "docid": "ca3a799197cdbe821c1b19fb5b2684fe", "score": "0.6271006", "text": "public abstract function Size($settings=null);", "title": "" }, { "docid": "baac5b125b2bd7035045c53e1eb89b23", "score": "0.6224303", "text": "public function size($value) {\n return $this->setProperty('size', $value);\n }", "title": "" }, { "docid": "baac5b125b2bd7035045c53e1eb89b23", "score": "0.6224303", "text": "public function size($value) {\n return $this->setProperty('size', $value);\n }", "title": "" }, { "docid": "eb44be13f35c553fc3b3917e66a05534", "score": "0.6222237", "text": "public function sizes()\n {\n return $this->hasMany('App\\Models\\AssetSize');\n }", "title": "" }, { "docid": "04ce9c52eedcf5ff8f26420ebb3192bb", "score": "0.62193584", "text": "public function getSize()\n {\n }", "title": "" }, { "docid": "b1476dcd901c4dfcada63aa98b89abe8", "score": "0.6204225", "text": "public function setModuleSize($value);", "title": "" }, { "docid": "96bde4fb9600ce40a21313d5a1b70572", "score": "0.61965454", "text": "public function getSize()\n {\n return isset($this->attribute['size']) ? $this->attribute['size'] : null;\n }", "title": "" }, { "docid": "ab5f99e38a0314b6110570827eddb03a", "score": "0.6185038", "text": "function registerSizes(){\n\t$sizes = file_get_contents( get_template_directory().'/lib/img/sizes.json' );\n $sizes = json_decode( $sizes );\n\t$sets = $sizes->sets;\n $cases = $sizes->cases;\n\n\tforeach( $sets as $set => $set_sizes ) {\n\t\tforeach( $set_sizes as $breakpoint => $dimensions ){\n\t\t\tadd_image_size( $set.'_'.$breakpoint, $dimensions->w, $dimensions->h, true );\n\t\t}\n\t}\n\n foreach( $cases as $case => $dimensions ) {\n if( isset( $dimensions->w ) && isset( $dimensions->h ) ){\n\t\t\tadd_image_size( $case, $dimensions->w, $dimensions->h, true );\n\t\t} elseif( isset( $dimensions->w ) ){\n\t\t\tadd_image_size( $case, $dimensions->w, false) ;\n\t\t} elseif( isset( $dimensions->h ) ){\n\t\t\tadd_image_size( $case, 9999, $dimensions->h, false);\n\t\t}\n }\n\n}", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6168169", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6168169", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6168169", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6168169", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.6168169", "text": "public function getSize();", "title": "" }, { "docid": "8c3571855e96202d55f124770a4de123", "score": "0.61622447", "text": "public function size($value)\n {\n return $this->setProperty('size', $value);\n }", "title": "" }, { "docid": "3012c2004cf97917659b591ed346dad2", "score": "0.61607", "text": "function getSize() {\n return $this->size;\n }", "title": "" }, { "docid": "6a5d156cd0732fe3fcb90776006f1b3e", "score": "0.61542976", "text": "public function sizes() \n {\n return $this->hasMany(AssetSize::class);\n }", "title": "" }, { "docid": "a3553cdabf63628c32741636e75ed551", "score": "0.61425334", "text": "public function setSize($size)\n {\n $this->internal->setSize($size);\n }", "title": "" }, { "docid": "e01650b0634f60c83635c3db3cca9b98", "score": "0.6126497", "text": "function siSize()\n {\n\n $units = array( \"GB\" => 10737741824,\n \"MB\" => 1048576,\n \"KB\" => 1024,\n \"B\" => 0 );\n $decimals = 0;\n $size = $this->Size;\n $shortsize = $this->Size;\n\n while ( list( $unit_key, $val ) = each( $units ) )\n {\n if ( $size >= $val )\n {\n $unit = $unit_key;\n if ( $val > 0 )\n {\n $decimals = 2;\n $shortsize = $size / $val;\n }\n break;\n }\n }\n $shortsize = number_format( ( $shortsize ), $decimals);\n $size = array( \"size\" => $size,\n \"size-string\" => $shortsize,\n \"unit\" => $unit );\n return $size;\n }", "title": "" }, { "docid": "deb6ea6ab63a27bc8363fde57a56cb95", "score": "0.6099873", "text": "public function __setSize($value) \n\t{\n\t\tif(!is_int($value))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif($value < 1 || $value > 4)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$this -> size = $value;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "78a278365cce42d86846cb9f4cad8323", "score": "0.6088548", "text": "abstract public function getSize();", "title": "" }, { "docid": "033fdb1606548792f326e797252de918", "score": "0.6088367", "text": "public function setWidth($value);", "title": "" }, { "docid": "a1aa9a1b023b52133549b70a07fe3a26", "score": "0.6080196", "text": "public function set_size($width=null,$height=null){\n\t\t\tif(is_int($width))$width.='px';\n\t\t\tif(is_int($height))$height.='px';\n\t\t\tif($width!==null)$this->width=$width;\n\t\t\tif($height!==null)$this->height=$height;\n\t\t\tif($this->rendered)\n\t\t\t\techo 'var div='.$this->mtd('getDiv').';'.CRLF.'div.setAttribute(\"style\",'\n\t\t\t\t\t.@json_encode('width: '.$this->width.'; height: '.$this->height.';').');'.CRLF\n\t\t\t\t\t.'var div='.$this->mtd('getDiv').'.parentNode;'.CRLF.'div.setAttribute(\"style\",'\n\t\t\t\t\t.@json_encode('width: '.$this->width.'; height: '.$this->height.';').');'.CRLF;\n\t\t}", "title": "" }, { "docid": "e4e5eb759119e9f747af5a12535f1be8", "score": "0.60643697", "text": "protected function getSize()\n {\n return $this->getConfig(\"sizes.{$this->size}\");\n }", "title": "" }, { "docid": "6950ad78b8e59c819188aaa81aceac16", "score": "0.6056807", "text": "public function getSize()\n {\n return \"Normal\";\n }", "title": "" }, { "docid": "a6113e87d25550bbb09a72354027e983", "score": "0.6052369", "text": "public static function defineImageSizes()\n {\n return array(\n static::MODEL_PRODUCT => array(\n 'XXSThumbnail' => array(40, 40),\n 'XSThumbnail' => array(60, 60),\n 'SMThumbnail' => array(80, 80),\n 'MDThumbnail' => array(122, 122),\n 'LGThumbnail' => array(160, 160),\n 'Default' => array(300, 300),\n 'LGDefault' => array(600, 600),\n ),\n static::MODEL_CATEGORY => array(\n 'XXSThumbnail' => array(40, 40),\n 'MDThumbnail' => array(122, 122),\n 'LGThumbnail' => array(160, 160),\n 'Default' => array(160, 160),\n )\n );\n }", "title": "" }, { "docid": "55e0702c66f8b4db991591ad9870f2cb", "score": "0.6040965", "text": "public function getSize(){\r\n return $this->size ;\r\n }", "title": "" }, { "docid": "c19f6a16616272cdf6339bb3d25ba2b3", "score": "0.60294807", "text": "public function size()\n {\n return $this->hasMany('App\\size');\n }", "title": "" }, { "docid": "a6efcc19471961f0850523a73d2823ba", "score": "0.6025683", "text": "public function setSize()\n {\n $size = $this->file->getSize() / 1024 / 1024 ;\n $size = number_format($size, 1, '.', '');\n $this->size = $size;\n }", "title": "" }, { "docid": "62a35bbe90b122c526821f798563a5ec", "score": "0.60178715", "text": "public function setSize($size) {\n if(in_array($size, $this->_sizes)) {\n $this->_size = $size;\n }\n return $this;\n }", "title": "" }, { "docid": "93f34524f946e74ebe8ff28bce5b9efe", "score": "0.59872", "text": "function size(){\n }", "title": "" }, { "docid": "10ae2b35b37983dcd914d2104b7469fe", "score": "0.5974896", "text": "public function getSize()\n {\n return $this->getProperty(\"Size\");\n }", "title": "" }, { "docid": "7d6406c6ad63afd3d92d80ce500f7403", "score": "0.5973904", "text": "public function getImageSizeAttribute()\n {\n list($width, $height) = @getimagesize($this->path);\n\n return [\n 'width' => $width,\n 'height' => $height,\n ];\n }", "title": "" }, { "docid": "81c7e2ea70e180e5c24c36f644a3c442", "score": "0.59672934", "text": "function wat_add_image_sizes() {\n\n\t// add artists image sizes\n\t//add_image_size( 'CD', 400, 400, true );\n}", "title": "" }, { "docid": "d920e882b32cae13472c82527a15579d", "score": "0.5965426", "text": "public function setSize($size)\n {\n return $this->setAttribute('font-size', $size);\n }", "title": "" }, { "docid": "830425c2c0186d492005f86445d8c99b", "score": "0.5962701", "text": "public function setSize($size)\n\t{\n\t\t$this->size = $size;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bfad9fa457fc98fa700599c6db606b07", "score": "0.59571403", "text": "public function getSize() {\n return '_' . $this->_size;\n }", "title": "" }, { "docid": "37c87054186b348a33857255155b097b", "score": "0.5950713", "text": "function getSize();", "title": "" }, { "docid": "37c87054186b348a33857255155b097b", "score": "0.5950713", "text": "function getSize();", "title": "" }, { "docid": "dd9f7f6d555cf8c75a400a6b444b4f56", "score": "0.59208184", "text": "public function test_valid_size() {\n $this->CI->__set(\"size\", \"1235\");\n $this->assertEquals(\"1235\", $this->CI->getSize());\n }", "title": "" }, { "docid": "3b1e105dda12c08c9e039742115e9c3a", "score": "0.5919023", "text": "public function setSize($size)\n {\n $this->size = $size;\n return $this;\n }", "title": "" }, { "docid": "eb4fd5fd3a5d02e67a316cb21e81d8d6", "score": "0.5902658", "text": "public function getSize(){\n\t\treturn $this->size;\n\t}", "title": "" }, { "docid": "eb4fd5fd3a5d02e67a316cb21e81d8d6", "score": "0.5902658", "text": "public function getSize(){\n\t\treturn $this->size;\n\t}", "title": "" }, { "docid": "9105c0f2cead4a89bd8c9bef1b75906d", "score": "0.59012264", "text": "protected function _add_size_data( $size ) {\n\t\tstatic $_class = null;\n\n\t\tif ( is_null( $_class ) )\n\t\t\t$_class = apply_filters( 'image_tag/_image_tag__wp_attachment_image_size', '_image_tag__wp_attachment_image_size' );\n\n\t\t$this->_sizes_data[$size] = new $_class( $this, $size );\n\n\t\tif ( $this->_sizes_data[$size]->get( 'width' ) > $this->_sizes_data['__largest']->get( 'width' ) )\n\t\t\t$this->_sizes_data['__largest'] = $this->_sizes_data[$size];\n\n\t\tif ( $this->_sizes_data[$size]->get( 'width' ) < $this->_sizes_data['__smallest']->get( 'width' ) )\n\t\t\t$this->_sizes_data['__smallest'] = $this->_sizes_data[$size];\n\t}", "title": "" }, { "docid": "23bec370a1f6f3c0f5fb1c56ad2345c2", "score": "0.58882296", "text": "function deriveSize()\n\t{\n\t\t$layout_node = $this->getMAItemNode($this->hier_id, $this->purpose,\n\t\t\t$this->getPcId(), \"/Layout\");\n\t\tif (is_object($layout_node))\n\t\t{\n\t\t\tif ($layout_node->has_attribute(\"Width\"))\n\t\t\t{\n\t\t\t\t$layout_node->remove_attribute(\"Width\");\n\t\t\t}\n\t\t\tif ($layout_node->has_attribute(\"Height\"))\n\t\t\t{\n\t\t\t\t$layout_node->remove_attribute(\"Height\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1de577d48831d104a29261f91bc77b85", "score": "0.58803934", "text": "public function setDimensions($width, $height);", "title": "" }, { "docid": "552ba7fc4fc09428691b69bd247eccf8", "score": "0.58790076", "text": "function set_tag_cloud_sizes($args) {\n $args['smallest'] = 0.9;\n $args['largest'] = 0.9;\n $args['unit'] = em;\n return $args;\n}", "title": "" }, { "docid": "867327bff81dae86b576d2f4c0510986", "score": "0.58756256", "text": "function set_size($size) {\n /// Set the size safely to the PEAR Format\n $this->pear_excel_format->setSize($size);\n }", "title": "" }, { "docid": "b7fdf8f0d79f2d0a02bcc23231c5c457", "score": "0.58664775", "text": "function ossn_user_image_sizes(){\n\t\treturn array(\n\t\t\t\t'topbar' => '20x20',\n\t\t\t\t'small' => ' 50x50',\n\t\t\t\t'smaller' => '32x32',\n\t\t\t\t'large' => '100x100',\n\t\t\t\t'larger' => '170x170',\n\t\t);\n}", "title": "" }, { "docid": "30800c096165c0d1e0719737618e5c1e", "score": "0.58542573", "text": "function SizesModel()\n {\n\t\tparent::__construct(); \n }", "title": "" }, { "docid": "4e5de3d207503e455cfc207578aaf456", "score": "0.58047915", "text": "public function get_typography_size_controls( $args ) {\n\t\t$args = wp_parse_args(\n\t\t\t$args,\n\t\t\t[\n\t\t\t\t'label' => __( 'Size', 'material-design' ),\n\t\t\t\t'type' => 'number',\n\t\t\t\t'min' => 2,\n\t\t\t\t'default' => 12,\n\t\t\t\t'max' => 64,\n\t\t\t]\n\t\t);\n\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "1679d8157ff76b1b12a80c050230a28f", "score": "0.57867366", "text": "function set_width($val=\"\") \n\t{\n\t $this->width = $val;\n\t}", "title": "" }, { "docid": "cbe24d6f0d29a61b82ac84ba2bdfab96", "score": "0.5784746", "text": "private function _set_ad_unit_size( $meta )\n\t{\n\t\t$size = $this->size = $meta['size'];\n\t\t$dimensions = explode( 'x', $size );\n\n\t\t$this->width \t= $dimensions[0];\n\t\t$this->height \t= $dimensions[1];\n\t}", "title": "" }, { "docid": "339c38245132ac88b00837fb240e386e", "score": "0.57784647", "text": "public function setSize($width, $height = NULL)\n {\n $this->size = $width;\n if (isset($height))\n {\n $this->height = $height;\n }\n }", "title": "" }, { "docid": "d93be561c9d43a789717e94c647584c2", "score": "0.5775968", "text": "public function setBinaryItemSize($size);", "title": "" }, { "docid": "428b03d488a6adfef86eab3eecb0d62b", "score": "0.5775096", "text": "public function size($size = null);", "title": "" }, { "docid": "596c2def7679fbddbefcdda102abe653", "score": "0.5766137", "text": "private function __setSize($size) {\n\t\t// change a numeric size to the Flickr code if valid, other default to 's'\n\t\tif (is_numeric($size)) {\n\t\t\tif (array_key_exists($size, $this->_flickrSizes)) {\n\t\t\t\t$size = $this->_flickrSizes[$size];\n\t\t\t} else {\n\t\t\t\t$size = 's';\n\t\t\t}\n\t\t}\n\t\t// set the size to 's' if invalid value\n\t\tif (!in_array($size, $this->_flickrSizes)) {\n\t\t\t$size = 's';\n\t\t}\n\t\tif ($size == 'n') {\n\t\t\t$size = '';\n\t\t} else {\n\t\t\t$size = '_'.$size;\n\t\t}\n\t\treturn $size;\n\t}", "title": "" }, { "docid": "b57ae03faa06447707b13474b02fbddc", "score": "0.5750679", "text": "public function setMediaSize($val)\n {\n $this->_propDict[\"mediaSize\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "6c906a2cbf232bd6e4af275c101d8d54", "score": "0.57445496", "text": "public function get_key_size_options()\n {\n clearos_profile(__METHOD__, __LINE__);\n $sizes = array(\n 2048 => \"2048 (\" . lang('certificate_manager_recommended') . \")\",\n 4096 => \"4096\",\n );\n return $sizes;\n }", "title": "" }, { "docid": "634b322c21ed66dcfc402efc7fa036ce", "score": "0.5743266", "text": "function base_camp_custom_image_sizes($sizes)\n{\n return array_merge($sizes, [\n 'square' => __('Square', 'base-camp'),\n ]);\n}", "title": "" }, { "docid": "a6f03d00357962828228f1c2119c25f2", "score": "0.57408285", "text": "protected final function addSizes($sizes)\n {\n if(!empty($sizes) && is_array($sizes))\n {\n $this->sizes += $sizes;\n }\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d2df805b95253af2621b061a35850b5c", "score": "0.5740255", "text": "public function getSize()\n {\n return $this->size;\n }", "title": "" } ]
5035e69c8302f11b6b7366c6c6ca1e5d
Get all edges connecting the source vertex to the target vertex
[ { "docid": "5b667bfe1023db4dfca8bc9783962178", "score": "0.71718043", "text": "public function getAllEdges(VertexInterface $sourceVertex, VertexInterface $targetVertex): EdgeSet\n {\n $edges = new EdgeSet();\n \n if (\n $this->graph->containsVertex($sourceVertex)\n && $this->graph->containsVertex($targetVertex)\n ) {\n $edges = $this->getEdgeContainer($sourceVertex)->getEdges();\n \n foreach ($edges as $edge) {\n $equals = $this->isEqualStraightOrInverted($sourceVertex, $targetVertex, $edge);\n \n if ($equals) {\n $edges[] = $edge;\n }\n }\n }\n \n return $edges;\n }", "title": "" } ]
[ { "docid": "aa8ec7e733799dd6670f30878e29f858", "score": "0.64779687", "text": "public function outgoingEdgesOf(VertexInterface $vertex): EdgeSet\n {\n return $this->getEdgeContainer($vertex)->getEdges();\n }", "title": "" }, { "docid": "dd8164ad3c43d2a9a22dbacc975d2a1e", "score": "0.6418042", "text": "public function getEdgeList()\n {\n return array_merge($this->firstPath->getEdgeList(), [$this->edge], $this->secondPath->getEdgeList());\n }", "title": "" }, { "docid": "71713e4dfe241d959f86d426d8688c55", "score": "0.62533873", "text": "public function getEdges()\n {\n return collect([\n $this->firstPath->getEdges(),\n $this->edge,\n $this->secondPath->getEdges()\n ])->flatten();\n }", "title": "" }, { "docid": "82bd8306a8831ddb910fbae3d0588ffd", "score": "0.604715", "text": "public function incomingEdgesOf(VertexInterface $vertex): EdgeSet\n {\n return $this->getEdgeContainer($vertex)->getEdges();\n }", "title": "" }, { "docid": "ae951c4232d679d72cb9322b87c16256", "score": "0.60087174", "text": "public function getEdgeList(): array;", "title": "" }, { "docid": "c4fa7cb50421e03d8d6b40970e5819c9", "score": "0.57991326", "text": "public function getEdges(): array\n {\n $edges = [];\n $vertex_current = $this->start_vertex;\n $marked = new SplObjectStorage();\n $itterations = count($this->graph->getVertices()) - 1;\n\n for ($i = 0; $i < $itterations; $i++) {\n $marked->attach($vertex_current);\n $edge_queue = new SplPriorityQueue();\n\n /** @var \\PHGraph\\Edge $edge */\n foreach ($vertex_current->getEdgesOut() as $edge) {\n if (!$edge->isLoop()) {\n $edge_queue->insert($edge, -$edge->getAttribute('weight', 0));\n }\n }\n\n do {\n try {\n /** @var \\PHGraph\\Edge $cheapest_edge */\n $cheapest_edge = $edge_queue->extract();\n } catch (RuntimeException $exception) {\n throw new UnexpectedValueException('Graph has more than one component', 0, $exception);\n }\n } while ($marked->contains($cheapest_edge->getFrom()) && $marked->contains($cheapest_edge->getTo()));\n\n $edges[$cheapest_edge->getId()] = $cheapest_edge;\n\n if ($marked->contains($cheapest_edge->getFrom())) {\n $vertex_current = $cheapest_edge->getTo();\n } else {\n $vertex_current = $cheapest_edge->getFrom();\n }\n }\n\n // try to connect back to start vertex\n if (isset($vertex_current->getVertices()[$this->start_vertex->getId()])) {\n $edge_queue = new SplPriorityQueue();\n /** @var \\PHGraph\\Edge $edge */\n foreach ($vertex_current->getEdgesOut() as $edge) {\n if (!$edge->isLoop() && !isset($edges[$edge->getId()])) {\n $edge_queue->insert($edge, -$edge->getAttribute('weight', 0));\n }\n }\n\n do {\n /** @var \\PHGraph\\Edge $cheapest_edge */\n $cheapest_edge = $edge_queue->extract();\n } while (!isset($cheapest_edge->getVertices()[$this->start_vertex->getId()]));\n\n $edges[$cheapest_edge->getId()] = $cheapest_edge;\n }\n\n if (count($edges) !== count($this->graph->getVertices())) {\n throw new UnexpectedValueException('Graph is not connected');\n }\n\n return $edges;\n }", "title": "" }, { "docid": "ee24deedb1bb3f9c2c61b1d4ba2be0c3", "score": "0.5608994", "text": "public function edgesOf(VertexInterface $vertex): EdgeSet\n {\n return $this->getEdgeContainer($vertex)->getEdges();\n }", "title": "" }, { "docid": "e4471960f415a2e11a00c3113990123b", "score": "0.5570056", "text": "public function testTraversalExpandOnlyInboundOfAliceAndOutboundOfEve()\n {\n $this->createGraph();\n\n $startVertex = $this->vertexCollectionName . '/' . $this->vertex1Name;\n $edgeCollection = $this->edgeCollectionName;\n $options = [\n 'expander' => 'var connections = [ ];if (vertex.name === \"Alice\") {config.edgeCollection.inEdges(vertex).forEach(function (e) {connections.push({ vertex: require(\"internal\").db._document(e._from), edge: e});});}if (vertex.name === \"Eve\") {config.edgeCollection.outEdges(vertex).forEach(function (e) {connections.push({vertex: require(\"internal\").db._document(e._to), edge: e});});}return connections;'\n\n ];\n $traversal = new Traversal($this->connection, $startVertex, $edgeCollection, $options);\n\n $result = $traversal->getResult();\n\n // keeping test simple. Only assert result counts.\n static::assertCount(3, $result['result']['visited']['vertices']);\n static::assertCount(3, $result['result']['visited']['paths']);\n }", "title": "" }, { "docid": "2cf1aa00a0a8da1fd2f254a64c6275f6", "score": "0.5411017", "text": "public function edgesIn($id)\n {\n return isset($this->in[$id]) ? $this->in[$id] : [];\n }", "title": "" }, { "docid": "cbefd56e5b648a819f8177ee1ae8760c", "score": "0.5376427", "text": "public function getInEdges()\n {\n return $this->inEdges;\n }", "title": "" }, { "docid": "0340ecc9d5a3bbdceb1229be35e4378d", "score": "0.5260533", "text": "public function edgesOut($id)\n {\n return isset($this->out[$id]) ? $this->out[$id] : [];\n }", "title": "" }, { "docid": "6fd32d7857b66af93606472420f5d954", "score": "0.5145119", "text": "public function getOutEdges()\n {\n return $this->outEdges;\n }", "title": "" }, { "docid": "ffe681096cf790e007051626f75f331c", "score": "0.5031554", "text": "public function getNeoList();", "title": "" }, { "docid": "87b4a1c60aad76171aa83bfd360e8d70", "score": "0.5009713", "text": "public function getDirectedPredNodes(GraphNode $destNode)\n {\n $nodes = array();\n foreach ($destNode->getInEdges() as $edge) {\n $nodes[] = $edge->getSource();\n }\n\n return $nodes;\n }", "title": "" }, { "docid": "27b5efc1f3a36dc883ed95b5d8e98768", "score": "0.49990997", "text": "public function printEdges()\n\t{\n\t\t$print_str = \"\";\n\t\tforeach ($this->edges as $edge) {\n\t\t\t$print_str .= $edge->vertex_from->getAttribute('name').\" --> \".$edge->vertex_to->getAttribute('name').\"\\n\";\n\t\t}\n\n\t\treturn $print_str;\n\t}", "title": "" }, { "docid": "fcddd6f65fad4ba028a44c02c0740fc9", "score": "0.49864364", "text": "public function shortestPaths($source, $target, array $exclude = array())\r\n {\r\n // La distance la plus courte à tous les nœuds commence par l'infini ...\r\n $this->distance = array_fill_keys(array_keys($this->graph), INF);\r\n // ...sauf le nœud de départ\r\n $this->distance[$source] = 0;\r\n // Les nœuds précédemment visités\r\n $this->previous = array_fill_keys(array_keys($this->graph), array());\r\n // Les nœuds précédemment visités\r\n $this->queue = array($source => 0);\r\n while (!empty($this->queue)) {\r\n $this->processNextNodeInQueue($exclude);\r\n }\r\n if ($source === $target) {\r\n // Un chemin nul\r\n return array(array($source));\r\n } elseif (empty($this->previous[$target])) {\r\n // Aucun chemin entre $ source et $ target\r\n return array();\r\n } else {\r\n // Un ou plusieurs chemins ont été trouvés entre $ source et $ target\r\n return $this->extractPaths($target);\r\n }\r\n }", "title": "" }, { "docid": "f1f5282740e1ef25084da96b6dd5128b", "score": "0.49733442", "text": "public function getNodeSources();", "title": "" }, { "docid": "eac487c5c92c162e066b75191c923b7f", "score": "0.49342847", "text": "public function getGraph();", "title": "" }, { "docid": "6fae016b67f5813e8289510b32a5a6d7", "score": "0.49100104", "text": "public function getOutgoingEdges($node)\n {\n $outgoingEdge = $this->getOutgoingEdge($node);\n if($outgoingEdge !== null) {\n return collect([$outgoingEdge]);\n } else {\n return collect([]);\n }\n }", "title": "" }, { "docid": "7c6e36ff64437265d0e49e541475116b", "score": "0.49098158", "text": "public function getEndVertex(): VertexInterface;", "title": "" }, { "docid": "c491efc17bfabed855044cb45cbed514", "score": "0.4858737", "text": "public function getIncomingEdges($node)\n {\n $incomingEdge = $this->getIncomingEdge($node);\n if($incomingEdge !== null) {\n return collect([$incomingEdge]);\n } else {\n return collect([]);\n }\n }", "title": "" }, { "docid": "084d4b9be2a551d541cb958703005369", "score": "0.48203343", "text": "public function shortestPaths($source, $target, array $exclude = array())\n {\n $this->distance = array_fill_keys(array_keys($this->graph), INF);\n $this->distance[$source] = 0;\n $this->previous = array_fill_keys(array_keys($this->graph), array());\n $this->queue = array($source => 0);\n while (!empty($this->queue)) {\n $this->processNextNodeInQueue($exclude);\n }\n\n if ($source === $target) {\n return array(array($source));\n } elseif (empty($this->previous[$target])) {\n return array();\n } else {\n return $this->extractPaths($target);\n }\n }", "title": "" }, { "docid": "ec61ba32a50f1cfe236c0bbfc0a41dbf", "score": "0.47754386", "text": "public function getTargetEntities() {\n return $this->targetEntities;\n }", "title": "" }, { "docid": "ba9cacd20ff6dabbc8dc4495e5faf0a6", "score": "0.47744858", "text": "private function getLegsFromConnections($origin, $destination) {\n $legs = [];\n $callingPoints = [];\n $previousConnection = null;\n \n while (isset($this->connections[$destination])) {\n if ($previousConnection && $previousConnection->requiresInterchangeWith($this->connections[$destination])) {\n $legs[] = new Leg(array_reverse($callingPoints));\n $callingPoints = [];\n }\n \n $callingPoints[] = $this->connections[$destination];\n $previousConnection = $this->connections[$destination];\n $destination = $this->connections[$destination]->getOrigin();\n }\n\n // if we found a route back to the origin\n if ($origin === $destination) {\n $legs[] = new Leg(array_reverse($callingPoints));\n return array_reverse($legs);\n }\n else {\n return null;\n }\n }", "title": "" }, { "docid": "32f3b611c9ae382b9428c6df181fb369", "score": "0.47354257", "text": "function getOfOutgoingRelations($outgoingRelations) {\n $rel = $this->getRelation('_outgoingRelations');\n $res = $rel->getSrc($outgoingRelations); \n return $res;\n }", "title": "" }, { "docid": "a957cbd640220f5738fa4fdc929e1154", "score": "0.4704622", "text": "public function getDestinationAddresses()\n {\n return $this->destination_addresses;\n }", "title": "" }, { "docid": "22d691e9b8bf24c28edfce56644c4131", "score": "0.47026104", "text": "public function testTraversalIncludeEdgesOnlyOnceGloballyButNodesEveryTimeVisited()\n {\n $this->createGraph();\n\n $startVertex = $this->vertexCollectionName . '/' . $this->vertex1Name;\n $edgeCollection = $this->edgeCollectionName;\n $options = [\n 'direction' => 'any',\n 'uniqueness' => ['vertices' => 'none', 'edges' => 'global']\n\n ];\n $traversal = new Traversal($this->connection, $startVertex, $edgeCollection, $options);\n\n $result = $traversal->getResult();\n\n // keeping test simple.\n static::assertCount(6, $result['result']['visited']['vertices']);\n static::assertCount(6, $result['result']['visited']['paths']);\n\n $vertices = [];\n foreach ($result['result']['visited']['vertices'] as $vertex) {\n @$vertices[$vertex['name']]++;\n }\n\n static::assertEquals(2, $vertices['Alice']);\n static::assertEquals(1, $vertices['Bob']);\n static::assertEquals(1, $vertices['Charlie']);\n static::assertEquals(1, $vertices['Dave']);\n static::assertEquals(1, $vertices['Eve']);\n }", "title": "" }, { "docid": "fe956f1a95f271aa96031598b5f24186", "score": "0.46968773", "text": "public function getAllSources() {\n $definition = \\Drupal::entityTypeManager()->getDefinition($this->entityTypeId);\n $q = \\Drupal::database()\n ->select($definition->getRevisionDataTable(), 'rt')\n ->fields('rt', ['source__target_id']);\n $q->condition('id', $this->id());\n\n return array_filter($q->execute()->fetchCol());\n }", "title": "" }, { "docid": "d60c99e16b8cb3accf8ab4fcac9f878f", "score": "0.46821648", "text": "public function getVertexList(): array;", "title": "" }, { "docid": "70254615e91f34a3bb94878ea436fe4d", "score": "0.4673483", "text": "public function getDifferringRevisionIdsOnSource();", "title": "" }, { "docid": "f4493a1559d93fbd54a65c6476d09500", "score": "0.46670002", "text": "public function getNodes()\n {\n return $this->firstPath->getNodes()->merge($this->secondPath->getNodes());\n }", "title": "" }, { "docid": "51ec22d333a906a572f944c4700922ad", "score": "0.46669516", "text": "function shortestPathsFrom($source, $nodes, $nodeLookup, $edges)\n\t{\n\t\t$estimates = array();\n\t\t$processed = array();\n\t\t\n\t\tfor ($i = 0; $i < count($nodes); $i++)\n\t\t{\n\t\t\t$estimates[$i] = new Path($nodes[$i]);\n\t\t}\n\t\t\n\t\t$estimates[$nodeLookup[Node::TYPE_DIGIMON][$source->id]]->cost->setRelaxed(true);\n\t\t\n\t\t$nodeCount = count($estimates);\n\t\twhile (count($processed) < $nodeCount)\n\t\t{\n\t\t\t// target the closest node that hasn't already been processed\n\t\t\tusort($estimates, \"Path::cmp\");\n\t\t\t$currNode = null;\n\t\t\tforeach ($estimates as $path)\n\t\t\t{\n\t\t\t\tif (!in_array($nodeLookup[$path->node->type][$path->node->id], $processed))\n\t\t\t\t{\n\t\t\t\t\t// if we run into an edge that hasn't been relaxed, the remaining nodes are unreachable\n\t\t\t\t\tif (!$path->cost->getRelaxed()) return $estimates;\n\t\t\t\t\t\n\t\t\t\t\t$currNode = $path->node;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// examine all nodes adjacent to the target\n\t\t\tforeach ($edges as $edge)\n\t\t\t{\n\t\t\t\tif ($edge->srcNode == $currNode)\n\t\t\t\t{\n\t\t\t\t\t$srcIdx = Path::indexOf($edge->srcNode, $estimates);\n\t\t\t\t\t$destIdx = Path::indexOf($edge->destNode, $estimates);\n\t\t\t\t\t\n\t\t\t\t\t// if there's no path to this node yet, or if the path we've taken now is shorter, update the estimate\n\t\t\t\t\t// (path to adj node = path to target node + the edge that joins them)\n\t\t\t\t\tif ($estimates[$destIdx]->cost->total() > ($estimates[$srcIdx]->cost->total() + $edge->cost->total()))\n\t\t\t\t\t{\n\t\t\t\t\t\t$estimates[$destIdx]->edges = array();\n\t\t\t\t\t\tforeach ($estimates[$srcIdx]->edges as $e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarray_push($estimates[$destIdx]->edges, $e);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_push($estimates[$destIdx]->edges, $edge);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// the cost addition function propagates relaxation from the source\n\t\t\t\t\t\t$estimates[$destIdx]->cost = $estimates[$srcIdx]->cost->add($edge->cost);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tarray_push($processed, $nodeLookup[$currNode->type][$currNode->id]);\n\t\t}\n\t\t\n\t\treturn $estimates;\n\t}", "title": "" }, { "docid": "c13e02c5df2c7ca7afd3d86c433264f8", "score": "0.46298635", "text": "public function testTraversalUsingDirectionOutbound()\n {\n $this->createGraph();\n$a=1;\n $startVertex = $this->vertexCollectionName . '/' . $this->vertex1Name;\n $edgeCollection = $this->edgeCollectionName;\n $options = ['direction' => 'outbound'];\n $traversal = new Traversal($this->connection, $startVertex, $edgeCollection, $options);\n\n static::assertTrue(isset($traversal->startVertex), 'Should return true, as the attribute was set, before.');\n\n $result = $traversal->getResult();\n\n // keeping test simple. Only assert result counts.\n static::assertCount(4, $result['result']['visited']['vertices']);\n static::assertCount(4, $result['result']['visited']['paths']);\n }", "title": "" }, { "docid": "628e62e4f9ee99d5241d420689d85605", "score": "0.45941207", "text": "protected function findPathInGraph(array $graph, $from, $to)\n {\n foreach (array_filter($graph[$from]) as $node => $_) {\n if ($node === $to) {\n return [$from, $to];\n }\n $subPath = $this->findPathInGraph($graph, $node, $to);\n if (!empty($subPath)) {\n array_unshift($subPath, $from);\n return $subPath;\n }\n }\n return [];\n }", "title": "" }, { "docid": "4f635ca2018a59664727bdd42fc20624", "score": "0.4586389", "text": "public function getEdge(VertexInterface $sourceVertex, VertexInterface $targetVertex): ?EdgeInterface\n {\n if (\n $this->graph->containsVertex($sourceVertex)\n && $this->graph->containsVertex($targetVertex)\n ) {\n $edges = $this->getEdgeContainer($sourceVertex)->getEdges();\n \n foreach ($edges as $edge) {\n $equals = $this->isEqualStraightOrInverted($sourceVertex, $targetVertex, $edge);\n \n if ($equals) {\n return $edge;\n }\n }\n }\n \n return null;\n }", "title": "" }, { "docid": "6fe5fe57ef438ed45738f7419c0a6439", "score": "0.458221", "text": "public function sources()\n {\n \t// return $this->hasMany(Source::class);\n }", "title": "" }, { "docid": "ca2206fe9279519fdb56733c057dd064", "score": "0.45564535", "text": "public function testTraversalUsingDirectionInbound()\n {\n $this->createGraph();\n\n $startVertex = $this->vertexCollectionName . '/' . $this->vertex1Name;\n $edgeCollection = $this->edgeCollectionName;\n $options = ['direction' => 'inbound'];\n $traversal = new Traversal($this->connection, $startVertex, $edgeCollection, $options);\n\n $result = $traversal->getResult();\n\n // keeping test simple. Only assert result counts.\n static::assertCount(2, $result['result']['visited']['vertices']);\n static::assertCount(2, $result['result']['visited']['paths']);\n }", "title": "" }, { "docid": "973f8aa314eed27c86050e41c1206724", "score": "0.45498672", "text": "public function getExposedRelations();", "title": "" }, { "docid": "1e7dc64d47b10a71984a911488e0a2e6", "score": "0.45448783", "text": "public function getRoutes() {\n $path = $this->getEdges();\n $routes = array_map( function ( Edge $edge ) {\n return $edge->getAttr( 'flight_id' );\n }, $path );\n\n return $routes;\n }", "title": "" }, { "docid": "1ba79a2426ddd2e557306acb6c1bc7a9", "score": "0.4523124", "text": "public function pathways()\n {\n return $this->belongsToMany('App\\Models\\Pathway', 'pathway_edges', 'edge_id', 'pathway_id');\n }", "title": "" }, { "docid": "7006f457732a3c8f26865f41df85fb7e", "score": "0.45133188", "text": "public function getTargets();", "title": "" }, { "docid": "7006f457732a3c8f26865f41df85fb7e", "score": "0.45133188", "text": "public function getTargets();", "title": "" }, { "docid": "a300f0db66b05e59ca31abb6901e4b01", "score": "0.45104474", "text": "public function getVertexSet(): VertexSet\n {\n return $this->vertexMap->keySet();\n }", "title": "" }, { "docid": "9508db0f306d80fa7f8afa2a8939e758", "score": "0.450855", "text": "function getEdges($n, $x, $y)\n {\n \n $x[$n+0] = -SUPER_TRIANGLE;\n $y[$n+0] = SUPER_TRIANGLE;\n $x[$n+1] = 0;\n $y[$n+1] = -SUPER_TRIANGLE;\n $x[$n+2] = SUPER_TRIANGLE;\n $y[$n+2] = SUPER_TRIANGLE;\n \n // indices \n $v = array(); \n $v[] = array($n,$n+1,$n+2);\n \n //sort buffer\n $complete = array();\n $complete[] = false;\n \n /*\n Include each point one at a time into the existing mesh\n */\n foreach ($x as $key => $arr)\n { \n /*\n Set up the edge buffer.\n If the point (xp,yp) lies inside the circumcircle then the\n three edges of that triangle are added to the edge buffer\n and that triangle is removed.\n */\n\n $edges=array();\n foreach ($v as $vkey => $varr)\n { \n //if ($complete[$vkey]) continue;\n list($vi,$vj,$vk)=array($v[$vkey][0],$v[$vkey][1],$v[$vkey][2]);\n $c=$this->CircumCircle($x[$vi],$y[$vi],$x[$vj],$y[$vj],$x[$vk],$y[$vk]);\n \n $d1=abs(pow(($c->x-$x[$vi]),2)+pow(($c->y-$y[$vi]),2)-$c->r2-pow($this->weights[$vi],2)); \n $r1=sqrt($d1);\n $p1=pow(($c->x-$x[$key]),2)+pow(($c->y-$y[$key]),2)-$c->r2-pow($this->weights[$key],2)-$r1;\n \n $d2=abs(pow(($c->x-$x[$vj]),2)+pow(($c->y-$y[$vj]),2)-$c->r2-pow($this->weights[$vj],2)); \n $r2=sqrt($d2);\n $p2=pow(($c->x-$x[$key]),2)+pow(($c->y-$y[$key]),2)-$c->r2-pow($this->weights[$key],2)-$r2;\n \n $d3=abs(pow(($c->x-$x[$vk]),2)+pow(($c->y-$y[$vk]),2)-$c->r2-pow($this->weights[$vk],2));\n $r3=sqrt($d3);\n $p3=pow(($c->x-$x[$key]),2)+pow(($c->y-$y[$key]),2)-$c->r2-pow($this->weights[$key],2)-$r3;\n \n //if ($c->r > EPSILON && $inside)\n if ($p1<0 && $p2<0 && $p3<0)\n { \n /* $x[$vi]+=$this->weights[$vi];\n $y[$vi]+=$this->weights[$vi];\n\n $x[$vj]+=$this->weights[$vj];\n $y[$vj]+=$this->weights[$vj];\n\n $x[$vk]+=$this->weights[$vk];\n $y[$vk]+=$this->weights[$vk];\n */\n// $x[$key]+=$this;\n// $y[$key]+=$this->weights[$key];\n\n// $this->weights[$key]-=$this->weights[$key];\n\n $edges[]=array($vi,$vj);\n $edges[]=array($vj,$vk);\n $edges[]=array($vk,$vi); \n unset($v[$vkey]);\n //unset($complete[$vkey]); \n }\n }\n \n /*\n Tag multiple edges\n Note: if all triangles are specified anticlockwise then all\n interior edges are opposite pointing in direction.\n */\n $edges=array_values($edges);\n foreach ($edges as $ekey => $earr)\n { \n foreach ($edges as $ikey => $iarr)\n {\n if ($ekey != $ikey)\n {\n if (($earr[0] == $iarr[1]) && ($earr[1] == $iarr[0]))\n {\n unset($edges[$ekey]);\n unset($edges[$ikey]);\n \n } \n elseif (($earr[0] == $iarr[0]) && ($earr[1] == $iarr[1]))\n {\n unset($edges[$ekey]);\n unset($edges[$ikey]);\n }\n }\n }\n }\n \n $sort=array();\n foreach ($edges as $ekey=>$earr) \n {\n list($vi,$vj)=array($edges[$ekey][0],$edges[$ekey][1]);\n $angle=$this->dotproduct($x[$vi],$y[$vi],$x[$vj],$y[$vj],$pObj->stageWidth/2,$pObj->stageHeight/2);\n $sort[]=$angle;\n }\n array_multisort($sort, SORT_ASC, SORT_NUMERIC, $edges); \n \n /*\n Form new triangles for the current point\n Skipping over any tagged edges.\n All edges are arranged in clockwise order.\n */\n $complete=array_values($complete);\n $v=array_values($v);\n $ntri=count($v);\n $edges=array_values($edges);\n foreach ($edges as $ekey => $earr)\n { \n if ($edges[$ekey][0]!=$key && $edges[$ekey][1]!=$key) \n {\n $v[] = array($edges[$ekey][0],$edges[$ekey][1],$key);\n $complete[$ntri++]=0;\n }\n }\n $sort=array();\n foreach ($v as $vkey=>$varr) \n {\n list($vi,$vj,$vk)=array($v[$vkey][0],$v[$vkey][1],$v[$vkey][2]);\n $sort[]=$this->dotproduct($x[$vi],$y[$vi],$x[$vj],$y[$vj],$x[$vk],$y[$vk],$pObj->stageWidth/2,$pObj->stageHeight/2);\n }\n array_multisort($sort, SORT_ASC, SORT_NUMERIC, $v); \n }\n \n $sort=array(); \n foreach ($v as $key => $arr)\n {\n $this->indices[$key]=$arr;\n $this->indices[$key][]=$arr[0];\n \n $this->delaunay[$key]=array(array($x[$arr[0]],$y[$arr[0]],$x[$arr[1]],$y[$arr[1]]),\n array($x[$arr[1]],$y[$arr[1]],$x[$arr[2]],$y[$arr[2]]),\n array($x[$arr[2]],$y[$arr[2]],$x[$arr[0]],$y[$arr[0]]) \n ); \n \n $dx=$x[$arr[1]]-$x[$arr[0]]; \n $dy=$y[$arr[1]]-$y[$arr[0]]; \n $this->dist[$key][]=$dx*$dx+$dy*$dy; \n $dx=$x[$arr[2]]-$x[$arr[1]]; \n $dy=$y[$arr[2]]-$y[$arr[1]]; \n $this->dist[$key][]=$dx*$dx+$dy*$dy; \n $dx=$x[$arr[0]]-$x[$arr[2]]; \n $dy=$y[$arr[0]]-$y[$arr[2]]; \n $this->dist[$key][]=$dx*$dx+$dy*$dy; \n }\n return $v;\n }", "title": "" }, { "docid": "72fb23fee87fa0a41e720c4cf9167c6c", "score": "0.45071813", "text": "public function getParentAdextEdge()\n {\n return $this->parentEdgeEndpoint;\n }", "title": "" }, { "docid": "ab9cfefda0f79b303fa78da7077f1721", "score": "0.4497761", "text": "private function addEdges(StateMachineInterface $stateMachine)\n {\n $states = $stateMachine->getStates();\n foreach ($states as $sName) {\n $state = $stateMachine->getState($sName);\n $transitions = $state->getTransitions();\n foreach ($transitions as $tName) {\n $trans = $stateMachine->getTransition($tName);\n $attributes = $this->getEdgeDefaultAttributes($trans);\n if ($this->visitors) {\n try {\n foreach ($this->visitors as $visitor) {\n $attributes = $visitor->getEdgeAttributes($attributes, $trans, $state, $stateMachine);\n }\n }\n catch (SkipElementException $ex) {\n continue;\n }\n }\n $this\n ->graph\n ->beginEdge([$state->getName(), $trans->getState()], $attributes)\n ->end();\n }\n }\n }", "title": "" }, { "docid": "4b8b0ce13c377a40d798e836623b8ff7", "score": "0.4486381", "text": "public function linked()\n {\n return $this->morphMany(Link::class, 'to');\n }", "title": "" }, { "docid": "a13b0e617b18ae8664d70ff4b4f2f22a", "score": "0.4481557", "text": "function get_connection($rail0,$rail1)\n\t{\n\t\t$connection = array();\n\t\tforeach ($rail0[\"to\"] as $key => $value) {\n\t\t\t$matches = preg_grep ('/^'.$value.' (\\w+)/i', $rail1[\"from\"]);\n\t\t\tif($matches){\n\t\t\t\t$connection[] = array(\n\t\t\t\t\t\"from\" => $rail0[\"from\"][$key],\n\t\t\t\t\t\"via1\" => \"0\",\n\t\t\t\t\t\"stop\" => $matches[0],\n\t\t\t\t\t\"via2\" => \"1\",\n\t\t\t\t\t\"to\" => $rail1[\"to\"][array_search($matches[0],$rail1[\"from\"],true)],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $connection;\n\t}", "title": "" }, { "docid": "e993398db3651ee3959328b1741e3e82", "score": "0.4473831", "text": "public function getNetworkLinks();", "title": "" }, { "docid": "e54d41538db5eeb58a638419bd6401ca", "score": "0.44426146", "text": "public function index(Graph $graph)\n {\n $edges = $graph->edges()->get();\n return new EdgeCollection($edges);\n }", "title": "" }, { "docid": "54ab94bbc59eb616694adad95015c6fd", "score": "0.44124362", "text": "public function getEdgeAt($index)\n {\n if($index < $this->firstPath->count() - 1) {\n return $this->firstPath->getEdgeAt($index);\n } elseif($index === $this->firstPath->count() - 1) {\n return $this->edge;\n } else {\n return $this->secondPath->getEdgeAt($index - $this->firstPath->count());\n }\n }", "title": "" }, { "docid": "066814203c6e60361be609a918302ee6", "score": "0.4408584", "text": "public function extractPaths($target)\n {\n $paths = array(array($target));\n\n for ($key = 0; isset($paths[$key]); ++$key) {\n $path = $paths[$key];\n\n if (!empty($this->previous[$path[0]])) {\n foreach ($this->previous[$path[0]] as $previous) {\n $copy = $path;\n array_unshift($copy, $previous);\n $paths[] = $copy;\n }\n unset($paths[$key]);\n }\n }\n\n return array_values($paths);\n }", "title": "" }, { "docid": "8e771c2606796b98bceec70dec21f4e3", "score": "0.44071946", "text": "public function getDifferringRevisionIdsOnTarget();", "title": "" }, { "docid": "421eff3434bb4db35dbf83a9bebe2875", "score": "0.44032705", "text": "public function getDirections()\n {\n return $this->hasMany(Direction::className(), ['dep_id' => 'id']);\n }", "title": "" }, { "docid": "3b73fb0f3f2d38af5495a5cd6eaddc1d", "score": "0.4390561", "text": "public function getPromotionRelationSource(): array {\n if($this->getEvent()) {\n $event_id = $this->getEvent()->id;\n return [$this->id, $event_id];\n }\n return [];\n // end\n }", "title": "" }, { "docid": "8e73b2f95f889e6b86b8e3901555a0c1", "score": "0.43901002", "text": "function takeEdgeFrom($node){\n\t\tif ($this->node1->getId() == $node->getId()){\n\t\t\treturn $this->node2;\n\t\t}\n\t\tif ($this->node2->getId() == $node->getId()){\n\t\t\treturn $this->node1;\n\t\t}\n\t\tdie (\"Fatal error - improper use of function\");\n\t}", "title": "" }, { "docid": "0a8544f894af06c157f7c479d25116de", "score": "0.43573445", "text": "public function toArray(){\n $ret = array();\n foreach($this->sources as $source){\n $ret[] = $source->toArray();\n }\n return $ret;\n }", "title": "" }, { "docid": "119c689276773c86906fd9d23129cf59", "score": "0.43533173", "text": "function get_adjacent_paths($map_id)\n {\n $this->db->where('origin_id', $map_id);\n $this->db->join('map', 'map.map_id=territories.map_id');\n $this->db->join('paths','territories.map_id=paths.destination_id');\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "c939edae5b3b3b246243b40a041837c9", "score": "0.43441123", "text": "function db_incoming_links ($object_id, $relationship_id = 0, $class_id = 0, $limit=0)\n{\n\tglobal $db;\n\n\t$neighbours = array();\n\t\n\t$sql = 'SELECT object.object_id, object.name, object.description, object.class_id, object_link.relationship_id, object_link.created, object_link.id, relationships.name as relationship_name\n\t\tFROM object_link\n\t\tINNER JOIN object ON object.object_id = object_link.source_object_id\n\t\tINNER JOIN relationships ON object_link.relationship_id = relationships.id\n\t\tWHERE object_link.target_object_id='. $db->Quote($object_id);\n\t\t\n\t\t//echo $class_id, '<br/>', $relationship_id, '<br/>';\n\t\t\t\t\n\t\t// Do we want specific classes of objects?\n\t\tif (0 != $class_id)\n\t\t{\n\t\t\t$sql .= ' AND (object.class_id=' . $class_id . ')';\n\t\t}\n\t\t// Do we want specific kinds of relationships?\n\t\tif (0 != $relationship_id)\n\t\t{\n\t\t\t$sql .= ' AND (object_link.relationship_id=' . $relationship_id . ')';\n\t\t}\n\t\t$sql .= 'AND (object_link.created <= NOW())\n\t\tAND (object_link.modified > NOW())';\n\t\t\n\t\t$sql .= ' ORDER BY object.class_id, object_link.serial_number';\n\t\t\n\t\t// Do we want limit the search results?\n\t\tif (0 != $limit)\n\t\t{\n\t\t\t$sql .= ' LIMIT ' . $limit;\n\t\t}\n\t\t\n\t//echo $sql;\n\n\t$result = $db->Execute($sql);\n\tif ($result == false) die(\"failed [\" . __LINE__ . \"]: \" . $sql);\n\n\twhile (!$result->EOF) \n\t{\n\t\t$link = array(\n\t\t\t'id' => $result->fields['id'],\n\t\t\t'object_id' => $result->fields['object_id'],\n\t\t\t'name' => $result->fields['name'],\n\t\t\t'description' => $result->fields['description'],\n\t\t\t'type' => $result->fields['relationship_name'],\n\t\t\t'class_id' => $result->fields['class_id'],\n\t\t\t'created' => $result->fields['created'],\t\t\t\n\t\t\t);\n\t\tarray_push($neighbours, $link);\n\t\t$result->MoveNext();\t\n\t}\n\t\n\treturn $neighbours;\n}", "title": "" }, { "docid": "ef6ad47df7c6f8a824fe91f31c49fe6a", "score": "0.43422583", "text": "protected function inverseSet($source, $target)\n\t{\t}", "title": "" }, { "docid": "e6809905e2e8e1f2648c3ebe838741f3", "score": "0.43370375", "text": "public function getSourceDestination();", "title": "" }, { "docid": "78692a15a1e46abc8c392d7253cc856e", "score": "0.43369403", "text": "public function getLinks(): iterable;", "title": "" }, { "docid": "97f8aa3cfa4feab9944eac73b9d47ae2", "score": "0.4336218", "text": "public function getRelatesTo(): ?array\n {\n return $this->relatesTo;\n }", "title": "" }, { "docid": "3a2afa3dd45d194fe8aec8f70c350ac1", "score": "0.43320385", "text": "public function getASTNodeAncestors() : SplObjectStorage;", "title": "" }, { "docid": "d6c92c14037f667c8129517858918e69", "score": "0.4329224", "text": "public function testTraversalUsingDirectionOutboundAndFilter2()\n {\n $this->createGraph();\n\n $startVertex = $this->vertexCollectionName . '/' . $this->vertex1Name;\n $edgeCollection = $this->edgeCollectionName;\n $options = [\n 'direction' => 'outbound',\n 'filter' => 'if (vertex.name === \"Bob\") {return \"prune\";}return;'\n ];\n $traversal = new Traversal($this->connection, $startVertex, $edgeCollection, $options);\n\n $result = $traversal->getResult();\n\n // keeping test simple. Only assert result counts.\n static::assertCount(2, $result['result']['visited']['vertices']);\n static::assertCount(2, $result['result']['visited']['paths']);\n }", "title": "" }, { "docid": "650b53066524ff901deba7dbbbf0d316", "score": "0.4319742", "text": "public function getReversed()\n {\n $newGraph = new Digraph();\n foreach ($this->graph->getVertexSet() as $vx) {\n // for isolated vertex :\n $newGraph->addVertex($vx);\n // we reverse each edge :\n foreach ($this->graph->getSuccessor($vx) as $vy) {\n $newGraph->addEdge($vy, $vx);\n }\n }\n\n return $newGraph;\n }", "title": "" }, { "docid": "6ab05ed836999b800ec54de77d7d2b6a", "score": "0.43188527", "text": "public function testTraversalUsingDirectionOutboundAndFilter1()\n {\n $this->createGraph();\n\n $startVertex = $this->vertexCollectionName . '/' . $this->vertex1Name;\n $edgeCollection = $this->edgeCollectionName;\n $options = [\n 'direction' => 'outbound',\n 'filter' => 'if (vertex.name === \"Bob\" || vertex.name === \"Charlie\") {return \"exclude\";}return;'\n ];\n $traversal = new Traversal($this->connection, $startVertex, $edgeCollection, $options);\n\n $result = $traversal->getResult();\n\n // keeping test simple. Only assert result counts.\n static::assertCount(2, $result['result']['visited']['vertices']);\n static::assertCount(2, $result['result']['visited']['paths']);\n }", "title": "" }, { "docid": "de3bba0d97e718f3ba42729d8cae2a8a", "score": "0.43185428", "text": "public function all()\n {\n if (is_array($this->source)) {\n return $this->source;\n }\n\n return iterator_to_array($this->getIterator());\n }", "title": "" }, { "docid": "1e2c6a2a3f2e1246b07c8a362e0bccaa", "score": "0.4315847", "text": "public function visitors()\n {\n return $this->belongsToMany('App\\Visitor', 'entries', 'branch_office_id', 'visitor_id')->distinct();\n }", "title": "" }, { "docid": "ce4d7379f77b3e868519b0dc715433d5", "score": "0.4307684", "text": "public function getUnvisitedNeighbours()\n\t{\n\t}", "title": "" }, { "docid": "3bea3c0ae22730932f0ac347b93fb1df", "score": "0.4304424", "text": "public function getAddresses()\n {\n return $this->hasMany(Addresses::className(), ['client_id' => 'id']);\n }", "title": "" }, { "docid": "fe9b4a0318b2723023ad5b49052857ba", "score": "0.4302442", "text": "public function getRelationshipList ();", "title": "" }, { "docid": "54410a031007d9e25704cfb449cf0a1d", "score": "0.42982468", "text": "public function getRelations()\n {\n return $this->getDescriptor()->getRelations();\n }", "title": "" }, { "docid": "20c1fb7ebf25b8c9b9079873e760195b", "score": "0.42801952", "text": "public function getIncomingEdge($node)\n {\n if($this->nodeEquals($node, $this->secondPath->getFirstNode())) {\n return $this->edge;\n }\n\n try {\n return $this->firstPath->getIncomingEdge($node);\n } catch (NodeNotFoundException $exception) {\n return $this->secondPath->getIncomingEdge($node);\n }\n }", "title": "" }, { "docid": "35f2ac3cdac396dc12927404e3642c05", "score": "0.42772397", "text": "private function getPaths($from, $to) {\n return $this->enforceRules($this->getSimplePaths($from, $to));\n }", "title": "" }, { "docid": "4aedc4b8f79c550564618ba0c23fa2fc", "score": "0.42502055", "text": "public function testTraversalUsingDirectionOutboundAndMaxDepthIs1()\n {\n $this->createGraph();\n\n $startVertex = $this->vertexCollectionName . '/' . $this->vertex1Name;\n $edgeCollection = $this->edgeCollectionName;\n $options = [\n 'direction' => 'outbound',\n 'maxDepth' => 1\n ];\n $traversal = new Traversal($this->connection, $startVertex, $edgeCollection, $options);\n\n $result = $traversal->getResult();\n\n // keeping test simple. Only assert result counts.\n static::assertCount(2, $result['result']['visited']['vertices']);\n static::assertCount(2, $result['result']['visited']['paths']);\n }", "title": "" }, { "docid": "d0c6b4564df7c44b3710d6138204e0cf", "score": "0.42460173", "text": "public function fromPoints()\n {\n return $this->hasMany('App\\Point','from_id');\n }", "title": "" }, { "docid": "7687747e3429b06a551e47bade83e8b8", "score": "0.42436832", "text": "public function testTraversalUsingDirectionOutboundAndMinDepthIs2()\n {\n $this->createGraph();\n\n $startVertex = $this->vertexCollectionName . '/' . $this->vertex1Name;\n $edgeCollection = $this->edgeCollectionName;\n $options = [\n 'direction' => 'outbound',\n 'minDepth' => 2\n ];\n $traversal = new Traversal($this->connection, $startVertex, $edgeCollection, $options);\n\n $result = $traversal->getResult();\n\n // keeping test simple. Only assert result counts.\n static::assertCount(2, $result['result']['visited']['vertices']);\n static::assertCount(2, $result['result']['visited']['paths']);\n }", "title": "" }, { "docid": "05784f9ad057c4f7ef4777a942750016", "score": "0.42323446", "text": "public function getAncestors();", "title": "" }, { "docid": "d1e7f235a0ffbb74cbb9dbfe0eb531ea", "score": "0.42208385", "text": "public function getIndexRelations();", "title": "" }, { "docid": "2e348a2c9e8bfcd15295c222ae882867", "score": "0.42163607", "text": "public function getRelatives()\n {\n return $this->hasMany(Member::class, ['id' => 'relative_id'])->viaTable('relations', ['member_id' => 'id']);\n }", "title": "" }, { "docid": "293a691fc757f82b88e7e39f63025bde", "score": "0.4207015", "text": "abstract public function getJoins();", "title": "" }, { "docid": "92edd51e0176a6367055150ed4639cda", "score": "0.42069027", "text": "public function getNodeList()\n {\n return array_merge($this->firstPath->getNodeList(), $this->secondPath->getNodeList());\n }", "title": "" }, { "docid": "f681ccc97e0f146869916e8229a6ee0b", "score": "0.4201366", "text": "public function nodes()\n {\n //$this->hasManyThrough(BaseModelColumns::class,BaseModel::class,'id','report_model_id')->select('base_model_columns.id as column_id','base_model_columns.name as column_name','has_selection');\n\n //NOTE: ho dovutop chiamarlo nodeId altrimenti mi restituisce l'id della way e non del nodo\n\n return $this->belongsToMany('App\\Models\\Map\\Node', 'waynodes', 'id', 'nodeid')\n ->withPivot('s');\n\n /*return $this->hasManyThrough(\n 'App\\Models\\Map\\Node',\n 'App\\Models\\Map\\WayNode',\n 'id', // Foreign key on users table...\n 'id', // Foreign key on posts table...\n 'id', // Local key on countries table...\n 'nodeid' // Local key on users table...\n )->select('nodes.*','nodes.id as nodeId');\n*/\n /*\n return $this->hasManyThrough(\n 'App\\Models\\Map\\Node',\n 'App\\Models\\Map\\WayNode',\n 'id', // Foreign key on users table...\n 'id', // Foreign key on posts table...\n 'id', // Local key on countries table...\n 'nodeid' // Local key on users table...\n );*/\n //->select('nodes.id as nodeId');\n //->select('nodes.*','waynodes.id as wayid');\n\n //->select('base_model_columns.id as column_id','base_model_columns.name as column_name','has_selection');\n\n }", "title": "" }, { "docid": "d82d43d39a9348f32fcee11088ca9717", "score": "0.41931918", "text": "public function getRelationships(string $collection): array;", "title": "" }, { "docid": "2d79296085cf8d66f3fcec3d3d4f6c83", "score": "0.41868544", "text": "abstract protected function createEdge($list, array $attributes = array(), BaseInstruction $parent = null);", "title": "" }, { "docid": "67b7b4862bddbabdc68b9d2424fe2a3d", "score": "0.41861397", "text": "public function getOutgoingEdge($node)\n {\n if($this->nodeEquals($node, $this->firstPath->getLastNode())) {\n return $this->edge;\n }\n\n try {\n return $this->firstPath->getOutgoingEdge($node);\n } catch (NodeNotFoundException $exception) {\n return $this->secondPath->getOutgoingEdge($node);\n }\n }", "title": "" }, { "docid": "d3c5ce5c03367c9231ed25b4ab1baeac", "score": "0.41828382", "text": "public static function getConnections(): array\n {\n if (!class_exists('WeakReference')) {\n /** @var array<string, SSH2> */\n return self::$connections;\n }\n $temp = [];\n foreach (self::$connections as $key => $ref) {\n $temp[$key] = $ref->get();\n }\n return $temp;\n }", "title": "" }, { "docid": "75b81fab5676937cffd9c6988a5505e3", "score": "0.41785535", "text": "public function getHoplinks() {\n return $this->get(self::HOPLINKS);\n }", "title": "" }, { "docid": "af8db8378f353f29ad6eab418c860862", "score": "0.4168763", "text": "abstract protected function fromTo();", "title": "" }, { "docid": "362942030dc5513b4889130daf0e4c35", "score": "0.4168006", "text": "public function getGraph()\n {\n return $this->firstPath->getGraph();\n }", "title": "" }, { "docid": "3dc4eba96b46c730ab782f9a47a4db2b", "score": "0.41640687", "text": "function do_setconnections() {\n // destination.\n // \n // we can ignore it here, because its dealt with in workflowadminutil\n \n $to = (array) KTUtil::arrayGet($_REQUEST, 'fTo');\n $from = (array) KTUtil::arrayGet($_REQUEST, 'fFrom');\n \n // we do not trust any of this data.\n $states = KTWorkflowState::getByWorkflow($this->oWorkflow);\n $states = KTUtil::keyArray($states);\n $transitions = KTWorkflowTransition::getByWorkflow($this->oWorkflow); \n\n $this->startTransaction();\n\n foreach ($transitions as $oTransition) {\n $dest_id = $to[$oTransition->getId()];\n $oDestState = $states[$dest_id];\n \n if (!is_null($oDestState)) {\n $oTransition->setTargetStateId($dest_id);\n $res = $oTransition->update();\n if (PEAR::isError($res)) {\n $this->errorRedirectTo('basic', sprintf(_kt(\"Unexpected error updating transition: %s\"), $res->getMessage()));\n }\n }\n \n // hook up source states.\n $source_state_ids = array();\n $sources = (array) $from[$oTransition->getId()];\n\n foreach ($sources as $state_id => $discard) {\n // test existence\n $oState = $states[$state_id];\n if (!is_null($oState) && ($dest_id != $state_id)) { \n $source_state_ids[] = $oState->getId();\n } \n }\n\n $res = KTWorkflowAdminUtil::saveTransitionSources($oTransition, $source_state_ids);\n if (PEAR::isError($res)) {\n $this->errorRedirectTo('basic', sprintf(_kt(\"Failed to set transition origins: %s\"), $res->getMessage())); \n }\n } \n \n $this->successRedirectTo('basic', _kt(\"Workflow process updated.\"));\n }", "title": "" }, { "docid": "e70ffbf1e3957c2809f2b7279a8029ec", "score": "0.41625065", "text": "public function getLinksByRel(string $rel): iterable;", "title": "" }, { "docid": "1cacd055fe02729b31878e010e5e7167", "score": "0.41439927", "text": "public function addEdge( $src, $dst )\n {\n if ( !isset( $this->nodes[(string) $src] ) )\n {\n $this->nodes[(string) $src] = $src;\n }\n\n if ( !isset( $this->nodes[(string) $dst] ) )\n {\n $this->nodes[(string) $dst] = $dst;\n }\n\n $this->edges[(string) $src][(string) $dst] = true;\n }", "title": "" }, { "docid": "c2a062945aedf7548d4fa92ba0830337", "score": "0.41428864", "text": "public function getRelations(): array\n {\n return [];\n }", "title": "" }, { "docid": "e742b2557efbe1124ad4aa06bd38da14", "score": "0.4135413", "text": "public function getNodes();", "title": "" }, { "docid": "e742b2557efbe1124ad4aa06bd38da14", "score": "0.4135413", "text": "public function getNodes();", "title": "" }, { "docid": "e742b2557efbe1124ad4aa06bd38da14", "score": "0.4135413", "text": "public function getNodes();", "title": "" }, { "docid": "4b8f766ec7f69f8973297823b6e411fc", "score": "0.41332045", "text": "public function getNodeVisitors()\n {\n return array();\n }", "title": "" }, { "docid": "90596062536e563c34d25bd98a0ec54e", "score": "0.41315588", "text": "public function getAllRelations() {\n return $this->allRelations;\n }", "title": "" } ]
c39a112dfc6a04c0d7d9b99ecfe15a8e
check whether available and make necessary inventory deductions, then
[ { "docid": "eaa07c3d004f8c8adda02e528b0e2a11", "score": "0.0", "text": "public static function GetLineItems($invoiceId)\r\n\t{\r\n\t\t$lineItems = array();\r\n\t\ttry {\r\n\t\t\t$sql = 'SELECT * FROM invoice_items WHERE invoice_id = '.$invoiceId.' AND status = 1';\r\n\t\t\t$res = DatabaseHandler::GetAll($sql);\r\n\r\n\t\t\tforeach ($res as $item) {\r\n\t\t\t\t$lineItem = new SalesInvoiceLine($item['invoice_id'], $item['item_name'], $item['item_desc'], $item['quantity'], $item['unit_price'], $item['tax']);\r\n\t\t\t\t$lineItem->initId($item['id']);\r\n\t\t\t\t$lineItems[] = $lineItem;\r\n\t\t\t}\r\n\r\n\t\t\treturn $lineItems;\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "e08f38202b31dc9f835e1672819272b2", "score": "0.7239852", "text": "function checkInventory(){}", "title": "" }, { "docid": "c5ed16cd1f4b4c53d1446111d514c5da", "score": "0.6833228", "text": "public function checkAvailibility(): void\n\t{\n\t\ttry{\n\t\t\t$this->updateAvailableAmountsOfItems();\t\t\t\n\t\t} catch(\\Exception $ex){\n\t\t\t$this->updateAllProductsTotalPrice();\n\t\t\t$this->updateTotalPurchasePrice();\n\t\t\tthrow $ex;\n\t\t}\n\n\t\tforeach($this->getBasketItemsIds() as $id){\n\t\t\t$item = $this->basketSessionSection->getItemById($id);\n\t\t\tif($item->getProduct()->getAmountAvailable() < $item->getQuantity()){\n\t\t\t\t$item->setRequstedQuantityNotAvailable(true);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e692847d1a80b00059f4a36f1cd1088a", "score": "0.6292076", "text": "public function checkavail() {\n $from = Mage::app ()->getRequest ()->getParam ( 'from' );\n $to = Mage::app ()->getRequest ()->getParam ( 'to' );\n $productid = Mage::app ()->getRequest ()->getParam ( 'productid' );\n $price = Mage::app ()->getRequest ()->getParam ( 'price' );\n $days_count = Mage::app ()->getRequest ()->getParam ( 'days' );\n $subscriptionTotal = Mage::app ()->getRequest ()->getParam ( 'subsprice' );\n $subCycle = Mage::app ()->getRequest ()->getParam ( 'subcycle' );\n $dateCountFromDate = date ( 'm/d/Y', strtotime ( $from . ' + ' . $days_count . ' days' ) );\n $to = Mage::getModel ( 'airhotels/calendarsync' )->getToDateValue ( $to );\n $calendarDate = $this->dateVerfiy ( $productid, $from, $to );\n $avPrice = Mage::getModel ( 'airhotels/product' )->getSpecialPrice ( $calendarDate );\n $propertyTime = Mage::getModel ( 'catalog/product' )->load ( $productid )->getPropertyTime ();\n $propertyTimeData = Mage::helper ( 'airhotels/airhotel' )->getPropertyTimeLabelByOptionId ();\n $days = $av = array ();\n $to = Mage::getModel ( 'airhotels/search' )->setToCore ( $subCycle, $to, $dateCountFromDate );\n $hourlyEnabledOrNot = Mage::helper ( 'airhotels/product' )->getHourlyEnabledOrNot ();\n if ($propertyTime != $propertyTimeData || $hourlyEnabledOrNot == 1) {\n $tPrefix = ( string ) Mage::getConfig ()->getTablePrefix ();\n $orderItemTable = $tPrefix . 'sales_flat_order';\n $dealstatus [0] = \"processing\";\n $dealstatus [1] = \"complete\";\n $range = Mage::getModel ( 'airhotels/search' )->dateRangeArray ( $orderItemTable, $productid, $dealstatus );\n }\n $count = count ( $range );\n $day = 86400;\n $Incr = 0;\n $startStrTime = strtotime ( $from );\n $endStrTime = strtotime ( $to );\n $numDayRound = round ( ($endStrTime - $startStrTime) / $day ) + 1;\n if ($propertyTime == $propertyTimeData && $hourlyEnabledOrNot == 0) {\n $propertyServiceFrom = Mage::app ()->getRequest ()->getParam ( 'property_service_from' );\n $propertyServiceFromPeriod = Mage::app ()->getRequest ()->getParam ( 'property_service_from_period' );\n $propertyServiceTo = Mage::app ()->getRequest ()->getParam ( 'property_service_to' );\n $propertyServiceToPeriod = Mage::app ()->getRequest ()->getParam ( 'property_service_to_period' );\n $checkingFromDate = date ( 'Y-m-d', $startStrTime );\n $todayDateValue = Mage::getModel ( 'core/date' )->date ( 'Y-m-d' );\n $msgData = Mage::getModel ( 'airhotels/status' )->getDatesAvailable ( $checkingFromDate, $todayDateValue, $currentHours, $propertyServiceFromPeriod, $propertyServiceFrom );\n if($msgData){\n Mage::app ()->getResponse ()->setBody ( $msgData );\n return true;\n }\n $availHourlyFlag = ( int ) Mage::getModel ( 'airhotels/airhotels' )->checkHourlyAvailableProduct ( $productid, $from, $to, $propertyServiceFrom, $propertyServiceFromPeriod, $propertyServiceTo, $propertyServiceToPeriod );\n $Incr = ! $availHourlyFlag;\n $Incr = ( int ) $Incr;\n } else {\n for($i = 0; $i <= $count - 1; $i ++) {\n $fromdateValue = $range [$i] ['fromdate'];\n $todateValue = $range [$i] ['todate'];\n $startValue = $fromdateValue;\n $endValue = $todateValue;\n $startTime = strtotime ( $startValue );\n $endTime = strtotime ( $endValue );\n $numDays = round ( ($endTime - $startTime) / $day ) + 1;\n for($d = 0; $d < $numDays; $d ++) {\n $days [] = date ( 'm/d/Y', ($startTime + ($d * $day)) );\n }\n }\n } \n $Incr = Mage::getModel ( 'airhotels/customerinbox' )->dayWiseBooked ( $Incr, $numDayRound, $startStrTime, $days, $day, $productid ); \n $total = 0;\n $pFrom = strtotime ( $from );\n $pTo = strtotime ( $to );\n $pDay = round ( ($pTo - $pFrom) / $day ) + 1;\n if ($Incr == 0) {\n $propertyMaximum = Mage::helper ( 'airhotels/airhotel' )->getPropertyMaximumByProductId ( $productid );\n $propertyMinimum = Mage::helper ( 'airhotels/airhotel' )->getPropertyMinimumByProductId ( $productid );\n $overallTotalHours = 0;\n $totalOverNightFee = 0;\n if ($propertyTime == $propertyTimeData && $hourlyEnabledOrNot == 0) {\n $propertyServiceFromRail = $this->getRailwayTimeFormat ( $propertyServiceFromPeriod, $propertyServiceFrom );\n $propertyServiceToRail = $this->getRailwayTimeFormat ( $propertyServiceToPeriod, $propertyServiceTo );\n $propertyServiceFromRail = $this->getRailwayTimeFormat ( $propertyServiceFromPeriod, $propertyServiceFrom );\n $propertyOverNightFeeVal = Mage::helper ( 'airhotels/airhotel' )->getPropertyOverNightFeeByProductId ( $productid );\n $propertyServiceFromTimeData = Mage::helper ( 'airhotels/airhotel' )->getPropertyServiceFromTimeByProductId ( $productid );\n $propertyServiceToTimeData = Mage::helper ( 'airhotels/airhotel' )->getPropertyServiceToTimeByProductId ( $productid );\n $propertyServiceFromArrayVal = explode ( \":\", $propertyServiceFromTimeData );\n $propertyServiceFromData = $propertyServiceFromArrayVal [0];\n $propertyServiceFromPeriodData = $propertyServiceFromArrayVal [1];\n $propertyServiceToArray = explode ( \":\", $propertyServiceToTimeData );\n $propertyServiceToData = $propertyServiceToArray [0];\n $propertyServiceToPeriodData = $propertyServiceToArray [1];\n $propertyServiceFromDataRailVal = $this->getRailwayTimeFormat ( $propertyServiceFromPeriodData, $propertyServiceFromData );\n $propertyServiceToDataRailVal = $this->getRailwayTimeFormat ( $propertyServiceToPeriodData, $propertyServiceToData );\n $this->getRailwayTimeFormat ( $propertyServiceFromPeriodData, $propertyServiceFromData );\n $this->getRailwayTimeFormat ( $propertyServiceToPeriodData, $propertyServiceToData ); \n $checkinDetails = array (\n 'pId' => $productid,\n 'checkin' => $propertyServiceFromRail,\n 'checkout' => $propertyServiceToRail,\n 'checkinformat' => $propertyServiceFromDataRailVal,\n 'checkoutformat' => $propertyServiceToDataRailVal,\n 'overnightfee' => $propertyOverNightFeeVal,\n 'price' => $price,\n 'pfrom' => $pFrom,\n 'pday' => $pDay,\n 'day' => $day,\n 'from' => $from \n );\n $hourlyPriceArray = Mage::getModel ( 'airhotels/customerinbox' )->getHourlyPrice ( $checkinDetails );\n $overallTotalHours = $hourlyPriceArray ['overallTotalHours'];\n $totalOverNightFee = $hourlyPriceArray ['totalOverNightFee'];\n $av = $hourlyPriceArray ['av'];\n $dayCountForOvernightFee = 0;\n $hoursMsgData = Mage::getModel ( 'airhotels/status' )->getValidationDetails ( $propertyMaximum, $propertyMinimum, $overallTotalHours );\n if($hoursMsgData){\n Mage::app ()->getResponse ()->setBody ( $hoursMsgData );\n return true;\n }\n } else {\n for($pr = 0; $pr < $pDay; $pr ++) {\n $pin = date ( 'd', ($pFrom + ($pr * $day)) );\n $pIn = ( int ) $pin;\n $month = date ( 'n', ($pFrom + ($pr * $day)) );\n $av [$month] [$pIn] = $price;\n }\n $msgDataDays = Mage::getModel ( 'airhotels/status' )->getCycleDetails ( $subCycle, $propertyMaximum, $propertyMinimum, $pDay );\n if($msgDataDays){\n Mage::app ()->getResponse ()->setBody ( $msgDataDays );\n return true;\n }\n }\n $total = Mage::getModel ( 'airhotels/search' )->setTotalFromAv ( $av, $avPrice, $hourlyEnabledOrNot, $propertyTimeData, $propertyTime, $dayCountForOvernightFee );\n $this->setOvernightFee($propertyTime,$propertyTimeData,$hourlyEnabledOrNot,$dayCountForOvernightFee,$numDayRound);\n \n $subtotalValue = $total;\n $subtotalValue = ($days_count == 'undefined') ? $subtotalValue : $subscriptionTotal;\n Mage::app ()->getLocale ()->currency ( Mage::app ()->getStore ()->getCurrentCurrencyCode () )->getSymbol ();\n $config = Mage::getStoreConfig ( 'airhotels/custom_group' );\n $serviceFee = round ( ($subtotalValue / 100) * ($config [\"airhotels_servicetax\"]), 2 );\n $getAvailableData = array (\n 'servicefee' => $serviceFee,\n 'subtotal' => $subtotalValue,\n 'pday' => $pDay,\n 'totalhours' => $overallTotalHours,\n 'totalovernightfee' => $totalOverNightFee,\n 'productid' => $productid,\n 'subcycle' => $subCycle,\n 'datecountFromdate' => $dateCountFromDate \n );\n Mage::getModel ( 'airhotels/customerinbox' )->getAvailDates ( $getAvailableData );\n } else {\n $msgData = Mage::helper ( 'airhotels' )->__ ( 'Dates are not available refer to calendar' );\n Mage::app ()->getResponse ()->setBody ( $msgData ); \n }\n }", "title": "" }, { "docid": "2e8e624004e4a45c31923a27fce97fbe", "score": "0.60106814", "text": "public function purchase(){\n\t\thooks::get_instance( [] )->check_if_victory( 'edd_sale' );\n\t}", "title": "" }, { "docid": "82f703cf5a20856ff4864fb67fe333c4", "score": "0.59871304", "text": "public function CheckInventoryBeforeReduce($items)\r\n {\r\n $err = '';\r\n $invmodel = new \\models\\Inventory();\r\n foreach ($items as $item) {\r\n if (!$invmodel->checkAvailability($item['Item_id'], $item['quantity'])) {\r\n $err = $err . $item['name'] . \" ,\";\r\n }\r\n }\r\n return $err;\r\n }", "title": "" }, { "docid": "e24568e45fc0ec1e6a742980b2780710", "score": "0.5922833", "text": "function zg_equipment_gain(\\stdClass &$game_user, $id, $quantity = 1, $eq_price = 0) {\n global $game;\n include drupal_get_path('module', 'zg') . '/includes/' . $game . '_defs.inc';\n\n // BUG! How do these get here?\n if ($id == 0) {\n mail('joseph@ziquid.com', $game_user->name . ' trying to get equipment 0!',\n $game_user->phone_id);\n return [FALSE, 'bad-id', 0];\n }\n\n // FIXME: refactor to use zg_fetch_equip_by_id().\n $sql = 'select * from equipment where id = %d;';\n $result = db_query($sql, $id);\n $eq = db_fetch_object($result);\n\n $sql = 'select * from equipment_ownership\n where fkey_equipment_id = %d and fkey_users_id = %d;';\n $result = db_query($sql, $id, $game_user->id);\n $eo = db_fetch_object($result);\n\n // Check for enough income to cover upkeep.\n if ($game_user->income <\n $game_user->expenses + ($eq->upkeep * $quantity)) {\n return [FALSE, 'not-enough-income', ($eq->upkeep * $quantity)];\n }\n\n // Eo entry already there.\n if (!empty($eo)) {\n\n if (($eq->quantity_limit > 0) &&\n (($eo->quantity + $quantity) > $eq->quantity_limit)) {\n return [FALSE, 'quantity-exceeded', $eq->quantity_limit];\n }\n\n $sql = 'update equipment_ownership set quantity = quantity + %d\n where fkey_equipment_id = %d and fkey_users_id = %d;';\n db_query($sql, $quantity, $id, $game_user->id);\n }\n else {\n\n if (($eq->quantity_limit > 0) && ($quantity > $eq->quantity_limit)) {\n return [FALSE, 'quantity-exceeded', $eq->quantity_limit];\n }\n\n $sql = 'insert into equipment_ownership\n (fkey_users_id, fkey_equipment_id, quantity) values\n (%d, %d, %d);';\n db_query($sql, $game_user->id, $id, $quantity);\n }\n\n // Pay for the equipment, if needed.\n if ($eq_price != 0) {\n $sql = 'update users set money = money - %d where id = %d;';\n db_query($sql, $eq_price, $game_user->id);\n }\n\n // Give energy bonus, if needed.\n if ($eq->energy_bonus > 0) {\n\n // Start the energy clock, if needed.\n if ($game_user->energy == $game_user->energy_max) {\n $sql = 'update users set energy_next_gain = \"%s\" where id = %d;';\n db_query($sql, date('Y-m-d H:i:s', REQUEST_TIME + 300),\n $game_user->id);\n }\n\n $sql = 'update users set energy = energy + %d where id = %d;';\n db_query($sql, $eq->energy_bonus * $quantity, $game_user->id);\n }\n\n // Reprocess user object.\n zg_recalc_income($game_user);\n $game_user = zg_fetch_user_by_id($game_user->id);\n return [TRUE, 'success', 0];\n}", "title": "" }, { "docid": "0d4b7c4e9d4de739546fb715e45be269", "score": "0.5852816", "text": "public function _createRequirementV13(){\r\n\t\t$start = 0 ;\r\n\t\t$limit = 200 ;\r\n\t\t$planId= null ;\r\n\t\t$itemCount = 0 ;\r\n\t\r\n\t\t//中止清除没有处理的需求\r\n\t\t$sql = \"update sc_supplychain_requirement_plan_product set status=2 where status = 0\" ;\r\n\t\t$this->exeSql($sql, array() ) ;\r\n\t\r\n\t\twhile(true){\r\n\t\t\t/**\r\n\t\t\t * 按Listing获取待计算需求列表\r\n\t\t\t * 1、排除正在处理采购Listing\r\n\t\t\t * 2、排除才采购回来的Listing\r\n\t\t\t */\r\n\t\t\t$sql = \"SELECT\r\n\t\t\t\t\tsaap.*,\r\n\t\t\t\t\tsaa.name AS ACCOUNT_ANME,\r\n\t\t\t\t\tsaa.SUPPLY_CYCLE,\r\n\t\t\t\t\tsaa.REQ_ADJUST,\r\n\t\t\t\t\tsaa.SECURITY_STOCK_DAYS,\r\n\t\t\t\t\tsaa.CONVERSION_RATE,\r\n\t\t\t\t\tsrp.ID AS REAL_ID,\r\n\t\t\t\t\tsfsi.TOTAL_SUPPLY_QUANTITY,\r\n\t\t\t\t\tsfsi.IN_STOCK_SUPPLY_QUANTITY\r\n\t\t\t\tFROM sc_amazon_account_product saap,\r\n\t\t\t\t\tsc_amazon_account saa,\r\n\t\t\t\t\tsc_real_product srp,\r\n\t\t\t\t\tsc_real_product_rel srpr\r\n\t\t\t\tLEFT JOIN sc_fba_supply_inventory sfsi\r\n\t\t\t\t\tON sfsi.ACCOUNT_ID = srpr.ACCOUNT_ID\r\n\t\t\t\t\tAND srpr.SKU = sfsi.SELLER_SKU\r\n\t\t\t\twhere saap.IS_ANALYSIS = 1\r\n\t\t\t\t\tand saap.status = 'Y'\r\n\t\t\t\t\tand saap.account_id=saa.id\r\n\t\t\t\t\tand saap.fulfillment_channel like '%AMAZON%'\r\n\t\t\t\t\tand saa.status = 1\r\n\t\t\t\t\tand srp.is_onsale = 1\r\n\t\t\t\t\tAND srpr.ACCOUNT_ID = saap.ACCOUNT_ID\r\n\t\t\t\t\tAND srpr.SKU = saap.SKU\r\n\t\t\t\t\tAND srpr.REAL_ID = srp.ID\r\n\t\t\t\t\tAND NOT EXISTS (\r\n\t\t\t\t\t\tSELECT * FROM sc_purchase_product spp,\r\n\t\t\t\t\t\t\tsc_supplychain_requirement_item ssri\r\n\t\t\t\t\t\tWHERE spp.REQ_PRODUCT_ID = ssri.REQ_PRODUCT_ID\r\n\t\t\t\t\t\tAND spp.REQ_PRODUCT_ID IS NOT NULL \r\n\t\t\t\t\t\tAND spp.REQ_PRODUCT_ID !=''\r\n\t\t\t\t\t\tAND ssri.account_id = saap.account_id\r\n\t\t\t\t\t\tAND ssri.listing_sku = saap.sku\r\n\t\t\t\t\t\tAND ssri.PURCHASE_QUANTITY > 0\r\n\t\t\t\t\t\tAND spp.STATUS < 80\r\n\t\t\t\t\t\tAND spp.IS_TERMINATION = 0\r\n\t\t\t\t\t)\r\n\t\t\t\t\tAND NOT EXISTS (\r\n\t\t\t\t\t\tSELECT * FROM \r\n\t\t\t\t\t\t\t\tsc_supplychain_requirement_plan_product ssrp,\r\n\t\t\t\t\t\t\t\tsc_supplychain_requirement_item ssri\r\n\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t DATEDIFF(NOW(),ssri.last_update_time)<=5\r\n\t\t\t\t\t\t\t\tAND ssrp.real_id = srp.id\r\n\t\t\t\t\t\t\t\tAND ssri.req_product_id = ssrp.req_product_id\r\n\t\t\t\t\t\t\t\tAND ssri.account_id = saap.account_id\r\n\t\t\t\t\t\t\t\tAND ssri.listing_sku = saap.sku\r\n\t\t\t\t\t\t\t\tAND ssri.PURCHASE_QUANTITY > 0\r\n\t\t\t\t\t)\r\n\t\t\t\tlimit $start ,$limit \" ;\r\n\t\t\t\t$items = $this->exeSqlWithFormat($sql,array()) ;\r\n\t\t\t\t$start = $start+$limit ;\r\n\t\t\t\tif( empty( $items ) || count($items)<=0 ) break ;\r\n\t\t\t\t\t\r\n\t\t\t\tif( empty($planId) ){\r\n\t\t\t\t\t//创建需求生成批次(计划)\r\n\t\t\t\t\t$planId = $this->create_guid() ;\r\n\t\t\t\t\t$params['planId'] = $planId ;\r\n\t\t\t\t\t$params['name'] = date(\"Ymd-His\") ;\r\n\t\t\t\t\t$this->exeSql(\"sql_supplychain_requirement_plan_insert\", $params) ;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tforeach( $items as $item ){\r\n\t\t\t\t\t$ic = $this->_createItemRequirementV13($item,$planId) ;\r\n\t\t\t\t\t$itemCount = $itemCount+$ic ;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t\t//预处理需求\r\n\t\t$this->preProcess(array(\r\n\t\t\t'planId'=>$planId,\r\n\t\t\t'itemCount'=>$itemCount\r\n\t\t)) ;\r\n\t}", "title": "" }, { "docid": "3b9c02ce79dba348b0e8f63d7757b4ab", "score": "0.58188653", "text": "public function display() {\n $this->inventory = $this->session->db->prepare(\"SELECT available FROM inventory WHERE productId = ?\");\n $this->inventory->bind_param(\"i\", $this->pid);\n if ($this->inventory->execute()) {\n $this->inventory->store_result();\n $this->inventory->bind_result($available);\n $this->inventory->fetch();\n $this->inventory->close();\n if ($available) {\n $this->boxMsg[] = \"We apologize, but we are unable to add to the cart because the item you requested is out. Currently, we have \" . $available . \" \" . $this->pname . \" left.\";\n } else {\n $this->boxMsg[] = \"We apologize, but we are currently out of \" . $this->pname . \".\";\n }\n return TRUE;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "099cf07a7b50a212a17b0dcc9cd2578d", "score": "0.58177996", "text": "function stCheckdonate()\n {\n $result=$this->argPossibleDonations();\n if (sizeof($result[\"possibledestinations\"]) == 0)\n {\n\t\t\t$this->gamestate->nextState( \"nextLevel\" );\n\t\t}\n }", "title": "" }, { "docid": "b06e3c410c8b0651982126355547cb0a", "score": "0.5815", "text": "public function isInventoryValidate(&$data)\n {\n if (! isset($data['shipment']['items']))\n return ;\n\n $valid = false;\n\n $inventorySourceId = $data['shipment']['source'];\n \n foreach ($data['shipment']['items'] as $itemId => $inventorySource) {\n if ($qty = $inventorySource[$inventorySourceId]) {\n $orderItem = $this->orderItemRepository->find($itemId);\n\n if ($orderItem->qty_to_ship < $qty)\n return false;\n\n if ($orderItem->getTypeInstance()->isComposite()) {\n foreach ($orderItem->children as $child) {\n if (! $child->qty_ordered)\n continue;\n\n $finalQty = ($child->qty_ordered / $orderItem->qty_ordered) * $qty;\n\n $availableQty = $child->product->inventories()\n ->where('inventory_source_id', $inventorySourceId)\n ->sum('qty');\n\n if ($child->qty_to_ship < $finalQty || $availableQty < $finalQty)\n return false;\n }\n } else {\n $availableQty = $orderItem->product->inventories()\n ->where('inventory_source_id', $inventorySourceId)\n ->sum('qty');\n\n if ($orderItem->qty_to_ship < $qty || $availableQty < $qty)\n return false;\n }\n\n $valid = true;\n } else {\n unset($data['shipment']['items'][$itemId]);\n }\n }\n\n return $valid;\n }", "title": "" }, { "docid": "c2151103edeaf8fbb4d6849d87e84476", "score": "0.57658166", "text": "public static function update_stock_inventory_on_recovery(){\n\t\t//Aqui actualizamos los carritos segun sea rentas o servicios para indicar que se ha recuperado el item a X sucursal (donde recuperado=1)\n\t\t//posteriormente llamamaos a un metodo del modelo del inventario y le devolvemos el stock a dicho item\n\t}", "title": "" }, { "docid": "a9edd8a60376129f0e6caebdf4d6f478", "score": "0.5762507", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM vendors WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested vendor (\". $this->id .\") does not exist - possibly the vendor has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "39100062b1dc6b94bd72f03b50177d26", "score": "0.5758797", "text": "public function aquire( ){\n\n\t\t$this->masteradmin = array(\n\t\t\t'notifications' => array(\n\t\t\t\t'master_email' => 'master@localhost'\t\n\t\t\t)\n\n\t\t);\n\n\n\t\t$this->limits = array(\n\t\t\t\n\t\t\t'quantity' => array(\n\t\t\t\t\n\t\t\t)\n\t\t);\n\n\n\n\t\t/**\n\t\t *\tdeprecated, its being kept in product constructor\n\t\t *\n\t\t * \n\t\t * [$this->product_groups description]\n\t\t * @var array\n\t\t */\n\t\t$this->product_groups = array(\n\t\t\t'book' => array( 'cover', 'color', 'bw' ),\n\t\t\t'business-card' => array( 'master' )\n\t\t);\n\n\t\t/**\n\t\t * All binding types\n\t\t * @var array\n\t\t */\n\t\t$this->binding_types = array(\n\t\t\t'perfect_binding' => array(\n\t\t\t\t'cost' => array(\n\t\t\t\t\t'pa_attr' => 'pa_master_quantity',\n\t\t\t\t\t'compare' => 'min',\n\t\t\t\t\t'scale' => array(\n\t\t\t\t\t\tarray( 'price' => .5, 'v' => 0 )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\n\t\t\t'saddle_stitch' => array(\n\t\t\t\t'cost' => array(\n\t\t\t\t\t'pa_attr' => 'pa_master_quantity',\n\t\t\t\t\t'compare' => 'min',\n\n\t\t\t\t\t'scale' => array(\n\t\t\t\t\t\tarray( 'price' => .5, 'v' => 100 ),\n\t\t\t\t\t\tarray( 'price' => 2, 'v' => 50 ),\n\t\t\t\t\t\tarray( 'price' => 3, 'v' => 0 )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\n\t\t\t'spiral_binding' => array(\n\t\t\t\t'cost' => array(\n\t\t\t\t\t'pa_attr' => 'pa_master_quantity',\n\t\t\t\t\t'compare' => 'min',\n\t\t\t\t\t'scale' => array(\n\t\t\t\t\t\tarray( 'price' => 3, 'v' => 0 )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\n\t\t\t'section_sewn' => array(\n\t\t\t\t'extended' => array(\n\t\t\t\t\t'signature_cost' => .07,\n\t\t\t\t\t'min_signature_cost' => 150\n\t\t\t\t),\n\t\t\t\t'cost' => array(\n\t\t\t\t\t'pa_attr' => 'pa_master_quantity',\n\t\t\t\t\t'compare' => 'min',\n\t\t\t\t\t'scale' => array(\n\t\t\t\t\t\tarray( 'price' => 3, 'v' => 0 )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\n\t\t\t'hard' => array(\n\t\t\t\t'extended' => array(\n\t\t\t\t\t'signature_cost' => .07,\n\t\t\t\t\t'min_signature_cost' => 150,\n\t\t\t\t\t'ribbon_cost' => .2\n\t\t\t\t),\n\t\t\t\t'minimal_cost' => array(\n\t\t\t\t\t'pa_attr' => 'pa_master_quantity',\n\t\t\t\t\t'compare' => 'min',\n\t\t\t\t\t'scale' => array(\n\t\t\t\t\t\tarray( 'price' => 250, \t'v' => 0 ),\n\t\t\t\t\t\tarray( 'price' => 300, \t'v' => 49 ),\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tarray( 'price' => -1, 'v' => 98 )\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'cost' => array(\n\t\t\t\t\t'pa_attr' => 'pa_master_quantity',\n\t\t\t\t\t'compare' => 'min',\n\t\t\t\t\t'scale' => array(\n\t\t\t\t\t\tarray( 'price' => 3.65, 'v' => 99 ),\n\t\t\t\t\t\tarray( 'price' => 3.55, 'v' => 201 ),\n\t\t\t\t\t\tarray( 'price' => 3.45, 'v' => 301 ),\n\t\t\t\t\t\tarray( 'price' => 3.35, 'v' => 401 ),\n\t\t\t\t\t\tarray( 'price' => 3.25, 'v' => 501 ),\n\t\t\t\t\t\tarray( 'price' => 3.25, 'v' => 601 ),\n\t\t\t\t\t\tarray( 'price' => 3.2, \t'v' => 701 ),\n\t\t\t\t\t\tarray( 'price' => 3.2, \t'v' => 801 ),\n\t\t\t\t\t\tarray( 'price' => 3.1, \t'v' => 901 )\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'board_20mm_cost' => array(\n\t\t\t\t\t'pa_attr' => 'pa_cover_format',\n\t\t\t\t\t'compare' => 'exact',\n\t\t\t\t\t'scale' => array(\n\t\t\t\t\t\tarray( 'price' => .3, 'v' => 'A5' ),\n\t\t\t\t\t\tarray( 'price' => .4, 'v' => 'B5' ),\n\t\t\t\t\t\tarray( 'price' => .55, 'v' => 'A4' )\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'board_25mm_cost' => array(\n\t\t\t\t\t'pa_attr' => 'pa_cover_format',\n\t\t\t\t\t'compare' => 'exact',\n\t\t\t\t\t'scale' => array(\n\t\t\t\t\t\tarray( 'price' => .35, 'v' => 'A5' ),\n\t\t\t\t\t\tarray( 'price' => .45, 'v' => 'B5' ),\n\t\t\t\t\t\tarray( 'price' => .65, 'v' => 'A4' )\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$this->formats = array(\n\t\t\t'noprint' => array (\t\t\t\t\n\t\t\t\t'SRA3++'\t=> \tarray('width' => 330,'height' => 487),\n\t\t\t\t'SRA3'\t\t=> \tarray('width' => 320,'height' => 450),\n\t\t\t\t'RA3' \t\t=> \tarray('width' => 315,'height' => 430),\n\t\t\t\t'RA3+' \t\t=> \tarray('width' => 315,'height' => 440),\n\t\t\t\t'RA4' \t\t=> \tarray('width' => 215,'height' => 305),\n\t\t\t\t'A3' \t\t=> \tarray('width' => 297,'height' => 420),\n\t\t\t\t'B3' \t\t=> \tarray('width' => 350,'height' => 500), \n\t\t\t\t'B4' \t\t=> \tarray('width' => 250,'height' => 350),\n\t\t\t\t'BN6' \t\t=> \tarray('width' => 600,'height' => 330),\n\t\t\t\t'BN7' \t\t=> \tarray('width' => 700,'height' => 330)\n\t\t\t),\n\n\t\t\t'color' => array (\t\t\t\t\n\t\t\t\t'SRA3++'\t=> \tarray('width' => 330,'height' => 487),\n\t\t\t\t'SRA3'\t\t=> \tarray('width' => 320,'height' => 450),\n\t\t\t\t'RA3' \t\t=> \tarray('width' => 315,'height' => 430),\n\t\t\t\t'RA3+' \t\t=> \tarray('width' => 315,'height' => 440),\n\t\t\t\t'RA4' \t\t=> \tarray('width' => 215,'height' => 305),\n\t\t\t\t'A3' \t\t=> \tarray('width' => 297,'height' => 420),\t\t\t\t\n\t\t\t\t'B4' \t\t=> \tarray('width' => 250,'height' => 350),\n\t\t\t\t'BN6' \t\t=> \tarray('width' => 600,'height' => 330),\n\t\t\t\t'BN7' \t\t=> \tarray('width' => 700,'height' => 330)\n\t\t\t),\n\n\t\t\t'bw' => array (\n\t\t\t\t'SRA3++'\t=> \tarray('width' => 330,'height' => 487),\n\t\t\t\t'SRA3'\t\t=> \tarray('width' => 320,'height' => 450),\n\t\t\t\t'RA3' \t\t=> \tarray('width' => 315,'height' => 430),\n\t\t\t\t'RA3+' \t\t=> \tarray('width' => 315,'height' => 440),\n\t\t\t\t'RA4' \t\t=> \tarray('width' => 215,'height' => 305),\n\t\t\t\t'A3' \t\t=> \tarray('width' => 297,'height' => 420),\n\t\t\t\t'B3' \t\t=> \tarray('width' => 350,'height' => 500),\n\t\t\t\t'B4' \t\t=> \tarray('width' => 250,'height' => 350)\n\t\t\t)\t\n\t\t);\n\n\t\t$this->production_formats = array(\n\t\t\t'0x' => array (\t\t\n\t\t\t\t'wizA'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 24,\t'grain' => 'LG'),\n\t\t\t\t'wizB'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 24,\t'grain' => 'LG'),\n\t\t\t\t'wizAFH'\t=> array( 'format' => 'SRA3++', 'pieces' => 12,\t'grain' => 'LG'),\n\t\t\t\t'wizBFH'\t=> array( 'format' => 'SRA3++', 'pieces' => 12,\t'grain' => 'LG'),\n\t\t\t\t'wizAFV'\t=> array( 'format' => 'SRA3++', 'pieces' => 8,\t'grain' => 'LG'),\n\t\t\t\t'wizBFV'\t=> array( 'format' => 'SRA3++', 'pieces' => 8,\t'grain' => 'LG'),\n\t\t\t\t'A6'\t\t=> array( 'format' => 'RA3', \t'pieces' => 8, \t'grain' => 'SG'),\n\t\t\t\t'B6'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 8, \t'grain' => 'SG'),\n\t\t\t\t'DL'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 6, \t'grain' => 'SG'),\n\t\t\t\t'A5'\t\t=> array( 'format' => 'RA3', \t'pieces' => 4, \t'grain' => 'LG'),\n\t\t\t\t'B5'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 4, \t'grain' => 'LG'),\n\t\t\t\t'A4'\t\t=> array( 'format' => 'RA3', \t'pieces' => 2, \t'grain' => 'SG'),\n\t\t\t\t'2DLFV'\t\t=> array( 'format' => 'RA3', \t'pieces' => 2, \t'grain' => 'SG'),\n\t\t\t\t'2DLFH'\t\t=> array( 'format' => 'RA3', \t'pieces' => 3, \t'grain' => 'SG'),\n\t\t\t\t'B4'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'SG'),\n\t\t\t\t'A3'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'LG'),\n\t\t\t\t'B3'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'LG'),\n\t\t\t\t'SRA3'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'SG'),\n\t\t\t\t'BN6'\t\t=> array( 'format' => 'BN6', \t'pieces' => 1, \t'grain' => 'SG'),\n\t\t\t\t'BN7'\t\t=> array( 'format' => 'BN7', \t'pieces' => 1, \t'grain' => 'SG')\n\t\t\t),\n\n\t\t\t'4x' => array (\t\t\t\t\t\t\n\t\t\t\t'wizA'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 24,\t'grain' => 'LG'),\n\t\t\t\t'wizB'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 24,\t'grain' => 'LG'),\n\t\t\t\t'wizAFH'\t=> array( 'format' => 'SRA3++', 'pieces' => 12,\t'grain' => 'LG'),\n\t\t\t\t'wizBFH'\t=> array( 'format' => 'SRA3++', 'pieces' => 12,\t'grain' => 'LG'),\n\t\t\t\t'wizAFV'\t=> array( 'format' => 'SRA3++', 'pieces' => 8,\t'grain' => 'LG'),\n\t\t\t\t'wizBFV'\t=> array( 'format' => 'SRA3++', 'pieces' => 8,\t'grain' => 'LG'),\n\t\t\t\t'A6'\t\t=> array( 'format' => 'RA3', \t'pieces' => 8, \t'grain' => 'SG'),\n\t\t\t\t'B6'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 8, \t'grain' => 'SG'),\n\t\t\t\t'DL'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 6, \t'grain' => 'SG'),\n\t\t\t\t'A5'\t\t=> array( 'format' => 'RA3', \t'pieces' => 4, \t'grain' => 'LG'),\n\t\t\t\t'B5'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 4, \t'grain' => 'LG'),\n\t\t\t\t'A4'\t\t=> array( 'format' => 'RA3', \t'pieces' => 2, \t'grain' => 'SG'),\n\t\t\t\t'2DLFV'\t\t=> array( 'format' => 'RA3', \t'pieces' => 2, \t'grain' => 'SG'),\n\t\t\t\t'2DLFH'\t\t=> array( 'format' => 'RA3', \t'pieces' => 3, \t'grain' => 'SG'),\n\t\t\t\t'B4'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'SG'),\n\t\t\t\t'A3'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'LG'),\n\t\t\t\t'B3'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'LG'),\n\t\t\t\t'SRA3'\t\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'SG'),\n\t\t\t\t'BN6'\t\t=> array( 'format' => 'BN6', \t'pieces' => 1, \t'grain' => 'SG'),\n\t\t\t\t'BN7'\t\t=> array( 'format' => 'BN7', \t'pieces' => 1, \t'grain' => 'SG')\n\t\t\t),\n\n\t\t\t'1x' => array (\t\t\t\t\n\t\t\t\t'DL'\t=> array( 'format' => 'SRA3++', 'pieces' => 6, \t'grain' => 'SG'),\n\t\t\t\t'A6'\t=> array( 'format' => 'RA3',\t'pieces' => 8, \t'grain' => 'SG'),\n\t\t\t\t'B6'\t=> array( 'format' => 'B3', \t'pieces' => 8, \t'grain' => 'SG'),\n\t\t\t\t'A5'\t=> array( 'format' => 'RA3', \t'pieces' => 4, \t'grain' => 'LG'),\n\t\t\t\t'B5'\t=> array( 'format' => 'B3', \t'pieces' => 4, \t'grain' => 'LG'),\n\t\t\t\t'A4'\t=> array( 'format' => 'RA3', \t'pieces' => 2, \t'grain' => 'SG'),\n\t\t\t\t'2DLFV'\t=> array( 'format' => 'RA3', \t'pieces' => 2, \t'grain' => 'SG'),\n\t\t\t\t'2DLFH'\t=> array( 'format' => 'RA3', \t'pieces' => 3, \t'grain' => 'SG'),\n\t\t\t\t'B4'\t=> array( 'format' => 'B3', \t'pieces' => 2, \t'grain' => 'SG'),\n\t\t\t\t'A3'\t=> array( 'format' => 'RA3', \t'pieces' => 1, \t'grain' => 'LG'),\n\t\t\t\t'B3'\t=> array( 'format' => 'B3', \t'pieces' => 1, \t'grain' => 'LG'),\n\t\t\t\t'SRA3'\t=> array( 'format' => 'SRA3++', 'pieces' => 1, \t'grain' => 'SG'),\n\t\t\t\t'BN6'\t=> array( 'format' => 'BN6', \t'pieces' => 1, \t'grain' => 'SG'),\n\t\t\t\t'BN7'\t=> array( 'format' => 'BN7', \t'pieces' => 1, \t'grain' => 'SG')\n\t\t\t)\t\n\t\t);\n\n\t\t/**\n\t\t * Common used formats (no production formats)\n\t\t * @var array\n\t\t */\n\t\t$this->common_format = array (\t\t\t\n\n\t\t\t'wizA'\t=> \tarray('width' => 85,\t'height' => 55, \t'grain' => 'LG' ),\t\t\t\t\t\t\t\t\n\t\t\t'wizB'\t=> \tarray('width' => 90,\t'height' => 50, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'wizAFV'=> \tarray('width' => 170,\t'height' => 55, \t'grain' => 'LG' ),\t\n\t\t\t'wizBFV'=> \tarray('width' => 180,\t'height' => 50, \t'grain' => 'LG' ),\n\t\t\t'wizAFH'=> \tarray('width' => 85,\t'height' => 170, \t'grain' => 'LG' ),\t\n\t\t\t'wizBFH'=> \tarray('width' => 90,\t'height' => 180, \t'grain' => 'LG' ),\n\t\t\t'DL'\t=> \tarray('width' => 99,\t'height' => 210, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'2DLFH'\t=> \tarray('width' => 99,\t'height' => 420, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'A6'\t=> \tarray('width' => 105,\t'height' => 148, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'B6'\t=> \tarray('width' => 125,\t'height' => 176, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'A5'\t=> \tarray('width' => 148,\t'height' => 210, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'B5'\t=> \tarray('width' => 176,\t'height' => 250, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'2DLFV'\t=> \tarray('width' => 198,\t'height' => 210, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'A4'\t=> \tarray('width' => 210,\t'height' => 297, \t'grain' => 'LG' ),\n\t\t\t'B4'\t=> \tarray('width' => 250,\t'height' => 350, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'A3'\t=> \tarray('width' => 297,\t'height' => 420, \t'grain' => 'LG' ),\t\t\t\t\n\t\t\t'SRA3'=> \tarray('width' => 450,\t'height' => 320, \t'grain' => 'SG' ),\t\t\t\t\n\t\t\t//'B3'\t=> \tarray('width' => 350,\t'height' => 500, \t'grain' => 'LG' ),\t\t\n\t\t\t'BN6'\t=> \tarray('width' => 600,\t'height' => 330, \t'grain' => 'SG' ),\n\t\t\t'BN7'\t=> \tarray('width' => 700,\t'height' => 330, \t'grain' => 'SG' )\n\t\t);\n\n\t\t$this->pallet_format_factor = 4;\n\n\t\t$this->pallet_format = array (\n\t\t\t'sg' => array (\n\t\t\t\t'BN6'\t\t=> \tarray('width' => 860,\t'height' =>\t610),\n\t\t\t\t'BN7'\t\t=> \tarray('width' => 1000,\t'height' =>\t700),\n\t\t\t\t'SRA3++'\t=> \tarray('width' => 1000,\t'height' =>\t700),\n\t\t\t\t'SRA3'\t\t=> \tarray('width' => 1000,\t'height' =>\t700),\n\t\t\t\t'RA3' \t\t=> \tarray('width' => 860,\t'height' =>\t630),\n\t\t\t\t'RA3+' \t\t=> \tarray('width' => 880,\t'height' =>\t630),\n\t\t\t\t'RA4' \t\t=> \tarray('width' => 880,\t'height' =>\t630),\n\t\t\t\t'A3' \t\t=> \tarray('width' => 880,\t'height' =>\t630),\n\t\t\t\t'B3' \t\t=> \tarray('width' => 1000,\t'height' =>\t700),\n\t\t\t\t'B4' \t\t=> \tarray('width' => 1000,\t'height' =>\t700)\n\t\t\t),\n\t\t\t'lg' => array (\n\t\t\t\t'SRA3++'\t=> \tarray('width' => 700,'height' => 1000 ),\n\t\t\t\t'SRA3'\t\t=> \tarray('width' => 700,'height' => 1000 ),\n\t\t\t\t'RA3' \t\t=> \tarray('width' => 630,'height' => 860 ),\n\t\t\t\t'RA3+' \t\t=> \tarray('width' => 630,'height' => 880 ),\n\t\t\t\t'RA4' \t\t=> \tarray('width' => 630,'height' => 880 ),\n\t\t\t\t'A3' \t\t=> \tarray('width' => 630,'height' => 880 ),\n\t\t\t\t'B3' \t\t=> \tarray('width' => 700,'height' => 1000 ),\n\t\t\t\t'B4' \t\t=> \tarray('width' => 700,'height' => 1000 )\n\t\t\t)\n\t\t);\t\n\n\n\n\n\n\t\t/*\n\t\t* Splits devided by formats\n\t\t\n\t\t$this->splits = array(\n\t\t\t'0x' => array(\n\t\t\t\t\"*\" => array( 0,0)\n\t\t\t),\n\n\t\t\t'1x' => array(\n\t\t\t\t\"*\" => array( 2,2),\n\t\t\t\t\"90x50\" => array( 7, 4),\n\t\t\t\t\"180x50\" => array( 7, 4)\t\t\t\t\n\t\t\t),\n\n\t\t\t'4x' => array(\n\t\t\t\t\"*\" => array( 7, 7),\n\t\t\t\t\"90x50\" => array( 7, 7),\n\t\t\t\t\"180x50\" => array( 7, 7 ), \t\t\t\t\n\t\t\t\t\"105x148\" => array( 7, 7 ),\n\t\t\t\t\"148x210\" => array( 7, 7 ),\n\t\t\t\t\"210x297\" => array( 7, 7 ),\n\t\t\t\t\"297x420\" => array( 7, 7 )\n\t\t\t),\n\t\t\t\n\t\t);\n*/\n\t\t/*\n\t\t* Margins devided by production formats\n\t\t*/\n\t\t$this->prod_for_margins = array(\n\t\t\t'1x' => array(\n\t\t\t\t'330x487' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'487x330' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'320x450' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\t\t\t\t\n\t\t\t\t'450x320' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'315x430' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'430x315' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'315x440' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'440x315' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'215x305' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'305x215' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'297x420' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'420x297' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'250x350' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'350x250' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'350x500' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3),\n\t\t\t\t'500x350' => array('left' => 3,'right' => 3, 'top' => 3,'bottom' => 3)\n\t\t\t),\n\t\t\t'4x' => array(\n\t\t\t\t'330x487' => array('left' => 5,'right' => 5, 'top' => 7,'bottom' => 7),\n\t\t\t\t'487x330' => array('left' => 7,'right' => 7, 'top' => 5,'bottom' => 5),\n\t\t\t\t'320x450' => array('left' => 5,'right' => 5, 'top' => 7,'bottom' => 7),\t\t\t\t\n\t\t\t\t'450x320' => array('left' => 7,'right' => 7, 'top' => 5,'bottom' => 5),\n\t\t\t\t'315x430' => array('left' => 5,'right' => 5, 'top' => 7,'bottom' => 7),\n\t\t\t\t'430x315' => array('left' => 7,'right' => 7, 'top' => 5,'bottom' => 5),\n\t\t\t\t'315x440' => array('left' => 5,'right' => 5, 'top' => 7,'bottom' => 7),\n\t\t\t\t'440x315' => array('left' => 7,'right' => 7, 'top' => 5,'bottom' => 5),\n\t\t\t\t'215x305' => array('left' => 5,'right' => 5, 'top' => 7,'bottom' => 7),\n\t\t\t\t'305x215' => array('left' => 7,'right' => 7, 'top' => 5,'bottom' => 5),\n\t\t\t\t'297x420' => array('left' => 5,'right' => 5, 'top' => 7,'bottom' => 7),\n\t\t\t\t'420x297' => array('left' => 7,'right' => 7, 'top' => 5,'bottom' => 5),\n\t\t\t\t'250x350' => array('left' => 5,'right' => 5, 'top' => 7,'bottom' => 7),\n\t\t\t\t'350x250' => array('left' => 7,'right' => 7, 'top' => 5,'bottom' => 5),\n\t\t\t\t'350x500' => array('left' => 5,'right' => 5, 'top' => 7,'bottom' => 7),\n\t\t\t\t'500x350' => array('left' => 7,'right' => 7, 'top' => 5,'bottom' => 5)\n\t\t\t)\n\t\t);\n\n\n\t\t/*\n\t\t* Clicks cost, normative\n\t\t*/\n\t\t$this->clicks = array(\n\n\t\t\t'1x' => array(\n\t\t\t\t'330x487' => array( '*' => array( .0155, .031 )), //SRA3++ LG\n\t\t\t\t'487x330' => array( '*' => array( .0155, .031 )), //SRA3++ SG\n\t\t\t\t'320x450' => array( '*' => array( .0155, .031 )), //SRA3 LG\n\t\t\t\t'450x320' => array( '*' => array( .0155, .031 )), //SRA3 SG\n\t\t\t\t'315x430' => array( '*' => array( .0155, .031 )), //RA3 LG\n\t\t\t\t'430x315' => array( '*' => array( .0155, .031 )), //RA3 SG\n\t\t\t\t'315x440' => array( '*' => array( .0155, .031 )), //RA3 LG\n\t\t\t\t'440x315' => array( '*' => array( .0155, .031 )), //RA3 SG\n\t\t\t\t'215x305' => array(\t'*' => array( .0093, .031 )), //RA4 LG\n\t\t\t\t'305x215' => array(\t'*' => array( .0093, .031 )), //RA4 SG\n\t\t\t\t'297x420' => array(\t'*' => array( .0155, .031 )), //A3 LG\n\t\t\t\t'420x297' => array(\t'*' => array( .0155, .031 )), //A3 SG\t\t\t\t\n\t\t\t\t'250x350' => array(\t'*' => array( .0093, .019 )), //B4 LG\n\t\t\t\t'350x250' => array(\t'*' => array( .0093, .019 )), //B4 SG\n\t\t\t\t'350x500' => array(\t'*' => array( .0155, .031 )), //B3 LG\n\t\t\t\t'500x350' => array(\t'*' => array( .0155, .031 )) //B3 SG\n\t\t\t\t\n\t\t\t),\n\n\t\t\t'4x' => array(\n\t\t\t\t'330x487' => array(\t'*' => array( .14, .26 )), //SRA3++ LG\n\t\t\t\t'487x330' => array(\t'*' => array( .14, .26 )), //SRA3++ SG\n\t\t\t\t'320x450' => array(\t'*' => array( .14, .26 )), //SRA3 LG\n\t\t\t\t'450x320' => array(\t'*' => array( .14, .26 )), //SRA3 SG\n\t\t\t\t'315x430' => array(\t'*' => array( .14, .26 )), //RA3 LG\n\t\t\t\t'430x315' => array(\t'*' => array( .14, .26 )), //RA3 SG\n\t\t\t\t'315x440' => array(\t'*' => array( .14, .26 )), //RA3 LG\n\t\t\t\t'440x315' => array(\t'*' => array( .14, .26 )), //RA3 SG\n\t\t\t\t'215x305' => array(\t'*' => array( .07, .18 )), //RA4 LG\n\t\t\t\t'305x215' => array(\t'*' => array( .07, .18 )), //RA4 SG\n\t\t\t\t'297x420' => array(\t'*' => array( .07, .18 )), //A3 LG\n\t\t\t\t'420x297' => array(\t'*' => array( .07, .18 )), //A3 SG\t\t\t\t\n\t\t\t\t'250x350' => array(\t'*' => array( .07, .18 )), //B4 LG\n\t\t\t\t'350x250' => array(\t'*' => array( .07, .26 )), //B4 SG\n\t\t\t\t'350x500' => array(\t'*' => array( .14, .26 )), //B3 LG\n\t\t\t\t'500x350' => array(\t'*' => array( .14, .26 )), //B3 SG\n\t\t\t\t'600x330' => array(\t'*' => array( .39, .78 )) //B3 SG\n\t\t\t)\n\t\t);\n\n\n\t\t/*\n\t\t* From dimensions to string format name\n\t\t*/\n\t\t$this->str_dim_to_format = array(\n\t\t\t'330x487' => 'SRA3++',\n\t\t\t'487x330' => 'SRA3++',\n\t\t\t'320x450' => 'SRA3',\n\t\t\t'450x320' => 'SRA3',\n\t\t\t'315x430' => 'RA3',\n\t\t\t'430x315' => 'RA3',\n\t\t\t'315x440' => 'RA3+',\n\t\t\t'440x315' => 'RA3+',\n\t\t\t'215x305' => 'RA4',\n\t\t\t'305x215' => 'RA4',\n\t\t\t'420x297' => 'A3',\t\n\t\t\t'297x420' => 'A3',\n\t\t\t'250x350' => 'B4',\t\n\t\t\t'350x250' => 'B4',\n\t\t\t'350x500' => 'B3',\t\n\t\t\t'500x350' => 'B3'\t\t\t\n\t\t);\n\n\t\t$this->wrap_cost = array(\n\t\t\t'0x0' => 0,\n\t\t\t'gloss-1x1' => .2,\n\t\t\t'gloss-1x0' => .1,\n\t\t\t'matt-1x1' => .2,\n\t\t\t'matt-1x0' => .1,\n\t\t\t'soft-touch-1x1' => .8,\n\t\t\t'soft-touch-1x0' => .4,\n\t\t);\n\n\t\t$this->total_cost_equasion = array(\n\t\t\t//universal\n\t\t\t'plain' => array(\n\t\t\t\t'equasion' => 'pa_master_paper + pa_master_print + pa_master_wrap + pa_master_folding + pa_master_spot_uv'\n\t\t\t),\n\n\n\n\t\t\t'plano' => array(\n\t\t\t\t'equasion' => 'pa_bw_paper + pa_bw_print + pa_color_paper + pa_color_print'\n\t\t\t),\n\n\t\t\t'plano_color' => array(\n\t\t\t\t'equasion' => 'pa_color_paper + pa_color_print'\n\t\t\t),\n\n\t\t\t'plano_bw' => array(\n\t\t\t\t'equasion' => 'pa_bw_paper + pa_bw_print'\n\t\t\t),\n\n\t\t\t'letterhead' => array(\n\t\t\t\t'equasion' => 'pa_color_paper + pa_color_print + pa_bw_paper + pa_bw_print'\n\t\t\t),\n\n\t\t\t'letterhead_color' => array(\n\t\t\t\t'equasion' => 'pa_color_paper + pa_color_print'\n\t\t\t),\n\n\t\t\t'letterhead_bw' => array(\n\t\t\t\t'equasion' => 'pa_bw_paper + pa_bw_print'\n\t\t\t),\n\n\n\t\t\t'writing-pad' => array(\n\t\t\t\t'equasion' => 'pa_cover_type + pa_cover_paper + pa_cover_print + pa_cover_finish + pa_cover_spot_uv + pa_color_paper + pa_color_print + pa_bw_paper + pa_bw_print'\n\t\t\t),\n\n\n\n\t\t\t'book' => array(\n\t\t\t\t'equasion' => 'pa_cover_type + pa_cover_paper + pa_cover_print + pa_cover_finish + pa_cover_spot_uv + pa_bw_paper + pa_bw_print + pa_color_paper + pa_color_print + pa_bw_sewing + pa_color_sewing'\n\t\t\t),\n\n\t\t\t'catalog' => array(\n\t\t\t\t'equasion' => 'pa_cover_type + pa_cover_paper + pa_cover_print + pa_cover_finish + pa_cover_spot_uv + pa_color_paper + pa_color_print' \n\t\t\t),\n\t\t);\n\n\t\t$this->spot_uv_cost = array(\n\t\t\t'cost' => 155,\n\t\t\t'stack' => 1000\n\t\t);\n\n\n\t}", "title": "" }, { "docid": "70a36cdd80e8af27b8b4c54b8d72a2c3", "score": "0.5747064", "text": "private function areProductsAvailable($items){\n foreach($items as $item){\n if(!$item->model->hasStock($item->qty)){\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "b59fca0a2163442aa4f506d0ce6317b9", "score": "0.5745737", "text": "public function isInventoryValidate(&$data)\n {\n if (! isset($data['shipment']['items'])) {\n return;\n }\n\n $valid = false;\n\n $inventorySourceId = $data['shipment']['source'];\n\n foreach ($data['shipment']['items'] as $itemId => $inventorySource) {\n $qty = $inventorySource[$inventorySourceId];\n\n if ((int) $qty) {\n $orderItem = $this->orderItemRepository->find($itemId);\n\n if ($orderItem->qty_to_ship < $qty) {\n return false;\n }\n\n if ($orderItem->getTypeInstance()->isComposite()) {\n foreach ($orderItem->children as $child) {\n if (! $child->qty_ordered) {\n continue;\n }\n\n $finalQty = ($child->qty_ordered / $orderItem->qty_ordered) * $qty;\n\n $availableQty = $child->product->inventories()\n ->where('inventory_source_id', $inventorySourceId)\n ->sum('qty');\n\n if ($child->qty_to_ship < $finalQty || $availableQty < $finalQty) {\n return false;\n }\n }\n } else {\n $availableQty = $orderItem->product->inventories()\n ->where('inventory_source_id', $inventorySourceId)\n ->sum('qty');\n\n if ($orderItem->qty_to_ship < $qty || $availableQty < $qty) {\n return false;\n }\n }\n\n $valid = true;\n } else {\n unset($data['shipment']['items'][$itemId]);\n }\n }\n\n return $valid;\n }", "title": "" }, { "docid": "7c532675dc676dbcce5592f66bd528a5", "score": "0.57364947", "text": "abstract public function available();", "title": "" }, { "docid": "897e6c6f5f88d3062e1b2d125a29d970", "score": "0.5701343", "text": "public function isAvailableProduct(array $items)\n\t{\n\t\t$err = [];\n\t\tforeach ($items as $item) {\n\t\t\t$products = Product::Where('id', $item['productId'])->where('inventory', '>=', $item['quantity'])->first();\n\t\t\tif (!$products)\n\t\t\t\t$err[\"Product (${item['productId']})\"] = \"this product not available !\";\n\t\t}\n\t\treturn $err;\n\t}", "title": "" }, { "docid": "83e544b0dad1e462a342d3d083c93915", "score": "0.5624081", "text": "function Check_Inventory($Items,$CoreID) {\n\tif ($Items == \"\") { return 0; }\n\t$sth = mysql_query(\"select * from items join items_base on items.ItemID=items_base.ItemID where items.CoreID=$CoreID and \nitems_base.Name='$Items'\");\n\tif (mysql_num_rows($sth) == 0) {\n\t\treturn 0;\n\t} else {\n\t\treturn 1;\n\t}\n}", "title": "" }, { "docid": "37a03ff8ccd3d2d83c6953cd460af902", "score": "0.5603698", "text": "public function CheckTmpInventoryBeforeReduce($items, $tech_id)\r\n {\r\n $err = '';\r\n $tmpmodel = new \\models\\TmpInventory();\r\n foreach ($items as $item) {\r\n if (!$tmpmodel->checkAvailability($tech_id, $item[0], $item[1])) {\r\n $err = $err . $item[2] . \" ,\";\r\n }\r\n }\r\n return $err;\r\n }", "title": "" }, { "docid": "d73a9338deccadb28ada72e464b37f81", "score": "0.5603646", "text": "public static function unitsAvailable();", "title": "" }, { "docid": "8394e8c9c13590b5581dbfa58ce25a57", "score": "0.5602627", "text": "function stCheckpower()\n {\n $result=$this->argPossibleTargets();\n if (sizeof($result[\"possibledestinations\"]) == 0)\n {\n\t\t\tif ( (self::getGameStateValue(\"cardpower\") == 4) OR (self::getGameStateValue(\"cardpower\") == 5) )\n\t\t\t{\n\t\t\t\t$this->gamestate->nextState( \"playerDonate\" ); \n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t$this->gamestate->nextState( \"pickCard\" ); \n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "67976ff7e1434c2cf4eb288f627d9eaf", "score": "0.55780035", "text": "function drush_devshop_provision_provision_install_validate() {\n\n}", "title": "" }, { "docid": "595fb5b5100d511e8a4ab461f0090410", "score": "0.55700856", "text": "function testCapacity(){\n \n $this->clearAll();\n \n $v1 = $this->createVenue('Pool');\n \n $out1 = $this->createOutlet('Outlet 1', '0010');\n \n $seller = $this->createUser('seller');\n \n $this->setUserHomePhone($seller, '111');\n $box = $this->createBoxoffice('xbox', 'seller');//placeholder box for testing in box offices\n \n $evt = $this->createEvent('Return my Capacity!!1', 'seller', $this->createLocation()->id);\n $this->setEventId($evt, 'aaa');\n $this->setEventGroupId($evt, '0110');\n $this->setEventVenue($evt, $v1);\n $catA = $this->createCategory('Adult', $evt->id, 100, 5);\n $catB = $this->createCategory('Kid', $evt->id, 50, 10);\n \n \n $foo = $this->createUser('foo');\n\n //return;\n \n $outlet = new OutletModule($this->db, 'outlet1');\n $outlet->addItem('aaa', $catA->id, 5);\n $txn_id = $outlet->payByCash($foo);\n \n try {\n $outlet->addItem('aaa', $catA->id, 1);\n $this->fail(\"Should have failed\");\n } catch (Exception $e) {\n Utils::log(\"Addition failed properly: \" .$e->getMessage());\n }\n \n $this->manualCancel($txn_id);\n \n //return;\n \n try{\n $outlet->addItem('aaa', $catA->id, 5);\n $txn_id = $outlet->payByCash($foo); \n Utils::log(__METHOD__ . \" ################# ALL FINE ############ \"); \n }catch (Exception $e){\n $this->fail( \"Addition failed! \" . $e->getMessage() );\n throw($e);\n }\n \n $this->manualCancel($txn_id);\n \n }", "title": "" }, { "docid": "cc7c5204ae57347fbf1e2485bcc94f63", "score": "0.556433", "text": "public function isInventoryValidate(&$data)\n {\n $valid = false;\n\n foreach ($data['shipment']['items'] as $itemId => $inventorySource) {\n if ($qty = $inventorySource[$data['shipment']['source']]) {\n $orderItem = $this->baseOrderItem->find($itemId);\n\n $product = ($orderItem->type == 'configurable')\n ? $orderItem->child->product\n : $orderItem->product;\n\n $inventory = $product->inventories()\n ->where('inventory_source_id', $data['shipment']['source'])\n ->where('vendor_id', $data['vendor_id'])\n ->first();\n\n if ($orderItem->qty_to_ship < $qty || $inventory->qty < $qty) {\n return false;\n }\n\n $valid = true;\n } else {\n unset($data['shipment']['items'][$itemId]);\n }\n }\n\n return $valid;\n }", "title": "" }, { "docid": "c7e564c79bdfc5eb1f9529325a3735f5", "score": "0.55624294", "text": "public function validate() : void{\n\t\t$this->squashDuplicateSlotChanges();\n\n\t\t$haveItems = [];\n\t\t$needItems = [];\n\t\t$this->matchItems($needItems, $haveItems);\n\t\tif(count($this->actions) === 0){\n\t\t\tthrow new TransactionValidationException(\"Inventory transaction must have at least one action to be executable\");\n\t\t}\n\n\t\tif(count($haveItems) > 0){\n\t\t\tthrow new TransactionValidationException(\"Transaction does not balance (tried to destroy some items)\");\n\t\t}\n\t\tif(count($needItems) > 0){\n\t\t\tthrow new TransactionValidationException(\"Transaction does not balance (tried to create some items)\");\n\t\t}\n\t}", "title": "" }, { "docid": "a41e4425874d0b65e9012afcb6693de0", "score": "0.55415237", "text": "function harvest($connect, $char_id, $user_email, $user_id, $food_source_id)\n{\n $allowed = 0;\n\n $sqls = \"SELECT * FROM fixtures WHERE id=\" . $food_source_id;\n $ress = mysqli_query($connect, $sqls);\n\n if($ress->num_rows == 1)\n {\n $fixture = $ress->fetch_assoc();\n $loc = $fixture['location_id'];\n\n $sqll = \"SELECT * FROM locations WHERE id=\" . $loc;\n $resl = mysqli_query($connect, $sqll);\n\n if($resl->num_rows == 1)\n {\n $location = $resl->fetch_assoc();\n if($location['is_hold'] == 0)\n {\n $allowed = 1;\n }\n else\n {\n $hold_id = $location['hold_id'];\n\n $sqlh = \"SELECT * FROM holds WHERE id=\" . $hold_id;\n $resh = mysqli_query($connect, $sqlh);\n\n if($resh->num_rows == 1)\n {\n $hold = $resh->fetch_assoc();\n\n if(!is_null($hold['house_id']))\n {\n $house_id = $hold['house_id'];\n\n $sqlc = \"SELECT * FROM characters WHERE id=\" . $char_id;\n $resc = mysqli_query($connect, $sqlc);\n\n if($resc->num_rows == 1)\n {\n $char = $resc->fetch_assoc();\n\n if($char['house_id'] == $house_id)\n {\n $allowed = 1;\n }\n }\n else\n {\n echo \"<p>Oh shit.</p>\";\n }\n }\n }\n else\n {\n echo \"<p>Oh shit.</p>\";\n }\n }\n }\n else\n {\n echo \"<p>Oh shit.</p>\";\n }\n }\n else\n {\n echo \"<p>Oh shit.</p>\";\n }\n\n if($allowed == 1)\n {\n // get info on food source\n $sqlfs = \"SELECT * FROM fixtures WHERE id=\" . $food_source_id;\n $resfs = mysqli_query($connect, $sqlfs);\n\n if($resfs->num_rows == 1)\n {\n // found it, load info into var\n $food_source = $resfs->fetch_assoc();\n\n // find character's inventory\n $sqlci = \"SELECT * FROM storage WHERE character_id=\" . $char_id;\n $resci = mysqli_query($connect, $sqlci);\n\n if($resci->num_rows == 1)\n {\n // found it, load info into var\n $inventory = $resci->fetch_assoc();\n\n // find all items in inventory and add their weight\n $sqlsi = \"SELECT * FROM items WHERE storage_id=\" . $inventory['id'];\n $ressi = mysqli_query($connect, $sqlsi);\n\n // subtract the weight of the items in the inventory from its capacity\n $inventory_free = $inventory['capacity'];\n if($ressi->num_rows > 0)\n {\n while($item = $ressi->fetch_assoc())\n {\n $inventory_free -= $item['weight'];\n }\n }\n\n // compare the weight of contructed items to free inventory space\n if($inventory_free >= $food_source['contruct_num'] * $food_source['construct_weight'])\n {\n // check how long it's been since the last usage of the food source\n if(!is_null($food_source['last_used']))\n {\n $now = new DateTime('NOW');\n $now = $now->format('Y-m-d H:i:s');\n $now = strtotime($now) + (3600*6);\n $last = strtotime($food_source['last_used']);\n $interval = $now - $last;\n }\n\n if($interval > $food_source['interval_s'] || is_null($food_source['last_used']))\n {\n // place construct in character inventory\n for($i = 0; $i < $food_source['construct_num']; $i++)\n {\n $sqli = \"INSERT INTO items(storage_id, name, quality, class_id, weight, created, duration_s) VALUES (\" . $inventory['id'] . \", '\" . $food_source['construct_name'] . \"', '\" . $food_source['construct_quality'] . \"', \" . $food_source['construct_class'] . \", \" . $food_source['construct_weight'] . \", CURRENT_TIMESTAMP, \" . $food_source['construct_duration'] . \")\";\n mysqli_query($connect, $sqli);\n $sqlu = \"UPDATE fixtures SET last_used=CURRENT_TIMESTAMP WHERE id=\" . $food_source['id'];\n mysqli_query($connect, $sqlu);\n }\n echo \"<p>You've collected \" . $food_source['construct_num'] . \" \" . $food_source['construct_name'] . \"(s).</p>\";\n }\n else\n {\n echo \"<p>It's too soon to collect again.</p>\";\n }\n }\n else\n {\n echo \"<p>You don't have enough room in your inventory to collect this item.</p>\";\n }\n\n }\n else\n {\n echo \"<p>Oh this is bad.</p>\";\n }\n }\n else\n {\n echo \"<p>Oh this is bad.</p>\";\n }\n }\n else\n {\n echo \"<p>You're not allowed to use this object.</p>\";\n }\n\n}", "title": "" }, { "docid": "1424d2f1ab3b4d9eaad6e61d660d2047", "score": "0.553273", "text": "private function checkCapacity()\n {\n if ($this->shouldIncreaseCapacity()) {\n $this->increaseCapacity();\n } else {\n if ($this->shouldDecreaseCapacity()) {\n $this->decreaseCapacity();\n }\n }\n }", "title": "" }, { "docid": "712ceff80045762a66e88ae7954f2378", "score": "0.55325764", "text": "public function CalculateReservedInventory() {\n\n\n\t\t//Pending orders not yet converted to Invoice\n\t\t$intReservedA = $this->getDbConnection()->createCommand(\n\t\t\t\t\t\"SELECT SUM(qty) FROM \".CartItem::model()->tableName().\" AS a\n\t\t\t\t\tLEFT JOIN \".Cart::model()->tableName().\" AS b ON a.cart_id=b.id\n\t\t\t\t\tLEFT JOIN \".Document::model()->tableName().\" AS c ON b.document_id=c.id\n\t\t\t\t\tWHERE\n\t\t\t\t\ta.product_id=\". $this->id.\" AND b.cart_type=\".CartType::order.\"\n\t\t\t\t\tAND (b.status='\".OrderStatus::Requested.\"' OR b.status='\".OrderStatus::AwaitingProcessing.\"'\n\t\t\t\t\t\tOR b.status='\".OrderStatus::Downloaded.\"')\n\t\t\t\t\tAND (c.status IS NULL OR c.status='\".OrderStatus::Requested.\"');\")->queryScalar();\n\t\tif (empty($intReservedA))\n\t\t\t$intReservedA=0;\n\n\t\t//Unattached orders (made independently in LightSpeed)\n\t\t$intReservedB = $this->getDbConnection()->createCommand(\n\t\t\t\t\t\"SELECT SUM(qty) from \".DocumentItem::model()->tableName().\" AS a\n\t\t\t\t\tLEFT JOIN \".Document::model()->tableName().\" AS b ON a.document_id=b.id\n\t\t\t\t\tWHERE\n\t\t\t\t\ta.product_id=\". $this->id.\" AND b.order_type=\".CartType::order.\"\n\t\t\t\t\tAND cart_id IS NULL AND left(order_str,3)='WO-' AND (b.status='\".OrderStatus::Requested.\"');\")->queryScalar();\n\n\t\tif (empty($intReservedB))\n\t\t\t$intReservedB=0;\n\n\t\treturn ($intReservedA+$intReservedB);\n\n\n\t}", "title": "" }, { "docid": "4476519113e4782407bc78434f33feef", "score": "0.5526034", "text": "function check_for_inventory_match($conn,$orderid){\n $invgreat = 0;\n\n // select all from receipt with orderid\n $query = \"SELECT receipt.productID,\n receipt.quantity\n FROM receipt\n WHERE orderID = $orderid\";\n\n $sql = mysqli_query($conn,$query);\n // iterates all in products from order\n while($row = mysqli_fetch_array($sql)){\n\n // assign productid and qty of product\n $id = $row['productID'];\n $recipeqty = $row['quantity'];\n\n //\n $query1 = \"SELECT Recipe.productID AS ProductID,\n Recipe.ingredientID AS Ingredientid,\n Ingredient.quantity AS CurrentInventoryQuantity,\n Recipe.quantity AS IndivNeedINGQTY,\n Recipe.quantity*$recipeqty AS NeededIngredientQuantity\n FROM `Recipe`\n INNER JOIN Ingredient ON Ingredient.ingredientID = Recipe.ingredientID\n WHERE Recipe.productID = $id\";\n\n $sql1 = mysqli_query($conn,$query1);\n\n while ($rowed = mysqli_fetch_array($sql1)) {\n $prodakid = $rowed['ProductID'];\n $ingredid = $rowed['Ingredientid'];\n $oriingid = $rowed['IndivNeedINGQTY'];\n $ingquant = $rowed['NeededIngredientQuantity'];\n $currinvq = $rowed['CurrentInventoryQuantity'];\n\n if ($currinvq < $ingquant) {\n $invgreat++;\n }\n }\n }\n return $invgreat;\n}", "title": "" }, { "docid": "7d091aafcf50d8f13da7778d07caa6ca", "score": "0.5515179", "text": "public function testIsValidNonPack()\n {\n $packValidator = new PackStockValidator();\n $this->assertFalse(\n $packValidator->isStockAvailable(\n $this\n ->prophesize('Elcodi\\Component\\Product\\Entity\\Interfaces\\PurchasableInterface')\n ->reveal(),\n 0,\n false\n )\n );\n\n $this->assertFalse(\n $packValidator->isStockAvailable(\n $this\n ->prophesize('Elcodi\\Component\\Product\\Entity\\Interfaces\\VariantInterface')\n ->reveal(),\n 0,\n false\n )\n );\n }", "title": "" }, { "docid": "ea46adc7a44fa2633563fbb938b87f69", "score": "0.54851246", "text": "public function benchHasMissingItemsBulk()\n {\n $this->storage->hasItems(array_keys($this->coldItems));\n }", "title": "" }, { "docid": "f651ee4d15d409ef963f8689ca17c844", "score": "0.54842675", "text": "function zg_equipment_use(\\stdClass &$game_user, $id, $quantity = 1) {\n global $game;\n include drupal_get_path('module', 'zg') . '/includes/' . $game . '_defs.inc';\n\n if (zg_equipment_lose($game_user, $id, $quantity, 0)) {\n $sql = 'update equipment_ownership set quantity_used = quantity_used + %d\n where fkey_equipment_id = %d and fkey_users_id = %d;';\n db_query($sql, $quantity, $id, $game_user->id);\n return TRUE;\n }\n else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "a44d85fb3ddac020341a8e4711b1b2b3", "score": "0.5464888", "text": "function __requirements(){\n\nglobal $__settings, $error, $software;\n\n\tif(sversion_compare($__settings['ver'], $software['ver'], '>=')){\n\t\t$error[] = 'It is not possible to Upgrade from '.$__settings['ver'].' to '.$software['ver'];\n\t}\n\n\t//If there are some shorfalls then pass it to $error and return false\n\t\n\treturn true;\n\n}", "title": "" }, { "docid": "c51fc2820a0e28f640918822756c0c99", "score": "0.54571295", "text": "public function productSkuChecks()\n {\n $result=false;\n infolog('[productSkuChecks] START at '. now());\n $v=$this->shopifyVariant;\n $product=Product::where(\"sku\",$v[\"sku\"])->first();\n if($product){\n if($product->qty<>$v[\"inventory_quantity\"]){\n dump_warn('[productSkuChecks] WARNING: QTY Differences: Local='.$product->qty.'<>'.$v[\"inventory_quantity\"].'! at '. now(),$v[\"sku\"]);\n }\n infolog('[productSkuChecks] SUCCESS at '. now());\n $result=$product;\n }elseif($v[\"inventory_quantity\"]>0){\n dump_err('[productSkuChecks] ERROR: SKU NOT FOUND: '.$v[\"sku\"].' and has QTY='.$v[\"inventory_quantity\"].'! at '. now());\n }else{\n if($this->create_if_new){\n infolog('[productSkuChecks] SKU Not found, create_if_new is ON and SKU has Qty! Creating... at '. now(),$v[\"sku\"]);\n return($this->createNewSku());\n }else{\n dump_warn('[productSkuChecks] WARNING: SKU Not found, create_if_new is OFF and SKU has Qty! at '. now(),$v[\"sku\"]);\n }\n }\n infolog('[productSkuChecks] END at '. now());\n return($result);\n }", "title": "" }, { "docid": "152c2f28723b45b59cea514a2c401c1f", "score": "0.5431753", "text": "function tep_fetch_equipment_available($equipment_id, $type, $total) {\n global $database;\n $available = 0;\n if ($type == 'add') {\n $available = $total;\n } else {\n $active_query = $database->query(\"select count(equipment_id) as count from \" . TABLE_EQUIPMENT_TO_ORDERS . \" where equipment_id = '\" . $equipment_id . \"' and (equipment_status_id != '3')\");\n $active_result = $database->fetch_array($active_query);\n $available = ($total - $active_result['count']);\n }\n return $available;\n}", "title": "" }, { "docid": "1a90fdad51d89bd21dfc916f862441df", "score": "0.54314655", "text": "public function makePaymentAvailable()\r\n {\r\n foreach($this->projects()->get() as $project)\r\n {\r\n if($project->status!=\"EXCLUDE\" && $project->lastContractNoWP() !=null &&\r\n $project->lastContractNoWP()->paid < $project->lastContractNoWP()->price &&\r\n in_array($project->stage,array(\"WOM\", 'WALKTHRU',\"DROP\", \"DROP/IMG\", \"ARCHIVE\",\"PHASE2\",\"CONTRACT\"))\r\n && ($project->stage==\"WALKTHRU\"||$project->lastContractNoWP()->type==\"IGUP\"||$project->lastContractNoWP()->type==\"PPA\" || new \\DateTime($project->actionDate) <= new \\DateTime()))\r\n return 1;\r\n }\r\n return 0;\r\n }", "title": "" }, { "docid": "b9184aa598cb793f7a6a55a83555138e", "score": "0.54217714", "text": "public static function maintenance() {\n\t\t$api_params = [\n\t\t\t'edd_action' => 'check_license',\n\t\t\t'license' => self::$key,\n\t\t\t'item_name' => rawurlencode( SEARCHWP_EDD_ITEM_NAME ),\n\t\t];\n\n\t\t$api_args = [\n\t\t\t'timeout' => 30,\n\t\t\t'sslverify' => false,\n\t\t\t'body' => $api_params,\n\t\t];\n\n\t\t$response = wp_remote_post( SEARCHWP_EDD_STORE_URL, $api_args );\n\n\t\tif ( is_wp_error( $response ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$parsed_response = self::handle_activation_response( $response );\n\n\t\tif ( $parsed_response['success'] ) {\n\t\t\tself::$data = $parsed_response['data'];\n\t\t\tself::$data['key'] = self::$key;\n\n\t\t\tSettings::update( 'license', self::$data );\n\t\t} else {\n\t\t\tSettings::update( 'license', false );\n\t\t}\n\t}", "title": "" }, { "docid": "f8c08950dbd9ca6c0685cba7e17f1f0f", "score": "0.5420745", "text": "public function makeCure()\r\n\t{\r\n\t\t//if the player has all 7 cure items, then they can exchange them for one cure item\r\n\t\treturn $cure;\r\n\t\t//if they don't have all cure items, the console tells them as much.\r\n\t}", "title": "" }, { "docid": "3d500d7b805e797a38568f160a0fc3b2", "score": "0.54083574", "text": "public function initalize()\n {\n $this->shops[\"Light World Death Mountain Shop\"]->setRequirements(function ($locations, $items) {\n return (($items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2))) && ($items->has('Hookshot')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed())) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()\n && ((($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots')) ||\n $this->world->config('canOneFrameClipOW', false)))))\n && $items->canBombThings();\n });\n\n\n $this->locations[\"Spiral Cave\"]->setRequirements(function ($locations, $items) {\n return ($items->has('MoonPearl')) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2) && ($items->has('Hookshot') \n || $this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed())) \n || ($this->world->config('canSuperBunny', false) && $items->has('MagicMirror')\n && $items->hasSword()) \n || (($this->world->config('canOWYBA', false)\n && $items->hasABottle())\n && (($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots')) \n || $this->world->config('canOneFrameClipOW', false)));\n });\n\n $this->locations[\"Mimic Cave\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && ($items->has('MoonPearl')\n || (($this->world->config('canOWYBA', false)\n && $items->hasABottle()) && (\n ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots')) ||\n $this->world->config('canOneFrameClipOW', false))));\n });\n\n $this->locations[\"Paradox Cave Lower - Far Left\"]->setRequirements(function ($locations, $items) {\n return $items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2) && ($items->has('Hookshot')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed()))) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()\n && (($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))\n || $this->world->config('canOneFrameClipOW', false)));\n });\n\n $this->locations[\"Paradox Cave Lower - Left\"]->setRequirements(function ($locations, $items) {\n return $items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2) && ($items->has('Hookshot')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed()))) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()\n && (($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))\n || $this->world->config('canOneFrameClipOW', false)));\n });\n\n $this->locations[\"Paradox Cave Lower - Right\"]->setRequirements(function ($locations, $items) {\n return $items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2) && ($items->has('Hookshot')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed()))) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()\n && (($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))\n || $this->world->config('canOneFrameClipOW', false)));\n });\n\n $this->locations[\"Paradox Cave Lower - Far Right\"]->setRequirements(function ($locations, $items) {\n return $items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2) && ($items->has('Hookshot')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed()))) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()\n && (($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))\n || $this->world->config('canOneFrameClipOW', false)));\n });\n\n $this->locations[\"Paradox Cave Lower - Middle\"]->setRequirements(function ($locations, $items) {\n return $items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2) && ($items->has('Hookshot')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed()))) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()\n && (($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))\n || $this->world->config('canOneFrameClipOW', false)));\n });\n\n $this->locations[\"Paradox Cave Upper - Left\"]->setRequirements(function ($locations, $items) {\n return $items->canBombThings()\n && ($items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2) && ($items->has('Hookshot')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed())))\n || ($this->world->config('canOWYBA', false) && $items->hasABottle()\n && (($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))\n || $this->world->config('canOneFrameClipOW', false))));\n });\n\n $this->locations[\"Paradox Cave Upper - Right\"]->setRequirements(function ($locations, $items) {\n return $items->canBombThings()\n && ($items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2) && ($items->has('Hookshot')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed())))\n || ($this->world->config('canOWYBA', false) && $items->hasABottle()\n && (($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))\n || $this->world->config('canOneFrameClipOW', false))));\n });\n\n $this->locations[\"Ether Tablet\"]->setRequirements(function ($locations, $items) {\n return $items->has('BookOfMudora')\n && (($this->world->config('mode.weapons') == 'swordless'\n && $items->has('Hammer'))\n || $items->hasSword(2)) && (($items->has('MoonPearl')\n && ($items->has('Hammer')\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots')) || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed())\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()\n && $this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))))\n || $this->world->config('canOneFrameClipOW', false)\n );\n });\n\n $this->locations[\"Spectacle Rock\"]->setRequirements(function ($locations, $items) {\n return ($items->has('MoonPearl')\n && ($items->has('Hammer')\n || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed()) || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots')))) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()\n && $this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots')) ||\n $this->world->config('canOneFrameClipOW', false);\n });\n\n $this->can_enter = function ($locations, $items) {\n return ($items->canLiftDarkRocks()\n && $this->world->getRegion('East Dark World Death Mountain')->canEnter($locations, $items)) || ($this->world->getRegion('West Death Mountain')->canEnter($locations, $items)\n && (\n (($items->has('MoonPearl')\n || ($this->world->config('canOWYBA', false)\n && $items->hasABottle(2))) && ($items->has('Hookshot')\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots')) || ($this->world->config('canSuperSpeed', false)\n && $items->canSpinSpeed()))) \n || ($this->world->config('canMirrorWrap', false)\n && $items->has('MagicMirror')) ||\n $this->world->config('canOneFrameClipOW', false)));\n };\n\n return $this;\n }", "title": "" }, { "docid": "1b1ec7f8611acb96922d66cddf8a7799", "score": "0.537749", "text": "protected function checkCapacity()\n {\n if ($this->shouldIncreaseCapacity()) {\n $this->increaseCapacity();\n } else {\n if ($this->shouldDecreaseCapacity()) {\n $this->decreaseCapacity();\n }\n }\n }", "title": "" }, { "docid": "5f5f011a7962745d08f0d5cca6692767", "score": "0.5377065", "text": "function plunder($capacity, $metal, $crystal, $deuterium)\n{\n //stolen resources\n $steal = array(\n 'metal' => 0,\n 'crystal' => 0,\n 'deuterium' => 0);\n //max resources that can be take\n $metal /= 2;\n $crystal /= 2;\n $deuterium /= 2;\n\n //Fill up to 1/3 of cargo capacity with metal\n $stolen = min($capacity / 3, $metal);\n $steal['metal'] += $stolen;\n $metal -= $stolen;\n $capacity -= $stolen;\n\n //Fill up to half remaining capacity with crystal\n $stolen = min($capacity / 2, $crystal);\n $steal['crystal'] += $stolen;\n $crystal -= $stolen;\n $capacity -= $stolen;\n\n //The rest will be filled with deuterium\n $stolen = min($capacity, $deuterium);\n $steal['deuterium'] += $stolen;\n $deuterium -= $stolen;\n $capacity -= $stolen;\n\n //If there is still capacity available fill half of it with metal\n $stolen = min($capacity / 2, $metal);\n $steal['metal'] += $stolen;\n $metal -= $stolen;\n $capacity -= $stolen;\n\n //Now fill the rest with crystal\n $stolen = min($capacity, $crystal);\n $steal['crystal'] += $stolen;\n $crystal -= $stolen;\n $capacity -= $stolen;\n\n return $steal;\n}", "title": "" }, { "docid": "8625cdc091970fa17de4962e605d4653", "score": "0.53715867", "text": "public function check_requirements();", "title": "" }, { "docid": "5bf3c5423faaf9eb5fda840803d4b603", "score": "0.53606606", "text": "abstract public function isAvailable();", "title": "" }, { "docid": "8d00925d8998db8824a83847477332b5", "score": "0.53565747", "text": "protected function CheckVacancyError()\n\t{\n\t\t$this->CheckError();\n\t\t\n\t\tif (empty($this->add_value['sphere_id']) || !array_key_exists($this->add_value['sphere_id'], $this->GetSpheres()))\n\t\t\t$this->Errors[] = $this->lang['sel_sphere'];\n\t\telse if (empty($this->add_value['specialty']))\n\t\t{\n\t\t $this->Errors[] = $this->lang['sel_specialty'];\n\t\t}\n\t\telse\n\t\t{\n\t\t $spec_id = $this->getSpecialtyByName($this->add_value['specialty']);\n\t\t \n\t\t if ($spec_id)\n\t\t {\n\t\t $this->add_value['specialty_id'] = $spec_id['id'];\n\t\t }\n\t\t else\n\t\t {\n\t\t $alt_name = job_totranslit($this->add_value['specialty']);\n\t\t $this->add_value['specialty_id'] = $this->dbase->Insert('job_specialties', array(\"name\" => $this->add_value['specialty'], \"alt_name\" => $alt_name, \"sphere_id\" => $this->add_value['sphere_id']));\n\t\t }\n\t\t}\n\t\t/*\n\t\tif ($this->add_value['sphere_id'] && (empty($this->add_value['specialty_id']) || !array_key_exists($this->add_value['specialty_id'], $this->GetSpecialties($this->add_value['sphere_id']))))\n\t\t\t$this->Errors[] = $this->lang['sel_specialty'];\n\t\t*/\n\t\t\t\n\t\tif ($this->add_value['sphere_id'] && (empty($this->add_value['specialty_id']) || !array_key_exists($this->add_value['specialty_id'], $this->GetSpecialties($this->add_value['sphere_id']))))\n\t\t{\n\t\t \n\t\t}\n\t\t\n\t\tif (!empty($this->config['vacancy_need_field']))\n\t\t{\n\t\t\tforeach ($this->config['vacancy_need_field'] as $field)\n\t\t\t{\n\t\t\t\tif (empty($this->add_value[$field]))\n\t\t\t\t\t$this->Errors[] = $this->lang['vacancy_error_' .$field];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (empty($this->add_value['company_id']))\n\t\t{\n\t\t\tif (!empty($this->add_value['phone']) && !job_check_phone($this->add_value['phone']))\n\t\t\t\t$this->Errors[] = $this->lang['vacancy_error_phone_invalid'];\n\t\t\t\t\n\t\t\tif (!empty($this->add_value['email']) && !job_check_email($this->add_value['email']))\n\t\t\t\t$this->Errors[] = $this->lang['vacancy_error_email_invalid'];\n\t\t}\n\t}", "title": "" }, { "docid": "b91bdd44db1509684fdc932462f50558", "score": "0.5343005", "text": "protected function _checkProduct(){\n\t\tif(!$this->getProduct()){\n\t\t\tthrow new AW_Core_Exception(\"Can't calculate for unsufficient product\");\n\t\t}\n\t}", "title": "" }, { "docid": "edc1df76c34815b574716c78c585526a", "score": "0.534061", "text": "private static function loadItems()\r\n {\r\n\r\n self::$Inventory[] = StockAccount::GetStockItems();\r\n\r\n self::$loaded = true;\r\n \r\n }", "title": "" }, { "docid": "b8856539193969f8cb35edf67e443317", "score": "0.5331656", "text": "protected function checkCapacity()\n {\n }", "title": "" }, { "docid": "b8856539193969f8cb35edf67e443317", "score": "0.5331656", "text": "protected function checkCapacity()\n {\n }", "title": "" }, { "docid": "b8856539193969f8cb35edf67e443317", "score": "0.5331656", "text": "protected function checkCapacity()\n {\n }", "title": "" }, { "docid": "b194abeebd9d88605713d7ffb0cbb373", "score": "0.5320842", "text": "function checkAvailableSlot($invItem) {\n\t\tfor($i = 11; $i < 29; $i = $i + 3) {\n\t\t\t\n\t\t\tif(!isset($invItem[$i]) || $invItem[$i] == '') {\n\t\t\t\treturn $i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bfcec2c2e91a03c9f68ab288a226a612", "score": "0.53088695", "text": "public function available();", "title": "" }, { "docid": "bfcec2c2e91a03c9f68ab288a226a612", "score": "0.53088695", "text": "public function available();", "title": "" }, { "docid": "d992dd5681418a485afeeadf20f74e06", "score": "0.52941644", "text": "private function isDeducting()\n {\n return in_array($this->getTransactionType(), self::DEDUCTING_TYPES);\n }", "title": "" }, { "docid": "c43cab052693f5d343ed4ba599badd83", "score": "0.5283763", "text": "function tep_assign_equipment_to_order($order_id, $group_id, $equipment_id, $status, $zip4, $user_id, $address_id = '', $flag = '0', $number_of_posts = 1) {\n global $database;\n if (empty($equipment_id))\n return;\n $answer_query = $database->query(\"select install_equipment_id, remove_equipment_id from \" . TABLE_EQUIPMENT_GROUP_ANSWERS . \" where equipment_group_answer_id = '\" . $equipment_id . \"' limit 1\");\n $answer_result = $database->fetch_array($answer_query);\n\n for($i = 0; $i < $number_of_posts; $i++) {\n if ($answer_result['install_equipment_id'] > 0) {\n\n $available_query = $database->query(\"select name from \" . TABLE_EQUIPMENT . \" where equipment_id = '\" . $answer_result['install_equipment_id'] . \"' limit 1\");\n $available_result = $database->fetch_array($available_query);\n\n //Get the latest equipment_id and if it exists we will assign it.\n if (($equipment_item_id = tep_fetch_next_equipment_item_id($answer_result['install_equipment_id'], $zip4, $user_id)) !== false) { //mjp don't check if there is equipment in stock\n $query = $database->query(\"select cost, discount, name from \" . TABLE_EQUIPMENT_GROUPS . \" where equipment_group_id = '\" . $group_id . \"' limit 1\");\n $result = $database->fetch_array($query);\n //$database->query(\"update \" . TABLE_EQUIPMENT_ITEMS . \" set equipment_status_id = '\" . $status . \"' where equipment_item_id = '\" . $equipment_item_id . \"' limit 1\");\n $database->query(\"update \" . TABLE_EQUIPMENT_ITEMS . \" set equipment_status_id = '\" . $status . \"' where equipment_item_id = '\" . $equipment_item_id . \"' limit 1\");\n //$database->query(\"insert into \" . TABLE_EQUIPMENT_TO_ORDERS . \" (equipment_id, equipment_item_id, order_id, equipment_name, equipment_status_id, equipment_group_id, cost, discount, equipment_group_name, equipment_group_answer_id, method_id) values ('\" . $answer_result['install_equipment_id'] . \"', '\" . $equipment_item_id . \"', '\" . $order_id . \"', '\" . addslashes($available_result['name']) . \"', '\" . $status . \"', '\" . $group_id . \"', '\" . $result['cost'] . \"', '\" . $result['discount'] . \"', '\" . addslashes($result['name']) . \"', '\" . $equipment_id . \"', '1')\");\n $database->query(\"insert into \" . TABLE_EQUIPMENT_TO_ORDERS . \" (equipment_id, equipment_item_id, order_id, equipment_name, equipment_status_id, equipment_group_id, cost, discount, equipment_group_name, equipment_group_answer_id, method_id, equipment_item_flag) values ('\" . $answer_result['install_equipment_id'] . \"', '\" . $equipment_item_id . \"', '\" . $order_id . \"', '\" . addslashes($available_result['name']) . \"', '\" . $status . \"', '\" . $group_id . \"', '\" . $result['cost'] . \"', '\" . $result['discount'] . \"', '\" . addslashes($result['name']) . \"', '\" . $equipment_id . \"', '1', '\" . $flag . \"')\");\n //Set the status.\n tep_add_equipment_item_history($equipment_item_id, '1', '', $order_id, $address_id);\n\n $query = $database->query(\"select included_equipment_track_id, current_count from \" . TABLE_INCLUDED_EQUIPMENT_TRACK . \" where equipment_group_id = '\" . $group_id . \"' and address_id = '\" . $address_id . \"' limit 1\");\n $result = $database->fetch_array($query);\n\n if (!empty($result['included_equipment_track_id'])) {\n //$database->query(\"update \" . TABLE_INCLUDED_EQUIPMENT_TRACK . \" set current_count = '\" . ($result['current_count'] + 1) . \"' where included_equipment_track_id = '\" . $result['included_equipment_track'] . \"' limit 1\");\n $database->query(\"update \" . TABLE_INCLUDED_EQUIPMENT_TRACK . \" set current_count = '\" . ($result['current_count'] + 1) . \"' where included_equipment_track_id = '\" . $result['included_equipment_track_id'] . \"' limit 1\");\n } else {\n //$database->query(\"insert into \" . TABLE_INCLUDED_EQUIPMENT_TRACK . \" (current_count, address_id, equipment_group_id) values ('1', '\" . $address_id . \"', '\" . $group_id . \"')\");\n $database->query(\"insert into \" . TABLE_INCLUDED_EQUIPMENT_TRACK . \" (current_count, address_id, equipment_group_id) values ('1', '\" . $address_id . \"', '\" . $group_id . \"')\");\n }\n }\n }\n if ($answer_result['remove_equipment_id'] > 0) {\n $available_query = $database->query(\"select name from \" . TABLE_EQUIPMENT . \" where equipment_id = '\" . $answer_result['remove_equipment_id'] . \"' limit 1\");\n $available_result = $database->fetch_array($available_query);\n\n $query = $database->query(\"select cost, discount, name from \" . TABLE_EQUIPMENT_GROUPS . \" where equipment_group_id = '\" . $group_id . \"' limit 1\");\n $result = $database->fetch_array($query);\n //$database->query(\"update \" . TABLE_EQUIPMENT_ITEMS . \" set equipment_status_id = '\" . $status . \"' where equipment_item_id = '\" . $equipment_item_id . \"' limit 1\");\n //$database->query(\"insert into \" . TABLE_EQUIPMENT_TO_ORDERS . \" (equipment_id, equipment_item_id, order_id, equipment_name, equipment_status_id, equipment_group_id, cost, discount, equipment_group_name, equipment_group_answer_id, method_id) values ('\" . $answer_result['remove_equipment_id'] . \"', '\" . '' . \"', '\" . $order_id . \"', '\" . addslashes($available_result['name']) . \"', '\" . $status . \"', '\" . $group_id . \"', '\" . $result['cost'] . \"', '\" . $result['discount'] . \"', '\" . addslashes($result['name']) . \"', '\" . $equipment_id . \"', '0')\");\n $database->query(\"insert into \" . TABLE_EQUIPMENT_TO_ORDERS . \" (equipment_id, equipment_item_id, order_id, equipment_name, equipment_status_id, equipment_group_id, cost, discount, equipment_group_name, equipment_group_answer_id, method_id, equipment_item_flag) values ('\" . $answer_result['remove_equipment_id'] . \"', '\" . '' . \"', '\" . $order_id . \"', '\" . addslashes($available_result['name']) . \"', '\" . $status . \"', '\" . $group_id . \"', '\" . $result['cost'] . \"', '\" . $result['discount'] . \"', '\" . addslashes($result['name']) . \"', '\" . $equipment_id . \"', '0', '\" . $flag . \"')\");\n }\n if (empty($answer_result['install_equipment_id']) && empty($answer_result['remove_equipment_id'])) {\n $query = $database->query(\"select cost, discount, name from \" . TABLE_EQUIPMENT_GROUPS . \" where equipment_group_id = '\" . $group_id . \"' limit 1\");\n $result = $database->fetch_array($query);\n\n //$database->query(\"insert into \" . TABLE_EQUIPMENT_TO_ORDERS . \" (equipment_id, equipment_item_id, order_id, equipment_name, equipment_status_id, equipment_group_id, cost, discount, equipment_group_name, equipment_group_answer_id, method_id) values ('\" . $equipment_id . \"', '0', '\" . $order_id . \"', '\" . addslashes($available_result['name']) . \"', '0', '\" . $group_id . \"', '\" . $result['cost'] . \"', '0', '\" . addslashes($result['name']) . \"', '\" . $equipment_id . \"', '0')\");\n $database->query(\"insert into \" . TABLE_EQUIPMENT_TO_ORDERS . \" (equipment_id, equipment_item_id, order_id, equipment_name, equipment_status_id, equipment_group_id, cost, discount, equipment_group_name, equipment_group_answer_id, method_id, equipment_item_flag) values ('\" . $equipment_id . \"', '0', '\" . $order_id . \"', '\" . addslashes($available_result['name']) . \"', '0', '\" . $group_id . \"', '\" . $result['cost'] . \"', '0', '\" . addslashes($result['name']) . \"', '\" . $equipment_id . \"', '0', '\" . $flag . \"')\");\n }\n }\n}", "title": "" }, { "docid": "71eaf19e3985c74f6e9c7576fd2029e0", "score": "0.52819693", "text": "private function checkRequirements() {\n foreach ($this->requirements as $requirement) {\n if (! is_plugin_active($requirement[1])) {\n $message = sprintf('Missing plugin: %s', $requirement[0]);\n wp_die($message);\n }\n }\n }", "title": "" }, { "docid": "f1613a8e5284579821b323644afafc71", "score": "0.5281194", "text": "function requestAddItem(){\n\t\t\t$this->setDB(new InventoryDatabase($this->getItem()));\n\t\t\tif($this->getDB()->add()){\n\t\t\t\t$this->getView()->encodeAddingMessage($this->getItem()->getName());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$this->getView()->encodeAddingMessage('err adding');\n\t\t}", "title": "" }, { "docid": "12a92fdec11cc617400c4e74498e1121", "score": "0.52781004", "text": "public function UpdateMissingProducts() {\n\n\t\t$blnResult=false;\n\t\tforeach ($this->cartItems as $objItem) {\n\n\t\t\tif (!$objItem->product || $objItem->product->web != 1) {\n\t\t\t\tYii::app()->user->setFlash('warning',\n\t\t\t\t\tYii::t('cart','The product {product} is no longer available on this site and has been removed from your cart.',\n\t\t\t\t\t\tarray('{product}'=>\"<strong>\".$objItem->description.\"</strong>\")));\n\t\t\t\t$objItem->delete();\n\t\t\t\t$blnResult = true;\n\t\t\t}\n\n\t\t\t//This is a cart that has not originated as a document i.e quote\n\t\t\tif(is_null($this->document_id))\n\t\t\t{\n\n\t\t\t\tif (_xls_get_conf('INVENTORY_OUT_ALLOW_ADD',0) != Product::InventoryAllowBackorders) { //IOW, unless we allow backordering\n\t\t\t\t\tif ($objItem->product->inventoried) {\n\t\t\t\t\t\tif ($objItem->product->Inventory==0) {\n\t\t\t\t\t\t\tYii::app()->user->setFlash('warning',\n\t\t\t\t\t\t\t\tYii::t('cart','The product {product} is now out of stock and has been removed from your cart.',\n\t\t\t\t\t\t\t\t\tarray('{product}'=>\"<strong>\".$objItem->description.\"</strong>\")));\n\t\t\t\t\t\t\t$objItem->delete();\n\t\t\t\t\t\t\t$blnResult = true;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($objItem->qty > $objItem->product->Inventory) {\n\t\t\t\t\t\t\tYii::app()->user->setFlash('warning',\n\t\t\t\t\t\t\t\tYii::t('cart','The product {product} now has less stock available than the amount you requested. Your cart quantity has been reduced to match what is available.',\n\t\t\t\t\t\t\t\t\tarray('{product}'=>\"<strong>\".$objItem->description.\"</strong>\")));\n\t\t\t\t\t\t\t$objItem->qty=$objItem->product->Inventory;\n\t\t\t\t\t\t\t$objItem->save();\n\t\t\t\t\t\t\t$blnResult = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t\tif ($blnResult) $this->UpdateCart();\n\t\treturn $blnResult;\n\t}", "title": "" }, { "docid": "ec745daebb2609c55e703ab0fc006542", "score": "0.5276245", "text": "public function testIsBuyableWithVariants1()\n {\n $sParentArticleId = 2077;\n if ($this->getConfig()->getEdition() === 'EE') {\n $sParentArticleId = 2363;\n }\n\n $this->getConfig()->setConfigParam('blVariantParentBuyable', false);\n $oArticle = oxNew('oxArticleHelper');\n $oArticle->load($sParentArticleId);\n $this->assertFalse($oArticle->isBuyable());\n }", "title": "" }, { "docid": "d405f1f8860a9743b80d9bc5f5a32f44", "score": "0.52759814", "text": "function do_stock_check($items,$i_qty=array(),$return_stock=false)\n\t{\n\t\t$payload=array();\n\t\t$pids=array();\n\t\t/** fixing for test 1 qty **/ \n\t\tif(empty($i_qty))\n\t\t\tforeach($items as $i)\n\t\t\t\t$i_qty[]=1;\n\n\t\t/** assiging the req qty for item stock check **/\t\t\n\t\t$i=0;\n\t\tforeach($items as $item)\n\t\t{\n\t\t\t$qty[$item]=$i_qty[$i];\n\t\t\t$i++;\n\t\t}\n\t\t\t\t\n\t\t/** Getting Products for Items **/ \n\t\t$i=0;\n\t\tforeach($items as $item)\n\t\t{\n\t\t\t$d=array();\n\t\t\tforeach($this->db->query(\"select l.product_id,p.product_name,l.qty,p.is_sourceable as src from m_product_deal_link l join m_product_info p on p.product_id=l.product_id where l.itemid=?\",$item)->result_array() as $p)\n\t\t\t{\n\t\t\t\t$d[]=array(\"pid\"=>$p['product_id'],\"product_name\"=>$p['product_name'],\"qty\"=>$p['qty'],\"status\"=>$p['src'],\"stk\"=>0);\n\t\t\t\t$pids[]=$p['product_id'];\n\t\t\t}\n\t\t\t$payload[$item]=$d;\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t// Check for Stock Available and alloted stock pid \n\t\t$pids=array_unique($pids);\n\t\tforeach($pids as $pid)\n\t\t{\n\t\t\t$available[$pid]=$this->db->query(\"select ifnull(sum(available_qty),0) as s from t_stock_info where product_id=?\",$pid)->row()->s;\n\t\t\t$required[$pid]=$this->db->query(\"select ifnull(sum(o.quantity*l.qty),0) as s from m_product_deal_link l join king_orders o on o.itemid=l.itemid and o.status=0 where l.product_id=?\",$pid)->row()->s;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$i=0;\n\t\tforeach($payload as $iid=>$pay)\n\t\t{\n\t\t\t// Check if stock available for required and requested qty of product \n\t\t\tforeach($pay as $ip=>$item)\n\t\t\t\tif($available[$item['pid']]>=$required[$item['pid']]+($item['qty']*$qty[$iid]))\n\t\t\t\t{\n\t\t\t\t\t$payload[$iid][$ip]['status']=1; // yes stock available\n\t\t\t\t\t$payload[$iid][$ip]['stk']=$available[$item['pid']];\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t \n\t\t\t\t\t\n\t\t\t// check if deal items having stock \t\t\n\t\t\t$all_avail=true;\n\t\t\tforeach($pay as $item)\n\t\t\t\tif($item['status']==0)\n\t\t\t\t\t$all_avail=false;\n\t\t\t\t\t\n\t\t\tif($all_avail)\n\t\t\t\tforeach($pay as $i2=>$item)\n\t\t\t\t{\n\t\t\t\t\t// remove required stock from available stock with required for further iteration checks \n\t\t\t\t\t$available[$item['pid']]-=($item['qty']*$qty[$iid]);\n\t\t\t\t\t$payload[$iid][$i2]['status']=1;\n\t\t\t\t\t//$payload[$iid][$ip]['stk']=$available[$item['pid']];\n\t\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t$p_stock_det = array();\n\t\t// get all item ids for which stock available \n\t\t$stock_avail=array();\n\t\tforeach($payload as $iid=>$pay)\n\t\t{\n\t\t\t$all_avail=true;\n\t\t\tforeach($pay as $item)\n\t\t\t\tif($item['status']==0)\n\t\t\t\t\t$all_avail=false;\n\t\t\tif($all_avail)\n\t\t\t{\n\t\t\t\t$stock_avail[]=$iid;\n\t\t\t\t$p_stock_det[$iid]=array();\n\t\t\t}\n\t\t}\n\t \n\t\tif($return_stock)\n\t\t\treturn $payload;\n\t\telse\n\t\t\treturn $stock_avail;\n\t}", "title": "" }, { "docid": "b56b480f65486041299bccdc0505c798", "score": "0.5265339", "text": "public\n function syncInventoryPriority()\n {\n\n // get the items simply by time stamp of today\n $daysback_options = explode(',', $this->option('sync_inventory_warhsname'))[3];\n $daysback = intval(!empty($daysback_options) ? $daysback_options : 1); // change days back to get inventory of prev days\n $stamp = mktime(1 - ($daysback * 24), 0, 0);\n $bod = date(DATE_ATOM, $stamp);\n $url_addition = '('. rawurlencode('WARHSTRANSDATE ge ' . $bod . ' or PURTRANSDATE ge ' . $bod . ' or SALETRANSDATE ge ' . $bod) . ')';\n if ($this->option('variation_field')) {\n // $url_addition .= ' and ' . $this->option( 'variation_field' ) . ' eq \\'\\' ';\n }\n $option_filed = explode(',', $this->option('sync_inventory_warhsname'))[2];\n $data['select'] = (!empty($option_filed) ? $option_filed . ',PARTNAME' : 'PARTNAME');\n\n $wh_name = explode(',', $this->option('sync_inventory_warhsname'))[0];\n $status = explode(',', $this->option('sync_inventory_warhsname'))[4];\n if (!empty($wh_name)) {\n if (!empty($status)) {\n $expand = '$expand=LOGCOUNTERS_SUBFORM,PARTBALANCE_SUBFORM($filter=WARHSNAME eq \\'' . $wh_name . '\\' and CUSTNAME eq \\'' . $status . '\\')';\n\n } else {\n $expand = '$expand=LOGCOUNTERS_SUBFORM,PARTBALANCE_SUBFORM($filter=WARHSNAME eq \\'' . $wh_name . '\\')';\n }\n } else if (!empty($status)) {\n $expand = '$expand=LOGCOUNTERS_SUBFORM,PARTBALANCE_SUBFORM($filter=CUSTNAME eq \\'' . $status . '\\')';\n } else {\n $expand = '$expand=LOGCOUNTERS_SUBFORM,PARTBALANCE_SUBFORM';\n }\n $data['expand'] = $expand;\n\t $data = apply_filters('simply_syncInventoryPriority_data', $data);\n $response = $this->makeRequest('GET', 'LOGPART?$select='.$data['select'].'&$filter='.$url_addition.' and INVFLAG eq \\'Y\\' &' . $data['expand'], [], $this->option('log_inventory_priority', false));\n // check response status // check response status\n if ($response['status']) {\n $data = json_decode($response['body_raw'], true);\n foreach ($data['value'] as $item) {\n // if product exsits, update\n $field = (!empty($option_filed) ? $option_filed : 'PARTNAME');\n $args = array(\n 'post_type' => array('product', 'product_variation'),\n 'meta_query' => array(\n array(\n 'key' => '_sku',\n 'value' => $item[$field]\n )\n )\n );\n $my_query = new \\WP_Query($args);\n if ($my_query->have_posts()) {\n while ($my_query->have_posts()) {\n $my_query->the_post();\n $product_id = get_the_ID();\n }\n } else {\n $product_id = 0;\n }\n //if ($id = wc_get_product_id_by_sku($item['PARTNAME'])) {\n if (!$product_id == 0) {\n // update_post_meta($product_id, '_sku', $item['PARTNAME']);\n // get the stock by part availability\n $stock = $item['LOGCOUNTERS_SUBFORM'][0]['DIFF'];\n\n // get the stock by specific warehouse\n $wh_name = explode(',', $this->option('sync_inventory_warhsname'))[0];\n if (!empty($wh_name)) {\n $stock = 0;\n }\n $foo = $this->option('sync_inventory_warhsname');\n $foo2 = explode(',', $this->option('sync_inventory_warhsname'))[1];\n $is_deduct_order = explode(',', $this->option('sync_inventory_warhsname'))[1] == 'ORDER';\n $orders = $item['LOGCOUNTERS_SUBFORM'][0]['ORDERS'];\n if(!empty($wh_name)) {\n foreach ($item['PARTBALANCE_SUBFORM'] as $wh_stock) {\n $stock += $wh_stock['TBALANCE'] > 0 ? $wh_stock['TBALANCE'] : 0; // stock\n }\n }\n if ($is_deduct_order) {\n $stock = $stock - $orders > 0 ? $stock - $orders : 0; // stock - orders\n }\n $statuses = explode(',', $this->option('sync_inventory_warhsname'))[4];\n if (!empty($statuses)) {\n $stock -= $this->get_items_total_by_status($product_id);\n $item['order_status_qty'] = $this->get_items_total_by_status($product_id);\n }\n if($item['PARTNAME']=='8511'){\n $foo = 'haaa';\n }\n $item['stock'] = $stock;\n $item = apply_filters('simply_sync_inventory_priority', $item);\n $stock = $item['stock'];\n update_post_meta($product_id, '_stock', $stock);\n // set stock status\n if (intval($stock) > 0) {\n // update_post_meta($product_id, '_stock_status', 'instock');\n $stock_status = 'instock';\n } else {\n // update_post_meta($product_id, '_stock_status', 'outofstock');\n $stock_status = 'outofstock';\n }\n //$variation = wc_get_product($product_id);\n //$variation->set_stock_status($stock_status);\n $product = wc_get_product($product_id);\n if ($product->post_type == 'product_variation') {\n $var = new \\WC_Product_Variation($product_id);\n $var->set_manage_stock(true);\n $var->save();\n }\n if ($product->post_type == 'product') {\n $product->set_manage_stock(true);\n }\n $product->save();\n }\n // add filter here\n if (function_exists('simply_code_after_sync_inventory'))\n {\n simply_code_after_sync_inventory($product_id,$item);\n }\n }\n // add timestamp\n $this->updateOption('inventory_priority_update', time());\n } else {\n /**\n * t149\n */\n $this->sendEmailError(\n $this->option('email_error_sync_inventory_priority'),\n 'Error Sync Inventory Priority',\n $response['body']\n );\n }\n }", "title": "" }, { "docid": "e7ef6c57332362b56e4299d65e2bf2d3", "score": "0.5262314", "text": "function removeInventory(){}", "title": "" }, { "docid": "0f3a84dcb6492d09e2f7f1a18335dc5c", "score": "0.52550423", "text": "abstract protected function sync_inventory_changes();", "title": "" }, { "docid": "9270440f51c791fc7f84bab811eb3b27", "score": "0.5248117", "text": "public function sell()\n {\n $count = $this->vendor->count;\n if ($count <= 0) {\n echo '对不起,无货了!';\n } else {\n echo '亲,有货哦,请稍等!';\n }\n }", "title": "" }, { "docid": "bebf7fcc95ed253b72f56bf679df50ff", "score": "0.52417505", "text": "function CheckFreeRooms($firstNight, $lastNight, $roomQty, $category_rooms, $conn, $prefix) {\n\n $rooms_in_booking = array();\n $free_rooms = array();\n $rooms_to_check = array();\n\n $sql = \"SELECT * FROM \" . $prefix . \"apb_availability\";\n $result = $conn->query($sql);\n\n if ($result->num_rows > 0) {\n\n while($row = $result->fetch_assoc()) {\n\n if (!in_array($row[\"unit_id\"], $rooms_in_booking)) {\n $rooms_in_booking[] = $row[\"unit_id\"];\n }\n\n $calendar[] = $row;\n\n }\n\n }\n\n foreach ($category_rooms as &$room) {\n\n if (!in_array($room, $rooms_in_booking)) {\n\n $free_rooms[] = $room;\n\n // if (count($free_rooms) == $roomQty) {\n // return $free_rooms;\n // }\n\n } else {\n\n $rooms_to_check[] = $room;\n\n }\n\n }\n\n\t$firstD = explode(\"-\", $firstNight);\n\t$firstD_year = $firstD[0];\n\t$firstD_month = $firstD[1];\n\t$firstD_day = $firstD[2];\n\n\t$lastD = explode(\"-\", $lastNight);\n\t$lastD_year = $lastD[0];\n\t$lastD_month = $lastD[1];\n\t$lastD_day = $lastD[2];\n\n\t$date1 = new DateTime($firstNight);\n\t$date2 = new DateTime($lastNight);\n\n\t$diff = $date2->diff($date1)->format(\"%a\");\n\n //Loop for the rooms that should be checked\n foreach ($rooms_to_check as &$room_ch) {\n\n $new_firstD_day = \"\";\n $new_firstD_month = \"\";\n $new_firstD_year = \"\";\n\n $j=0;\n $room_status = \"free\";\n\n //Loop for all records in calendar\n for ($j = 0; $j < count($calendar); $j++) {\n\n //Same room under check with the room_id in calendar\n if($calendar[$j][\"unit_id\"] == $room_ch && $calendar[$j][\"year\"] == $firstD_year && $calendar[$j][\"month\"] == $firstD_month){\n\n $room_status = \"to_update\";\n\n //Check if selected dates exist in bookings table\n $i=0;\n $k=$diff+1;\n while($i<$diff+1) {\n\n //Dates excide months days (e.g. 28/12-2/1)\n if ($firstD_day+$i == cal_days_in_month (CAL_GREGORIAN, $firstD_month, $firstD_year)) {\n $new_firstD_day =1;\n if ($firstD_month == 12) {\n $new_firstD_month = 1;\n $new_firstD_year = $firstD_year + 1;\n } else {\n $new_firstD_month = $firstD_month + 1;\n $new_firstD_year = $firstD_year;\n\n }\n\n //Continue checks on next month\n break;\n\n }\n\n $ch_day = \"d\" . ($firstD_day + $i);\n \t\t\tif ($calendar[$j][$ch_day] != \"2\") {\n \t\t\t\t$room_status = \"booked\";\n \t\t\t}\n\n \t\t\t$i++;\n $k--;\n\n \t\t }\n\n \t}\n\n }\n\n //Continue checking on next month\n if ($new_firstD_day == \"1\") {\n\n $m=0;\n for ($m = 0; $m < count($calendar); $m++) {\n\n if($calendar[$m][\"unit_id\"] == $room_ch && $calendar[$m][\"year\"] == $new_firstD_year && $calendar[$m][\"month\"] == $new_firstD_month){\n $room_status = \"to_update\";\n $l=0;\n\n while($l<$diff+1) {\n $ch_day = \"d\" . ($new_firstD_day + $l);\n\n \t\t\tif ($calendar[$m][$ch_day] != \"2\") {\n \t\t\t\t$room_status = \"booked\";\n \t\t\t}\n \t\t\t$l++;\n \t\t }\n\n }\n\n }\n\n }\n\n if ($firstD_month != $lastD_month) {\n\n for ($p = 0; $p < count($calendar); $p++) {\n\n if($calendar[$p][\"unit_id\"] == $room_ch && $calendar[$p][\"year\"] == $lastD_year && $calendar[$p][\"month\"] == $lastD_month){\n\n $room_status = \"to_update\";\n\n for ($n=0; $n < $lastD_day; $n++) {\n\n $ch_day = \"d\" . ($n + 1);\n \t\t\tif ($calendar[$p][$ch_day] != \"2\") {\n \t\t\t\t$room_status = \"booked\";\n \t\t\t}\n\n }\n\n }\n\n }\n\n }\n\n if ($room_status == \"free\") {\n $free_rooms[] = $room_ch;\n if (count($free_rooms) == $roomQty) {\n return $free_rooms;\n }\n } elseif ($room_status == \"to_update\") {\n $par_free_rooms[] = $room_ch;\n }\n\n }\n\n\treturn array($free_rooms,$par_free_rooms);\n\n}", "title": "" }, { "docid": "7d81455c57ee9db073f552746b4d5cf9", "score": "0.5234799", "text": "private function checkRequirementsOrDie() {\r\n if (!Environment::i()->isRequirementsFulfilled()) {\r\n die('Some requisites unsatisfied. Check it at docs.mprf.io/requirements');\r\n }\r\n }", "title": "" }, { "docid": "79661dbceca3257e6e4af2054ac8d1b5", "score": "0.5233636", "text": "function equipItems($instance, &$actor)\n\t{\n\t\t$sql = <<<SQL\n\t\t\tselect eq_type from actor_item ai\n\t\t\tleft join item i on i.inum = ai.inum\n\t\t\twhere instance = ? and eq_type is not null\n\t\t\tand (ai.durability > 0 or ai.durability is null)\nSQL;\n\t\t$query = $this->db->query($sql, array($instance));\n\t\tif($query->num_rows() <= 0) return false;\n\t\t$item = $query->row_array();\n\t\t$where = '';\n\t\t$msg = array();\n\t\t\n\t\tswitch($item['eq_type'])\n\t\t{\n\t\t\t# weapons\n\t\t\tcase '1H':\n\t\t\tcase '2H':\n\t\t\t{\n\t\t\t\t$where = \"where (eq_slot = 'MH' or eq_slot = 'OH')\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t# armor\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\t$where = \"where eq_slot = '{$item['eq_type']}'\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql = <<<SQL\n\t\t\tselect eq_slot, eq_type from actor_item ii\n\t\t\tjoin item i on i.inum = ii.inum\n\t\t\t{$where}\n\t\t\tand actor = ?\nSQL;\n\t\t$query = $this->db->query($sql, array($actor['actor']));\n\t\t$eq = $query->result_array();\n\t\t$cnt = count($eq);\n\t\t$slot = '';\n\t\t\n\t\tswitch($item['eq_type'])\n\t\t{\n\t\t\t# weapons\n\t\t\tcase '1H':\n\t\t\t{\n\t\t\t\tif($cnt >= 2) return false;\n\t\t\t\t$slot = 'MH';\n\t\t\t\t\n\t\t\t\tforeach($eq as $e)\n\t\t\t\t{\n\t\t\t\t\tif($e['eq_type'] == '2H')\n\t\t\t\t\t\treturn array(\"You don't have a free hand.\");\n\t\t\t\t\tif($e['eq_slot'] == 'MH') $slot = 'OH';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase '2H':\n\t\t\t{\n\t\t\t\tif($cnt >= 1) return array(\"You don't have a free hand.\");\n\t\t\t\t$slot = 'MH';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t# armor\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tif($cnt >= 1) return array(\n\t\t\t\t\t\"You are already wearing armor on that part of your body.\");\n\t\t\t\t$slot = $item['eq_type'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t# item equip trigger\n\t\t$sql = <<<SQL\n\t\t\tselect abbrev from actor_item ai\n\t\t\t\tjoin item i on ai.inum = i.inum\n\t\t\t\tjoin item_trigger it on ai.inum = it.inum\n\t\t\t\twhere ai.instance = ? and eq_slot is null and it.equip = b'1'\n\t\t\tunion\n\t\t\tselect abbrev from actor_item ai\n\t\t\t\tjoin item_class ic on ai.inum = ic.inum\n\t\t\t\tjoin class_item_trigger cit on ic.iclass = cit.iclass\n\t\t\t\twhere ai.instance = ? and eq_slot is null and cit.equip = b'1'\nSQL;\n\t\t$query = $this->db->query($sql, array($instance, $instance));\n\t\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\t$r = $query->result_array();\n\t\t\t\n\t\t\tforeach($r as $row)\n\t\t\t{\n\t\t\t\t$which = \"i_{$row['abbrev']}\";\t\t\n\t\t\t\t$this->ci->load->model(\"items/{$which}\");\n\t\t\t\t$res = call_user_func(array($this->ci->$which, 'equip'),\n\t\t\t\t\t&$actor, &$instance);\n\t\t\t\tforeach($res as $r) $msg[] = $r;\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($instance == 0) return $msg;\n\t\t$sql = <<<SQL\n\t\t\tupdate actor_item set eq_slot = ?\n\t\t\twhere instance = ? and actor = ?\nSQL;\n\t\t$this->db->query($sql, array($slot, $instance, $actor['actor']));\n\t\t\n\t\tif($this->db->affected_rows() <= 0)\n\t\t{\n\t\t\t$msg[] = 'Error equiping item.';\n\t\t\treturn $msg;\n\t\t}\n\t\t\n\t\t$msg[] = 'Item equipped.';\n\t\t$ret = $this->spendAP(1, &$actor);\n\t\tforeach($ret as $r) $msg[] = $r;\t\t\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "4b3d77794eb334879e430e17e8680518", "score": "0.5222643", "text": "private function hasEnoughNonGiveaways()\n {\n return $this->getCartNonGiveawayProductsAmounts() >= $this->getNonGiveawaysPerCart();\n }", "title": "" }, { "docid": "6f83cafc6cc6f1edbf2493da957268b9", "score": "0.5188462", "text": "public function testCanGetItem(): void\n {\n $item1 = new TestItem('Item 1', 2500, 2500, 20, 2000, Rotation::BestFit);\n $item2 = new TestItem('Item 2', 2500, 2500, 20, 2000, Rotation::BestFit);\n\n $itemList = new ItemList();\n $itemList->insert($item1);\n $itemList->insert($item2);\n\n $exception = new NoBoxesAvailableException('Just testing...', $itemList);\n self::assertCount(2, $exception->getAffectedItems());\n self::assertEquals($item1, $exception->getAffectedItems()->extract());\n self::assertEquals($item2, $exception->getAffectedItems()->extract());\n }", "title": "" }, { "docid": "48a5917e8c8fb320f85c8a6d2a6aa75c", "score": "0.518522", "text": "public function testGetInventory()\n {\n // initialize the API client\n $config = (new Configuration())->setHost('http://petstore.swagger.io/v2');\n $api_client = new ApiClient($config);\n $store_api = new StoreApi($api_client);\n // get inventory\n $get_response = $store_api->getInventory();\n\n $this->assertInternalType(\"array\", $get_response);\n $this->assertInternalType(\"int\", $get_response['available']);\n }", "title": "" }, { "docid": "67afc9707f0e742a7eca278e224003df", "score": "0.5178743", "text": "function install_handle_storage($virt){\n\n\tglobal $args, $globals, $ostemplates, $oses, $distro;\n\t\n\t// Is there an LV ?\n\tif(!empty($globals['lv'])){\n\t\t\n\t\t// Search the LV Group\n\t\texec($globals['com']['vgdisplay'].' '.$globals['lv'].' >> /dev/null 2>&1', $vgout, $vgret);\n\t\t\n\t\tif($vgret != 0){\n\t\t\techo \"\tERROR : Logical Volume Group NOT FOUND \\n Please specify the correct Logical Volume Group and then RE-Run this installer \\n\";\n\t\t\tshell_exec('echo \"ERROR : Logical Volume Group NOT FOUND \\n Please specify the correct Logical Volume Group and then RE-Run this installer\" >> '.$args['log'].' 2>&1');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// DO YOU have enough space IN IT\n\t\texec($globals['com']['vgdisplay'].' -C --nosuffix -o Free --units K \"'.$globals['lv'].'\" 2>/dev/null', $volgr);\n\t\t\n\t\tif(empty($volgr[1])){\n\t\t\techo \"\tERROR : Logical Volume Group - '\".$globals['lv'].\"' is FULL\\n Please specify a Logical Volume Group which has enough space to create VPS(s) \\n\";\n\t\t\tshell_exec('echo \"ERROR : Logical Volume Group - \"'.$globals['lv'].'\" is FULL\\n Please specify a Logical Volume Group which has enough space to create VPS(s)\" >> '.$args['log'].' 2>&1');\n\t\t\treturn false;\n\t\t}\n\t\n\t// No storage\t\n\t}else{\n\t\n\t\techo \"\t\t- You have not defined any storage ! Please add a Storage once you visit the Admin Panel.\\n\";\n\t\tshell_exec('echo \"\t\t- You have not defined any storage ! Please add a Storage once you visit the Admin Panel.\" >> '.$args['log'].' 2>&1');\n\t\t\n\t}\n\t\n\treturn true;\n\t\n}", "title": "" }, { "docid": "594f76f66f98f92c74f9ff0e14e2a7f3", "score": "0.51769733", "text": "public function canPurchase() {\n\t\treturn $this->getInternalProduct()->canPurchase($this->Quantity);\n\t}", "title": "" }, { "docid": "3aa4b02c6d428aef1e0fc5e11eba0b38", "score": "0.5172763", "text": "function orderInventory(){}", "title": "" }, { "docid": "5c7949325200b9b9bfe49aad06e8ad2c", "score": "0.51677805", "text": "function check_requirements()\n\t{\n\t\tif (!$this->obj_customer->verify_id())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested customer (\". $this->obj_customer->id .\") does not exist - possibly the customer has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\t// verify the refund (if specified)\n\t\tif ($this->obj_refund->id)\n\t\t{\n\t\t\tif (!$this->obj_refund->verify_id())\n\t\t\t{\n\t\t\t\tlog_write(\"error\", \"page_output\", \"The selected refund item does not exist!\");\n\t\t\t}\n\t\t}\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "6ca5551e200e2dd03765e0d07d8a5d55", "score": "0.51620233", "text": "function makedropdown($code, $warehouse, $lot_id, $lot_ship)\n {\n\n global $tbl_coop_item;\n\n $db_conn = mysql_connect('mysql.coopcoffeesbeans.com', 'greenbeans3', 'annh401');\n mysql_select_db('cbeans', $db_conn);\n\n if (!$db_conn)\n {\n echo 'Error: Could not connect to database. Please try again later.';\n exit;\n }\n\n#\n# get production items to create drop down list\n# for all products by ware house and item_code\n#\n\n $query = \"SELECT item_id, item_code, lot_ship, warehouse\n FROM $tbl_coop_item\n WHERE warehouse = '$warehouse' AND item_code = '$code'\";\n /* \n mysql_select_db($tbl_coop_item);\n $ddresults = mysql_query($query, $db_conn);\n\n if (!$ddresults)\n { echo \"Select failed for $tbl_coop_item\"; }\n\n $ddrow = mysql_fetch_array($ddresults);\n $ddnum_results = mysql_num_rows($ddresults); \n \n \n for ($i=0; $i <$ddnum_results; $i++)\n { \n \n \n $test_value = remaining_inventory($ddrow['item_code'], $ddrow['lot_ship'],$ddrow['warehouse']);\n $ddrow = mysql_fetch_array($ddresults); \n \n # echo $test_value;\n \n } \n*/ \n mysql_select_db($tbl_coop_item);\n $ddresults = mysql_query($query, $db_conn); \n \n \n \n $ddrow = mysql_fetch_array($ddresults);\n $ddnum_results = mysql_num_rows($ddresults); \n \n\n#\n# build drop down list for lot item\n# NOTE: item_id is lot_ship, I know a bit confusing...\n#\n echo \"<select name='lotship\".$lot_id.\"'>\";\n\n for ($i=0; $i <$ddnum_results; $i++)\n { \n \n \n $test_value = remaining_inventory($ddrow['item_code'], $ddrow['lot_ship'],$ddrow['warehouse']);\n \n \n # echo $test_value;\n\n\n \n echo \"<option value='\".$ddrow['item_id'];\n echo \"'\";\n if ($lot_ship == $ddrow['item_id'] )\n {\n echo ' selected ';\n }\n echo ' > '.$ddrow['item_code'].' / '.$ddrow['lot_ship'].' / '.$ddrow['warehouse'].' / '.$test_value.' ';\n\n $ddrow = mysql_fetch_array($ddresults);\n # $ddnum_results = mysql_num_rows($ddresults);\n\n }\n echo \"</select>\";\n\n }", "title": "" }, { "docid": "2dd71f4ae8c45770f9625eafcf72dd9f", "score": "0.51579297", "text": "function is_available() {\n //by default, make the report available,\n //override in child class if necessary to restrict\n return true;\n }", "title": "" }, { "docid": "e492b7953f95d35158b366e7cd44fb26", "score": "0.5157811", "text": "public function benchHasExistingItemsBulk()\n {\n $this->storage->hasItems(array_keys($this->warmItems));\n }", "title": "" }, { "docid": "b964122517db385b12c95ca920324505", "score": "0.5154327", "text": "public function benchHasMissingItemsSingle()\n {\n foreach ($this->coldItems as $k => $_) {\n $this->storage->hasItem($k);\n }\n }", "title": "" }, { "docid": "c10387c75dc80be2ca28cf1bed8799c5", "score": "0.51527745", "text": "function isBomAndAvailable($product_code){\r\r\n \r\r\n $res = getProductBOM($product_code);\r\r\n $numboms=array();\r\r\n if (!empty($res)){// it is a BOM\r\r\n //echo dumper($res); \r\r\n // check if bom items and qty are instock\r\r\n \r\r\n foreach($res as $item){\r\r\n $res2 = do_query('select qty_instock from products where product_code=\"'.$item['item_product_code'].'\" and `status` != \"inactive\" ');\r\r\n // echo dumper($res2);\r\r\n if ($res2 ) {\r\r\n \r\r\n if($item['item_qty'] > 0){\r\r\n \r\r\n if($res2[0]['qty_instock'] != 0 ){\r\r\n $numboms[] = (int) ($res2[0]['qty_instock'] / $item['item_qty']) ;\r\r\n } else {\r\r\n $numboms[] = 0;\r\r\n } \r\r\n //echo dumper($numboms);\r\r\n \r\r\n } \r\r\n \r\r\n \r\r\n }\r\r\n }\r\r\n //echo dumper($numboms);\r\r\n return array('max_available'=> min($numboms));\r\r\n } else {// it is not a bom\r\r\n return false;\r\r\n }\r\r\n}", "title": "" }, { "docid": "a1184cc32c4624326283aaf58920f6ed", "score": "0.5150853", "text": "function _get_woocommerce_inventory($skus)\n{\n $log = \"\";\n // get woocommerce inventory for the corresponding items\n $woocommerce_inventory = array();\n foreach ($skus as $sku => $quantity) {\n $product = _woocommerce_get_product_by_sku($sku);\n if ($product) {\n $sku = strval($sku);\n $inventory = intval($product->get_stock_quantity());\n $woocommerce_inventory[$sku] = $inventory;\n } else {\n if ($quantity > 0) {\n $log .= \"<b>Notice:</b> Product $sku found in bLoyal but not in Woocommerce - bLoyal quantity $quantity\\n\";\n }\n }\n }\n return array(\"woocommerce_inventory\" => $woocommerce_inventory, \"log\" => $log);\n}", "title": "" }, { "docid": "75fa1b7a40b9bbbb6dd3cb39a8aa04b7", "score": "0.5144897", "text": "function tim_packstation_is_packstation_available() {\r\n foreach( WC()->cart->get_cart() as $cart_item ){\r\n /*echo '<pre>';\r\n var_dump($cart_item);*/\r\n if( empty( $cart_item[\"variation_id\"] ) ){\r\n // if single product use single product id for packstation check\r\n $product_id = $cart_item['product_id'];\r\n $disable_packstation = get_post_meta( $product_id, '_disable_packstation', true );\r\n }else{\r\n // if variable product use variable product id for packstation check\r\n $product_id = $cart_item['variation_id'];\r\n $disable_packstation = get_post_meta( $product_id, '_disable_packstation', true );\r\n }\r\n\r\n if( $disable_packstation == 'yes' ){\r\n\t\t\treturn false;\r\n\t\t}\r\n }\r\n\treturn true;\r\n}", "title": "" }, { "docid": "ef24a2f92c95b16de58f519f608b716b", "score": "0.5143984", "text": "public function test_conversion_loads_inventory_items()\n {\n $conversion = new Conversions($this->generateItems(), $this->generateConfig());\n\n $this->assertCount(1, $conversion->items);\n }", "title": "" }, { "docid": "c6878aeb17857738873b39074b63c0fe", "score": "0.5131888", "text": "public function isAvailable() {\n $isAvailable = false;\n $Sync = ShoprocketCommon::getTableName('Sync');\n $sql = \"SELECT count(*) from $Sync where product_id=$this->id\";\n $found = $this->_db->get_var($sql);\n if($found) {\n $sql = \"SELECT sum(quantity) from $Sync where track=1 and product_id=$this->id\";\n $qty = $this->_db->get_var($sql);\n if(is_numeric($qty) && $qty > 0) {\n $isAvailable = true;\n }\n else {\n $sql = \"SELECT count(*) as c from $Sync where track=0 and product_id=$this->id\";\n $notTracked = $this->_db->get_var($sql);\n if($notTracked > 0) {\n $isAvailable = true;\n }\n }\n }\n else {\n // Sync table hasn't been refreshed so ignore Sync tracking for this product\n $isAvailable = true;\n }\n return $isAvailable;\n }", "title": "" }, { "docid": "c0ed4543c75be27abb0dde0700b38c59", "score": "0.5126081", "text": "function isAvailable();", "title": "" }, { "docid": "4ce221a53394f7c5a0699570136ac930", "score": "0.51238257", "text": "public function checkAvailability() {\n if (!($this->user->verify())) {\n include 'view/page/landing_page.php';\n } else {\n echo \"<h3>Check availability debug</h3>\";\n $restaurantId = intval($_POST['restaurant_id']);\n $date = $_POST['date'];\n $time = str_replace(\"%3A\", \":\", $_POST['time']);\n $partySize = $_POST['party_size'];\n\n if (isset($_POST['debug']) && strcmp($_POST['debug'], \"true\") == 0) {\n $debug = 1;\n } else {\n $debug = NIL;\n }\n\n echo \"<p><strong>Parameters</strong>: restaurant_id: $restaurantId, date: $date, time: $time, party_size: $partySize</p>\";\n\n $reservation = Reservation::queryReservation($restaurantId, $date, $time, $partySize, $debug);\n\n echo \"<h4>If a reservation is available, it will be shown here, otherwise the result will be empty:</h4>\";\n echo \"<p><pre>\";\n echo var_dump($reservation);\n echo \"</pre></p>\";\n\n echo \"<p><a href='index.php?controller=AdminReservations&action=invoke'>Return to Administrator Portal</a></p>\";\n }\n }", "title": "" }, { "docid": "90e5841f42225b026f08804665e39faf", "score": "0.51211303", "text": "protected function processIncrease()\n {\n $this->increaseInventory();\n }", "title": "" }, { "docid": "e68b32e692eed61ab233ceac4624e78f", "score": "0.5118586", "text": "public static function available();", "title": "" }, { "docid": "a7db78f618ed05bb2a7d1ab3f1c28f47", "score": "0.5116698", "text": "public function hasEnoughInventory($Qty)\n\t{\n\t\t$return = ($this->_invItems[$this->getConfigData('INVENTORY_STATUS_AVAILABLE')]['total'] >= $Qty);\n\t\tif ($return === false && $this->getData('use_serials') == 1){\n\t\t\t$return = sizeof($this->_invItems[$this->getConfigData('INVENTORY_STATUS_AVAILABLE')]['serials']) >= $Qty;\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "8412c22530a89912c1e312ea813d4bec", "score": "0.5105507", "text": "protected function processDecrease()\n {\n $this->decreaseInventory();\n }", "title": "" }, { "docid": "0939eb6274a2d8e0bf5d5c928a8678da", "score": "0.51050574", "text": "function plugin_room_check_prerequisites()\n{\n if (version_compare(GLPI_VERSION, '9.3.1', '>=') && version_compare(GLPI_VERSION, '9.4', '<')) {\n return true;\n } else {\n _e('This plugin requires GLPI >= 9.3.1 && < 9.4', 'room');\n return false;\n }\n}", "title": "" }, { "docid": "2399872a2adc34f54c25e104e8b25f4c", "score": "0.50932926", "text": "private function isAvailable():bool\n {\n if((strpos($_POST['hidden_event_name'], 'Night')) !== false || (strpos($_POST['hidden_event_name'], 'Beer')) !== false || (strpos($_POST['hidden_event_name'], 'Cocktail')) !== false || (strpos($_POST['hidden_event_name'], 'Hookah')) !== false)\n if((int)$_POST['hidden_amount'] - (((int)$_POST['hidden_family_amount'] * 4)) + (int)$_POST['hidden_regular_amount'] >= 0)\n return true;\n else if((strpos($_POST['hidden_event_name'], 'Restaurant')) !== false)\n\t\t\tif((int)$_POST['hidden_amount'] - (((int)$_POST['no_of_adults'] * 10)) + (int)$_POST['no_of_kids'] >= 0)\n return true;\n\n return false;\n }", "title": "" }, { "docid": "04830ea6bce936ffa1996156828cf923", "score": "0.50879496", "text": "public function isBuyable() {\n return !empty($this->cdbaby) || !empty($this->amazon) || !empty($this->itunes);\n }", "title": "" }, { "docid": "4cb806ed6a0e0175e205c6746bc673c3", "score": "0.5086001", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM support_tickets WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested support ticket (\". $this->id .\") does not exist - possibly the ticket has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "6a81d7b53106bb7a330d76a561add759", "score": "0.5075716", "text": "private function checkDependencies(){\n\n }", "title": "" }, { "docid": "20ff753ed015142d7746036d73885680", "score": "0.5074722", "text": "function setUnavailableItemsAsHiddenInMagento() {\n\n $items_to_be_set_with_stock0 = $this->getDifferenceBetweenCSVandMagentoDB();\n\n if ($items_to_be_set_with_stock0) {\n foreach ($items_to_be_set_with_stock0 as $item_unavaillable) {\n $product = Mage::getModel('catalog/product');\n $id = Mage::getModel('catalog/product')->getResource()->getIdBySku($item_unavaillable);\n if ($id) {\n $stock_item = Mage::getModel('cataloginventory/stock_item')->loadByProduct($id);\n $stock_item->setData('is_in_stock', 0);\n $stock_item->setData('manage_stock', 0);\n try {\n $stock_item->save();\n }\n catch (Exception $ex) {\n echo \"{$ex}\";\n }\n }\n }\n if ($config['script_verbose']) {\n echo \"\\n\" . count($items_to_be_set_with_stock0) . \" Items have been set as not_in_stock (is_in_stock = 0) \\n\";\n }\n }\n }", "title": "" }, { "docid": "185ef1cdc147c3486fd463793193481c", "score": "0.505914", "text": "public function checkUpsell(Varien_Event_Observer $observer){\n\t\tif(!self::isModuleEnabled()){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$upsell = $observer->getEvent()->getCollection();\n\t\t$ids =array();\n\t\tforeach($upsell as $item){\n\t\t\t$ids[]=$item->getId();\n\t\t}\n\t\t$collection = Mage::getModel('country/product') ->getCollection()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->addAttributeToFilter('active', 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->addAttributeToFilter('product_id', array('in' => $ids));\n\t\tif($collection->length >0){\n\t\t\t$country = Mage::getSingleton('core/session')->getRazorphynCountry;\n\t\t\tforeach($collection as $res){\n\t\t\t\tif(($res->allowed==0 && strpos($countries, $country) !== false) || ($res->allowed==1 && strpos($countries, $country) === false)){\n\t\t\t\t\t$upsell->removeItemByKey($res->product_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $upsell;\n\t }", "title": "" }, { "docid": "52c5b6376a5269b28a814ee2b7f85f2a", "score": "0.5057376", "text": "public function is_available() {\n\t\treturn parent::is_available() &&\n\t\t\t$this->is_applicable();\n\t}", "title": "" }, { "docid": "42cdad8cb0efadac71e09fe7a70bdb07", "score": "0.5054309", "text": "public function hasAutoRepair(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "ad9dc505edb40d654e7955481e3b2951", "score": "0.50486684", "text": "protected function increaseInventory()\n {\n $this->changeItemsInventory(1);\n }", "title": "" }, { "docid": "2d93abe1a73d6a41804b25d64ec2ac7d", "score": "0.5042535", "text": "function createitem()\n{\n global $db;\n global $player;\n global $arrItem;\n global $intAbility;\n global $intItems;\n global $intGainexp;\n global $intChance;\n global $intCost;\n global $arrMaxbonus;\n global $intKey;\n\n if (rand(1,100) <= $intChance)\n {\n $strName = $arrItem['name'];\n $intPower = $arrItem['power'];\n $intSpeed = $arrItem['szyb'];\n $intDur = $arrItem['wt'];\n $blnSpecial = false;\n if (floor( rand(1,100) - $intAbility / 100) < 21) // special item! Fletcher skill increases the chance\n {\n $intRoll3 = rand(1, 101);\n $intItembonus = rand(ceil($player -> fletcher/2), ceil($player -> fletcher)); // includes bonuses (pure fletchery, gnome, artisan, bless + now gained fletchery)!\n if ($intRoll3 < 34 && $arrItem['type'] == 'R') // dragon arrows, the only special item for non-artisans\n {\n $intPowerbonus = $intItembonus + $player -> strength / 50;\n $intPower += $intPowerbonus > $arrItem['level'] * 10 ? $arrItem['level'] * 10 : $intPowerbonus;\n if ($player -> clas == ARTISAN)\n \t$intPower += $player -> strength / 20;\n $strName = DRAGON2.$arrItem['name'];\n $blnSpecial = true;\n }\n if( $player -> clas == ARTISAN && $intRoll3 > 33)\n {\n if ($intRoll3 < 67 && $arrItem['type'] == 'B')\n { // elven bows\n $intAgibonus = $intItembonus + ($player -> agility / 50);\n $intSpeed += $intAgibonus > $arrItem['szyb'] * 10 ? $arrItem['szyb'] * 10 : $intAgibonus;\n $intSpeed += $player -> agility / 20;\n $strName = ELFS1.$arrItem['name'];\n $blnSpecial = true;\n }\n if ($intRoll3 > 66)\n {\n if ($arrItem['type'] == 'B') // dwarven bow\n {\n $intDurbonus = $intItembonus + ($player -> inteli / 50);\n $strName = DWARFS1.$arrItem['name'];\n $intDurbonus = $intDurbonus > $arrItem['wt'] * 10 ? $arrItem['wt'] * 10 : $intDurbonus;\n $intDurbonus += $player -> inteli / 20;\n }\n else\n {\n $intDurbonus = min( rand(1, ceil($player -> fletcher / 10)), 100); // more arrows than usual\n }\n $intDur += $intDurbonus;\n $blnSpecial = true;\n }\n }\n }\n $intPower = round($intPower);\n $intSpeed = round($intSpeed);\n $intDur = round($intDur);\n $intGainexp += $arrItem['level'] * ($blnSpecial ? 100 + $player -> fletcher / 10 : 1);\n $intItems ++;\n $intAbility = round($intAbility + $arrItem['level'] / 100,3);\n if ($arrItem['type'] == 'B')\n {\n $arrRepair = array(2, 8, 32, 128, 512);\n $intRepaircost = $arrItem['level'] * $arrRepair[$intKey];\n $test = $db -> Execute('SELECT `id` FROM `equipment` WHERE `owner`='.$player -> id.' AND `name`=\\''.$strName.'\\' AND `wt`='.$intDur.' AND `type`=\\'B\\' AND `status`=\\'U\\' AND `power`='.$intPower.' AND `zr`=0 AND `szyb`='.$intSpeed.' AND `maxwt`='.$intDur.' AND `poison`=0 AND `cost`='.$intCost);\n if (!$test -> fields['id'])\n {\n $db -> Execute('INSERT INTO `equipment` (`owner`, `name`, `power`, `type`, `cost`, `wt`, `minlev`, `maxwt`, `amount`, `magic`, `szyb`, `twohand`, `repair`) VALUES('.$player -> id.', \\''.$strName.'\\', '.$intPower.', \\'B\\', '.$intCost.', '.$intDur.', '.$arrItem['level'].', '.$intDur.', 1, \\'N\\', '.$intSpeed.',\\'Y\\', '.$intRepaircost.')');\n }\n else\n {\n $db -> Execute('UPDATE `equipment` SET `amount`=`amount`+1 WHERE `id`='.$test -> fields['id']);\n }\n $test -> Close();\n }\n else\n {\n $test = $db -> Execute('SELECT `id` FROM `equipment` WHERE `owner`='.$player -> id.' AND name=\\''.$strName.'\\' AND `power`='.$intPower.' AND `status`=\\'U\\' AND `cost`='.$intCost);\n if (!$test -> fields['id'])\n {\n $db -> Execute('INSERT INTO `equipment` (`owner`, `name`, `power`, `type`, `cost`, `status`, `minlev`, `wt`) VALUES('.$player -> id.', \\''.$strName.'\\', '.$intPower.', \\'R\\', '.$intCost.', \\'U\\', '.$arrItem['level'].', '.$intDur.')');\n }\n else\n {\n $db -> Execute('UPDATE `equipment` SET `wt`=`wt`+'.$intDur.' WHERE `id`='.$test -> fields['id']);\n }\n $test -> Close();\n }\n }\n else\n {\n $intAbility += 0.005 * $arrItem['level'];\n }\n}", "title": "" }, { "docid": "69f7fe6a45260410c5633598263cc0d7", "score": "0.50401473", "text": "public function store()\n\t{\n\t\t//\n\t\t//\n\t\t$rules = array(\n\t\t'equipment_name' => 'required',\n\t\t'model' => 'required',\n\t\t'serial_number' => 'required',\n\t\t'location' => 'required',\t\t\n\t\t'procurement_type' => 'required',\n\t\t'purchase_date' => 'required',\n\t\t'delivery_date' => 'required',\n\t\t'verification_date' => 'required',\n\t\t'installation_date' => 'required',\n\t\t'spare_parts' => 'required',\n\t\t'warranty' => 'required',\n\t\t'life_time' => 'required',\n\t\t'service_frequency' => 'required',\n\t\t'supplier_id' => 'required',\n\t\t'service_contract' => 'required'\t\t\t\t\t\t\t\t\t\n\n\t\t);\n\t\t\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::back()->withErrors($validator);\n\t\t} else {\n\n\t\t\t$item = new UNHLSEquipmentInventory;\n\n \t$item->district_id = \\Config::get('constants.DISTRICT_ID') ;\n \t$item->facility_id = \\Config::get('constants.FACILITY_ID'); \n \t$item->year_id = \\Config::get('constants.FIN_YEAR_ID'); \n\n\t\t\t$item->name = Input::get('equipment_name');\n\t\t\t$item->model = Input::get('model');\n\t\t\t$item->serial_number = Input::get('serial_number');\n\t\t\t$item->location = Input::get('location');\n\t\t\t$item->procurement_type = Input::get('procurement_type'); \n\t\t\t$item->purchase_date = Input::get('purchase_date'); \n\t\t\t$item->delivery_date = Input::get('delivery_date'); \n\t\t\t$item->verification_date = Input::get('verification_date'); \n\t\t\t$item->installation_date = Input::get('installation_date'); \n\t\t\t$item->spare_parts = Input::get('spare_parts'); \n\t\t\t$item->warranty = Input::get('warranty'); \n\t\t\t$item->life_span = Input::get('life_time'); \n\t\t\t$item->service_frequency = Input::get('service_frequency');\n\t\t\t$item->supplier_id = Input::get('supplier_id');\n\t\t\t$item->service_contract = Input::get('service_contract'); \n\n\t\t\t$item->save();\n\n\t\t\treturn Redirect::to('equipmentinventory');\n\t\t}\n\t}", "title": "" }, { "docid": "341a48bedd816556a4146c5028e2a647", "score": "0.5031606", "text": "private function checkPackingVentas(Articulos $articulo) {\n\n switch ($_SESSION['ver']) {\n case '0': // Version estandar\n $unidades = $this->Unidades;\n break;\n case '1': // Version cristal\n $unidades = $this->MtsFa;\n break;\n case '2': // Version talas y colores\n $unidades = $this->Unidades;\n break;\n case '3': // Version automoción\n $unidades = $this->Unidades;\n break;\n }\n\n $packing = $articulo->getPackingVentas();\n if ($packing > 1) {\n if (abs($unidades) < $packing) {\n $this->setUnidades($packing);\n $this->_alertas[] = \"Packing de Venta \" . $packing;\n } elseif (abs($unidades) > $packing) {\n // Compruebo multiplo, redondeo al múltiplo inmediatamente superior\n $v = explode(\".\", $unidades / $packing);\n $resultado = $v[0];\n if ($v[1])\n $resultado++;\n\n $this->setUnidades($resultado * $packing);\n $this->_alertas[] = \"Packing de Venta \" . $packing;\n }\n }\n }", "title": "" } ]
d3f722c57995b047202079093f78957a
Serializes this definition into an SQL string.
[ { "docid": "e84c2e96add146dcc8b8301fe5c8741d", "score": "0.55268365", "text": "function toSql(ITypeDictionary $typeDictionary, array $namedParameterValues = []): string;", "title": "" } ]
[ { "docid": "52516819dd68bb2e71ead561031a23d5", "score": "0.72079724", "text": "public function toSql() : string\n {\n return $this->__toString();\n }", "title": "" }, { "docid": "099f3f49ee6ee44c8f7cf6e543428ca2", "score": "0.6944725", "text": "public function __toString()\n\t{\n\t\treturn $this->toSql();\n\t}", "title": "" }, { "docid": "eb8fa290cfe1108e582ce2d3ddb00b3c", "score": "0.69282913", "text": "public function toString()\n {\n return $this->toSql();\n }", "title": "" }, { "docid": "a638d70cc27ceeaa36ddfe280687c14d", "score": "0.68237305", "text": "public function _toSql(){\n return $this->fields_string;\n }", "title": "" }, { "docid": "28231b3e2e4162f60270811aa5b7f8e7", "score": "0.67755747", "text": "public function __toString(): string\n {\n return $this->getSql();\n }", "title": "" }, { "docid": "44bcae655d6dda7a2358efa24858c702", "score": "0.6727955", "text": "public function toSQL(): string {\n\t\treturn $this->database()->sqlDialect()->update([\n\t\t\t'table' => $this->table(), 'values' => $this->values, 'where' => $this->where,\n\t\t\t'low_priority' => $this->low_priority, 'ignore_constraints' => $this->ignore_constraints,\n\t\t]);\n\t}", "title": "" }, { "docid": "eceab7036d835325782f635f84ef21ea", "score": "0.67247933", "text": "public function toSql() {\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "6a71d78ba3b1833c4c33af02facdc406", "score": "0.6693636", "text": "public function toSql () : string\n {\n return Syntax::toSql();\n }", "title": "" }, { "docid": "9a24fcffd40d9b92d73b602025337ccb", "score": "0.6666206", "text": "public function renderSQLDef()\n\t{\n\t\t$elems = array();\n\t\t$elems[] = $this->name;\n\t\t$elems[] = $this->SQLType() . (($this->maxlength) ? ('(' . $this->maxlength . ')') : '');\n\t\t$elems[] = ($this->nullable) ? 'DEFAULT NULL' : 'NOT NULL';\n\t\tif ($this->autoincrement) $elems[] = 'AUTO_INCREMENT';\n\t\tif ($this->primarykey) $elems[] = ', PRIMARY KEY(' . $this->name . ')';\n\t\treturn implode(' ', $elems);\n\t}", "title": "" }, { "docid": "a7a7a406a0cb829ce4fe24c6ec6c7fb0", "score": "0.65600014", "text": "function __toString(): string {\n return $this->getSQL(null);\n }", "title": "" }, { "docid": "5800265906c0f025ecb437ca1e5454c2", "score": "0.6498672", "text": "public function toSql()\n {\n return '';\n }", "title": "" }, { "docid": "202fee620c9ade00afc0c7211fe30900", "score": "0.64965737", "text": "public function __toString()\n {\n return $this->sql();\n }", "title": "" }, { "docid": "2f53c08596a6c787f613a668309405b5", "score": "0.64532346", "text": "public function __toString(){\n\t\treturn $this->getSql();\n\t}", "title": "" }, { "docid": "8e5babe1e86ff32863051ccc0e22e9fd", "score": "0.6439993", "text": "public function __toString() {\n return $this->_sql;\n }", "title": "" }, { "docid": "62b86d0c31a846d3c39e36d9491bb337", "score": "0.64290774", "text": "public function __toString()\n {\n return $this->sql;\n }", "title": "" }, { "docid": "7a2036e18b459dc8b607c7e944e136e9", "score": "0.6426253", "text": "public function __toString() {\n $output = '';\n if ($this->table) {\n $output .= $this->table . '.';\n }\n\n if ($this->type == 'null') {\n $output .= 'NULL';\n }\n else {\n $output .= $this->name;\n }\n\n if ($this->alias) {\n $output .= ' AS ' . $this->alias;\n }\n return $output;\n }", "title": "" }, { "docid": "b51e3c8550227bfe3c5afae092a8c0bd", "score": "0.6356636", "text": "public function __toString() {\n\t\ttry {\n\t\t\treturn $this->toSQL();\n\t\t} catch (Throwable $e) {\n\t\t\t$this->application->logger->error($e);\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "0c0b3c7d659a9560da6c5416a7ef014c", "score": "0.61864626", "text": "public function generate()\n {\n $sql = new Str();\n $sql->append('`' . $this->key . '` ')\n ->append($this->type);\n\n if(!is_null($this->length))\n {\n $sql->append('(' . $this->length . ')');\n }\n\n if(!is_null($this->not_null))\n {\n $sql->append(' NOT NULL');\n }\n\n if(!is_null($this->default))\n {\n $sql->append(\" DEFAULT '\")\n ->append($this->default)\n ->append(\"'\");\n }\n\n return $sql->get();\n }", "title": "" }, { "docid": "cddc2af3f3ff0c9dc743859bcf494632", "score": "0.6168892", "text": "public function __toString() {\n $comments = $this->connection->makeComment($this->comments);\n\n // Default fields are always placed first for consistency.\n $insert_fields = array_merge($this->defaultFields, $this->insertFields);\n $insert_fields = array_map(function ($field) {\n return $this->connection->escapeField($field);\n }, $insert_fields);\n\n // If we're selecting from a SelectQuery, finish building the query and\n // pass it back, as any remaining options are irrelevant.\n if (!empty($this->fromQuery)) {\n $insert_fields_string = $insert_fields ? ' (' . implode(', ', $insert_fields) . ') ' : ' ';\n return $comments . 'INSERT INTO {' . $this->table . '}' . $insert_fields_string . $this->fromQuery;\n }\n\n $query = $comments . 'INSERT INTO {' . $this->table . '} (' . implode(', ', $insert_fields) . ') VALUES ';\n\n $values = $this->getInsertPlaceholderFragment($this->insertValues, $this->defaultFields);\n $query .= implode(', ', $values);\n\n return $query;\n }", "title": "" }, { "docid": "d5f227cd2927c9e9fecea9c27a437ab4", "score": "0.6161356", "text": "public function __toString()\n {\n return (string) $this->getQuery()->getStatement();\n }", "title": "" }, { "docid": "d1387f1795949ca9d34e3bc1fc235fdc", "score": "0.61326", "text": "public function __toString(): string\n {\n $output = \"SELECT\".$this->getOptions().\"\\r\\n\".$this->getColumns().\"\\r\\n\".\"FROM \".$this->table;\n $output .= $this->getJoins();\n $output .= $this->getWhere();\n $output .= $this->getGroupBy();\n $output .= $this->getHaving();\n $output .= $this->getOrderBy();\n $output .= $this->getLimit();\n return $output;\n }", "title": "" }, { "docid": "0e701a05ebfe53426d3e35d24f1a6ed4", "score": "0.6130684", "text": "public function toString()\n {\n return $this->mapper->getDi()->get($this->mapper->getAdapterName())->getQuerySql($this);\n }", "title": "" }, { "docid": "7f528042c2c8c8e1cc560567e628d8cc", "score": "0.6087792", "text": "public function toString()\n {\n return \"Query[\".$this->driver->name().\"] {\\n\".\n \" sql: \".Strings::indent(Strings::stringify($this->sql), \" \", 4).\n \" params: \".Strings::indent(Strings::stringify($this->params), \" \", 4).\n \"}\"\n ;\n }", "title": "" }, { "docid": "1d09ef5669b23df106de655ea5bf670c", "score": "0.60123026", "text": "public function render(): string\n {\n $output = '`'.$this->getName() . '` ';\n $output .= $this->getType().\n (count($this->getParameters()) ? '('.implode(' ', $this->getParameters()).')' : '');\n\n foreach ($this->getOptions() as $option => $value) {\n $output .= ' ' . $option;\n if (isset($value)) {\n $output .= ' = ' . $value;\n }\n }\n\n $output .= ($this->isNullable() === false ? ' NOT NULL' : ' NULL');\n $output .= ($this->getDefaultValue() != null ? ' DEFAULT '.$this->getDefaultValue() : '');\n $output .= ($this->isAutoIncrement() == true ? ' AUTO_INCREMENT' : '');\n $output .= (trim($this->getComment()) != '' ? ' COMMENT \\''.$this->getComment().'\\'' : '');\n\n return $output;\n }", "title": "" }, { "docid": "260d21560d8b9965f9f9011a1a15cb7a", "score": "0.59580714", "text": "function toSQL() {\n \t\treturn \"0\";\n \t}", "title": "" }, { "docid": "8c4c8b521c77400aa2bdb2f81af73aa3", "score": "0.5952634", "text": "public function toSql()\n\t{\n\t\tif ($this->_limitAmount) {\n\t\t\t$limit = $this->_limitAmount . ($this->_limitOffset ? \" OFFSET \" . $this->_limitOffset : '');\n\t\t} else if ($this->_limitOffset) {\n\t\t\t$limit = '999999 OFFSET ' . $this->_limitOffset;\n\t\t} else {\n\t\t\t$limit = false;\n\t\t}\n\n\t\treturn 'SELECT ' . implode(', ', $this->_fields)\n\t\t\t. \"\\nFROM `$this->_table`\"\n\t\t\t. ($this->_joins ? \"\\n\" . implode(\"\\n\", $this->_joins) : '')\n\t\t\t. ($this->_conditions ? \"\\nWHERE \" . implode(' AND ', $this->_conditions) : '')\n\t\t\t. ($this->_groupBy ? \"\\nGROUP BY \" . implode(', ', $this->_groupBy) : '')\n\t\t\t. ($this->_orderBy ? \"\\nORDER BY \" . implode(', ', $this->_orderBy) : '')\n\t\t\t. ($limit ? \"\\nLIMIT $limit\" : '');\n\t}", "title": "" }, { "docid": "888cb89290913239c0e9b0cf1e94d25c", "score": "0.5948999", "text": "public function __toString() {\n $comments = $this->connection->makeComment($this->comments);\n\n return $comments . 'DELETE FROM {' . $this->connection->escapeTable($this->table) . '} ';\n }", "title": "" }, { "docid": "2ba3a9418f11d75533c057e429ebba2b", "score": "0.5946508", "text": "public function _GetSQLDefinition($fieldDefinition = null)\n {\n return '';\n }", "title": "" }, { "docid": "b0c9fee35bd9e37a3e6ff26fc130ecaf", "score": "0.59284383", "text": "public static function toSql()\n {\n /** @var \\Illuminate\\Database\\Query\\Builder $instance */\n return $instance->toSql();\n }", "title": "" }, { "docid": "ef231dbf3a45392ce38ae92c21128aac", "score": "0.5904361", "text": "public function toSql()\n {\n /* fetch by current query */\n $query = $this->_query;\n $sql = $query->build();\n $vars = $query->vars;\n foreach( $vars as $name => $value ) {\n $sql = str_replace( $name, $value, $sql );\n }\n return $sql;\n }", "title": "" }, { "docid": "ee2cec73e405d80aaa46bf283ad75d47", "score": "0.59010595", "text": "public function __toString()\n {\n return $this->getTableAsString();\n }", "title": "" }, { "docid": "bd0ddd25f67c6c09aa9edf5a6e509893", "score": "0.58994305", "text": "public function toSql()\n {\n $this->applyBeforeQueryCallbacks();\n\n return $this->compile()->compileSelect($this);\n }", "title": "" }, { "docid": "ce3227c7ce9c03796df2598f9812e913", "score": "0.58897185", "text": "public function __toString()\n {\n $result = \"{$this->type} {$this->null}\";\n if (!blank($this->default)) {\n $result .= \" default {$this->_db->escape($this->default)}\";\n }\n if (!empty($this->extra)) {\n $result .= \" {$this->extra}\";\n }\n return $result;\n }", "title": "" }, { "docid": "1aa8b9ef6e79bee663b5a3a90c0691ed", "score": "0.588413", "text": "public function sql(){\r\n return $this->sql->replace('@fields', $this->selectFields)->toString();\r\n }", "title": "" }, { "docid": "17ba6a3f13b45e945ab001164c804dc6", "score": "0.583712", "text": "public function __toString(): string\n {\n $objectType = (string) ($this->fqsen ?? 'object');\n\n if ($this->keyType === null) {\n return $objectType . '<' . $this->valueType . '>';\n }\n\n return $objectType . '<' . $this->keyType . ',' . $this->valueType . '>';\n }", "title": "" }, { "docid": "bcfa1684004f027f68b5c68446d7a56e", "score": "0.582875", "text": "public function toSQL(): string\n {\n // Get lexemes\n $lexemes = $this->toLexemes();\n if (empty($lexemes)) {\n return \"\";\n }\n\n // Now process\n $sql = \"\";\n foreach ($lexemes as $lexeme) {\n $sql .= $lexeme . \" \";\n }\n $sql .= \";\";\n\n return $sql;\n }", "title": "" }, { "docid": "8263523a6f48121f8a4e45605ff8de78", "score": "0.58107525", "text": "public function toString()\n {\n // Start of user code Statement.toString\n if(!$this->isReadyToBeExecuted()) {\n throw new \\LogicException('The statement is not ready'); \n }\n \n /* Compare ColumnNamesListStatement with ValuesStatement */\n $columnsNames = array();\n foreach($this->columnNamesListStatement as $columnName) {\n $columnsNames[] = $columnName;\n }\n $valuesStatementColumnNames = array_keys($this->valuesStatement->toNativeArray());\n if($columnsNames != $valuesStatementColumnNames) {\n throw new \\LogicException(\n 'The ColumnNamesListStatement set doesn\\'t match the ValuesStatement'\n );\n }\n \n $statement = sprintf(\n 'INSERT INTO %s %s %s',\n $this->tableName,\n $this->columnNamesListStatement->toString(),\n $this->valuesStatement->toString()\n );\n // End of user code\n \n return $statement;\n }", "title": "" }, { "docid": "51c06e6df0315a983ab2e3a31a52db5d", "score": "0.57957363", "text": "public static function getSql(): string\n {\n $fields = [];\n foreach (static::getDceFieldMappings() as $fieldName => $fieldType) {\n $fields[] = $fieldName . ' ' . $fieldType;\n }\n if (!empty($fields)) {\n return 'CREATE TABLE tt_content (' . PHP_EOL . implode(',' . PHP_EOL, $fields) . PHP_EOL . ');';\n }\n\n return '';\n }", "title": "" }, { "docid": "d99b9ef5eec549fc5b26547048a2d241", "score": "0.57902396", "text": "public function toSql(): string\n {\n return $this->grammar->compileSelect($this);\n }", "title": "" }, { "docid": "bf6f20f0a4e408e8f773cd5d92a2792d", "score": "0.5784378", "text": "public function __toString(){\n\t\t$data = '';\n\t\t$data .= serialize($this->_where);\n\t\t$data .= serialize($this->_order);\n\t\t$data .= serialize($this->_limit);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "82845524a5ab778b4cfe270a2e296a94", "score": "0.57826453", "text": "public function __toString()\n {\n return sprintf('BatchQuery: %s', json_encode([\n 'queries' => $this->getQueries()->map(function (Query $query) {\n return $query->__toString();\n }),\n 'locale' => $this->getLocale(),\n 'limit' => $this->getLimit(),\n 'group_by' => $this->getGroupBy(),\n 'data' => $this->getAllData(),\n ]));\n }", "title": "" }, { "docid": "85a58b4b24de139e83b782b89bf35f7d", "score": "0.5782107", "text": "public function toSql()\r\n {\r\n $method = 'toSql' . ucfirst($this->command);\r\n return $this->$method();\r\n }", "title": "" }, { "docid": "ae4fcd26fb1f06ca3c61cd585371228c", "score": "0.57746947", "text": "public function __toString()\n {\n $query = \"SELECT COUNT(*) FROM `{$this->entity->name}`\";\n\n $query .= $this->fromToString();\n $query .= $this->whereToString();\n $query .= $this->limitToString();\n\n return $query;\n }", "title": "" }, { "docid": "1d859babb73cb11d5a3c89be6777d6b9", "score": "0.5761029", "text": "public function toSql()\n {\n return (new FirestoreSqlLikeGrammar)->compileSelect($this);\n }", "title": "" }, { "docid": "c9fce879d24262afda5ded6f71f65da9", "score": "0.5751787", "text": "private function toString($sql) {\n $i = 0;\n // traverse WHERE clause and get binded values...\n foreach ($this->where as $column => $value) {\n // ... replace them with actual values\n $sql = preg_replace(\"/:id{$i}/\", $value, $sql);\n $i++;\n }\n\n // and data during INSERT\n foreach ($this->data as $column => $value) {\n $sql = preg_replace(\"/:{$column}/\", $value, $sql);\n }\n\n return $sql;\n }", "title": "" }, { "docid": "21f385502b453a735ebe0d314fc0a96b", "score": "0.5745558", "text": "public function __toString()\n {\n return (string) $this->exportTo(WarehouseTableMap::DEFAULT_STRING_FORMAT);\n }", "title": "" }, { "docid": "20b10e16aac3701e75c133b2e6dec590", "score": "0.57395995", "text": "public function output(): string\n {\n return $this->buildSQL();\n }", "title": "" }, { "docid": "a51177079b74abc073a9a884e510e947", "score": "0.57355934", "text": "function output_data_types_as_sql()\n {\n $str_output = '';\n foreach($this->arr_field_types as $index=>$value)\n {\n $str_output .= '`'.$index.'` '.$value->field_type.\" NOT NULL,\";\n }\n return $str_output;\n }", "title": "" }, { "docid": "ec621204b9ef4f88d6b5a148b91203bf", "score": "0.57353604", "text": "public function build()\n {\n $this->values = [];\n\n $fields = [];\n foreach ($this->setValues as $key => $value) {\n if ($id = $this->escapeIdentifier($key)) {\n $fields[] = $id.' = ?';\n $this->values[] = $value;\n }\n }\n\n if (count($fields) == 0) {\n return '';\n }\n\n // produces \"SET `col1`=?,`col2`=?,`col3`=?\"\n return 'SET '.implode(', ', $fields);\n }", "title": "" }, { "docid": "6e090540234db9d22be75792e6315722", "score": "0.5698428", "text": "public function __toString()\n {\n return (string) $this->exportTo(JuizesTableMap::DEFAULT_STRING_FORMAT);\n }", "title": "" }, { "docid": "a0ed42bebdc0728dbf71369cb6b0b639", "score": "0.56967247", "text": "public static function definition(): string\n {\n return\n /** @lang GraphQL */\n <<<'GRAPHQL'\n\"\"\"\nWhen used upon a field, it encodes;\nwhen used upon an argument, it decodes.\n\"\"\"\ndirective @hashid on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION\nGRAPHQL;\n }", "title": "" }, { "docid": "13726939843d673fec499edc97ce39f5", "score": "0.56899774", "text": "public function __toString()\n {\n $string = \"\";\n\n foreach ($this->comment as $commentLine) {\n $string .= sprintf(\";%s\\n\", $commentLine);\n }\n\n $string .= sprintf(\"[%s]\\n\", $this->name);\n\n foreach ($this->properties as $property) {\n $string .= $property;\n }\n\n return $string;\n }", "title": "" }, { "docid": "6a8d68477c06ae1ccbdb56ff7455a14a", "score": "0.568681", "text": "public function __toString() : string {\n\n\t\t\treturn $this->query;\n\t\t}", "title": "" }, { "docid": "08dba050398c5ce9768f0061c9ed5780", "score": "0.56849486", "text": "public function getSQL()\n {\n return $this->buildQuery()->getSQL();\n }", "title": "" }, { "docid": "1af441365eace354f17af80e12cb23d4", "score": "0.56750286", "text": "public function __toString()\n {\n if ($this->show_conj) {\n return sprintf('%s %s %s %s', $this->getConjunction(), $this->getColumn(), $this->getOperator(), $this->getValue());\n } else {\n return sprintf('%s %s %s', $this->getColumn(), $this->getOperator(), $this->getValue());\n }\n }", "title": "" }, { "docid": "b5088ebbc31a75b7bff75013a87a5eae", "score": "0.5654828", "text": "public function __toString()\n {\n return\n $this->type .\n $this->buildLengthString() .\n $this->buildNotNullString() .\n $this->buildUniqueString() .\n $this->buildDefaultString() .\n $this->buildCheckString() .\n $this->buildCommentString();\n }", "title": "" }, { "docid": "a22c1777df3fd115b99c917c4e788dea", "score": "0.56277645", "text": "public function toSql()\n {\n return $this->driver->getQuoteColumn($this->column) . ' BETWEEN ' \n . $this->driver->inflate( $this->from )\n . ' AND ' \n . $this->driver->inflate( $this->to );\n }", "title": "" }, { "docid": "755c3e484710885c2bdfc409eea2e113", "score": "0.56189513", "text": "function __toString() {\n return $this->_query->__toString();\n }", "title": "" }, { "docid": "7f384aff1d79ce9620bf3e98bc10bcaa", "score": "0.5618494", "text": "public function getSql() : string\n {\n return $this->_sql;\n }", "title": "" }, { "docid": "c57359ef7e7c46160b91729a2524c6e2", "score": "0.561264", "text": "public function toString() {\n return nameof($this).'('.\n 'id= '.$this->id.', name= '.$this->name.', department= '.$this->department.', years= '.$this->years.\n ')';\n }", "title": "" }, { "docid": "683bc17c8ade606ba3a21968b4255b5c", "score": "0.5612294", "text": "public function serialize()\n {\n return serialize(\n array(\n $this->id,\n $this->name,\n )\n );\n }", "title": "" }, { "docid": "aec5ff1bf6f1ba6d0f1238f4b2f5555d", "score": "0.5612031", "text": "public function getRawSql() \n {\n return $this->sql;\n }", "title": "" }, { "docid": "d00673b050f4eb7665b2ef673c1ad187", "score": "0.55950487", "text": "public function sql() : string\n {\n return $this->sql;\n }", "title": "" }, { "docid": "3f21af0e7f6ef77c1109498978e1055a", "score": "0.5594831", "text": "public function getSQL();", "title": "" }, { "docid": "5acd15b80526e44f1e8d89cfa85d2f1d", "score": "0.5594668", "text": "public function get_from_sql() : string {\n return \"{{$this->tablename}} {$this->tablealias}\";\n }", "title": "" }, { "docid": "17036511747bf9d8e00f440646cdc097", "score": "0.5594639", "text": "public function toSQL($val) {\n\t\treturn (string)$val;\n\t}", "title": "" }, { "docid": "397c2412546d7c7309623fb7f2440bcc", "score": "0.5594471", "text": "public function __toString() : string {\n return $this->_query;\n }", "title": "" }, { "docid": "90b3cdd55010e303d43cb12d44e1b4f0", "score": "0.5590648", "text": "public function output(): string\n {\n $rtn = $this->buildSQL();\n\n return $rtn;\n }", "title": "" }, { "docid": "3490de0d87f4fcf4e26a4bba1a6e4eeb", "score": "0.5579566", "text": "public function toJSON() {\n return json_encode($this->schema);\n }", "title": "" }, { "docid": "809ac17acaa0725b54c50a5bbfd7726a", "score": "0.556317", "text": "public abstract function getSQL();", "title": "" }, { "docid": "3ee2fbcd47ea0c445f68eef2f00c7842", "score": "0.5560012", "text": "public function serialize()\n {\n return serialize(array(\n $this->id.\n $this->name,\n $this->createdAt\n ));\n }", "title": "" }, { "docid": "c40122976669fd202080eed57ed5e08d", "score": "0.5550045", "text": "public function __toString()\n {\n return 'DataVisualization #'.$this->id;\n }", "title": "" }, { "docid": "70c1afbaf9aa49c944e1058c37338b05", "score": "0.55416065", "text": "public function __toString()\n {\n return (string) $this->exportTo(ArShipToTableMap::DEFAULT_STRING_FORMAT);\n }", "title": "" }, { "docid": "15488f31c000fd936c657096ed4d4896", "score": "0.55328965", "text": "public function __toString()\n {\n if (empty($this->clauses))\n {\n return '';\n }\n\n return sprintf(\" WHERE (%s) \", ltrim(implode('', $this->clauses), 'AND'));\n }", "title": "" }, { "docid": "eae809fc2ae33e86fa6f56f612c4a5d0", "score": "0.5530436", "text": "public function __toString() {\n return \"id: {$this->id}, title: {$this->title}, artist: {$this->artist}, \"\n . \"genre: {$this->genre}, creation year: {$this->creationYear}\";\n }", "title": "" }, { "docid": "df95b21a60944f449853f89046409f3e", "score": "0.5528763", "text": "public function serialize()\n {\n foreach (['pkValue', 'values', '_changed', '_loaded', '_saved', '_sorting'] as $var) {\n $data[$var] = $this->$var;\n }\n\n return serialize($data);\n }", "title": "" }, { "docid": "30ce4cadbb865a2a30a348063e90fe4e", "score": "0.5528403", "text": "private function BuildSQLstring()\n\t{\n\t\t$params = '';\n\t \tforeach ($this->tableSchema as $columnName) {\n\t \t\tif ($this->$columnName != null) {\n\t\t \t\tif (is_int($this->$columnName)) {\n\t\t \t\t\t$params .= $columnName . ' = ' . $this->$columnName . ', ';\n\t\t \t\t} else {\n\t\t \t\t\t$params .= $columnName . \" = '\" . $this->$columnName . \"', \";\n\t\t \t\t}\n\t \t\t}\n\t \t}\n\t \treturn trim($params, ', ');\n\t}", "title": "" }, { "docid": "be0774734d3fd91cca06a571e0a363df", "score": "0.55207896", "text": "public function getSql() {\n return $this -> sql;\n }", "title": "" }, { "docid": "a047b676183f7c971a7fe2c9f5a4efaa", "score": "0.55153286", "text": "public function __toString()\n {\n return '{' . implode(' ', $this->toArray()) . '}';\n }", "title": "" }, { "docid": "2416c99327550872c3d850da6e0efc57", "score": "0.5510753", "text": "public function __toString()\r\n\t{\r\n\t\treturn $this->getTable();\r\n\t}", "title": "" }, { "docid": "c06a1c6e708e87a1c1e53bd9cb3575e1", "score": "0.5510184", "text": "public function __toString()\n\t{\n\t\treturn \n\t\t'$this->id\t\t\t : ' . $this->id\t\t\t.\n\t\t'$this->datum\t\t : ' . $this->datum\t\t\t.\n\t\t'$this->begintijd\t : ' . $this->begintijd\t\t.\n\t\t'$this->eindtijd\t : ' . $this->eindtijd\t\t.\n\t\t'$this->titel \t\t : ' . $this->titel\t.\n\t\t'$this->omschrijving : ' . $this->omschrijving\t.\n\t\t'$this->locatie\t\t : ' . $this->locatie\t\t.\n\t\t'$this->organisator\t : ' . $this->organisator\t.\n\t\t'$this->picfile\t\t : ' . $this->picfile\t\t;\n\t}", "title": "" }, { "docid": "8b2f90e11d00155fd7bcbf331eec6ce4", "score": "0.55082625", "text": "public function __toString() : string\n {\n return $this->getFieldName() . ': ' . $this->getFieldValue(true);\n }", "title": "" }, { "docid": "c4e93468533dc5c732039dacfe36888b", "score": "0.55066997", "text": "public function toXML() {\n $modelName = $this->_modelName;\n $xml = \"<{$modelName}>\\n\";\n foreach ($this->_columns as $column) {\n if ($this->$column!=null) {\n $xml .= \"\\t<{$column}>{$this->$column}</{$column}>\\n\";\n }\n else {\n $xml .= \"\\t<{$column}>null</{$column}>\\n\";\n }\n }\n $xml .= \"</{$modelName}>\\n\";\n\n return $xml;\n }", "title": "" }, { "docid": "92b8ce54484f073e6977d4aa55081617", "score": "0.5498685", "text": "public function toPhp() : string\n {\n\n // Result.\n $php = $this->ln(0, '', 1);\n $php .= $this->ln(\n 3,\n '( new VarCharField(\\'' . $this->getName() . '\\', ' . $this->ex($this->isNotNull()) . ') )'\n );\n $php .= $this->ln(4, '->setMaxLength(' . $this->getMaxLength() . ')');\n $php .= $this->ln(4, '->setPk(' . $this->ex($this->isPrimaryKey()) . ')');\n $php .= $this->ln(2, '', 0);\n\n return $php;\n }", "title": "" }, { "docid": "6c6a8be6801d27f8dc744b1fc5222da2", "score": "0.54945636", "text": "public function dump()\n {\n dump($this->toSql(), $this->getBindings());\n\n $this->totalQueryDuration();\n\n return $this;\n }", "title": "" }, { "docid": "d746d58f24ca363550ca6fcffc99647c", "score": "0.547973", "text": "public function __toString()\n {\n return '{\"idSquadre\":\"'.$this->getIdSquadre().'\",\"nome\":\"'.$this->getNome().'\",\"annoFondazione\":\"'.$this->getAnnoFondazione().'\",\"presidente\":\"'.$this->getPresidente().'\",\"sedeLegale\":\"'.$this->getSedeLegale().'\"}';\n }", "title": "" }, { "docid": "6fabb4d85a7aa91b206b2608550a6729", "score": "0.5478694", "text": "public function sql_string() {\n return $this->string;\n }", "title": "" }, { "docid": "234c41436cb6bcdfd1c2a6ca32b4cfe1", "score": "0.5466434", "text": "public function __toString()\n {\n $string = '( ';\n\n foreach ( $this->conditions as $condition )\n {\n if ( $string != '( ' )\n {\n $string .= ' ' . $this->concatenation . ' ';\n }\n\n $string .= $condition;\n }\n\n return $string . ' )';\n }", "title": "" }, { "docid": "59e5cacebe465095ca92f0594f9e6fc9", "score": "0.5460494", "text": "public function __toString() {\n\t\t$str = \"<pre>\\n\";\n\t\tforeach($this->_values AS $index=>$value) {\n\t\t\tif($value instanceof RelationMapper) {\n\t\t\t\t$str .= \"$index: RelationMapperObject<br>\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$str .= \"$index: $value<br>\";\n\t\t}\n\t\t$str .= \"</pre>\\n\";\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "e020749628ae00c3814e010f68bb5782", "score": "0.5454218", "text": "public function __toString()\n {\n if ($this->query_string != '') {\n $sql = str_replace(\"\\n\", ' ', $this->query_string);\n } elseif ($this->select !== null) {\n $sql = $this->sql->getSqlStringForSqlObject($this->select);\n } else {\n throw new Exception\\InvalidUsageException(__METHOD__ . \": No select given.\");\n }\n return $sql;\n }", "title": "" }, { "docid": "72ae6c9b07cd29b8b3ffa5f683c3bd51", "score": "0.5434388", "text": "public function __toString()\n\t{\n\t\t$header = empty($this->key) ? '{' . $this->val . '}'\n\t\t\t\t: '{' . $this->key . '}, {' . $this->val . '}';\n\t\t$str = \"<!-- FOR $header IN \" . $this->set->__toString() . \" -->\\n\";\n\t\t$str .= $this->blocks_toString($this->blocks);\n\t\t$str .= \"<!-- ENDFOR -->\\n\";\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "941b1656de838d6a8dbdef45aa6a2142", "score": "0.54320884", "text": "protected function getSetQuery(): string\n {\n $values = [];\n\n foreach ($this->values as $column => $value) {\n $values[] = $column . ' = ' . $value;\n }\n\n return Statement::SET . ' ' . implode(', ', $values);\n }", "title": "" }, { "docid": "646c537dd5fb89b871f0e0d0bf4f6648", "score": "0.5430158", "text": "public function __toString() {\n $out = parent::__toString() . \"\\n\\nQuery : {$this->query}\\n\\nError : {$this->sqlerror}\\n\\n\";\n return $out;\n }", "title": "" }, { "docid": "23fea3a7c00449f4ced7a92cd2c29dd7", "score": "0.5423495", "text": "public function ___build(): string\n {\n $tables = \\implode(', ', $this->tables);\n $fields = \\implode(', ', $this->fields);\n $where = $orderBy = $limit = '';\n\n if ($this->where != '') {\n $where = \\sprintf(' WHERE %s', $this->where);\n }\n if (\\count($this->orderBy) > 0) {\n $orderBy = \\sprintf(' ORDER BY %s', \\implode(', ', $this->orderBy));\n }\n if ($this->limit != 0) {\n $limit = \\sprintf(' LIMIT %s', $this->limit);\n }\n\n return \\sprintf('UPDATE %s SET %s%s%s%s', $tables, $fields, $where, $orderBy, $limit);\n }", "title": "" }, { "docid": "939e2eb7073beab1738274306e259fd0", "score": "0.54203093", "text": "public function serialize()\n {\n return '#val:' . $this->value . '#';\n }", "title": "" }, { "docid": "d0e4ec8878d35477e325ec1c918577ec", "score": "0.5392584", "text": "public function __toString()\n {\n return \"[#$this->id] $this->name - $this->street, $this->city, $this->post_code, $this->phone_number\";\n }", "title": "" }, { "docid": "9e68436c8514a42f3a94567a2294ae5a", "score": "0.53913647", "text": "private function formatQuery() : string\n {\n switch($this->m_type)\n {\n case self::TYPE_COUNT:\n return QueryBuilder::count($this->m_table, $this->m_condition);\n break;\n case self::TYPE_DELETE:\n return QueryBuilder::delete($this->m_table, $this->m_condition);\n break;\n case self::TYPE_DROP:\n return QueryBuilder::drop($this->m_table, $this->m_condition);\n break;\n case self::TYPE_EXISTS:\n return QueryBuilder::exists($this->m_table);\n break;\n case self::TYPE_INSERT:\n {\n if (isset($this->m_data[0]))\n return QueryBuilder::insertMany($this->m_table, $this->m_data);\n return QueryBuilder::insert($this->m_table, $this->m_data);\n }\n break;\n case self::TYPE_SELECT:\n {\n return QueryBuilder::select(\n $this->m_table,\n $this->m_data,\n $this->m_condition,\n $this->buildStatements()\n );\n }\n break;\n case self::TYPE_UPDATE:\n {\n return QueryBuilder::update($this->m_table, $this->m_data, $this->m_condition);\n }\n break;\n case self::TYPE_RAW:\n return $this->m_rawQuery;\n break;\n default:\n return '';\n break;\n }\n }", "title": "" }, { "docid": "dd518ab4bbec72d6b69b78dca7cb8ac1", "score": "0.5391079", "text": "public function __toString() {\n\t\treturn $this->{static::primary_key_field()};\n\t}", "title": "" }, { "docid": "f011efa41999308fa0531609a95e0119", "score": "0.5390095", "text": "public function serialize()\n {\n return serialize([\n $this->id,\n $this->name\n ]);\n }", "title": "" }, { "docid": "ba422ed5d8d0fab9fcf13a4ed7729768", "score": "0.53897613", "text": "function getSQL(){\n\t\t\treturn $this->createSQL();\n\t\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "643f51843534c99b002271c413f71061", "score": "0.7149016", "text": "public function store()\n {\n $this->storage->set($this);\n\n }", "title": "" }, { "docid": "aba977442c12d8193d7ce12cb2a46e96", "score": "0.669261", "text": "public function store ()\n {\n $this->_update_login ();\n $this->_pre_store ();\n\n if ($this->exists ())\n {\n $this->_update ();\n }\n else\n {\n $this->_create ();\n }\n }", "title": "" }, { "docid": "75600e5d65c2156987ff7cb140e14a4b", "score": "0.6621582", "text": "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6428514", "text": "public function save($resource);", "title": "" }, { "docid": "9181113e9ca478f57b376bb60189432a", "score": "0.639531", "text": "public function store()\n\t{\n\t\t//\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules);\n\n\t\tif($validator->passes()){\n\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t$constrain->aspectRatio();\n\t\t\t})->save($destinationPath . $fileName);\n\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t$inputs['image'] = $fileName;\n\t\t\t\\App\\Resource::create($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "bd7a2528e89d1c3f43656fa9d3a11bc3", "score": "0.63575023", "text": "public function store(StoreResourceRequest $request): JsonResponse\n {\n $resource = new Resource;\n $resource->fill($request->all());\n if ($request->has('url')) {\n $resource->url = $request->file('url')->store('articles', 'article');\n }\n $resource->saveOrFail();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "af1871e1a1f1d758082bcf4ebeab10eb", "score": "0.6356851", "text": "public function saveStorage()\n {\n $this->storage->save($this->getProduct());\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
db8513cccd99eb1f1cea53fcc2ceab34
Short description of attribute list_model
[ { "docid": "b7972d74e943a4a6db9d74f0fc0c1eae", "score": "0.74032754", "text": "public function get_list_model()\n {\n return $this->list_model;\n }", "title": "" } ]
[ { "docid": "7706b02b7703055c584a027c349f2e79", "score": "0.73002493", "text": "protected function describe_model(){\n\t\t$model_desc = $this->model->describe();\n\t\tforeach($model_desc as $field) $desc[] = $field['Field'];\n\t\treturn $desc;\n\t}", "title": "" }, { "docid": "58d7c10f288a1ef288ef1141585be785", "score": "0.6485755", "text": "public function set_list_model($list_model)\n {\n $this->list_model = $list_model;\n }", "title": "" }, { "docid": "cda585d8769c9d13f55da4ad9ec9af88", "score": "0.63906926", "text": "public function list_attributes()\n {\n }", "title": "" }, { "docid": "3948991703104525c71793232c49b8fe", "score": "0.6351291", "text": "public function describe($model) {\n\t\treturn parent::describe($model);\n\t}", "title": "" }, { "docid": "03954fc876d227ddb908acf5d497eeb2", "score": "0.633359", "text": "function html_list($model, $labelAttribute = 'name', $keyAttribute = 'id')\n {\n if (\\is_string($model)) {\n $model = new $model();\n }\n\n return $model->pluck($labelAttribute, $keyAttribute)->toArray();\n }", "title": "" }, { "docid": "f4d79a2a54194fd92dbf1d707f01f90c", "score": "0.62778413", "text": "public function getModelAttributes();", "title": "" }, { "docid": "4f1bba4261ccf9c67a998b5387df5990", "score": "0.6192258", "text": "public function getListViewName()\n\t{\n\t\treturn 'List';\n\t}", "title": "" }, { "docid": "065ecb21f87aafd60c3f870fe3f921bc", "score": "0.61742795", "text": "public function getModelName()\n {\n }", "title": "" }, { "docid": "2c6c1101ff3f8d3ecdc9baedf810caf2", "score": "0.6131645", "text": "public function getModelsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "85c1bc9be28587b4e3289d1bdcce4911", "score": "0.610801", "text": "function getModelName();", "title": "" }, { "docid": "d4c716e66357c2bcee02776c84a3f309", "score": "0.6023601", "text": "public function getModelDescription()\n {\n $productmodels = $this->owner->Parent->ProductModels();\n if ($productmodels->count() && $model = $this->owner->Model) {\n return $productmodels->find('Title', $model)->Description;\n }\n }", "title": "" }, { "docid": "8b1b1012d82311f68e899994a7bebb29", "score": "0.6017866", "text": "protected function tuneModelForList()\r\n {\r\n }", "title": "" }, { "docid": "e1142b2aa697d6927176f3f01bc7347d", "score": "0.5978602", "text": "protected function setupListOperation()\n {\n $this->crud->setColumns([\n [ \n 'name' => 'id',\n 'label' => '#',\n 'type' => 'text',\n ],\n [ \n // any type of relationship\n 'name' => 'Machine', // name of relationship method in the model\n 'type' => 'relationship',\n 'label' => 'Machine', // Table column heading\n 'attribute' => 'number', // foreign key attribute that is shown to user\n ],\n [ \n // any type of relationship\n 'name' => 'customer', // name of relationship method in the model\n 'type' => 'text',\n 'label' => 'Customer', // Table column heading\n 'attribute' => 'number', // foreign key attribute that is shown to user\n ],\n [ \n // any type of relationship\n 'name' => 'debit', // name of relationship method in the model\n 'type' => 'number',\n 'label' => 'Debit', // Table column heading\n ],\n [ \n // any type of relationship\n 'name' => 'credit', // name of relationship method in the model\n 'type' => 'number',\n 'label' => 'Credit', // Table column heading\n ],\n [ \n 'name' => 'created_at',\n 'label' => 'Created',\n 'type' => 'date',\n ],\n [ \n 'name' => 'collector',\n 'label' => 'Collector',\n 'type' => 'text',\n ],\n ]);\n }", "title": "" }, { "docid": "c34ebd6d75ebb7846b6b98d706467610", "score": "0.59664774", "text": "public static function modelTitle()\n {\n return 'Администратор';\n }", "title": "" }, { "docid": "ddf7f176f18a6908a741345469107d0a", "score": "0.59524816", "text": "public function getDescriptionAttribute()\n {\n return $this->getClass()->getDescription();\n }", "title": "" }, { "docid": "ad9318ae6a0a4b5475efae07c1ac68c4", "score": "0.59416777", "text": "public function getListAttributes() {\r\n\t\t\treturn $this->list_attributes;\r\n\t\t}", "title": "" }, { "docid": "d3719db5f326a811c5f86c3aa1915544", "score": "0.59318227", "text": "function getModel();", "title": "" }, { "docid": "e333de452dd185c0d2395c6e0e38148f", "score": "0.59258515", "text": "abstract protected function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.59242004", "text": "public function getModelName();", "title": "" }, { "docid": "5bf309cae7a2fe595b117d3a2a40a0bf", "score": "0.5911427", "text": "abstract public function getModelName();", "title": "" }, { "docid": "43e655258678a7a744356f584fb6e82e", "score": "0.5906435", "text": "public function product_attribute_description()\n {\n }", "title": "" }, { "docid": "613fd3f10ad95b0e109f84602ba52d93", "score": "0.59020257", "text": "public function displayModel(){\n print \" --> \".$this->model['table'].\" <--\\n\";\n print_r($this->model);\n print \"\\n\\n\";\n }", "title": "" }, { "docid": "5920ecd8bcbb75456d13e3285a133bf3", "score": "0.58952934", "text": "public function getDescription(): string\n {\n return \"OneToMany\";\n }", "title": "" }, { "docid": "1ff967ae3e57a55781fae86e45bf07cf", "score": "0.58894557", "text": "public function init ()\n\t{\n\n\t\t/**\n\t\t * set headline\n\t\t */\n\t\t$this->_helper->layout()->headline = $this->view->translate('Administration') . ' - ModelList';\n\t\t$this->_helper->layout()->headline .= ': ' . $this->view->translate($this->_modelListUntranslatedTitle);\n\n\t\t/**\n\t\t * pass through parent to prevent errors\n\t\t */\n\t\tparent::init();\n\n\t\t/**\n\t\t * start model list\n\t\t */\n\t\t$this->_modelList = new L8M_ModelForm_List($this->_modelListName, $this);\n\t\t$this->_modelList\n\t\t\t->setDefault('listTitle', $this->view->translate($this->_modelListUntranslatedTitle))\n\t\t\t->disableSubLinks()\n\t\t\t->disableButtonAdd()\n//\t\t\t->disableButtonDelete()\n//\t\t\t->addWhere('short', 'guest', FALSE, 'aa', 'Role', 'r')\n//\t\t\t->addWhereDqlString('aa.is_action_method = ? AND aa.resource LIKE ? ', array(TRUE, 'default.%'))\n\t\t\t->setButton('Update', array('action'=>'update', 'controller'=>'translator', 'module'=>'system'), 'update', FALSE)\n//\t\t\t->disableSaveWhere()\n\t\t\t->showListTranslateColumn('text', 'Text', 125, TRUE)\n//\t\t\t->useDbWhere(FALSE)\n//\t\t\t->showAjax();\n//\t\t\t->doNotRedirect()\n//\t\t\t->setDeleteOldList()\n\t\t;\n\n\t\t$this->_modelListConfig = array(\n\t\t\t'order'=>array(\n\t\t\t),\n\t\t\t'addIgnoredColumns'=>array(\n\t\t\t),\n\t\t\t'addIgnoredM2nRelations'=>array(\n\t\t\t),\n\t\t\t'ignoreColumnRelation'=>array(\n\t\t\t),\n\t\t\t'ignoreColumnInMultiRelation'=>array(\n\t\t\t),\n\t\t\t'relationM2nValuesDefinition'=>array(\n\t\t\t),\n\t\t\t'mediaDirectory'=>array(\n\t\t\t),\n\t\t\t'mediaRole'=>array(\n\t\t\t),\n\t\t\t'columnLabels'=>array(\n\t\t\t),\n\t\t\t'buttonLabel'=>'Save',\n\t\t\t'columnTypes'=>array(\n\t\t\t\t'text'=>'textarea',\n\t\t\t),\n\t\t\t'addStaticFormElements'=>array(\n\t\t\t),\n\t\t\t'M2NRelations'=>array(\n\t\t\t),\n\t\t\t'replaceColumnValuesInMultiRelation'=>array(\n\t\t\t),\n\t\t\t'relationColumnInMultiRelation'=>array(\n\t\t\t),\n\t\t\t'multiRelationCondition'=>array(\n\t\t\t),\n\t\t\t'tinyMCE'=>array(\n\t\t\t),\n\t\t\t'setFormLanguage'=>L8M_Locale::getDefaultSystem(),\n\t\t\t'action'=>$this->_request->getActionName(),\n\t\t\t//'debug'=>TRUE,\n\t\t);\n\n\t\t$this->view->modelFormListButtons = $this->_modelList->getButtons(NULL, $this->_modelListShort, $this->_modelListConfig);\n\t}", "title": "" }, { "docid": "97fd3b6fded1d43d57df9c347ed712a5", "score": "0.58872014", "text": "public function model()\n {\n return Listing::class;\n }", "title": "" }, { "docid": "7b36aafc06016da5336150c24855075a", "score": "0.5835575", "text": "abstract public static function getModelName();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5832894", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5832894", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5832894", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5832894", "text": "public function getModel();", "title": "" }, { "docid": "04b7729d130e64a26184ca43436f02f8", "score": "0.58107805", "text": "public function describe(&$model) {\n\t\t$cache = parent::describe($model);\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\t\t$fields = (array) $this->read($model);\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "fc7a52a95281932b7ebb1d8e9c8c7a7f", "score": "0.5802826", "text": "public function getListName()\n {\n return $this->listName;\n }", "title": "" }, { "docid": "064522b86f88cfe5700f65b808909d83", "score": "0.57780355", "text": "public function GetList()\n {\n return 'table';\n }", "title": "" }, { "docid": "f0c7f0f231cbf980765f9d7971cbf712", "score": "0.5772843", "text": "public function getListName()\n {\n return $this->listName;\n }", "title": "" }, { "docid": "983d010107fb4aa484290b8519f89d60", "score": "0.57717526", "text": "public function getName()\n {\n return 'octava_translation_list_type';\n }", "title": "" }, { "docid": "74590f72de7879291c21aae0df0a0edb", "score": "0.576641", "text": "function table_description():string\n\t{\n\t\treturn( \"presents many-to-many link\" );\n\t}", "title": "" }, { "docid": "667e98265c2618fa8ed7b41869c07499", "score": "0.57585275", "text": "public function init ()\n\t{\n\n\t\t/**\n\t\t * set headline\n\t\t */\n\t\t$this->_helper->layout()->headline = $this->view->translate('Administration') . ' - ModelList';\n\t\t$this->_helper->layout()->headline .= ': ' . $this->view->translate($this->_modelListUntranslatedTitle);\n\n\t\t/**\n\t\t * pass through parent to prevent errors\n\t\t */\n\t\tparent::init();\n\n\t\t/**\n\t\t * start model list\n\t\t */\n\t\t$this->_modelList = new L8M_ModelForm_List($this->_modelListName, $this);\n\t\t$this->_modelList\n\t\t\t->setDefault('listTitle', $this->view->translate($this->_modelListUntranslatedTitle))\n\t\t\t->disableSubLinks()\n//\t\t\t->disableButtonAdd()\n//\t\t\t->disableButtonDelete()\n//\t\t\t->addWhere('short', 'guest', FALSE, 'aa', 'Role', 'r')\n//\t\t\t->addWhereDqlString('aa.is_action_method = ? AND aa.resource LIKE ? ', array(TRUE, 'default.%'))\n//\t\t\t->setButton('Update', array('action'=>'update', 'controller'=>'action', 'module'=>'system'), 'update', FALSE)\n\t\t\t->setButton('Send', array('action'=>'send', 'controller'=>'survey', 'module'=>'admin'), 'update', TRUE)\n\t\t\t->setButton('Duplicate', array('action'=>'duplicate', 'controller'=>'survey', 'module'=>'admin'), 'update', TRUE)\n\t\t\t->setButton('Analytics', array('action'=>'analytics', 'controller'=>'survey', 'module'=>'admin'), 'update', TRUE)\n\n//\t\t\t->disableSaveWhere()\n//\t\t\t->useDbWhere(FALSE)\n//\t\t\t->showAjax();\n//\t\t\t->doNotRedirect()\n//\t\t\t->setDeleteOldList()\n\t\t;\n\n\t\t$this->_modelListConfig = array(\n\t\t\t'order'=>array(\n\t\t\t),\n\t\t\t'addIgnoredColumns'=>array(\n\t\t\t),\n\t\t\t'addIgnoredM2nRelations'=>array(\n\t\t\t),\n\t\t\t'ignoreColumnRelation'=>array(\n\t\t\t),\n\t\t\t'ignoreColumnInMultiRelation'=>array(\n\t\t\t),\n\t\t\t'relationM2nValuesDefinition'=>array(\n\t\t\t),\n\t\t\t'mediaDirectory'=>array(\n\t\t\t),\n\t\t\t'mediaRole'=>array(\n\t\t\t),\n\t\t\t'columnLabels'=>array(\n\t\t\t),\n\t\t\t'buttonLabel'=>'Save',\n\t\t\t'columnTypes'=>array(\n\t\t\t\t'survey_data' => 'textarea'\n\t\t\t),\n\t\t\t'addStaticFormElements'=>array(\n\t\t\t),\n\t\t\t'M2NRelations'=>array(\n\t\t\t),\n\t\t\t'replaceColumnValuesInMultiRelation'=>array(\n\t\t\t),\n\t\t\t'relationColumnInMultiRelation'=>array(\n\t\t\t),\n\t\t\t'multiRelationCondition'=>array(\n\t\t\t),\n\t\t\t'tinyMCE'=>array(\n\t\t\t),\n\t\t\t'setFormLanguage'=>L8M_Locale::getDefaultSystem(),\n\t\t\t'action'=>$this->_request->getActionName(),\n\t\t\t//'debug'=>TRUE,\n\t\t);\n\n\t\t$this->view->modelFormListButtons = $this->_modelList->getButtons(NULL, $this->_modelListShort, $this->_modelListConfig);\n\t}", "title": "" }, { "docid": "71278b540667e90dce17831111c9941c", "score": "0.5754183", "text": "public static function modelTitle()\n {\n return 'Тип акции';\n }", "title": "" }, { "docid": "f0f2897ce4725d95601e6122fcdb95c0", "score": "0.5751302", "text": "public function lists()\n {\n return $this->model->orderBy('descripcion', 'ASC')->lists('descripcion', 'id_fondo');\n }", "title": "" }, { "docid": "70d84d212a86108475a049713193e2fe", "score": "0.57360005", "text": "public function describe($model) {\n\t\t$table = $this->fullTableName ( $model, false, false );\n\t\t$cache = parent::describe ( $table );\n\t\tif ($cache) {\n\t\t\treturn $cache;\n\t\t}\n\t\t$fields = array ();\n\t\t$result = $this->_execute ( 'PRAGMA table_info(' . $this->value ( $table, 'string' ) . ')' );\n\t\t\n\t\tforeach ( $result as $column ) {\n\t\t\t$column = ( array ) $column;\n\t\t\t$default = ($column ['dflt_value'] === 'NULL') ? null : trim ( $column ['dflt_value'], \"'\" );\n\t\t\t\n\t\t\t$fields [$column ['name']] = array (\n\t\t\t\t\t'type' => $this->column ( $column ['type'] ),\n\t\t\t\t\t'null' => ! $column ['notnull'],\n\t\t\t\t\t'default' => $default,\n\t\t\t\t\t'length' => $this->length ( $column ['type'] ) \n\t\t\t);\n\t\t\tif ($column ['pk'] == 1) {\n\t\t\t\t$fields [$column ['name']] ['key'] = $this->index ['PRI'];\n\t\t\t\t$fields [$column ['name']] ['null'] = false;\n\t\t\t\tif (empty ( $fields [$column ['name']] ['length'] )) {\n\t\t\t\t\t$fields [$column ['name']] ['length'] = 11;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$result->closeCursor ();\n\t\t$this->_cacheDescription ( $table, $fields );\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "2300e1f359ea1cfb2d9bd65e2bddf8bd", "score": "0.57325596", "text": "public function getNameAttribute () {\n return $this->model;\n }", "title": "" }, { "docid": "ee3006976a0b8943937f03b78dbf552e", "score": "0.5724724", "text": "public function index()\n {\n return view('admin.attributes.attr_list');\n }", "title": "" }, { "docid": "869ea34ddda334e8afc41569970a011d", "score": "0.5724328", "text": "public function getModel() {}", "title": "" }, { "docid": "8c9023bdb47f11e797226f774adf6fed", "score": "0.571685", "text": "public function attributeLabels()\n\t{\n\t\treturn array(\n\t\t\t'list'=>Yii::t('code', 'List'),\n\t\t\t'output'=>Yii::t('code', 'Output'),\n\t\t\t'totalCount'=>Yii::t('code', 'Total Count'),\n\t\t\t'activeCount'=>Yii::t('code', 'Active Count'),\n\t\t\t'emptyCount'=>Yii::t('code', 'Empty Count'),\n\t\t\t'repeatCount'=>Yii::t('code', 'Repeat Count'),\n\t\t);\n\t}", "title": "" }, { "docid": "eef2b820a7e427ca06ce2932b738bcc8", "score": "0.57162267", "text": "public function model()\n {\n return TodoList::class;\n }", "title": "" }, { "docid": "1022a0c89f337fdbc44d1c7153c89fee", "score": "0.5713375", "text": "public function attributeLabels()\n\t{\n\t\treturn array_merge(parent::attributeLabels(), array(\n 'type' => \\yii::t('app', 'Type of auth item'),\n\t\t\t'name' => \\yii::t('app', 'Name'),\n 'description' => \\yii::t('app', 'Description'),\n 'bizRule' => \\yii::t('app', 'Business rule'),\n 'data' => \\yii::t('app', 'Additional data'),\n 'children' => \\yii::t('app', 'List of children'),\n\t\t));\n\t}", "title": "" }, { "docid": "009b508a12e3f2776bd823765236718d", "score": "0.5704767", "text": "protected function _getModelLabels(){\n return ORM::factory($this->model_name)->labels();\n }", "title": "" }, { "docid": "be7a1ab070c313f8fd8c35634c60c16d", "score": "0.56965303", "text": "public function attributeLabels()\r\n\t {\r\n\t return [\r\n\t 'nivel' => Yii::t('backend', ''),\r\n\t 'descripcion' => Yii::t('backend', ''),\r\n\r\n\r\n\t ];\r\n\t }", "title": "" }, { "docid": "e87be04d9d556cd7b11e1c0f2da6838d", "score": "0.5689406", "text": "function describe(&$model) {\n\t\t// describe caching\n\t\t$cache = $this->__describeFromCache($model);\n\t\tif ($cache != null) {\n\t\t\treturn $cache;\n\t\t}\n\t\t\n\t\t$fm_layout = $model->defaultLayout;\n\t\t$fm_database = $model->fmDatabaseName;\n\t\t\n\t\t// set basic connection data\n\t\t$this->fm =& new Filemaker($fm_database, $this->config['host'], $this->config['login'], $this->config['password']);\n\t\t\n\t\t// get layout info\n\t\t$result = $this->fm->getLayout($fm_layout);\n\t\t\n\t\t$fieldsOut = array();\n\t\t\n\t\t$fmFieldTypeConversion = array(\n\t\t\t'text' => 'string',\n\t\t\t'date' => 'date',\n\t\t\t'time' => 'time',\n\t\t\t'timestamp' => 'timestamp',\n\t\t\t'number' => 'float',\n\t\t\t'container' => 'binary'\n\t\t);\n\t\t\n\t\t\n\t\tforeach($result->getFields() as $field_name => $field_info) {\n\t\t\t$type = $fmFieldTypeConversion[$field_info->getResult()];\n\t\t\t$fieldsOut[$field_info->getName()] = array(\n\t\t\t\t'type' => $type,\n\t\t\t\t'null' => null,\n\t\t\t\t'default' => null,\n\t\t\t\t'length' => null,\n\t\t\t\t'key' => null\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->__cacheDescription($this->fullTableName($model, false), $fieldsOut);\n\t\treturn $fieldsOut;\n\t}", "title": "" }, { "docid": "5f2b16215522a693080badc24beb6dc0", "score": "0.56888664", "text": "public function getModelDefinition(): array\n {\n return [\n 'categoryData' => [ 'model' => Categories::class, 'array' => false ],\n 'filterRanges' => [ 'model' => FilterRanges::class, 'array' => true ],\n 'filters' => [ 'model' => Filters::class, 'array' => true ],\n ];\n }", "title": "" }, { "docid": "915280e5a61586c6e501d81558efe344", "score": "0.56776035", "text": "public function getModelInfo()\n {\n return $this->model_info;\n }", "title": "" }, { "docid": "dbb4cc069f64009485b994db00fc8ce9", "score": "0.56718624", "text": "public static function modelTitle()\n {\n return 'Индивидуальные планы по акции по Аптекам';\n }", "title": "" }, { "docid": "971744ad8daa7800febb1483e9c98e4f", "score": "0.56691533", "text": "public function __toString()\n\t{\n\t\treturn get_class($this).': '.Jelly::model_name($this->_model).' ('.$this->count().')';\n\t}", "title": "" }, { "docid": "53a867a3fa21199c2509cd30b1a963f3", "score": "0.56683105", "text": "public function getAttributes($model);", "title": "" }, { "docid": "27205a5730e3248b085b7279e2acdced", "score": "0.56651384", "text": "public function getModel(){ }", "title": "" }, { "docid": "4685c36d04ecff42b81c766255bb0776", "score": "0.566274", "text": "abstract function getModel();", "title": "" }, { "docid": "95db80564ac573d28e90e0ec3dd3abf1", "score": "0.566041", "text": "protected function setupListOperation()\n {\n // CRUD::setFromDb(); // columns\n\n \n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']); \n */\n CRUD::addColumns([\n [\n 'label' => 'No',\n 'name' => 'exam_no',\n 'type' => 'text'\n ],\n [\n 'label' => 'Category',\n 'name' => 'category_id',\n 'type' => 'select',\n 'entity' => 'category',\n 'attribute' => 'category_name',\n 'model' => 'App\\Models\\Category',\n 'orderable' => false,\n 'limit' => 150,\n ],\n [\n 'label' => 'Exam Name',\n 'name' => 'exam_name',\n 'type' => 'text',\n ],\n ]);\n }", "title": "" }, { "docid": "6b0650fb5c62f2e727cfee1572f73d0a", "score": "0.5657604", "text": "public function getModelName()\n {\n return $this->model_name;\n }", "title": "" }, { "docid": "7b769bdc7603781c222987a3bdae8b45", "score": "0.5652922", "text": "public function getListaDesc()\n {\n return $this->lista_desc;\n }", "title": "" }, { "docid": "4e11791e170934fa1a387243dcf14374", "score": "0.5652006", "text": "protected function configureListFields(ListMapper $listMapper)\n{\n $listMapper\n ->add('nombre')\n ->add('descripcion')\n ->add('rama.nombre');\n }", "title": "" }, { "docid": "20347fbccb94a0de723f5b6a04d3c7fb", "score": "0.5641421", "text": "public function getCarModel()\n {\n // in order to get the class name\n return \" The <b>\" . __CLASS__ . \"</b> model is: \" . $this -> model;\n }", "title": "" }, { "docid": "175c2a63c3fb9a0dee2b6f992ece50aa", "score": "0.5640039", "text": "public static function modelTitle()\n {\n return 'Вход администратора';\n }", "title": "" }, { "docid": "4c12c9dea0007bf4209a753ff2a47701", "score": "0.5632468", "text": "abstract public function getModel();", "title": "" }, { "docid": "4c12c9dea0007bf4209a753ff2a47701", "score": "0.5632468", "text": "abstract public function getModel();", "title": "" }, { "docid": "4c12c9dea0007bf4209a753ff2a47701", "score": "0.5632468", "text": "abstract public function getModel();", "title": "" }, { "docid": "d7513cda80013a2a41376b94f85375b4", "score": "0.56285685", "text": "public function getModel()\n {\n return $this->_model_status['str'];\n }", "title": "" }, { "docid": "8ad122d7642dca7bc23ef8ab25331231", "score": "0.5628408", "text": "public function getElementDescription() {\n\t\treturn $this->table . ' Record';\n\t}", "title": "" }, { "docid": "846547aa69d7c3d9da8b62e632221596", "score": "0.56247026", "text": "abstract protected function getModel();", "title": "" }, { "docid": "846547aa69d7c3d9da8b62e632221596", "score": "0.56247026", "text": "abstract protected function getModel();", "title": "" }, { "docid": "b13112fea6ed690fa15308bff7c70a3b", "score": "0.5621714", "text": "public function __toString()\n\t{\n\t\treturn (string) get_class($this).': '.$this->_model;\n\t}", "title": "" }, { "docid": "5daf98df99d9e049b69298468c1c62f3", "score": "0.5612425", "text": "public function attributes()\n {\n return [\n 'name' => '名称',\n 'description' => '描述',\n 'permissions' => '权限集合',\n 'permissions.*' => '权限名称',\n ];\n }", "title": "" }, { "docid": "02b28a597d5e4cf0ec248c5aaa574e83", "score": "0.56066334", "text": "public function getModelFields()\n {\n return [\n 'id' => (new LaradminField('ID'))\n ->setWidget(new TextWidget())\n ->setInput(new TextInput()),\n\n 'name' => (new LaradminField('Full name'))\n ->setWidget(new TextWidget())\n ->setInput(new TextInput()),\n\n 'email' => (new LaradminField('E-mail address'))\n ->setWidget(new EmailWidget())\n ->setInput(new TextInput()),\n ];\n }", "title": "" }, { "docid": "f4369aa255e49b28b9827c49621bd145", "score": "0.5606163", "text": "public function getAttributesForDisplayAttributes()\n {\n throw new NotImplementedException();\n }", "title": "" }, { "docid": "37448e4421034c7c54a53c0d32a62f36", "score": "0.55895823", "text": "public function get_model_fields() {\n\t\treturn $this->module['field_data']['model'];\n\t}", "title": "" }, { "docid": "3078b7fa13c89d606986d9360877c488", "score": "0.5587129", "text": "function model(): string\n {\n return 'Webkul\\Product\\Contracts\\ProductAttributeValue';\n }", "title": "" }, { "docid": "3c7409aa4167377ce94b46cb79bd9aec", "score": "0.5584249", "text": "public function model()\n {\n return Attribute::class;\n }", "title": "" }, { "docid": "0d3afd9e1f5e31b35d792bdebe0a78da", "score": "0.5580833", "text": "function libraryDisplayName($val, $model) {\n\treturn $model->name;\n}", "title": "" }, { "docid": "60211b3e8610d017e14f6fb9a868e0a9", "score": "0.55807626", "text": "abstract public function getModel(): string;", "title": "" }, { "docid": "05a5b56c913f47fc9b982f4f7b2198b3", "score": "0.55578166", "text": "public function attributeLabels()\n\t{\n\t\treturn ModelHelper::getAttributeLabels($this);\n\t}", "title": "" }, { "docid": "989da8128338dc3907eac879f864841f", "score": "0.55558294", "text": "public function describe (&$model) {\r\n\t\t\r\n\t\tif ($this->cacheSources === false) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$table = $model->tablePrefix . $model->table;\r\n\r\n\t\tif (isset($this->__descriptions[$table])) {\r\n\t\t\treturn $this->__descriptions[$table];\r\n\t\t}\r\n\t\t$cache = $this->__cacheDescription($table);\r\n\r\n\t\tif ($cache !== null) {\r\n\t\t\t$this->__descriptions[$table] =& $cache;\r\n\t\t\treturn $cache;\r\n\t\t}\r\n\t\t\r\n\t\t$fields = false;\r\n\t\t$cols = $this->query('DESCRIBE ' . $this->fullTableName($model));\r\n\r\n\t\tforeach ($cols as $column) {\r\n\t\t\t$colKey = array_keys($column);\r\n\t\t\tif (isset($column[$colKey[0]]) && !isset($column[0])) {\r\n\t\t\t\t$column[0] = $column[$colKey[0]];\r\n\t\t\t}\r\n\t\t\tif (isset($column[0])) {\r\n\t\t\t\t$fields[$column[0]['Field']] = array(\r\n\t\t\t\t\t'type' => $this->column($column[0]['Type']),\r\n\t\t\t\t\t'null' => false, // TODO: Any way to detect whether or not NULL is acceptable?\r\n\t\t\t\t\t'default' => '',\r\n\t\t\t\t\t'length' => 0, // TODO: Add in true 'length' support\r\n\t\t\t\t);\r\n\t\t\t\tif (!empty($column[0]['Key']) && isset($this->index[$column[0]['Key']])) {\r\n\t\t\t\t\t$fields[$column[0]['Field']]['key'] = $this->index[$column[0]['Key']];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->__cacheDescription($this->fullTableName($model, false), $fields);\r\n\t\t\r\n\t\treturn $fields;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "acf95e6884d1ff5204bbc1309269d53a", "score": "0.55397224", "text": "public function getDescriptionAttribute()\n {\n return 'This is a test room description.';\n }", "title": "" }, { "docid": "ad30ec0f6f49279e3617672883c6722c", "score": "0.5533544", "text": "function model() {\n }", "title": "" }, { "docid": "bb0d1aebbb70ce8d8f422e012e827af9", "score": "0.5532674", "text": "public function attributeLabels()\n {\n return array(\n 'json'=>Yii::t('code', 'Json'),\n 'jsonencode'=>Yii::t('code', 'Json Encode'),\n 'array'=>Yii::t('code', 'Array'),\n 'likearray'=>Yii::t('code', 'Like Array'),\n 'postman'=>Yii::t('code', 'Postman'),\n 'list'=>Yii::t('code', 'List'),\n 'listspace'=>Yii::t('code', 'List Space'),\n 'choice'=>Yii::t('code', 'Choice'),\n 'sort'=>Yii::t('code', 'Sort'),\n 'sortByAssoc'=>Yii::t('code', 'Sort By Assoc'),\n 'sortByKey'=>Yii::t('code', 'Sort By Key'),\n 'sortByRecurse'=>Yii::t('code', 'Sort By Recurse'),\n );\n }", "title": "" }, { "docid": "58287889e469828441fa5dcafec714c4", "score": "0.5531889", "text": "function MeaningModel()\r\n {\r\n parent::Model();\r\n }", "title": "" }, { "docid": "0dafa5601fe10249c10fcff479f68225", "score": "0.5517453", "text": "protected function listModelRead(&$nameListModel, &$params, &$addItemsTopbarExtras) {\n\t\t$nameListModel = 'hld_inc_docs';\n\t\t\n\t\t$params[] = 'id_hld_incident';\n\t}", "title": "" }, { "docid": "2f76d46cea7de17ddee6235608c3d10a", "score": "0.5514785", "text": "public static function listTitle()\n {\n return 'Участники акции';\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.55024385", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.55024385", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.55024385", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" } ]
18e9365655113d29d392862f9d22960b
tampil form ubah ptsp22
[ { "docid": "887334d9a6362225e6cc5413f045a08d", "score": "0.0", "text": "public function form_ubah_ptsp22($id_permohonan)\n {\n $data_title['title'] = 'Form Ubah Permohonan';\n $data['pemohon'] = $this->db->get_where('pemohon', ['id_pemohon' =>\n $this->session->userdata('id_pemohon')])->row_array();\n $data['total_notif'] = $this->m_pemohon->jml_notif()->result();\n\n $data_detail['detail_ptsp'] = $this->m_pemohon->get_detail_ptsp22($id_permohonan)->result();\n\n $this->load->view('header', $data_title);\n $this->load->view('pemohon/sidebar_pemohon');\n $this->load->view('topbar', $data);\n $this->load->view('pemohon/ptsp22/form_ubah_ptsp22', $data_detail);\n $this->load->view('footer');\n }", "title": "" } ]
[ { "docid": "1df0ad21df2e2652ec9728a2658d028f", "score": "0.62836206", "text": "function tampilAngkaNormal($jkel, $paatas, $pabawah, $piatas, $pibawah, $angka){\n\tif($angka=='0'){\n\t\treturn $paatas;\n\t}else if($angka=='1'){\n\t\tif($jkel=='L'){\n\t\t\tif($pabawah==0){\n\t\t\t\t$hasil = ' < '.format_uang($paatas);\n\t\t\t}else if($paatas==0){\n\t\t\t\t$hasil = ' > '.format_uang($pabawah);\n\t\t\t}else{\n\t\t\t\t$hasil = format_uang($pabawah).' - '.format_uang($paatas);\n\t\t\t}\n\t\t\t//$hasil = $pabawah.' - '.$paatas;\n\t\t\treturn $hasil;\n\t\t}else{\n\t\t\tif($pibawah==0){\n\t\t\t\t$hasil = ' < '.format_uang($piatas);\n\t\t\t}else if($piatas==0){\n\t\t\t\t$hasil = ' > '.format_uang($pibawah);\n\t\t\t}else{\n\t\t\t\t$hasil = format_uang($pibawah).' - '.format_uang($piatas);\n\t\t\t}\n\t\t\t//$hasil = $pibawah.' - '.$piatas;\n\t\t\treturn $hasil;\n\t\t}\n\t}else{\n\t\tif($jkel=='L'){\n\t\t\t//$hasil = format_uang($pabawah).' - '.format_uang($paatas);\n\t\t\t//echo $pabawah;\n\t\t\tif($pabawah==0){\n\t\t\t\t$hasil = ' < '.$paatas;\n\t\t\t}else if($paatas==0){\n\t\t\t\t$hasil = ' > '.$pabawah;\n\t\t\t}else{\n\t\t\t\t$hasil = $pabawah.' - '.$paatas;\n\t\t\t}\n\t\t\treturn $hasil;\n\t\t}else{\n\t\t\t//$hasil = format_uang($pibawah).' - '.format_uang($piatas);\n\t\t\t//echo $pibawah;\n\t\t\tif($pibawah==0){\n\t\t\t\t$hasil = ' < '.$piatas;\n\t\t\t}else if($piatas==0){\n\t\t\t\t$hasil = ' > '.$pibawah;\n\t\t\t}else{\n\t\t\t\t$hasil = $pibawah.' - '.$piatas;\n\t\t\t}\n\t\t\treturn $hasil;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "00a1b0ad29343b35206eba1a6531a67f", "score": "0.62347734", "text": "public function tipotarjeta();", "title": "" }, { "docid": "b5a157d6f88675f759cf8dfa5f6bc118", "score": "0.62151146", "text": "function ubahTanggalPanjang($tanggal) {\n $tahun = substr($tanggal, 0, 4);\n $bulan = substr($tanggal, 5, 2);\n $hari = substr($tanggal, 8, 2);\n $jam = substr($tanggal, 11, 2);\n $menit = substr($tanggal, 14, 2);\n $detik = substr($tanggal, -2);\n $tg = \"$hari-$bulan-$tahun $jam:$menit:$detik\";\n return $tg;\n }", "title": "" }, { "docid": "495a2c0b9530204b5224a97f0d62475d", "score": "0.6164637", "text": "function uptab13() {\r\n\r\n global $x, $st, $kztab, $abjuli;\r\n\r\n if ($x < 8131)\r\n $st = 0;\r\n else {\r\n if ($x < 13470) {\r\n $y = ($x - 8130) / 10000;\r\n $rw = $y * 933.70;\r\n $rw = $rw + 1400;\r\n $st = floor($rw * $y);\r\n }\r\n else {\r\n if ($x < 52882) {\r\n $y = ($x - 13469) / 10000;\r\n $rw = $y * 228.74;\r\n $rw = $rw + 2397;\r\n $rw = $rw * $y;\r\n $st = floor($rw + 1014);\r\n }\r\n else {\r\n if( $x < 250731)\r\n $st = floor($x * 0.42 - 8196);\r\n else\r\n $st = floor($x * 0.45 - 15718);\r\n }\r\n }\r\n }\r\n\r\n $st = $st * $kztab;\r\n}", "title": "" }, { "docid": "c35d3935dea662e6a15105fc91708fc6", "score": "0.6144143", "text": "function ubahTanggalPendek($tanggal) {\n $tahun = substr($tanggal, 0, 4);\n $bulan = substr($tanggal, 5, 2);\n $hari = substr($tanggal, -2);\n $tg = \"$hari-$bulan-$tahun\";\n return $tg;\n }", "title": "" }, { "docid": "2852bdbdb82a83d9d3253898bfcaf75f", "score": "0.6014397", "text": "function show_equal_pph_pasal_21()\n\t{\n\t\t$this->template->set('title', 'Laporan Ekualisasi PPh Psl 21\t');\n\t\t$data['subtitle']\t= \"Cetak Laporan Ekualisasi PPh Psl 21\";\n\t\t$data['activepage'] = \"laporan_ekualisasi\";\n\t\t$this->template->load('template', 'laporan/lap_equalisasi_pph_psl_21',$data);\t\t\n\t}", "title": "" }, { "docid": "8234631f18f39a5d150cc5a451d1c6de", "score": "0.598929", "text": "function mlstjahr() {\r\n\r\n global $st, $zre4, $kennvmt, $zve, $stkl, $zre4vmt, $ztabfb, $vmt, $vkapa, $vsp, $kztab, $x, $stovmt;\r\n\r\n upevp();\r\n\r\n if($kennvmt != 1){\r\n $zve = $zre4 - $ztabfb - $vsp;\r\n upmlst();\r\n }\r\n\r\n else {\r\n $zve = $zre4 - $ztabfb - $vsp - $vmt/100 - $vkapa/100;\r\n\r\n if($zve < 0) {\r\n $zve = ($zve + $vmt/100 + $vkapa/100)/5;\r\n upmlst();\r\n $st = $st * 5;\r\n }\r\n\r\n else {\r\n upmlst();\r\n $stovmt = $st;\r\n $zve = $zve + ($vmt+$vkapa)/500;\r\n upmlst();\r\n $st = ($st - $stovmt)*5 + $stovmt;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "0327b3dc2579d4c6d22ca39a983a74a1", "score": "0.598735", "text": "function f_tupmil($l_up,$l_val){\n// echo \"--\".$l_up,\"--\".$l_val;\n for ($i=0; $i < 4; $i = $i + 1 ) {\n $numero = substr($l_up,$i,1);\n\t \n switch($i){ \n\t case 0:\n\t\t if ($numero == 1) {\n\t\t\t\t $l_frase0 = \" \";\n\t\t\t\t }else{\n\t\t $l_frase = f_tunidad($numero, $l_val);\n\t\t\t\t $l_frase0 = $l_frase;\n\t\t\t\t // echo \"---\".$l_frase0.\"---\";\n\t\t\t\t }\n\t\t\t\tbreak;\n\t\t\tcase 1:\n // echo $numero, \"-cent-\";\t\t\t\n\t\t\t\t if ($numero == 1){\n\t\t $cen = 100;\n\t\t\t\t\t $l_frase1 = \"CIENTO\";\n\t\t\t\t\t}else{\n\t\t\t\t $l_frase1 = f_tcentena($numero,$l_val);\n\t\t\t\t\t}\n\t\t\t\t break;\n\t\t\tcase 2:\t\t\n\t\t\t $dec = substr($l_val,2,2);\n\t\t//\t echo \"dec_mil \", $l_val;\n\t\t\t\t if ($dec > 19) {\n\t\t\t\t $dec = $numero;\n\t\t\t\t }else{\n\t\t\t\t\t $dec = substr($l_val,2,2);\n\t\t\t\t\t }\n\t\t\t\t\t$dec5 = substr($l_val,2,1); \n\t\t\t\t\t// echo \"dec_mil \", $l_val,\"--\".$dec.\"**\".$dec5;\n\t\t\t\t\t if ($dec5 > 0){\t\t\n\t\t $l_frase2 = f_tdezena($dec, $l_val);\n\t\t\t\t\t }else{\n\t\t\t\t\t $l_frase2 = \"\";\n\t\t\t\t\t }\n\t\t\t\t break;\n\t\t\tcase 3:\n\t\t $l_frase3 = f_tunidad($numero, $l_val);\n\t\t\t\t if ($numero == 1){\n\t\t\t\t $l_frase3 = \"UNO\";\n\t\t\t}\t\t \n\t\t\t\t break;\t \n\t }\n }\nif ($dec5 > 0){\t \n $l_fraset = $l_frase0. \" MIL \". $l_frase1. \" \". $l_frase2. \" Y \".$l_frase3;\n}else{\n $l_fraset = $l_frase0. \" MIL \". $l_frase1. \" \". $l_frase2. \" \".$l_frase3;\n }\n return $l_fraset;\n}", "title": "" }, { "docid": "0ba6dc8ff84790d3193420f9f0f0e619", "score": "0.59824896", "text": "function balikTanggalPendek($tanggal) {\n $tahun = substr($tanggal, -4);\n $bulan = substr($tanggal, 3, 2);\n $hari = substr($tanggal, 0, 2);\n $tg = \"$tahun-$bulan-$hari\";\n return $tg;\n }", "title": "" }, { "docid": "7243fa2aaa7c0bdaf7e3542d7bb615bd", "score": "0.5977071", "text": "function upmlst() {\r\n\r\n global $zve, $stkl, $kztab, $x;\r\n\r\n\r\n if ($zve < 1) {\r\n $zve = 0;\r\n $x = 0;\r\n }\r\n else\r\n $x = floor($zve / $kztab); // auf Euro abrunden\r\n\r\n if ($stkl < 5)\r\n uptab13();\r\n else\r\n mst5_6();\r\n }", "title": "" }, { "docid": "5caea4ffa527b9f691cf18645ce6d017", "score": "0.5959819", "text": "function tahun($tanggal){\n\t$thn=substr($tanggal,6,4);\n\t$awal=\"$thn\";\n\treturn $awal;\n}", "title": "" }, { "docid": "53b63cb4fbf2a51c52a5a0f2226b0848", "score": "0.58492434", "text": "function pripremiTekst($broj)\r\n{\r\n\t$poruka='broj je neparan: ';\r\n\tif($broj%2==0)\r\n\t\t$poruka='broj je paran: ';\r\n\treturn $poruka;\r\n}", "title": "" }, { "docid": "636d3d506c2f04fc6b00f30f140da125", "score": "0.5805596", "text": "public function prognozakurs(){\n\t //SKIDANJE PROGNOZE\n\t // skini sa RHMZ sajta stranicu na kojoj je tabela sa temperaturama u vecim gradovima u srbiji\n\t $celaprognoza = file_get_contents('http://www.hidmet.gov.rs/latin/prognoza/index.php'); \n\t //$resultprognoza['celaprognoza'] = $celaprognoza;\n\t $celaprognoza = str_replace(' ', '', $celaprognoza); //izbaci space-ove iz stringa sbog lakseg substring-ovanja u daljem radu\n\t // izvuci za svaki grad trocifrenu temperaturu (posto moze biti dvocifreni minus)\n\t // izvuci temperaturu za BG\n\t $pozicijabg = strpos($celaprognoza, 'Beograd</td>'); \n\t $prognozabg = substr($celaprognoza, $pozicijabg+54, 3);\n\t $zadnjikarakterbg = substr($prognozabg, -1);\n\t if($zadnjikarakterbg == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozabg = substr($prognozabg, 0, -1);\n\t }elseif($zadnjikarakterbg == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozabg = substr($prognozabg, 0, -2);\n\t }\n\t $resultprognoza['bg'] = $prognozabg;\n // izvuci temperaturu za NS\n\t $pozicijans = strpos($celaprognoza, 'NoviSad</td>'); // posto su izbaceni space-ovi nije vise 'Novi Sad' nego 'NoviSad'\n\t $prognozans = substr($celaprognoza, $pozicijans+54, 3);\n\t $zadnjikarakterns = substr($prognozans, -1);\n\t if($zadnjikarakterns == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozans = substr($prognozans, 0, -1);\n\t }elseif($zadnjikarakterns == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozans = substr($prognozans, 0, -2);\n\t }\n\t $resultprognoza['ns'] = $prognozans; \n\t // izvuci temperaturu za Kopaonik\n\t $pozicijakop = strpos($celaprognoza, 'Kopaonik</td>'); \n\t $prognozakop = substr($celaprognoza, $pozicijakop+55, 3);\n\t $zadnjikarakterkop = substr($prognozakop, -1);\n\t if($zadnjikarakterkop == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozakop = substr($prognozakop, 0, -1);\n\t }elseif($zadnjikarakterkop == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozakop = substr($prognozakop, 0, -2);\n\t }\n\t $resultprognoza['kop'] = $prognozakop; \n\t // izvuci temperaturu za NIS\n\t $pozicijanis = strpos($celaprognoza, 'Niš</td>'); \n\t $prognozanis = substr($celaprognoza, $pozicijanis+51, 3);\n\t $zadnjikarakternis = substr($prognozanis, -1);\n\t if($zadnjikarakternis == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozanis = substr($prognozanis, 0, -1);\n\t }elseif($zadnjikarakternis == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozanis = substr($prognozanis, 0, -2);\n\t }\n\t $resultprognoza['nis'] = $prognozanis;\n\t // izvuci temperaturu za KG\n\t $pozicijakg = strpos($celaprognoza, 'Kragujevac</td>'); \n\t $prognozakg = substr($celaprognoza, $pozicijakg+57, 3);\n\t $zadnjikarakterkg = substr($prognozakg, -1);\n\t if($zadnjikarakterkg == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozakg = substr($prognozakg, 0, -1);\n\t }elseif($zadnjikarakterkg == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozakg = substr($prognozakg, 0, -2);\n\t }\n\t $resultprognoza['kg'] = $prognozakg;\n\t \n\t //SKIDANJE KURSNE LISTE\n\t // skini srednji kurs sa NBS sajta\n\t $celakursnalista = file_get_contents('http://www.nbs.rs/kursnaListaModul/srednjiKurs.faces?lang=lat');\n\t $celakursnalista = str_replace(' ', '', $celakursnalista); //izbaci space-ove iz stringa sbog lakseg substring-ovanja u daljem radu\n\t // EUR\n\t $pozicijaeur = strpos($celakursnalista, 'EUR</td>'); // pozicija za eur\n\t $kurseur = substr($celakursnalista, $pozicijaeur+107 , 6);\n\t $resultprognoza['eur'] = $kurseur; // ubaci kurs eura u array sa skinutim temperaturama i ostalim valutama\n\t // $ USD\n\t $pozicijadolar = strpos($celakursnalista, 'USD</td>'); // pozicija za dolar\n\t $kursdolar = substr($celakursnalista, $pozicijadolar+107 , 6);\n\t $resultprognoza['usd'] = $kursdolar; // ubaci kurs dolara u array sa skinutim temperaturama i ostalim valutama\n\t // CHF \n\t $pozicijachf = strpos($celakursnalista, 'CHF</td>'); // pozicija za svajcarac\n\t $kurschf = substr($celakursnalista, $pozicijachf+107 , 6);\n\t $resultprognoza['chf'] = $kurschf; // ubaci kurs svajcarca u array sa skinutim temperaturama i ostalim valutama\n\t // GBP\n\t $pozicijagbp = strpos($celakursnalista, 'GBP</td>'); // pozicija za funtu\n\t $kursgbp = substr($celakursnalista, $pozicijagbp+107 , 6);\n\t $resultprognoza['gbp'] = $kursgbp; // ubaci kurs funte u array sa skinutim temperaturama i ostalim valutama\n\t \n\t $this->output->set_output(json_encode($resultprognoza));\n\t}", "title": "" }, { "docid": "0d6e0cefd97483a8a4b875b42e66401a", "score": "0.57957816", "text": "public function front_tyres(){echo\"Michelin 80/100-21<br/>\";}", "title": "" }, { "docid": "cca22a2bcc751d3d3593a3f3d31df88c", "score": "0.5789957", "text": "function BD1_739_VER01_PARAMETER04($post){\r\n // dari parameter 5 sebelumnya\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n\r\n </tr>\r\n </table>\";\r\n\r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_dok_qa , u.tsubmit_prareg ,\r\n ABS(datediff(la.dCreate, u.tsubmit_prareg)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=1\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00018\"\r\n AND u.iconfirm_dok_qa = 2 AND u.tsubmit_prareg IS NOT NULL\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\"\r\n AND u.tsubmit_prareg <= \"'.$perode2.'\"\r\n \r\n UNION\r\n \r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_dok_qa , his.dtanggal as tsubmit_prareg ,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id, Concat(\"1\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=1\r\n and la.iApprove=2\r\n and la.lDeleted=0\r\n AND u.iconfirm_dok_qa = 2\r\n and mo.vKode_modul=\"PL00018\"\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n WHERE ta.ldeleted=0 \r\n AND ta.ijenis=1 \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n\r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n //$html.='<pre>'.$sqPrareg.'</pre>';\r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='7' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Approval QA Manager Cek Dokumen Prareg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th>\r\n <th>Team Busdev</th>\r\n <th>Approval QA By</th>\r\n <th>Tanggal Approval QA</th>\r\n <th>Tanggal Submit Prareg</th> \r\n <th>Selisih</th> \r\n </tr>\r\n \"; \r\n\r\n $cekDouble = array();\r\n\r\n $i=0;\r\n $sumselisih = 0;\r\n $total_parareg = 0;\r\n foreach ($upbPrareg as $ub) {\r\n $selisih = $this->datediff($ub['tconfirm_dok_qa'],$ub['tsubmit_prareg'],$cNipNya);\r\n\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ub['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n // array_push($cekDouble,$u['iupb_id']);\r\n $total_parareg++;\r\n $sumselisih += $selisih;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['cNip'].\"-\".$ub['vName'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tconfirm_dok_qa'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tsubmit_prareg'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td>\r\n </tr>\"; \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n //-------------------------------------------------------------------------------------- INI REG\r\n\r\n $sqReq = 'SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(u.tconfirm_registrasi_qa) as tconfirm_registrasi_qa, u.tsubmit_reg , ABS(datediff(u.tconfirm_registrasi_qa, u.tsubmit_reg )) as selisih,u.iteambusdev_id\r\n FROM plc2.plc2_upb u \r\n JOIN hrd.employee e on e.cNip = u.cnip_confirm_registrasi_qa\r\n where u.`ldeleted` = 0 AND u.`iteambusdev_id` = 4 \r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n AND u.iconfirm_registrasi_qa = 1 AND u.tsubmit_reg IS NOT NULL\r\n AND u.`tsubmit_reg` >= \"'.$perode1.'\"\r\n AND u.`tsubmit_reg` <= \"'.$perode2.'\"\r\n ';\r\n $sqReq = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_registrasi_qa , u.tsubmit_reg ,\r\n ABS(datediff(la.dCreate, u.tsubmit_reg)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00029\"\r\n AND u.iconfirm_registrasi_qa = 2 AND u.tsubmit_reg IS NOT NULL\r\n AND u.tsubmit_reg >= \"'.$perode1.'\"\r\n AND u.tsubmit_reg <= \"'.$perode2.'\"\r\n \r\n UNION\r\n \r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_registrasi_qa ,his.dtanggal as tsubmit_reg ,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id,Concat(\"1\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n and la.iApprove=2\r\n and la.lDeleted=0\r\n AND u.iconfirm_registrasi_qa = 2\r\n and mo.vKode_modul=\"PL00029\"\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n WHERE ta.ldeleted=0 \r\n AND ta.ijenis=2 \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n //$html.='<pre>'.$sqReq.'</pre>';\r\n $upbReq = $this->db_erp_pk->query($sqReq)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='7' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Approval QA Manager Cek Dokumen Registrasi</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th>\r\n <th>Team Busdev</th>\r\n <th>Approval QA By</th>\r\n <th>Tanggal Approval QA</th>\r\n <th>Tanggal Submit Registrasi</th> \r\n <th>Selisih</th> \r\n </tr>\r\n \"; \r\n $i=0;\r\n $total_req=0;\r\n $kurangTotal = 0;\r\n foreach ($upbReq as $ur) {\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ur['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n $total_req++;\r\n if (in_array($ur['iupb_id'], $cekDouble)) {\r\n $kurangTotal++;\r\n }\r\n\r\n $selisih = $this->datediff($ur['tconfirm_registrasi_qa'],$ur['tsubmit_reg'],$cNipNya);\r\n\r\n $sumselisih += $selisih;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['cNip'].\"-\".$ur['vName'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['tconfirm_registrasi_qa'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['tsubmit_reg'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td>\r\n </tr>\"; \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n $totalUpb = $total_req + $total_parareg; \r\n $jumlahUpb = $totalUpb - $kurangTotal;\r\n if($sumselisih==0){\r\n $tot = 0;\r\n }else{\r\n $tot = $sumselisih / $totalUpb;\r\n $tot = $tot/5;\r\n }\r\n $result = number_format($tot,2);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Total UPB Prareg & Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$totalUpb.\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jumlah Selisih (Hari)</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".number_format($sumselisih).\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Rata- Rata (Minggu)</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$result.\" Minggu</td>\r\n </tr>\r\n\r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "b024c9b04768cc8ed43c831c3ce35dbd", "score": "0.5782504", "text": "function puuhanPoistoToimet() {\n $puuhaid = $_POST['puuha_id'];\n $poistettavaPuuha = Puuhat::EtsiPuuha($puuhaid);\n Puuhat::PoistaPuuha($puuhaid);\n $_SESSION['ilmoitus'] = \"Puuha poistettu onnistuneesti.\";\n /* Kutsutaan funktiota joka näyttää luokanPuuhat näkymän */\n naytaNakymaLuokanPuuhatSivulle(1, $poistettavaPuuha->getPuuhaluokanId());\n}", "title": "" }, { "docid": "2b23932e3d03dd533cd80d3efc6bb0cd", "score": "0.5775005", "text": "function tgl_inggris($tanggal) {\n\t$pisah = explode('-',$tanggal);\n\t$larik = array($pisah[2],$pisah[1],$pisah[0]);\n\t$satukan = implode('-',$larik);\n\treturn $satukan;\n}", "title": "" }, { "docid": "173c27013e126c56a063070fad225de7", "score": "0.57600343", "text": "function paparData($bentukJadual01,$papar)\n{\n\treturn (isset($bentukJadual01[$papar])) ?\n\t'&nbsp;&nbsp;&nbsp;' . $bentukJadual01[$papar] . '&nbsp;&nbsp;&nbsp;'\n\t: '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\n}", "title": "" }, { "docid": "ac8d63394252ac051cb54cb429c3530d", "score": "0.57547694", "text": "function BD1_739_VER01_PARAMETER03($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n </tr>\r\n </table>\";\r\n $sqlDetail='SELECT u.tinfo_paten, u.`iupb_id`, c.vNama_Group ,u.`iGroup_produk` , u.`vupb_nomor`, u.vupb_nama, u.vgenerik, a.dCreate, u.vKode_obat, d.vkategori, u.vgenerik \r\n FROM plc2.`plc2_upb` u\r\n JOIN plc3.m_modul_log_activity a ON u.iupb_id=a.iKey_id\r\n JOIN plc3.m_modul b ON a.idprivi_modules=b.idprivi_modules\r\n JOIN plc2.master_group_produk c on u.`iGroup_produk` = c.imaster_group_produk\r\n JOIN plc2.plc2_upb_master_kategori_upb d ON d.ikategori_id = u.`ikategoriupb_id`\r\n WHERE u.`ldeleted` = 0\r\n AND u.`iteambusdev_id` = 4\r\n AND a.iSort = 999\r\n AND a.iApprove = 2\r\n and u.itipe_id <> 6\r\n and u.ldeleted = 0\r\n and u.iKill = 0\r\n AND a.dCreate >= \"'.$perode1.'\"\r\n AND a.dCreate <= \"'.$perode2.'\"\r\n ORDER BY u.`ikategoriupb_id`';\r\n\r\n\r\n $html .= \"<table cellspacing='0' cellpadding='3' width='900px'>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th>\r\n <th>Nama Generik</th>\r\n <th>Group Produk</th>\r\n <th>Kategori</th>\r\n <th>Info Paten</th>\r\n <th>Approval Direksi</th>\r\n </tr>\r\n \";\r\n\r\n $upbDetail = $this->db_erp_pk->query($sqlDetail)->result_array();\r\n $i=0;\r\n $t_all = 0;\r\n $t_a = 0;\r\n foreach ($upbDetail as $ub) {\r\n $i++;\r\n $col = \"\";\r\n $t_all++;\r\n if($ub['vkategori']==\"A\"){\r\n $t_a++;\r\n $col = \"bgcolor='#C0C0C0'\";\r\n }\r\n $html .= \"<tr \".$col.\" style='border: 1px solid #dddddd; border-collapse: collapse; '>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td>\r\n <td style='width:5%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:15%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nama'].\"</td>\r\n <td style='width:15%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vgenerik'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vNama_Group'].\"</td>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['vkategori'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tinfo_paten'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['dCreate'].\"</td>\r\n </tr>\";\r\n\r\n }\r\n if($t_all==0){\r\n $tot = 0;\r\n }else{\r\n $tot = ($t_a/$t_all) * 100;\r\n }\r\n $result = number_format($tot,2);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jumlah Seluruh UPB</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$t_all.\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jumlah UPB Kategori A</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$t_a.\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Persentase UPB Kategori A</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".number_format($tot,2).\" %</td>\r\n </tr>\r\n\r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "197aa3883f3ca5a485580bfacce3631b", "score": "0.575245", "text": "function BD2_739_VER01_PARAMETER04($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n\r\n </tr>\r\n </table>\";\r\n\r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_dok_qa , u.tsubmit_prareg ,\r\n ABS(datediff(la.dCreate, u.tsubmit_prareg)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=1\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00018\"\r\n AND u.iconfirm_dok_qa = 2 AND u.tsubmit_prareg IS NOT NULL\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\"\r\n AND u.tsubmit_prareg <= \"'.$perode2.'\"\r\n \r\n UNION\r\n \r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_dok_qa , his.dtanggal as tsubmit_prareg ,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id, Concat(\"1\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=1\r\n and la.iApprove=2\r\n and la.lDeleted=0\r\n AND u.iconfirm_dok_qa = 2\r\n and mo.vKode_modul=\"PL00018\"\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n WHERE ta.ldeleted=0 \r\n AND ta.ijenis=1 \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n\r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n //$html.='<pre>'.$sqPrareg.'</pre>';\r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='7' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Approval QA Manager Cek Dokumen Prareg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th>\r\n <th>Team Busdev</th>\r\n <th>Approval QA By</th>\r\n <th>Tanggal Approval QA</th>\r\n <th>Tanggal Submit Prareg</th> \r\n <th>Selisih</th> \r\n </tr>\r\n \"; \r\n\r\n $cekDouble = array();\r\n\r\n $i=0;\r\n $sumselisih = 0;\r\n $total_parareg = 0;\r\n foreach ($upbPrareg as $ub) {\r\n $selisih = $this->datediff($ub['tconfirm_dok_qa'],$ub['tsubmit_prareg'],$cNipNya);\r\n\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ub['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n // array_push($cekDouble,$u['iupb_id']);\r\n $total_parareg++;\r\n $sumselisih += $selisih;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['cNip'].\"-\".$ub['vName'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tconfirm_dok_qa'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tsubmit_prareg'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td>\r\n </tr>\"; \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n //-------------------------------------------------------------------------------------- INI REG\r\n\r\n $sqReq = 'SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(u.tconfirm_registrasi_qa) as tconfirm_registrasi_qa, u.tsubmit_reg , ABS(datediff(u.tconfirm_registrasi_qa, u.tsubmit_reg )) as selisih,u.iteambusdev_id\r\n FROM plc2.plc2_upb u \r\n JOIN hrd.employee e on e.cNip = u.cnip_confirm_registrasi_qa\r\n where u.`ldeleted` = 0 AND u.`iteambusdev_id` = 22 \r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n AND u.iconfirm_registrasi_qa = 1 AND u.tsubmit_reg IS NOT NULL\r\n AND u.`tsubmit_reg` >= \"'.$perode1.'\"\r\n AND u.`tsubmit_reg` <= \"'.$perode2.'\"\r\n ';\r\n $sqReq = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_registrasi_qa , u.tsubmit_reg ,\r\n ABS(datediff(la.dCreate, u.tsubmit_reg)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00029\"\r\n AND u.iconfirm_registrasi_qa = 2 AND u.tsubmit_reg IS NOT NULL\r\n AND u.tsubmit_reg >= \"'.$perode1.'\"\r\n AND u.tsubmit_reg <= \"'.$perode2.'\"\r\n \r\n UNION\r\n \r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_registrasi_qa ,his.dtanggal as tsubmit_reg ,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id,Concat(\"1\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n and la.iApprove=2\r\n and la.lDeleted=0\r\n AND u.iconfirm_registrasi_qa = 2\r\n and mo.vKode_modul=\"PL00029\"\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n WHERE ta.ldeleted=0 \r\n AND ta.ijenis=2 \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n //$html.='<pre>'.$sqReq.'</pre>';\r\n $upbReq = $this->db_erp_pk->query($sqReq)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='7' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Approval QA Manager Cek Dokumen Registrasi</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th>\r\n <th>Team Busdev</th>\r\n <th>Approval QA By</th>\r\n <th>Tanggal Approval QA</th>\r\n <th>Tanggal Submit Registrasi</th> \r\n <th>Selisih</th> \r\n </tr>\r\n \"; \r\n $i=0;\r\n $total_req=0;\r\n $kurangTotal = 0;\r\n foreach ($upbReq as $ur) {\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ur['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n $total_req++;\r\n if (in_array($ur['iupb_id'], $cekDouble)) {\r\n $kurangTotal++;\r\n }\r\n\r\n $selisih = $this->datediff($ur['tconfirm_registrasi_qa'],$ur['tsubmit_reg'],$cNipNya);\r\n\r\n $sumselisih += $selisih;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['cNip'].\"-\".$ur['vName'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['tconfirm_registrasi_qa'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['tsubmit_reg'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td>\r\n </tr>\"; \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n $totalUpb = $total_req + $total_parareg; \r\n $jumlahUpb = $totalUpb - $kurangTotal;\r\n if($sumselisih==0){\r\n $tot = 0;\r\n }else{\r\n $tot = $sumselisih / $totalUpb;\r\n $tot = $tot/5;\r\n }\r\n $result = number_format($tot,2);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Total UPB Prareg & Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$totalUpb.\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jumlah Selisih (Hari)</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".number_format($sumselisih).\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Rata- Rata (Minggu)</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$result.\" Minggu</td>\r\n </tr>\r\n\r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "00f6ed51aa9ffc6d5c378693f880e31e", "score": "0.5748698", "text": "public function front_tyres(){echo\"Dunlop 80/100-21<br/>\";}", "title": "" }, { "docid": "eb19db1cdaebf4837a852c9f3cc0f4b6", "score": "0.57414764", "text": "public static function getP22(){\r\n\t\treturn array(\r\n\t\t\t'1'=>'Semanalmente',\r\n\t\t\t'2'=>'Quincenalmente',\r\n\t\t\t'3'=>'Mensualmente',\r\n\t\t\t'4'=>'Otro, ¿Cuál?',\r\n\t\t\t);\r\n\t}", "title": "" }, { "docid": "5e8496aac299832a620817d791402abb", "score": "0.57265604", "text": "function tinh_tong_kg_khuyen_mai_rieng($type,$soluongtru){\n\tif($GLOBALS['tongkg_km_rieng'] !== ''){\n\t\t$GLOBALS['tongkg_km_rieng'] .= \"+\".$soluongtru;\n\t\t$GLOBALS[$type]['tongkg_km_rieng'] .= \"+\".$soluongtru;\n\t}else{\n\t\t$GLOBALS['tongkg_km_rieng'] = $soluongtru;\n\t\t$GLOBALS[$type]['tongkg_km_rieng'] = $soluongtru;\n\t}\t\n}", "title": "" }, { "docid": "b3a21e5d35e0156c8e59519a54929b7f", "score": "0.5721436", "text": "function BD1_739_VER01_PARAMETER06($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n\r\n </tr>\r\n </table>\";\r\n\r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.tinfo_paten, u.`iupb_id`, u.`iGroup_produk` , u.iteambusdev_id, mku.vkategori, u.`ikategoriupb_id`,\r\n u.`vupb_nomor`,u.vupb_nama,if(u.ineed_prareg=1,\"Ya\", \"Tidak\") as needPrareg, DATE(la.dCreate) as appdir, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih\r\n FROM plc2.plc2_upb u\r\n # JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.plc2_upb_master_kategori_upb mku ON u.ikategoriupb_id=mku.ikategori_id\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND u.iKill = 0\r\n and u.ldeleted = 0\r\n AND la.iApprove=2\r\n AND u.`ikategoriupb_id` = 10\r\n and u.itipe_id <> 6\r\n \r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is not null\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\" \r\n AND u.tsubmit_prareg <= \"'.$perode2.'\" \r\n ELSE\r\n u.tsubmit_reg is not null\r\n AND u.tsubmit_reg >= \"'.$perode1.'\" \r\n AND u.tsubmit_reg <= \"'.$perode2.'\" \r\n END\r\n )\r\n UNION \r\n SELECT u.tinfo_paten, u.`iupb_id`, u.`iGroup_produk` , u.iteambusdev_id, mku.vkategori, u.`ikategoriupb_id`,\r\n u.`vupb_nomor`,u.vupb_nama,if(u.ineed_prareg=1,\"Ya\", \"Tidak\") as needPrareg, DATE(la.dCreate) as appdir, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih\r\n FROM plc2.plc2_upb u\r\n # JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.plc2_upb_master_kategori_upb mku ON u.ikategoriupb_id=mku.ikategori_id\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n where u.ldeleted = 0 \r\n AND la.lDeleted=0 \r\n AND mo.lDeleted=0 \r\n AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n AND u.`ikategoriupb_id` = 10\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and moa.iType=3\r\n and his.ldeleted=0\r\n AND his.ijenis = 1\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta\r\n join plc2.plc2_upb up on up.iupb_id=ta.iupb_id \r\n WHERE ta.ldeleted=0 \r\n AND (case when up.ineed_prareg=1 then\r\n ta.ijenis=1\r\n ELSE\r\n ta.ijenis=2\r\n END)\r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n \r\n\r\n ) AS z\r\n\r\n # ORDER BY z.nilai ASC\r\n\r\n ) as aa GROUP BY aa.iupb_id\r\n ORDER BY needPrareg\r\n ';\r\n \r\n\r\n /* $sqPrareg = 'SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, ua.tupdate, u.tsubmit_prareg ,u.iteambusdev_id,kat.vkategori\r\n FROM plc2.`plc2_upb` u\r\n JOIN plc2.plc2_upb_approve ua ON ua.`iupb_id` = u.`iupb_id`\r\n JOIN plc2.master_group_produk m on u.`iGroup_produk` = m.imaster_group_produk\r\n join plc2.plc2_upb_master_kategori_upb kat on kat.ikategori_id=u.ikategoriupb_id\r\n WHERE u.`ldeleted` = 0 \r\n AND u.tsubmit_prareg IS NOT NULL AND u.tsubmit_prareg <>\"0000-00-00\"\r\n AND u.`iteambusdev_id` = 4\r\n AND ua.`vtipe` = \"DR\"\r\n AND ua.`iapprove` = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg = 1\r\n AND u.ldeleted = 0 \r\n AND u.ikategoriupb_id = 10 # Kategori A\r\n AND u.`tsubmit_prareg` >= \"'.$perode1.'\"\r\n AND u.`tsubmit_prareg` <= \"'.$perode2.'\"\r\n ';\r\n*/\r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Submit Prareg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th> \r\n <th>Team Busdev</th> \r\n <th>Kategori</th> \r\n <th>Need Prareg</th> \r\n <th>Tanggal Approval Direksi</th>\r\n <th>Tanggal Submit Prareg</th> \r\n </tr>\r\n \"; \r\n\r\n $cekDouble = array();\r\n $kurangTotal=0;\r\n $i=0;\r\n $total_parareg = 0;\r\n foreach ($upbPrareg as $ub) {\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ub['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n if (in_array($ub['iupb_id'], $cekDouble)) {\r\n $kurangTotal++;\r\n }\r\n array_push($cekDouble,$ub['iupb_id']);\r\n $total_parareg++;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vkategori'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['needPrareg'].\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['appdir'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tanggalSubmit'].\"</td>\r\n </tr>\"; \r\n\r\n \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n //-------------------------------------------------------------------------------------- INI REG\r\n\r\n\r\n\r\n $totalUpb =$total_parareg; \r\n $jumlahUpb = $totalUpb - $kurangTotal; \r\n $result = number_format($jumlahUpb);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Total UPB Prareg & Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$totalUpb.\" </td>\r\n </tr>\r\n \r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "ba3d48209aced9edd4110cd809c3b75b", "score": "0.5720665", "text": "function PD1_getParameter6($post){\r\n \r\n $iPkTransId = $post['_iPkTransId'];\r\n $val7A = $post['_val7A'];\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n \r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n \r\n </tr>\r\n </table>\";\r\n\r\n $html .= \"<table cellspacing='0' cellpadding='3' width='100%'>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <td style='border: 1px solid #dddddd;' ><b>No</b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>No UPB </b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Nama UPB </b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Kategori UPB</b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Tanggal Approve Cek Dokumen Prareg oleh PD</b></td> \r\n </tr>\r\n \";\r\n\r\n /*get Support data*/\r\n $sql1 = \"SELECT a.vValue\r\n from hrd.pk_trans_support_data a \r\n where a.iPkTransId='\".$iPkTransId.\"' \r\n and a.iAspekId='\".$iAspekId.\"' \";\r\n\r\n $sql7A = \"SELECT a.vValue\r\n from hrd.pk_trans_support_data a \r\n where a.iPkTransId='\".$iPkTransId.\"' \r\n and a.iAspekId=4284\";\r\n $tot7A = $this->db_erp_pk->query($sql7A)->row_array();\r\n\r\n $val7A = $tot7A['vValue'];\r\n //Non Kategory A\r\n $sql2 =\"SELECT pu.`iupb_id`,pu.vupb_nomor,pu.vupb_nama,pu.ikategoriupb_id, pu.tconfirm_dok_pd \r\n FROM plc2.plc2_upb pu \r\n WHERE pu.`ldeleted` = 0 \r\n AND pu.`iteampd_id` = 1 \r\n AND pu.`itipe_id` NOT IN(6) \r\n AND pu.iconfirm_dok_pd=1 \r\n AND pu.tconfirm_dok_pd IS NOT NULL \r\n AND pu.tconfirm_dok_pd between '\".$perode1.\"' AND '\".$perode2.\"'\"; \r\n \r\n $b = $this->db_erp_pk->query($sql2)->result_array();\r\n $no = 1;\r\n if(!empty($b)){\r\n foreach ($b as $v) {\r\n if (fmod($no,2)==0){\r\n $color = 'background-color: #eaedce';\r\n }else{\r\n $color = '';\r\n }\r\n $k='';\r\n $sqlk =\"SELECT u.`vkategori` FROM plc2.`plc2_upb_master_kategori_upb` u WHERE u.`ldeleted`=0 AND u.`ikategori_id` = '\".$v['ikategoriupb_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vkategori'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vkategori'];\r\n }\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;\".$color.\"'> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$no.\"</td>\r\n\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$v['vupb_nomor'].\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$v['vupb_nama'].\"</td> \r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\".$k.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".date('d-m-Y',strtotime($v['tconfirm_dok_pd'])).\"</td> \r\n </tr>\"; \r\n $no++;\r\n }\r\n } \r\n\r\n $html .=\"</table>\";\r\n //$totA = $this->db_erp_pk->query($sql1)->num_rows();\r\n \r\n $totAd = $this->db_erp_pk->query($sql1)->row_array();\r\n $totA = $totAd['vValue'];\r\n $totb = $this->db_erp_pk->query($sql2)->num_rows(); \r\n $hasil_b = ($totb + $val7A) / $totA ;\r\n\r\n /*echo $totb.'+'.$val7A.'/'.$totA;\r\n exit;*/\r\n \r\n $result = number_format($hasil_b ,2);\r\n\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n $html .= \"<br /> \";\r\n \r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 300px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>(a) Parameter 7A</td>\r\n \r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$val7A.\"</td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>(b) Total Seluruh Produk</td> \r\n <td style='width:10%;text-align: right;border: 1px solid #dddddd;'>\".$totb.\"</td>\r\n </tr> \r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>(c) Jumlah Formulator</td> \r\n <td style='width:10%;text-align: right;border: 1px solid #dddddd;'>\".$totA.\"</td>\r\n </tr> \r\n\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>Produktivitas (a+b)/c</td>\r\n \r\n <td style='width:10%;text-align: right;border: 1px solid #dddddd;'><b>\".$result.\"</b></td>\r\n </tr>\r\n </table>\";\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "ce83faf291a33aca1b84f35cc2ca5526", "score": "0.57097256", "text": "function BD2_739_VER01_PARAMETER03($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n </tr>\r\n </table>\";\r\n $sqlDetail='SELECT u.tinfo_paten, u.`iupb_id`, c.vNama_Group ,u.`iGroup_produk` , u.`vupb_nomor`, u.vupb_nama, u.vgenerik, a.dCreate, u.vKode_obat, d.vkategori, u.vgenerik \r\n FROM plc2.`plc2_upb` u\r\n JOIN plc3.m_modul_log_activity a ON u.iupb_id=a.iKey_id\r\n JOIN plc3.m_modul b ON a.idprivi_modules=b.idprivi_modules\r\n JOIN plc2.master_group_produk c on u.`iGroup_produk` = c.imaster_group_produk\r\n JOIN plc2.plc2_upb_master_kategori_upb d ON d.ikategori_id = u.`ikategoriupb_id`\r\n WHERE u.`ldeleted` = 0\r\n AND u.`iteambusdev_id` = 22\r\n AND a.iSort = 999 \r\n AND a.iApprove = 2\r\n and u.itipe_id <> 6\r\n and u.ldeleted = 0\r\n and u.iKill = 0\r\n AND a.dCreate >= \"'.$perode1.'\"\r\n AND a.dCreate <= \"'.$perode2.'\"\r\n ORDER BY u.`ikategoriupb_id`';\r\n\r\n\r\n $html .= \"<table cellspacing='0' cellpadding='3' width='900px'>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th>\r\n <th>Nama Generik</th>\r\n <th>Group Produk</th>\r\n <th>Kategori</th>\r\n <th>Info Paten</th>\r\n <th>Approval Direksi</th>\r\n </tr>\r\n \";\r\n\r\n $upbDetail = $this->db_erp_pk->query($sqlDetail)->result_array();\r\n $i=0;\r\n $t_all = 0;\r\n $t_a = 0;\r\n foreach ($upbDetail as $ub) {\r\n $i++;\r\n $col = \"\";\r\n $t_all++;\r\n if($ub['vkategori']==\"A\"){\r\n $t_a++;\r\n $col = \"bgcolor='#C0C0C0'\";\r\n }\r\n $html .= \"<tr \".$col.\" style='border: 1px solid #dddddd; border-collapse: collapse; '>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td>\r\n <td style='width:5%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:15%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nama'].\"</td>\r\n <td style='width:15%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vgenerik'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vNama_Group'].\"</td>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['vkategori'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tinfo_paten'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['dCreate'].\"</td>\r\n </tr>\";\r\n\r\n }\r\n if($t_all==0){\r\n $tot = 0;\r\n }else{\r\n $tot = ($t_a/$t_all) * 100;\r\n }\r\n $result = number_format($tot,2);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jumlah Seluruh UPB</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$t_all.\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jumlah UPB Kategori A</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$t_a.\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Persentase UPB Kategori A</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".number_format($tot,2).\" %</td>\r\n </tr>\r\n\r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "581a519e06e839d743b355e255b3dd52", "score": "0.5696732", "text": "function BD1_739_VER01_PARAMETER05($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n \r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n \r\n $jenis = array(1=>'UM',2=>'Claim');\r\n \r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n \r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n \r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n \r\n </tr>\r\n </table>\";\r\n \r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is not null\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\"\r\n AND u.tsubmit_prareg <= \"'.$perode2.'\"\r\n ELSE\r\n u.tsubmit_reg is not null\r\n AND u.tsubmit_reg >= \"'.$perode1.'\"\r\n AND u.tsubmit_reg <= \"'.$perode2.'\"\r\n END\r\n )\r\n\r\n UNION\r\n\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , his.dtanggal as tanggalSubmit,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n and his.ldeleted=0#Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n join plc2.plc2_upb up on up.iupb_id=ta.iupb_id\r\n WHERE ta.ldeleted=0 \r\n AND (case when up.ineed_prareg=1 then\r\n ta.ijenis=1\r\n ELSE\r\n ta.ijenis=2\r\n END) \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n \r\n \r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Submit Prareg / Reg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama Generik</th> \r\n <th>Selisih</th> \r\n <th>Melalui Prareg</th> \r\n <th>Tgl Prareg / Reg</th>\r\n <th>Tgl Setting Prioritas</th> \r\n </tr>\r\n \"; \r\n \r\n $cekDouble = array();\r\n \r\n $i=0;\r\n $total_parareg = array();\r\n foreach ($upbPrareg as $ub) {\r\n $selisih = $this->getDurasiBulan($ub['tglSettingPrio'],$ub['tanggalSubmit']);\r\n $i++; \r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:5%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:25%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vgenerik'].\"</td>\r\n <td style='width:5%;text-align: right;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['needPrareg'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['tanggalSubmit'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['tglSettingPrio'].\"</td>\r\n </tr>\"; \r\n $total_parareg[]=$selisih;\r\n \r\n } \r\n $html .= \"</table><br /> \";\r\n \r\n //-------------------------------------------------------------------------------------- INI REG\r\n \r\n $sqReq = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , concat(\"'.$perode2.'\") as tanggalSubmit,\r\n ABS(datediff(la.dCreate, \"'.$perode2.'\")) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is NULL\r\n ELSE\r\n u.tsubmit_reg is null\r\n END\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n '; \r\n $upbReq = $this->db_erp_pk->query($sqReq)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >UPB Belum Tanggal Prareg / Reg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama Generik</th> \r\n <th>Selisih</th> \r\n <th>Melalui Prareg</th> \r\n <th>Tgl Prareg / Reg</th>\r\n <th>Tgl Akhir Semester</th> \r\n </tr>\r\n \"; \r\n $i=0;\r\n foreach ($upbReq as $ur) {\r\n $selisih = $this->getDurasiBulan($ur['tglSettingPrio'],$ur['tanggalSubmit']);\r\n $i++; \r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:5%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nomor'].\"</td>\r\n <td style='width:25%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vgenerik'].\"</td>\r\n <td style='width:5%;text-align: right;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['needPrareg'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['tanggalSubmit'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['tglSettingPrio'].\"</td>\r\n </tr>\"; \r\n $total_parareg[]=$selisih;\r\n \r\n } \r\n $html .= \"</table><br /> \";\r\n \r\n $total=array_sum($total_parareg);\r\n $nn=$total/$i;\r\n $result = number_format($nn);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n \r\n \r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jangka Waktu Proses Pengembangan UPB</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$total.\" Bulan</td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>UPB Belum Tanggal Prareg / Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$i.\"</td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Rata - Rata Jangka Waktu Proses Pengembangan UPB</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$result.\" Bulan</td>\r\n </tr>\r\n \r\n </table><br/><br/>\";\r\n \r\n \r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "6b86e491d45dc38588ca51d203d0cd93", "score": "0.5688378", "text": "function BD2_739_VER01_PARAMETER06($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n\r\n </tr>\r\n </table>\";\r\n\r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.tinfo_paten, u.`iupb_id`, u.`iGroup_produk` , u.iteambusdev_id, mku.vkategori, u.`ikategoriupb_id`,\r\n u.`vupb_nomor`,u.vupb_nama,if(u.ineed_prareg=1,\"Ya\", \"Tidak\") as needPrareg, DATE(la.dCreate) as appdir, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih\r\n FROM plc2.plc2_upb u\r\n # JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.plc2_upb_master_kategori_upb mku ON u.ikategoriupb_id=mku.ikategori_id\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND u.iKill = 0\r\n and u.ldeleted = 0\r\n AND la.iApprove=2\r\n AND u.`ikategoriupb_id` = 10\r\n and u.itipe_id <> 6\r\n \r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is not null\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\" \r\n AND u.tsubmit_prareg <= \"'.$perode2.'\" \r\n ELSE\r\n u.tsubmit_reg is not null\r\n AND u.tsubmit_reg >= \"'.$perode1.'\" \r\n AND u.tsubmit_reg <= \"'.$perode2.'\" \r\n END\r\n )\r\n UNION \r\n SELECT u.tinfo_paten, u.`iupb_id`, u.`iGroup_produk` , u.iteambusdev_id, mku.vkategori, u.`ikategoriupb_id`,\r\n u.`vupb_nomor`,u.vupb_nama,if(u.ineed_prareg=1,\"Ya\", \"Tidak\") as needPrareg, DATE(la.dCreate) as appdir, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih\r\n FROM plc2.plc2_upb u\r\n # JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.plc2_upb_master_kategori_upb mku ON u.ikategoriupb_id=mku.ikategori_id\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n where u.ldeleted = 0 \r\n AND la.lDeleted=0 \r\n AND mo.lDeleted=0 \r\n AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n AND u.`ikategoriupb_id` = 10\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and moa.iType=3\r\n and his.ldeleted=0\r\n AND his.ijenis = 1\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta\r\n join plc2.plc2_upb up on up.iupb_id=ta.iupb_id \r\n WHERE ta.ldeleted=0 \r\n AND (case when up.ineed_prareg=1 then\r\n ta.ijenis=1\r\n ELSE\r\n ta.ijenis=2\r\n END)\r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n\r\n \r\n\r\n ) AS z\r\n\r\n # ORDER BY z.nilai ASC\r\n\r\n ) as aa GROUP BY aa.iupb_id\r\n ORDER BY needPrareg\r\n ';\r\n \r\n\r\n /* $sqPrareg = 'SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, ua.tupdate, u.tsubmit_prareg ,u.iteambusdev_id,kat.vkategori\r\n FROM plc2.`plc2_upb` u\r\n JOIN plc2.plc2_upb_approve ua ON ua.`iupb_id` = u.`iupb_id`\r\n JOIN plc2.master_group_produk m on u.`iGroup_produk` = m.imaster_group_produk\r\n join plc2.plc2_upb_master_kategori_upb kat on kat.ikategori_id=u.ikategoriupb_id\r\n WHERE u.`ldeleted` = 0 \r\n AND u.tsubmit_prareg IS NOT NULL AND u.tsubmit_prareg <>\"0000-00-00\"\r\n AND u.`iteambusdev_id` = 4\r\n AND ua.`vtipe` = \"DR\"\r\n AND ua.`iapprove` = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg = 1\r\n AND u.ldeleted = 0 \r\n AND u.ikategoriupb_id = 10 # Kategori A\r\n AND u.`tsubmit_prareg` >= \"'.$perode1.'\"\r\n AND u.`tsubmit_prareg` <= \"'.$perode2.'\"\r\n ';\r\n*/\r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Submit Prareg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th> \r\n <th>Team Busdev</th> \r\n <th>Kategori</th> \r\n <th>Need Prareg</th> \r\n <th>Tanggal Approval Direksi</th>\r\n <th>Tanggal Submit Prareg</th> \r\n </tr>\r\n \"; \r\n\r\n $cekDouble = array();\r\n $kurangTotal=0;\r\n $i=0;\r\n $total_parareg = 0;\r\n foreach ($upbPrareg as $ub) {\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ub['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n if (in_array($ub['iupb_id'], $cekDouble)) {\r\n $kurangTotal++;\r\n }\r\n array_push($cekDouble,$ub['iupb_id']);\r\n $total_parareg++;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vkategori'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['needPrareg'].\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['appdir'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tanggalSubmit'].\"</td>\r\n </tr>\"; \r\n\r\n \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n //-------------------------------------------------------------------------------------- INI REG\r\n\r\n\r\n\r\n $totalUpb =$total_parareg; \r\n $jumlahUpb = $totalUpb - $kurangTotal; \r\n $result = number_format($jumlahUpb);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Total UPB Prareg & Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$totalUpb.\" </td>\r\n </tr>\r\n \r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "a171b839d208a664e6a25e6240a5a313", "score": "0.56817454", "text": "function BD2_739_VER01_PARAMETER05($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n\r\n </tr>\r\n </table>\";\r\n\r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is not null\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\"\r\n AND u.tsubmit_prareg <= \"'.$perode2.'\"\r\n ELSE\r\n u.tsubmit_reg is not null\r\n AND u.tsubmit_reg >= \"'.$perode1.'\"\r\n AND u.tsubmit_reg <= \"'.$perode2.'\"\r\n END\r\n )\r\n\r\n UNION\r\n\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , his.dtanggal as tanggalSubmit,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n and his.ldeleted=0\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n join plc2.plc2_upb up on up.iupb_id=ta.iupb_id\r\n WHERE ta.ldeleted=0 \r\n AND (case when up.ineed_prareg=1 then\r\n ta.ijenis=1\r\n ELSE\r\n ta.ijenis=2\r\n END) \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n \r\n \r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Submit Prareg / Reg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama Generik</th> \r\n <th>Selisih</th> \r\n <th>Melalui Prareg</th> \r\n <th>Tgl Prareg / Reg</th>\r\n <th>Tgl Setting Prioritas</th> \r\n </tr>\r\n \"; \r\n\r\n $cekDouble = array();\r\n\r\n $i=0;\r\n $total_parareg = array();\r\n foreach ($upbPrareg as $ub) {\r\n $selisih = $this->getDurasiBulan($ub['tglSettingPrio'],$ub['tanggalSubmit']);\r\n $i++; \r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:5%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:25%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vgenerik'].\"</td>\r\n <td style='width:5%;text-align: right;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['needPrareg'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['tanggalSubmit'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['tglSettingPrio'].\"</td>\r\n </tr>\"; \r\n $total_parareg[]=$selisih;\r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n //-------------------------------------------------------------------------------------- INI REG\r\n\r\n $sqReq = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , concat(\"'.$perode2.'\") as tanggalSubmit,\r\n ABS(datediff(la.dCreate, \"'.$perode2.'\")) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is NULL\r\n ELSE\r\n u.tsubmit_reg is null\r\n END\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n '; \r\n $upbReq = $this->db_erp_pk->query($sqReq)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >UPB Belum Tanggal Prareg / Reg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama Generik</th> \r\n <th>Selisih</th> \r\n <th>Melalui Prareg</th> \r\n <th>Tgl Prareg / Reg</th>\r\n <th>Tgl Akhir Semester</th> \r\n </tr>\r\n \"; \r\n $i=0;\r\n foreach ($upbReq as $ur) {\r\n $selisih = $this->getDurasiBulan($ur['tglSettingPrio'],$ur['tanggalSubmit']);\r\n $i++; \r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:5%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nomor'].\"</td>\r\n <td style='width:25%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vgenerik'].\"</td>\r\n <td style='width:5%;text-align: right;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['needPrareg'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['tanggalSubmit'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['tglSettingPrio'].\"</td>\r\n </tr>\"; \r\n $total_parareg[]=$selisih;\r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n $total=array_sum($total_parareg);\r\n $nn=$total/$i;\r\n $result = number_format($nn);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jangka Waktu Proses Pengembangan UPB</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$total.\" Bulan</td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>UPB Belum Tanggal Prareg / Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$i.\"</td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Rata - Rata Jangka Waktu Proses Pengembangan UPB</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$result.\" Bulan</td>\r\n </tr>\r\n \r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "5e72b919b0478fe37b71e856ef1473f6", "score": "0.567987", "text": "public function tiene_pulgas()\n {\n printf(($this->pulgas)?\"<p>Tiene Pulgas</p>\":\"<p>NO tiene Pulgas</p>\");\n }", "title": "" }, { "docid": "7764b9264a38551e8e3178dba71833bf", "score": "0.56742823", "text": "function tampilan()\n\t{\n\t\techo \"*---------- saya dari fungsi ----------*\";\n\t\techo \"<br /> Hallo ... mudahnya menggunakan fungsi.<br />\";\n\t\techo \"*------------ akhir dari fungsi ----------*\";\n\t}", "title": "" }, { "docid": "e0c09d3bee2bf56152c6e349d7184042", "score": "0.5672855", "text": "function Extractuj($tresc, $skok)\n\t{\n\t\t//petla dl tresc o skok\n\t}", "title": "" }, { "docid": "d11d38a1f1b97663640f593f508097df", "score": "0.5667336", "text": "function tampil(){\n\t\t$data['pendaftaran'] = $this->mdata->tampil_data()->result();\n $this->load->view('tampil',$data);\n\t}", "title": "" }, { "docid": "51a2e0b5693e746385cd0b46ccf28362", "score": "0.56283945", "text": "function BotTgl($tanggal){\n\t$tgl=substr($tanggal,0,2);\n\t$bln=substr($tanggal,3,2);\n\t$thn=substr($tanggal,6,4);\n\t$awal=\"$thn-$bln-$tgl\";\n\treturn $awal;\n}", "title": "" }, { "docid": "ec2ba803c148d82b6bae4f8de1c5c6af", "score": "0.5627614", "text": "function ehita_ehitis_nupp($ehitis_level,$ehitis_nimetus,$ehitis_hind,$ehitis_nupp) { // ehitise funktsioon\n\t\techo (\"Level \" . $ehitis_level . \" \" . $ehitis_nimetus . \" <img src='/projekt/pildid/andmed/puit.png'/> \" . $ehitis_hind . \n\t\t\"<form method='post'><input class='button' type='submit' name='\" . $ehitis_nupp .\"' value='Ehita' /></form>\");\n\t}", "title": "" }, { "docid": "2aa9c602741bc4063bcea59c4e8ce2c0", "score": "0.5618758", "text": "function praproses($jawab){\n\t\t$ttext=trim($jawab);\n\t\t$ftext=preg_replace('/[^a-zA-Z0-9 ]/',' ',$ttext);\n\t\t//CASE FOLDING ============================================================================\n\t\t$ctext=strtolower($ftext);\n\t\t//STOPWORD REMOVAL ========================================================================\n\t\t$otext=$this->stopword($ctext);//hilangkan kata yg kurang penting\n\t\t$wtext=preg_replace(\"/\\b(\\w+)\\s*\\\\1\\b/i\", \"$1\", $otext);//hilangkan kata yg berulang (tanpa spasi)\n\t\t$stext=implode(' ', array_unique(explode(' ', $wtext)));//hilangkan kata yg berulang (dengan spasi)\n return $p_jawab = preg_split('/\\s+/',$stext);\n\t}", "title": "" }, { "docid": "ccbb465dd7e8a06c36ee673dda910fd4", "score": "0.5612648", "text": "private function ima_li_pobjednik(){\n\t\t\t$this->uRetku();\n\t\t\t$this->uStupcu();\n\t\t\t$this->naDijagonali();\n\t\t}", "title": "" }, { "docid": "9a1a740d4c10891903774f24fe51167f", "score": "0.5610359", "text": "function panggilan($jk, $panggilan = [\"Bpk. \",\"Ibu. \"])\n{\n $jk = str_replace($jk,\"\",\" \");\n $hasil = [\n \"Laki-Laki\" => $panggilan[0],\n \"Perempuan\" => $panggilan[1],\n \"Pria\" => $panggilan[0],\n \"Wanita\" => $panggilan[1],\n\t \"L\" => $panggilan[0],\n \"P\" => $panggilan[1]\n ];\n return $hasil[$jk];\n}", "title": "" }, { "docid": "08cf19761737658e093f9ad7388b5459", "score": "0.5610031", "text": "function Tlbubjt($ps){ \n return atan($ps);\n }", "title": "" }, { "docid": "0e6438567d3583ab64c6642ac5c91022", "score": "0.56033844", "text": "function rupiahSpasi($nilai, $simbol = \"Rp\", $spasi_rupiah = \"\", $dibelakang_koma = 0, $penutup = \"\", $pemisah_koma = \",\", $pemisah_ribuan = \".\")\n{\n $nilai = intval($nilai);\n // $penutup = ,-\n // $dibelakang_koma = 2 -> ,00\n return \"<div style='float: left;'>\".$simbol.\"</div> <div style='float: right;'>\".$spasi_rupiah.number_format($nilai,$dibelakang_koma ,$pemisah_koma, $pemisah_ribuan).$penutup.\"</div><div style='clear: both;'></div>\";\n}", "title": "" }, { "docid": "09fdf38fb430ec468c08346d9a1f82c5", "score": "0.5594646", "text": "function tglindonesia ($thedate) {\n\t\t$jam=substr($thedate,11,2);\n\t\t//untuk dapatkan hari yg di posisi 14 sbnyk 2 krktr\n\t\t$menit=substr($thedate,14,2);\n\t\t//untuk dapatkan hari yg di posisi 8 sbnyk 2 krktr\n\t\t$hari=substr($thedate,8,2);\n\t\t//untuk dapatkan hari yg di posisi 5 sbnyk 2 krktr\n\t\t$bulan=get_namabulan(substr($thedate,5,2));\n\t\t//untuk dapatkan hari yg di posisi 0 sbnyk 4 krktr\n\t\t$tahun=substr($thedate,0,4);\n\t\t//pengabungan variabel $hari $bulan $tahun\n\t\t$tanggal=\"$hari $bulan $tahun\";\n\t\t//fungsi hasil output variabel $tanggal\n\t\treturn $tanggal;\n\t}", "title": "" }, { "docid": "887f78a2be2a5d6fbb8a0eeac0b4da59", "score": "0.5590207", "text": "public function etatopopidomibai23Action() {\n\t $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t //$this->_helper->layout->disableLayout();\n \t $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n\t if(!isset($sessionutilisateur->login)) { $this->_redirect('/administration/login');}\n if($sessionutilisateur->confirmation != \"\") { $this->_redirect('/administration/confirmation');}\n\t\t \n\t ini_set('memory_limit','9999999999999999991024M');\n\t\t\n\t $t_traite = new Application_Model_DbTable_EuTraite();\n\t\t\n\t $date_fin = new Zend_Date(Zend_Date::ISO_8601);\n\t\t$select = $t_traite->select(Zend_Db_Table::SELECT_WITH_FROM_PART);\n $select->setIntegrityCheck(false);\n\t\t$select->join('eu_tpagcp', 'eu_tpagcp.id_tpagcp = eu_traite.traite_tegcp');\n\t $select->where('eu_tpagcp.ntf = ?',23);\n\t\t$select->where('eu_traite.bon_type like ?',\"BAi\");\n\t\t$select->order('eu_traite.traite_date_fin desc');\n\t\t$entries = $t_traite->fetchAll($select);\n $this->view->entries = $entries;\n\t\t$this->view->tabletri = 1;\n\t\t\n\t}", "title": "" }, { "docid": "a05d9a02a0e85b717c8ac2501a2ac2c7", "score": "0.5586976", "text": "function OutraParte() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n if ($O=='') $O='P';\r\n $w_erro='';\r\n $w_botao = $_REQUEST['w_botao'];\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_cpf = $_REQUEST['w_cpf'];\r\n $w_cnpj = $_REQUEST['w_cnpj'];\r\n $w_sq_pessoa = $_REQUEST['w_sq_pessoa'];\r\n $w_pessoa_atual = $_REQUEST['w_pessoa_atual'];\r\n $sql = new db_getSolicData; $RS1 = $sql->getInstanceOf($dbms,$w_chave,f($RS_Menu,'sigla'));\r\n $w_dados_pai = explode('|@|',f($RS1,'dados_pai'));\r\n $w_sigla_pai = $w_dados_pai[5];\r\n $w_modulo_pai = $w_dados_pai[11];\r\n \r\n if ($w_sq_pessoa=='' && (strpos($w_botao,'Selecionar')===false)) {\r\n $w_sq_pessoa =f($RS1,'pessoa');\r\n $w_pessoa_atual =f($RS1,'pessoa');\r\n } elseif (strpos($w_botao,'Selecionar')===false) {\r\n $w_sq_banco = f($RS1,'sq_banco');\r\n $w_sq_agencia = f($RS1,'sq_agencia');\r\n $w_operacao = f($RS1,'operacao_conta');\r\n $w_nr_conta = f($RS1,'numero_conta');\r\n $w_sq_pais_estrang = f($RS1,'sq_pais_estrang');\r\n $w_aba_code = f($RS1,'aba_code');\r\n $w_swift_code = f($RS1,'swift_code');\r\n $w_endereco_estrang = f($RS1,'endereco_estrang');\r\n $w_banco_estrang = f($RS1,'banco_estrang');\r\n $w_agencia_estrang = f($RS1,'agencia_estrang');\r\n $w_cidade_estrang = f($RS1,'cidade_estrang');\r\n $w_informacoes = f($RS1,'informacoes');\r\n $w_codigo_deposito = f($RS1,'codigo_deposito');\r\n } \r\n $w_forma_pagamento = f($RS1,'sg_forma_pagamento');\r\n $w_tipo_pessoa = f($RS1,'sq_tipo_pessoa');\r\n \r\n if (Nvl($w_sq_pessoa,0)==0) { $O='I'; } else { $O='A'; }\r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_nome_resumido = $_REQUEST['w_nome_resumido'];\r\n $w_sq_pessoa_pai = $_REQUEST['w_sq_pessoa_pai'];\r\n $w_sq_tipo_vinculo = $_REQUEST['w_sq_tipo_vinculo'];\r\n $w_nm_tipo_vinculo = $_REQUEST['w_nm_tipo_vinculo'];\r\n $w_sq_banco = $_REQUEST['w_sq_banco'];\r\n $w_sq_agencia = $_REQUEST['w_sq_agencia'];\r\n $w_operacao = $_REQUEST['w_operacao'];\r\n $w_nr_conta = $_REQUEST['w_nr_conta'];\r\n $w_sq_pais_estrang = $_REQUEST['w_sq_pais_estrang'];\r\n $w_aba_code = $_REQUEST['w_aba_code'];\r\n $w_swift_code = $_REQUEST['w_swift_code'];\r\n $w_endereco_estrang = $_REQUEST['w_endereco_estrang'];\r\n $w_banco_estrang = $_REQUEST['w_banco_estrang'];\r\n $w_agencia_estrang = $_REQUEST['w_agencia_estrang'];\r\n $w_cidade_estrang = $_REQUEST['w_cidade_estrang'];\r\n $w_informacoes = $_REQUEST['w_informacoes'];\r\n $w_codigo_deposito = $_REQUEST['w_codigo_deposito'];\r\n $w_interno = $_REQUEST['w_interno'];\r\n $w_vinculo_ativo = $_REQUEST['w_vinculo_ativo'];\r\n $w_sq_pessoa_telefone = $_REQUEST['w_sq_pessoa_telefone'];\r\n $w_ddd = $_REQUEST['w_ddd'];\r\n $w_nr_telefone = $_REQUEST['w_nr_telefone'];\r\n $w_sq_pessoa_celular = $_REQUEST['w_sq_pessoa_celular'];\r\n $w_nr_celular = $_REQUEST['w_nr_celular'];\r\n $w_sq_pessoa_fax = $_REQUEST['w_sq_pessoa_fax'];\r\n $w_nr_fax = $_REQUEST['w_nr_fax'];\r\n $w_email = $_REQUEST['w_email'];\r\n $w_sq_pessoa_endereco = $_REQUEST['w_sq_pessoa_endereco'];\r\n $w_logradouro = $_REQUEST['w_logradouro'];\r\n $w_complemento = $_REQUEST['w_complemento'];\r\n $w_bairro = $_REQUEST['w_bairro'];\r\n $w_cep = $_REQUEST['w_cep'];\r\n $w_sq_cidade = $_REQUEST['w_sq_cidade'];\r\n $w_co_uf = $_REQUEST['w_co_uf'];\r\n $w_sq_pais = $_REQUEST['w_sq_pais'];\r\n $w_pd_pais = $_REQUEST['w_pd_pais'];\r\n $w_cpf = $_REQUEST['w_cpf'];\r\n $w_nascimento = $_REQUEST['w_nascimento'];\r\n $w_rg_numero = $_REQUEST['w_rg_numero'];\r\n $w_rg_emissor = $_REQUEST['w_rg_emissor'];\r\n $w_rg_emissao = $_REQUEST['w_rg_emissao'];\r\n $w_passaporte_numero = $_REQUEST['w_passaporte_numero'];\r\n $w_sq_pais_passaporte = $_REQUEST['w_sq_pais_passaporte'];\r\n $w_sexo = $_REQUEST['w_sexo'];\r\n $w_cnpj = $_REQUEST['w_cnpj'];\r\n $w_inscricao_estadual = $_REQUEST['w_inscricao_estadual'];\r\n } elseif (strpos($w_botao,'Alterar')===false && strpos($w_botao,'Procurar')===false && ($O=='A' || $w_sq_pessoa>'' || $w_cpf>'' || $w_cnpj>'')) {\r\n // Recupera os dados do beneficiário em co_pessoa\r\n $sql = new db_getBenef; $RS = $sql->getInstanceOf($dbms,$w_cliente,$w_sq_pessoa,null,$w_cpf,$w_cnpj,null,null,null,null,null,null,null,null,null, null, null, null, null);\r\n foreach ($RS as $row) {$RS=$row; break;}\r\n if (count($RS) > 0) {\r\n $w_sq_pessoa = f($RS,'sq_pessoa');\r\n $w_nome = f($RS,'nm_pessoa');\r\n $w_nome_resumido = f($RS,'nome_resumido');\r\n $w_sq_pessoa_pai = f($RS,'sq_pessoa_pai');\r\n $w_sq_tipo_vinculo = f($RS,'sq_tipo_vinculo');\r\n $w_nm_tipo_vinculo = f($RS,'nm_tipo_vinculo');\r\n $w_interno = f($RS,'interno');\r\n $w_vinculo_ativo = f($RS,'vinculo_ativo');\r\n $w_sq_pessoa_telefone = f($RS,'sq_pessoa_telefone');\r\n $w_ddd = f($RS,'ddd');\r\n $w_nr_telefone = f($RS,'nr_telefone');\r\n $w_sq_pessoa_celular = f($RS,'sq_pessoa_celular');\r\n $w_nr_celular = f($RS,'nr_celular');\r\n $w_sq_pessoa_fax = f($RS,'sq_pessoa_fax');\r\n $w_nr_fax = f($RS,'nr_fax');\r\n $w_email = f($RS,'email');\r\n $w_sq_pessoa_endereco = f($RS,'sq_pessoa_endereco');\r\n $w_logradouro = f($RS,'logradouro');\r\n $w_complemento = f($RS,'complemento');\r\n $w_bairro = f($RS,'bairro');\r\n $w_cep = f($RS,'cep');\r\n $w_sq_cidade = f($RS,'sq_cidade');\r\n $w_co_uf = f($RS,'co_uf');\r\n $w_sq_pais = f($RS,'sq_pais');\r\n $w_pd_pais = f($RS,'pd_pais');\r\n $w_cpf = f($RS,'cpf');\r\n $w_nascimento = FormataDataEdicao(f($RS,'nascimento'));\r\n $w_rg_numero = f($RS,'rg_numero');\r\n $w_rg_emissor = f($RS,'rg_emissor');\r\n $w_rg_emissao = FormataDataEdicao(f($RS,'rg_emissao'));\r\n $w_passaporte_numero = f($RS,'passaporte_numero');\r\n $w_sq_pais_passaporte = f($RS,'sq_pais_passaporte');\r\n $w_sexo = f($RS,'sexo');\r\n $w_cnpj = f($RS,'cnpj');\r\n $w_inscricao_estadual = f($RS,'inscricao_estadual');\r\n if (strpos('CREDITO,DEPOSITO',$w_forma_pagamento)!==false) {\r\n if (Nvl($w_nr_conta,'')=='') {\r\n $w_sq_banco = f($RS,'sq_banco');\r\n $w_sq_agencia = f($RS,'sq_agencia');\r\n $w_operacao = f($RS,'operacao');\r\n $w_nr_conta = f($RS,'nr_conta');\r\n } \r\n } elseif ($w_forma_pagamento=='EXTERIOR') {\r\n if (Nvl($w_banco_estrang,'')=='' || nvl($w_troca,'-')!='w_sq_tipo_lancamento') {\r\n $w_nr_conta = f($RS_Benef,'nr_conta');\r\n $w_sq_pais_estrang = nvl($_REQUEST['w_sq_pais_estrang'],nvl(f($RS_Benef,'sq_pais_estrang'),$w_sq_pais_estrang));\r\n $w_aba_code = nvl($_REQUEST['w_aba_code'],nvl(f($RS_Benef,'aba_code'),$w_aba_code));\r\n $w_swift_code = nvl($_REQUEST['w_swift_code'],nvl(f($RS_Benef,'swift_code'),$w_swift_code));\r\n $w_endereco_estrang = nvl($_REQUEST['w_endereco_estrang'],nvl(f($RS_Benef,'endereco_estrang'),$w_endereco_estrang));\r\n $w_banco_estrang = nvl($_REQUEST['w_banco_estrang'],nvl(f($RS_Benef,'banco_estrang'),$w_banco_estrang));\r\n $w_agencia_estrang = nvl($_REQUEST['w_agencia_estrang'],nvl(f($RS_Benef,'agencia_estrang'),$w_agencia_estrang));\r\n $w_cidade_estrang = nvl($_REQUEST['w_cidade_estrang'],nvl(f($RS_Benef,'cidade_estrang'),$w_cidade_estrang));\r\n $w_informacoes = nvl($_REQUEST['w_informacoes'],nvl(f($RS_Benef,'informacoes'),$w_informacoes));\r\n } \r\n } \r\n } \r\n } \r\n\r\n // Recupera informação do campo operação do banco selecionado\r\n if (nvl($w_sq_banco,'')>'') {\r\n $sql = new db_getBankData; $RS_Banco = $sql->getInstanceOf($dbms, $w_sq_banco);\r\n $w_exige_operacao = f($RS_Banco,'exige_operacao');\r\n }\r\n Cabecalho();\r\n head();\r\n ShowHTML('<TITLE>'.$conSgSistema.' - Pessoa</TITLE>');\r\n Estrutura_CSS($w_cliente);\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n Modulo();\r\n FormataCPF();\r\n FormataCNPJ();\r\n FormataCEP();\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n ValidateOpen('Validacao');\r\n if (($w_cpf=='' && $w_cnpj=='') || (!(strpos($w_botao,'Procurar')===false)) || (!(strpos($w_botao,'Alterar')===false))) {\r\n // Se o beneficiário ainda não foi selecionado\r\n ShowHTML(' if (theForm.w_botao.value == \"Procurar\") {');\r\n Validate('w_nome','Nome','','1','4','20','1','');\r\n ShowHTML(' theForm.w_botao.value = \"Procurar\";');\r\n ShowHTML('}');\r\n ShowHTML('else {');\r\n if ($w_tipo_pessoa==1) Validate('w_cpf','CPF','CPF','1','14','14','','0123456789-.');\r\n elseif ($w_tipo_pessoa==2) Validate('w_cnpj','CNPJ','CNPJ','1','18','18','','0123456789/-.');\r\n elseif ($w_tipo_pessoa==3) Validate('w_cpf','Cód. Estrangeiro','CPF','1','10','14','','0123456789-.');\r\n elseif ($w_tipo_pessoa==4) Validate('w_cnpj','Cód. Estrangeiro','CNPJ','1','10','18','','0123456789/-.');\r\n ShowHTML(' theForm.w_sq_pessoa.value = \\'\\';');\r\n ShowHTML('}');\r\n } elseif ($O=='I' || $O=='A') {\r\n ShowHTML(' if (theForm.w_botao.value.indexOf(\"Alterar\") >= 0) { return true; }');\r\n if (Nvl($w_sq_pessoa,'')=='') {\r\n Validate('w_nome','Nome','1',1,5,60,'1','1');\r\n Validate('w_nome_resumido','Nome resumido','1',1,2,21,'1','1');\r\n } \r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) {\r\n Validate('w_sexo','Sexo','SELECT',1,1,1,'MF','');\r\n if ($w_sigla_pai=='FNDFIXO') {\r\n Validate('w_rg_numero','Identidade','1','',2,30,'1','1');\r\n Validate('w_rg_emissor','Órgão expedidor','1','',2,30,'1','1');\r\n } else {\r\n Validate('w_rg_numero','Identidade','1',1,2,30,'1','1');\r\n Validate('w_rg_emissor','Órgão expedidor','1',1,2,30,'1','1');\r\n }\r\n } elseif ($w_tipo_pessoa==2) {\r\n Validate('w_inscricao_estadual','Inscrição estadual','1','',2,20,'1','1');\r\n } \r\n if ($w_sigla_pai=='FNDFIXO') {\r\n Validate('w_ddd','DDD','1','',2,4,'','0123456789');\r\n Validate('w_nr_telefone','Telefone','1','',7,25,'1','1');\r\n Validate('w_nr_fax','Fax','1','',7,25,'1','1');\r\n Validate('w_nr_celular','Celular','1','',7,25,'1','1');\r\n ShowHTML(' if (theForm.w_ddd.value==\"\" && (theForm.w_nr_telefone.value!=\"\" || theForm.w_nr_fax.value!=\"\" || theForm.w_nr_celular.value!=\"\")) {');\r\n ShowHTML(' alert(\"Se telefone, fax ou celular forem indicados, é obrigatório informar seu DDD!\");');\r\n ShowHTML(' document.Form.w_ddd.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' } else if (theForm.w_ddd.value!=\"\" && (theForm.w_nr_telefone.value==\"\" && theForm.w_nr_fax.value==\"\" && theForm.w_nr_celular.value==\"\")) {');\r\n ShowHTML(' alert(\"Se DDD for indicado, informe pelo menos o telefone. Fax e celular são opcionais!\");');\r\n ShowHTML(' document.Form.w_nr_telefone.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n Validate('w_logradouro','Logradouro','1','',4,60,'1','1');\r\n Validate('w_complemento','Complemento','1','',2,20,'1','1');\r\n Validate('w_bairro','Bairro','1','',2,30,'1','1');\r\n Validate('w_sq_pais','País','SELECT','',1,10,'1','1');\r\n Validate('w_co_uf','UF','SELECT','',1,10,'1','1');\r\n Validate('w_sq_cidade','Cidade','SELECT','',1,10,'','1');\r\n Validate('w_cep','CEP','1','',9,9,'','0123456789-');\r\n ShowHTML(' if (theForm.w_logradouro.value==\"\" && (theForm.w_complemento.value!=\"\" || theForm.w_bairro.value!=\"\" || theForm.w_cep.value!=\"\" || theForm.w_sq_pais.selectedIndex>0 || theForm.w_co_uf.valueselectedIndex>0 || theForm.w_sq_cidade.valueselectedIndex>0)) {');\r\n ShowHTML(' alert(\"Se pais, estado ou cidade forem indicados, é obrigatório informar o logradouro!\");');\r\n ShowHTML(' document.Form.w_logradouro.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' } else if (theForm.w_logradouro.value!=\"\" && (theForm.w_sq_pais.selectedIndex==0 || theForm.w_co_uf.selectedIndex==0 || theForm.w_sq_cidade.selectedIndex==0)) {');\r\n ShowHTML(' alert(\"Se logradouro for indicado, informe pais, estado e cidade!\");');\r\n ShowHTML(' document.Form.w_logradouro.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n } else {\r\n Validate('w_ddd','DDD','1','1',2,4,'','0123456789');\r\n Validate('w_nr_telefone','Telefone','1',1,7,25,'1','1');\r\n Validate('w_nr_fax','Fax','1','',7,25,'1','1');\r\n Validate('w_nr_celular','Celular','1','',7,25,'1','1');\r\n if (f($RS_Menu,'sigla')=='FNDVIA') {\r\n Validate('w_logradouro','Logradouro','1','',4,60,'1','1');\r\n ShowHTML(' if (theForm.w_logradouro.value!=\"\" && (theForm.w_sq_pais.selectedIndex==0 || theForm.w_co_uf.selectedIndex==0 || theForm.w_sq_cidade.selectedIndex==0)) {');\r\n ShowHTML(' alert(\"Se logradouro for indicado, informe pais, estado e cidade!\");');\r\n ShowHTML(' document.Form.w_logradouro.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n } else {\r\n Validate('w_logradouro','Logradouro','1',1,4,60,'1','1');\r\n }\r\n Validate('w_complemento','Complemento','1','',2,20,'1','1');\r\n Validate('w_bairro','Bairro','1','',2,30,'1','1');\r\n Validate('w_sq_pais','País','SELECT',1,1,10,'1','1');\r\n Validate('w_co_uf','UF','SELECT',1,1,10,'1','1');\r\n Validate('w_sq_cidade','Cidade','SELECT',1,1,10,'','1');\r\n if (Nvl($w_pd_pais,'S')=='S') Validate('w_cep','CEP','1','',9,9,'','0123456789-');\r\n else Validate('w_cep','CEP','1',1,5,9,'','0123456789');\r\n }\r\n Validate('w_email','E-Mail','1','',4,60,'1','1');\r\n ShowHTML(' if (theForm.w_email.value!=\"\" && (theForm.w_sq_pais.selectedIndex==0 || theForm.w_co_uf.selectedIndex==0 || theForm.w_sq_cidade.selectedIndex==0)) {');\r\n ShowHTML(' alert(\"Se e-mail for indicado, informe pais, estado e cidade!\");');\r\n ShowHTML(' document.Form.w_email.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n if (substr(f($RS1,'sigla'),0,3)=='FND') {\r\n if (!(strpos('CREDITO,DEPOSITO',$w_forma_pagamento)===false)) {\r\n Validate('w_sq_banco','Banco','SELECT',1,1,10,'1','1');\r\n Validate('w_sq_agencia','Agencia','SELECT',1,1,10,'1','1');\r\n if ($w_exige_operacao=='S') Validate('w_operacao','Operação','1','1',1,6,'','0123456789');\r\n Validate('w_nr_conta','Número da conta','1','1',2,30,'ZXAzxa','0123456789-');\r\n } elseif ($w_forma_pagamento=='ORDEM') {\r\n Validate('w_sq_banco','Banco','SELECT',1,1,10,'1','1');\r\n Validate('w_sq_agencia','Agencia','SELECT',1,1,10,'1','1');\r\n } elseif ($w_forma_pagamento=='EXTERIOR') {\r\n Validate('w_banco_estrang','Banco de destino','1','1',1,60,1,1);\r\n Validate('w_aba_code','Código ABA','1','',1,12,1,1);\r\n Validate('w_swift_code','Código SWIFT','1','1',1,30,'',1);\r\n Validate('w_endereco_estrang','Endereço da agência destino','1','',3,100,1,1);\r\n ShowHTML(' if (theForm.w_aba_code.value == \\'\\' && theForm.w_swift_code.value == \\'\\' && theForm.w_endereco_estrang.value == \\'\\') {');\r\n ShowHTML(' alert(\"Informe código ABA, código SWIFT ou endereço da agência!\");');\r\n ShowHTML(' document.Form.w_aba_code.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n Validate('w_agencia_estrang','Nome da agência destino','1','1',1,60,1,1);\r\n Validate('w_nr_conta','Número da conta','1',1,1,30,1,1);\r\n Validate('w_cidade_estrang','Cidade da agência','1','1',1,60,1,1);\r\n Validate('w_sq_pais_estrang','País da agência','SELECT','1',1,18,1,1);\r\n Validate('w_informacoes','Informações adicionais','1','',5,200,1,1);\r\n }\r\n } \r\n ShowHTML(' disAll();');\r\n } \r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</head>');\r\n if (($w_cpf=='' && $w_cnpj=='') || strpos($w_botao,'Alterar')!==false || strpos($w_botao,'Procurar')!==false) {\r\n // Se o beneficiário ainda não foi selecionado\r\n if (strpos($w_botao,'Procurar')!==false) {\r\n // Se está sendo feita busca por nome\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } else {\r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) BodyOpen('onLoad=\\'document.Form.w_cpf.focus()\\';');\r\n else BodyOpen('onLoad=\\'document.Form.w_cnpj.focus()\\';');\r\n } \r\n } elseif ($w_troca>'') {\r\n BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n } else {\r\n if (Nvl($w_sq_pessoa,'')>'') {\r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) {\r\n BodyOpen('onLoad=\\'document.Form.w_sexo.focus()\\';');\r\n } elseif ($w_tipo_pessoa==2) {\r\n BodyOpen('onLoad=\\'document.Form.w_inscricao_estadual.focus()\\';');\r\n } \r\n } else {\r\n BodyOpen('onLoad=\\'document.Form.w_nome.focus()\\';');\r\n } \r\n } \r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n ShowHTML('<tr><td colspan=3 bgcolor=\"#FAEBD7\"><table border=1 width=\"100%\"><tr><td>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr><td colspan=3><b>'.upper(f($RS1,'nome')).' '.f($RS1,'codigo_interno').' ('.$w_chave.')</b></td>');\r\n ShowHTML(' <tr><td colspan=\"3\">Finalidade: <b>'.CRLF2BR(f($RS1,'descricao')).'</b></td></tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td>Forma de pagamento:<br><b>'.f($RS1,'nm_forma_pagamento').' </b></td>');\r\n ShowHTML(' <td>Vencimento:<br><b>'.FormataDataEdicao(f($RS1,'vencimento')).' </b></td>');\r\n ShowHTML(' <td>Valor:<br><b>'.formatNumber(Nvl(f($RS1,'valor'),0)).' </b></td>');\r\n ShowHTML(' </TABLE>');\r\n ShowHTML('</TABLE>');\r\n ShowHTML(' <tr><td colspan=\"3\">&nbsp;');\r\n if (strpos('IA',$O)!==false) {\r\n if (($w_cpf=='' && $w_cnpj=='') || strpos($w_botao,'Alterar')!==false || strpos($w_botao,'Procurar')!==false) {\r\n // Se o beneficiário ainda não foi selecionado\r\n ShowHTML('<FORM action=\"'.$w_dir.$w_pagina.$par.'\" method=\"POST\" name=\"Form\" onSubmit=\"return(Validacao(this));\">');\r\n } else {\r\n ShowHTML('<FORM action=\"'.$w_dir.$w_pagina.'Grava\" method=\"POST\" name=\"Form\" onSubmit=\"return(Validacao(this));\">');\r\n if (Nvl($w_sq_pessoa,'')>'') {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_nome\" value=\"'.$w_nome.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_nome_resumido\" value=\"'.$w_nome_resumido.'\">');\r\n } \r\n } \r\n ShowHTML('<INPUT type=\"hidden\" name=\"P1\" value=\"'.$P1.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"P2\" value=\"'.$P2.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"P3\" value=\"'.$P3.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"P4\" value=\"'.$P4.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"TP\" value=\"'.$TP.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"SG\" value=\"'.$SG.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"R\" value=\"'.$w_pagina.$par.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"O\" value=\"'.$O.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_botao\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.$w_menu.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_aux\" value=\"'.$w_cliente.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_pessoa\" value=\"'.$w_sq_pessoa.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_pessoa_atual\" value=\"'.$w_pessoa_atual.'\">');\r\n if (($w_cpf=='' && $w_cnpj=='') || strpos($w_botao,'Alterar')!==false || strpos($w_botao,'Procurar')!==false) {\r\n $w_nome=$_REQUEST['w_nome'];\r\n if (strpos($w_botao,'Alterar')!==false) {\r\n $w_cpf='';\r\n $w_cnpj='';\r\n $w_nome='';\r\n } \r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=\"3\">');\r\n ShowHTML(' <table border=\"0\" width=\"100%\">');\r\n ShowHTML(' <tr><td colspan=4><font size=2>Informe os dados abaixo e clique no botão \"Selecionar\" para continuar.</TD>');\r\n if ($w_tipo_pessoa==1) ShowHTML(' <tr><td colspan=4><b><u>C</u>PF:<br><INPUT ACCESSKEY=\"C\" TYPE=\"text\" class=\"sti\" NAME=\"w_cpf\" VALUE=\"'.$w_cpf.'\" SIZE=\"14\" MaxLength=\"14\" onKeyDown=\"FormataCPF(this, event);\">');\r\n elseif ($w_tipo_pessoa==2) ShowHTML(' <tr><td colspan=4><b><u>C</u>NPJ:<br><INPUT ACCESSKEY=\"C\" TYPE=\"text\" class=\"sti\" NAME=\"w_cnpj\" VALUE=\"'.$w_cnpj.'\" SIZE=\"18\" MaxLength=\"18\" onKeyDown=\"FormataCNPJ(this, event);\">');\r\n elseif ($w_tipo_pessoa==3) ShowHTML(' <tr><td colspan=4><b><u>C</u>ód. Estrangeiro:<br><INPUT ACCESSKEY=\"C\" TYPE=\"text\" class=\"sti\" NAME=\"w_cpf\" VALUE=\"'.$w_cpf.'\" SIZE=\"14\" MaxLength=\"14\" onKeyDown=\"FormataCPF(this, event);\">');\r\n elseif ($w_tipo_pessoa==3) ShowHTML(' <tr><td colspan=4><b><u>C</u>ód. Estrangeiro:<br><INPUT ACCESSKEY=\"C\" TYPE=\"text\" class=\"sti\" NAME=\"w_cnpj\" VALUE=\"'.$w_cnpj.'\" SIZE=\"18\" MaxLength=\"18\" onKeyDown=\"FormataCNPJ(this, event);\">');\r\n\r\n ShowHTML(' <INPUT class=\"stb\" TYPE=\"submit\" NAME=\"Botao\" VALUE=\"Selecionar\" onClick=\"document.Form.w_botao.value=this.value; document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'\">');\r\n if ($P2==1) {\r\n ShowHTML(' <INPUT class=\"stb\" type=\"button\" onClick=\"parent.$.fancybox.close();\" name=\"Botao\" value=\"Cancelar\">');\r\n } else {\r\n ShowHTML(' <INPUT class=\"stb\" type=\"button\" onClick=\"window.close(); opener.focus();\" name=\"Botao\" value=\"Cancelar\">');\r\n }\r\n ShowHTML(' <tr><td colspan=4><p>&nbsp</p>');\r\n ShowHTML(' <tr><td colspan=4 heigth=1 bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td colspan=4>');\r\n ShowHTML(' <b><u>P</u>rocurar pelo nome:</b> (Informe qualquer parte do nome SEM ACENTOS)<br><INPUT ACCESSKEY=\"P\" TYPE=\"text\" class=\"sti\" NAME=\"w_nome\" VALUE=\"'.$w_nome.'\" SIZE=\"20\" MaxLength=\"20\">');\r\n ShowHTML(' <INPUT class=\"stb\" TYPE=\"submit\" NAME=\"Botao\" VALUE=\"Procurar\" onClick=\"document.Form.w_botao.value=this.value; document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'\">');\r\n if ($w_nome>'') {\r\n $sql = new db_getBenef; $RS = $sql->getInstanceOf($dbms,$w_cliente,null,null,null,null,$w_nome,$w_tipo_pessoa,null,null,null,null,null,null,null, null, null, null, null);\r\n $RS = SortArray($RS,'nm_pessoa','asc');\r\n ShowHTML('<tr><td colspan=4><br>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Nome</td>');\r\n ShowHTML(' <td><b>Nome resumido</td>');\r\n ShowHTML(' <td><b>CPF/CNPJ/Cód. Estrangeiro</td>');\r\n ShowHTML(' <td><b>Operações</td>');\r\n ShowHTML(' </tr>');\r\n if (!count($RS)) {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=4 align=\"center\"><b>Não há pessoas que contenham o texto informado.</b></td></tr>');\r\n } else {\r\n foreach($RS as $row) {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" valign=\"top\">');\r\n ShowHTML(' <td>'.f($row,'nm_pessoa').'</td>');\r\n ShowHTML(' <td>'.f($row,'nome_resumido').'</td>');\r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) ShowHTML(' <td align=\"center\">'.Nvl(f($row,'cpf'),'---').'</td>');\r\n else ShowHTML(' <td align=\"center\">'.Nvl(f($row,'cnpj'),'---').'</td>');\r\n ShowHTML(' <td nowrap>');\r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$R.'&O=A&w_cpf='.f($row,'cpf').'&w_menu='.$w_menu.'&w_sq_pessoa='.f($row,'sq_pessoa').'&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&Botao=Selecionar\">Selecionar</A>&nbsp');\r\n else ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$R.'&O=A&w_cnpj='.f($row,'cnpj').'&w_menu='.$w_menu.'&w_sq_pessoa='.f($row,'sq_pessoa').'&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&Botao=Selecionar\">Selecionar</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n } \r\n } \r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n } \r\n ShowHTML(' </table>');\r\n } else {\r\n if (Nvl($w_sq_pais,'')=='' && $w_sigla_pai!='FNDFIXO') {\r\n // Carrega os valores padrão para país, estado e cidade\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n $w_sq_pais = f($RS,'sq_pais');\r\n $w_co_uf = f($RS,'co_uf');\r\n $w_sq_cidade = f($RS,'sq_cidade_padrao');\r\n } \r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\"><font color=\"#BC5151\"><b>ATENÇÃO: Para garantir a gravaçao dos dados bancários, clique sobre o botão \"Gravar\".</b></font></td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=\"0\" width=\"100%\">');\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) {\r\n ShowHTML(' <td>'.(($w_tipo_pessoa==1) ? 'CPF' : 'Cód. Estrangeiro').':<br><b><font size=2>'.$w_cpf);\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_cpf\" value=\"'.$w_cpf.'\">');\r\n } else {\r\n ShowHTML(' <td>'.(($w_tipo_pessoa==2) ? 'CNPJ' : 'Cód. Estrangeiro').':<br><b><font size=2>'.$w_cnpj);\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_cnpj\" value=\"'.$w_cnpj.'\">');\r\n } \r\n if (Nvl($w_sq_pessoa,'')>'') {\r\n ShowHTML(' <td>Nome completo:<b><br>'.$w_nome.'</td>');\r\n ShowHTML(' <td>Nome resumido:<b><br>'.$w_nome_resumido.'</td>');\r\n } else {\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b><u>N</u>ome completo:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_nome\" class=\"sti\" SIZE=\"45\" MAXLENGTH=\"60\" VALUE=\"'.$w_nome.'\"></td>');\r\n ShowHTML(' <td><b><u>N</u>ome resumido:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_nome_resumido\" class=\"sti\" SIZE=\"15\" MAXLENGTH=\"21\" VALUE=\"'.$w_nome_resumido.'\"></td>');\r\n } \r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) {\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoSexo('Se<u>x</u>o:','X',null,$w_sexo,null,'w_sexo',null,null);\r\n ShowHTML(' <td><b><u>I</u>dentidade:</b><br><input '.$w_Disabled.' accesskey=\"I\" type=\"text\" name=\"w_rg_numero\" class=\"sti\" SIZE=\"14\" MAXLENGTH=\"80\" VALUE=\"'.$w_rg_numero.'\"></td>');\r\n ShowHTML(' <td><b>Ór<u>g</u>ão emissor:</b><br><input '.$w_Disabled.' accesskey=\"G\" type=\"text\" name=\"w_rg_emissor\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"30\" VALUE=\"'.$w_rg_emissor.'\"></td>');\r\n } elseif ($w_tipo_pessoa==2) {\r\n ShowHTML(' <tr><td colspan=\"3\"><b><u>I</u>nscrição estadual:</b><br><input '.$w_Disabled.' accesskey=\"I\" type=\"text\" name=\"w_inscricao_estadual\" class=\"sti\" SIZE=\"20\" MAXLENGTH=\"20\" VALUE=\"'.$w_inscricao_estadual.'\"></td>');\r\n } \r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Endereço comercial, Telefones e e-Mail</td></td></tr>');\r\n else ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Endereço principal, Telefones e e-Mail</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b><u>D</u>DD:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"w_ddd\" class=\"sti\" SIZE=\"4\" MAXLENGTH=\"4\" VALUE=\"'.$w_ddd.'\"></td>');\r\n ShowHTML(' <td><b>Te<u>l</u>efone:</b><br><input '.$w_Disabled.' accesskey=\"L\" type=\"text\" name=\"w_nr_telefone\" class=\"sti\" SIZE=\"20\" MAXLENGTH=\"40\" VALUE=\"'.$w_nr_telefone.'\"> '.consultaTelefone($w_cliente).'</td>');\r\n ShowHTML(' <td title=\"Se a pessoa informar um número de fax, informe-o neste campo.\"><b>Fa<u>x</u>:</b><br><input '.$w_Disabled.' accesskey=\"X\" type=\"text\" name=\"w_nr_fax\" class=\"sti\" SIZE=\"20\" MAXLENGTH=\"20\" VALUE=\"'.$w_nr_fax.'\"></td>');\r\n ShowHTML(' <td title=\"Se a pessoa informar um celular institucional, informe-o neste campo.\"><b>C<u>e</u>lular:</b><br><input '.$w_Disabled.' accesskey=\"E\" type=\"text\" name=\"w_nr_celular\" class=\"sti\" SIZE=\"20\" MAXLENGTH=\"20\" VALUE=\"'.$w_nr_celular.'\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td colspan=2><b>En<u>d</u>ereço:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"w_logradouro\" class=\"sti\" SIZE=\"50\" MAXLENGTH=\"50\" VALUE=\"'.$w_logradouro.'\"></td>');\r\n ShowHTML(' <td><b>C<u>o</u>mplemento:</b><br><input '.$w_Disabled.' accesskey=\"O\" type=\"text\" name=\"w_complemento\" class=\"sti\" SIZE=\"20\" MAXLENGTH=\"20\" VALUE=\"'.$w_complemento.'\"></td>');\r\n ShowHTML(' <td><b><u>B</u>airro:</b><br><input '.$w_Disabled.' accesskey=\"B\" type=\"text\" name=\"w_bairro\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_bairro.'\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoPais('<u>P</u>aís:','P',null,$w_sq_pais,null,'w_sq_pais',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_co_uf\\'; document.Form.submit();\"');\r\n ShowHTML(' <td>');\r\n SelecaoEstado('E<u>s</u>tado:','S',null,$w_co_uf,$w_sq_pais,null,'w_co_uf',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_sq_cidade\\'; document.Form.submit();\"');\r\n SelecaoCidade('<u>C</u>idade:','C',null,$w_sq_cidade,$w_sq_pais,$w_co_uf,'w_sq_cidade',null,null);\r\n ShowHTML(' <tr valign=\"top\">');\r\n if (Nvl($w_pd_pais,'S')=='S') {\r\n ShowHTML(' <td><b>C<u>E</u>P:</b><br><input '.$w_Disabled.' accesskey=\"E\" type=\"text\" name=\"w_cep\" class=\"sti\" SIZE=\"9\" MAXLENGTH=\"9\" VALUE=\"'.$w_cep.'\" onKeyDown=\"FormataCEP(this,event);\"></td>');\r\n } else {\r\n ShowHTML(' <td><b>C<u>E</u>P:</b><br><input '.$w_Disabled.' accesskey=\"E\" type=\"text\" name=\"w_cep\" class=\"sti\" SIZE=\"9\" MAXLENGTH=\"9\" VALUE=\"'.$w_cep.'\"></td>');\r\n } \r\n ShowHTML(' <td colspan=3 title=\"Se a pessoa informar um e-mail institucional, informe-o neste campo.\"><b>e-<u>M</u>ail:</b><br><input '.$w_Disabled.' accesskey=\"M\" type=\"text\" name=\"w_email\" class=\"sti\" SIZE=\"50\" MAXLENGTH=\"60\" VALUE=\"'.$w_email.'\"></td>');\r\n ShowHTML(' </table>');\r\n if (substr(f($RS_Menu,'sigla'),0,3)!='FNR') {\r\n // Se não for lançamento de receita\r\n if (!(strpos('CREDITO,DEPOSITO',$w_forma_pagamento)===false)) {\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Dados bancários</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoBanco('<u>B</u>anco:','B','Selecione o banco onde deverão ser feitos os pagamentos referentes ao lançamento.',$w_sq_banco,null,'w_sq_banco',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_sq_agencia\\'; document.Form.submit();\"');\r\n SelecaoAgencia('A<u>g</u>ência:','A','Selecione a agência onde deverão ser feitos os pagamentos referentes ao lançamento.',$w_sq_agencia,Nvl($w_sq_banco,-1),'w_sq_agencia',null,null);\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_exige_operacao=='S') ShowHTML(' <td title=\"Alguns bancos trabalham com o campo \"Operação\", além do número da conta. A Caixa Econômica Federal é um exemplo. Se for o caso,informe a operação neste campo; caso contrário, deixe-o em branco.\"><b>O<u>p</u>eração:</b><br><input '.$w_Disabled.' accesskey=\"O\" type=\"text\" name=\"w_operacao\" class=\"sti\" SIZE=\"6\" MAXLENGTH=\"6\" VALUE=\"'.$w_operacao.'\"></td>');\r\n ShowHTML(' <td title=\"Informe o número da conta bancária, colocando o dígito verificador, se existir, separado por um hífen. Exemplo: 11214-3. Se o banco não trabalhar com dígito verificador, informe apenas números. Exemplo: 10845550.\"><b>Número da con<u>t</u>a:</b><br><input '.$w_Disabled.' accesskey=\"T\" type=\"text\" name=\"w_nr_conta\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_nr_conta.'\"></td>');\r\n ShowHTML(' </table>');\r\n } elseif ($w_forma_pagamento=='ORDEM') {\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Dados para Ordem Bancária</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoBanco('<u>B</u>anco:','B','Selecione o banco onde deverão ser feitos os pagamentos referentes ao lançamento.',$w_sq_banco,null,'w_sq_banco',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_sq_agencia\\'; document.Form.submit();\"');\r\n SelecaoAgencia('A<u>g</u>ência:','A','Selecione a agência onde deverão ser feitos os pagamentos referentes ao lançamento.',$w_sq_agencia,Nvl($w_sq_banco,-1),'w_sq_agencia',null,null);\r\n } elseif ($w_forma_pagamento=='EXTERIOR') {\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Dados da conta no exterior</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><b><font color=\"#BC3131\">ATENÇÃO:</font></b> É obrigatório o preenchimento de um destes campos: Swift Code, ABA Code ou Endereço da Agência.</td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td title=\"Banco onde o crédito deve ser efetuado.\"><b><u>B</u>anco de crédito:</b><br><input '.$w_Disabled.' accesskey=\"B\" type=\"text\" name=\"w_banco_estrang\" class=\"sti\" SIZE=\"40\" MAXLENGTH=\"60\" VALUE=\"'.$w_banco_estrang.'\"></td>');\r\n ShowHTML(' <td title=\"Código ABA da agência destino.\"><b>A<u>B</u>A code:</b><br><input '.$w_Disabled.' accesskey=\"B\" type=\"text\" name=\"w_aba_code\" class=\"sti\" SIZE=\"12\" MAXLENGTH=\"12\" VALUE=\"'.$w_aba_code.'\"></td>');\r\n ShowHTML(' <td title=\"Código SWIFT da agência destino.\"><b>S<u>W</u>IFT code:</b><br><input '.$w_Disabled.' accesskey=\"W\" type=\"text\" name=\"w_swift_code\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_swift_code.'\"></td>');\r\n ShowHTML(' <tr><td colspan=3 title=\"Endereço da agência.\"><b>E<u>n</u>dereço da agência:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_endereco_estrang\" class=\"sti\" SIZE=\"80\" MAXLENGTH=\"100\" VALUE=\"'.$w_endereco_estrang.'\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td colspan=2 title=\"Nome da agência destino.\"><b>Nome da a<u>g</u>ência:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_agencia_estrang\" class=\"sti\" SIZE=\"40\" MAXLENGTH=\"60\" VALUE=\"'.$w_agencia_estrang.'\"></td>');\r\n ShowHTML(' <td title=\"Número da conta destino.\"><b>Número da con<u>t</u>a:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_nr_conta\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_nr_conta.'\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td colspan=2 title=\"Cidade da agência destino.\"><b><u>C</u>idade:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_cidade_estrang\" class=\"sti\" SIZE=\"40\" MAXLENGTH=\"60\" VALUE=\"'.$w_cidade_estrang.'\"></td>');\r\n SelecaoPais('<u>P</u>aís:','P','Selecione o país de destino',$w_sq_pais_estrang,null,'w_sq_pais_estrang',null,null);\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td colspan=2 title=\"Se necessário, escreva informações adicionais relevantes para o pagamento.\"><b>Info<u>r</u>mações adicionais:</b><br><textarea '.$w_Disabled.' accesskey=\"R\" name=\"w_informacoes\" class=\"sti\" ROWS=3 cols=75 >'.$w_informacoes.'</TEXTAREA></td>');\r\n } \r\n } \r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\" onClick=\"document.Form.w_botao.value=this.value;\">');\r\n if (strpos(f($RS_Menu,'sigla'),'CONT')===false && strpos(f($RS_Menu,'sigla'),'VIA')===false && $w_modulo_pai!=='CO') {\r\n // Se não for lançamento para parcela de contrato\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Alterar pessoa\" onClick=\"document.Form.w_botao.value=this.value; document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.submit();\">');\r\n } \r\n if ($P2==1) {\r\n ShowHTML(' <INPUT type=\"button\" class=\"stb\" onClick=\"javascript:parent.$.fancybox.close();\" name=\"Botao\" value=\"Cancelar\">');\r\n } else {\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"window.close(); opener.focus();\" name=\"Botao\" value=\"Cancelar\">');\r\n }\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n } \r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n}", "title": "" }, { "docid": "d912a8f9f6e0bf5cccd6ebf92ddb60e6", "score": "0.55799043", "text": "function faireTravail ()\r\n {\r\n // JE PEUX UTLISER LES PROPRIETES protected OU private (LECTURE ET ECRITURE)\r\n echo $this->proprieteProtected;\r\n echo \"|\";\r\n echo $this->proprietePrivate;\r\n\r\n }", "title": "" }, { "docid": "798762156d41079f8cead1130f6af95d", "score": "0.5579813", "text": "function tgl_indonesia($tanggal) {\n\t$pisah = explode('-',$tanggal);\n\t$larik = array($pisah[2],$pisah[1],$pisah[0]);\n\t$satukan = implode('-',$larik);\n\treturn $satukan;\n}", "title": "" }, { "docid": "8c40050e54afba5a6f73faccedfa4113", "score": "0.55749446", "text": "function tgl_ina3($parameter){ //ini untuk mengubah format 2015-06-15 17:00:00 ke dalam format 15/06/2015\r\n\r\n$thn=substr($parameter,2,2); //menngambil 2 digit dari kiri, 2 adalah index ketiga dari tahun (angka 1 dari 2015), 2 banyaknya digit yg diambil\r\n$bln=substr($parameter,5,2);\r\n$tgl=substr($parameter,-2); //mengambil 2 digit dari kanan\r\n\r\n$tanggal=$tgl. \"/\".$bln.\"/\".$thn;\r\n$jam=$parameter3;\r\n$waktu=$tanggal;\r\n\r\nreturn $waktu;\r\n}", "title": "" }, { "docid": "41f2f32f593f3f65bd86d134ee209228", "score": "0.5568887", "text": "public function tlp() {\n return \"$this->merek dengan warna $this->warna <br/>\";\n }", "title": "" }, { "docid": "626ac78b2182862295e054315221d2df", "score": "0.55657274", "text": "function tgl_indo($tanggal){\n $bulan = array (\n 1 => 'Januari',\n 'Februari',\n 'Maret',\n 'April',\n 'Mei',\n 'Juni',\n 'Juli',\n 'Agustus',\n 'September',\n 'Oktober',\n 'November',\n 'Desember'\n );\n $pecahkan = explode('-', $tanggal);\n \n // variabel pecahkan 0 = tanggal\n // variabel pecahkan 1 = bulan\n // variabel pecahkan 2 = tahun\n \n return $pecahkan[2] . ' ' . $bulan[ (int)$pecahkan[1] ] . ' ' . $pecahkan[0];\n}", "title": "" }, { "docid": "8303457693425b3fdfa0a411a05962f1", "score": "0.55629474", "text": "function ProvjeriPodatke() {\n $greska = \"\";\n foreach ($_POST as $kljuc => $vrijednost) { //petlja za svaki element forme\n if($kljuc==\"hint\"){\n //hint može biti null\n }elseif (empty($vrijednost)) { // ako je vrijednost elementa prazna\n $greska .= \" $kljuc vrijednost nije unesena.\" . '\\n';\n $GLOBALS['popisGresaka'] .= \"Element s greskom: \" . $kljuc . \"<br>\";\n }\n }\n if (!empty($greska)) {\n echo \"<script>alert('$greska');</script>\"; // ispisi sve greske (ako ih ima)\n }\n }", "title": "" }, { "docid": "cdb608189cf2731c2b6b4edb8d96e250", "score": "0.556067", "text": "function formatRupiah($angka) //function Untuk Melakukan Tugas Secara Berulang Ulang\n {\n $hasil_rupiah = \"Rp \" . number_format($angka, 2, ',', '.');\n return $hasil_rupiah;\n }", "title": "" }, { "docid": "c883d587c5568c27777d08d70b952bdf", "score": "0.5560034", "text": "function get_menit($waktu_mt, $satuan = 'm'){\r\n\t//..reset isi.begin\r\n\t$i \t= 0;\r\n\t\r\n\t$s\t= 0;\r\n\t$m\t= 0;\r\n\t$h\t= 0;\r\n\t$d\t= 0;\r\n\t$w\t= 0;\r\n\t\r\n\t$rs\t= \"\";\r\n\t$rm\t= \"\";\r\n\t$rh\t= \"\";\r\n\t$rd\t= \"\";\r\n\t$rw\t= \"\";\r\n\t\r\n\t$awal = \"\";\r\n\t//..reset isi.end\r\n\t$result = 0;\r\n\t$awal = $waktu_mt;\r\n\t//..pisah waktu.begin\r\n\t$pow = strpos($awal, 'w');\r\n\t$pod = strpos($awal, 'd');\r\n\t$poh = strpos($awal, 'h');\r\n\t$pom = strpos($awal, 'm');\r\n\t$pos = strpos($awal, 's');\r\n\r\n\t\t//.ambil minggu\r\n\t\tif($pow > 0) {\r\n\t\t\t$aw = preg_match('/(.*?)w/', $awal, $row);\r\n\t\t\t$w\t= $row[1];\r\n\t\t\tif($w == \"\"){\r\n\t\t\t\t$w = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//.ambil hari\r\n\t\tif($pod > 0) { \r\n\t\t\tif($pow > 0) {\r\n\t\t\t\t$ad = preg_match('/w(.*?)d/', $awal, $row);\r\n\t\t\t\t$d = $row[1];\r\n\t\t\t} else {\r\n\t\t\t\t$ad = preg_match('/(.*?)d/', $awal, $row);\r\n\t\t\t\t$d = $row[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//.ambil jam\r\n\t\tif($poh > 0) { \r\n\t\t\tif($pod > 0) {\r\n\t\t\t\t$ah = preg_match('/d(.*?)h/', $awal, $row);\r\n\t\t\t\t$h = $row[1];\r\n\t\t\t} else if($pow > 0) {\r\n\t\t\t\t$ah = preg_match('/w(.*?)h/', $awal, $row);\r\n\t\t\t\t$h = $row[1];\r\n\t\t\t} else {\r\n\t\t\t\t$ah = preg_match('/(.*?)h/', $awal, $row);\r\n\t\t\t\t$h = $row[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//.ambil menit\r\n\t\tif($pom > 0) { \r\n\t\t\tif($poh > 0) {\r\n\t\t\t\t$am = preg_match('/h(.*?)m/', $awal, $row);\r\n\t\t\t\t$m = $row[1];\r\n\t\t\t} else if($pod > 0) {\r\n\t\t\t\t$am = preg_match('/d(.*?)m/', $awal, $row);\r\n\t\t\t\t$m = $row[1];\r\n\t\t\t} else if($pow > 0) {\r\n\t\t\t\t$am = preg_match('/w(.*?)m/', $awal, $row);\r\n\t\t\t\t$m = $row[1];\r\n\t\t\t} else {\r\n\t\t\t\t$am = preg_match('/(.*?)m/', $awal, $row);\r\n\t\t\t\t$m = $row[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//.ambil detik\r\n\t\tif($pos > 0) { \r\n\t\t\tif($pom > 0) {\r\n\t\t\t\t$as = preg_match('/m(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t} else if($poh > 0) {\r\n\t\t\t\t$as = preg_match('/h(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t} else if($pod > 0) {\r\n\t\t\t\t$as = preg_match('/d(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t} else if($pow > 0) {\r\n\t\t\t\t$as = preg_match('/w(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t} else {\r\n\t\t\t\t$as = preg_match('/(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//..jadikan semuanya menit.begin\r\n\t\t$tw = 0;\r\n\t\tif($w > 0) {\r\n\t\t\t$tw = $w; //ambil minggu\r\n\t\t}\r\n\t\t\r\n\t\t$td = 0;\r\n\t\tif($tw > 0){\r\n\t\t\t$td = $d + ($tw * 7); //1 minggu 7 hari\r\n\t\t} else {\r\n\t\t\t$td = $d;\r\n\t\t}\r\n\t\t\r\n\t\t$th = 0;\r\n\t\tif($td > 0){\r\n\t\t\t$th = $h + ($td * 24); //1 hari 24 jam\r\n\t\t} else {\r\n\t\t\t$th = $h;\r\n\t\t}\r\n\t\t\r\n\t\t$tm = 0;\r\n\t\tif($th > 0){\r\n\t\t\t$tm = $m + ($th * 60); //1 jam 60 menit\r\n\t\t} else {\r\n\t\t\t$tm = $m;\r\n\t\t}\r\n\t\t\r\n\t\t$ts = 0;\r\n\t\tif($tm > 0){\r\n\t\t\t$ts = $s + ($tm * 60); //1 jam 60 menit\r\n\t\t} else {\r\n\t\t\t$ts = $s;\r\n\t\t}\r\n\t\t//..jadikan semuanya menit.end\r\n\t\t/*\r\n\t\t//.logika keterlibatan (show/hide).begin\r\n\t\t\t$rw = \"\";\r\n\t\t\tif($w > 0){\r\n\t\t\t\t$rw = $w.\"w\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rd = \"\";\r\n\t\t\tif($d > 0){\r\n\t\t\t\t$rd = $d.\"d\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rh = \"\";\r\n\t\t\tif($h > 0){\r\n\t\t\t\t$rh = $h.\"h\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rm = \"\";\r\n\t\t\tif($m > 0){\r\n\t\t\t\t$rm = $m.\"m\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rs = \"\";\r\n\t\t\tif($s > 0){\r\n\t\t\t\t$rs = $s.\"s\";\r\n\t\t\t}\r\n\t\t//.logika keterlibatan (show/hide).end\r\n\r\n\t\t$result = $rw.$rd.$rh.$rm.$rs;\r\n\t\t$result .= \"|\";\r\n\t\t*/\r\n\t\t$result = $tm;\r\n\t\tif($satuan == 'w'){\r\n\t\t\t$result = $tw;\r\n\t\t} else if($satuan == 'd'){\r\n\t\t\t$result = $td;\r\n\t\t} else if($satuan == 'h'){\r\n\t\t\t$result = $th;\r\n\t\t} else if($satuan == 'm'){\r\n\t\t\t$result = $tm;\r\n\t\t} else if($satuan == 's'){\r\n\t\t\t$result = $ts;\r\n\t\t}\r\n\t\treturn $result;\r\n\t//..pisah waktu.end\r\n}", "title": "" }, { "docid": "ab9c279b51c179b719fc2fe2cad22a65", "score": "0.5558591", "text": "function rupiah($angka){\n $hasil_rupiah = \"Rp. \" . number_format($angka,2,',','.');\n return $hasil_rupiah;\n }", "title": "" }, { "docid": "f180dc605522fcbab60a5297524d6595", "score": "0.5552251", "text": "function PD1_getParameter3($post){\r\n \r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n \r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n \r\n </tr>\r\n </table>\";\r\n\r\n $html .= \"<table cellspacing='0' cellpadding='3' width='100%'>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <td style='border: 1px solid #dddddd;' ><b>No</b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>No UPB </b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Nama UPB </b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Kategori UPB</b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Tanggal Approval Cek Dokumen Prareg oleh PD</b></td> \r\n </tr>\r\n \";\r\n\r\n\r\n //Kategory A\r\n $sql1 =\"SELECT pu.`iupb_id`, pu.tconfirm_dok_pd FROM plc2.plc2_upb pu \r\n WHERE pu.`ldeleted` = 0 AND \r\n pu.`iteampd_id` = 1 AND pu.`itipe_id` NOT IN(6) AND \r\n pu.`ikategoriupb_id` = 10 AND pu.iconfirm_dok_pd=1\r\n AND pu.tconfirm_dok_pd IS NOT NULL AND \r\n pu.tconfirm_dok_pd between '\".$perode1.\"' AND '\".$perode2.\"'\";\r\n //Non Kategory A\r\n $sql2 =\"SELECT pu.`iupb_id`,pu.vupb_nomor,pu.vupb_nama,pu.ikategoriupb_id, pu.tconfirm_dok_pd FROM plc2.plc2_upb pu \r\n WHERE pu.`ldeleted` = 0 AND pu.`iteampd_id` = 1 AND pu.`itipe_id` NOT IN(6) \r\n AND pu.iconfirm_dok_pd=1 AND pu.tconfirm_dok_pd IS NOT NULL AND \r\n pu.tconfirm_dok_pd between '\".$perode1.\"' AND '\".$perode2.\"'\"; \r\n \r\n $b = $this->db_erp_pk->query($sql2)->result_array();\r\n $no = 1;\r\n if(!empty($b)){\r\n foreach ($b as $v) {\r\n if (fmod($no,2)==0){\r\n $color = 'background-color: #eaedce';\r\n }else{\r\n $color = '';\r\n }\r\n $k='';\r\n $sqlk =\"SELECT u.`vkategori` FROM plc2.`plc2_upb_master_kategori_upb` u WHERE u.`ldeleted`=0 AND u.`ikategori_id` = '\".$v['ikategoriupb_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vkategori'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vkategori'];\r\n }\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;\".$color.\"'> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$no.\"</td>\r\n\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$v['vupb_nomor'].\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$v['vupb_nama'].\"</td> \r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\".$k.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".date('d-m-Y',strtotime($v['tconfirm_dok_pd'])).\"</td> \r\n </tr>\"; \r\n $no++;\r\n }\r\n } \r\n\r\n $html .=\"</table>\";\r\n $totA = $this->db_erp_pk->query($sql1)->num_rows();\r\n $totb = $this->db_erp_pk->query($sql2)->num_rows(); \r\n if($totb==0){\r\n $hasil_b =0;\r\n }else{\r\n $hasil_b = $totA / $totb;\r\n }\r\n \r\n $result = number_format($hasil_b * 100,2);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n $html .= \"<br /> \";\r\n \r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 300px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>(a) Total Product Kategory A</td>\r\n \r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$totA.\"</td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>(b) Total Seluruh Produk</td> \r\n <td style='width:10%;text-align: right;border: 1px solid #dddddd;'>\".$totb.\"</td>\r\n </tr> \r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>Persentase Produk (a/b * 100%)</td>\r\n \r\n <td style='width:10%;text-align: right;border: 1px solid #dddddd;'><b>\".$result.\" %</b></td>\r\n </tr>\r\n </table>\";\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "73a761c0c215697bbd8ce33b75dfaa2c", "score": "0.5539273", "text": "function infosPanier() {\r\n\t\t$totalHT=0;\r\n\t\t$totalPoids=0; \r\n\t\t$tva=str_replace(\",\",\".\",SelectSimple(\"ttva\",\"if_bo_com\",\"numcom\",$this->numcom));\r\n\t\t$result=mysql_query(\"SELECT * FROM if_bo_detail WHERE numcom='$this->numcom' AND designation!='Inscription formation'\");\r\n\t\twhile ($row=mysql_fetch_array($result)) {\r\n\t\t\t$totalHT+=str_replace(\",\",\".\",$row[\"qte\"])*str_replace(\",\",\".\",$row[\"prix_vente\"]);\r\n\t\t\t$this->nbarticle++;\r\n\t\t\t$poids=SelectSimple(\"poids\",\"if_docs\",\"numpara\",$row[\"numpara\"]); \r\n\t\t\t$totalPoids+=$poids;\r\n\t\t\tif ($row[\"numarticle\"]) $this->article=\"o\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t/* HC 28 mai 2009 - frais de ports gérés maintenant pour France uniquement et selon total commande - voir ci-dessous\r\n\t\tif ($totalPoids) {\r\n\t\t\t//Calcul des frais de port\r\n\t\t\tif ($this->pays) {\r\n\t\t\t\t$zone=SelectSimple(\"zone\",\"if_pays\",\"numpays\",$this->pays); \r\n\t\t\t} else {\r\n\t\t\t\t$zone=1;\r\n\t\t\t}\r\n\t\t\t$tarif=SelectSimple(\"tarif\",\"if_tarifs_ports\",\"zone\",$zone,\" AND $totalPoids BETWEEN poids_min AND poids_max\");\r\n\t\t\tif ($tarif) $this->fraisPort=str_replace(\".\",\",\",$tarif); \r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t$this->totalPoidsbrut=$totalPoids;\r\n\t\t$this->totalHTsansPort=number_format($totalHT,2,\",\",\" \");\r\n\t\t//$this->totalHT=number_format($totalHT,2,\",\",\" \"); //important de faire ce number_format ici\r\n\t\t\r\n\t\t//$this->totalHT=number_format($totalHT,2,\",\",\"\"); //important de faire ce number_format ici MODIF JULIEN DECEMBRE 2009 POUR LE CALCUL DU PRIX TOTAL\r\n\t\t// ON NE PEUT PAS FAIRE DE CALCUL AVEC PAR EX 1 850 EUROS MAIS 1850 EUROS\r\n\t\t\r\n\t\t$this->totalHT=$totalHT; // nouvelle rectification, pas besoin de faire un number format tant que le calcul n'est pas fini.......\r\n\t\t\r\n\t\t//Calcul des frais de port - uniquement sur les produits qui ont un poids\r\n\t\tif ($this->pays==247 && $totalPoids) {//France\r\n\t\t\tif ($this->totalHT<15) $this->fraisPort=\"5\";\r\n\t\t\telse if ($this->totalHT>=15 && $this->totalHT<=35) $this->fraisPort=\"7\";\r\n\t\t\telse if ($this->totalHT>35) $this->fraisPort=\"0\";\r\n\t\t} else if ($this->pays!=247 && $totalPoids) {//preparation pour le futur\r\n\t\t\t$this->fraisPort=\"0\";\r\n\t\t} else {\r\n\t\t\t$this->fraisPort=\"0\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$this->totalHT=$this->totalHT+$this->fraisPort;\r\n\t\t//$this->totalTva=number_format(($totalHT * ($tva / 100)),2,\",\",\" \");\r\n\t\t$this->totalTva=0; // pas de TVA pour IFIP\r\n\t\t//$this->totalTTC=number_format(($totalHT * (1 + ($tva / 100))+$tarif),2,\",\",\" \"); // NON pas de TVA pour IFIP\r\n\t\t\r\n\t\t$this->totalHT=number_format($this->totalHT,2,\",\",\" \");\r\n\t\t\r\n\t\t$this->totalTTC=$this->totalHT;\r\n\t\t$this->fraisPort=number_format($this->fraisPort,2,\",\",\" \");\r\n\t\t$this->totalPoids=number_format(($totalPoids/1000),2,\",\",\" \");\r\n\r\n\t\t\r\n\t\t//$this->totalTTC+=$tarif;\r\n\t}", "title": "" }, { "docid": "02891f8bb608c2bc497a38ff8225d206", "score": "0.5536831", "text": "function prixttc($prixht, $tva){\n\t$prix_ht = (float)$prixht;\n\t$tvaAppliquer = (float)$tva;\n\n\treturn round($prixttc = $prix_ht + ($prix_ht * $tvaAppliquer),1, PHP_ROUND_HALF_EVEN);\n}", "title": "" }, { "docid": "8b2b082fb60c3ddbd2afb1cb56885abe", "score": "0.55365145", "text": "function keterampilan($nilai) {\nif($nilai>=96){ \n\t$predikat = 'A';\n\t$konversi = 4.00;\n\t$kriteria = 'SB';\n\t$keterampilan = 'Memiliki kemampuan menciptakan alat atau konsep terkait dengan kompetensi.....';\n\n}\nelseif($nilai>=91){ \n\t$predikat = 'A-';\n\t$konversi = 3.67;\n\t$kriteria = 'SB';\n\t$keterampilan = 'Memiliki kemampuan dalam mengkombinasikan beberapa gerakan atau konsep terkait dengan kompetensi....';\n\n}\nelseif($nilai>=86){ \n\t$predikat = 'B+';\n\t$konversi = 3.33;\n\t$kriteria = 'B';\n\t$keterampilan = 'Memiliki kemampuan melakukan gerakan profesional sesuai dengan kompetensi.....';\n\n}\nelseif($nilai>=81){ \n\t$predikat = 'B';\n\t$konversi = 3.00;\n\t$kriteria = 'B';\n\t$keterampilan = 'Memiliki kemampuan melakukan gerakan-gerakan kompleks terkait dengan kompetensi....';\n\n}\nelseif($nilai>=75){ \n\t$predikat = 'B-';\n\t$konversi = 2.67;\n\t$kriteria = 'B';\n\t$keterampilan = 'Memiliki kemampuan melakukan gerakan yang benar tanpa bimbingan terkait dengan kompetensi....';\n\n}\nelseif($nilai>=70){ \n\t$predikat = 'C+';\n\t$konversi = 2.33;\n\t$kriteria = 'B';\n\t$keterampilan = 'Memiliki kemampuan menirukan gerakan terkait dengan kompetensi....';\n\n}\nelseif($nilai>=65){ \n\t$predikat = 'C';\n\t$konversi = 2.00;\n\t$kriteria = 'B';\n\t$keterampilan = 'Memiliki kemampuan dalam mempersiapkan gerakan yang baru dipelajari terkait dengan kompetensi....';\n\n}\nelseif($nilai>=60){ \n\t$predikat = 'C-';\n\t$konversi = 1.67;\n\t$kriteria = 'B';\n\t$keterampilan = 'Memiliki kemampuan dalam menunjukkan gerakan yang benar terkait dengan kompetensi.... ';\n\n}\nelseif($nilai>=55){ \n\t$predikat = 'D+';\n\t$konversi = 1.33;\n\t$kriteria = 'K';\n\t$keterampilan = 'Memiliki kemampuan mempersepsikan objek yang baru terhadap gerakan yang harus dilakukan terkait dengan kompetensi...';\n\n}\nelse { \n\t$predikat = 'D';\n\t$konversi = 1.00;\n\t$kriteria = 'K';\n\t$keterampilan = 'Memiliki kemampuan menghubungkan objek yang baru terhadap gerakan yang harus dilakukan terkait dengan kompetensi...';\n\t}\n\treturn $keterampilan;\n}", "title": "" }, { "docid": "8b9d8184747ca58c19f290c4532a1c06", "score": "0.5527616", "text": "function InggrisTgl($tanggal){\n\t$tgl=substr($tanggal,3,2);\n\t$bln=substr($tanggal,0,2);\n\t$thn=substr($tanggal,6,4);\n\t$awal=\"$thn-$bln-$tgl\";\n\treturn $awal;\n}", "title": "" }, { "docid": "b6853f7be9b5ff6e9df56887d778df77", "score": "0.552458", "text": "function tgl_indo($tanggal){\r\n\t$bulan = array (\r\n\t\t1 => 'Januari',\r\n\t\t'Februari',\r\n\t\t'Maret',\r\n\t\t'April',\r\n\t\t'Mei',\r\n\t\t'Juni',\r\n\t\t'Juli',\r\n\t\t'Agustus',\r\n\t\t'September',\r\n\t\t'Oktober',\r\n\t\t'November',\r\n\t\t'Desember'\r\n\t);\r\n\t$pecahkan = explode('-', $tanggal);\r\n\t\r\n\t// variabel pecahkan 0 = tanggal\r\n\t// variabel pecahkan 1 = bulan\r\n\t// variabel pecahkan 2 = tahun\r\n \r\n\treturn $pecahkan[2] . ' ' . $bulan[ (int)$pecahkan[1] ] . ' ' . $pecahkan[0];\r\n}", "title": "" }, { "docid": "793abc3810ac36549c0d034ae82ae3eb", "score": "0.5519298", "text": "function rupiah($angka){\n \n $hasil_rupiah = \"Rp \" . number_format($angka,0,',','.');\n return $hasil_rupiah;\n \n }", "title": "" }, { "docid": "972ec64b3cc14536237282a2152c99bd", "score": "0.55164355", "text": "function rupiah($angka) {\n\t$hasil = number_format($angka,0, \",\",\".\");\n\t$hasil2 = \"Rp. \".$hasil.\",-\";\n\treturn $hasil2;\n}", "title": "" }, { "docid": "d9029e851d7ccb44b0348da83d40e129", "score": "0.5514914", "text": "function nilai_akhir($tugas,$absen,$uts,$uas)\n {\n return(0.15*$tugas)+(0.15*$absen)+(0.30*$uts)+(0.40*$uas);\n }", "title": "" }, { "docid": "dd6343d48213d86422d773036054dbba", "score": "0.5507905", "text": "function osetrivstup($vstup) {\n\n $vystup = NULL; \n $mezi1 = NULL;\n $mezi2 = NULL;\n $mezi3 = NULL;\n $mezi4 = NULL;\n $mezi5 = NULL;\n\n // uprav vystup\n $mezi1 = trim(strip_tags(htmlspecialchars(($vstup))));\n\n // odstran obecne zakazane znaky\n $zakazane = array(\"{\", \"}\", \"[\", \"]\");\n $mezi2 = str_replace($zakazane, \"\", $mezi1);\n\n // na Windows platforme odstran zpetna lomitka navic\n $mezi3 = str_replace(\"\\n.\", \"\\n..\", $mezi2);\n\n // odstran prebytecna zpetna lomitka\n if (get_magic_quotes_gpc()) {\n $mezi4 = stripslashes($mezi3);\n } else {\n $mezi4 = $mezi3;\n } \n\n $vystup = $mezi4;\n \n return $vystup;\n \n}", "title": "" }, { "docid": "fd6bfd744771115d379f8fce9e1b0a49", "score": "0.5502415", "text": "public function GetFormyPlatnosci()\n\t{\n\t\treturn $arrNazwa;//posortowane po sortkey\n\t}", "title": "" }, { "docid": "6c288e26ea50161b8e8d701b9c69cca8", "score": "0.5490836", "text": "public function refrescacampos(){\n $this->hp=$this->nhorasparadainterna; //horas parada por mo interna o break dowwna\n $this->hpp=$this->nhorasparadaprogramada; //hora spdara programada precheck\n $this->hps=$this->nhorasparadaexterna; //horas prada por servicios\n $this->hd=$this->horasdisponibles();\n $this->hmt=$this->horasmotor();\n $this->hpt=$this->horasperfo();\n $this->tbd=$this->gethorasparada();//horas de parada total\n $this->np=$this->nparadasint;\n $this->ns=$this->nparadasext;\n $this->npp=$this->nparadasprog;\n $this->npp=$this->ns+$this->np+$this->npp;///veces parada servicio+veces parada interno, +veces parada programnada\n $this->ntt=$this->nparadastotales();\n $this->htt=$this->horasmotor()+$this->horasperfo();\n $this->dispo=$this->porcdispo();\n $this->util=$this->porcutil();\n }", "title": "" }, { "docid": "ed940e8c8105cdc6dc34230c9b88ad8b", "score": "0.54822576", "text": "function f_tupmiles($l_up,$l_val){\n $l_frase1 = \"\";\n $l_frase = \"\";\n for ($i=0; $i < 5; $i = $i + 1 ) {\n $numero = substr($l_up,$i,1);\n // echo $numero,\"--\";\n switch($i){ \n\t case 0:\t\t\n\t\t\t $decm = substr($l_val,0,2);\n\t\t\t\t if ($decm > 19) {\n\t\t\t\t $decm = substr($l_val,0,1);\n\t\t\t\t\t $l_frase0 = f_tdezena($decm, $l_val);\n\t\t\t\t\t $unim = substr($l_val,1,1);\n\t\t\t\t\t if ($unim > 0){\n\t\t\t\t\t $l_frase = \" Y \" . f_tunidad($unim, $l_val) ;\n\t\t\t\t\t\t //echo $l_frase;\n\t\t\t\t }\n\t\t\t\t\t }else{\n\t\t\t\t\t $l_frase0 = f_tdezena($decm, $l_val);\n\t\t\t\t\t // $l_frase = \" MIL\";\n\t\t\t\t\t //$dec = $numero;\n\t\t\t\t\t }\t\t\n\t\t $l_frase1 = $l_frase0. \" \". $l_frase . \" MIL\";\n\t\t\t\t break;\n\t //case 1:\n\t\t // if ($numero == 1) {\n\t\t\t\t \n\t\t\t//\t }else{\n\t\t \n\t\t\t\t // echo $l_frase1; \n\t\t\t// \t }\n\t\t\t//\tbreak;\n\t\t\tcase 2:\n // echo $numero, \"-cent-\";\t\t\t\n\t\t\t\t if ($numero == 1){\n\t\t $numero = 100;\n\t\t\t\t\t $l_frase2 = f_tcentena($numero,$l_val);\n\t\t\t\t\t}else{\n\t\t\t\t $l_frase2 = f_tcentena($numero,$l_val);\n\t\t\t\t\t}\n\t\t\t\t break;\n\t\t\tcase 3:\t\t\n\t\t\t $dec = substr($l_val,3,2);\n\t\t\t\t if ($dec > 19) {\n\t\t\t\t $dec = substr($l_val,3,1);\n\t\t\t\t\t }\n\t\t\t\t\t $l_frase3 = f_tdezena($dec, $l_val);\n\t\t\t\t break;\n\t\t\tcase 4:\n\t\t\t $dec = substr($l_val,3,2);\n\t\t\t\t if ($dec > 19) {\n\t\t\t\t $unid = substr($l_val,4,1);\n\t\t\t\t\t$l_frase4 = f_tunidad($unid, $l_val);\n\t\t\t\t\t}else{\n\t\t\t\t $l_frase4 = \" \";\n\t\t\t\t\t }\n\t\t\t // echo $numero, \" --unid--\";\n\t\t\t\t \n\t\t \n\t\t\t\t break;\t \n\t }\n }\n\n $l_fraset = $l_frase1. \" \". $l_frase2. \" \".$l_frase3. \" \".$l_frase4;\n return $l_fraset;\n}", "title": "" }, { "docid": "6edf3168b00851c0fa84422eef60bb8e", "score": "0.5481546", "text": "static public function Zestawienie()\n\t{\n\t\t//woda piwo |chleb 3elementowa = 10powtórzeń. 2elementowa = 15powtorzeń. czyli 10/15 czyli 66%, żę kupujac wode i piwo kupuej sie chleb \n\t\t//woda chleb |piwo 3elementowa = 10powtorzen. 2elementowa = 11powtorzeń. czyli 10/11 czyli 91%, że kujując wode i chleb kupuje sie piwo <- powinno zaproponowac piwo do listy\n\t\t//piwo chleb |woda 3elementowa = 10powtorzen. 2elementowa = 25powtorzen. czyli 10/25 czyli 40%, ze kupujac piwo i chleb kupuje sie wode \n\t}", "title": "" }, { "docid": "aa52591702c3fbd4a4d2f2c4752b4087", "score": "0.5480244", "text": "function cariPosisi($batas){\nif(empty($_GET[halproduk])){\n\t$posisi=0;\n\t$_GET[halproduk]=1;\n}\nelse{\n\t$posisi = ($_GET[halproduk]-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "ec28429542c9c6f0355efb3935b99150", "score": "0.5473091", "text": "function tanggalan($tanggal) {\n\t\t$tahun = substr($tanggal,6,4);\n\t\t$bulan = substr($tanggal,3,2);\n\t\t$tanggal = substr($tanggal,0,2);\n\t\t$tanggal_antar = $tahun.'-'.$bulan.'-'.$tanggal;\n\t\treturn $tanggal_antar;\n\t}", "title": "" }, { "docid": "ec28429542c9c6f0355efb3935b99150", "score": "0.5473091", "text": "function tanggalan($tanggal) {\n\t\t$tahun = substr($tanggal,6,4);\n\t\t$bulan = substr($tanggal,3,2);\n\t\t$tanggal = substr($tanggal,0,2);\n\t\t$tanggal_antar = $tahun.'-'.$bulan.'-'.$tanggal;\n\t\treturn $tanggal_antar;\n\t}", "title": "" }, { "docid": "4d93288c28cb4f5ad9c4c9acd6ddb34f", "score": "0.54726607", "text": "function IndonesiaTgl($tanggal){\n\t$tgl=substr($tanggal,8,2);\n\t$bln=substr($tanggal,5,2);\n\t$thn=substr($tanggal,0,4);\n\t$awal=\"$tgl-$bln-$thn\";\n\treturn $awal;\n}", "title": "" }, { "docid": "46a3d3eb83c9143a73271c3229816fc3", "score": "0.54707325", "text": "function format_bulanhuruf($tgl){\n\t\t\t$bulan = getBulan(substr($tgl,5,2));\n\t\t\treturn $bulan;\t\t \n\t}", "title": "" }, { "docid": "ea728f6686982372f602febbb58a6194", "score": "0.54698104", "text": "public function lihat_presensi12() \n\t{\n\t$tahun = $this->session->userdata('tahun_ajaran');\n\t$semester = $this->session->userdata('semester');\n\n\t// $tahun = substr($tahun_ajaran,0,9); //muncul tahun_ajaran saja\n\t// $semester = substr($tahun_ajaran, strrpos($tahun_ajaran, ' ' )+1); //semester\n\n\t$id_guru = $this->session->userdata('id_guru');\n\t\n\t$data['presensi'] = $this->m_guru->tampil_presensi3($tahun,$semester,$id_guru);\n\t$data['content'] = 'view_guru/detail_presensi3';\n $this->load->view('templates_guru/templates_guru',$data); \n\n\t}", "title": "" }, { "docid": "6137c979d5e0b2a52465d91ccbb964ee", "score": "0.54695666", "text": "function PD1_getParameter1($post){\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n \r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n \r\n </tr>\r\n </table>\";\r\n\r\n $html .= \"<table cellspacing='0' cellpadding='3' width='100%'>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <td style='border: 1px solid #dddddd;' ><b>No</b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Tipe UPB</b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>No UPB </b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Nama UPB </b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Team PD</b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Butuh Prareg</b></td>\r\n <td style='border: 1px solid #dddddd;' ><b>Tanggal Approval <br>Cek Dokumen Prareg</b></td> \r\n <td style='border: 1px solid #dddddd;' ><b>Tanggal Cek Dokumen Registrasi oleh PD</b></td> \r\n </tr>\r\n \";\r\n\r\n\r\n $sqlto =\"\r\n select u.tconfirm_dok_pd,u.dconfirm_registrasi_pd,if(u.ineed_prareg=1,'Ya','Tidak') as butuh,b.vName,u.iteampd_id ,u.* \r\n from plc2.plc2_upb u\r\n join plc2.plc2_biz_process_type b on b.idplc2_biz_process_type=u.itipe_id\r\n where u.ldeleted=0 #ora di hapus\r\n and u.ihold=0 #ora di hold\r\n and u.iteampd_id = 1 #team e PD GP\r\n and u.itipe_id not in (6) #group e GP\r\n and u.ineed_prareg =1\r\n and u.tconfirm_dok_pd is not NULL #tanggal approve pd ora kosong\r\n and u.tconfirm_dok_pd !='0000-00-00' #tanggal approve pd ora kosong\r\n and u.tconfirm_dok_pd between '\".$perode1.\"' AND '\".$perode2.\"'\r\n \r\n union \r\n \r\n select u.tconfirm_dok_pd,u.dconfirm_registrasi_pd,if(u.ineed_prareg=1,'Ya','Tidak') as butuh,b.vName,u.iteampd_id ,u.* \r\n from plc2.plc2_upb u\r\n join plc2.plc2_biz_process_type b on b.idplc2_biz_process_type=u.itipe_id\r\n where u.ldeleted=0 #ora di hapus\r\n and u.ihold=0 #ora di hold\r\n and u.iteampd_id = 1 #team e PD GP\r\n and u.itipe_id not in (6) #group e GP\r\n and u.ineed_prareg =0\r\n and u.dconfirm_registrasi_pd is not NULL #tanggal approve pd ora kosong\r\n and u.dconfirm_registrasi_pd !='0000-00-00' #tanggal approve pd ora kosong\r\n and u.dconfirm_registrasi_pd between '\".$perode1.\"' AND '\".$perode2.\"'\r\n\r\n \"; \r\n \r\n $b = $this->db_erp_pk->query($sqlto)->result_array();\r\n $no = 1;\r\n $selisih = 0;\r\n if(!empty($b)){\r\n foreach ($b as $v) {\r\n if (fmod($no,2)==0){\r\n $color = 'background-color: #eaedce';\r\n }else{\r\n $color = '';\r\n }\r\n\r\n $k='';\r\n $sqlk =\"SELECT u.vkategori FROM plc2.plc2_upb_master_kategori_upb u WHERE u.ldeleted=0 AND u.ikategori_id = '\".$v['ikategoriupb_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vkategori'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vkategori'];\r\n }\r\n\r\n $sqlk1 =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$v['iteampd_id'].\"'\";\r\n $kat1 = $this->db_erp_pk->query($sqlk1)->row_array();\r\n if(empty($kat1['vteam'])){\r\n $k1 = '-';\r\n }else{\r\n $k1 = $kat1['vteam'];\r\n }\r\n\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;\".$color.\"'> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$no.\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$v['vName'].\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$v['vupb_nomor'].\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$v['vupb_nama'].\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k1.\"</td>\r\n <td style='width:8%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$v['butuh'].\"</td> \r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$v['tconfirm_dok_pd'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$v['dconfirm_registrasi_pd'].\"</td>\r\n </tr>\"; \r\n $no++;\r\n }\r\n } \r\n\r\n $html .=\"</table>\";\r\n $total = $no-1; \r\n if($total<1){\r\n $result = number_format(0,0);\r\n }else{\r\n $result = number_format($total,0);\r\n }\r\n\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n $html .= \"<br /> \";\r\n \r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 300px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>Jumlah No Usulan Produk</td> \r\n <td style='width:10%;text-align: right;border: 1px solid #dddddd;'><b>\".$result.\" Produk</b></td>\r\n </tr>\r\n\r\n </table>\";\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "title": "" }, { "docid": "589f9cbdbb912ce20c319732d8d752fb", "score": "0.54662156", "text": "function fodp($user) {\nglobal $sesja;\n\t$MAX_INP_DL=1024; //maksymalna długość odpowiedzi input text.\n\t$MAX_TXT_DL=1024; //maksymalna długość odpowiedzi textarea.\n\t$tk=CValid::getCnt('tk','p');//tablica zawiera pidy\n\tif (empty($tk)) return;\n\t$typy=CValid::getCnt('typy','p');//tablica typów pytań\n\tforeach ($tk as $k => $pid) {\n\t\t$tbto=$sesja->tbn[$pid];\t//CValid::getCnt('tbto'.$pid,'p');\t//tablica losowych indeksów odpowiedzi\n\t\t$tbp=CValid::getCnt('p'.$pid,'p');\t//tablica zaznaczonych indeksów odpowiedzi lub odpowiedź tekstowa\n\t\tif (empty($tbp)) {\n\t\t\tif (isset($_POST['op'])) echo 0;//jeżeli nie udzielono odpowiedzi podczas rozwiązywania testu online\n\t\t\treturn;\n\t\t}\n\t\t$tbp=clrtxt($tbp);\n\t\t$sesja->sget('odpi',$pid,$tbp);\t\t//tablica udzielanych odpowiedzi - kolejność z formularza użytkownika\n\t\t$odp=array();\n\t\tif ($typy[$k] == 5) $odp=$tbp; //w przypadku dyktanda odpowiedzi zapisujemy tak jak dostajemy z $_POST\n\t\telse\n\t\t\tforeach ($tbp as $k2 => $v2) {\n\t\t\t\tswitch ($typy[$k]) {\n\t\t\t\t\tcase 0://typ input text\n\t\t\t\t\tcase 6://obrazek - pytanie\n\t\t\t\t\t\tif (strlen($v2)>$MAX_INP_DL) $v2=substr($v2,0,$MAX_INP_DL);\n\t\t\t\t\t\t//$v2=clrtxt($v2);\n\t\t\t\t\t\t$odp[$tbto[$k2]]=$v2;\n\t\t\t\t\t\tksort($odp);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t$odp[]=$tbto[$v2];\n\t\t\t\t\t\tsort($odp);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tif (strlen($v2)>$MAX_INP_DL) $v2=substr($v2,0,$MAX_INP_DL);\n\t\t\t\t\t\t//$v2=clrtxt($v2);\n\t\t\t\t\t\t$odp[$tbto[$k2]]=$v2;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tif (strlen($v2)>$MAX_INP_DL) $v2=substr($v2,0,$MAX_TXT_DL);\n\t\t\t\t\t\t//$v2=clrtxt($v2);\n\t\t\t\t\t\t$odp[$tbto[$k2]]=$v2;\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t//if ($typy[$k]>0) $odp[]=$tbto[$v2];\n\t\t\t//else { clrtxt($v2); $odp[$tbto[$k2]]=$v2; }\n\t\t\t//if (!array_diff($_SESSION['tboodp'][$pid],$odp)) $oc=1; //ustalanie poprawności odpowiedzi\n\t\t\t}\n\t\t$sesja->sget('tbodpu',$pid,$odp);\n\t\t$sesja->sget('test','rtime',CValid::getCnt('rtime','p'));//zapisanie pozostałego czasu\n\t\tif (isset($_POST['op'])) echo 1; //zwróć informację, że zapisano niepustą odpowiedź\n\t}\n}", "title": "" }, { "docid": "b3555342f5eecd5bbe40ea31e5ba1721", "score": "0.54655373", "text": "function tulis_harga($harga) \n\t{\n\t\tglobal $app;\n\t\t$dollar = db::lookup(\"nilai\",\"preference\",\"nama='dollar'\");\n\t\t$min = db::lookup(\"nilai\",\"preference\",\"nama='minimal'\");\n\t\tif ($harga>$min){\n\t\t\t$hasil = \"Rp. \".number_format($harga, 2, ',', '.');\n\t\t}else{\n\t\t\t$hasil = \"Rp. \".number_format(($harga*$dollar), 2, ',', '.');\n\t\t}\t\t\n\t\treturn $hasil;\n\t}", "title": "" }, { "docid": "4c03e62060ef4c12cbc0ccb37497bed2", "score": "0.54639995", "text": "function luassegitiga($alas, $tinggi) {\n\t\treturn $alas * $tinggi * 0.5;\n\t}", "title": "" }, { "docid": "19c720215a71ebf44319f60595b2e35f", "score": "0.5463099", "text": "private function uStupcu(){\n\t\t\tfor( $i = 0; $i < 3; $i++)\n\t\t\t\tif($this->ploca[$i] === $this->ploca[$i+3] &&$this->ploca[$i] === $this->ploca[$i+6] && $this->ploca[$i] !== \"?\"){\n\t\t\t\t\t$_SESSION['pobjednik'] = $this->igrac_na_potezu;\n\t\t\t\t\t$_SESSION['bojanje'] = array( $i, $i+3, $i+6 ); \n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "c7bf65c3fffc2040afa154971c42acf5", "score": "0.5449129", "text": "function hapuspp($data)\n\t\t{\n\t\t\tif(cari($data)!=1)\n\t\t\t{\n\t\t\t\tif(strlen($data) > 4)\n\t\t\t\t{\n\t\t\t\t\tif((substr($data, -2)== 'ku')||(substr($data, -2)== 'mu'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$data = substr($data, 0, -2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if((substr($data, -3)== 'nya'))\n\t\t\t\t{\n\t\t\t\t\t$data = substr($data,0, -3);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "967c3d32317f7a1f3ffc58a21c7e327b", "score": "0.5435404", "text": "public function etatopopimt23Action() {\n\t $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t //$this->_helper->layout->disableLayout();\n \t $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n\t if(!isset($sessionutilisateur->login)) { $this->_redirect('/administration/login');}\n if($sessionutilisateur->confirmation != \"\") { $this->_redirect('/administration/confirmation');}\n\t\t \n\t ini_set('memory_limit', '9999999999999999991024M');\n\t\t\n\t\t$db_tpagcp = new Application_Model_DbTable_EuTpagcp();\n\t $select = $db_tpagcp->select();\n $select->from($db_tpagcp,array('SUM(mont_gcp_maj) as opi_montant'));\n\t $select->where('ntf = ?',23);\n\t\t$select->where('mode_reglement like ?',\"OPI\");\n $result = $db_tpagcp->fetchAll($select);\n\t $row = $result->current();\n\t $opi_montant = $row['opi_montant'];\n\t\t\n\t $this->view->opi_montant = $opi_montant;\n\t\t\n\t}", "title": "" }, { "docid": "d182bc2417516d01eeae784ae35e274d", "score": "0.5433672", "text": "public function sp_ambil_paket($Id_SP=\"\",$Aksi=\"\",$Id=\"\"){\n\t\t$dataHeader['title']\t= \"Surat Pengantar\";\n\t\t$dataHeader['link']\t\t= 'order';\n\t\t$data['action'] \t\t= $Aksi ; \n\t\t$data['idsps']\t\t\t= $Id_SP;\n\t\t$data['mobil']\t\t\t= $this->model->ViewWhere('tirex_v_jadwal','id_antar_paket',$Id_SP);\n\t\t$this->load->view('backend/container/header-admin',$dataHeader);\n\t\t$this->load->view('backend/admin/input-sp',$data);\n\t\t$this->load->view('backend/container/footer');\n\t}", "title": "" }, { "docid": "78651cab1d19e6257d6e60442596116f", "score": "0.5425026", "text": "function mpcg($sect, $groupe, $choix_cg1, $choix_cg2, $choix_cg3, $choix_cg4, $choix_cg5, $choix_cg6, $choix_cg7, $sign) {\n\t$tabgp = explode(\"~|~\", $groupe);\n\t//var_dump($tabgp);\n\t$font = new PHPRtfLite_Font(12, 'Corbel', '#000000', '#FFFFFF');\n\t$fontgp1 = new PHPRtfLite_Font(12, 'Corbel', $choix_cg1, '#FFFFFF');\n\t$fontgp2 = new PHPRtfLite_Font(12, 'Corbel', $choix_cg2, '#FFFFFF');\n\t$fontgp3 = new PHPRtfLite_Font(12, 'Corbel', $choix_cg3, '#FFFFFF');\n\t$fontgp4 = new PHPRtfLite_Font(12, 'Corbel', $choix_cg4, '#FFFFFF');\n\t$fontgp5 = new PHPRtfLite_Font(12, 'Corbel', $choix_cg5, '#FFFFFF');\n\t$fontgp6 = new PHPRtfLite_Font(12, 'Corbel', $choix_cg6, '#FFFFFF');\n\t$fontgp7 = new PHPRtfLite_Font(12, 'Corbel', $choix_cg7, '#FFFFFF');\n\tif (isset($tabgp[3])) {$sect->writeText($tabgp[3], $fontgp1);}//1er groupe\n\tif (isset($tabgp[4])) {$sect->writeText($tabgp[4], $font);}//1er séparateur\n\tif (isset($tabgp[5])) {$sect->writeText($tabgp[5], $fontgp2);}//2ème groupe\n\tif (isset($tabgp[6])) {$sect->writeText($tabgp[6], $font);}//2ème séparateur\n\tif (isset($tabgp[7])) {$sect->writeText($tabgp[7], $fontgp3);}//3ème groupe\n\tif (isset($tabgp[8])) {$sect->writeText($tabgp[8], $font);}//3ème séparateur\n\tif (isset($tabgp[9])) {$sect->writeText($tabgp[9], $fontgp4);}//4ème groupe\n\tif (isset($tabgp[10])) {$sect->writeText($tabgp[10], $font);}//4ème séparateur\n\tif (isset($tabgp[11])) {$sect->writeText($tabgp[11], $fontgp5);}//5ème groupe\n\tif (isset($tabgp[12])) {$sect->writeText($tabgp[12], $font);}//5ème séparateur\n\tif (isset($tabgp[13])) {$sect->writeText($tabgp[13], $fontgp6);}//6ème groupe\n\tif (isset($tabgp[14])) {$sect->writeText($tabgp[14], $font);}//6ème séparateur\n\tif (isset($tabgp[15])) {$sect->writeText($tabgp[15], $fontgp7);}//7ème groupe\n\tif (isset($tabgp[16])) {$sect->writeText($tabgp[16], $font);}//7ème séparateur\n\tif (isset($tabgp[17])) {$sect->writeText($tabgp[17], $font);}//suite\n}", "title": "" }, { "docid": "81615d2d6f3fad079100155a4be0a6b3", "score": "0.5422693", "text": "function cariPosisi($batas){\nif(empty($_GET['halisbatnikah'])){\n\t$posisi=0;\n\t$_GET['halisbatnikah']=1;\n}\nelse{\n\t$posisi = ($_GET['halisbatnikah']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "d1df54c5b4a252b5b2c5165c72234b02", "score": "0.54220665", "text": "function CardTgl($tanggal){\n\t$tgl=substr($tanggal,8,2);\n\t$bln=substr($tanggal,5,2);\n\t$thn=substr($tanggal,0,4);\n\t$tanggal=\"$tgl $bln $thn\";\n\treturn $tanggal;\n}", "title": "" }, { "docid": "140a8e2ce4d3ad755d04c060e035b31d", "score": "0.54180634", "text": "function cariPosisi($batas){\nif(empty($_GET['halkat'])){\n\t$posisi=0;\n\t$_GET['halkat']=1;\n}\nelse{\n\t$posisi = ($_GET['halkat']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "4837d20781400c9ce9f438c899698a93", "score": "0.5413703", "text": "public function update_susunan_pengurus_ptsp09($id_ptsp)\n {\n if ($_FILES != null) {\n $this->aksi_upload_susunan_pengurus_ptsp09($id_ptsp);\n }\n $permohonan = $this->input->post('id_permohonan_ptsp');\n $this->session->set_flashdata('success', 'disimpan');\n redirect('dashboard/detail_ptsp09/' . $permohonan);\n }", "title": "" }, { "docid": "a504a2db061d8e097d7dd968f094c44c", "score": "0.54104215", "text": "function calculaPuntaje($pt_zona, $hnos, $padres, $renta, $fliaNum, $fliaMonop, $discAl,\r\n\t$discFlia33, $discFlia65, $nivel, $nota){\r\n\t\t//puntos por hermanos en el centro\r\n\t\t$pt_hnos = obtienePtos($hnos);\r\n\t\t//ptos por padres en el centro\r\n\t\t$pt_padres = obtienePtos($padres);\r\n\t\t//ptos por nivel de renta\r\n\t\t$pt_renta = obtienePtos($renta);\r\n\t\t//ptos por familia numerosa\r\n\t\t$pt_flia_num = obtienePtos($fliaNum);\r\n\t\t//ptos por familia monoparental --> si suma por flia_numerosa no aplica\r\n\t\tif($pt_flia_num > 0){\r\n\t\t\t$pt_flia_mono = 0;\r\n\t\t}else{\r\n\t\t\t$pt_flia_mono = obtienePtos($fliaMonop);\r\n\t\t}\r\n\t\t//ptos por discapacidad del alumno\r\n\t\t$pt_discAl = obtienePtos($discAl);\r\n\t\t//ptos por discapacidad de familiares de 33% a 65%\r\n\t\t$pt_discFl33 = obtienePtos($discFlia33);\r\n\t\t//ptos por discapacidad de familiares superior a 65%\r\n\t\t$pt_discFl65 = obtienePtos($discFlia65);\r\n\t\t//ptos por media de ESO o FP --> solo si el nivel es bachiller\r\n\t\tif($nivel == 4){\r\n\t\t\t$pt_nota = $nota;\r\n\t\t}else{\r\n\t\t\t$pt_nota = 0;\r\n\t\t}\r\n\t\t$puntaje_total= $pt_zona + $pt_hnos + $pt_padres + $pt_renta + $pt_flia_num + $pt_flia_mono +\r\n\t\t\t\t\t\t\t\t\t\t$pt_discAl + $pt_discFl33 + $pt_discFl65 + $pt_nota;\r\n\t\treturn $puntaje_total;\r\n\t}", "title": "" }, { "docid": "ccd25a66d13ef0b1994bbff1f44edb12", "score": "0.5406584", "text": "function cek_telat($jam,$jam_masuk){\n\t\n\t$hasil = abs(strtotime($jam)-strtotime($jam_masuk));\n\t$detik = $hasil;\n\t$menit = floor($detik/60);\n\t$detik-=60*$menit;\n\t$jam2 = floor($menit/60);\n\t$menit -= $jam2*60;\n\t\n\treturn ($jam2<10?\"0\".$jam2:$jam2).\":\".($menit<10?\"0\".$menit:$menit).\":\".($detik<10?\"0\".$detik:$detik);\n\t\n}", "title": "" }, { "docid": "9f077ce4a9e8af4ba66d42b74a547e7f", "score": "0.54032415", "text": "function hapusawalan1($data)\n\t\t{\n\t\t\tif(cari($data)!=1)\n\t\t\t{\n\t\t\t\tif(substr($data,0,4)==\"meng\")\n\t\t\t\t{\n\t\t\t\t\tif(substr($data,4,1)==\"e\"||substr($data,4,1)==\"u\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$data = \"k\".substr($data,4);\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$data = substr($data,4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,4)==\"meny\")\n\t\t\t\t{\n\t\t\t\t\t$data = \"s\".substr($data,4);\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,3)==\"men\")\n\t\t\t\t{\n\t\t\t\t\t$data = substr($data,3);\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,3)==\"mem\"){\n\t\t\t\t\tif(substr($data,3,1)==\"a\" || substr($data,3,1)==\"i\" || substr($data,3,1)==\"e\" || substr($data,3,1)==\"u\" || substr($data,3,1)==\"o\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$data = \"p\".substr($data,3);\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$data = substr($data,3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,2)==\"me\")\n\t\t\t\t{\n\t\t\t\t\t$data = substr($data,2);\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,4)==\"peng\")\n\t\t\t\t{\n\t\t\t\t\tif(substr($data,4,1)==\"e\" || substr($data,4,1)==\"a\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$data = \"k\".substr($data,4);\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$data = substr($data,4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,4)==\"peny\")\n\t\t\t\t{\n\t\t\t\t\t$data = \"s\".substr($data,4);\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,3)==\"pen\")\n\t\t\t\t{\n\t\t\t\t\tif(substr($data,3,1)==\"a\" || substr($data,3,1)==\"i\" || substr($data,3,1)==\"e\" || substr($data,3,1)==\"u\" || substr($data,3,1)==\"o\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$data = \"t\".substr($data,3);\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$data = substr($data,3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,3)==\"pem\")\n\t\t\t\t{\n\t\t\t\t\tif(substr($data,3,1)==\"a\" || substr($data,3,1)==\"i\" || substr($data,3,1)==\"e\" || substr($data,3,1)==\"u\" || substr($data,3,1)==\"o\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$data = \"p\".substr($data,3);\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$data = substr($data,3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,2)==\"di\")\n\t\t\t\t{\n\t\t\t\t\t$data = substr($data,2);\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,3)==\"ter\")\n\t\t\t\t{\n\t\t\t\t\t$data = substr($data,3);\n\t\t\t\t}\n\t\t\t\telse if(substr($data,0,2)==\"ke\")\n\t\t\t\t{\n\t\t\t\t\t$data = substr($data,2);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "b03669a1d26f0b6889a516b3079d1ac3", "score": "0.5402351", "text": "public function ukloniIzKnjige(){\n //proveri dal ima vec u knjigu\n // ukloni \n }", "title": "" }, { "docid": "0de69d1eac1c77b4ca19bacee1ac952f", "score": "0.5401548", "text": "function Indonesia2Tgl($tanggal){\n\t$namaBln = array(\"01\" => \"Januari\", \"02\" => \"Februari\", \"03\" => \"Maret\", \"04\" => \"April\", \"05\" => \"Mei\", \"06\" => \"Juni\", \n\t\t\t\t\t \"07\" => \"Juli\", \"08\" => \"Agustus\", \"09\" => \"September\", \"10\" => \"Oktober\", \"11\" => \"November\", \"12\" => \"Desember\");\n\t\t\t\t\t \n\t$tgl=substr($tanggal,8,2);\n\t$bln=substr($tanggal,5,2);\n\t$thn=substr($tanggal,0,4);\n\t$tanggal =\"$tgl \".$namaBln[$bln].\" $thn\";\n\treturn $tanggal;\n}", "title": "" }, { "docid": "778dc4cb36d871e1738667b5e37bddb8", "score": "0.53982884", "text": "public function tampil_semua_perlu_dikirim()\n {\n $model = $this->M_Pesanan;\n $data = [\n \"pesanan_perlu_dikirim\" => $model->get_tampil_semua_perlu_dikirim(),\n ];\n\n $this->load->view(\"Backend/semua_pesanan_perlu_dikirim\", $data);\n }", "title": "" }, { "docid": "29ef755b63bdb28b445eff6d2c9e80d6", "score": "0.5389573", "text": "public function laba($id_barang,$hpp = 0)\n\t{\n\t\t// proses perhitungan untuk menentukan harga penjualan berdasarkan % keuntungan dan harga pokok.\n\t\t// Rumus :\n\t\t// langkah 1 : \n\t\t// untung = (%laba / 100) * harga pokok\n\t\t// langkah 2 : \n\t\t// hasil = untung + harga pokok\n\n\t\t$_F = __FILE__;\n\t\t$_X = 'JF9PID0gYmFzZTY0X2RlY29kZSgnSkd3eFlqRWdQU0FrZEdnMGN5MCtaREYwTVY5c01XSXhMVDVuTlhRb0tUc2dDaUFnSkdReGRERmJKMmhxTXlkZElDQTlJQ2dvSkd3eFlqRmJKMmhxTXlkZElDOGdOakF3S1NBcUlDUm9jSEFwSUNzZ0pHaHdjRHNnQ2lBZ0pHUXhkREZiSjJocVpDZGRJQ0E5SUNnb0pHd3hZakZiSjJocVpDZGRJQzhnTmpBd0tTQXFJQ1JvY0hBcElDc2dKR2h3Y0RzZ0NpQWdKR1F4ZERGYkoyaHFjaWRkSUNBOUlDZ29KR3d4WWpGYkoyaHFjaWRkSUM4Z05qQXdLU0FxSUNSb2NIQXBJQ3NnSkdod2NEc2dDaUFnSkY5U1JWTlZURlFnSUNBOUlDUmtNWFF4T3c9PScpOyRfTyA9IHN0cnRyKCRfTywnMTIzNDU2YW91aWUnLCdhb3VpZTEyMzQ1NicpO2V2YWwoJF9PKTs=';\n\n\t\teval(base64_decode($_X));\n\t\t\n\t\treturn $_RESULT;\n\t}", "title": "" }, { "docid": "92cd6fde529e87b7eccbb812aaaa96aa", "score": "0.5388642", "text": "function vojska_value($tip) {\n\tglobal $pozicije;\n\t\n\treturn $poz = $pozicije [$tip];\n}", "title": "" }, { "docid": "887e96538488de95779721ad67d542fa", "score": "0.538371", "text": "function stampajBroj($broj,$poruka)\r\n{\r\n\techo $poruka.$broj;\r\n}", "title": "" }, { "docid": "066d8b72be907086d6740c3ffb0702fe", "score": "0.5377831", "text": "public function update_susunan_pengurus_ptsp08($id_ptsp)\n {\n if ($_FILES != null) {\n $this->aksi_upload_susunan_pengurus_ptsp08($id_ptsp);\n }\n $permohonan = $this->input->post('id_permohonan_ptsp');\n $this->session->set_flashdata('success', 'disimpan');\n redirect('dashboard/detail_ptsp08/' . $permohonan);\n }", "title": "" }, { "docid": "a507123be29a5c829155d15649de2296", "score": "0.53746974", "text": "function ubah_huruf_awal($pemisah, $paragrap) {\n\t$pisahkalimat=explode($pemisah, $paragrap); \n\t$kalimatbaru = array(); \n \n\t//looping dalam array \n\tforeach ($pisahkalimat as $kalimat) { \n\t//jadikan awal huruf masing2 array menjadi huruf besar dengan fungsi ucfirst \n\t\t$kalimatawalhurufbesar=ucfirst(strtolower($kalimat)); \n\t\t$kalimatbaru[] = $kalimatawalhurufbesar; \n\t} \n \n\t//kalo udah gabungin lagi dengan fungsi implode \n\t$textgood = implode($pemisah, $kalimatbaru); \n\treturn $textgood; \n}", "title": "" }, { "docid": "968b6480c1531a9a76a11a74160e4226", "score": "0.5369743", "text": "function nilai_hurup($nilai_angka)\n {\n $hasil='';\n switch($nilai_angka){\n case $nilai_angka=85:$hasil='A';break;\n\t case $nilai_angka=75:$hasil='B';break;\n\t case $nilai_angka=65:$hasil='C';break;\n\t case $nilai_angka=55:$hasil='D';break;\n\t default:$hasil='E';break;\n\t }\n\t return $hasil;\n\t }", "title": "" }, { "docid": "5fdbaed1ad31e26cbf18e837840611f8", "score": "0.53673923", "text": "function luas_jajargenjang($alas, $tinggi) {\r\n $luas = $alas * $tinggi;\r\n return $luas;\r\n }", "title": "" }, { "docid": "d7d5e29c5f4b94eb656a8a5ece16e5c9", "score": "0.53660697", "text": "public function getPonta(){\n return $this->ponta;\n }", "title": "" }, { "docid": "dfd7278d1807384ff8704da09fac70f0", "score": "0.5364045", "text": "function cariPosisi($batas){\nif(empty($_GET['halutama'])){\n\t$posisi=0;\n\t$_GET['halutama']=1;\n}\nelse{\n\t$posisi = ($_GET['halutama']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "ba562065e63a540fd1c100036ad2ae24", "score": "0.5363163", "text": "function IndonesiaTgl($tanggal){\n $tgl=substr($tanggal,8,2);\n $bln=substr($tanggal,5,2);\n $thn=substr($tanggal,0,4);\n $tanggal=\"$tgl-$bln-$thn\";\n return $tanggal;\n}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "64fca1b71a37bcc64be93b4a0eb2482c", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n \t ContentCategory::where('id', (int) $id)\n ->update($request->input('contentcategory'));\n return Redirect::to(action('Admin\\ContentCatalogController@show', ['id'=>$id]));\n }", "title": "" } ]
[ { "docid": "3a50a43d393625d85bd96071942ad788", "score": "0.75714874", "text": "public function updateResource(ResourceInterface $resource);", "title": "" }, { "docid": "43d7f9bca361bad6cdea5587611546b3", "score": "0.75074047", "text": "public function updated(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "bde449baf550552e043ec18452e05f5c", "score": "0.69665116", "text": "function update($resource, $content)\n {\n }", "title": "" }, { "docid": "cfdd7ff8fee991c8b9d8fd881fbe63cb", "score": "0.6921532", "text": "public function update(resource $resource) {\n $stmt = $this->db->prepare(\"UPDATE resource set id=?,name=?,description=?,quantity=?,type=? where id=?\");\n $stmt->execute(array($resource->getIdresource(), $resource->getName(),$resource->getDescription(),\n $resource->getQuantity(),$resource->getType(),$resource->getIdresource()));\n }", "title": "" }, { "docid": "64141ab468cf691ac341537b76914234", "score": "0.6896673", "text": "public function updateStream($resource);", "title": "" }, { "docid": "5a9d8f35441b3d765b8c94eeefcd24bd", "score": "0.65327597", "text": "public function update(Request $request, Resource $resource)\n {\n //\n // $this->authorize('update',Resource::class);\n // $input=$request->all();\n // $resource->update('$input');\n // return redirect('resource/'.$resource->id);\n return response()->json($resource);\n }", "title": "" }, { "docid": "5ff58e3b0cb8ed2ef95e5bfb0eb3a3dc", "score": "0.64138347", "text": "public function update(AccountInterface $account, Account $resource);", "title": "" }, { "docid": "df6c7acef4541105b5bc3ce3650d59f5", "score": "0.6403721", "text": "public function updateResourceById(Request $request, $id = 0);", "title": "" }, { "docid": "c36ab864eb8fe4e400b9bf654b24e104", "score": "0.6334678", "text": "public function updateStream($path, $resource, array $config = []);", "title": "" }, { "docid": "4f7d45ebcaeb64448ba69a2728df7cc9", "score": "0.63236964", "text": "public function update(Request $request, $resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n $this->validate($request, [\n 'title' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'slug' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'model' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'namespace' => 'required|max:255',\n 'order_column' => 'required|integer',\n 'order_direction' => 'required|in:asc,desc',\n 'icon' => 'required'\n ]);\n\n $resource->update($request->all());\n\n return redirect()->back()->with('success', 'Resource updated');\n }", "title": "" }, { "docid": "55e27ae867b72d70d9595d52e540084d", "score": "0.62870395", "text": "public function updateStream($path, $resource, $config = []);", "title": "" }, { "docid": "5a25947b768e68926672b730228d725c", "score": "0.627197", "text": "public function update(Request $request, Resource $resource)\n {\n $validatedData = $request->validate([\n 'content' => 'required',\n 'topic' => [\n 'required',\n Rule::unique(\"resources\",'topic')->ignore($resource->topic,'topic')],\n ]);\n $content = $validatedData['content'];\n $dom = new \\DomDocument();\n $dom->loadHtml($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n $images = $dom->getElementsByTagName('img');\n\n foreach($images as $k => $img){\n $data = $img->getAttribute('src');\n if(strpos($data,'base64')!=false){\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n $data = base64_decode($data);\n\n $image_name= \"/upload/\" . time().$k.'.png';\n $path = public_path() . $image_name;\n file_put_contents($path, $data);\n $img->removeAttribute('src');\n $img->setAttribute('src', $image_name);\n }\n }\n $content = $dom->saveHTML();\n\n $resource->topic = $validatedData['topic'];\n $resource->content = $content;\n $resource->save();\n\n return redirect()->route('resource.show',['resource'=>$resource]);\n }", "title": "" }, { "docid": "248fca12370a0c10f40bb8e9ca995402", "score": "0.62151873", "text": "public function updateStream($path, $resource, Config $config)\n\t{\n $return = parent::updateStream($path, $resource, $config);\n\n $this->commit('updated ' . basename($path));\n\n return $return;\n }", "title": "" }, { "docid": "86d8d34eae4faff07f003c17390ad840", "score": "0.6214479", "text": "function put($resource, $data) {\n\t\t\t$this->_auth();\n\t\t\treturn $this->_request('PUT', $this->_resourcefix($resource), $data);\n\t\t}", "title": "" }, { "docid": "32dfb87cdc4ec45c0bf037618a81f878", "score": "0.61961704", "text": "public function updateStream($path, $resource, Config $config){}", "title": "" }, { "docid": "8630c9391e187dee0ad16562c7859222", "score": "0.61748964", "text": "public function update(Request $request, $class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "840ed6822df952682e04f5fdbc8605d6", "score": "0.6174421", "text": "public function update(StoreResourceRequest $request, $id)\n {\n $input = [\n 'name' => $request->input('name'),\n 'type' => $request->input('type'),\n 'metadata' => Arr::except($request->validated(), ['name', 'type']),\n ];\n\n if ($request->input('type') === 'pdf') {\n $file = $request->file('file');\n $input['metadata'] += [\n 'size' => $file->getSize(),\n 'ext' => $file->getClientOriginalExtension(),\n 'path' => $file->getClientOriginalName(),\n ];\n }\n\n $resource = Resource::find($id);\n if ($resource && $resource->update($input)) {\n if (isset($file)) {\n $file->move(storage_path('app/pdfs'), $file->getClientOriginalName());\n }\n\n return response()->json(['ok' => true]);\n } else {\n return response()->json(['ok' => false]);\n }\n }", "title": "" }, { "docid": "70667eb6cc902a3a33b32be7cb1f72f1", "score": "0.6109262", "text": "public function updateResource(\\Illuminate\\Http\\Request &$request, &$model): void\n {\n }", "title": "" }, { "docid": "c45baaabe2bd3d4c40a40e6b7d210f05", "score": "0.60513884", "text": "public function updateItem($resource, $id)\n\t{\n\t\t$this->ci->load->model($resource['model'], 'model');\n\n\t\t$postData = $this->ci->input->post(null, true);\n\n\t\t//@todo: Get the fillable fields and run a filter on what was given\n\t\t$this->ci->model->updateItem($id, $postData);\n\n\t\treturn 'Resource updated successfully';\n\t}", "title": "" }, { "docid": "08787fbcdf1f1dfce03ab185d34d1138", "score": "0.6035496", "text": "public function update($resourceId)\n {\n return $this->create();\n }", "title": "" }, { "docid": "6b9157a3a385139440dccde2f158c05b", "score": "0.6028893", "text": "public function update(Request $request, Storage $storage)\n {\n $attributes = $request->validate([\n 'parent_id' => 'nullable|exists:storages,id',\n ]);\n\n if (is_null($attributes['parent_id'])) {\n $storage->makeRoot()\n ->save();\n }\n else {\n $storage->appendToNode(Storage::find($attributes['parent_id']))\n ->save();\n }\n\n if ($request->wantsJson()) {\n return $storage;\n }\n\n return redirect($storage->path);\n }", "title": "" }, { "docid": "44801be6d02cd2bdb1653813581ade94", "score": "0.6010684", "text": "public function update(Request $request, Resource $resource)\n {\n $validatedAttributes = request()->validate([\n 'name' => ['required', 'string', 'max:255'],\n 'field' => ['required', 'string', 'max:255'],\n 'resource_contributor' => ['exists:users,id']\n ]);\n\n $resource_contributor = User::find($validatedAttributes['resource_contributor']);\n $this->authorize('assign', $resource_contributor);\n\n $resource->update($validatedAttributes);\n $resource->assignUser($resource_contributor);\n\n return view('actions.resource.update', compact('resource'));\n }", "title": "" }, { "docid": "2b8a79adbe1af409adcb87f83c9169f6", "score": "0.59985447", "text": "function refresh($resource)\n {\n $this->getCache()->removeItem(get_class($resource) . $resource->getId());\n $resource->_load($resource->getId());\n }", "title": "" }, { "docid": "b6183039ccc289a72430ce694bc84511", "score": "0.59811354", "text": "public function put(Resource\\ResourceInterface $resource)\r\n\t{\r\n\t\t$hash = $this->generateHash($resource->resourceName(), $resource->resourceId(), $resource->params());\r\n\t\t\r\n\t\t$this->storage->put($hash, $resource->contents());\r\n\t\t$this->hashes[$hash] = $hash;\r\n\t\t\r\n\t\treturn $resource;\r\n\t}", "title": "" }, { "docid": "8cd20d00377121b72e7e70d56ae3b421", "score": "0.5978405", "text": "public function update(Request $request, Product $product)\n {\n //Get the product\n $the_product = Product::where('product_id',$product->product_id)->first();\n\n //Update the product\n $product->supplier_id = $request->supplier_id;\n\n //Return product if updated\n if ($product->update()){\n return new ProductResource($product);\n } \n }", "title": "" }, { "docid": "27238afbfd7d5f825910ac95b94767b7", "score": "0.59718364", "text": "public function update(Request $request, $id)\n {\n \n $requestData = $request->all();\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n unset($requestData[\"_token\"]);\n unset($requestData[\"_method\"]);\n $requestData = json_encode($requestData);\n ResourcesService::updateResourcesTable($requestData, $query);\n// $resource = Resource::findOrFail($id);\n// $resource->update($requestData);\n\n return redirect('admin/resources')->with('flash_message', 'Resource updated!');\n }", "title": "" }, { "docid": "df6115717d620432de4e68dabd64c68b", "score": "0.5934917", "text": "public function update(Request $request, $id)\n\t{\n $validator = $this->validate($request, [\n \t//\n ]);\n\n try\n {\n \t$updatedResource = $this->repository->updateResource($id, $request->all());\n\n } catch(\\Exception $exception)\n {\n $this->flashErrorAndReturnWithMessage($exception);\n }\n\n // returns back with success message\n flash()->success('The resource was updated!');\n return redirect()->action('Admin\\Catalogue\\ResourceController@edit', ['resource' => $id]);\n\t}", "title": "" }, { "docid": "308f63a408af64ce6c649c642eeae702", "score": "0.59232825", "text": "public function getResourceUpdates( $resource, $size = SPIGET4PHP_DEFAULT, $page = SPIGET4PHP_DEFAULT, $sort = SPIGET4PHP_DEFAULT, $fields = SPIGET4PHP_DEFAULT )\n {\n $function = 'resources/'.$resource.'/updates';\n $args = [];\n if ( !is_null( $size ) ) $args['size'] = $size;\n if ( !is_null( $page ) ) $args['page'] = $page;\n if ( !is_null( $sort ) ) $args['sort'] = $sort;\n if ( !is_null( $fields ) ) $args['fields'] = implode(',', $fields );\n return $this->getResult( $function, $args );\n }", "title": "" }, { "docid": "91e7d2c538f4decea1e29581b3890506", "score": "0.5894686", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(), [\n 'user_id' => 'filled|exists:users,id',\n 'space_id' => 'filled|exists:spaces,id',\n 'capacity_used' => 'filled|integer|between:1,100',\n 'start_date' => 'filled|date_format:Y-m-d',\n 'end_date' => 'filled|date_format:Y-m-d',\n ]);\n\n if ($validator->fails()) {\n\n return response()->json([\n 'status' => false,\n 'message' => $validator->errors()->first(),\n 'error' => $validator->errors(),\n ], 400);\n\n }\n \n try {\n\n DB::beginTransaction();\n\n $storage = MyStorage::where('id', $id)->first();\n\n if (is_null($storage)) {\n\n return response()->json([\n 'status' => false,\n 'message' => 'Storage tidak ditemukan...',\n ], 404);\n\n }\n\n $data = $request->all();\n\n $storage->update($data);\n\n DB::commit();\n\n Activity::onAct($request, 'Update Storage');\n\n return response()->json([\n 'status' => true,\n 'message' => 'Berhasil melakukan perubahan!',\n ], 200);\n\n } catch (Exception $e) {\n\n DB::rollBack();\n\n CustomException::onError($e);\n\n return response()->json([\n 'status' => false,\n 'message' => 'Maaf! Terjadi kesalahan pada sistem...',\n 'error' => $e->getMessage(),\n ], 500);\n\n }\n\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b2b52d5e19d80d8c444bf8a8d2e69616", "score": "0.58864933", "text": "public function update(Product $product,Request $request)\n {\n abort_if(auth()->user()->admin !==1,403);\n $product->update(request(['name','volume','issue','price','stock']));\n if($request->has('pic')) {\n\n $pic = $request->file('pic');\n $extension = $request->file('pic')->getClientOriginalExtension();\n $watermark=Storage::disk('s3')->get('/public/WaterMark.png');\n\n $filename = 'product';\n $normal = Image::make($pic)->resize(250, 250)->insert($watermark)->encode($extension);\n $pixelated = Image::make($pic)->resize(250, 250)->pixelate(20)->encode($extension);\n\n\n Storage::disk('s3')->put('/products/'.\"$product->id\".'/'.\"{$filename}\".'/original', (string)$normal, 'public');\n Storage::disk('s3')->put('/products/'.\"$product->id\".'/'.\"{$filename}\".'/pixelated', (string)$pixelated, 'public');\n\n\n $product = Product::findorFail(\"$product->id\");\n $product->pic = $filename;\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "96f8834f70428b62ee43e045b6155883", "score": "0.5868864", "text": "public function Update( $resourceType, $resourceData ) {\n\n $callerId = 'RemoteAPI->Update: \"'.$resourceType;\n if (!$this->VerifyLoggedIn( $callerId )) {\n return NULL; // error\n }\n if (!$this->VerifyValidResourceType($resourceType)) {\n return NULL;\n }\n if (!isset($resourceData['data']['id'])) {\n return NULL;\n }\n\n $url = $this->endpoint_uri.'/'.$resourceType.'/'.$resourceData['data']['id'];\n $data = http_build_query($resourceData, '', '&');\n $ret = $this->CurlHttpRequest($callerId, $url, 'PUT', $data, true);\n return $ret->response;\n }", "title": "" }, { "docid": "1bae75410baac72a0e8132d92a079593", "score": "0.5863047", "text": "public function updateResourceType(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "7e791b7f0ac284a4a99b42aa5d49b6f5", "score": "0.58566195", "text": "public function update(Request $request, $id)\n {\n $model = DrugStorage::find($id);\n $model->fill($request->all());\n $model->save();\n\n return redirect('storage');\n }", "title": "" }, { "docid": "c8cfc09f393219dca339ad89d530539a", "score": "0.58513457", "text": "public function putStream($resource);", "title": "" }, { "docid": "9d248a2ed58e7497d523e07caa29e60e", "score": "0.5848729", "text": "public function update(Request $request, UserStorageInfo $userStorageInfo)\n {\n //\n }", "title": "" }, { "docid": "914e8c19a288227da3761458ae873793", "score": "0.5830434", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::find($id);\n $product->update($request);\n if($request->hasFile('image')){\n //store image in amazon bucket\n $file = $request->file('image') ;\n $fileName = time() . '.' . $file->getClientOriginalExtension() ;\n $filePath = $file->getPathName();\n\n $s3 = AWS::createClient('s3');\n $s3->putObject(array(\n 'Bucket' => 'kumashe',\n 'Key' => $fileName,\n 'SourceFile' => $filePath,\n 'ACL' => 'public-read'\n ));\n $image_url = $s3->getObjectUrl('kumashe', $fileName);\n $product->image_url = $image_url;\n }\n\n $product->save();\n return redirect(route('product.show', $id));\n }", "title": "" }, { "docid": "82a1a055157c214f599a7f4a9e118292", "score": "0.58248174", "text": "public function update($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t// NOTE: If you override this method remember to exclude $this->relationships from input!!\n\t\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\n\n\t\t// Transfer input to the resource\n\t\t$this->resource = $this->resource->fill($input);\n\n\t\treturn $this->persist(__FUNCTION__);\n\t}", "title": "" }, { "docid": "8c71ceccf522a25b82a67cb113315aaf", "score": "0.58206964", "text": "public function updateHook($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "ff532344ab178d688587c7da12273ec4", "score": "0.5812807", "text": "public function updateStream($path, $resource, \\League\\Flysystem\\Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "402a2d31776495dd28ca9fd3b5783ac2", "score": "0.58027816", "text": "public function update($id, Requests\\EventUpdateRequest $request,Storage $storage) {\n //update values in notice\n $event=Event::find($id);\n $event->name = $request->input('evtname');\n $event->description = $request->input('descrp');\n if($request->file('img')!=null){\n $image = $request->file( 'img' );\n $timestamp = $this->getFormattedTimestamp();\n $savedImageName = $this->getSavedImageName( $timestamp, $image );\n $savedImageName = 'event/'.$savedImageName;\n $imageUploaded = $this->uploadImage( $image, $savedImageName, $storage ); \n if ( $imageUploaded )\n {\n $event->image = $savedImageName;\n }else{\n return redirect('event')\n ->withFlashMessage('Image upload failed!')\n ->withType('danger');\n } \n }\n $event->save();\n return redirect('event')\n ->withFlashMessage('Event Updated successfully!')\n ->withType('success');\n }", "title": "" }, { "docid": "ff0e38a6315c73abcb3ca49b97fa12a2", "score": "0.57795924", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->s_name = $request->name;\n $product->s_caption = $request->caption;\n $product->s_desc = $request->desc;\n $product->n_qty = $request->quantity;\n $product->f_price = $request->price;\n $product->id_creator = $request->creator;\n $product->id_category = $request->category[\"id\"];\n\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "a9e0457c38673b4e5d44d30595cc5a66", "score": "0.5776495", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'image' => 'required|image|mimes:jpeg,png,jpg|max:2048',\n ]);\n\n $slider = slider::where('slider_id',$id)->first(); \n $imagename = $slider->image;\n if(!empty($request->file('image'))){\n\n if(Storage::disk('s3')->exists($imagename)) {\n Storage::disk('s3')->delete($imagename);\n }\n $file = $request->file('image');\n $imagename = $file->store('slider', 's3');\n }\n \n $affectedRows = Slider::where('slider_id', $id)\n ->update(array( \n 'image' => $imagename, \n ));\n\n return redirect()->route('slider.index')\n ->with('success','slider updated successfully.');\n }", "title": "" }, { "docid": "dca29547108f9baf476eadad247453f8", "score": "0.57759243", "text": "public function put_update() {\n\t}", "title": "" }, { "docid": "9dd01fe7e0843f2e28de9c41f2993355", "score": "0.57543606", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n\n $this->authorize('update', $obj);\n\n $obj->update($request->all()); \n\n \n\n /* cache pages */\n $p = explode('/',$obj->slug);\n if(count($p)==1){\n $filename = $obj->slug.'.json';\n }\n else\n {\n $slug = implode('_', $p);\n $filename = $slug.'.json';\n }\n $filepath = $this->cache_path.$filename;\n file_put_contents($filepath, json_encode($obj,JSON_PRETTY_PRINT));\n\n flash('('.$obj->slug.') item is updated!')->success();\n return redirect()->route($this->module.'.view',$obj->slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "06b241f2e73fc514410ae9f7cf6027c3", "score": "0.574161", "text": "public function update(Request $request, $id)\n {\n\n $section = Section::find($id);\n // if($section->path != $request->path){\n // File::move(public_path().\"\\\\storage\\\\\".$section->path, public_path().'\\\\storage\\\\'.$request->path);\n // }\n $section->update($request->all());\n return redirect()->route('section.show',$section->id)->withSuccess('Saved');\n\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "fc2c8495106e59db92b5cb42b28f371f", "score": "0.57243335", "text": "public function updateStream($path, $resource, Config $config)\n {\n $size = Util::getStreamSize($resource);\n list($ret, $err) = Qiniu_RS_Rput($this->getClient(), $this->bucket, $path, $resource, $size, null);\n if ($err !== null) {\n return false;\n }\n return compact('size', 'path');\n }", "title": "" }, { "docid": "1b2c07e390f355317a98bb6b905544d0", "score": "0.57218975", "text": "public function update_put(){\r\n $response = $this->ProductM->update_product(\r\n $this->put('id'),\r\n $this->put('name'),\r\n $this->put('price')\r\n \r\n );\r\n $this->response($response);\r\n }", "title": "" }, { "docid": "e5dda42fd9bfe8ca4186765bc677c8d8", "score": "0.5709017", "text": "public function update($id)\n\t{\n // No need to update file ...\n\t}", "title": "" }, { "docid": "2fbe11e1a076264bdb0a567721e62b4e", "score": "0.570533", "text": "public function update(Request $request, $id)\n {\n \n $rules = [\n 'name' => ['required', 'alpha'],\n 'price' => ['required', 'min:7'],\n 'quantity' => ['required', 'min:7']\n ];\n\n $data = app('request')->only('name', 'price', 'quantity', 'image');\n \n $validator = app('validator')->make($data, $rules);\n\n if ($validator->fails()) {\n throw new UpdateResourceFailedException('Could not update new product.', $validator->errors());\n }\n $product = Product::findOrFail($id);\n \n $product->update($data);\n\n return $this->response->array($product->toArray());\n\n }", "title": "" }, { "docid": "dd2225fd648a4ac98ff9eed8ac080518", "score": "0.56961733", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'product_name'=>'required',\n 'description'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n if($request->old_image!=null){\n unlink('storage/'.$request->old_image);\n }\n $path=$request->file('thumbnail')->store('Thumbnials');\n }\n $attachment=$request->old_attachment;\n if($request->hasFile('attachment')){\n if($attachment!=null){\n // unlink('storage/'.$request->old_attachment);\n }\n $attachment=$request->file('attachment')->store('Attachment');\n }\n $data=[\n 'product_name'=>$request->product_name,\n 'attachment'=>$attachment,\n 'description'=>$request->description,\n 'thumbnail'=>$path\n ];\n Product::where('id',$id)->update($data);\n return redirect()->route('listProduct');\n }", "title": "" }, { "docid": "e042cdb98e7ed9891be90f84314686dd", "score": "0.5693665", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->hasFile('image')) {\n $image = Storage::putFile('image', $request->file('image'));\n $product->image = $image;\n $product->save();\n }\n if ($request->hasFile('file')) {\n $file = Storage::putFile('file', $request->file('file'));\n $product->file = $file;\n $product->save();\n }\n $product->title = $request->title;\n $product->description = $request->description;\n $product->author = $request->author;\n $product->publisher = $request->publisher;\n $product->category = $request->category;\n $product->price = $request->price;\n if ($product->save()) {\n return redirect()->route('admin.product.index')->with('success', 'Updated');\n } else {\n return redirect()->route('admin.product.index')->with('failure', 'Error');\n }\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "a9fac208ad1c404c2680e4aef5eb19ae", "score": "0.5679042", "text": "public function updateStream($path, $resource, Config $config)\n\t{\n\t\t$contents = stream_get_contents($resource);\n\t\treturn $this->upload($path, $contents, $config);\n\t}", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "3afef5a69f7281e42edd2ca54eb9c614", "score": "0.56676763", "text": "public function update()\n {\n $this->entity->save($this->getData());\n }", "title": "" }, { "docid": "a41cb37da92977ab0e5d7e802be4ae3d", "score": "0.56617355", "text": "public function update(Request $request, $id)\n {\n \n $this->validate($request , [\n 'name' => 'required|string|unique:products,name,'.$id,\n 'description' => 'required|string',\n 'price' => 'required|integer',\n // 'image'=>'nullable|mimes:png,jpeg,jpg|max:10000',\n ]);\n\n $product = Product::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->user_id = auth('api')->id();\n $product->update();\n\n return AppHttpResponse::responseSuccess(\n Response::HTTP_CREATED,\n \"product updated successfully\",\n new ProductResource($product)\n );\n // return response()->json(['response' => ['status' => 'success', 'message'=> 'Action Successful']]);\n }", "title": "" }, { "docid": "ea216cab3487d4cef55296ff2eb4b922", "score": "0.5660654", "text": "public function update(Request $request, \n string $resource_type_id,\n string $resource_id\n ): JsonResponse {\n if ($this->hasWriteAccessToResourceType((int) $resource_type_id) === false) {\n return \\App\\HttpResponse\\Response::notFoundOrNotAccessible(trans('entities.resource'));\n }\n\n $resource = (new Resource())->instance($resource_type_id, $resource_id);\n\n if ($resource === null) {\n return Response::failedToSelectModelForUpdateOrDelete();\n }\n\n if (count($request->all()) === 0) {\n return \\App\\HttpResponse\\Response::nothingToPatch();\n }\n\n $validator = (new ResourceValidator())->update([\n 'resource_type_id' => (int)$resource_type_id,\n 'resource_id' => (int)$resource_id\n ]);\n\n if ($validator->fails()) {\n return \\App\\HttpResponse\\Response::validationErrors($validator);\n }\n\n $invalid_fields = $this->checkForInvalidFields(\n [\n ...(new Resource())->patchableFields(),\n ...(new ResourceValidator())->dynamicDefinedFields()\n ]\n );\n\n if (count($invalid_fields) > 0) {\n return Response::invalidFieldsInRequest($invalid_fields);\n }\n\n foreach ($request->all() as $key => $value) {\n $resource->$key = $value;\n }\n\n $cache_job_payload = (new \\App\\Cache\\JobPayload())\n ->setGroupKey(\\App\\Cache\\KeyGroup::RESOURCE_UPDATE)\n ->setRouteParameters([\n 'resource_type_id' => $resource_type_id\n ])\n ->setUserId($this->user_id);\n\n try {\n $resource->save();\n\n ClearCache::dispatchSync($cache_job_payload->payload());\n } catch (Exception $e) {\n return Response::failedToSaveModelForUpdate($e);\n }\n\n return Response::successNoContent();\n }", "title": "" }, { "docid": "1eef5ac7d8584e9a4bcc453dbeda2dd1", "score": "0.5651912", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'destination'=>'required',\n 'description'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n if($request->old_image!=null){\n unlink('storage/'.$request->old_image);\n }\n $path=$request->file('thumbnail')->store('Thumbnials');\n }\n \n $data=[\n 'destination'=>$request->destination,\n 'description'=>$request->description,\n 'thumbnail'=>$path\n ];\n Destination::where('id',$id)->update($data);\n return redirect()->route('listDestination');\n }", "title": "" }, { "docid": "9f187c27268314514c3087be6418037a", "score": "0.5651523", "text": "public function update(Record $record)\n {\n $record_id = $record->meta->record_id;\n $version = $record->meta->version;\n\n $path = $this->conn->uri('v1', 'storage', 'records', 'safe', $record_id, $version);\n try {\n $this->conn->put($path, $this->encrypt_record($record));\n } catch (RequestException $re) {\n if ($re->getResponse()->getStatusCode() === 409) {\n throw new ConflictException(\"Conflict updating record ID {$record_id}\", 'record');\n }\n\n throw $re;\n }\n }", "title": "" }, { "docid": "037102fbe484d03598713e8aa9173254", "score": "0.56507224", "text": "public function update(Request $request, $id)\n {\n \n $request->validate(Product::validateRules());\n \n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $image_path = $file->store('uploads', [\n 'disk' => 'public'\n ]);\n $request->merge([\n 'image_path' => $image_path\n ]);\n }\n \n $product = Product::findOrFail($id);\n\n $this->authorize('update', $product);\n \n $product->update($request->all());\n\n return redirect()->route('products.index')->with('success', 'product ( ' . $product->name . ' ) was Updated.');\n }", "title": "" }, { "docid": "60a1aa5c2edbfc16970b759aff9a6706", "score": "0.5644386", "text": "public function update(Request $request)\n {\n // Get existing product or create a new product\n $product = Product::findOrFail($request->input('id'));\n\n /**\n * set incomming put values to the product\n * This will add or overwrite existing values\n * */\n $product->id = $request->input('id');\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->description = $request->input('description');\n $product->bedrooms = $request->input('bedrooms');\n $product->bathrooms = $request->input('bathrooms');\n $product->status_id = $request->input('status_id');\n // need to add Auth user_id when admin is created\n $product->user_id = $request->input('user_id');\n\n if ($product->save())\n {\n // get product details\n $this->getProductDetails($product);\n \n return new ProductResource($product);\n }\n }", "title": "" }, { "docid": "f191a52f64addfd7234817d041f773d5", "score": "0.5643432", "text": "public function update(Request $request, $id)\n {\n $validate = $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'buy' => 'required|numeric',\n 'sell' => 'required|numeric',\n 'image' => 'nullable|file|max:1000',\n ]);\n try {\n $cache = Cache::get('products');\n $currect_product = $cache[$id - 1];\n $current_image = $currect_product['imageName'] ?? false;\n // dd(arra);\n // if current_image not the same as cached image\n if ($request->image && $current_image != $request->file('image')->getClientOriginalName()) {\n Storage::disk('local')->put('public/' . $request->file('image')->getClientOriginalName(), $request->file('image')->getContent());\n $currect_product['imageName'] = $request->file('image')->getClientOriginalName();\n }\n\n $currect_product['title'] = $request->title;\n $currect_product['description'] = $request->description;\n $currect_product['buy'] = $request->buy;\n $currect_product['sell'] = $request->sell;\n $new_cache = array_replace($cache, array(($id - 1) => $currect_product));\n\n Cache::put('products', $new_cache, now()->addHours(2));\n } catch (\\Throwable $th) {\n dd($th);\n return redirect('products')->with('status', 'Error');\n }\n\n return redirect('products')->with('status', 'Saved!');\n }", "title": "" }, { "docid": "b31be5fface7cd996e321be92699b8f6", "score": "0.5629739", "text": "public function putAction( Request $request, ?string $resource ) : Response\n\t{\n\t\t$req = $this->createRequest( $request );\n\t\t$res = ( new Psr17Factory )->createResponse();\n\n\t\treturn $this->createResponse( $this->createClient( $req, $resource )->put( $req, $res ) );\n\t}", "title": "" }, { "docid": "cf8362e081562a5c6bc7cf5dec3e1a4f", "score": "0.5627604", "text": "public function update($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn $this->attemptEdit($resource, false);\n\t}", "title": "" }, { "docid": "18418c48891ce4c52909e09e2bb43ebb", "score": "0.56251585", "text": "public function update(Request $request, Product $product)\n {\n // dd($request);\n $slug = ModelHelper::createSlug('\\App\\Models\\Product', $request->title, $product->id);\n $path = public_path().'/storage/products/'.$product->slug;\n\n if ($product->slug != $slug) {\n\n if (file_exists($path)) {\n Storage::move('public/products/'. $product->slug , 'public/products/'.$slug);\n }\n\n $slug = ModelHelper::createSlug('\\App\\Models\\Product', $slug, $product->id);\n \n }\n\n $updateArray = array(\n \"title\" => $request->title, \n \"slug\" => $slug,\n \"sku\" => $request->sku,\n \"price\" => $request->price,\n \"discounted_price\" => isset($request->discounted_price) ? $request->discounted_price : 0,\n \"display\" => isset($request->display) ? $request->display : 0,\n \"featured\" => isset($request->featured) ? $request->featured : 0,\n \"variation_type\" => $request->variation_type,\n \"short_description\" => $request->short_description,\n \"long_description\" => $request->long_description,\n \"stock_status\" => $request->stock_status,\n \"stock_count\" => $request->stock_count,\n \"brand_id\" => $request->brand_id,\n \"tags\" => $request->tags,\n \"updated_by\" => Auth::user()->name,\n \"updated_at\" => date('Y-m-d H:i:s')\n );\n\n $path = public_path().'/storage/products/'.$slug;\n $folderPath = 'public/products/'.$slug;\n\n if (!file_exists($path)) {\n\n Storage::makeDirectory($folderPath,0777,true,true);\n\n if (!is_dir($path.\"/thumbs\")) {\n Storage::makeDirectory($folderPath.'/thumbs',0777,true,true);\n }\n\n }\n\n if ($request->hasFile('image')) {\n //Add the new photo\n $image = $request->file('image');\n $filename = time().'.'.$image->getClientOriginalExtension();\n // Storage::putFileAs($folderPath, new File($image), $filename);\n\n ModelHelper::resize_crop_images(1200, 1200, $image, $folderPath.\"/\".$filename);\n ModelHelper::resize_crop_images(900, 900, $image, $folderPath.\"/thumbs/small_\".$filename);\n ModelHelper::resize_crop_images(600, 600, $image, $folderPath.\"/thumbs/thumb_\".$filename);\n\n $updateArray['image'] = $filename;\n\n $OldFilename = $product->image;\n // dd($OldFilename);\n //Delete the old photo\n Storage::delete($folderPath .\"/\".$OldFilename);\n Storage::delete($folderPath .\"/thumbs/small_\".$OldFilename);\n Storage::delete($folderPath .\"/thumbs/thumb_\".$OldFilename);\n\n }\n\n if ($request->hasFile('other_images')) {\n //Add the new photo\n $otherImages = $request->file('other_images');\n foreach ($otherImages as $key => $other) {\n\n $filename_o = time().$key.'_.'.$other->getClientOriginalExtension();\n // Storage::putFileAs($folderPath, new File($other), $filename_o);\n\n ModelHelper::resize_crop_images(1200, 1200, $other, $folderPath.\"/\".$filename_o);\n ModelHelper::resize_crop_images(900, 900, $other, $folderPath.\"/thumbs/small_\".$filename_o);\n ModelHelper::resize_crop_images(600, 600, $other, $folderPath.\"/thumbs/thumb_\".$filename_o);\n }\n\n }\n\n $product_updated = $product->update($updateArray);\n $variations = $request->variation;\n\n if ($request->variation_type == 1) {\n\n foreach ($variations as $color) {\n\n if (isset($color['id'])) {\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name'], $color['id']);\n\n $product_color = ProductColor::find($color['id']);\n $productColorExists = ProductColor::where([['id', '!=' , $product_color->id], ['product_id' , $product->id], ['color_id', $color['color_id']]])->exists();\n\n if (!$productColorExists) {\n\n ProductColor::where('id', $color['id'])->update([\n 'color_id' => $color['color_id'],\n 'sku' => $color['sku'],\n 'stock_count' => $color['stock_count']\n ]);\n }\n\n }else{\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name']);\n\n $product_color = ProductColor::updateOrCreate(['product_id' => $product->id, 'color_id' => $color['color_id']],\n ['sku' => $color['sku'], 'stock_count' => $color['stock_count']]);\n\n }\n }\n }elseif ($request->variation_type == 2) {\n \n\n foreach ($variations as $color) {\n\n if (isset($color['id'])) {\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name'], $color['id']);\n\n $product_color = ProductColor::find($color['id']);\n\n $productColorExists = ProductColor::where([['id', '!=' , $product_color->id], ['product_id' , $product->id], ['color_id', $color['color_id']]])->exists();\n\n if (!$productColorExists) {\n\n ProductColor::where('id', $color['id'])->update([\n 'color_id' => $color['color_id'],\n 'sku' => $color['sku']\n ]);\n }\n\n $sizes = $color['sizes'];\n\n foreach ($sizes as $size) {\n\n\n if (isset($size['id'])) {\n \n // $size_slug = ProductSize::createSlug($color['id'], $size['name'], $size['id']);\n\n $product_size = ProductSize::find($size['id']);\n\n $sizeExists = ProductSize::where([['id', '!=' , $product_size->id], ['product_color_id', $color['id']], ['size_id' , $size['size_id']] ])->exists();\n // dd($sizeExists);\n if (!$sizeExists) {\n\n ProductSize::where('id', $size['id'])->update([\n 'size_id' => $size['size_id'],\n 'stock_count' => $size['stock_count']\n ]);\n }\n\n\n }else{\n\n // $size_slug = ProductSize::createSlug($color['id'], $size['name']);\n \n $size = ProductSize::updateOrCreate(\n ['product_color_id' => $color['id']],\n ['stock_count' => $size['stock_count']]\n );\n }\n\n }\n\n }else{\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name']);\n\n $product_color = ProductColor::updateOrCreate(['product_id' => $product->id, 'color_id' => $color['color_id']],\n ['sku' => $color['sku']]);\n\n $sizes = $color['sizes'];\n\n foreach ($sizes as $size) {\n\n // $size_slug = Size::createSlug($product_color->id, $size['name']);\n $size = ProductSize::updateOrCreate(\n ['product_color_id' => $product_color->id, 'size_id' => $size['size_id']],\n ['stock_count' => $size['stock_count']]\n );\n }\n }\n\n }\n }\n\n // dd($request);\n if ($product_updated) {\n\n if (isset($request->category_id)) {\n\n $category_ids = $request->category_id;\n\n for ($i=0; $i < count($category_ids); $i++) { \n \n $product->category_products()->updateOrCreate(['product_id' => $product->id, 'category_id' => $category_ids[$i]]);\n }\n\n $product->category_products()->whereNotIn('category_id',$category_ids)->delete();\n \n }else{\n $product->category_products()->delete();\n }\n\n return redirect()->route('admin.products.index')->with('status','Product has been Updated Successfully!');\n\n }else{\n return redirect()->back()->with('error', 'Something Went Wrong!');\n }\n }", "title": "" }, { "docid": "63a101ece5068639dff7800b6376f4af", "score": "0.56169105", "text": "public function updateResource($path, $array)\n {\n return $this->decodeResponseBody($this->sendRequest('PUT', $path, ['Content-Type' => 'application/json'], $array));\n }", "title": "" }, { "docid": "3dc7c7ac4a1b054ffe1cb3bfd7af6977", "score": "0.5615731", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n /* delete file request */\n if($request->get('deletefile')){\n if(Storage::disk('public')->exists($obj->image)){\n Storage::disk('public')->delete($obj->image);\n }\n redirect()->route($this->module.'.show',[$obj->slug]);\n }\n\n /* If file is given upload and store path */\n if(isset($request->all()['file'])){\n $file = $request->all()['file'];\n $path = Storage::disk('public')->putFile('images', $request->file('file'));\n $request->merge(['image' => $path]);\n }\n\n $obj->update($request->all()); \n\n \n\n flash('('.$obj->slug.') category item is updated!')->success();\n return redirect()->route($this->module.'.show',$obj->slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "8ca029b89aef5b3db9a2e7cfb6429648", "score": "0.5607548", "text": "public function update($resource, $attributes)\n {\n return DB::transaction(function () use ($resource, $attributes) {\n $attributes = $this->updateAttributes($attributes);\n\n /** @var Model $resource */\n $resource = $this->fill($resource, $attributes, true);\n $resource->save();\n\n return $this->updateHook($resource);\n });\n }", "title": "" }, { "docid": "792c302e1e1dd2dd27f767e2c72f24e4", "score": "0.56033003", "text": "public function update(Request $request, $id)\n {\n $food = FoodDrink::find($id);\n// $food->store_id = Auth::guard('store')->user()->id;\n $food->category_id = $request->category_id;\n $food->name = $request->name;\n $food->description = $request->description;\n $food->price = $request->price;\n $image_food=$request->file('image');\n if ($image_food==''){\n $food->image=$request->old_image;\n }else{\n $image_food=$request->file('image');\n $filename=time().'.'.$image_food->getClientOriginalExtension();\n $path='foods/' . $filename;\n Storage::disk('s3')->put($path, file_get_contents($image_food));\n $food->image = Storage::disk('s3')->url($path, $filename);\n }\n\n $food->update();\n return redirect()->route('food.index');\n }", "title": "" }, { "docid": "e78201b45ca654bb496654f8a520fa61", "score": "0.5599671", "text": "public function update(Request $request, $id)\n {\n if ($request->bool12 == 1) {\n\n if ($request->file('images')) {\n $product = Product::create($request->except('image'));\n $this->globalclass->storeMultipleS3($request->file('images'), 'construction/product', $product->id);\n } else {\n Product::create($request->except('image'));\n }\n }\n if ($request->bool12 == 0) {\n $product = Product::find($id);\n if ($request->file('images')) {\n\n $this->globalclass->storeMultipleS3($request->file('images'), 'construction/product', $product->id);\n $product->update($request->except('image','created_by'));\n } else {\n $product->update($request->except('image','created_by'));\n }\n }\n\n return redirect()->away($request->previous_url);\n }", "title": "" }, { "docid": "c289554a52ebaed40c1a4527e6993f7e", "score": "0.5595745", "text": "public function update(Request $request, $id)\n {\n $update = Photo::find($id);\n Storage::delete(\"public/img\" . $update->url);\n $update->url = $request->file(\"url\")->hashName();\n Storage::put(\"public/img\", $request->file(\"url\"));\n $update->save();\n\n return redirect(\"/\");\n }", "title": "" }, { "docid": "feafa85fd136a8bfa7378058dbef8934", "score": "0.55935574", "text": "public function update(StoreQuestion $request, Question $question)\n {}", "title": "" }, { "docid": "e1cccae3c615051b9fc728867ee799d4", "score": "0.55874336", "text": "public function update(StoreSlide $request, Slide $slide){\n $slide->title = $request->input('title');\n $slide->caption = $request->input('caption');\n $slide->target_link = $request->has('target_link')? $request->input('target_link'): $slide->target_link;\n $slide->status = $request->input('status');\n \n if($request->hasFile('image')){\n $image = Storage::put('public/slides', $request->file('image'), 'public');\n $image = explode('/', $image)[2];\n $slide->image_url = $image; \n }\n \n $slide->save();\n\n return redirect()->route('slides.show', ['slide' => $slide]);\n }", "title": "" }, { "docid": "5a0f17e493c29df895c72feb688db7f2", "score": "0.55830574", "text": "public function update(Request $request, $id)\n {\n $stadium = Stadium::find($id);\n $stadium->caption = $request->caption;\n $stadium->abstract= $request->abstract;\n $stadium->capacity = $request->capacity;\n $stadium->slug = $request->slug;\n\n //almacenar imagen\n if ($request->file('picture')){\n $img = $request->slug.'.'.$request->file('picture')->extension();\n $request->file('picture')->storeAs('public/stadiums', $img);\n $stadium->picture = $img; \n } \n $stadium->save();\n return redirect()->route('stadiums.show',compact('stadium')) \n ->with('info','Registro actualizado con éxito');\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "72020ca078f39bec759978049b853e74", "score": "0.5576042", "text": "public function testUpdate()\n {\n $model = factory($this->model)->create();\n\n $this->actingAs($this->actingAs, 'api')\n ->putJson(route($this->route . '.update', [$this->route => $model->id]), factory($this->model)->make()->toArray())\n ->assertStatus(200);\n }", "title": "" }, { "docid": "6dd248caa08f860a85ecdb9e66a6e2e1", "score": "0.55740505", "text": "public function update(Request $request, $id)\n\t{\n\n $product = Product::find($id);\n\n $product->fill($request->input())->save();\n//\n// if($product) {\n// $product->availability = $request->get('availability');\n// $product->save();\n// }\n\n return redirect()->route('admin.index');\n\t}", "title": "" }, { "docid": "2a89d1feac056c7a5193aaa3f0606728", "score": "0.557056", "text": "public function update(FormBuilder $formBuilder, Request $request, $course, Resource $resource)\n {\n //\n $form = $formBuilder->create(\\App\\Forms\\Resource::class);\n\n if (!$form->isValid()) {\n return redirect()->back()->withErrors($form->getErrors())->withInput();\n }\n\n // Do saving and other things...\n $resource->title = $request->title;\n $resource->url = $request->url;\n $resource->publish = $request->has('publish');\n $resource->save();\n\n return redirect()->route('resource.show',['course' => $course, 'resource' => $resource->id ]);\n }", "title": "" }, { "docid": "a542dd937d2be5173cc776afe82a0d09", "score": "0.55695087", "text": "public function update( $id, $data = [] )\n {\n // Find the resource record.\n // \n $record = $this->findById( $id );\n\n // Assign the changes that are to be made to the record.\n // \n $record->fill( $data );\n\n // Save the changes.\n // \n $record->save();\n\n // Now return the record.\n // \n return $record;\n }", "title": "" }, { "docid": "6e61f435eead18e460042aeda1d070b2", "score": "0.5562987", "text": "public function update(Request $request, $id)\n {\n $update = Card::find($id);\n $update->image = $request->file('image')->hashName();\n $update->titre=$request->titre;\n $update->description=$request->description;\n $update->save();\n $request->file('image')->storePublicly('images', 'public');\n Storage::disk('public')->delete('images/' . $update->photo);\n return redirect('/card');\n }", "title": "" }, { "docid": "3a66bafe63974860d7521baf3672343a", "score": "0.5562585", "text": "public function update(Request $request)\n {\n $slider = Slider::findOrFail($request->id);\n $file_route = $slider->img;\n if($request->img != null){\n\n $img = $request->file('img');\n $file_route = $request->nombre.'_'.$img->getClientOriginalName();\n Storage::disk('img-slider')->put($file_route, file_get_contents($img->getRealPath()));\n\n }\n $slider->fill($request->all());\n $slider->img = $file_route;\n\n $slider->save();\n return redirect()->to(route('slider.index'));\n }", "title": "" }, { "docid": "edc97c334b427f1077d50deb0ce82b75", "score": "0.55613524", "text": "public function update($id, Requests\\BlogUpdateRequest $request,Storage $storage) {\n //update values in notice\n $blog=Blog::find($id);\n $blog->blog_title = $request->input('blog_title');\n $blog->blog_cont = $request->input('blog_cont');\n if($request->file('blog_img')!=null){\n $image = $request->file( 'blog_img' );\n $timestamp = $this->getFormattedTimestamp();\n $savedImageName = $this->getSavedImageName( $timestamp, $image );\n $savedImageName = 'blog/'.$savedImageName;\n $imageUploaded = $this->uploadImage( $image, $savedImageName, $storage ); \n if ( $imageUploaded )\n {\n $blog->blog_img = $savedImageName;\n }else{\n return redirect('blog/list')\n ->withFlashMessage('Image upload failed!')\n ->withType('danger');\n } \n }\n $blog->save();\n return redirect('blog/list')\n ->withFlashMessage('Blog Updated successfully!')\n ->withType('success');\n }", "title": "" }, { "docid": "419d7e885f0216bf11f82a55cebe051d", "score": "0.5560277", "text": "public function update(Request $request, $id)\n {\n //\n if (\\Gate::allows('canEdit')){\n \n $old_display_image = Product_Image::where('primary', '=', 1)->where('product_id', '=', $request->product_id)->firstOrFail();\n if($old_display_image){\n $update = $old_display_image->update(['primary' => 0]);\n }\n $request->merge(['primary' => 1]);\n $product = Product_Image::where('id', '=', $id)->firstOrFail();\n $update = $product->update($request->all());\n if($update){\n return ['result'=>'success', 'message' =>'Display Image Changed'];\n }else{\n return ['result'=>'error', 'message' =>'Something went wrong.'];\n }\n }else{\n return ['result'=>'error', 'message' =>'Unauthorized! Access Denied'];\n }\n }", "title": "" }, { "docid": "4637f8f3d3bbdf0659cd1e8b2ab0cf05", "score": "0.5560252", "text": "public function update(BookRequest $request, $id)\n {\n $book = Book::findOrFail($id);\n unlink($book->image);\n $image = $request->file('image');\n $fileName = time().\"-\".$image->getClientOriginalName();\n $image->move('img/book_image', $fileName);\n $book->title = $request->title;\n $book->category_id = $request->category_id;\n $book->author_id = $request->author_id;\n $book->publisher_id = $request->publisher_id;\n $book->stock = $request->stock;\n $book->price = $request->price;\n $book->image = \"img/book_image/\".$fileName;\n $book->save();\n return new BookResource($book);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "ae94acbb17e8336020733d9a108826ef", "score": "0.55557597", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required|string|max:100',\n 'price' => 'required|numeric',\n 'photo_url' => 'nullable|image'\n ]);\n\n $product = \\App\\Product::find($id);\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n\n if ($request->hasFile('photo_url')) {\n Storage::delete($product->photo_url);\n $product->photo_url = $request->file('photo_url')->store('public/products');\n }elseif ($request->has('delete_photo')) {\n Storage::delete($product->photo_url);\n $product->photo_url = null;\n }\n\n $product->save();\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "012d802cdd39ad4f48a5d0ab5db49368", "score": "0.55530256", "text": "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "title": "" }, { "docid": "0a6ca94a66cd5d73c054b8f785c5c23a", "score": "0.55519474", "text": "public function update(Request $request, $id)\n {\n $data=array();\n $data['product_name']=$request->product_name;\n $data['product_description']=$request->product_description;\n $data['short_description']=$request->short_description;\n $data['regular_price']=$request->regular_price;\n $data['sale_price']=$request->sale_price;\n $data['quantity']=$request->quantity;\n $data['category_id']=$request->category_id;\n $data['discount']=$request->discount;\n $data['color_id']=$request->color_id;\n $data['size_id']=$request->size_id;\n $data['status']=1;\n $data['featured']=$request->featured;\n $image=$request->newphoto;\n if($image){\n $position = strpos($image,';');\n $sub = substr($image,0,$position);\n $ext=explode('/', $sub)[1];\n\n $name=time().\".\".$ext;\n $img=Image::make($image)->resize(240,200);\n $upload_path='backend/product/';\n $img_url=$upload_path.$name;\n $success=$img->save( $img_url);\n if($success){\n \n $data['photo']=$img_url;\n $img=DB::table('products')->where('id',$id)->first();\n if($img->photo){\n $image_path=$img->photo;\n $done=unlink($image_path);\n $user=DB::table('products')->where('id',$id)->update($data);\n }else{\n $user=DB::table('products')->where('id',$id)->update($data);\n }\n \n }\n\n }else{\n $oldphoto=$request->photo;\n $data['photo']=$oldphoto;\n $user=DB::table('products')->where('id',$id)->update($data);\n\n }\n }", "title": "" }, { "docid": "2e70e3c8c0652c5dc988ab9065e4cb75", "score": "0.5550894", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $request->validate([\n 'sku' => 'required',\n ]);\n $input = $request->all();\n if ($files = $request->file('file')) {\n $request->validate([\n 'image' => 'same:image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n if(!empty($product->image))\n {\n $oldPath = public_path('/images/products/');\n $image_path = $oldPath.$product->image;\n unlink($image_path);\n }\n $input['image'] = time().'.'.$files->extension();\n\n $destinationPath = public_path('/images/products/');\n $img = Image::make($files->path());\n\n $img->resize(600, 600, function ($constraint) {\n// $constraint->aspectRatio();\n $constraint->upsize();\n });\n $img->save($destinationPath . $input['image']);\n }\n\n $product->update($input);\n\n return redirect()->route('admin.products.edit', $id);\n\n }", "title": "" }, { "docid": "830e83e40b1643f45a7209542d55934a", "score": "0.5539849", "text": "public function updateObjectStorage($options)\n {\n if (in_array($options['object_id'], $this->storage_ids)) {\n $url = $this->api::OBJECT_STORAGE_URL . \"/\" . $options['object_id'];\n } else {\n throw new InvalidParameterException(\"That Storage ID isn't associated with your account\");\n }\n $ba['label'] = $this->d_label;\n (isset($options['label'])) ? $ba['label'] = $options['label'] : null;\n $body = json_encode($ba);\n return $this->api->makeAPICall('PUT', $url, $body);\n }", "title": "" }, { "docid": "72ad50b45baa578aa7f60f62631ac4a0", "score": "0.5539695", "text": "public function update(Request $request, $id)\n {\n if(!empty($request->imgUrl)){\n $imgUrl=$request->file('imgUrl')->move('public/img/item/',$id.\".tmp\");\n }\n Item::find($id)->update([\n 'name'=>$request->name,\n 'price'=>$request->price,\n 'stock'=>$request->stock,\n 'type'=>$request->type,\n 'desc'=>$request->desc,\n ]);\n return redirect('home');\n }", "title": "" }, { "docid": "1c298f72979588b1c24d4f0e69dfa6b7", "score": "0.5537852", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')) {\n $resources = $request->session()->get('resources');\n if(isset($resources[$id])) {\n $resource = $resources[$id];\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $ageInput = $request->input('age');\n $resource['id'] = $idInput;\n $resource['name'] = $nameInput;\n $resource['age'] = $ageInput;\n if(isset($resources[$idInput])) {\n return back()->withInput();\n } else {\n unset($resources[$id]);\n $resources[$idInput] = $resource;\n $type = 'success';\n $data['type'] = $type;\n }\n $request->session()->put('resources', $resources);\n return redirect('resources');\n }\n }\n return back()->withInput();\n return redirect('resources')->with('message',$message);\n }", "title": "" } ]
bfd94264c48576dbaa17bd6737c53e79
Executes all the routines for all plugins. This function executes all the routines for all plugins, whether checking if their interval timed out, or not (so all routines are executed), depending on the value of the \b $force param.
[ { "docid": "1637b1ab065a9b7393b762cf2817c578", "score": "0.6441586", "text": "public function callAllRoutines($force = false)\n {\n $serverName = Server::getName();\n foreach ($this->routines as $className => &$class) {\n foreach ($class as $name => &$routine) {\n if ($force || !isset($routine[2][$serverName]) || (time() >= $routine[2][$serverName] + $routine[1])) {\n $routine[0]->$name();\n $routine[2][$serverName] = time();\n }\n }\n }\n }", "title": "" } ]
[ { "docid": "1b4e6690e3ad104c2c25675ce2b96f2e", "score": "0.65154123", "text": "public static function all_plugins()\n {\n }", "title": "" }, { "docid": "2d3ee8893880922f2d3164d3a1e263ac", "score": "0.6138685", "text": "protected function execute()\n {\n // show that the loop is running independently\n $this->log(\"Loop %d (%d trash objects stored)\", $this->getLoopIterations(), count($this->trash));\n\n // take up memory on each iteration; so you can see the 'growth' in memory from the MyPlugin output\n for ($i = 0; $i < 25; $i++) {\n $this->trash[] = new DateTime();\n }\n\n // Dump the plugin stats once\n// if ($this->getLoopIterations() == 1) {\n// $stats = $this->stats();\n// $this->log(\"Lock plugin stats: \");\n// $this->dump($stats['plugins']['lock']);\n// }\n }", "title": "" }, { "docid": "ba34c26dcd1110bcc9805277d4236d4b", "score": "0.60855126", "text": "public function doExecute()\n\t{\n\t\t//\n\t\t// Check we have some critical information.\n\t\t//\n\n\t\tif (!defined('JPATH_PLUGINS') || !is_dir(JPATH_PLUGINS))\n\t\t{\n\t\t\tthrow new Exception('JPATH_PLUGINS not defined');\n\t\t}\n\n\t\t// Add a start message.\n\t\tJLog::add('Starting cron run.');\n\n\t\t//\n\t\t// Prepare the plugins\n\t\t//\n\n\t\t// Get the quey builder class from the database.\n\t\t$query = $this->dbo->getQuery(true);\n\n\t\t// Get a list of the plugins from the database.\n\t\t$query->select('p.*')\n\t\t\t->from('#__extensions AS p')\n\t\t\t->where('p.enabled = 1')\n\t\t\t->where('p.type = '.$this->dbo->quote('plugin'))\n\t\t\t->where('p.folder = '.$this->dbo->quote('cron'))\n\t\t\t->order('p.ordering');\n\n\t\t// Push the query builder object into the database connector.\n\t\t$this->dbo->setQuery($query);\n\n\t\t// Get all the returned rows from the query as an array of objects.\n\t\t$plugins = $this->dbo->loadObjectList();\n\n\t\t// Log how many plugins were loaded from the database.\n\t\tJLog::add(sprintf('.loaded %d plugin(s).', count($plugins)));\n\n\t\t// Loop through each of the results from the database query.\n\t\tforeach ($plugins as $plugin)\n\t\t{\n\t\t\t// Build the class name of the plugin.\n\t\t\t$className = 'plg'.ucfirst($plugin->folder).ucfirst($plugin->element);\n\t\t\t$element = preg_replace('#[^A-Z0-9-~_]#i', '', $plugin->element);\n\n\t\t\t// If the class doesn't already exist, try to load it.\n\t\t\tif (!class_exists($className))\n\t\t\t{\n\t\t\t\t// Compute the path to the plugin file.\n\t\t\t\t$path = sprintf(rtrim(JPATH_PLUGINS, '\\\\/').'/cron/%s/%s.php', $element, $element);\n\n\t\t\t\t// Check if the file exists.\n\t\t\t\tif (is_file($path))\n\t\t\t\t{\n\t\t\t\t\t// Include the file.\n\t\t\t\t\tinclude $path;\n\n\t\t\t\t\t// Double check if we have a valid class.\n\t\t\t\t\tif (!class_exists($className))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Log a warning and contine to the next record.\n\t\t\t\t\t\tJLog::add(sprintf('..plugin class for `%s` not found in file.', $element), JLog::WARNING);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Log a warning and contine to the next record.\n\t\t\t\t\tJLog::add(sprintf('..plugin file for `%s` not found.', $element), JLog::WARNING);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tJLog::add(sprintf('..registering `%s` plugin.', $element));\n\n\t\t\t// Register the event.\n\t\t\t$this->registerEvent(\n\t\t\t\t// Register the event name.\n\t\t\t\t'doCron',\n\t\t\t\t// Create and register the event plugin.\n\t\t\t\tnew $className(\n\t\t\t\t\t$this->dispatcher,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'params' => new JRegistry($plugin->params)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t//\n\t\t// Run the cron plugins.\n\t\t//\n\t\t// Each plugin should have been installed in the Joomla CMS site\n\t\t// and must include a 'doCron' method. Configuration of the plugin\n\t\t// is done via plugin parameters.\n\t\t//\n\n\t\tJLog::add('.triggering `doCron` event.');\n\n\t\t// Trigger the event and let the Joomla plugins do all the work.\n\t\t$results = $this->triggerEvent('doCron');\n\n\t\t// Log the results.\n\t\tforeach ($this->triggerEvent('doCron') as $result)\n\t\t{\n\t\t\tJLog::add(sprintf('..plugin returned `%s`.', var_export($result, true)));\n\t\t}\n\n\t\tJLog::add('Finished cron run.');\n\t}", "title": "" }, { "docid": "f464e3e67c8574283212d4be0bbec75b", "score": "0.594312", "text": "public function loadPlugins()\n {\n $plugin_dir = ReporticoUtility::findBestLocationInIncludePath(\"plugins\");\n\n if (is_dir($plugin_dir)) {\n if ($dh = opendir($plugin_dir)) {\n while (($file = readdir($dh)) !== false) {\n $plugin = $plugin_dir . \"/\" . $file;\n if (is_dir($plugin)) {\n $plugin_file = $plugin . \"/global.php\";\n if (is_file($plugin_file)) {\n require_once $plugin_file;\n }\n $plugin_file = $plugin . \"/\" . strtolower($this->execute_mode) . \".php\";\n if (is_file($plugin_file)) {\n require_once $plugin_file;\n }\n }\n }\n }\n }\n\n // Call any plugin initialisation\n $this->applyPlugins(\"initialize\", $this);\n }", "title": "" }, { "docid": "578e848a35d1c229850b1d7bd725652c", "score": "0.57763743", "text": "public function execute() {\n\t\t$this->Plugin = ClassRegistry::init('PluginManager.Plugin');\n\t\tif (! $this->Plugin->runMigration('plugin_manager')) {\n\t\t\t$this->out(\n\t\t\t\t'<error>' .\n\t\t\t\t\t__d('plugin_manager', 'Failure updated of \"plugin_manager\" plugin.') .\n\t\t\t\t'</error>'\n\t\t\t);\n\t\t\treturn $this->_stop();\n\t\t}\n\t\tif (! $this->Plugin->runMigration('site_manager')) {\n\t\t\t$this->out(\n\t\t\t\t'<error>' .\n\t\t\t\t\t__d('plugin_manager', 'Failure updated of \\\"site_manager\\\" plugin.') .\n\t\t\t\t'</error>'\n\t\t\t);\n\t\t\treturn $this->_stop();\n\t\t}\n\n\t\tif (! isset($this->PluginUpdateUtil)) {\n\t\t\t$this->PluginUpdateUtil = new PluginUpdateUtil();\n\t\t}\n\t\tif ($this->PluginUpdateUtil->updateAll()) {\n\t\t\t$this->out(\n\t\t\t\t'<success>' . __d('plugin_manager', 'Successfully updated of all plugins.') . '</success>'\n\t\t\t);\n\t\t} else {\n\t\t\t$this->out('<error>' . __d('plugin_manager', 'Failure updated of all plugins.') . '</error>');\n\t\t}\n\t}", "title": "" }, { "docid": "730793bca873c993185f9552ea124e14", "score": "0.56070274", "text": "public function execute()\n {\n $plugins = Plugin::repository()->findBy(['active' => true]);\n\n /** @var Plugin $plugin */\n foreach ($plugins as $plugin)\n {\n // If the plugin does not exists in filesystem disable it and do not try to execute it to prevent errors.\n if (!$this->exists($plugin->namespace, $plugin->name))\n {\n $plugin->active = 0;\n $plugin->save();\n continue;\n }\n \n $instance = $this->loadInstance($plugin->namespace, $plugin->name, $plugin);\n $instance->getBootstrap()->execute();\n }\n }", "title": "" }, { "docid": "dafb1d1668a70dc1749b79a08b489f66", "score": "0.5584565", "text": "final public function onStart(): void\n {\n static::$closures = [];\n $merged = [];\n foreach (glob('plugins/*') as $plugin) {\n try {\n $include = include $plugin;\n $merged = arrayMerge(static::$closures, $include);\n } catch (Throwable $e) {\n Logger::log($e);\n $this->report($e->getMessage());\n }\n }\n static::$closures = $merged;\n foreach (static::$closures as $role => $closures) {\n foreach ($closures as &$closure) {\n try {\n $closure = $closure->bind($this, self::class);\n } catch (Throwable $e) {\n Logger::log($e);\n $this->report($e->getMessage());\n }\n }\n }\n }", "title": "" }, { "docid": "4ed67b1d81c30540cb17b0a1530ea040", "score": "0.55388796", "text": "function handlePlugins() {\n global $lang;\n\t\n handlePlugin(\"plugin1\");\n handlePlugin(\"plugin2\");\n handlePlugin(\"plugin3\");\n\t\n\thandlePermanentPlugin(\"calendarfront\", \"CalendarFront\");\n\thandlePermanentPlugin(\"keywords\", \"Keywords\");\n\thandlePermanentPlugin(\"description\", \"Description\");\n handlePermanentPlugin(\"menu\", \"Menu\");\n\thandlePermanentPlugin(\"lang\", \"Lang\");\n handlePermanentPlugin(\"user\", \"User\");\n handlePermanentPlugin(\"pilot\", \"Pilot\");\n handlePermanentPlugin(\"breadcrumb\", \"Breadcrumb\");\n\t\t\n\t/* handlePermanentPlugin(\"footer\", \"Footer\");\n\thandlePermanentPlugin(\"printjs\", \"PrintJS\");\t\t\t\t\t\n\t*/\n}", "title": "" }, { "docid": "f09081ed1e03192921ff889ff11cd37e", "score": "0.552218", "text": "public function runTasks(){\n $time = time();\n if( ( $time - 2 ) < $this->lastrun ) return;\n if( $this->debug && $this->debug_level > 1 ) $this->debug('maintenance tasks');\n if( $this->debug && $this->debug_level > 1 ) $this->debug('jobs running: ' . count( $this->pool->requests() ) );\n\n $this->checkIfDisabled();\n $this->register();\n static $dbtime;\n if( $dbtime < 1 ) $dbtime = $time;\n $this->lastrun = $time;\n try {\n $this->dequeue = TRUE;\n if( $this->limit > 0 && $this->processed > $this->limit ){\n return $this->shutdown();\n }\n \n if( $this->timelimit && $this->start + $this->timelimit < $time ){\n return $this->shutdown();\n }\n \n \n for( $i = 0; $i < 10; $i++){\n $this->populate();\n if( count( $this->pool->requests() ) > 0 || !$this->dequeue ) break;\n }\n $this->register();\n if( ($time - 60) > $dbtime ) {\n if( $this->debug && $this->debug_level > 1 ) $this->debug('repopulating settings');\n $this->refresh();\n $dbtime = $time;\n }\n \n } catch( Exception $e ){\n $this->debug( $e->__toString());\n }\n }", "title": "" }, { "docid": "d91407e55ea2b3e4bf646d978b3b2abb", "score": "0.5485651", "text": "function auto_install_plugins($plugins=false) {\r\n if (!$plugins) {\r\n $plugins = PecPlugin::load();\r\n }\r\n\r\n foreach ($plugins as $plugin) {\r\n\t if ($plugin->installation_required() && $plugin->never_installed()) {\r\n\t\t $plugin->initial_install();\r\n\t }\r\n }\r\n}", "title": "" }, { "docid": "58d0d65e5d57b543a5b66acf1a7781a8", "score": "0.54683733", "text": "public function runAll() {\n $this->triggerEvent('allRun');\n while (count($this->waiting)) {\n $this->run(array_shift($this->waiting));\n }\n $this->triggerEvent('allDone');\n }", "title": "" }, { "docid": "853e325b2aec6a4c08fa04306a1e9ed0", "score": "0.5444268", "text": "function wp_paused_plugins() {}", "title": "" }, { "docid": "a6b7c3c6a9538418e6424f5b9376cb24", "score": "0.5407882", "text": "function _maybe_update_plugins() {}", "title": "" }, { "docid": "2f534fa4bc149d131369042e2da6bd25", "score": "0.54044455", "text": "function plugins() {\n\t\t// Youbora plugin\n\t\tif ( $_GET['Youbora']=='on' AND empty($_GET['youbDis'])){\n\t\t $youboraPlugin = Youbora(\"false\");\n\t\t}elseif ( $_GET['youbDis']=='on' OR ($_GET['youbDis']=='on' AND $_GET['Youbora']=='on')){\n\t\t\t$youboraPlugin = Youbora(\"true\");\n\t\t}else{\n\t\t\t$youboraPlugin = '';\n\t\t}\n\n\t\t// Kava plugin\n\t\tif ( $_GET['Kava']=='on' AND empty($_GET['kavaDis'])){\n\t\t\t$kavaPlugin = Kava(\"false\");\n\t\t}elseif ( $_GET['kavaDis']=='on' OR ($_GET['kavaDis']=='on' AND $_GET['Kava']=='on')){\n\t\t\t$kavaPlugin = Kava(\"true\");\n\t\t}else{\n\t\t\t$kavaPlugin = '';\n\t\t}\n\n\t\t// Google analytics plugin\n\t\tif ( $_GET['GA']=='on' AND empty($_GET['gaDis'])){\n\t\t\t$gaPlugin = GA(\"false\");\n\t\t}elseif ( $_GET['gaDis']=='on' OR ($_GET['gaDis']=='on' AND $_GET['GA']=='on')){\n\t\t\t$gaPlugin = GA(\"true\");\n\t\t}else{\n\t\t\t$gaPlugin = '';\n\t\t}\n\n\t\t// Advertisiment plugin \n\t\tif ($_GET['adTag']==\"noAd\" AND empty($_GET['imaDis'])){\n\t\t\t$imaPlugin = '';\n\t\t}elseif (!($_GET['adTag']=='noAd') AND $_GET['imaDis']=='on'){\n\t\t\t$imaPlugin = imaPlugin(getSelectedAdTag(),\"true\");\n }elseif (!($_GET['adTag']=='noAd') AND empty($_GET['imaDis'])){\n\t\t\t$imaPlugin = imaPlugin(getSelectedAdTag(),\"false\");\n\t\t}elseif ($_GET['imaDis']=='on'){\n\t\t\t$imaPlugin = imaPlugin(getSelectedAdTag(),\"true\");\n\t\t}\n\n\t\t// Comscore plugin\n if ( $_GET['Comscore'] == 'on' AND empty($_GET['comscDis'])){\n\t\t\t$comscorePlugin = Comscore(\"false\");\n\t\t}elseif ( $_GET['comscDis']=='on' OR ($_GET['comscDis']=='on' AND $_GET['Comscore']=='on')){\n\t\t\t$comscorePlugin = GA(\"true\");\n }else{\n\t\t\t$comscorePlugin = '';\n\t\t}\n\t\t\n\t\t// Enable/disable OTT analytics\n\t\tif ($_GET['uiConfId'] =='ott'){\n\t\t\tif ($_GET['ottAnalyt']=='on' AND empty($_GET['ottDis'])){\n\t\t\t\t$ottAnalytics = ottAnalytics(\"false\");\n\t\t\t}elseif ( $_GET['ottDis']=='on' OR ($_GET['ottDis']=='on' AND $_GET['ottAnalyt']=='on')){\n\t\t\t\t$ottAnalytics = ottAnalytics(\"true\");\n\t\t\t}\t\n }else{\n\t\t\t$ottAnalytics = '';\n\t\t}\n\n\t\t// VR plugin\n\t\tif (($_GET['VrDis'])=='on') {\n\t\t\t$switchVR = vrPlugin(\"true\");\n\t\t}else{\n\t\t\t$switchVR = vrPlugin(\"false\");\n\t\t}\n\n\t\tif ($_GET['dai'] =='noDai' AND empty($_GET['daiDis'])) {\n\t\t\t$daiPlugin = '';\n\t\t}elseif ($_GET['dai'] !='noDai' AND empty($_GET['daiDis'])){\n\t\t\t$daiPlugin = daiPlugin(\"false\");\n\t\t}elseif ($_GET['dai'] !='noDai' AND $_GET['daiDis'] == 'on'){\n\t\t\t$daiPlugin = daiPlugin(\"true\");\n\t\t}elseif ($_GET['dai'] =='noDai' AND $_GET['daiDis'] == 'on'){\n\t\t\t$daiPlugin = daiPlugin(\"true\");\n\t\t}\n\n\t\t// Bumper plugin \n\t\tif (($_GET['bumper']==\"noBump\" AND empty($_GET['bumpDis'])) OR empty($_GET['bumper'])){\n\t\t\t$bumperPlugin = '';\n\t\t}elseif (!($_GET['bumper']==\"noBump\") AND $_GET['bumpDis']=='on'){\n\t\t\t$bumperPlugin = bumperPlugin(getSelectedBumper(),\"true\");\n }elseif (!($_GET['bumper']==\"noBump\") AND empty($_GET['bumpDis'])){\n\t\t\t$bumperPlugin = bumperPlugin(getSelectedBumper(),\"false\");\n\t\t}elseif ($_GET['bumpDis']=='on'){\n\t\t\t$bumperPlugin = bumperPlugin(getSelectedBumper(),\"true\");\n\t\t} \n\n\treturn \"\\n\\t\\t\\t\\t\\tplugins: { $youboraPlugin $kavaPlugin $daiPlugin $gaPlugin $imaPlugin $bumperPlugin $comscorePlugin $ottAnalytics $switchVR\n\t\t\t\\t\\t} //Plugins\";\n}", "title": "" }, { "docid": "64bc56ad2869f987eb5888ba7b576194", "score": "0.53565085", "text": "function elgg_load_plugins() {\n\t$plugins_path = elgg_get_plugins_path();\n\t$start_flags =\tELGG_PLUGIN_INCLUDE_START\n\t\t\t\t\t| ELGG_PLUGIN_REGISTER_VIEWS\n\t\t\t\t\t| ELGG_PLUGIN_REGISTER_LANGUAGES\n\t\t\t\t\t| ELGG_PLUGIN_REGISTER_CLASSES;\n\n\tif (!$plugins_path) {\n\t\treturn false;\n\t}\n\n\t// temporary disable all plugins if there is a file called 'disabled' in the plugin dir\n\tif (file_exists(\"$plugins_path/disabled\")) {\n\t\tif (elgg_is_admin_logged_in() && elgg_in_context('admin')) {\n\t\t\tsystem_message(elgg_echo('plugins:disabled'));\n\t\t}\n\t\treturn false;\n\t}\n\n\tif (elgg_get_config('system_cache_loaded')) {\n\t\t$start_flags = $start_flags & ~ELGG_PLUGIN_REGISTER_VIEWS;\n\t}\n\n\tif (elgg_get_config('i18n_loaded_from_cache')) {\n\t\t$start_flags = $start_flags & ~ELGG_PLUGIN_REGISTER_LANGUAGES;\n\t}\n\n\t$return = true;\n\t$plugins = elgg_get_plugins('active');\n\tif ($plugins) {\n\t\tforeach ($plugins as $plugin) {\n\t\t\ttry {\n\t\t\t\t$plugin->start($start_flags);\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$plugin->deactivate();\n\t\t\t\t$msg = elgg_echo('PluginException:CannotStart',\n\t\t\t\t\t\t\t\tarray($plugin->getID(), $plugin->guid, $e->getMessage()));\n\t\t\t\telgg_add_admin_notice('cannot_start' . $plugin->getID(), $msg);\n\t\t\t\t$return = false;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "3c8939930d78a1d433ad9f017c0aa327", "score": "0.5356193", "text": "public function executeCallbacks()\n {\n echo \"Tick is \" . $this->_tick . \"\\n\";\n if (!isset($this->_callbacksForTick[$this->_tick])) {\n return;\n }\n foreach ($this->_callbacksForTick[$this->_tick] as $callback) {\n call_user_func($callback, $this);\n }\n\n // clean up\n unset($this->_callbacksForTick[$this->_tick]);\n }", "title": "" }, { "docid": "dcda1fa85bf6fda1ed8afbf9e3158e59", "score": "0.53560036", "text": "function plugins_loaded() {\n if ( $this->is_plugin_uninstall() || $this->is_plugin_activation() || $this->is_plugin_error_scrape() ) {\n /**\n * We need to delay or omit loading (other) plugins in each of these cases\n */\n return;\n }\n $this->_load_libraries();\n $this->_load_plugin_loaders();\n $this->_release_memory();\n }", "title": "" }, { "docid": "957655d623fbe5144349c8fd9dffc2bf", "score": "0.53429246", "text": "function core_plugins()\n\t{\n\t\t// first app plugins\n\t\t$opendir = opendir(APPPATH .'plugins');\n \t\twhile (false !== ($plugin = readdir($opendir)))\n\t\t{\n\t\t\tif ($plugin != '.' && $plugin != '..')\n\t\t\t{\n\t\t\t\t$plugin = strtolower(str_replace(EXT, '', str_replace('_pi', '', $plugin)).'_pi');\t\n\t\t\t\tif (isset($this->_ci_plugins[$plugin]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (file_exists(APPPATH.'plugins/'.$plugin.EXT))\n\t\t\t\t{\n\t\t\t\t\tinclude_once(APPPATH.'plugins/'.$plugin.EXT);\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$opendir = opendir(EXTPATH .'plugins');\n \t\twhile (false !== ($plugin = readdir($opendir)))\n\t\t{\n\t\t\t// Ignores . and .. that opendir displays\n\t\t\tif ($plugin != '.' && $plugin != '..')\n\t\t\t{\n\t\t\t\t$plugin = strtolower(str_replace(EXT, '', str_replace('_pi', '', $plugin)).'_pi');\t\n\t\t\t\tif (isset($this->_ci_plugins[$plugin]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (file_exists(EXTPATH.'plugins/'.$plugin.EXT))\n\t\t\t\t{\n\t\t\t\t\tinclude_once(EXTPATH.'plugins/'.$plugin.EXT);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (file_exists(BASEPATH.'plugins/'.$plugin.EXT))\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude_once(BASEPATH.'plugins/'.$plugin.EXT);\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlog_message('debug', 'Plugin loaded: '.$plugin);\n\t\t\t}\n\t\t}\n\t\tclosedir($opendir);\n\t}", "title": "" }, { "docid": "6b5fdaf2b46cb5b01c26a29d3a1f8772", "score": "0.5342908", "text": "public function doPeriodicActions()\n {\n $this->notifyUsers();\n $this->notifyGeneral();\n }", "title": "" }, { "docid": "5db019f8b1724f2b8567523ca5389221", "score": "0.5266249", "text": "public function finishAll()\n {\n if (count($this->arr_timers)) {\n foreach ($this->arr_timers as $k => $t) {\n $this->finish($k);\n }\n } else {\n trigger_error(\n 'No timer defined. Cannot finished not existant timers.',\n E_USER_NOTICE\n );\n }\n }", "title": "" }, { "docid": "02c22f54bf2f3647eb52616a52461c08", "score": "0.526517", "text": "public function run_all() \n\t{\n\t\tforeach ($this->get_test_methods() as $test)\n\t\t{\n\t\t\t$this->run($test);\n\t\t}\n\t}", "title": "" }, { "docid": "1e293cd6d8d6295a926f53b99b7cbfec", "score": "0.52440804", "text": "private function get_plugins_data_for_api() {\n // Alias.\n $site_active_plugins_option_name = 'active_plugins';\n $network_plugins_option_name = 'all_plugins';\n\n /**\n * Collection of all site level active plugins.\n */\n $site_active_plugins_cache = self::$_accounts->get_option( $site_active_plugins_option_name );\n\n if ( ! is_object( $site_active_plugins_cache ) ) {\n $site_active_plugins_cache = (object) array(\n 'timestamp' => '',\n 'md5' => '',\n 'plugins' => array(),\n );\n }\n\n $time = time();\n\n if ( ! empty( $site_active_plugins_cache->timestamp ) &&\n ( $time - $site_active_plugins_cache->timestamp ) < WP_FS__TIME_5_MIN_IN_SEC\n ) {\n // Don't send plugin updates if last update was in the past 5 min.\n return false;\n }\n\n // Write timestamp to lock the logic.\n $site_active_plugins_cache->timestamp = $time;\n self::$_accounts->set_option( $site_active_plugins_option_name, $site_active_plugins_cache, true );\n\n // Reload options from DB.\n self::$_accounts->load( true );\n $site_active_plugins_cache = self::$_accounts->get_option( $site_active_plugins_option_name );\n\n if ( $time != $site_active_plugins_cache->timestamp ) {\n // If timestamp is different, then another thread captured the lock.\n return false;\n }\n\n /**\n * Collection of all plugins (network level).\n */\n $network_plugins_cache = self::$_accounts->get_option( $network_plugins_option_name );\n\n if ( ! is_object( $network_plugins_cache ) ) {\n $network_plugins_cache = (object) array(\n 'timestamp' => '',\n 'md5' => '',\n 'plugins' => array(),\n );\n }\n\n // Check if there's a change in plugins.\n $network_plugins = self::get_network_plugins();\n $site_active_plugins = self::get_site_active_plugins();\n\n $network_plugins_thumbprint = $this->get_plugins_thumbprint( $network_plugins );\n $site_active_plugins_thumbprint = $this->get_plugins_thumbprint( $site_active_plugins );\n\n // Check if plugins status changed (version or active/inactive).\n $network_plugins_changed = ( $network_plugins_cache->md5 !== $network_plugins_thumbprint );\n $site_active_plugins_changed = ( $site_active_plugins_cache->md5 !== $site_active_plugins_thumbprint );\n\n if ( ! $network_plugins_changed &&\n ! $site_active_plugins_changed\n ) {\n // No changes.\n return array();\n }\n\n $plugins_update_data = array();\n\n foreach ( $network_plugins_cache->plugins as $basename => $data ) {\n if ( ! isset( $network_plugins[ $basename ] ) ) {\n // Plugin uninstalled.\n $uninstalled_plugin_data = $data;\n $uninstalled_plugin_data['is_active'] = false;\n $uninstalled_plugin_data['is_uninstalled'] = true;\n $plugins_update_data[] = $uninstalled_plugin_data;\n\n unset( $network_plugins[ $basename ] );\n\n unset( $network_plugins_cache->plugins[ $basename ] );\n unset( $site_active_plugins_cache->plugins[ $basename ] );\n\n continue;\n }\n\n $was_active = $data['is_active'] ||\n ( isset( $site_active_plugins_cache->plugins[ $basename ] ) &&\n true === $site_active_plugins_cache->plugins[ $basename ]['is_active'] );\n $is_active = $network_plugins[ $basename ]['is_active'] ||\n ( isset( $site_active_plugins[ $basename ] ) &&\n $site_active_plugins[ $basename ]['is_active'] );\n\n if ( ! isset( $site_active_plugins_cache->plugins[ $basename ] ) &&\n isset( $site_active_plugins[ $basename ] )\n ) {\n // Plugin was site level activated.\n $site_active_plugins_cache->plugins[ $basename ] = $network_plugins[ $basename ];\n $site_active_plugins_cache->plugins[ $basename ]['is_active'] = true;\n } else if ( isset( $site_active_plugins_cache->plugins[ $basename ] ) &&\n ! isset( $site_active_plugins[ $basename ] )\n ) {\n // Plugin was site level deactivated.\n unset( $site_active_plugins_cache->plugins[ $basename ] );\n }\n\n $prev_version = $data['version'];\n $current_version = $network_plugins[ $basename ]['Version'];\n\n if ( $was_active !== $is_active || $prev_version !== $current_version ) {\n // Plugin activated or deactivated, or version changed.\n\n if ( $was_active !== $is_active ) {\n if ( $data['is_active'] != $network_plugins[ $basename ]['is_active'] ) {\n $network_plugins_cache->plugins[ $basename ]['is_active'] = $data['is_active'];\n }\n }\n\n if ( $prev_version !== $current_version ) {\n $network_plugins_cache->plugins[ $basename ]['Version'] = $current_version;\n }\n\n $updated_plugin_data = $data;\n $updated_plugin_data['is_active'] = $is_active;\n $updated_plugin_data['version'] = $current_version;\n $updated_plugin_data['title'] = $network_plugins[ $basename ]['Name'];\n $plugins_update_data[] = $updated_plugin_data;\n }\n }\n\n // Find new plugins that weren't yet seen before.\n foreach ( $network_plugins as $basename => $data ) {\n if ( ! isset( $network_plugins_cache->plugins[ $basename ] ) ) {\n // New plugin.\n $new_plugin = array(\n 'slug' => $data['slug'],\n 'version' => $data['Version'],\n 'title' => $data['Name'],\n 'is_active' => $data['is_active'],\n 'is_uninstalled' => false,\n );\n\n $network_plugins_cache->plugins[ $basename ] = $new_plugin;\n\n $is_site_level_active = (\n isset( $site_active_plugins[ $basename ] ) &&\n $site_active_plugins[ $basename ]['is_active']\n );\n\n /**\n * If not network active, set the activity status based on the site-level plugin status.\n */\n if ( ! $new_plugin['is_active'] ) {\n $new_plugin['is_active'] = $is_site_level_active;\n }\n\n $plugins_update_data[] = $new_plugin;\n\n if ( isset( $site_active_plugins[ $basename ] ) ) {\n $site_active_plugins_cache->plugins[ $basename ] = $new_plugin;\n $site_active_plugins_cache->plugins[ $basename ]['is_active'] = $is_site_level_active;\n }\n }\n }\n\n $site_active_plugins_cache->md5 = $site_active_plugins_thumbprint;\n $site_active_plugins_cache->timestamp = $time;\n self::$_accounts->set_option( $site_active_plugins_option_name, $site_active_plugins_cache, true );\n\n $network_plugins_cache->md5 = $network_plugins_thumbprint;\n $network_plugins_cache->timestamp = $time;\n self::$_accounts->set_option( $network_plugins_option_name, $network_plugins_cache, true );\n\n return $plugins_update_data;\n }", "title": "" }, { "docid": "bdd80af58cc3eae0eaf1f68f4c04d2e5", "score": "0.5241741", "text": "private function get_active_plugins()\n {\n }", "title": "" }, { "docid": "a7febc4fef472c8fdfde39714b0e7267", "score": "0.52416956", "text": "protected function executePluginParsers()\n\t{\n\t\tforeach ($this->pluginsConfig as $pluginName => $pluginConfig)\n\t\t{\n\t\t\tif (!empty($pluginConfig['isDisabled']))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (isset($pluginConfig['quickMatch'])\n\t\t\t && strpos($this->text, $pluginConfig['quickMatch']) === false)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$matches = array();\n\n\t\t\tif (isset($pluginConfig['regexp']))\n\t\t\t{\n\t\t\t\t$cnt = preg_match_all(\n\t\t\t\t\t$pluginConfig['regexp'],\n\t\t\t\t\t$this->text,\n\t\t\t\t\t$matches,\n\t\t\t\t\tPREG_SET_ORDER | PREG_OFFSET_CAPTURE\n\t\t\t\t);\n\n\t\t\t\tif (!$cnt)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($cnt > $pluginConfig['regexpLimit'])\n\t\t\t\t{\n\t\t\t\t\tif ($pluginConfig['regexpLimitAction'] === 'abort')\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new RuntimeException($pluginName . ' limit exceeded');\n\t\t\t\t\t}\n\n\t\t\t\t\t$matches = array_slice($matches, 0, $pluginConfig['regexpLimit']);\n\n\t\t\t\t\t$msg = 'Regexp limit exceeded. Only the allowed number of matches will be processed';\n\t\t\t\t\t$context = array(\n\t\t\t\t\t\t'pluginName' => $pluginName,\n\t\t\t\t\t\t'limit' => $pluginConfig['regexpLimit']\n\t\t\t\t\t);\n\n\t\t\t\t\tif ($pluginConfig['regexpLimitAction'] !== 'ignore')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->logger->warn($msg, $context);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Cache a new instance of this plugin's parser if there isn't one already\n\t\t\tif (!isset($this->pluginParsers[$pluginName]))\n\t\t\t{\n\t\t\t\t$className = (isset($pluginConfig['className']))\n\t\t\t\t\t\t ? $pluginConfig['className']\n\t\t\t\t\t\t : 's9e\\\\TextFormatter\\\\Plugins\\\\' . $pluginName . '\\\\Parser';\n\n\t\t\t\t// Register the parser as a callback\n\t\t\t\t$this->pluginParsers[$pluginName] = array(\n\t\t\t\t\tnew $className($this, $pluginConfig),\n\t\t\t\t\t'parse'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Execute the plugin's parser, which will add tags via $this->addStartTag() and others\n\t\t\tcall_user_func($this->pluginParsers[$pluginName], $this->text, $matches);\n\t\t}\n\t}", "title": "" }, { "docid": "d15ddc4aa26e859f2b63261cb9e7b2bd", "score": "0.524007", "text": "public function loadAllPlugins()\n {\n $plugins = nbFileFinder::create('dir')\n ->discard('test')->prune('test')\n ->add('*Plugin')\n ->in($this->pluginDirs);\n\n foreach($plugins as $plugin)\n $this->addPlugin(basename($plugin));\n }", "title": "" }, { "docid": "d538eaa176e1440bf22e3c74b26f152d", "score": "0.5231082", "text": "protected function search_active_plugins()\n {\n }", "title": "" }, { "docid": "b18fe5b4e372ef981728d06bb07a0d62", "score": "0.52215755", "text": "protected function get_plugins()\n {\n }", "title": "" }, { "docid": "af8fc030302da97c48a013f242dfbcef", "score": "0.52184916", "text": "protected function get_all_plugins() {\n if (isset(self::$_plugins[$this->_plugin_type]) && is_array(self::$_plugins[$this->_plugin_type])) {\n return self::$_plugins[$this->_plugin_type];\n } else {\n $classes = get_declared_classes();\n $implementsPlugin = array();\n foreach ($classes as $c) {\n $reflect = new ReflectionClass($c);\n if ($reflect->implementsInterface($this->_plugin_type)) {\n $implementsPlugin[] = $c;\n }\n }\n self::$_plugins[$this->_plugin_type] = $implementsPlugin;\n return $implementsPlugin;\n }\n }", "title": "" }, { "docid": "4e3232650418aef3f15f0bdf664ec2ea", "score": "0.52019083", "text": "function wptally_maybe_get_plugins( $username = false, $force = false ) {\n\tif ( $username ) {\n\t\tif ( ! function_exists( 'plugins_api' ) ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin-install.php';\n\t\t}\n\n\t\tif ( $force ) {\n\t\t\tdelete_transient( 'wp-tally-user-' . $username );\n\t\t}\n\n\t\tif ( ! $plugins = get_transient( 'wp-tally-user-' . $username ) ) {\n\t\t\t$plugins = plugins_api( 'query_plugins',\n\t\t\t\tarray(\n\t\t\t\t\t'author' => $username,\n\t\t\t\t\t'per_page' => 999,\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'downloaded' => true,\n\t\t\t\t\t\t'description' => false,\n\t\t\t\t\t\t'short_description' => false,\n\t\t\t\t\t\t'donate_link' => false,\n\t\t\t\t\t\t'tags' => false,\n\t\t\t\t\t\t'sections' => false,\n\t\t\t\t\t\t'added' => true,\n\t\t\t\t\t\t'last_updated' => true,\n\t\t\t\t\t\t'active_installs' => true\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tset_transient( 'wp-tally-user-' . $username, $plugins, 60 * 60 );\n\t\t}\n\t} else {\n\t\t$plugins = false;\n\t}\n\n\treturn $plugins;\n}", "title": "" }, { "docid": "1cc8d1df0c3af6ee91d5b3eb8475e7c3", "score": "0.5201209", "text": "public function run() {\r\n\r\n add_filter( 'pre_set_site_transient_update_plugins' , array( $this , 'update_check' ) );\r\n add_filter( 'plugins_api' , array( $this , 'inject_plugin_update_info' ) , 10 , 3);\r\n add_action( 'upgrader_process_complete' , array( $this , 'after_plugin_update' ) , 10 , 2 );\r\n\r\n }", "title": "" }, { "docid": "100a548c129656bd2f5452fbe6b681a6", "score": "0.5180507", "text": "protected function executePlugins($stage)\n {\n // Ignore any stages for which we don't have plugins set:\n if (!array_key_exists($stage, $this->config) || !is_array($this->config[$stage])) {\n return;\n }\n\n foreach ($this->config[$stage] as $plugin => $options) {\n $this->log('');\n $this->log('RUNNING PLUGIN: ' . $plugin);\n\n // Is this plugin allowed to fail?\n if ($stage == 'test' && !isset($options['allow_failures'])) {\n $options['allow_failures'] = false;\n }\n\n $class = str_replace('_', ' ', $plugin);\n $class = ucwords($class);\n $class = 'PHPCI\\\\Plugin\\\\' . str_replace(' ', '', $class);\n\n if (!class_exists($class)) {\n $this->logFailure('Plugin does not exist: ' . $plugin);\n\n if ($stage == 'test') {\n $this->plugins[$plugin] = false;\n\n if (!$options['allow_failures']) {\n $this->success = false;\n }\n }\n\n continue;\n }\n\n try {\n $obj = new $class($this, $options);\n\n if (!$obj->execute()) {\n if ($stage == 'test') {\n $this->plugins[$plugin] = false;\n\n if (!$options['allow_failures']) {\n $this->success = false;\n }\n }\n\n $this->logFailure('PLUGIN STATUS: FAILED');\n continue;\n }\n } catch (\\Exception $ex) {\n $this->logFailure('EXCEPTION: ' . $ex->getMessage());\n\n if ($stage == 'test') {\n $this->plugins[$plugin] = false;\n\n if (!$options['allow_failures']) {\n $this->success = false;\n }\n }\n\n $this->logFailure('PLUGIN STATUS: FAILED');\n continue;\n }\n\n if ($stage == 'test') {\n $this->plugins[$plugin] = true;\n }\n\n $this->logSuccess('PLUGIN STATUS: SUCCESS!');\n }\n }", "title": "" }, { "docid": "b158d0208fe05afd15dbdd4f063d281c", "score": "0.5176733", "text": "protected function get_active_plugins()\n {\n }", "title": "" }, { "docid": "60b4247a34713f8e4969c1ef2b5cf254", "score": "0.5173385", "text": "public static function runAll()\n {\n static::checkSapiEnv();\n static::init();\n static::parseCommand();\n static::daemonize();\n static::initWorkers();\n static::installSignal();\n static::saveMasterPid();\n static::displayUI();\n static::forkWorkers();\n static::resetStd();\n static::monitorWorkers();\n }", "title": "" }, { "docid": "59a58cfc4dcaa7e8e8ae634ba89be6f5", "score": "0.51677626", "text": "public function waitForAllEvents();", "title": "" }, { "docid": "20a7d998eb04bd1ebdbf55acf21ec4fd", "score": "0.5152126", "text": "public function RunAll() {\n\t do {\n\t $status = curl_multi_exec($this->mh, $active);\n\t $info = curl_multi_info_read($this->mh);\n\t if (false !== $info) {\n\t //var_dump($info);\n\t $handler = $info['handle'];\n\t if ( false !== $key = array_search($handler,$this->ch) ) {\n\t if($this->curlObjs[$key] instanceof Curl) {\n\t $this->curlObjs[$key]->callback();\n\t }\n\t }\n\t }\n\t } while ($status === CURLM_CALL_MULTI_PERFORM || $active);\n\t}", "title": "" }, { "docid": "e19c4d66007f3d89cea31130993d048c", "score": "0.5147536", "text": "function SPT_common(){\n\tSPT_data_register();//\t\tRegister plugins to our database.\n\t\t_debugLog(__FUNCTION__.\" \" .$SPT_HOOKLIST);\n\tglobal $plugins, $SPT_HOOKLIST;\n\tforeach($SPT_HOOKLIST as $hook=>$loc){\n\t\t_debugLog(__FUNCTION__.\" \" .$SPT_HOOKLIST);\n\t\t$func_name = 'SPT_'.str_replace('-', '_', $hook);\n\t\t$file_name = 'small_plugin_toolkit.php';\n\t\t_debugLog(__FUNCTION__.\" \" .$hook);\n\t\tif($loc){\n\t\t\t$plugins[] = array(\n\t\t\t\t'hook' => $hook,\n\t\t\t\t'function' => $func_name,\n\t\t\t\t'args' => array(),\n\t\t\t\t'file' => $file_name,\n\t\t\t\t'line' => '47');\n\t\t\t// debugLog($plugins);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8877bf38ae90240f523004060d93dcbe", "score": "0.51428246", "text": "public function dispatchLoopShutdown()\r\n {\r\n foreach ($this->plugins as $plugin) {\r\n try {\r\n $plugin->dispatchLoopShutdown();\r\n } catch (Exception $e) {\r\n if (FrontController::getInstance()->throwExceptions()) {\r\n throw $e;\r\n } else {\r\n $this->response = $e;\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f5dd413a8f8a1244fd03be728eeb48ca", "score": "0.513427", "text": "private function pluginHooks()\n {\n if (!is_array($this->activated)) {\n return;\n }\n\n foreach ($this->activated as $plugin_file => $plugin_info) {\n do_action('activate_' . $plugin_file);\n }\n }", "title": "" }, { "docid": "bc8c3c16415e608d1bfe1e1832adf843", "score": "0.5122302", "text": "public function loadPlugins()\n {\n $this->checkCache();\n $this->validatePlugins();\n $this->countPlugins();\n\n array_map(static function () {\n include_once WPMU_PLUGIN_DIR . '/' . func_get_args()[0];\n }, array_keys($this->cache['plugins']));\n\n $this->pluginHooks();\n }", "title": "" }, { "docid": "02be6c606fcb734ba66b14d85e74acf0", "score": "0.5115417", "text": "function pluginload() {\n\tglobal $plugins, $userId, $flashRevision, $botlitever, $vWorldType;\n\t$plugins = array();\n\t$argv = @$GLOBALS['argv'];\n\tif (strlen($userId) == 0 && strlen(@$argv[2]) > 0) $userId = @$argv[2];\n\tif (strlen((@file_get_contents(F('worldtype.txt')))) == 0) $vWorldtype = 'farm';\n\t$dir = 'plugins/';\n\t$dh = opendir($dir);\n\twhile (false !== ($file = readdir($dh))) if (is_dir($dir . $file) && $file != '.' && $file != '..') $plugins[] = array('name' => $file, 'folder' => $dir . $file, 'main' => file_exists($dir . $file . '/main.php') ? $dir . $file . '/main.php' : '', 'hooks' => array());\n\tclosedir($dh);\n\tglobal $hooks, $this_plugin;\n\t// initialize plugins\n\tforeach ($plugins as $key => $plugin) {\n\t\tif ($plugin['main']) {\n\t\t\t// load plugin\n\t\t\tinclude($plugin['main']);\n\t\t\t// find init function\n\t\t\t$init_function = $plugin['name'] . '_init';\n\t\t\tif (function_exists($init_function)) {\n\t\t\t\t$hooks = array();\n\t\t\t\t$this_plugin = $plugin;\n\t\t\t\t// call init function\n\t\t\t\tcall_user_func($init_function);\n\t\t\t\tif (!(file_exists('notrun_plugin_' . $plugin['name'] . '.txt') || file_exists('notrun_plugin_' . $plugin['name'] . '_' . $userId . '.txt'))) $plugins[$key]['hooks'] = $hooks;\n\t\t\t}\n\t\t}\n\t}\n\tif (PX_VER_PARSER != PX_VER_SETTINGS) echo \"\\r\\n******\\r\\nERROR: PX's updated parser version (\" . PX_VER_PARSER . \") doesn't match settings version (\" . PX_VER_SETTINGS . \")\\r\\n******\\r\\n\";\n}", "title": "" }, { "docid": "4e7d4c0a8289738fdb6b50cda7eed144", "score": "0.5110195", "text": "public static function initInvalidateHooks() {\n $invalidateAll = function() {\n UserPluginCacheQuery::create()\n ->find()\n ->delete();\n };\n DatawrapperHooks::register(DatawrapperHooks::PLUGIN_INSTALLED, $invalidateAll);\n DatawrapperHooks::register(DatawrapperHooks::PLUGIN_UNINSTALLED, $invalidateAll);\n DatawrapperHooks::register(DatawrapperHooks::PLUGIN_SET_PRIVATE, $invalidateAll);\n\n // clear cache for single user\n $invalidateUser = function($orgOrProduct, User $user) {\n UserPluginCacheQuery::create()\n ->findByUserId($user->getId())\n ->delete();\n };\n DatawrapperHooks::register(DatawrapperHooks::USER_ORGANIZATION_ADD, $invalidateUser);\n DatawrapperHooks::register(DatawrapperHooks::USER_ORGANIZATION_REMOVE, $invalidateUser);\n DatawrapperHooks::register(DatawrapperHooks::PRODUCT_USER_ADD, $invalidateUser);\n DatawrapperHooks::register(DatawrapperHooks::PRODUCT_USER_REMOVE, $invalidateUser);\n\n // clear cache for all users in an organization\n $invalidateOrg = function(Product $product, Organization $org) {\n UserPluginCacheQuery::create()\n ->filterByUser($org->getActiveUsers())\n ->delete();\n };\n DatawrapperHooks::register(DatawrapperHooks::PRODUCT_ORGANIZATION_ADD, $invalidateOrg);\n DatawrapperHooks::register(DatawrapperHooks::PRODUCT_ORGANIZATION_REMOVE, $invalidateOrg);\n\n // clear cache for all users with access to a product\n $invalidateProduct = function(Product $product, Plugin $plugin) {\n $query = UserPluginCacheQuery::create();\n foreach ($product->getOrganizations() as $org) {\n $query = $query->filterByUser($org->getActiveUsers())->_or();\n }\n $query->filterByUser($product->getUsers())->delete();\n };\n DatawrapperHooks::register(DatawrapperHooks::PRODUCT_PLUGIN_ADD, $invalidateProduct);\n DatawrapperHooks::register(DatawrapperHooks::PRODUCT_PLUGIN_REMOVE, $invalidateProduct);\n\n }", "title": "" }, { "docid": "4260a225d37965d92ffcbc1560f1dcad", "score": "0.508679", "text": "public function autoLoadPlugins($plugins, PluginHandler $pHandler)\n {\n //First attempt to load plugins\n $recheck = $this->loadPlugins($plugins, $pHandler);\n\n // New attempts to load plugins. If the list of plugins that needs checking don't change\n // it means we can't resolve the remaining dependencies.\n do {\n $lastSize = sizeof($recheck);\n $recheck = $this->loadPlugins($plugins, $pHandler);\n } while (!empty($recheck) && $lastSize != sizeof($recheck));\n\n foreach ($plugins as $pname) {\n $pHandler->ready($pname);\n }\n\n //If all plugins couldn't be loaded\n if (!empty($recheck)) {\n $this->eXpChatSendServerMessage(\n \"couldn't Autoload all required plugins, see console log for more details.\"\n );\n $this->console(\n \"Not all required plugins were loaded, \"\n . \"due to unmet dependencies or errors. list of not loaded plugins: \"\n );\n foreach ($recheck as $pname) {\n $this->console($pname);\n $this->connection->chatSendServerMessage('Starting ' . $pname . '........$f00 Failure');\n }\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "4b76f744b64109685b97c039ee89876e", "score": "0.5081439", "text": "function _activate_must_use_plugins(){\n global $wp_cluster;\n if( isset( $wp_cluster->vertical_config[ 'plugins' ][ 'mustuse' ] ) && is_array( $wp_cluster->vertical_config[ 'plugins' ][ 'mustuse' ] ) ){\n /** Ok, so we're going to first go through the vertical, and bring in the MU plugins */\n foreach( $wp_cluster->vertical_config[ 'plugins' ][ 'mustuse' ] as $plugin ){\n list( $name, $version ) = explode( '/', $plugin );\n /** Make sure we haven't already loaded the plugin */\n if( isset( $this->plugins_loaded[ $name ] ) ){\n continue;\n }\n /** Ok, now go through each of the directories and see if we need to load them */\n foreach( $this->plugin_directories as $directory ){\n $file = WP_BASE_DIR . '/' . $directory . '/' . $name . '/' . $version . '/' . $name . '.php';\n if( is_file( $file ) ){\n /** Bring it in */\n include_once( $file );\n /** Add it to our loaded plugins */\n $this->plugins_loaded[ $name ] = $file;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "e49fd0171a230e3669f721647aaba3ed", "score": "0.505258", "text": "protected function _initializePlugins()\n {\n \tforeach($this->_plugins as $plugin) {\n \t\t$plugin->initialize($this);\n \t}\n }", "title": "" }, { "docid": "876ee243bed5326e47088dbf75d9ee74", "score": "0.5029488", "text": "public static function refreshLoadedPlugins(): void\n {\n wp_cache_flush();\n self::$loadedPlugins = [];\n self::loadPluginList();\n }", "title": "" }, { "docid": "4b98ffb831bde9f9ca96a86fa1ad6f9b", "score": "0.50202", "text": "protected function findAvailablePlugins()\n {\n /**\n * @var Config $config\n */\n $config = Config::getInstance();\n\n foreach ($config->pluginPaths as $path => $depth) {\n $this->findAvailablePluginsInPath($path, $depth);\n }\n }", "title": "" }, { "docid": "cde6d83de4f12511fb62681369359775", "score": "0.50037485", "text": "function _refreshSmarty()\n {\n $smarty =& $this->smarty;\n # Load plugins.\n $load = array();\n foreach ($this->config['lib'] as $dir) {\n if (in_array($dir, $smarty->plugins_dir)) continue;\n array_unshift($smarty->plugins_dir, $dir);\n $d = glob(\"$dir/*filter.*\");\n if (!$d) continue;\n foreach ($d as $f) {\n if (!preg_match('/^(.*)filter\\.(.*?)\\./', basename($f), $p)) continue;\n $load[$p[2]] = $p[1];\n }\n }\n foreach ($load as $name=>$type) {\n $smarty->load_filter($type, $name);\n }\n }", "title": "" }, { "docid": "20ae1a878706d2c723d962eff6f3ca0c", "score": "0.499795", "text": "function runCS($schedule='MANUAL',$order_id=0, $invoice_no=0, $orphan_order_id=0)\n {\n $result = array();\n if(is_numeric($schedule))\n {\n $cs = $this->custom_scripts->find(array(\"WHERE `id`='\".$this->utils->quoteSmart($schedule).\"'\"));\n }\n else\n {\n $cs = $this->custom_scripts->find(array(\"WHERE `run_schedule`='\".$this->utils->quoteSmart($schedule).\"'\"));\n }\n if(count($cs))\n {\n $data_array1 = array();\n $data_array2 = array();\n $data_array3 = array();\n\n if(!empty($order_id))\n {\n $data_array1 = $this->mailWelcome($order_id,true);\n }\n if(!empty($invoice_no))\n {\n $data_array2 = $this->invoices->mailInvoice($invoice_no,false,true);\n }\n if(!empty($orphan_order_id))\n {\n $orphanOrders = $this->orphan_orders();\n for ($i= 0; $i < count($orphanOrders); $i++)\n {\n $temp = $orphanOrders[$i];\n if ($temp['temp_id'] == $orphan_order_id)\n {\n $data_array3 = $temp;\n }\n }\n }\n foreach($cs as $k=>$c)\n {\n $plugin_file = $c['file_name'];\n if(is_readable($plugin_file))\n {\n $_ALP = array();\n $str = str_replace(\"<&&>\",\"|\",isset($cs['post_variables'])?$cs['post_variables']:\"\");\n $str = str_replace(\" \",\"\",$str );\n $str = str_replace(\"||\",\"|\",$str);\n $post_vars = $this->utils->Get_Trimmed_Array(explode(\"|\",$str));\n foreach($post_vars as $v)\n {\n if(array_key_exists($v,$data_array3))$_ALP[$v] = $data_array3[$v];\n if(array_key_exists($v,$data_array2))$_ALP[$v] = $data_array2[$v];\n if(array_key_exists($v,$data_array1))$_ALP[$v] = $data_array1[$v];\n }\n ob_start();\n require_once $plugin_file;\n $result[$k] = ob_get_contents();\n ob_end_clean();\n $this->ALPmail->AddAddress($this->conf['comp_email'], $this->conf['company_name']);\n $this->ALPmail->Subject = $plugin_file.\" ==> \".date('d-M-Y H:i:s');\n $this->ALPmail->Body = $result[$k];\n $this->ALPmail->sendMail();\n }\n }\n }\n return $result;\n }", "title": "" }, { "docid": "401b86c5423b3d886677a4974844b0e7", "score": "0.49964234", "text": "function loadAllPlugins()\n{\n $pluginSet = array();\n /*Loads all plugins, does basic PHP check to ensure that there are no fatal PHP errors.*/\n if ($handle = opendir('plugins')) {\n /* This is the correct way to loop over the directory. */\n while (false !== ($entry = readdir($handle))) {\n $plugin = loadPlugin($entry);\n if ($plugin != null) {\n $pluginSet[] = $plugin;\n }\n }\n closedir($handle);\n }\n return $pluginSet;\n}", "title": "" }, { "docid": "a9deb53eeb31640890750c0773b299f7", "score": "0.4995969", "text": "public function wp_cron_task() {\r\n\t\t$forms = GFFormsModel::get_forms( true );\r\n\t\tforeach ( $forms as $form ) {\r\n\t\t\t$form_id = $form->id;\r\n\t\t\t$form_meta = $this->get_form_meta( $form_id );\r\n\t\t\t$poll_fields = GFAPI::get_fields_by_type( $form_meta, array( 'poll' ) );\r\n\t\t\tif ( empty ( $poll_fields ) )\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t$data_tmp = GFCache::get( 'gpoll_data_tmp_' . $form_id );\r\n\t\t\tif ( false === $data_tmp ) {\r\n\t\t\t\t$data = GFCache::get( 'gpoll_data_' . $form_id );\r\n\t\t\t\tif ( false == $data || rgar( $data, 'incomplete' ) || false === isset( $data['execution_time'] ) || rgar( $data, 'expired' ) ) {\r\n\t\t\t\t\t$data = $this->gpoll_get_data( $form_id );\r\n\t\t\t\t\t$this->maybe_continue_cache_rebuild( $data, $form_id );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$data = $this->gpoll_get_data( $form_id, $data_tmp );\r\n\t\t\t\t$this->maybe_continue_cache_rebuild( $data, $form_id );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "11f617fdd81f1b32c425113b67909a3c", "score": "0.49872988", "text": "function frame_automatic_get_plugins()\n{\n $plugins_config = TGM_Plugin_Activation::get_instance();\n $plugins_config = !empty($plugins_config->plugins) ? $plugins_config->plugins : array();\n $plugins = array();\n\n foreach ($plugins_config as $slug => $plugin)\n if (!empty($plugin['auto_install']))\n $plugins[] = $slug;\n\n return $plugins;\n}", "title": "" }, { "docid": "a45151712a40b82ebd031ec968df2bcf", "score": "0.49834162", "text": "public function synchronize()\n {\n // Loop through all plugins in database and disable a plugin when it does not exists in filesystem.\n $plugins = Plugin::repository()->findAll();\n\n /** @var Plugin $plugin */\n foreach ($plugins as $plugin)\n {\n if (!$this->exists($plugin->namespace, $plugin->name))\n {\n $plugin->delete();\n }\n }\n\n // Loop through all plugins in filesystem and write/update it in database.\n $plugins = [];\n\n foreach ($this->namespaces as $namespace)\n {\n $iterator = new \\IteratorIterator(new \\DirectoryIterator($this->getPluginDirectory($namespace)));\n\n /**\n * @var integer $key\n * @var \\DirectoryIterator $file\n */\n foreach ($iterator as $key => $file)\n {\n if ($file->isDot() || $file->isFile())\n {\n continue; // Skip \".\" and \"..\" and normal files.\n }\n\n $name = $file->getBasename();\n $model = $this->getModel($name);\n\n if (!($model instanceof Plugin))\n {\n $model = new Plugin();\n $model->active = 0;\n $model->namespace = $namespace;\n $model->name = $name;\n $model->created = date('Y-m-d H:i:s');\n $model->changed = date('Y-m-d H:i:s');\n }\n\n $instance = $this->loadInstance($model->namespace, $model->name, $model);\n $info = $instance->getInfo();\n\n $model->label = $info->getLabel();\n $model->description = $info->getDescription();\n $model->author = $info->getAuthor();\n $model->website = $info->getWebsite();\n $model->email = $info->getEmail();\n\n // Do not update the model version every time for future updates.\n // Update plugin version when plugin is not installed.\n if (empty($model->version) || $model->active == 0)\n {\n $model->version = $info->getVersion();\n }\n\n $model->save();\n\n $this->dependencyManager->update($instance);\n }\n }\n\n return $plugins;\n }", "title": "" }, { "docid": "9b5b9c5ed9e408932c1c18b73e2067b9", "score": "0.49760324", "text": "public function actionRunTasks()\n {\n // this time is passed to scheduled tasks\n // and all tasks should base schedule satisfaction\n // on this time\n $taskTime = date_create();\n $this->stdout(\"Executing scheduled tasks...\\n\", true, true);\n foreach ($this->tasks as $scheduledTask)\n {\n try\n {\n if ($scheduledTask->execute($taskTime, $this->force))\n {\n $this->stdout(\"{$scheduledTask}: Task executed.\\n\", true, true);\n }\n }\n catch (TerminateScheduleException $tse)\n {\n // this is the only schedule exception, that will terminate the scheduler\n $this->stderr(\"SCHEDULER TERMINATED: {$scheduledTask}: {$tse->getMessage()}\\n\");\n break;\n }\n catch (Exception $ex)\n {\n $this->stderr(\"ERROR: {$scheduledTask}: {$ex->getMessage()}\\n\");\n }\n }\n $this->stdout(\"Scheduled tasks completed.\\n\", true, true);\n }", "title": "" }, { "docid": "f2c55bf8b406bc2a82ad4873077211ba", "score": "0.4962863", "text": "function installPlugins()\n{\n outputString(PHP_EOL.'Installing plugins', Console::FG_YELLOW);\n $installPluginCmd = './craft install/plugin ';\n foreach (INSTALL_PLUGINS as $pluginHandle) {\n outputString('- installing plugin '.$pluginHandle);\n executeShellCommand($installPluginCmd . $pluginHandle);\n }\n}", "title": "" }, { "docid": "6970ccea1603d3e2917b6d6f4ee7027a", "score": "0.4956633", "text": "private function runHooks(ZabbixAgent $a)\n {\n\n $s = array(\n 'agent'=>$a\n );\n\n add_action(\"shutdown\",\n function () use ($s) {\n $a=$s['agent'];\n try{\n $optionsStored=false;\n if($conf=get_option( 'ZBXT_activeConfiguration' )) {\n $a->setServerActiveConfiguration(json_decode($conf, true));\n $optionsStored=true;\n }\n $a->checkForActiveChecksUpdates();\n $a->processActiveChecks();\n $a->sendActiveChecksResults();\n if($optionsStored)\n {\n update_option('ZBXT_activeConfiguration',\n json_encode($a->getServerActiveConfiguration()));\n }\n else\n {\n add_option(\"ZBXT_activeConfiguration\",\n json_encode($a->getServerActiveConfiguration()));\n }\n } catch (Exception $e)\n {\n //TODO walkaround\n }\n },99999999999\n );\n return;\n $s=$this->ZBXT_getSettings();\n if($s['enabled'])\n {\n add_action(\"shutdown\",\n function () use ($s) {\n $args = Array(\n 'host' => $s['trap_server'],\n 'community' => $s['community'],\n 'port' => $s['port']\n );\n if ($s['data']['sendKeepalive']['enabled'])//wp_before_admin_bar_render\n {\n $args['payload'] = array(\n 'oid' => $s['data']['sendKeepalive']['oid'],\n 'value' => '1',\n 'type' => 's'\n );\n $vars[] = $args['payload'];\n //SNMP::trap($args['host'], $vars, $args['community']);\n\n }\n if ($s['data']['pageGenTime']['enabled'])//wp_before_admin_bar_render\n {\n global $timestart;\n $args['payload'] = array(\n 'oid' => $s['data']['pageGenTime']['oid'],\n 'value' => '1,111',//(''.(microtime( true ) - $timestart).''),\n 'type' => 's'\n );\n $vars[] = $args['payload'];\n //SNMP::trap($args['host'], $vars, $args['community'],\"default\",$args['port']);\n\n }\n\n //remove_action(\"shutdown\");\n });\n }\n }", "title": "" }, { "docid": "d78c66355852b310492e9e340fce91ef", "score": "0.49404663", "text": "public function check_cron() {\n\t\t// compliance acitve only\n\t\tif ( Cookie_Notice()->get_status() === 'active' ) {\n\t\t\tif ( ! wp_next_scheduled( 'cookie_notice_get_app_analytics' ) ) {\n\t\t\t\t// set schedule\n\t\t\t\twp_schedule_event( time(), 'hourly', 'cookie_notice_get_app_analytics' );\n\t\t\t}\n\t\t\tif ( ! wp_next_scheduled( 'cookie_notice_get_app_config' ) ) {\n\t\t\t\t// set schedule\n\t\t\t\twp_schedule_event( time(), 'daily', 'cookie_notice_get_app_config' );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( wp_next_scheduled( 'cookie_notice_get_app_analytics' ) )\n\t\t\t\twp_clear_scheduled_hook( 'cookie_notice_get_app_analytics' );\n\t\t\t\n\t\t\tif ( wp_next_scheduled( 'cookie_notice_get_app_config' ) )\n\t\t\t\twp_clear_scheduled_hook( 'cookie_notice_get_app_config' );\n\t\t}\n\t}", "title": "" }, { "docid": "146a4554364c23e6e85569d0b5c117cc", "score": "0.49400622", "text": "public function processAll() {\n throw new \\Exception(\"Queuing system has been disabled\"); \n return;\n // END ZAI-224\n \n while($job = self::getNewJob('default')) {\n $job->run();\n }\n }", "title": "" }, { "docid": "f62e3df491acb43259ab6f3ff0e33b05", "score": "0.4936692", "text": "function paused_plugins_notice() {}", "title": "" }, { "docid": "e305cc8f7028c07c72e3ccbe2cf408f6", "score": "0.49346286", "text": "protected function get_detected_plugins()\n {\n }", "title": "" }, { "docid": "5fcf85f3df6363b869b0d7e2e0ff2809", "score": "0.49297208", "text": "protected function get_installed_plugins() {}", "title": "" }, { "docid": "3dc794064aa84c6b151501aa200353ae", "score": "0.49096274", "text": "public static function daemon() {\n\t\t$starttime = microtime (true);\n\t\tlog::add('wes','debug','cron start');\n\t\tforeach (self::byType('wes') as $eqLogic) {\n\t\t\t$eqLogic->pull();\n\t\t}\n\t\tlog::add('wes','debug','cron stop');\n\t\t$endtime = microtime (true);\n\t\tif ( $endtime - $starttime < config::byKey('temporisation_lecture', 'wes', 60, true) )\n\t\t{\n\t\t\tusleep(floor((config::byKey('temporisation_lecture', 'wes') + $starttime - $endtime)*1000000));\n\t\t}\n\t}", "title": "" }, { "docid": "a2c7b0f50d42908672e4d2dbf455a22a", "score": "0.49085575", "text": "private function load_dependencies() {\n\n /**\n * The class responsible for defining options functionality\n * of the plugin.\n */\n if (!class_exists('Careerfy_framework')) {\n $check_dt7_theme = wp_get_theme('dt-the7');\n $check_nanosoft_theme = wp_get_theme('nanosoft');\n $check_theme_2121 = wp_get_theme('theme2121');\n if (!class_exists('TGM_Plugin_Activation') && !$check_dt7_theme->exists() && !$check_nanosoft_theme->exists() && !$check_theme_2121->exists()) {\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-tgm-plugin-activation.php';\n }\n include plugin_dir_path(dirname(__FILE__)) . 'envato_setup/envato_setup.php';\n include plugin_dir_path(dirname(__FILE__)) . 'envato_setup/envato_setup_init.php';\n }\n\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-location-check.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/json/currencies.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/class-form-fields.php';\n \n // common functions file\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/class-fix-image-rotation.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/common-functions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-wc-subscriptions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/job-functions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/employer-functions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/candidate-functions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/candidate-portfolio-functions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/woocommerce-addon-helper.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/applicants-functions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/email-applicants.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/external-applicants.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/members-limitations.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/candidate-restrictions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/job-desc-templates.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/dashboard-notifications.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-job-applicants-filters.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions/emp-dash-jobmanage-applicants.php';\n\n include plugin_dir_path(dirname(__FILE__)) . 'includes/jobsearch-end-jsfile.php';\n // employer all applicants class\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-employer-all-applicants.php';\n // employer email applicants class\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-employer-email-applicants.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-employer-external-applicants.php';\n // user dashboard links\n include plugin_dir_path(dirname(__FILE__)) . 'includes/user-account-links.php';\n // visual composer files\n include plugin_dir_path(dirname(__FILE__)) . 'includes/vc-support/vc-actions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/vc-support/vc-shortcodes.php';\n\n // Dashboard\n include plugin_dir_path(dirname(__FILE__)) . 'templates/user-dashboard/user-dashboard-sidebar.php';\n // Templates\n include plugin_dir_path(dirname(__FILE__)) . 'includes/class-page-templates.php';\n // User Dashboard Functions\n include plugin_dir_path(dirname(__FILE__)) . 'includes/class-user-dashboard.php';\n // User job Functions\n include plugin_dir_path(dirname(__FILE__)) . 'includes/class-user-jobs.php';\n // User admin files\n include plugin_dir_path(dirname(__FILE__)) . 'admin/user/user-custom-fields.php';\n // custom rss feeds\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/rss/class-job-rss-feed.php';\n //\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-apply-job-questions.php';\n // delete user profile data class\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-user-delete-data.php';\n // twitter oauth\n include plugin_dir_path(dirname(__FILE__)) . 'includes/twitter-tweets/twitteroauth.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-email.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-job-top-filters.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-job-filters.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-employer-filters.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-employer-top-filters.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-candidate-filters.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-candidate-top-filters.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-package-expires-email.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-job-submitted-admin.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-job-submitted-admin.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-job-approved-to-employer.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-candidate-message-employer.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-job-update-to-employer.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-job-expire-to-employer.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-new-user-register.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-new-user-register-to-admin.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-new-candidate-approval.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-new-employer-approval.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-reset-password-request.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-user-password-change.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-user-shortlist-to-candidate.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-user-shortlist-to-employer.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-user-shortlist-for-interview.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-user-rejected-for-interview.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-job-applied-to-employer.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-job-applied-to-candidate.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-instamatch-mail-by-employer.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-instamatch-mail-at-jobpost.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-profile-approved-to-candidate.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-profile-approved-to-employer.php';\n //\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-jobs-package-expire-alert.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-fjobs-package-expire-alert.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-cvs-package-expire-alert.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-candidates-package-expire-alert.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-promprofile-package-expire-alert.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-urgent-package-expire-alert.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-candprofile-package-expire-alert.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-empprofile-package-expire-alert.php';\n //\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-employer-contact-form.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/email-templates/class-candidate-contact-form.php';\n \n // elementor widgets\n include plugin_dir_path(dirname(__FILE__)) . 'includes/class-elementor-init.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/class-elementor-candidate.php';\n \n // embeddable jobs\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-jobs-embeddable.php';\n // redux frameworks extensions\n include plugin_dir_path(dirname(__FILE__)) . 'admin/redux-ext/loader.php';\n // location modules Counts Update\n include plugin_dir_path(dirname(__FILE__)) . 'modules/locations/include/register-counts-update.php';\n // packages modules\n include plugin_dir_path(dirname(__FILE__)) . 'modules/packages/packages.php';\n // shortlist modules\n include plugin_dir_path(dirname(__FILE__)) . 'modules/shortlist/shortlist.php';\n // job application modules\n include plugin_dir_path(dirname(__FILE__)) . 'modules/job-application/job-application.php';\n // email template modules\n include plugin_dir_path(dirname(__FILE__)) . 'modules/email-templates/email-templates.php';\n// // location modules\n include plugin_dir_path(dirname(__FILE__)) . 'modules/locations/locations.php';\n // login register modules\n include plugin_dir_path(dirname(__FILE__)) . 'modules/login-registration/login-registration.php';\n // social login module\n include plugin_dir_path(dirname(__FILE__)) . 'modules/social-login/social-login.php';\n // woocommerce checkout\n include plugin_dir_path(dirname(__FILE__)) . 'modules/woocommerce-checkout/woocommerce-checkout.php';\n //custom fields module\n include plugin_dir_path(dirname(__FILE__)) . 'modules/custom-fields/custom-fields.php';\n //reviews module\n include plugin_dir_path(dirname(__FILE__)) . 'modules/reviews/reviews.php';\n //multiple post thumbnails module\n include plugin_dir_path(dirname(__FILE__)) . 'modules/multi-featured-thumbnails/multi-featured-thumbnails.php';\n //job alerts\n include plugin_dir_path(dirname(__FILE__)) . 'modules/job-alerts/job-alerts.php';\n //import locations\n include plugin_dir_path(dirname(__FILE__)) . 'modules/import-locations/import-locations.php';\n\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-job-import-integrations.php';\n include plugin_dir_path(dirname(__FILE__)) . 'modules/indeed-jobs-import/indeed-jobs.php';\n include plugin_dir_path(dirname(__FILE__)) . 'modules/ziprecruiter-integration/ziprecruiter-jobs.php';\n include plugin_dir_path(dirname(__FILE__)) . 'modules/careerjet-integration/careerjet-jobs.php';\n include plugin_dir_path(dirname(__FILE__)) . 'modules/careerbuilder-integration/careerbuilder-jobs.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/classes/class-job-import-cron.php';\n\n //ads management\n include plugin_dir_path(dirname(__FILE__)) . 'modules/ads-management/ads-management.php';\n //redux frameworks files\n include plugin_dir_path(dirname(__FILE__)) . 'admin/ReduxFramework/class-redux-framework-plugin.php';\n include plugin_dir_path(dirname(__FILE__)) . 'admin/ReduxFramework/jobsearch-options/options-config.php';\n //shortcode builder\n include plugin_dir_path(dirname(__FILE__)) . 'includes/shortcode-builder/shortcodes-builder.php';\n }", "title": "" }, { "docid": "17006e3149ddf62bcae3a35eaae0945d", "score": "0.49075326", "text": "function executeActions() {\n\t\t// In case task does not implement it.\n\t\tfatalError(\"ScheduledTask does not implement executeActions()!\\n\");\n\t}", "title": "" }, { "docid": "d91710e588eeec567d43be53f61ff111", "score": "0.48986986", "text": "protected function get_installed_plugins()\n {\n }", "title": "" }, { "docid": "3c8db63fc48aa4ceac9fe2e20e6f5c88", "score": "0.48930767", "text": "public function runDeferredActions()\n {\n $actions = $this->getDeferredActions(true);\n foreach ($actions as $action_id => $action)\n {\n do_action(self::$PLUGIN_SLUG . '/activation/execute-deferred-action?action_id=' . $action_id);\n }\n self::resetDeferredActions();\n\n do_action(self::$PLUGIN_SLUG . '/activation/after-deferred-actions');\n }", "title": "" }, { "docid": "fac1a1882858af8d579541fce7662863", "score": "0.4877456", "text": "function wp_doing_cron() {}", "title": "" }, { "docid": "1692e0245f25f1379dec6d170bbad450", "score": "0.48749122", "text": "public static function auto_cache_engine ()\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdo_action (\"ws_plugin__qcache_before_auto_cache_engine\", get_defined_vars ());\r\n\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\tif ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"c\"][\"configured\"] && $GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"enabled\"])\r\n\t\t\t\t\t\t\tif ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_enabled\"] && $GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_agent\"])\r\n\t\t\t\t\t\t\t\tif ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_sitemap_url\"] || $GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_additional_urls\"])\r\n\t\t\t\t\t\t\t\t\tif ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"expiration\"] >= 3600)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$log = \"\"; /* Initialize log to an empty string value here. */\r\n\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\tclearstatcache () . define (\"QUICK_CACHE_ALLOWED\", false); /* Cache NOT allowed here. */\r\n\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t@set_time_limit(900) . @ini_set (\"memory_limit\", apply_filters (\"admin_memory_limit\", WP_MAX_MEMORY_LIMIT)) . @ignore_user_abort (true);\r\n\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\tdo_action (\"ws_plugin__qcache_before_auto_cache_engine_routines\", get_defined_vars ());\r\n\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"use_flock_or_sem\"] === \"sem\" && function_exists (\"sem_get\") && ($mutex = @sem_get (1977, 1, 0644 | IPC_CREAT, 1)) && @sem_acquire ($mutex))\r\n\t\t\t\t\t\t\t\t\t\t\t\t$mutex_method = \"sem\"; /* Recommended locking method. */\r\n\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\telse if ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"use_flock_or_sem\"] === \"flock\" && ($mutex = @fopen (WP_CONTENT_DIR . \"/cache/qc-l-ac.mutex.lock\", \"w\")) && @flock ($mutex, LOCK_EX))\r\n\t\t\t\t\t\t\t\t\t\t\t\t$mutex_method = \"flock\";\r\n\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\tif ($mutex && $mutex_method && is_array ($urls = array ())) /* Initializes the array of URLs. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\teval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdo_action (\"ws_plugin__qcache_during_auto_cache_engine_before\", get_defined_vars ());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tunset ($__refs, $__v); /* Unset defined __refs, __v. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_sitemap_url\"]) /* Sitemap. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($sitemap = c_ws_plugin__qcache_utils_urls::remote ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_sitemap_url\"]))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpreg_match_all (\"/\\<loc\\>(.+?)\\<\\/loc\\>/i\", $sitemap, $sitemap_matches);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_array ($sitemap_matches[1]) && !empty ($sitemap_matches[1]))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($sitemap_matches[1] as $sitemap_match)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($url = trim ($sitemap_match))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$urls[] = $url;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_additional_urls\"]) /* Additional URLs entered manually. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach (preg_split (\"/[\\r\\n\\t]+/\", $GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_additional_urls\"]) as $additional)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($url = trim ($additional))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$urls[] = $url;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\teval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdo_action (\"ws_plugin__qcache_during_auto_cache_engine_before_urls\", get_defined_vars ());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tunset ($__refs, $__v); /* Unset defined __refs, __v. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (($urls = array_unique ($urls)) && !empty ($urls) && shuffle ($urls))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($urls as $url) /* Go through URLs now, and attempt to visit each of them; forcing an auto cache. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_array ($parse = c_ws_plugin__qcache_utils_urls::parse_url ($url)) && ($host_uri = preg_replace (\"/^http(s?)\\:\\/\\//i\", \"\", $url)))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$host_uri = preg_replace (\"/^(\" . preg_quote ($parse[\"host\"], \"/\") . \")(\\:[0-9]+)(\\/)/i\", \"$1$3\", $host_uri);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlist ($cache) = (array)glob (WP_CONTENT_DIR . \"/cache/qc-c-*-\" . md5 ($host_uri) . \"-*\"); /* Match md5_2. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!$cache || filemtime ($cache) < strtotime (\"-\" . $GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"expiration\"] . \" seconds\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tc_ws_plugin__qcache_utils_urls::remote ($url, false, array (\"timeout\" => 0.01, \"blocking\" => false, \"user-agent\" => $GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_agent\"] . \" + Quick Cache ( Auto-Cache Engine )\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$log .= date (\"M j, Y, g:i a T\") . \" / Auto-Cached: \" . $url . \"\\n\"; /* Keeps a running log of each URL being processed. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (($processed = (int)$processed + 1) >= $GLOBALS[\"WS_PLUGIN__\"][\"qcache\"][\"o\"][\"auto_cache_max_processes\"])\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if ($processed >= 25) /* Hard-coded maximum; for security. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\teval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdo_action (\"ws_plugin__qcache_during_auto_cache_engine_before_log\", get_defined_vars ());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tunset ($__refs, $__v); /* Unset defined __refs, __v. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($log && (is_dir (WP_CONTENT_DIR . \"/cache\") || is_writable (WP_CONTENT_DIR)))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!is_dir (WP_CONTENT_DIR . \"/cache\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmkdir (WP_CONTENT_DIR . \"/cache\", 0777, true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearstatcache (); /* Clear stat cache before next routine. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_dir (WP_CONTENT_DIR . \"/cache\") && is_writable (WP_CONTENT_DIR . \"/cache\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$auto_cache_log = WP_CONTENT_DIR . \"/cache/qc-l-auto-cache.log\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (file_exists ($auto_cache_log) && filesize ($auto_cache_log) > 2097152)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_writable ($auto_cache_log)) /* This is a 2MB log rotation ^. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tunlink($auto_cache_log); /* Resets the log. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearstatcache (); /* Clear stat cache before next routine. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!file_exists ($auto_cache_log) || is_writable ($auto_cache_log))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfile_put_contents ($auto_cache_log, $log, FILE_APPEND);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($mutex_method === \"sem\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsem_release($mutex);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telse if ($mutex_method === \"flock\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tflock ($mutex, LOCK_UN);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdo_action (\"ws_plugin__qcache_during_auto_cache_engine_after\", get_defined_vars ());\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\t\t\t\t\t\tdo_action (\"ws_plugin__qcache_during_auto_cache_engine\", get_defined_vars ());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\tdo_action (\"ws_plugin__qcache_after_auto_cache_engine\", get_defined_vars ());\r\n\t\t\t\t\t\t/**/\r\n\t\t\t\t\t\treturn; /* Return for uniformity. */\r\n\t\t\t\t\t}", "title": "" }, { "docid": "95fb3f42b830b5330bf9938d6d32c71d", "score": "0.48732662", "text": "public function calculate_translation_upgrades( $force = false ) {\r\n\t\t$available_translation = wp_get_installed_translations( 'plugins' );\r\n\t\t$projects = array();\r\n\t\t$translation_needed = array();\r\n\t\t$locale = WPMUDEV_Dashboard::$site->get_option( 'translation_locale' );\r\n\t\t$auto_update = WPMUDEV_Dashboard::$site->get_option( 'enable_auto_translation' );\r\n\t\t$update_available = WPMUDEV_Dashboard::$site->get_option( 'translation_updates_available' );\r\n\t\t$translations = $this->get_project_locale_translations( $locale, $force );\r\n\r\n\t\t// set api base.\r\n\t\t$api_base = $this->server_root . $this->rest_api_translation;\r\n\r\n\t\t// cache\r\n\t\tif ( ! $force && ! empty( $update_available ) ) {\r\n\t\t\treturn $update_available;\r\n\t\t}\r\n\r\n\t\tif ( $translations ) {\r\n\t\t\t// sort installed plugins\r\n\t\t\tforeach ( $translations as $key => $value ) {\r\n\t\t\t\t$project = WPMUDEV_Dashboard::$site->get_project_info( $value['dev_project_id'] );\r\n\t\t\t\tif ( $project->is_installed ) {\r\n\t\t\t\t\t$value['translation_slug'] = $value['slug'];\r\n\t\t\t\t\t$value['version'] = $project->version_installed;\r\n\t\t\t\t\t$value['name'] = $project->name;\r\n\t\t\t\t\t$projects[] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// check if translation is not installed and if is installed check if is available.\r\n\t\tforeach ( $projects as $key => $updates ) {\r\n\r\n\t\t\tif (\r\n\t\t\t\t! array_key_exists( $updates['translation_slug'], $available_translation ) ||\r\n\t\t\t\t! array_key_exists( $locale, $available_translation[ $updates['translation_slug'] ] ) ||\r\n\t\t\t\t\t(\r\n\t\t\t\t\t\tarray_key_exists( $updates['translation_slug'], $available_translation ) &&\r\n\t\t\t\t\t\tarray_key_exists( $locale, $available_translation[ $updates['translation_slug'] ] ) &&\r\n\t\t\t\t\t\tstrtotime( $available_translation[ $updates['translation_slug'] ][ $locale ]['PO-Revision-Date'] ) < strtotime( $updates['sets'][0]['last_modified_utc'] )\r\n\t\t\t\t\t)\r\n\t\t\t\t) {\r\n\r\n\t\t\t\t// package url\r\n\t\t\t\t$package = $this->rest_url_auth( $updates['sets'][0]['download_url'] );\r\n\t\t\t\t$package = add_query_arg(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'format' => 'pomo_zip',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t$package\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$translation_needed[] = array(\r\n\t\t\t\t\t'type' => 'plugin',\r\n\t\t\t\t\t'slug' => $updates['translation_slug'],\r\n\t\t\t\t\t'language' => $locale,\r\n\t\t\t\t\t'version' => $updates['version'],\r\n\t\t\t\t\t'updated' => $updates['sets'][0]['last_modified_utc'],\r\n\t\t\t\t\t'package' => $package,\r\n\t\t\t\t\t'autoupdate' => (bool) $auto_update,\r\n\t\t\t\t\t'name' => $updates['name'],\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tWPMUDEV_Dashboard::$site->set_option( 'translation_updates_available', $translation_needed );\r\n\t\treturn $translation_needed;\r\n\t}", "title": "" }, { "docid": "798500227faad300afdda3cf2412d309", "score": "0.4870826", "text": "private function get_plugins() {\n\t\t\tif ( ! function_exists('get_plugins') && is_readable(ABSPATH . 'wp-admin/includes/plugin.php') ) {\n\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\t\t\t}\n\t\t\t$plugins = get_plugins();\n\t\t\tif ( empty($plugins) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\t\t\t$plugins = array_keys($plugins);\n\t\t\t$plugins_func = function ( $str ) {\n\t\t\t\tlist($folder, $file) = explode('/', $str, 2);\n\t\t\t\treturn $folder;\n\t\t\t};\n\t\t\t$plugins = array_map($plugins_func, $plugins);\n\t\t\tforeach ( $plugins as $key => $plugin ) {\n\t\t\t\tif ( $this->ghu_refresh_transients_plugin($plugin) === false ) {\n\t\t\t\t\tunset($plugins[ $key ]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $plugins;\n\t\t}", "title": "" }, { "docid": "d58dd868c9351eec1779180598c9dec2", "score": "0.4865876", "text": "private function validatePlugins()\n {\n foreach ($this->cache['plugins'] as $plugin_file => $plugin_info) {\n if (!file_exists(WPMU_PLUGIN_DIR . '/' . $plugin_file)) {\n $this->updateCache();\n break;\n }\n }\n }", "title": "" }, { "docid": "90ba5d53105d8e3e0c797f0bc3bcc479", "score": "0.48648492", "text": "protected function bootstrap() {\n\n\t\t$function_count = array();\n\n\t\t/**\n\t\t * If we have \"do_all\" workers, start them first\n\t\t * do_all workers register all functions\n\t\t */\n\t\tif(!empty($this->do_all_count) && is_int($this->do_all_count)){\n\n\t\t\tfor($x=0;$x<$this->do_all_count;$x++){\n\t\t\t\t$this->start_worker();\n\t\t\t}\n\n\t\t\tforeach($this->functions as $worker => $settings){\n\t\t\t\tif(empty($settings[\"dedicated_only\"])){\n\t\t\t\t\t$function_count[$worker] = $this->do_all_count;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t/**\n\t\t * Next we loop the workers and ensure we have enough running\n\t\t * for each worker\n\t\t */\n\t\tforeach($this->functions as $worker=>$config) {\n\n\t\t\t/**\n\t\t\t * If we don't have do_all workers, this won't be set, so we need\n\t\t\t * to init it here\n\t\t\t */\n\t\t\tif(empty($function_count[$worker])){\n\t\t\t\t$function_count[$worker] = 0;\n\t\t\t}\n\n\t\t\twhile($function_count[$worker] < $config[\"count\"]){\n\t\t\t\t$this->start_worker($worker);\n\t\t\t\t$function_count[$worker]++;;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * php will eat up your cpu if you don't have this\n\t\t\t */\n\t\t\tusleep(50000);\n\n\t\t}\n\n\t\t/**\n\t\t * Set the last code check time to now since we just loaded all the code\n\t\t */\n\t\t$this->last_check_time = time();\n\n\t}", "title": "" }, { "docid": "54634b8a062d66b4e2642ec514177fa1", "score": "0.48642585", "text": "function ft_invoke_hook() {\n global $ft;\n $args = func_get_args();\n $hook = $args[0];\n unset($args[0]); \n // Loop through loaded plugins.\n $return = array();\n if (isset($ft['loaded_plugins']) && is_array($ft['loaded_plugins'])) {\n foreach ($ft['loaded_plugins'] as $name) {\n if (function_exists('ft_'.$name.'_'.$hook)) {\n $result = call_user_func_array('ft_'.$name.'_'.$hook, $args);\n if (isset($result) && is_array($result)) {\n $return = array_merge_recursive($return, $result);\n }\n else if (isset($result)) {\n $return[] = $result;\n }\n }\n }\n }\n return $return;\n}", "title": "" }, { "docid": "f7646e389d81de9930b5511d5760917b", "score": "0.48632592", "text": "public function get_plugins()\n {\n }", "title": "" }, { "docid": "f97f7dbcd244734424aa910ac9ad3b99", "score": "0.48622257", "text": "public static function cronJob_maintenance_heavy()\n {\n new DeferredJob(\n function () {\n $path = Config::get('paths.storage') . '/exception_log';\n $dayDirs = array_reverse(glob(\"$path/\" . str_repeat('[0123456789]', 8), GLOB_ONLYDIR | GLOB_NOSORT));\n $expires = intval(date('Ymd', time() - (86400 * 30)));\n $count = 0;\n foreach ($dayDirs as $dayDir) {\n if (intval(basename($dayDir)) < $expires) {\n foreach (glob(\"$dayDir/*\") as $file) {\n unlink($file);\n $count++;\n }\n rmdir($dayDir);\n }\n }\n return \"Expired $count old exception logs\";\n },\n 'core_maintenance_heavy'\n );\n // expire old wayback data\n new DeferredJob(\n function () {\n WaybackMachine::cleanup();\n },\n 'core_maintenance_heavy'\n );\n // do periodic maintenance on all pages\n new DeferredJob(\n function (DeferredJob $job) {\n $pages = DB::query()\n ->from('page')\n ->leftJoin('page_link on end_page = page.uuid')\n ->where('page_link.id is null');\n while ($page = $pages->fetch()) {\n $uuid = $page['uuid'];\n // recursive job to prepare cron jobs\n new RecursivePageJob(\n $uuid,\n function (DeferredJob $job, AbstractPage $page) {\n $count = $page->prepareCronJobs();\n return sprintf(\"Prepared %s cron jobs for %s (%s)\", $count, $page->name(), $page->uuid());\n },\n false,\n $job->group()\n );\n // recursive job to refresh all slugs\n new RecursivePageJob(\n $uuid,\n function (DeferredJob $job, AbstractPage $page) {\n if (!$page->slugPattern()) return $page->uuid() . \": No slug pattern\";\n Slugs::setFromPattern($page, $page->slugPattern(), $page::DEFAULT_UNIQUE_SLUG);\n return $page->uuid() . \" slug set to \" . $page->slug();\n },\n false,\n $job->group()\n );\n }\n return \"Spawned page heavy maintenance jobs\";\n },\n 'core_maintenance_heavy'\n );\n }", "title": "" }, { "docid": "a37b0d692959e85bb99e8502b7c01803", "score": "0.48526493", "text": "public function runCheck() {\n\t\tif ( $this->action == 'install-plugin' or $this->action == 'activate' ) {\n\t\t\t$plugin_path_array = explode( '/', $this->plugin );\n\t\t\t$plugin_dir = $plugin_path_array[0];\n\n\t\t\tif ( in_array( $plugin_dir, $this->blacklist ) ) {\n\t\t\t\twp_die($this->message);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f19873fe072049affa5f136f8ee434c3", "score": "0.48495921", "text": "public function loadPlugins()\n {\n $objects = $this->buildPluginCache();\n foreach ($objects as $plugin) {\n $this->initializePlugin($plugin);\n }\n $this->classObjects += $objects;\n }", "title": "" }, { "docid": "dee61b7a31341e3bc614041fe57d3f85", "score": "0.48456246", "text": "public static function Run()\n\t{\n\t\t// add here your code...\n // Class::Method();\n\t\t$perform_actions = false;\n\n // update last time running\n\t\t$sql = 'SELECT\n\t\t\t\t\tcron_type,\n\t\t\t\t\tcron_run_last_time,\n\t\t\t\t\tcron_run_period,\n\t\t\t\t\tcron_run_period_value,\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN cron_run_last_time IS NULL THEN \\'999\\'\n\t\t\t\t\t\tWHEN cron_run_period = \\'minute\\' THEN TIMESTAMPDIFF(MINUTE, cron_run_last_time, \\''.date('Y-m-d H:i:s').'\\')\n\t\t\t\t\t\tELSE TIMESTAMPDIFF(HOUR, cron_run_last_time, \\''.date('Y-m-d H:i:s').'\\')\n\t\t\t\t\tEND as time_diff\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tFROM '.TABLE_SETTINGS;\n\t\t$result = database_query($sql, DATA_ONLY, FIRST_ROW_ONLY);\n\n if($result['cron_type'] == 'batch'){\n\t\t\t$perform_actions = true; \n }else if($result['cron_type'] == 'non-batch' && $result['time_diff'] > $result['cron_run_period_value']){\n\t\t\t$perform_actions = true;\n\t\t}else{\n\t\t\t$perform_actions = false;\n\t\t}\n \n\t\tif($perform_actions)\n\t\t{\n\t\t\t// update Feeds\n\t\t\tRSSFeed::UpdateFeeds();\n\t\t\t\n\t\t\tif(self::$PROJECT == 'ShoppingCart'){\n\t\t\t\t// close expired discount campaigns\n\t\t\t\tCampaigns::UpdateStatus();\n\t\t\t\t// remove expired orders\n\t\t\t\tOrders::RemoveExpired();\n\t\t\t}else if(self::$PROJECT == 'HotelSite' || self::$PROJECT == 'HotelBooking'){\n\t\t\t\t// close expired discount campaigns\n\t\t\t\tCampaigns::UpdateStatus();\n\t\t\t\t// close expired coupons\n\t\t\t Coupons::UpdateStatus();\n\t\t\t\t// remove expired 'Prebooking' bookings\n\t\t\t\tBookings::RemoveExpired(); \n\t\t\t\t// remove expired 'Prebooking' cars\n\t\t\t\tif(self::$PROJECT == 'HotelBooking'){\n\t\t\t\t\tCarRental::RemoveExpired();\n\t\t\t\t}\n\t\t\t\t// Notification of customer after they stayed at the hotel\n\t\t\t\tBookings::NotifyCustomerAfterStayed();\n\t\t\t}else if(self::$PROJECT == 'BusinnessDirectory'){\n\t\t\t\t// close expired lisitngs\n\t\t\t\tListings::UpdateStatus();\t\t\t\t\n\t\t\t\t// remove old inquiries\n\t\t\t\tInquiries::RemoveOld();\n\t\t\t}else if(self::$PROJECT == 'MedicalAppointment'){\n\t\t\t\t// remove expired appointments\n\t\t\t\tAppointments::RemoveExpired();\n\t\t\t\t// send reminders for patient and doctor\n\t\t\t\tAppointments::SendReminders();\n\t\t\t\t// remove expired membership plans\n\t\t\t\tMembershipPlans::RemoveExpired(); \n\t\t\t}else if(self::$PROJECT == 'MicroBlog'){\n\t\t\t\t// close expired polls\n\t\t\t\tPolls::UpdateStatus();\t\t\t\t\n\t\t\t}\n\n\t\t\t// update last time running\n\t\t\t$sql = \"UPDATE \".TABLE_SETTINGS.\" SET cron_run_last_time = '\".date('Y-m-d H:i:s').\"'\";\n\t\t\tdatabase_void_query($sql);\n\t\t}\n\t}", "title": "" }, { "docid": "5ccfa0a067daf35ef5b85e55c118a785", "score": "0.48372716", "text": "public function execute() {\n global $DB;\n\n // TODO - echo \"\\n\\t\" . get_string('advnotifications_cron_heading', 'block_advnotifications') . \"\\n\";.\n\n // Auto-Permanent Delete Feature.\n if (get_config('block_advnotifications', 'auto_perma_delete')) {\n // TODO - echo \"\\n\\t\\t- \" . get_string('advnotifications_cron_auto_perma_delete', 'block_advnotifications') . \"\\n\";.\n\n // Permanently delete notifications that's had the deleted flag for more than 30 days.\n $DB->delete_records_select('block_advnotifications',\n 'deleted_at < :limit AND deleted_at <> 0 AND deleted = 1',\n array('limit' => strtotime('-30 days'))\n );\n }\n\n // Auto Delete Flagging Feature.\n if (get_config('block_advnotifications', 'auto_delete')) {\n // TODO - echo \"\\t\\t- \" . get_string('advnotifications_cron_auto_delete', 'block_advnotifications') . \"\\n\";.\n\n // Add deleted flag to notifications that's passed their end-date.\n $DB->set_field_select('block_advnotifications',\n 'deleted',\n '1',\n 'date_to < :now AND date_from <> date_to',\n array('now' => time())\n );\n\n // Record time of setting 'deleted' flag.\n $DB->set_field_select('block_advnotifications',\n 'deleted_at',\n time(),\n 'deleted = 1'\n );\n }\n\n // Auto User Data Deletion Feature.\n if (get_config('block_advnotifications', 'auto_delete_user_data')) {\n // TODO - echo \"\\t\\t- \" . get_string('advnotifications_cron_auto_delete_udata', 'block_advnotifications') . \"\\n\\n\";.\n\n // Remove user records that relates to notifications that don't exist anymore.\n $todelete = $DB->get_records_sql('SELECT band.id\n FROM {block_advnotificationsdissed} band\n LEFT JOIN {block_advnotifications} ban ON band.not_id = ban.id\n WHERE ban.id IS NULL');\n\n $DB->delete_records_list('block_advnotificationsdissed',\n 'id',\n array_keys((array)$todelete)\n );\n }\n }", "title": "" }, { "docid": "2a69a42150dc3a25e5d66f5fc0b84f69", "score": "0.4828606", "text": "private function doCronJobs() {\n\t\t\n\t\t$cronJobs = $this->cronJob->find();\n\n\t\tforeach ($cronJobs as $id => $cronJob) {\n\n\t\t\t$scriptVars = $this->extractScriptVars($cronJob['script_vars']);\n\t\t\t\n\t\t\tswitch($cronJob['script_vars_type']) {\n\t\t\t\n\t\t\t\tcase 'post':\n\t\t\t\t\tunset($_POST);\n\t\t\t\t\t$_POST = $scriptVars;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'get':\n\t\t\t\t\tunset($_GET);\n\t\t\t\t\t$_GET = $scriptVars;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$this->cmt->setVars($scriptVars);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$this->codeEvaler->evalCode(file_get_contents(PATHTOWEBROOT . $cronJob['execute_script']));\n\t\t}\n\t\t\n\t\t// TODO: log last execution\n\t\t\n\t\t$this->exitCronJobber('regular exit');\n\t}", "title": "" }, { "docid": "6d1d9db67ad9c38e9d76c28faf558a73", "score": "0.4826391", "text": "public function executeAndWait()\n\t\t{\n\t\t\t$this->executeCommands();\n\t\t\twhile ($this->runningCommands || $this->queue) {\n\t\t\t\t$somethingHappened = false;\n\t\t\t\tforeach ($this->runningCommands as $command) {\n\t\t\t\t\t$h = $command->_monitorProcess();\n\t\t\t\t\t$somethingHappened = $somethingHappened || $h;\n\t\t\t\t}\n\n\t\t\t\tif ($somethingHappened) {\n\t\t\t\t\t$this->cleanup();\n\t\t\t\t\t$this->executeCommands();\n\t\t\t\t} else {\n\t\t\t\t\tusleep($this->tickSleep);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a51b650a271febe77e47e66b2e4757bc", "score": "0.4823042", "text": "public function option_active_plugins($plugins)\n {\n\n // Do not act if...\n // - We are updating\n // - We are on the plugins page\n // - We are doing an AJAX request\n if (\n strpos($this->url, '/wp-admin/update-core.php') !== false ||\n strpos($this->url, '/wp-admin/plugins.php') !== false ||\n $this->ajax\n ) {\n return $plugins;\n }\n\n // Cart page filter\n if (strpos($this->url, '/cart') !== false) {\n if (!$GLOBALS['loggedasdf']) {\n $GLOBALS['loggedasdf'] = true;\n error_log(\"Filtered plugin list:\" . print_r(array_merge($this->always_enabled, $this->cart_and_checkout, $this->cart), true));\n }\n return array_merge($this->always_enabled, $this->cart_and_checkout, $this->cart);\n }\n\n // // Checkout page filter\n // if (strpos($this->url, '/checkout') !== false) {\n // return array_merge($this->always_enabled, $this->cart_and_checkout, $this->checkout);\n // }\n\n return $plugins;\n }", "title": "" }, { "docid": "72a5c48ff1efc5ef56f7e31ce38bfb18", "score": "0.482219", "text": "public function plugins()\r\n\t{\r\n\t\t\r\n\t\t//\tSet plugins\r\n\t\t//\r\n\t\t$plugins = array(\r\n\t\t\t\r\n\t\t\t// bbPress\r\n\t\t\t//\r\n\t\t\tarray(\r\n\t\t\t\t'name' => 'bbPress',\r\n\t\t\t\t'slug' => 'bbpress',\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'version' => '2.5.4',\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t// Advanced Automatic Updates\r\n\t\t\t//\r\n\t\t\tarray(\r\n\t\t\t\t'name' => 'Advanced Automatic Updates',\r\n\t\t\t\t'slug' => 'automatic-updater',\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'version' => '1.0.0',\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t// BackUpWordPress\r\n\t\t\t//\r\n\t\t\tarray(\r\n\t\t\t\t'name' => 'BackUpWordPress',\r\n\t\t\t\t'slug' => 'backupwordpress',\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'version' => '2.6.0',\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t//\tGoogle Analyticator\r\n\t\t\t//\r\n\t\t\tarray(\r\n\t\t\t\t'name' => 'Google Analyticator',\r\n\t\t\t\t'slug' => 'google-analyticator',\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'version' => '6.4.0',\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t//\tYoast's WordPress SEO\r\n\t\t\t//\r\n\t\t\tarray(\r\n\t\t\t\t'name' => 'WordPress SEO',\r\n\t\t\t\t'slug' => 'wordpress-seo',\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'version' => '1.5.0'\r\n\t\t\t),\r\n\t\t\t\r\n\t\t);\r\n\t\t\r\n\t\t// Configuration options\r\n\t\t//\r\n\t\t$config = array(\r\n\t\t\t\r\n\t\t\t'has_notices' => true,\r\n\t\t\t'is_automatic' => true,\r\n\t\t\t'dismissable' => false,\r\n\t\t\t\r\n\t\t);\r\n\t\t\r\n\t\ttgmpa( $plugins, $config );\r\n\t\t\r\n\t}", "title": "" }, { "docid": "f9a9767233b1d277b227609be9e851fc", "score": "0.4819927", "text": "private function activate_plugins() {\n\n\t\t$active_plugins = get_option( 'active_plugins' );\n\t\tforeach ( $active_plugins as $plugin ) {\n\t\t\t/** This action is documented in wp-admin/includes/plugin.php */\n\t\t\tdo_action( 'activate_plugin', $plugin, false );\n\n\t\t\t/** This action is documented in wp-admin/includes/plugin.php */\n\t\t\tdo_action( 'activate_' . $plugin, false );\n\n\t\t\t/** This action is documented in wp-admin/includes/plugin.php */\n\t\t\tdo_action( 'activated_plugin', $plugin, false );\n\t\t}\n\t}", "title": "" }, { "docid": "35b442990177e94122081dc5bd59b17a", "score": "0.48175627", "text": "public function do_deferred_actions() {\n\t\tdo_action( 'wpcd_log_error', 'doing do_deferred_actions', 'debug', __FILE__, __LINE__ );\n\t\t$posts = get_posts(\n\t\t\tarray(\n\t\t\t\t'post_type' => 'wpcd_app_server',\n\t\t\t\t'post_status' => 'private',\n\t\t\t\t'numberposts' => -1,\n\t\t\t\t'meta_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key' => 'wpcd_server_action_status',\n\t\t\t\t\t\t'value' => 'in-progress',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'fields' => 'ids',\n\t\t\t)\n\t\t);\n\n\t\tif ( $posts ) {\n\t\t\tforeach ( $posts as $id ) {\n\t\t\t\t$action = get_post_meta( $id, 'wpcd_server_action', true );\n\t\t\t\tdo_action( 'wpcd_log_error', \"calling deferred action $action for $id\", 'debug', __FILE__, __LINE__ );\n\t\t\t\tdo_action( 'wpcd_app_action', $id, '', $action );\n\t\t\t}\n\t\t}\n\n\t\tset_transient( 'wpcd_do_deferred_actions_for_vpn_is_active', 1, wpcd_get_long_running_command_timeout() * MINUTE_IN_SECONDS );\n\t}", "title": "" }, { "docid": "ee25474cabbc4b490e06d27f949ad033", "score": "0.48158684", "text": "function wp_get_active_and_valid_plugins() {}", "title": "" }, { "docid": "d969f27ce492cb24edc44e13b8782f1b", "score": "0.48135903", "text": "public function runTasks() {}", "title": "" }, { "docid": "db4f469451e16c34e84436f3f9f0412f", "score": "0.48126426", "text": "public function checkForExistingTriggersUpdate()\n {\n $this->logger()->info(sprintf('UPDATE > Start checking for trigger update'));\n \n /* FORCE RECHECK\n foreach ($this->autoTriggers as $trigger) {\n $trigger->check();\n }*/\n\n foreach ($this->pendingAutoTriggers as $trigger) {\n $trigger->check();\n }\n\n $this->logger()->info(sprintf('UPDATE > Finish checking for trigger update'));\n }", "title": "" }, { "docid": "0353cd30df6e6e6bd44846140250e069", "score": "0.48126325", "text": "public function optimize_all() {\n $this->logData .= \"optimize_all() called.<br />\";\n\n while ( $tables = $this->show_tables() ) {\n\n foreach ( $tables as $key => $tableName ) {\n\n if ( $this->optimize( $tableName ) ) {\n\n return TRUE;\n\n } else {\n\n return FALSE;\n $this->logData .= \"Cannot optimize \" . $tableName . \" table<br />\";\n $this->errorMsg[] = \"Cannot optimize \" . $tableName . \" table\";\n\n }\n\n }\n\n }\n\n }", "title": "" }, { "docid": "1f20d06d91d6d956a3943ded5d9b3083", "score": "0.48061398", "text": "function catchplugins() {\n\t\tglobal $paged, $tab;\n\t\twp_reset_vars( array( 'tab' ) );\n\n\t\t$defined_class = new WP_Plugin_Install_List_Table();\n\t\t$paged = $defined_class->get_pagenum();\n\n\t\t$per_page = 30;\n\t\t//$installed_plugins = catch_get_installed_plugins();\n\n\t\t$args = array(\n\t\t\t'page' => $paged,\n\t\t\t'per_page' => $per_page,\n\t\t\t'fields' => array(\n\t\t\t\t'last_updated' => true,\n\t\t\t\t'icons' => true,\n\t\t\t\t'active_installs' => true\n\t\t\t),\n\t\t\t// Send the locale and installed plugin slugs to the API so it can provide context-sensitive results.\n\t\t\t'locale' => get_user_locale(),\n\t\t\t//'installed_plugins' => array_keys( $installed_plugins ),\n\t\t);\n\t\t/* From CORE End */\n\n\t\t// Add author filter for our plugins\n\t\t$args['author'] = 'catchplugins';\n\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "a08e2763454d9635a079eac134b68c98", "score": "0.47921282", "text": "function plugin_run_once() {\n\tadd_subtype(\"object\", \"plugin\", \"ElggPlugin\");\n}", "title": "" }, { "docid": "7307d753840a8ae792617a8fb2f98de6", "score": "0.47825557", "text": "private function run_theme_services() : void {\n\n foreach ( $this->services as $id => $service ) {\n\n if ( is_subclass_of( $service , 'Facade\\Conditional' ) ) {\n \n if( ! $service::is_needed() ) {\n \n continue;\n\n }\n \n }\n\n $service = $this->container->get( $service );\n\n if ( is_subclass_of( $service , 'Facade\\Registerable' ) ) {\n\n $service->register();\n\n }\n\n }\n\n }", "title": "" }, { "docid": "39ed73da1cce143612fac6e5f0e58187", "score": "0.47712263", "text": "abstract protected function required_plugins();", "title": "" }, { "docid": "e45a0bf875cf699138b10e821dd76554", "score": "0.47600693", "text": "function wp_schedule_update_checks() {}", "title": "" }, { "docid": "b1443629f6523ea8b03a32c2e74ac817", "score": "0.47572574", "text": "function run_rocket_bot_for_all_langs() {\n\t\t_deprecated_function( __FUNCTION__, '2.2', 'run_rocket_bot()' );\n\t\treturn run_rocket_bot( 'cache-preload' );\n\t}", "title": "" }, { "docid": "c833e45092a569b92867d6cccab5d253", "score": "0.47533953", "text": "public static function maybe_schedule_cron_jobs() {\n\t\tif ( ! wp_next_scheduled( 'job_manager_check_for_expired_jobs' ) ) {\n\t\t\twp_schedule_event( time(), 'hourly', 'job_manager_check_for_expired_jobs' );\n\t\t}\n\t\tif ( ! wp_next_scheduled( 'job_manager_delete_old_previews' ) ) {\n\t\t\twp_schedule_event( time(), 'daily', 'job_manager_delete_old_previews' );\n\t\t}\n\t\tif ( ! wp_next_scheduled( 'job_manager_clear_expired_transients' ) ) {\n\t\t\twp_schedule_event( time(), 'twicedaily', 'job_manager_clear_expired_transients' );\n\t\t}\n\t\tif ( ! wp_next_scheduled( 'job_manager_email_daily_notices' ) ) {\n\t\t\twp_schedule_event( time(), 'daily', 'job_manager_email_daily_notices' );\n\t\t}\n\t}", "title": "" }, { "docid": "815d22b8e9e4031d8fb261d4f01a7e72", "score": "0.47488862", "text": "function wp_get_ready_cron_jobs() {}", "title": "" }, { "docid": "4faa52f081cd0f97abf8a3148fc957f1", "score": "0.47437578", "text": "function frame_automatic_plugins_loading()\n{\n if (empty($_GET['page']) || $_GET['page'] !== 'tgmpa-install-plugins' || empty($_GET['autoaction']))\n return;\n\n // Create an array from the plugins $_GET parameter\n // $plugins = (!empty($_GET['plugins'])) ? $_GET['plugins'] : false;\n\n // Stop execution if no plugins have to be installed\n // if ($plugins === false) return;\n\n?>\n <style>\n #plugins-loading-box {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 9999999999999;\n padding: 50px;\n background-color: #fff;\n }\n </style>\n\n <div id=\"plugins-loading-box\">Installing plugins...</div>\n\n<?php\n}", "title": "" }, { "docid": "f1a8121fde3f0e4ef91df5d6835f22a2", "score": "0.47413602", "text": "function ft_plugins_load() {\n global $ft;\n $core = array('search', 'edit', 'tinymce');\n $ft['loaded_plugins'] = array();\n if (isset($ft['plugins']) && is_array($ft['plugins'])) {\n foreach ($ft['plugins'] as $name => $v) {\n // Include plugin file. We only need to load core modules if the install type is expanded.\n if (!in_array($name, $core) || (in_array($name, $core) && INSTALL != 'SIMPLE')) {\n // Not a core plugin or we're in expanded mode. Load file.\n if (file_exists(PLUGINDIR.'/'.$name.'.plugin.php')) {\n @include_once(PLUGINDIR.'/'.$name.'.plugin.php');\n $ft['loaded_plugins'][] = $name;\n } else {\n ft_set_message(t('Could not load !name plugin. File not found.', array('!name' => $name)), 'error');\n }\n } elseif (in_array($name, $core) && INSTALL == 'SIMPLE') {\n // Core plugin and we're in simple mode. Plugin file is already loaded.\n $ft['loaded_plugins'][] = $name;\n }\n }\n }\n}", "title": "" }, { "docid": "240a7c9537b64d0693737fbef359b2c4", "score": "0.4732547", "text": "public function execute() {\n//\t\tlogIt(__FUNCTION__, \"DEBUG\");\n\n // Check for Pre-DET url\n self::checkPreDet();\n\n // Decode the triggers from the config\n $triggers = json_decode(htmlspecialchars_decode($this->config['triggers'], ENT_QUOTES), true);\n\n // Loop through each notification\n foreach ($triggers as $i => $trigger) {\n $logic = $trigger['logic'];\n $title = $trigger['title'];\n $enabled = $trigger['enabled'];\n $scope = isset($trigger['scope']) ? $trigger['scope'] : 0; // Get the scope or set to 0 (default)\n\n if (!$enabled) {\n//\t\t\t\tlogIt(__FUNCTION__ . \": The current trigger ($title) is not set as enabled - skipping\", \"DEBUG\");\n continue;\n }\n\n if (empty($title)) {\n logIt(\"Cannot process alert $i because it has an empty title: \" . json_encode($trigger),\"ERROR\");\n continue;\n }\n\n // Append current event prefix to lonely fields if longitidunal\n if (REDCap::isLongitudinal() && $this->redcap_event_name) $logic = LogicTester::logicPrependEventName($logic, $this->redcap_event_name);\n\n if (!empty($logic) && !empty($this->record)) {\n if (LogicTester::evaluateLogicSingleRecord($logic, $this->record)) {\n // Condition is true, check to see if already notified\n if (!self::checkForPriorNotification($title, $scope)) {\n $result = self::notify($title, $trigger);\n logIt(\"{$this->record}: Notified ($title) / \" . ($result ? 'Success' : 'Failure') );\n } else {\n // Already notified\n logIt(\"{$this->record}: [$title] - Already notified\");\n }\n } else {\n // Logic did not pass\n //logIt(\"Logic: $logic / Record: \" . $this->record . \" / Project: \" . $this->project_id, \"DEBUG\");\n logIt(\"{$this->record}: [$title] - Logic false\");\n }\n } else {\n // object missing logic or record\n logIt(\"{$this->record}: [$title] - Unable to execute: missing logic or record\");\n }\n }\n\n // Check for Post-DET url\n self::checkPostDet();\n }", "title": "" }, { "docid": "941486708271c039df059de667c2b051", "score": "0.4724504", "text": "public function serve() { //==============logging & locking\r\n $dir = \\APP_DIR . '/var/schedules';\r\n $dirs = \\array_diff(\\scandir($dir), ['..', '.']);\r\n $trunc = \\substr((string)\\time(), 0, -1).'0';\r\n $time = (int)$trunc;\r\n if (\\count($dirs) > 0) {\r\n $process = [];\r\n foreach ($dirs as $mfile) {\r\n $manifest = require $dir.'/'.$mfile;\r\n if ($time%(int)$manifest['schedule']==0) {\r\n $process[$manifest['jobname']] = $manifest['data'];\r\n }\r\n }\r\n foreach ($process as $job=>$data) {\r\n $fileload = \\APP_DIR . '/var/jobs/' . $job . '.php';\r\n if (!\\file_exists($fileload)) {\r\n $this->log('job tidak ditemukan');\r\n } else {\r\n $cmdmanifest = require $fileload;\r\n $reflect = $cmdmanifest['handler'];\r\n $reflect = new \\ReflectionClass($reflect); // chk abstract command?\r\n\r\n $instance = $reflect->newInstance($this->container);\r\n $props = $cmdmanifest['options']['props'];\r\n foreach ($data as $k => $v) {\r\n $property = $reflect->getProperty($props[$k]['name']);\r\n $property->setValue($instance, $v);\r\n }\r\n $output = '';\r\n $logs = '';\r\n try {\r\n $result = $instance->run();\r\n $output = $instance->getOutput();\r\n $logs = $instance->getLogs();\r\n if (\\trim($output)) {\r\n $this->log('Output : '. $output);\r\n }\r\n if (\\trim($logs)) {\r\n $this->log('Logs : '. $logs);\r\n }\r\n } catch (\\Exception $e) {\r\n $this->log('Error Logs : '.$e->getMessage().\"\\r\\n\".$logs);\r\n $this->log('Output : '. $output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if ($time%60==0) {\r\n $da_jobs = $this->container->get(Jobs::class);\r\n $jobs = $da_jobs->remains();\r\n foreach ($jobs as $job) {\r\n $fileload = \\APP_DIR . '/var/jobs/' . $job->job . '.php';\r\n if (!\\file_exists($fileload)) {\r\n $da_jobs->setResult($job->id, Jobs::STATE_ERROR, 'job tidak ditemukan');\r\n } else {\r\n $cmdmanifest = require $fileload;\r\n $reflect = $cmdmanifest['handler'];\r\n $reflect = new \\ReflectionClass($reflect);\r\n\r\n $instance = $reflect->newInstance($this->container); // check parent type\r\n $props = $cmdmanifest['options']['props'];\r\n $data = \\json_decode($job->data, true);\r\n foreach ($data as $k => $v) {\r\n $property = $reflect->getProperty($props[$k]['name']);\r\n $property->setValue($instance, $v);\r\n }\r\n $output = '';\r\n $logs = '';\r\n try {\r\n $result = $instance->run($job->id);\r\n $output = $instance->getOutput();\r\n $logs = $instance->getLogs();\r\n //$da_jobs->flagFinished($job->id);\r\n $da_jobs->setResult($job->id, ($result===true?Jobs::STATE_FINISHED:($result===false?Jobs::STATE_ERROR:Jobs::STATE_RESET)), \\substr($logs,0,1000), \\substr($output,0,2000));\r\n } catch (\\Exception $e) {\r\n $da_jobs->setResult($job->id, Jobs::STATE_ERROR, \\substr($e->getMessage().\"\\r\\n\".$logs,0,1000), \\substr($output,0,2000));\r\n }\r\n }\r\n }\r\n\r\n $jobs = $da_jobs->remainSchedules();\r\n foreach ($jobs as $job) {\r\n $time = \\DateTime::createFromFormat('Y-m-d H:i:s', $job->schedule);\r\n $now = new \\DateTime();\r\n if ($time <= $now) {\r\n $fileload = \\APP_DIR . '/var/jobs/' . $job->job . '.php';\r\n if (!\\file_exists($fileload)) {\r\n $da_jobs->setResult($job->id, Jobs::STATE_ERROR, 'job tidak ditemukan');\r\n } else {\r\n $cmdmanifest = require $fileload;\r\n $reflect = $cmdmanifest['handler'];\r\n $reflect = new \\ReflectionClass($reflect);\r\n\r\n $instance = $reflect->newInstance($this->container); // check parent type\r\n $props = $cmdmanifest['options']['props'];\r\n $data = \\json_decode($job->data, true);\r\n foreach ($data as $k => $v) {\r\n $property = $reflect->getProperty($props[$k]['name']);\r\n $property->setValue($instance, $v);\r\n }\r\n $output = '';\r\n $logs = '';\r\n try {\r\n $result = $instance->run($job->id);\r\n $output = $instance->getOutput();\r\n $logs = $instance->getLogs();\r\n //$da_jobs->flagFinished($job->id);\r\n if ($result===false) {\r\n $da_jobs->retrySchedule($job->id);\r\n } else {\r\n $da_jobs->setResult($job->id, Jobs::STATE_FINISHED, \\substr($logs,0,1000), \\substr($output,0,2000));\r\n }\r\n } catch (\\Exception $e) {\r\n $da_jobs->setResult($job->id, Jobs::STATE_ERROR, \\substr($e->getMessage().\"\\r\\n\".$logs,0,1000), \\substr($output,0,2000));\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n }", "title": "" } ]
d88c1c906ac7ea43072a79ba0070847c
Set the lazy loading proxies on the wrapped entity objet.
[ { "docid": "a1cfeec800138e1c61ddebaf99755e4e", "score": "0.53400004", "text": "public function setProxies(array $relations = null)\n {\n $attributes = $this->getEntityAttributes();\n $proxies = [];\n\n $relations = $this->getRelationsToProxy();\n\n // Before calling the relationship methods, we'll set the relationship\n // method to null, to avoid hydration error on class properties\n foreach ($relations as $relation) {\n $this->setEntityAttribute($relation, null);\n }\n\n foreach ($relations as $relation) {\n // First, we check that the relation has not been already\n // set, in which case, we'll just pass.\n if (array_key_exists($relation, $attributes) && !is_null($attributes[$relation])) {\n continue;\n }\n\n // If the key is handled locally and we know it not to be set,\n // we'll set the relationship to null value\n if (!$this->relationNeedsProxy($relation, $attributes)) {\n $proxies[$relation] = $this->entityMap->getEmptyValueForRelationship($relation);\n } else {\n $targetClass = $this->getClassToProxy($relation, $attributes);\n $proxies[$relation] = $this->proxyFactory->make($this->getObject(), $relation, $targetClass);\n }\n }\n\n foreach ($proxies as $key => $value) {\n $this->setEntityAttribute($key, $value);\n }\n }", "title": "" } ]
[ { "docid": "e0f839a4aba0d41758e046dcaaf1b37b", "score": "0.6532995", "text": "public function validationIsDoneForReconstitutedEntitiesWhichAreLazyLoadingProxies()\n {\n $this->removeExampleEntities();\n $this->insertExampleEntity();\n $this->persistenceManager->persistAll();\n $theObject = $this->testEntityRepository->findOneByName('Flow');\n $theObjectIdentifier = $this->persistenceManager->getIdentifierByObject($theObject);\n\n // Here, we completely reset the persistence manager again and work\n // only with the Object Identifier\n $this->persistenceManager->clearState();\n\n $entityManager = $this->objectManager->get('Doctrine\\Common\\Persistence\\ObjectManager');\n $lazyLoadedEntity = $entityManager->getReference('TYPO3\\Flow\\Tests\\Functional\\Persistence\\Fixtures\\TestEntity', $theObjectIdentifier);\n $lazyLoadedEntity->setName('a');\n $this->testEntityRepository->update($lazyLoadedEntity);\n $this->persistenceManager->persistAll();\n }", "title": "" }, { "docid": "a0d24d7a1cbcfc6f636b2571791a3ec6", "score": "0.6088937", "text": "public function setLazyLoading($lazyLoading)\n {\n $this->lazyLoading = $lazyLoading;\n }", "title": "" }, { "docid": "ed8d7f7ab6c7b95fd7cf54fb43bc6ba1", "score": "0.594977", "text": "private function loadDelegates($entity)\n {\n if (!$this instanceof LazyLoaderInterface) {\n return $entity;\n }\n if (!$entity instanceof LazyPropertiesInterface) {\n throw new \\InvalidArgumentException(sprintf('%s objects cannot be hydrated with properties loading delegates without implementing %s.',\n get_class($entity),\n LazyPropertiesInterface::class\n ));\n }\n\n // global handler (deprecated)\n if (isset($proxies[$loaderClass = static::class])) {\n @trigger_error(\n sprintf('Global loader delegate is deprecated and will be removed in 1.6. Make \"%s\" loader invokable instead, entity to handle is given at first parameter.',\n static::class\n ),\n E_USER_DEPRECATED\n );\n $proxies[$loaderClass]($entity);\n unset($proxies[$loaderClass]);\n }\n\n // define delegates into object\n $entity->registerLoaders(\n $this->getLoadingDelegates()\n );\n\n // global handler\n if (is_callable($this)) {\n $this($entity);\n }\n\n return $entity;\n }", "title": "" }, { "docid": "736396e7d345975196cf7b2abfe84261", "score": "0.5893783", "text": "public static function createProxies() {\n\t\t$factory = $this->entityManager->getProxyFactory();\n\t\t$factory->generateProxyClasses($this->getModelClasses());\n\t}", "title": "" }, { "docid": "8d9e5753dc8a9e682484041f8e671cf9", "score": "0.5828724", "text": "public function setLoader(LazyLoaderInterface $lazyLoader);", "title": "" }, { "docid": "c1b3547af5a177b6fb0fd1cee3915aaa", "score": "0.5802382", "text": "public function setLazy($lazy) {\n $this->lazy = $lazy;\n }", "title": "" }, { "docid": "0139b172899e0f6f64cec4c8161b2425", "score": "0.56803274", "text": "public function __wakeup() {\n $class = get_called_class();\n self::analyze_class($class);\n foreach (self::$m2m_relations[$class] as $target_class => $property) {\n $this->$property = new ManyToManyRelation($target_class, $this);\n }\n }", "title": "" }, { "docid": "8365c8b88b8195ae21f52c7a2aba075b", "score": "0.55238116", "text": "protected function loadMetadata(): void\n {\n if (is_subclass_of(static::entityClass(), Mapping\\MetadataInterface::class)) {\n (static::entityClass())::loadMetadata($this->classMetadata);\n\n // prepare the Entity persister\n $this->entityPersister = new EntityPersister(static::entityClass(), $this->classMetadata);\n }\n }", "title": "" }, { "docid": "8a0a3680398458e22dc20a36e70d7cfe", "score": "0.54950696", "text": "public static function setTrustedProxies($proxies){}", "title": "" }, { "docid": "8a0a3680398458e22dc20a36e70d7cfe", "score": "0.54950696", "text": "public static function setTrustedProxies($proxies){}", "title": "" }, { "docid": "f6d11bad0665c530027270f9aa745e78", "score": "0.5491943", "text": "public function setLazyLoading($lazyLoading)\n {\n return $this;\n }", "title": "" }, { "docid": "c688c992cc945b3d43f44dda218c1eec", "score": "0.54856247", "text": "public function __wakeup()\n {\n $this->_objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n }", "title": "" }, { "docid": "2fa1e519c12279722430c7efc5894bb3", "score": "0.54746974", "text": "public function __construct(){\n $this->_proxies = array();\n }", "title": "" }, { "docid": "f2267b054a5bd1eae4745221f1599f4c", "score": "0.54289275", "text": "private function initialize()\n {\n if (!$this->reflection) {\n\n $className = get_called_class();\n if ($this->cache) {\n\n $key = \"entity-\" . $className;\n $this->reflection = $this->cache->load($key);\n if (!$this->reflection) {\n $this->reflection = new Reflection\\Entity($className);\n $this->cache->save($key, $this->reflection, $this->reflection->getFileName());\n }\n } else {\n $this->reflection = new Reflection\\Entity($className);\n }\n }\n }", "title": "" }, { "docid": "26e72656294b087822ed3790177d434b", "score": "0.54086995", "text": "public function __clone()\n {\n parent::__clone();\n if($this->eagerLoader) {\n $this->eagerLoader = clone $this->eagerLoader;\n }\n }", "title": "" }, { "docid": "9ba15f8080bf422358cf8320b451ad6d", "score": "0.53509027", "text": "abstract protected function _setRelated($opts);", "title": "" }, { "docid": "20e87366263228ef0996cfecb0865f33", "score": "0.52971417", "text": "protected function hydrate()\n {\n $properties = $this->propertiesFromAttributes($this->attributes) + $this->unmanagedProperties;\n\n // In some case, attributes will miss some properties, so we'll just complete the hydration\n // set with the orginal's object properties\n $missingProperties = array_diff_key($this->properties, $properties);\n\n foreach (array_keys($missingProperties) as $missingKey) {\n $properties[$missingKey] = $this->properties[$missingKey];\n }\n\n $this->hydrator->hydrate($properties, $this->entity);\n }", "title": "" }, { "docid": "72649841b76960d3ed6717fb029ce32d", "score": "0.5285752", "text": "public function __wakeup() {\n \n // recover manager when waking up\n $this->ep_m = epManager::instance();\n \n // recover class map\n $this->ep_cm = $this->ep_m->getMap(get_class($this->ep_object));\n\n // cache this object in manager (important for flush)\n $this->ep_m->cache($this, true); // true: force replace\n }", "title": "" }, { "docid": "dd4f64bf9a9c62a5629cfd8715da1dd0", "score": "0.5284707", "text": "public function getLazyRelationshipsAttribute();", "title": "" }, { "docid": "7b08a15740a74f9006e2b398f4250468", "score": "0.52841586", "text": "protected function loadRelated($entity)\n {\n }", "title": "" }, { "docid": "eb9800a6420e220e45fc95516009473e", "score": "0.525402", "text": "public function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)\n {\n if ($lazyLoad) {\n\n return $this->services['doctrine.orm.default_entity_manager'] = DoctrineORMEntityManager_000000003b604961000000006ea6390d13c47b3a46c600620d3394ffb1a8d08c::staticProxyConstructor(\n function (&$wrappedInstance, \\ProxyManager\\Proxy\\LazyLoadingInterface $proxy) {\n $wrappedInstance = $this->getDoctrine_Orm_DefaultEntityManagerService(false);\n\n $proxy->setProxyInitializer(null);\n\n return true;\n }\n );\n }\n\n $a = new \\Doctrine\\ORM\\Mapping\\Driver\\SimplifiedXmlDriver(array(($this->targetDirs[3].'\\\\vendor\\\\payum\\\\payum\\\\src\\\\Payum\\\\Core\\\\Bridge\\\\Doctrine\\\\Resources\\\\mapping') => 'Payum\\\\Core\\\\Model', ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\oauth-server-bundle\\\\Resources\\\\config\\\\doctrine') => 'FOS\\\\OAuthServerBundle\\\\Entity'));\n $a->setGlobalBasename('mapping');\n\n $b = new \\Doctrine\\ORM\\Mapping\\Driver\\SimplifiedYamlDriver(array(($this->targetDirs[3].'\\\\src\\\\AppBundle\\\\Resources\\\\config\\\\doctrine') => 'AppBundle\\\\Entity'));\n $b->setGlobalBasename('mapping');\n\n $c = new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriverChain();\n $c->addDriver($a, 'Payum\\\\Core\\\\Model');\n $c->addDriver($a, 'FOS\\\\OAuthServerBundle\\\\Entity');\n $c->addDriver($b, 'AppBundle\\\\Entity');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\OrderBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Order\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Order\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\CurrencyBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Currency\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Currency\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\LocaleBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Locale\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Locale\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\ProductBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Product\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Product\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\ChannelBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Channel\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Channel\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\AttributeBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Attribute\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Attribute\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\TaxationBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Taxation\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Taxation\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\ShippingBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Shipping\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Shipping\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\PaymentBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Payment\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Payment\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\PromotionBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Promotion\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Promotion\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\AddressingBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Addressing\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Addressing\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\InventoryBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Inventory\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Inventory\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\TaxonomyBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Taxonomy\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Taxonomy\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\UserBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\User\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\User\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\CustomerBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Customer\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Customer\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\ReviewBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Review\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Review\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\CoreBundle/Resources/config/doctrine/model') => 'Sylius\\\\Component\\\\Core\\\\Model'), '.orm.xml')), 'Sylius\\\\Component\\\\Core\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\PayumBundle/Resources/config/doctrine/model') => 'Sylius\\\\Bundle\\\\PayumBundle\\\\Model'), '.orm.xml')), 'Sylius\\\\Bundle\\\\PayumBundle\\\\Model');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'\\\\vendor\\\\sylius\\\\sylius\\\\src\\\\Sylius\\\\Bundle\\\\AdminApiBundle/Resources/config/doctrine/model') => 'Sylius\\\\Bundle\\\\AdminApiBundle\\\\Model'), '.orm.xml')), 'Sylius\\\\Bundle\\\\AdminApiBundle\\\\Model');\n\n $d = new \\Doctrine\\ORM\\Configuration();\n $d->setEntityNamespaces(array('payum' => 'Payum\\\\Core\\\\Model', 'FOSOAuthServerBundle' => 'FOS\\\\OAuthServerBundle\\\\Entity', 'AppBundle' => 'AppBundle\\\\Entity'));\n $d->setMetadataCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] : $this->get('doctrine_cache.providers.doctrine.orm.default_metadata_cache')) && false ?: '_'});\n $d->setQueryCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_query_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] : $this->get('doctrine_cache.providers.doctrine.orm.default_query_cache')) && false ?: '_'});\n $d->setResultCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_result_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] : $this->get('doctrine_cache.providers.doctrine.orm.default_result_cache')) && false ?: '_'});\n $d->setMetadataDriverImpl($c);\n $d->setProxyDir((__DIR__.'/doctrine/orm/Proxies'));\n $d->setProxyNamespace('Proxies');\n $d->setAutoGenerateProxyClasses(true);\n $d->setClassMetadataFactoryName('Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory');\n $d->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $d->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultNamingStrategy());\n $d->setQuoteStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy());\n $d->setEntityListenerResolver(${($_ = isset($this->services['doctrine.orm.default_entity_listener_resolver']) ? $this->services['doctrine.orm.default_entity_listener_resolver'] : $this->get('doctrine.orm.default_entity_listener_resolver')) && false ?: '_'});\n $d->setRepositoryFactory(new \\Doctrine\\Bundle\\DoctrineBundle\\Repository\\ContainerRepositoryFactory(${($_ = isset($this->services['service_locator.6f24348b77840ec12a20c22a3f985cf7']) ? $this->services['service_locator.6f24348b77840ec12a20c22a3f985cf7'] : $this->getServiceLocator_6f24348b77840ec12a20c22a3f985cf7Service()) && false ?: '_'}));\n\n $instance = \\Doctrine\\ORM\\EntityManager::create(${($_ = isset($this->services['doctrine.dbal.default_connection']) ? $this->services['doctrine.dbal.default_connection'] : $this->get('doctrine.dbal.default_connection')) && false ?: '_'}, $d);\n\n ${($_ = isset($this->services['doctrine.orm.default_manager_configurator']) ? $this->services['doctrine.orm.default_manager_configurator'] : $this->get('doctrine.orm.default_manager_configurator')) && false ?: '_'}->configure($instance);\n\n return $instance;\n }", "title": "" }, { "docid": "44b7d9e0c5c90f25654d1339084eea17", "score": "0.5253788", "text": "public function testGetLazyLoadsOnce()\n {\n $this->Comments = $this->getTableLocator()->get('Comments');\n $this->Comments->belongsTo('Authors', [\n 'foreignKey' => 'user_id'\n ]);\n\n $comment = $this->getMockBuilder(Comment::class)\n ->setConstructorArgs([['id' => 1, 'user_id' => 2]])\n ->setMethods(['_repository'])\n ->getMock();\n\n $comment\n ->expects($this->once())\n ->method('_repository')\n ->will($this->returnValue($this->Comments));\n\n $author = $comment->author;\n\n $this->assertEquals(2, $author->author_id);\n\n // ensure it is grabbed from _properties and not lazy loaded again (which calls repository())\n $comment->author;\n }", "title": "" }, { "docid": "77476cf587b371ab7b964b717149d04f", "score": "0.523559", "text": "public function testLazyloadException()\n {\n $entity = DynamicTestEntity::lazyload('foo');\n }", "title": "" }, { "docid": "0818b7c744c1c21e5fe1b3b434f207b7", "score": "0.5194262", "text": "public function init_objects() {\n\t\t$this->collection = new Entities\\Collection();\n\t\t$this->collection_repository = Repositories\\Collections::get_instance();\n\t\t\n\t\t$this->metadatum_repository = Repositories\\Metadata::get_instance();\n\t\t\n\t\t$this->filter_repository = Repositories\\Filters::get_instance();\n\t}", "title": "" }, { "docid": "ba3a5b4b90ec9beae285cc8c76b77dc5", "score": "0.51827604", "text": "protected function attachLoad(&$queried_entities, $load_revision = FALSE) {\n // Map the loaded stdclass records into entity objects and according fields.\n $queried_entities = $this->mapFromStorageRecords($queried_entities, $load_revision);\n parent::attachLoad($queried_entities, $load_revision);\n }", "title": "" }, { "docid": "bd21a45a5756557893ed7f9f62d934d0", "score": "0.513953", "text": "private function loadEntityData(){\n $this->loadEntityName();\n $this->loadFields();\n }", "title": "" }, { "docid": "121d1a81e845b72937bea54e812e2ccd", "score": "0.5136698", "text": "public function __construct()\n {\n $this->dependency = new ReferencedEntity();\n }", "title": "" }, { "docid": "25e603d8de654d8f27773c9f5fae1b47", "score": "0.5131855", "text": "protected function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)\n {\n $a = new \\Doctrine\\ORM\\Configuration();\n\n $b = new \\Doctrine\\Persistence\\Mapping\\Driver\\MappingDriverChain();\n\n $c = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver(($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService()), [0 => (\\dirname(__DIR__, 4).'\\\\src\\\\Entity'), 1 => (\\dirname(__DIR__, 4).'\\\\vendor\\\\cron\\\\cron-bundle\\\\Entity')]);\n\n $b->addDriver($c, 'App\\\\Entity');\n $b->addDriver($c, 'Cron\\\\CronBundle\\\\Entity');\n\n $a->setEntityNamespaces(['App' => 'App\\\\Entity', 'CronCronBundle' => 'Cron\\\\CronBundle\\\\Entity']);\n $a->setMetadataCacheImpl(new \\Symfony\\Component\\Cache\\DoctrineProvider(($this->privates['cache.doctrine.orm.default.metadata'] ?? $this->getCache_Doctrine_Orm_Default_MetadataService())));\n $a->setQueryCacheImpl(new \\Symfony\\Component\\Cache\\DoctrineProvider(($this->privates['cache.doctrine.orm.default.query'] ?? $this->getCache_Doctrine_Orm_Default_QueryService())));\n $a->setResultCacheImpl(new \\Symfony\\Component\\Cache\\DoctrineProvider(($this->privates['cache.doctrine.orm.default.result'] ?? $this->getCache_Doctrine_Orm_Default_ResultService())));\n $a->setMetadataDriverImpl($b);\n $a->setProxyDir(($this->targetDir.''.'/doctrine/orm/Proxies'));\n $a->setProxyNamespace('Proxies');\n $a->setAutoGenerateProxyClasses(true);\n $a->setClassMetadataFactoryName('Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory');\n $a->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $a->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy(0, true));\n $a->setQuoteStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy());\n $a->setEntityListenerResolver(new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerEntityListenerResolver($this));\n $a->setRepositoryFactory(new \\Doctrine\\Bundle\\DoctrineBundle\\Repository\\ContainerRepositoryFactory(new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($this->getService, [\n 'App\\\\Repository\\\\ShowVisitRepository' => ['privates', 'App\\\\Repository\\\\ShowVisitRepository', 'getShowVisitRepositoryService', true],\n 'App\\\\Repository\\\\UserRepository' => ['privates', 'App\\\\Repository\\\\UserRepository', 'getUserRepositoryService', true],\n ], [\n 'App\\\\Repository\\\\ShowVisitRepository' => '?',\n 'App\\\\Repository\\\\UserRepository' => '?',\n ])));\n\n $this->services['doctrine.orm.default_entity_manager'] = $instance = \\Doctrine\\ORM\\EntityManager::create(($this->services['doctrine.dbal.default_connection'] ?? $this->getDoctrine_Dbal_DefaultConnectionService()), $a);\n\n (new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator([], []))->configure($instance);\n\n return $instance;\n }", "title": "" }, { "docid": "e2161564503d788c1444e9ba86a759f2", "score": "0.5125482", "text": "public function clearProxies() {\n $models = $this->getModels();\n foreach ($models as $model) {\n $model->clearProxies();\n }\n }", "title": "" }, { "docid": "11dd122b39702f3d9c4d03d319c59188", "score": "0.50487226", "text": "private function loadMetadata() {\n\t\t$this->tcMeta = $this->em->getClassMetadata('OcTaxClass');\n\t\t$this->trMeta = $this->em->getClassMetadata('OcTaxRate');\n\t}", "title": "" }, { "docid": "52ceb982bcd757c7702d20cf8bdbef5a", "score": "0.5045527", "text": "abstract public function setEntity($entity);", "title": "" }, { "docid": "b00beb5a648dbbfd4201f246a6e010ae", "score": "0.5003666", "text": "protected function hydrate()\n {\n $properties = $this->propertiesFromAttributes() + $this->unmanagedProperties;\n\n $attributesName = $this->entityMap->getAttributesArrayName();\n\n if (isset($properties[$attributesName])) {\n $properties[$attributesName] = $this->entityMap->getAttributeNamesFromColumns($properties[$attributesName]);\n } else {\n $properties[$attributesName] = $this->entityMap->getAttributeNamesFromColumns($properties);\n }\n\n // In some case, attributes will miss some properties, so we'll just complete the hydration\n // set with the original object properties\n $missingProperties = array_diff_key($this->properties, $properties);\n\n foreach (array_keys($missingProperties) as $missingKey) {\n $properties[$missingKey] = $this->properties[$missingKey];\n }\n\n $this->hydrator->hydrate($properties, $this->entity);\n\n $this->touched = false;\n }", "title": "" }, { "docid": "8e6fd492c351e2100d040492f7acffb8", "score": "0.5003179", "text": "protected function lazyLoadItself()\n {\n if (!isset($this->service)) {\n $this->service = $this->container->get($this->drupalProxyOriginalServiceId);\n }\n\n return $this->service;\n }", "title": "" }, { "docid": "404cae8985d42ff877f9f1ecdbc9749e", "score": "0.49746948", "text": "public function setEntity(Entity &$entity);", "title": "" }, { "docid": "8f7dfb3c512e8eec7fcd96f9fe92db10", "score": "0.49663407", "text": "public function setEntities($entities)\n {\n $this->entities = $entities;\n }", "title": "" }, { "docid": "5be49824f16746d5d896b668a53ef642", "score": "0.49658108", "text": "function set(Entity $entity);", "title": "" }, { "docid": "ab7ceb896f29c61fdec03c093857f6c8", "score": "0.4945029", "text": "public function setEntityCache(Cache\\EntityCache $cache)\n\t{\n\t\t$this->entityCache = $cache;\n\t}", "title": "" }, { "docid": "24b75188949fd2122f5e216366da1569", "score": "0.4929549", "text": "function setEntity($entity) {\n $this->entity = $entity;\n }", "title": "" }, { "docid": "63ec1f00d31bdad02db8f6e352b58180", "score": "0.49243167", "text": "public function loadClassMetadata(LoadClassMetadataEventArgs $args)\n {\n /* @var $cm \\Doctrine\\ORM\\Mapping\\ClassMetadata */\n $cm = $args->getClassMetadata();\n\n foreach ($cm->associationMappings as $mapping) {\n if (isset($this->resolveTargetEntities[$mapping['targetEntity']])) {\n $this->remapAssociation($cm, $mapping);\n }\n }\n\n foreach ($this->resolveTargetEntities as $interface => $data) {\n if ($data['targetEntity'] == $cm->getName()) {\n $args->getEntityManager()->getMetadataFactory()->setMetadataFor($interface, $cm);\n }\n }\n }", "title": "" }, { "docid": "582bca1030845559540f54efd4ad16b6", "score": "0.4923753", "text": "protected function setUp(): void\n {\n parent::setUp();\n $this->innerDriver = $this->createMock(MappingDriver::class);\n $this->driver = new EntityListDriverDecorator($this->innerDriver, array(\n 'My\\Namespace\\Person',\n 'My\\Namespace\\Address'\n ));\n }", "title": "" }, { "docid": "23aec6cdffff2e36fc4a3189905507fd", "score": "0.49230012", "text": "public function __construct($lazy=true) {\n\t\t$this->_farmID = false;\n\t\tif($lazy) {\n\t\t\t$this->setBuilder(new Application_Model_Builder_Farm())\n\t\t\t\t->allowLazyLoad();\n\t\t}\n\t}", "title": "" }, { "docid": "42a356a3b5a68a1f14b32f1cabd62a03", "score": "0.49193454", "text": "public function getEntityPrefetcher();", "title": "" }, { "docid": "c3bd1faa8fa17ed42539c686e31bef75", "score": "0.49154812", "text": "public function __construct() {\n list($usec, $sec) = explode(\" \", microtime(false));\n $this->id = $sec * 1000000 + (int) ($usec * 1000000);\n \n // Register ref\n $class = get_called_class();\n self::$refs[$class][$this->id] = $this;\n\n // Init all empty ManyToManyDatasets using annotations\n self::analyze_class($class);\n foreach (self::$m2m_relations[$class] as $target_class => $property) {\n $this->$property = new ManyToManyRelation($target_class, $this);\n //$reflectionProperty->setValue($this, new ManyToManyDataset($target, $this));\n }\n }", "title": "" }, { "docid": "6b2ab655eefd92e109c0e0e4a8b519fa", "score": "0.49130383", "text": "public function testDeepLazyLoad()\n {\n $this->Comments = $this->getTableLocator()->get('Comments');\n $this->Comments->setEntityClass(LazyLoadableEntity::class);\n $this->Comments->belongsTo('Users');\n\n $article = $this->Articles->get(1);\n\n $comments = $article->comments;\n\n $expected = [\n 1 => 'nate',\n 2 => 'garrett',\n 3 => 'mariano',\n 4 => 'mariano',\n ];\n foreach ($comments as $comment) {\n $this->assertEquals($expected[$comment->id], $comment->user->username);\n }\n }", "title": "" }, { "docid": "394e0bdecc25286259dd56fdb1dfa22a", "score": "0.4906736", "text": "public function setObjects($objects)\n {\n $this->objects = $objects;\n\n // prevent lazy loading, since we've populated the data manually\n $this->loaded = true;\n\n return $this;\n }", "title": "" }, { "docid": "8c7f6f6d2bfaf5d3130b27de15533644", "score": "0.4903125", "text": "public function __construct()\n {\n require APPPATH.'config/database.php';\n\n\n //A Doctrine Autoloader is needed to load the models\n // first argument of classloader is namespace and second argument is path\n // setup models/entity namespace\n $entityLoader = new ClassLoader('models', APPPATH);\n $entityLoader->register();\n\n foreach (glob(APPPATH.'modules/*', GLOB_ONLYDIR) as $m) {\n $module = str_replace(APPPATH.'modules/', '', $m);\n $entityLoader = new ClassLoader($module, APPPATH.'modules');\n $entityLoader->register();\n }\n //Register proxies namespace\n $proxyLoader = new ClassLoader('Proxies', APPPATH.'Proxies');\n $proxyLoader->register();\n\n\n // Set up caches\n $config = new Configuration;\n $cache = new ArrayCache;\n $config->setMetadataCacheImpl($cache);\n $driverImpl = $config->newDefaultAnnotationDriver(array(APPPATH.'models'));\n $config->setMetadataDriverImpl($driverImpl);\n $config->setQueryCacheImpl($cache);\n\n // Set up entity\n $reader = new AnnotationReader($cache);\n $models = array(APPPATH.'models');\n foreach (glob(APPPATH.'modules/*/models', GLOB_ONLYDIR) as $m)\n array_push($models, $m);\n $driver = new AnnotationDriver($reader, $models);\n $config->setMetadataDriverImpl($driver);\n\n // Setup Gedmo\n $cachedAnnotationReader = new Doctrine\\Common\\Annotations\\CachedReader(\n $reader, // use reader\n $cache // and a cache driver\n );\n\n // create a driver chain for metadata reading\n $driverChain = new Doctrine\\ORM\\Mapping\\Driver\\DriverChain();\n \n // load superclass metadata mapping only, into driver chain\n // also registers Gedmo annotations.NOTE: you can personalize it\n Gedmo\\DoctrineExtensions::registerAbstractMappingIntoDriverChainORM(\n $driverChain, // our metadata driver chain, to hook into\n $cachedAnnotationReader // our cached annotation reader\n );\n\n $event = new EventManager;\n \n $timestampableListener = new TimestampableListener;\n $timestampableListener->setAnnotationReader($cachedAnnotationReader);\n $event->addEventSubscriber($timestampableListener);\n\n $slugListener = new SluggableListener;\n $slugListener->setAnnotationReader($cachedAnnotationReader);\n $event->addEventSubscriber($slugListener);\n\n\n // Proxy configuration\n $config->setProxyDir(APPPATH.'/proxies');\n $config->setProxyNamespace('Proxies');\n\n // Set up logger\n // $logger = new EchoSQLLogger;\n // $config->setSQLLogger($logger);\n\n $config->setAutoGenerateProxyClasses( TRUE );\n\n // Database connection information\n $connectionOptions = array(\n 'driver' => 'pdo_mysql',\n 'user' => $db['default']['username'],\n 'password' => $db['default']['password'],\n 'host' => $db['default']['hostname'],\n 'dbname' => $db['default']['database']\n );\n\n // Create EntityManager\n $this->em = EntityManager::create($connectionOptions, $config, $event);\n }", "title": "" }, { "docid": "ee8c7fb03bbafc3bce6d421a4c70320f", "score": "0.4895839", "text": "public function setObjects()\n {\n foreach($this->parameters as $key => $value)\n {\n if(!in_array($key, self::$PROTECTED_LOCAL_VARIABLES))\n {\n $this->$key = $value;\n }\n }\n }", "title": "" }, { "docid": "d750ebc104c35ff269ff95258a78f19f", "score": "0.48660734", "text": "function load(ObjectManager $manager)\n {\n $data = $this->getData();\n\n foreach ($data as $siteData) {\n $site = new Site();\n $site->setCategory($this->getReference('category_' . $siteData['category']));\n $site->setTitle($siteData['title']);\n $site->setRootUrl($siteData['url']);\n $site->setOwner($this->getReference($siteData['reference']));\n $manager->persist($site);\n $this->addReference($siteData['referenceSite'], $site);\n $manager->flush();\n }\n\n }", "title": "" }, { "docid": "1a5d8cd33c8a28b07f075429a18a3b2d", "score": "0.48647258", "text": "public function loadClassMetadata(LoadClassMetadataEventArgs $args)\n {\n $cm = $args->getClassMetadata();\n\n foreach ($cm->associationMappings as $mapping) {\n if (isset($this->resolveTargetEntities[$mapping['targetEntity']])) {\n $this->remapAssociation($cm, $mapping);\n }\n }\n\n foreach ($this->resolveTargetEntities as $interface => $data) {\n if ($data['targetEntity'] === $cm->getName()) {\n $args->getEntityManager()->getMetadataFactory()->setMetadataFor($interface, $cm);\n }\n }\n\n foreach ($cm->discriminatorMap as $value => $class) {\n if (isset($this->resolveTargetEntities[$class])) {\n $cm->addDiscriminatorMapClass($value, $this->resolveTargetEntities[$class]['targetEntity']);\n }\n }\n }", "title": "" }, { "docid": "7b21312f74f11d0793845e0ecfc9da52", "score": "0.4859202", "text": "abstract protected function _modEagerFetch($eager, $fetch);", "title": "" }, { "docid": "19f1c1816f4058a3b2796a51402dedfe", "score": "0.48465058", "text": "protected function attachLoad(&$queried_entities, $revision_id = FALSE) {\n $this->helper->reCast($queried_entities);\n parent::attachLoad($queried_entities, $revision_id);\n }", "title": "" }, { "docid": "7a3718d3feef0aa383932825d4ccd9e2", "score": "0.48439923", "text": "public function __construct() {\n\t\t$this->getEntityManager();\n\t}", "title": "" }, { "docid": "bf17f1aec427a7c6020cfb9ebe0216c2", "score": "0.48332757", "text": "public function setEntity($val) {\n $this->_entity = $val;\n }", "title": "" }, { "docid": "4ca580b1495457cd456c1a77726a96ee", "score": "0.48199794", "text": "public function populate($entityData) {\n foreach($entityData as $field => $value) {\n if(property_exists($this, $field) && !is_object($this->{$field})) {\n $this->{$field} = $value;\n }\n }\n\n foreach($this as $field => $value) {\n if(is_object($value)) {\n /** @var BaseEntity $value */\n $value->populate($entityData);\n }\n }\n }", "title": "" }, { "docid": "c1b6d51f3df5a4f9c7c846d817e0f310", "score": "0.48020956", "text": "public function setEntity(EntityInterface $entity);", "title": "" }, { "docid": "2d17371161626b08be02d608cd0fef3a", "score": "0.47950315", "text": "protected function setUpMockEntities() {\n // Only initial mock entities once.\n if (isset($this->node)) {\n return;\n }\n\n /* node entities */\n\n $this->node = $this->getMockBuilder('Drupal\\node\\NodeInterface')\n ->disableOriginalConstructor()\n ->getMock();\n $this->node->expects($this->any())\n ->method('label')\n ->will($this->returnValue('{node}'));\n $this->node->expects($this->any())\n ->method('getEntityTypeId')\n ->will($this->returnValue('node'));\n $this->node->expects($this->any())\n ->method('id')\n ->will($this->returnValue('1'));\n $this->node->expects($this->any())\n ->method('toLink')\n ->will($this->returnValue(Link::createFromRoute('{node}', 'entity.node.canonical', ['node' => 1])));\n\n $this->nodeAccess = clone $this->node;\n $this->nodeAccess->expects($this->any())\n ->method('access')\n ->will($this->returnValue(TRUE));\n\n /* webform entities */\n\n $this->webform = $this->getMockBuilder('Drupal\\webform\\WebformInterface')\n ->disableOriginalConstructor()\n ->getMock();\n $this->webform->expects($this->any())\n ->method('label')\n ->will($this->returnValue('{webform}'));\n $this->webform->expects($this->any())\n ->method('id')\n ->will($this->returnValue(1));\n\n $this->webformAccess = clone $this->webform;\n $this->webformAccess->expects($this->any())\n ->method('access')\n ->will($this->returnValue(TRUE));\n\n $this->webformTemplate = clone $this->webformAccess;\n $this->webformTemplate->expects($this->any())\n ->method('isTemplate')\n ->will($this->returnValue(TRUE));\n\n /* webform submission entities */\n\n $this->webformSubmission = $this->getMockBuilder('Drupal\\webform\\WebformSubmissionInterface')\n ->disableOriginalConstructor()\n ->getMock();\n $this->webformSubmission->expects($this->any())\n ->method('getWebform')\n ->will($this->returnValue($this->webform));\n $this->webformSubmission->expects($this->any())\n ->method('label')\n ->will($this->returnValue('{webform_submission}'));\n $this->webformSubmission->expects($this->any())\n ->method('id')\n ->will($this->returnValue(1));\n\n $this->webformSubmissionAccess = clone $this->webformSubmission;\n $this->webformSubmissionAccess->expects($this->any())\n ->method('access')\n ->will($this->returnValue(TRUE));\n }", "title": "" }, { "docid": "d7f9ebc6297751ac205fe4ceba527c00", "score": "0.47920257", "text": "public function setProxy($proxy) {\r\n\t\t$this->proxy = $proxy;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "28b26b5881d16a871debf97cbc02000c", "score": "0.47880954", "text": "public function setRelatedEntity($entity)\n { \n if (is_null($entity)) {\n \n if (! $this->entityLoaded) {\n $this->getRelatedEntity();\n }\n if (!is_null($this->relatedEntity)) {\n if ($this->reverse) {\n $this->owner->{$this->foreignKey} = 0;\n } else {\n $this->relatedEntity->{$this->foreignKey} = 0;\n $this->uowUpdate = $this->relatedEntity;\n }\n }\n \n } elseif (! $entity instanceof AbstractEntity) {\n \n $entClassName = str_replace(' ', '', ucwords(str_replace('_', ' ', $this->table)));\n throw new MapperException(\"{$entClassName} must be instance of AbstractEntity\");\n \n } else {\n \n if (! $this->entityLoaded) {\n $this->getRelatedEntity();\n }\n \n if (is_null($this->relatedEntity)) {\n if ($this->reverse) {\n $this->owner->{$this->foreignKey} = $entity->getPkValue();\n } else {\n $entity->{$this->foreignKey} = $this->owner->getPkValue();\n $this->uowUpdate = $entity;\n }\n }\n }\n \n $this->relatedEntity = $entity;\n $this->entityLoaded = true;\n }", "title": "" }, { "docid": "85eb7dc6d5db8781f431803523d11e6a", "score": "0.477253", "text": "protected function loadCollection()\n {\n if ($this->collectionLoaded) {\n return;\n }\n\n\n $ot = $this->owner->getTable();\n $pk = $this->owner->getPk();\n\n $ct = $this->table;\n $fk = $this->foreignKey;\n\n $classParts = explode('\\\\', get_class($this->owner));\n array_pop($classParts);\n\n $entClassName = str_replace(' ', '', ucwords(str_replace('_', ' ', $this->table)));\n $entFqn = implode('\\\\', $classParts) . '\\\\' . $entClassName;\n\n $query = new Query(Flame::getAdapter());\n $query->select('c.*')\n ->from(\"{$ot} AS o INNER JOIN {$ct} AS c ON (o.{$pk} = c.{$fk})\")\n ->where(\"o.{$pk} = :pk\");\n\n if ($this->sortable) {\n $query->order('c.sort', 'DESC');\n }\n\n $query->setParam('pk', $this->owner->getPkValue())\n ->fetchAsClass($entFqn)\n ->execute();\n\n $reverseSetter = 'set'. str_replace(' ', '', ucwords(str_replace('_', ' ', $ot)));\n\n while ($ent = $query->fetch()) {\n $ent->$reverseSetter($this->owner);\n $this->collection[] = $ent;\n }\n $this->collectionLoaded = true;\n\n }", "title": "" }, { "docid": "0a5629d1248bd9980de01b3ffa7394c3", "score": "0.47612888", "text": "public function setEntities( array $entities )\n {\n $this->_iterator = new ArrayIterator( $entities );\n return $this;\n }", "title": "" }, { "docid": "bd98d260b515803463b751d7920e9a5c", "score": "0.476", "text": "function __construct($entity)\n {\n //Create the reflection class used internally\n $this->entityClassName = get_class($entity);\n $this->reflectionClass = new \\ReflectionClass($this->entityClassName);\n\n $this->loadRepositoryData();\n $this->loadEntityData();\n }", "title": "" }, { "docid": "6bebc626408a532873f3ccc2527c4e9e", "score": "0.47537032", "text": "public function setSourceProperties() {\r\n $properties = $this->getProperty('properties');\r\n if (!empty($properties)) {\r\n $properties = is_array($properties) ? $properties : $this->modx->fromJSON($properties);\r\n $this->object->setProperties($properties);\r\n }\r\n }", "title": "" }, { "docid": "ac99e0252f3bd4028b5dee024afbea8f", "score": "0.47533077", "text": "protected function setUp()\n {\n $this->object = new RelatedSet;\n }", "title": "" }, { "docid": "4e5eb6c17ad8b3a6b66958d32205318c", "score": "0.47472146", "text": "public function _initDoctrine() {\n\n require_once('Doctrine/Common/ClassLoader.php');\n\n $doctrineConfig = $this->getOption('doctrine');\n\n $classLoader = new \\Doctrine\\Common\\ClassLoader(\n 'Doctrine', APPLICATION_PATH . '/../library/'\n );\n $classLoader->register();\n\n $config = new \\Doctrine\\ORM\\Configuration();\n\n $cache = new \\Doctrine\\Common\\Cache\\ArrayCache;\n $config->setMetadataCacheImpl($cache);\n $config->setQueryCacheImpl($cache);\n $config->setProxyDir(APPLICATION_PATH . '/../Proxies');\n $config->setProxyNamespace('App\\Proxies');\n\n $driverImpl = $config->newDefaultAnnotationDriver(\n array(APPLICATION_PATH . '/models')\n );\n $config->setMetadataDriverImpl($driverImpl);\n\n $sqlLogger = new \\Doctrine\\DBAL\\Logging\\DebugStack();\n $config->setSQLLogger($sqlLogger);\n\n $connectionOptions = array(\n 'driver' => $doctrineConfig['conn']['driver'],\n 'path' => $doctrineConfig['conn']['path'],\n );\n\n $em = \\Doctrine\\ORM\\EntityManager::create($connectionOptions, $config);\n\n Zend_Registry::getInstance()->set('entitymanager', $em);\n\n return $em;\n }", "title": "" }, { "docid": "cb2cd3a0802c73ff095c3ab0ee1f3c5a", "score": "0.47462723", "text": "public function hydrate(\n ObjectInterface $object,\n ResolvedFixtureSet $fixtureSet,\n GenerationContext $context\n ): ResolvedFixtureSet;", "title": "" }, { "docid": "095769a7337329d88fd3cb7170d7fa29", "score": "0.47458488", "text": "public function loadEntities(&$results) {}", "title": "" }, { "docid": "8685125a17fb266c38227a7b8dcd5cd1", "score": "0.4742405", "text": "public function __wakeup()\n {\n // Load the definition for this object if required.\n $this->definition = DDefinition::load(get_class($this));\n // Link the fields from the definition to the DDefinableObject::$fields property\n // so that the functions defined in DDefinableObject trait work correctly.\n $this->fields =& $this->definition->fields;\n $this->originalData =& $this->originalValues;\n }", "title": "" }, { "docid": "5b114fdc1bdfb50abcd78f0959658853", "score": "0.4741896", "text": "public function testUnsetEagerLoadedProperty()\n {\n $this->Comments = $this->getTableLocator()->get('Comments');\n $this->Comments->setEntityClass(LazyLoadableEntity::class);\n $this->Comments->belongsTo('Authors', [\n 'foreignKey' => 'user_id'\n ]);\n\n $comment = $this->Comments->find()\n ->contain(['Authors'])\n ->first();\n\n $this->assertInstanceOf(EntityInterface::class, $comment->author);\n $comment->unset('author');\n $this->assertNull($comment->author);\n }", "title": "" }, { "docid": "eb7824e754ac0fcf2c4db70a857212df", "score": "0.47367093", "text": "protected function _initEntityTypes()\n {\n if (is_array($this->_entityTypes)) {\n return $this;\n }\n\n Varien_Profiler::start('EAV: ' . __METHOD__);\n /**\n * try load information about entity types from cache\n */\n $cache = $this->_loadDataFromCache(self::ENTITIES_CACHE_ID);\n if ($cache) {\n list($this->_entityTypes, $this->_references['entity']) = unserialize($cache);\n Varien_Profiler::stop('EAV: ' . __METHOD__);\n\n return $this;\n }\n\n $this->_entityTypes = array();\n $entityTypeCollection = Mage::getResourceModel('eav/entity_type_collection');\n if ($entityTypeCollection->count() > 0) {\n /** @var $entityType Mage_Eav_Model_Entity_Type */\n foreach ($entityTypeCollection as $entityType) {\n $entityTypeCode = $entityType->getData('entity_type_code');\n $this->_entityTypes[$entityTypeCode] = $entityType;\n $this->_addEntityTypeReference($entityType->getData('entity_type_id'), $entityTypeCode);\n }\n }\n\n // we don't save entity types to cache here because entity type attribute codes aren't set at this point yet\n Varien_Profiler::stop('EAV: ' . __METHOD__);\n\n return $this;\n }", "title": "" }, { "docid": "30ccc9aa23b81ee8ead1b1aa42e42218", "score": "0.47354066", "text": "protected function setProperties($loadedProperties) {\n $this->properties = $loadedProperties;\n }", "title": "" }, { "docid": "59c5339518f4b41a88021603166ed1c5", "score": "0.47332832", "text": "public function disable_lazyload() {\n\t\t$this->set_setting( 'lazyload', false );\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "634e5b57fe6dfd4d9ac9eb8481cb0c63", "score": "0.4725662", "text": "public function init_objects() {\n\t\t$this->term = new Entities\\Term();\n\t\t$this->terms_repository = new Repositories\\Terms();\n\t\t$this->taxonomy = new Entities\\Taxonomy();\n\t\t$this->taxonomy_repository = new Repositories\\Taxonomies();\n\t}", "title": "" }, { "docid": "1f5aff3780000f6c85d96d26b0ad1e07", "score": "0.47213086", "text": "public function testHasLazyLoadsOnce()\n {\n $this->Comments = $this->getTableLocator()->get('Comments');\n $this->Comments->belongsTo('Authors', [\n 'foreignKey' => 'user_id'\n ]);\n\n $comment = $this->getMockBuilder(Comment::class)\n ->setConstructorArgs([['id' => 1, 'user_id' => 2]])\n ->setMethods(['_repository'])\n ->getMock();\n\n $comment\n ->expects($this->once())\n ->method('_repository')\n ->will($this->returnValue($this->Comments));\n\n $this->assertTrue($comment->has('author'));\n\n // ensure it is grabbed from _properties and not lazy loaded again (which calls repository())\n $this->assertTrue($comment->has('author'));\n }", "title": "" }, { "docid": "91a601dd89a6dbc00cac5b43aa26f09c", "score": "0.47187996", "text": "public function setEntity(Varien_Object $entity)\n {\n $this->_entity = $entity;\n return $this;\n }", "title": "" }, { "docid": "6f08b6bf2b9d435ba94f74dac6f19a03", "score": "0.47126162", "text": "public function processEagerLoading($entities, $resourceDefinition = null, ContextContract $context = null)\n {\n if (!$resourceDefinition) {\n return;\n }\n\n $resourceDefinitionFactory = $this->getResourceDefinitionFactory($resourceDefinition);\n $definition = $resourceDefinitionFactory->getDefault();\n\n // Now check for query parameters\n foreach ($definition->getFields() as $field) {\n\n $this->currentPath->push($field);\n\n if (\n $field instanceof RelationshipField &&\n $this->shouldInclude($field, $context) &&\n $this->shouldExpand($field, $context)\n ) {\n $this->getQueryAdapter()->eagerLoadRelationship($this, $entities, $field, $context);\n }\n\n $this->currentPath->pop();\n }\n }", "title": "" }, { "docid": "7e683a10175174f06b4392c928a0e011", "score": "0.46996087", "text": "function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE) {\n if ($reset) {\n entity_get_controller($entity_type)->resetCache();\n }\n return entity_get_controller($entity_type)->load($ids, $conditions);\n}", "title": "" }, { "docid": "798d562278c5d566daf6490a68eec319", "score": "0.46930006", "text": "public function __construct() {\n\t\t$this->setEntityManager();\n\t}", "title": "" }, { "docid": "ff9b2fb9925a33566efa651ccc38812d", "score": "0.46895698", "text": "public function setProxy($proxy)\n {\n $this->proxy = $proxy;\n }", "title": "" }, { "docid": "ff9b2fb9925a33566efa651ccc38812d", "score": "0.46895698", "text": "public function setProxy($proxy)\n {\n $this->proxy = $proxy;\n }", "title": "" }, { "docid": "47f8bf61745dae6a90e4a9f996a137fd", "score": "0.46863997", "text": "public function setProxy($proxy)\n {\n $this->proxy = $proxy;\n return $this;\n }", "title": "" }, { "docid": "04e54932757049e57b671c7b37f26ccd", "score": "0.46861732", "text": "function load(ObjectManager $manager)\n {\n $data = $this->getData();\n\n foreach ($data as $pageData) {\n $page = new Page();\n $page->setUrl($pageData['url']);\n $page->setLevel($pageData['level']);\n $page->setPrice($pageData['price']);\n $page->setCapacity($pageData['capacity']);\n $page->setPageRank($pageData['page_rank']);\n $page->setState($pageData['state']);\n\n $page->setSite($this->getReference($pageData['referenceSite']));\n $manager->persist($page);\n\n $manager->flush();\n }\n\n }", "title": "" }, { "docid": "135f663da35e1f84180cb0c973ccf7ee", "score": "0.46781203", "text": "public function augmentLoadLazyFields(SQLQuery &$query, &$dataQuery, $parent)\n {\n $dataQuery->innerJoin('BlogPost', '\"SiteTree\".\"ID\" = \"BlogPost\".\"ID\"');\n }", "title": "" }, { "docid": "4d4fe0021f308984230ea387f23f10de", "score": "0.46755272", "text": "protected function trustProxies()\n {\n $this->request->setTrustedProxies($this->request->getClientIps());\n }", "title": "" }, { "docid": "adb54eb0e36f5ad53fe473bb8bfcf16a", "score": "0.46606317", "text": "protected function initPropertyCache()\n {\n $class = get_class($this);\n $reflection = $this->getReflectionClass();\n $propertyList = $reflection->getProperties(ReflectionProperty::IS_PUBLIC);\n if (!isset(self::$propertyCache)) {\n self::$propertyCache = [];\n }\n if (!isset(self::$propertyCache[$class])) {\n self::$propertyCache[$class] = [];\n } else {\n return;\n }\n foreach ($propertyList as $item) {\n $docComment = $item->getDocComment();\n if (self::isCxField($docComment)) {\n self::$propertyCache[$class][$item->getName()] = [\n 'value_class' => self::getVar($docComment, 'value_class'),\n 'targetEntity' => self::getAssociationTarget($docComment),\n 'OneToOne' => self::isOneToOneAssociation($docComment),\n 'OneToMany' => self::isOneToManyAssociation($docComment),\n ];\n }\n }\n }", "title": "" }, { "docid": "918bc043f9039c67922a7b1e7d27d119", "score": "0.4644711", "text": "public function initializeObject()\n {\n $this->contentObject = $this->configurationManager->getContentObject();\n }", "title": "" }, { "docid": "bba4a08d6753abf5034b1484ef4e5726", "score": "0.4641522", "text": "private function _lazyload()\n {\n if (!$this->do_lazyload) {\n return false;\n }\n\n $data = Users::getBySlackId($this->getTeamId(), $this->getSlackId());\n foreach (get_object_vars($data) as $key => $value) {\n $this->$key = $value;\n }\n return true;\n }", "title": "" }, { "docid": "cfc48155cd7d68da5b2d66ca1db37162", "score": "0.46413243", "text": "protected function retrieveEntities() {}", "title": "" }, { "docid": "ce54a34d53f3e349a6b81f6ad5a0b782", "score": "0.46308258", "text": "public function setMetadata(?EntityMetadata $metadata);", "title": "" }, { "docid": "3e73d0a24c82174bd761eead6ba8f22f", "score": "0.46304384", "text": "protected function bindProxy()\n\t{\n\t\t$this->app->bind('iverberk.larasearch.proxy', function ($app, $model)\n\t\t{\n\t\t\treturn new Proxy($model);\n\t\t});\n\t}", "title": "" }, { "docid": "52618c15bec5f1f5686144e23b46cab7", "score": "0.46230572", "text": "private function _loadRelatedInfo() {\n\t\t\t$nextClass = $this->_relatedClasses[ $this->_relatedInfoLoaded++ ];\n\t\t\t$runFunction = 'get' . ucfirst( $this->_foreignKey );\n\t\t\t$nextClassObj = new $nextClass();\n\t\t\t$nextClassObj->set( $this->_foreignKey . '||' . $this->$runFunction() );\n\n\t\t\tif( $nextClassObj->getResultCount() > 0 ) {\n\t\t\t\t$this->_recordArray = array_merge( $this->_recordArray, $nextClassObj->getRecord( 0 ) );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "15bc95bceb8351170b217a25fed29550", "score": "0.46213055", "text": "private function setPropertiesFromResponse(ResponseInterface $response, EntityInterface $entity): void\n {\n // Parse Edge response to a temporary entity (with the same type as $entity).\n // This is a crucial step because Edge response must be transformed before we would be able use it with some\n // of our setters (ex.: attributes).\n $tmp = $this->entityTransformer->deserialize(\n (string) $response->getBody(),\n get_class($entity),\n 'json'\n );\n $ro = new \\ReflectionObject($entity);\n // Copy property values from the temporary entity to $entity.\n foreach ($ro->getProperties() as $property) {\n $setter = 'set' . ucfirst($property->getName());\n $getter = 'get' . ucfirst($property->getName());\n // Ensure that these methods are exist. This is always true for all SDK entities but we can not be sure\n // about custom implementation.\n if ($ro->hasMethod($setter) && $ro->hasMethod($getter)) {\n $rm = new \\ReflectionMethod($entity, $setter);\n $value = $tmp->{$getter}();\n // Exclude null values.\n // (An entity property value is null (internally) if it is scalar and the Edge response from\n // the entity object has been created did not contain value for the property.)\n if (null !== $value) {\n $rm->invoke($entity, $value);\n }\n }\n }\n }", "title": "" }, { "docid": "aaf9cdbded93faad84c23ce7ca7a63da", "score": "0.46190557", "text": "public function testFindWithProxyName() : void\n {\n self::assertNotEquals(CmsUser::class, $this->proxyClassName);\n\n $result = $this->em->find($this->proxyClassName, $this->user->getId());\n\n self::assertSame($this->user->getId(), $result->getId());\n\n $this->em->clear();\n\n $result = $this->em->getReference($this->proxyClassName, $this->user->getId());\n\n self::assertSame($this->user->getId(), $result->getId());\n\n $this->em->clear();\n\n $result = $this->em->getRepository($this->proxyClassName)->findOneBy([\n 'username' => $this->user->username,\n ]);\n\n self::assertSame($this->user->getId(), $result->getId());\n\n $this->em->clear();\n\n $result = $this->em\n ->createQuery(sprintf('SELECT u FROM %s u WHERE u.id = ?1', $this->proxyClassName))\n ->setParameter(1, $this->user->getId())\n ->getSingleResult();\n\n self::assertSame($this->user->getId(), $result->getId());\n\n $this->em->clear();\n }", "title": "" }, { "docid": "cd41bb71679f82af23603594afcc3224", "score": "0.46177632", "text": "public function preFlush(PreFlushEventArgs $event)\n {\n if (!$this->accessControl->isAccess()) {\n return;\n }\n\n $em = $event->getEntityManager();\n $uow = $em->getUnitOfWork();\n\n /*\n * We need to use the IdentityMap, because the update and persist collection stores entities, that have\n * computed changes, but translation data might have changed without changing its underlying model!\n */\n foreach ($uow->getIdentityMap() as $class => $entities) {\n if ($this->metadataRepository->hasMetadata($class)) {\n foreach ($entities as $entity) {\n if (!($entity instanceof Proxy)) {\n $this->getTranslationManager()->detach($entity);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "6c67ce14fa6ba7ba7da328a447f0a9d2", "score": "0.46154648", "text": "public function load(ObjectManager $manager)\n {\n\n\n for( $i = 1; $i <= PageFixtures::MAX; $i++){\n /** @var Page $page */\n $page = $this->getReference( PageFixtures::PAGE_REFERENCE.$i);\n\n $lorem = file_get_contents(self::URL);\n for( $y = 1; $y <= self::MAX; $y++){\n\n $article = new Article();\n $article->setPage($page);\n $article->setDescription($lorem);\n\n $manager->persist($article);\n $this->addReference(self::ARTICLE_REFERENCE.$i.'_'.$y, $article);\n\n }\n }\n\n $manager->flush();\n }", "title": "" }, { "docid": "26942cd8c41ee77e79971df9eae2c0a4", "score": "0.46150252", "text": "public function the_uql_load_all_entities()\n {\n $entity_count = @count ($this->uql_entity_list);\n for($i = 0; $i < $entity_count; $i++)\n $this->the_uql_load_entity($this->uql_entity_list[$i]);\n }", "title": "" }, { "docid": "5a963ed50795c2aaf65ebba521390649", "score": "0.46144637", "text": "public function hydrate()\n {\n /**@var self $request */\n $request = app()->make(self::class);\n\n foreach ($request->captured as $prop){\n $this->{$prop} = $request->{$prop};\n }\n }", "title": "" }, { "docid": "219781a610893b8404c11d0d8423d8b5", "score": "0.46103805", "text": "public function getLazyRelationshipsAttribute()\n {\n return ['commentable'];\n }", "title": "" }, { "docid": "397f21688e99d8142210099034e01efd", "score": "0.46076888", "text": "public function __construct()\n {\n parent::__construct();\n\n if (get_class($this) !== 'MY_Model') {\n $datas = get_object_vars($this);\n\n if (! empty($datas)) {\n foreach ($datas as $key => $value) {\n if (! empty($value)) {\n Manager()->stackMap(get_class($this), 'Entity.'.$value, $key);\n $this->$key = null;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "b53b021cc18414a17cbbdfe1e09b6dcb", "score": "0.46024936", "text": "protected function getRelationsToProxy()\n {\n $proxies = [];\n $attributes = $this->getEntityAttributes();\n\n foreach ($this->entityMap->getNonEmbeddedRelationships() as $relation) {\n //foreach ($this->entityMap->getRelationships() as $relation) {\n\n if (!array_key_exists($relation, $attributes) || is_null($attributes[$relation])) {\n $proxies[] = $relation;\n }\n }\n\n return $proxies;\n }", "title": "" }, { "docid": "5c287618bdcf8df482867f62d2c3fc90", "score": "0.45952123", "text": "public function init()\n {\n $this->_collection = new Flickr_Model_Collection();\n $this->_collection->find($this->_collectionId);\n $this->_photosets = $this->_collection->getPhotosets();\n\n $this->_blog = new Blogger_Model_Blog();\n $this->_blog->find($this->_blogId);\n }", "title": "" } ]
7893098a23ef9b8c83d7e5eda8882a9b
Determine if the validation rule passes.
[ { "docid": "02743916d2f9d6029e0f3b509ae420de", "score": "0.0", "text": "public function passes($attribute, $value)\n {\n $patient_id = Patient::where('reg_number', $value)->value('id');\n $setting = Setting::where('setting_type','sell_pills_without_insurance' )->value('value');\n if($setting) {\n return true;\n } \n else {\n $isActive = Insurance::where('patient_id', $patient_id)->value('is_active');\n return $isActive;\n }\n }", "title": "" } ]
[ { "docid": "70f9d03bf913e1fafab4f7b7dc5977c9", "score": "0.79176104", "text": "public function passes()\n {\n $rules = array_merge($this->rules, $this->rules());\n\n $validator = $this->validator->make($this->data, $rules);\n\n if ($validator->fails()) {\n $this->errors = $validator->messages();\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "2e42ca3077b3a7642caefdcafa19089f", "score": "0.7879133", "text": "public function passes(){\n\t\t\treturn $this->validator->passes();\n\t}", "title": "" }, { "docid": "f4ac7eb4ef7ae06d0edbd5ba39a151f2", "score": "0.7577624", "text": "public function passes()\n\t{\n\t\t//the static rules will be passed from the login class in the services\\validators folder\n\t\t$validation = \\Validator::make($this->input, static::$rules);\n\n\t\tif($validation->passes())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t//store all the error messages in the errors property\n\t\t$this->errors = $validation->messages();\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f829c7d0f7df63e0b43e693a35252a5a", "score": "0.7412009", "text": "private function _passesValidation() {\n\t\t\n\t\tif (count ( $this->_messages )) {\n\t\t\tdefine ( '_BF_FAILED_VALIDATION_MESSAGES', serialize ( $this->_messages ) );\n\t\t\tdefine ( '_BF_FAILED_VALIDATION', true );\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "a6d68f9f2db52f19c5f7ab30d9e90ac1", "score": "0.7321932", "text": "public function isValidated($rule)\r\n {\r\n return isset($this->_validatedRules[$rule]);\r\n }", "title": "" }, { "docid": "bb24903c830e71c379fc505b21e17fc0", "score": "0.721367", "text": "public function validate() {\n\t\treturn strtoupper($this->validate) == self::YN_TRUE;\n\t}", "title": "" }, { "docid": "d5011ca2ac51d206c908016a0be2b55a", "score": "0.7207116", "text": "public function isValid(){\r\n $rules = array();\r\n $rules = $this->obj->getRules();\r\n foreach($rules as $key=>$value){\r\n foreach ($value as $rule){\r\n $result = $rule->check($this->obj->$key);\r\n if ($result) $this->errors[$key] = $result;\r\n }\r\n }\r\n\r\n return (!$this->errors)?true:false;\r\n }", "title": "" }, { "docid": "d985748785a14eb3911d78c429afe81e", "score": "0.71340597", "text": "public function doValidation(): bool\n {\n return $this->validate;\n }", "title": "" }, { "docid": "28adc9e87be2d26a007b5d0a29f88c91", "score": "0.71269274", "text": "public function isValid()\n {\n return $this->validate();\n }", "title": "" }, { "docid": "606828ea6291f371c8b485ddadd5d54e", "score": "0.708796", "text": "function isValid(){\n return (count($this->errors) > 0 ) ? false : true;\n }", "title": "" }, { "docid": "f64668e67af2d8001c662a9b676b15ae", "score": "0.70851153", "text": "public function Validation()\n {\n if($this != null){\n return $this->CheckEmail() && $this->CheckPass();\n }\n return false;\n }", "title": "" }, { "docid": "e97f374a43e6053a66e1822aabd103d9", "score": "0.70821744", "text": "public function validate() : bool\n {\n return $this->values[0] == $this->parameters[0];\n }", "title": "" }, { "docid": "9b75b4b8c6b67bc00ccf6acd9bc0a80e", "score": "0.7078077", "text": "public function failedValidation()\r\n\t{\r\n\t\treturn $this->hasErrors();\r\n\t}", "title": "" }, { "docid": "048a8ab56bfa9f2bf69352a2187290ea", "score": "0.70451826", "text": "public function validation()\n {\n $this->validate(new PresenceOf([\n 'field' => 'title',\n 'message' => 'Un titre est necessaire.'\n ]));\n\n $this->validate(new PresenceOf([\n 'field' => 'content',\n 'message' => 'Un contenu est necessaire.'\n ]));\n\n $this->validate(new PresenceOf([\n 'field' => 'id_sprint',\n 'message' => 'Un sprint est necessaire.'\n ]));\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "title": "" }, { "docid": "761e9e66f281cf8f66091f7def5ac889", "score": "0.7035335", "text": "function validate() {\n\t\t$this->_validationErrors = array();\n\t\treturn 0 === count($this->_validationErrors);\n\t}", "title": "" }, { "docid": "0bc75c3b7afafaaa7922c17b9af84815", "score": "0.7035195", "text": "public function validate(): bool\n {\n foreach ($this->data as $key => $item) {\n if (!isset($this->rules[$key])) {\n break;\n }\n \n foreach ($this->getRules($key) as $rule) {\n if (!$this->validates($item, $rule)) {\n return false;\n }\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "859e457f1717457917aafe4e1f332868", "score": "0.70331645", "text": "public function validates()\n\t{\n\t\treturn ! $this->errors;\n\t}", "title": "" }, { "docid": "19e92b18d1f009b8a64fc1b4383c2adb", "score": "0.70323586", "text": "public function validate()\n {\n foreach ($this->rules as $field=>$rules) {\n $resolved = $this->resolveRules($rules);\n foreach ($resolved as $rule) {\n $this->validateRule($field, $rule, $this->resolveRulesContainOptional($resolved));\n }\n }\n\n return $this->errors->hasErrors();\n }", "title": "" }, { "docid": "03458ffac5cf19e35afb3d8e41bab241", "score": "0.69960576", "text": "public function isValid(){\n\n\t\t// mkaing validations\n\t\t$validator = Validator::make($this->attributes, static::$rules);\n\t\t\n\t\t// check if validation passes\n\t\tif($validator->passes()){\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\t// setting up error messages.\n\t\t\t$this->errors = $validator->messages();\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "63656e9a61e46eb34c5e62ebd48af45f", "score": "0.69728386", "text": "public function isValid() {\n return count($this->errors) == 0;\n }", "title": "" }, { "docid": "3f51b00fbcaad4913399d8cef1581a0f", "score": "0.6958519", "text": "public function isValid() {\n\t\treturn $this->validated && $this->valid;\n\t}", "title": "" }, { "docid": "c447947af8e88d46e961bd665fe864fc", "score": "0.6955575", "text": "public function valid()\n\t{\n\t\treturn $this->isValid();\n\t}", "title": "" }, { "docid": "dfa480a7fade8d988cb8aaedf52b4935", "score": "0.6932453", "text": "public function validate(): bool;", "title": "" }, { "docid": "dfa480a7fade8d988cb8aaedf52b4935", "score": "0.6932453", "text": "public function validate(): bool;", "title": "" }, { "docid": "dfa480a7fade8d988cb8aaedf52b4935", "score": "0.6932453", "text": "public function validate(): bool;", "title": "" }, { "docid": "dfa480a7fade8d988cb8aaedf52b4935", "score": "0.6932453", "text": "public function validate(): bool;", "title": "" }, { "docid": "6a4741d2c87e1a2d1e7af6565414e2dc", "score": "0.69105256", "text": "public function validatedOK() {\n\t\tif ( is_null( $this->validationErrors ) ){\n\t\t\t$this->getValidationErrors();\n\t\t}\n\t\t\n\t\tif ( count( $this->validationErrors ) === 0 ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "16e23ef5536671c7ed685da0e2b8dac0", "score": "0.69051605", "text": "public function validate(): bool\n {\n return true;\n }", "title": "" }, { "docid": "16e23ef5536671c7ed685da0e2b8dac0", "score": "0.69051605", "text": "public function validate(): bool\n {\n return true;\n }", "title": "" }, { "docid": "16e23ef5536671c7ed685da0e2b8dac0", "score": "0.69051605", "text": "public function validate(): bool\n {\n return true;\n }", "title": "" }, { "docid": "16e23ef5536671c7ed685da0e2b8dac0", "score": "0.69051605", "text": "public function validate(): bool\n {\n return true;\n }", "title": "" }, { "docid": "26c0f80dbf8cc6828993cdc1f019d20b", "score": "0.68731016", "text": "public function isValid() {\r\n\t\t$this->errors->reset();\r\n\r\n\t\t/*validate required fields*/\r\n\t\tforeach (static::$validates_presence_of as $aValidate) {\r\n\t\t\tif (!isset($this->$aValidate[0]) || !$this->$aValidate[0]) {\r\n\t\t\t\t/*Define field name*/\r\n\t\t\t\tif (isset($aValidate['name'])) {\r\n\t\t\t\t\t$sField = $aValidate['name'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$sField = ucwords(str_replace('_', ' ', $aValidate[0]));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*Define mensage*/\r\n\t\t\t\tif (isset($aValidate['message'])) {\r\n\t\t\t\t\t$sMsg = $aValidate['message'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$sMsg = 'is required';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->errors->add($sField, $sMsg);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*validate user rules*/\r\n\t\t$this->validate();\r\n\r\n\t\treturn $this->errors->count() == 0;\r\n\t}", "title": "" }, { "docid": "89a805a915a1eb48e1617e3b26d7b81a", "score": "0.68701595", "text": "static function rule_valid ($rule) {\n\t\tforeach ($rule['conditions'] as $condition_key => $condition_value) {\n\t\t\tif (!self::condition_valid($rule['name'], $rule['label'], $rule['value'], $condition_key, $condition_value, $rule['custom_errors'])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0835da634873af5b53fbe46eac2e7160", "score": "0.68663746", "text": "public function isValid()\n\t{\n\t\t//Clear them out first\n\t\tif ($this->clear_errors)\n\t\t\t$this->validation_errors = array();\n\n\t\t$this->clear_errors = true;\n\n\t\t//First call the annotated validations\n\t\t$this->annotationValidate();\n\n\t\t//Then call the validate method\n\t\t$this->validate();\n\n\t\treturn (count($this->validation_errors) == 0);\n\t}", "title": "" }, { "docid": "39ce115b2db8b1cf1029ec6a501f92da", "score": "0.68565387", "text": "public function isValid() {\n return empty($this->_failures);\n }", "title": "" }, { "docid": "d6888475b86b962b69ae8c2b83734ce8", "score": "0.68439174", "text": "public function is_valid(){\n $this->errors = array();\n\n // Some conditions may come here and errors can be filled\n\n return count($this->errors) > 0 ? FALSE : TRUE;\n }", "title": "" }, { "docid": "972f4f4dd3b129a11167fa28b3d5e4c6", "score": "0.6812909", "text": "public function getIsValid()\n {\n return $this->isValid;\n }", "title": "" }, { "docid": "972f4f4dd3b129a11167fa28b3d5e4c6", "score": "0.6812909", "text": "public function getIsValid()\n {\n return $this->isValid;\n }", "title": "" }, { "docid": "105849e750feb0f469995daa3924153b", "score": "0.6812069", "text": "public function validation() {\n /**\n * $this->validate(\n * new Email(\n * array(\n * 'field' => 'email',\n * 'required' => true,\n * )\n * )\n * * );\n * if ($this->validationHasFailed() == true) {\n * return false;\n * }\n */\n return true;\n }", "title": "" }, { "docid": "ae0221c5bd8bd9b6aaf76f74df43a78f", "score": "0.6793995", "text": "public function validate()\n {\n $v = Validator::make($this->toArray(), $this->getConstraints());\n\n if ($v->passes())\n {\n return true;\n }\n\n $this->setErrors($v->messages());\n return false;\n }", "title": "" }, { "docid": "bab4e79eee4dc9ad6014fdc8699eb024", "score": "0.6783766", "text": "public static function validate()\n {\n return true;\n }", "title": "" }, { "docid": "bdb2e419ef07a573551021279f5b89d9", "score": "0.67778784", "text": "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n \"field\" => \"email\",\n \"required\" => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "title": "" }, { "docid": "1b1be2747da3c2fdb7c54ecf25c3407e", "score": "0.67763066", "text": "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "title": "" }, { "docid": "1b1be2747da3c2fdb7c54ecf25c3407e", "score": "0.67763066", "text": "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "title": "" }, { "docid": "868715bc1f6fcaf64d0f3e688aeeba6e", "score": "0.67691404", "text": "protected function validate() {\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": "85814bb791a2da2157472076244690ff", "score": "0.67632294", "text": "public function validation()\n {\n $this->validate(new UniqueValidator(array(\n \"field\" => \"email\",\n \"message\" => \"The email is already registered\"\n )));\n return $this->validationHasFailed() != true;\n\n $this->validate(new UniqueValidator(array(\n \"field\" => \"phone\",\n \"message\" => \"The phone is already registered\"\n )));\n return $this->validationHasFailed() != true;\n\n }", "title": "" }, { "docid": "74188d2aa3978fba296b0eea7f201bb0", "score": "0.67595637", "text": "public function validation()\n {\n $this->validate(new Uniqueness(array(\n \"field\" => \"email\",\n \"message\" => \"The email is already registered\"\n )));\n\n return $this->validationHasFailed() != true;\n }", "title": "" }, { "docid": "118021e66c3b44388cff87d1d36040ee", "score": "0.6757857", "text": "public function isValid()\r\n\t{\r\n\t\treturn $this->valid;\r\n\t}", "title": "" }, { "docid": "9d8186a134137753795e9825cd88b0eb", "score": "0.6753383", "text": "public function validate(): bool {\n return (\n !empty($this->personalNo) &&\n $this->validateFormat() &&\n $this->validateSaneValues() &&\n $this->validateDate() &&\n $this->validateChecksum()\n );\n }", "title": "" }, { "docid": "098c7b1e4f012614eb076dfd4e1aa1cd", "score": "0.67493236", "text": "public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}", "title": "" }, { "docid": "098c7b1e4f012614eb076dfd4e1aa1cd", "score": "0.67493236", "text": "public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}", "title": "" }, { "docid": "8913b967953a1ccfc26d3d81fc0d70ad", "score": "0.6745876", "text": "public function isValid()\n {\n $this->validate();\n\n return !$this->errors->has();\n }", "title": "" }, { "docid": "16f760ba3a1854f235a4d013b9e92fa7", "score": "0.67313004", "text": "public function isValid() // savoir si le champ est valide ou non\n {\n foreach ($this->validator as $validator)\n {\n if (!$validator->isValid($this->value))\n {\n $this->errorMessage = $validator->errorMessage();\n return false;\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "1c781c72c31f333daac3f0e4c1eae957", "score": "0.6726495", "text": "function is_valid()\n {\n $on = $this->new_record ? 'create' : 'update';\n $validate_on = \"validate_on_$on\";\n $before_validation_on = \"before_validation_on_$on\";\n $after_validation_on = \"after_validation_on_$on\";\n \n $this->errors->clear();\n \n $this->before_validation();\n $this->$before_validation_on();\n \n $this->run_validations();\n \n $this->validate();\n $this->$validate_on();\n \n $this->$after_validation_on();\n $this->after_validation();\n \n if (!$this->validate_associated()) {\n return false;\n }\n return $this->errors->is_empty();\n }", "title": "" }, { "docid": "608ed426c6788bba885a78fe256af98e", "score": "0.67257553", "text": "public function validation()\n {\n\n return true;\n }", "title": "" }, { "docid": "06054cb8af9140ce053ab4759d31cde0", "score": "0.6704009", "text": "public function getIsValidAttribute() {\n\t\treturn $this->exists;\n\t}", "title": "" }, { "docid": "582297aaae33b795f616c80752244b4a", "score": "0.6702803", "text": "function validate() {\n\t\t$this->_validationErrors = array();\n\t\tif (null === $this->getuserId()) {\n\t\t\t$this->_validationErrors[] = 'userId must not be null';\n\t\t}\n\t\treturn 0 === count($this->_validationErrors);\n\t}", "title": "" }, { "docid": "80a33a4f13e439fb7f2bd904a5f99838", "score": "0.6702222", "text": "public function validate()\n {\n return true;\n }", "title": "" }, { "docid": "b28b24e94a18534b8467ea8fd8e72b60", "score": "0.67010134", "text": "public function isValid()\n {\n $results = Validator::getValidation($this);\n \n \n foreach ($results as $field => $result) {\n if (!$result['valid']) {\n return false;\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "3b03e56e0264b37c51d8d4dafbc3380d", "score": "0.6700369", "text": "public function isValid()\n {\n if ($this->valid) {\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "f1885c2ef589938023212ccebc04694b", "score": "0.66967636", "text": "public function violated(): bool\n {\n return count($this->errors) > 0;\n }", "title": "" }, { "docid": "3345d869feafa30ece71bdbc11d75fe0", "score": "0.6695795", "text": "public function passes() {\n\t\treturn ! $this->hasIssue;\n\t}", "title": "" }, { "docid": "664e7269c35bb58fca256f357f3e3536", "score": "0.66868526", "text": "public function validateInput()\n\t{\n\t\t$v = Validator::make ( $this->model->getFormInput() , $this->model->getRules() );\n\n\t\t$success = true;\n\t\tif ( $v->fails() )\n\t\t{\n\t\t\t$this->model->setErrors( $v->messages() );\n\t\t\t$success = false;\n\t\t}\n\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "910f98e51fd5d4ad140231dacc9f6744", "score": "0.66775894", "text": "public function validate() : bool;", "title": "" }, { "docid": "0ec8178d6b7feb3ba72421918c95db52", "score": "0.667711", "text": "public function rule_exists() {\n // If rule exists lines even more than 8\n return (count($this->get_rule_info()) >= 8);\n }", "title": "" }, { "docid": "3b514880bdf8aefcecb6c962a1c54e43", "score": "0.6677069", "text": "public function hasRules()\n {\n return count($this->rules) > 0;\n }", "title": "" }, { "docid": "f881c693d39c7f538a6743a791ec2daa", "score": "0.6675038", "text": "function isValid()\r\n\t{\r\n\t\treturn $this->isValid;\r\n\t}", "title": "" }, { "docid": "1db435c3bd48aa69d0a28612818c82ff", "score": "0.66747236", "text": "public function is_valid()\n {\n $this->validateCompanyId();\n $this->validateCountryId();\n $this->validateCityId();\n $this->validateEmployerName();\n $this->validateEmployerEmail();\n return count($this->errors) === 0;\n }", "title": "" }, { "docid": "b0c2ae1e37e2a9c8f7f7b98014ecfa67", "score": "0.6671923", "text": "public function validate() {\n return true;\n }", "title": "" }, { "docid": "b0c2ae1e37e2a9c8f7f7b98014ecfa67", "score": "0.6671923", "text": "public function validate() {\n return true;\n }", "title": "" }, { "docid": "e65de4a1dce943ebb3fb0b3e48264cf3", "score": "0.6665886", "text": "public function isValid()\n {\n return $this->descriptor ? $this->descriptor->isValid() : true;\n }", "title": "" }, { "docid": "168a8b29300fc4efb2b3258264b95931", "score": "0.66648895", "text": "public function isValid(){\n foreach ($this->_validators as $validator){\n if (!$validator->isValid($this->_value)){\n $this->setErrorMessage($validator->errorMessage());\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "4b974f28a3ee7ee27efe4ce269ea0bce", "score": "0.66581625", "text": "public function validate()\n {\n if ($this->getShouldIgnoreValidation()) {\n return true;\n }\n\n $errors = $this->compositeValidator->validate($this);\n\n if (empty($errors)) {\n return true;\n }\n\n return $errors;\n }", "title": "" }, { "docid": "6d40179a72cde1ac59441c5c8e953b2c", "score": "0.66581553", "text": "public function validateResource(): bool\n {\n $check = $this->_model->validate();\n $this->addErrors($this->_model->errors);\n return $check;\n }", "title": "" }, { "docid": "97fd2471e257fb6b6d4596f919d4fa49", "score": "0.6642172", "text": "public function isValid()\n {\n if (!empty($this->validation)) {\n $messages = $this->validation->validate($this->all());\n\n if (count($messages)) {\n $this->errors = $this->formatValidationMessages($messages);\n return false;\n }\n\n return true;\n }\n\n return true; // This request is not need to be validated\n }", "title": "" }, { "docid": "e7183ad321af91b1997bcbbb451db06e", "score": "0.66405", "text": "public function ruleCheck($value);", "title": "" }, { "docid": "106e97f4761e14d6e98bf1d9b2f1e0d3", "score": "0.6640296", "text": "public function isValid()\r\r\n {\r\r\n return $this->getProperty('is_valid');\r\r\n }", "title": "" }, { "docid": "ff419d9d800f84eb29cfe5dbfba2be00", "score": "0.66396284", "text": "public function isValid(): bool;", "title": "" }, { "docid": "ff419d9d800f84eb29cfe5dbfba2be00", "score": "0.66396284", "text": "public function isValid(): bool;", "title": "" }, { "docid": "ff419d9d800f84eb29cfe5dbfba2be00", "score": "0.66396284", "text": "public function isValid(): bool;", "title": "" }, { "docid": "9d1f744477b28cc31657c0b06b24812b", "score": "0.6638844", "text": "public function isValid()\n {\n $result = true;\n \n /* Is required? */\n if ($this->required && empty($this->value)) {\n $this->errors[] = $this->label . \" field is required.\";\n $result = false;\n }\n\n return $result;\n }", "title": "" }, { "docid": "5932d24ae42862f15cc140b0297ac422", "score": "0.6637753", "text": "public function isValid()\r\n {\r\n return parent::isValid();\r\n }", "title": "" }, { "docid": "ae7d4fd4c2e90a395984ea9c2f91e5d9", "score": "0.6632798", "text": "public function fails(){\n\t\t\treturn $this->validator->fails();\n\t}", "title": "" }, { "docid": "1edd4b5f1336d1311184dd5be60a8851", "score": "0.6624289", "text": "public function passes(): bool\n {\n return $this->passes;\n }", "title": "" }, { "docid": "33caebfee8d8a92d47a5a3bbac856827", "score": "0.66188854", "text": "static function valid () {\n\t\t$valid = true;\n\n\t\tif (APP_DEMO_MODE == true && !self::$demo_allowed) {\n\t\t\t// app is in demo mode and demo is not allowed\n\t\t\t$valid = false;\n\t\t\tAlerter::set_message('error', 'Not allowed in demo mode');\n\t\t}\n\t\telse {\n\t\t\t// ensure every rule is valid\n\t\t\tforeach (self::$rules as $rule) {\n\t\t\t\tif (!self::rule_valid($rule)) {\n\t\t\t\t\t$valid = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$valid) {\n\t\t\t\t// a rule failed, set generic error message for form correction\n\t\t\t\tAlerter::set_message('error', 'Please correct the errors below');\n\t\t\t}\n\t\t}\n\n\t\treturn $valid;\n\t}", "title": "" }, { "docid": "65d9c09fcc5eff0d1f0b8f5fcdff36c6", "score": "0.6615823", "text": "public function isValid(): bool\n {\n return $this->isValid;\n }", "title": "" }, { "docid": "eec6d87fe38d97d1a40b8e7610a94b50", "score": "0.66139424", "text": "public function isValid()\n {\n return $this->getState()->getStatus() == StateInterface::STATUS_VALID;\n }", "title": "" }, { "docid": "02850d9752f1c1c80791654df669b832", "score": "0.66131616", "text": "public function isValid()\n {\n return $this->valid;\n }", "title": "" }, { "docid": "02850d9752f1c1c80791654df669b832", "score": "0.66131616", "text": "public function isValid()\n {\n return $this->valid;\n }", "title": "" }, { "docid": "02850d9752f1c1c80791654df669b832", "score": "0.66131616", "text": "public function isValid()\n {\n return $this->valid;\n }", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" }, { "docid": "c3963ad0e0ee59a7a5ef17c6eaf6734a", "score": "0.66014135", "text": "public function isValid();", "title": "" } ]
a9b72c6de18c9ed9b4f895f9f31253c0
The new tab content
[ { "docid": "d1399e67dcdf8cbdc4368e69547a6356", "score": "0.0", "text": "function woo_calendar_product_tab_content() {\n calendarPageHtml();\n\n}", "title": "" } ]
[ { "docid": "3c7d7ddf88dba15fbfb2718983a9d4b6", "score": "0.65105104", "text": "public function newAction()\n {\n $this->_init()\n ->_addLeft($this->getLayout()->createBlock('abtest/adminhtml_tabs'))\n ->_addContent($this->getLayout()->createBlock('abtest/adminhtml_form'))\n ->_title(\"New A/B Test\")\n ->renderLayout();\n }", "title": "" }, { "docid": "f15c605b26f1b1dfe6bd1bf3d70189c7", "score": "0.64998823", "text": "abstract protected function renderTabContent();", "title": "" }, { "docid": "7b5e5209f65fd70f3198960211dff71d", "score": "0.624109", "text": "private function the_tabs() {\n\t\t$current_tab = $this->get_current_tab();\n\n\t\techo '<h2 class=\"nav-tab-wrapper\">';\n\t\tforeach ( $this->tabs as $key => $name ): ?>\n\t\t\t<a href=\"?page=<?php echo $this->get_menu_slug(); ?>&tab=<?php echo $key; ?>\" class=\"nav-tab <?php echo $current_tab == $key ? 'nav-tab-active' : ''; ?>\"><?php echo $name; ?></a>\n\t\t<?php endforeach;\n\t\t\t\n\t\techo '</h2>';\n\t\t\n\t}", "title": "" }, { "docid": "22111f031bcd3d3d823326bdd84b71eb", "score": "0.6238062", "text": "function get_tab_content() {\n $screen = get_current_screen();\n if (strstr($screen->id, $this->slug)) {\n if (isset($_GET['tab'])) {\n $tab = $_GET['tab'];\n } else {\n $tab = $this->default_tab;\n }\n $this->load_tab($tab);\n }\n }", "title": "" }, { "docid": "b10ce152890a9e687c12f8b39ff912e8", "score": "0.600763", "text": "function setTabs()\n\t{\n\t\tglobal $ilCtrl, $ilAccess;\n\n\t\t// tab for the \"show content\" command\n\t\tif ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId()))\n\t\t{\n\t\t\t$this->tabs->addTab(\"content\", $this->txt(\"content\"), $ilCtrl->getLinkTarget($this, \"showContent\"));\n\t\t}\n\n\t\t// standard info screen tab\n\t\t$this->addInfoTab();\n\n\t\t// a \"properties\" tab\n\t\tif ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId()))\n\t\t{\n\t\t\t$this->tabs->addTab(\"properties\", $this->txt(\"properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n\t\t\t$this->tabs->addTab(\"export\", $this->txt(\"export\"), $ilCtrl->getLinkTargetByClass(\"ilexportgui\", \"\"));\n\t\t}\n\n\t\t// metadata tab\n\t\tif($ilAccess->checkAccess('write', '', $this->ref_id))\n\t\t{\n\t\t\tinclude_once \"Services/Object/classes/class.ilObjectMetaDataGUI.php\";\n\t\t\t$mdgui = new ilObjectMetaDataGUI($this->object);\t\t\t\t\t\n\t\t\t$mdtab = $mdgui->getTab();\n\t\t\tif($mdtab)\n\t\t\t{\n\t\t\t\t$this->tabs->addTab(\"meta_data\", $this->txt(\"meta_data\"), $mdtab);\n\t\t\t}\n\t\t}\n\n\t\t// standard permission tab\n\t\t$this->addPermissionTab();\n\t\t$this->activateTab();\n\t}", "title": "" }, { "docid": "ff0a1a8d2d690781e91cbdd5bc1297f0", "score": "0.5973037", "text": "function createInfoPanel()\r\n\t{#safe to use SQL query to get information on topic for the tabs, no empty tabs at any given point\r\n\r\n\t\t$tabStyle = 'margin:0,0.1em';\r\n\t\t$bgColor = 'rgba(0,0,0,0.9)';\r\n\t\t$closeDiv = \"</div>\";\r\n\r\n\t\t$infoPanelTabs = <<<EOD\r\n\t\t<ul class=\"nav nav-tabs nav-justified\">\r\n\t\t\t\t<li style=$tabStyle class='active'><a data-toggle=\"tab\" href=\"#tContentsWrapper\">Content</a></li>\r\n\t\t\t\t<li style=$tabStyle><a data-toggle=\"tab\" href=\"#articlesWrapper\">Articles</a></li>\r\n\t\t\t\t<li style=$tabStyle ><a data-toggle=\"tab\" href=\"#booksWrapper\">Books</a></li>\r\n\t\t\t\t<li style=$tabStyle ><a data-toggle=\"tab\" href=\"#videosWrapper\">Videos</a></li>\r\n\t\t</ul>\r\nEOD;\r\n\t\t\r\n\r\n\t\t$topicContent=$this->genContentSection();//variable to store the contents of the objective panel\r\n\r\n\t\t$articleContent=$this->genArticleSection();#variable to store the contents of the articles tab\r\n\t\t\r\n\t\t$bookContent = $this->genBookSection();#variable to store the contents of the books tab\r\n\r\n\t\t$videoContent = $this->genVideoSection();#variable to store the contents of the video tab\r\n\t\r\n\t\t$infoPanel = <<<EOD\r\n\t\t<div class='col-lg-8 col-lg-offset-1 col-md-8 col-md-offset-1 col-xs-12 col-sm-12' style='height:100%;background-color:$bgColor;padding:0.5em'>\r\n\t\t\t\r\n\t\t\t$infoPanelTabs\r\n\t\t\t<div class=\"tab-content well\">\r\n\r\n\t\t\t\t<div class=\"tab-pane active clearfix\" id=\"tContentsWrapper\">\r\n\t\t\t\t\t$topicContent\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"tab-pane clearfix\" id=\"articlesWrapper\">\r\n\t\t\t\t\t$articleContent\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"tab-pane clearfix\" id=\"booksWrapper\">\r\n\t\t\t\t\t$bookContent\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"tab-pane clearfix\" id=\"videosWrapper\">\r\n\t\t\t\t\t$videoContent\t\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t\r\nEOD;\r\n\r\n\r\n\t\t$errHandler = new CustomErrorHandler();\r\n\t\t//IF TOPIC_ID VALID\r\n\t\tif ($errHandler->urlTopicIdIsValid($this->getStartTopicIndex(),$this->getTopicCount()) === TRUE)\r\n\t\t{\t#prevents any query from running if topic Id is invalid\r\n\t\t\t\r\n\t\t\techo $infoPanel;//print out the info panel to the screen\r\n\t\t\techo $closeDiv;\r\n\t\t}else{\r\n\t\t\t$errHandler->displayInvalidTopicPage();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2c0703434c491717b96c7634a7074de0", "score": "0.5958553", "text": "public function create()\n {\n //\n $products = $this->products->getAllProducts();\n\n return view('tabs.newtab', ['products' => $products]);\n }", "title": "" }, { "docid": "9ea154bc8cd13665a81a3a534c6980b3", "score": "0.5916167", "text": "function tab_new()\r\n\t{\r\n\t\t$this->props_tab = Array();\r\n\t}", "title": "" }, { "docid": "ea7755be3abd88ffbd8a3c5f57eafec8", "score": "0.5903184", "text": "public function tab_content() {\n\t\tforeach ( $this->fields as $global_settings_tab_key => $global_settings_tab_data ) {\n\t\t\t$active_tab = esc_attr( $_GET['tab'] );\n\t\t\tif ( ! empty( $active_tab ) && $active_tab != 'generic' && $global_settings_tab_key == $active_tab\n\t\t\t && ! empty( $global_settings_tab_data->global_options ) && ! empty( $this->loaded_fields ) && array_key_exists( $global_settings_tab_key, $this->loaded_fields )\n\t\t\t && gfirem_manager::is_enabled( $global_settings_tab_key )\n\t\t\t) {\n\t\t\t\t$view_fnc = $global_settings_tab_data->global_options['view'][1];\n\t\t\t\t$global_settings_tab_data->$view_fnc();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6d7ae2b67c9627a82b4c95b98b86875c", "score": "0.59023815", "text": "function im380_new_delivery_details_tab( $tabs ) {\n\n\n\n\t// Adds the new tab\n\t$tabs['test_tab'] = array(\n\t\t\t'title' \t=> __( 'Delivery Details', 'woocommerce' ),\n\t\t\t'priority' \t=> 50,\n\t\t\t'callback' \t=> 'im380_new_delivery_details_tab_content'\n\t\t\t);\n\n\treturn $tabs;\n}", "title": "" }, { "docid": "2d00e808a83956e3e99b22451760c0cc", "score": "0.58524513", "text": "function woo_new_product_tab( $tabs ) {\t\r\n\t// Adds the new tab\t\r\n\t$tabs['test_tab'] = array(\r\n\t\t'title' \t=> __( 'New Product Tab', 'woocommerce' ),\r\n\t\t'priority' \t=> 50,\r\n\t\t'callback' \t=> 'woo_new_product_tab_content'\r\n\t);\r\n\treturn $tabs;\r\n}", "title": "" }, { "docid": "0e66abd5df89c1c1dffc96ded795a828", "score": "0.5821333", "text": "public function default_open_new_tab_callback($args){\n\n\t\t$html = '<select id=\"daim_default_open_new_tab\" name=\"daim_default_open_new_tab\" class=\"daext-display-none\">';\n\t\t$html .= '<option ' . selected(intval(get_option(\"daim_default_open_new_tab\")), 0, false) . ' value=\"0\">' . esc_attr__('No', 'daim') . '</option>';\n\t\t$html .= '<option ' . selected(intval(get_option(\"daim_default_open_new_tab\")), 1, false) . ' value=\"1\">' . esc_attr__('Yes', 'daim') . '</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<div class=\"help-icon\" title=\"' . esc_attr(__('If you select \"Yes\" the link generated on the defined keyword opens the linked document in a new tab. This option determines the default value of the \"Open New Tab\" field available in the AIL menu.', 'daim')) . '\"></div>';\n\n\t\techo $html;\n\n\t}", "title": "" }, { "docid": "4010f5c926dd7bd9531bf0d36f1a3a61", "score": "0.5807701", "text": "protected function setTabs()\n {\n global $lng;\n $this->tabs->addTab(self::CMD_DEFAULT, $this->pl->txt('tab_show_content'), $this->ctrl->getLinkTarget($this, self::CMD_DEFAULT));\n $this->addInfoTab();\n //$this->tabs->addTab(self::CMD_EDIT, $this->pl->txt('perm_settings'), $this->ctrl->getLinkTargetByClass(ilPermissionGUI::class));\n $this->addPermissionTab();\n\n\n return true;\n\n }", "title": "" }, { "docid": "a3642b6988cb5a4f90a17e84bd49c40a", "score": "0.57940894", "text": "function startTab($tabText, $paneid)\n {\n echo '<div class=\"tab-page\" id=\"' . $paneid . '\">';\n echo '<h2 class=\"tab\">' . $tabText . '</h2>';\n echo '<script>tabPane1.addTabPage( document.getElementById( \"' . $paneid . '\" ) );</script>';\n }", "title": "" }, { "docid": "8672451d32966318959dffdeeb9015ac", "score": "0.579062", "text": "function dangopress_new_tab($link)\n{\n return str_replace('<a', '<a target=\"_blank\"', $link);\n}", "title": "" }, { "docid": "11556e69a3673254c9a3f1c92016b797", "score": "0.57798874", "text": "public function language_tab_start() : string\n {\n return '<div class=\"tab-content margin-top-30\" >';\n }", "title": "" }, { "docid": "7462e8a0cb4e9ad31e90e5b906b03860", "score": "0.5774963", "text": "function print_sub_tool( $name, $page, $is_current, $href=NULL, $new_window=false )\n{\n\tstatic $first_tab_shown; // has the first tab been displayed?\n\t\n\tif (!(is_file($page) || strpos($page,\"http\") === 0))\n\t\treturn;\n\n\t$html = \"<li class=\";\n\tif ($is_current)\n\t\t$html .= !isset($first_tab_shown) ? \"\\\"first-current\\\"\" : \"\\\"current\\\"\" ;\n\telse\n\t\t$html .= !isset($first_tab_shown) ? \"\\\"first\\\"\" : \"\\\"noselect\\\"\" ;\n\t\n\t$first_tab_shown = true;\n\t\n\t$html .= \"><a \";\n\tif ($href == NULL)\n\t\t$href .= $page;\n\n\t// If not NULL and just true, then previous behavior open a new window. If\n\t// A name is given, then use javascript to target that window if already open\n\t//\n\tif ($new_window != NULL) {\n\t\tif ($new_window === true) {\n\t\t\t$html .= \"target=\\\"_blank\\\" \";\n\t\t} else {\n\t\t\t$html .= \"target=\\\"$new_window\\\" \";\n\t\t\t//$html .= \"onClick=\\\"return menu_popup(this, '$new_window')\\\" \";\n\t\t}\n\t}\n\t$html .= \"href=\\\"$href\\\">$name</a></li>\";\n\n\tprint(\"\\t\\t$html\\n\");\n}", "title": "" }, { "docid": "52b0c93849ba076d1e647f62f014d829", "score": "0.5747577", "text": "function bookContent($content){//String[]\n $this->tabs=array();\n foreach($content as $c){\n $this->tabs[]=$c;\n }\n $this->_bookframe(\"frm\");\n }", "title": "" }, { "docid": "d440edd8f667355daa8acbc150e66e5f", "score": "0.57206607", "text": "public function run()\n { \n \t\n $this->render('tabs', array('tabs'=>$this->tabs));\n }", "title": "" }, { "docid": "b033b6883ad5906bdad351a38d8845f8", "score": "0.57191825", "text": "public function createTabs()\n {\n $emoticonSets = EmoticonSet::model()->visible()->ordered()->with('emoticons:relationOrdered')->findAll();\n $module = $this->module->id;\n $counter = 0;\n\n foreach($emoticonSets as $set){\n\n $emoticons = $set->emoticons;\n\n if(count($emoticons) > 0){\n // Preload contents of first tab only\n if($counter == 0){\n $this->tabs[$set->slug]['view'] = 'emoticons.components.views.single';\n $this->tabs[$set->slug]['title'] = ucwords($set->name);\n $this->tabs[$set->slug]['data'] = array(\n 'emoticons' => $emoticons,\n 'publicPath' => $this->module->publicPath,\n 'display' => $this->display,\n );\n // Load other tabs via ajax\n }else{\n $this->tabs[$set->slug] = array(\n 'title' => ucwords($set->name),\n 'ajax' => true,\n 'url' => Yii::app()->createUrl($module . '/emoticonSet/load', array(\n 'id' => $set->id,\n )),\n\n );\n }\n\n $counter++; \n }\n \n }\n }", "title": "" }, { "docid": "eadb54ae85ee8d21b8dbe1ba6e7a0030", "score": "0.57004356", "text": "function um_bbpress_add_tab( $tabs ) {\n\t$tabs['forums'] = array(\n\t\t'name' => __( 'Forums', 'twodayssss' ),\n\t\t'icon' => 'um-faicon-comments',\n\t);\n\n\treturn $tabs;\n}", "title": "" }, { "docid": "2883fcd220859fd38111befb6e3e6daf", "score": "0.5693322", "text": "public function newAction()\n {\n $this->tag->appendTitle('Cadastrar-se');\n }", "title": "" }, { "docid": "f4da878aeaed2b36b8b42c73634ebb66", "score": "0.56846744", "text": "public function newwindow() {\n\t\t$this->newwindow = TRUE;\n\t}", "title": "" }, { "docid": "f4b510f107fa74367e64a1e04a51799f", "score": "0.5679955", "text": "private function _createTab()\n {\n $response = true;\n\n // First check for parent tab\n $parentTabID = Tab::getIdFromClassName('AdminWP');\n\n if ($parentTabID) {\n $parentTab = new Tab($parentTabID);\n } else {\n $parentTab = new Tab();\n $parentTab->active = 1;\n $parentTab->name = array();\n $parentTab->class_name = \"AdminWP\";\n foreach (Language::getLanguages() as $lang){\n $parentTab->name[$lang['id_lang']] = \"WithinPixels\";\n }\n $parentTab->id_parent = 0;\n $parentTab->module = $this->name;\n $response &= $parentTab->add();\n }\n\n $tab = new Tab();\n $tab->active = 1;\n $tab->class_name = \"AdminWPFrontpageBlocks\";\n $tab->name = array();\n foreach (Language::getLanguages() as $lang){\n $tab->name[$lang['id_lang']] = \"Frontpage Blocks\";\n }\n $tab->id_parent = $parentTab->id;\n $tab->module = $this->name;\n $response &= $tab->add();\n\n return $response;\n }", "title": "" }, { "docid": "e4ca8be3b6eff263127275226ce77770", "score": "0.5657328", "text": "function sc_bootstrap_news_category_tabs(){\n \t\n $news = e107::getObject('e_news_category_tree'); // get news class.\n // $sc = e107::getScBatch('news'); // get news shortcodes.\n $tp = e107::getParser(); // get parser.\n \n // load active news categories. ie. the correct userclass etc.\n $data = $news->loadActive(false)->toArray(); // false to utilize the built-in cache.\n\n $text = '';\n\t\n\t $tab = array();\n\n foreach($data as $row){\n // $sc->setScVar('news_item', $row); // send $row values to shortcodes.\t \n\t $parm = array('category'=>$row['category_id'], 'featured' => 1,'limit' => 4,'layout' => 'bootstrap-news-tabs');\n\t\t $tab[] = array('caption'=>$row['category_name'], 'text'=>e107::getObject('news')->render_newsgrid($parm)); \n }\n return e107::getForm()->tabs($tab);\n }", "title": "" }, { "docid": "c2712fd3046ca465ff67b906f5a72254", "score": "0.5645504", "text": "public function outputTab($class) {\n $this->modx->controller->addLexiconTopic('moddevtools:default');\n $this->modx->controller->addCss($this->config['cssUrl'] . 'mgr/main.css');\n $this->modx->controller->addJavascript($this->config['jsUrl'] . 'mgr/moddevtools.js');\n $this->modx->controller->addJavascript($this->config['jsUrl'] . 'mgr/misc/utils.js');\n\n $modx23 = !empty($this->modx->version) && version_compare($this->modx->version['full_version'], '2.3.0', '>=');\n\n $this->modx->controller->addHtml('\n <script type=\"text/javascript\">\n // <![CDATA[\n modDevTools.config = {\n assets_url: \"' . $this->config['assetsUrl'] . '\"\n ,connector_url: \"' . $this->config['connectorUrl'] . '\"\n };\n modDevTools.modx23 = ' . (int)$modx23 . ';\n // ]]>\n </script>');\n\n if (!$modx23) {\n $this->modx->controller->addCss($this->config['cssUrl'] . 'mgr/bootstrap.buttons.css');\n }\n\n $this->modx->controller->addJavascript($this->config['jsUrl'] . 'mgr/widgets/elements.panel.js');\n $this->modx->controller->addJavascript($this->config['jsUrl'] . 'mgr/widgets/chunks.panel.js');\n $this->modx->controller->addJavascript($this->config['jsUrl'] . 'mgr/widgets/snippets.panel.js');\n if ($class == 'Template') {\n $this->modx->controller->addJavascript($this->config['jsUrl'] . 'mgr/widgets/resources.grid.js');\n $this->modx->controller->addHtml(\"<script>\n Ext.onReady(function() {\n MODx.addTab('modx-template-tabs',{\n title: _('chunks'),\n id: 'moddevtools-template-chunks-tab',\n width: '100%',\n link_type: 'temp-chunk',\n items: [{\n xtype: 'moddevtools-panel-chunks'\n }]\n });\n MODx.addTab('modx-template-tabs',{\n title: _('snippets'),\n id: 'moddevtools-template-snippets-tab',\n width: '100%',\n link_type: 'temp-snip',\n items: [{\n xtype: 'moddevtools-panel-snippets'\n }]\n });\n MODx.addTab('modx-template-tabs',{\n title: _('resources'),\n id: 'moddevtools-template-resources-tab',\n width: '100%',\n items: [{\n xtype: 'moddevtools-grid-resources',\n width: '100%'\n }]\n });\n });</script>\");\n } else if ($class == 'Chunk') {\n $this->modx->controller->addJavascript($this->config['jsUrl'] . 'mgr/widgets/templates.panel.js');\n $this->modx->controller->addHtml(\"<script>\n Ext.onReady(function() {\n MODx.addTab('modx-chunk-tabs',{\n title: _('templates'),\n id: 'moddevtools-chunk-templates-tab',\n width: '100%',\n link_type: 'temp-chunk',\n items: [{\n xtype: 'moddevtools-panel-templates'\n }]\n });\n MODx.addTab('modx-chunk-tabs',{\n title: _('chunks'),\n id: 'moddevtools-chunk-chunks-tab',\n width: '100%',\n link_type: 'chunk-chunk',\n items: [{\n xtype: 'moddevtools-panel-chunks'\n }]\n });\n MODx.addTab('modx-chunk-tabs',{\n title: _('snippets'),\n id: 'moddevtools-chunk-snippets-tab',\n width: '100%',\n link_type: 'chunk-snip',\n items: [{\n xtype: 'moddevtools-panel-snippets'\n }]\n });\n });</script>\");\n }\n return true;\n }", "title": "" }, { "docid": "01ea93d7661b5e9e34c9ead91ff482c1", "score": "0.56434244", "text": "function prepareTabs()\n {\n $this->addElement(\n 'html', \n ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath(\n 'Chamilo\\Core\\Repository\\ContentObject\\Survey\\Page\\Question\\DateTime', \n true) . 'Form.js'));\n \n $this->getTabsGenerator()->add_tab(\n new DynamicFormTab(\n self::TAB_QUESTION, \n Translation::get(\n (string) StringUtilities::getInstance()->createString(self::TAB_QUESTION)->upperCamelize()), \n Theme::getInstance()->getImagePath(\n 'Chamilo\\Core\\Repository\\ContentObject\\Survey\\Page\\Question\\DateTime', \n 'Tab/' . self::TAB_QUESTION), \n 'build_question_form'));\n \n $this->addDefaultTab();\n $this->addMetadataTabs();\n }", "title": "" }, { "docid": "347d5d785f88f177b0ccece8061a84c6", "score": "0.5628911", "text": "public function create_tabs( $tabs, $current = null ) {\n\t\t$plugin_default_options = XlWUEV_Common::get_default_plugin_options();\n\t\tif ( is_null( $current ) ) {\n\t\t\tif ( isset( $_GET['tab'] ) ) { // WPCS: input var ok, CSRF ok.\n\t\t\t\t$current = $_GET['tab']; // WPCS: input var ok, CSRF ok.\n\t\t\t} else {\n\t\t\t\t$current = 'wuev-email-template';\n\t\t\t}\n\t\t}\n\t\t$content = '';\n\t\t$content .= '<h2 class=\"nav-tab-wrapper\">';\n\t\tforeach ( $tabs as $location => $tabname ) {\n\t\t\tif ( $current === $location ) {\n\t\t\t\t$class = ' nav-tab-active';\n\t\t\t\t$current_tabname = $tabname;\n\t\t\t} else {\n\t\t\t\t$class = '';\n\t\t\t}\n\t\t\t$content .= '<a class=\"nav-tab' . $class . '\" href=\"?page=woo-confirmation-email&tab=' . $location . '\">' . $tabname . '</a>';\n\t\t}\n\t\t$content .= '</h2>';\n\n\t\tswitch ( $current ) {\n\t\t\tcase 'wuev-bulk-verification':\n\t\t\t\t$submit_button_text = __( 'Verify All', 'woo-confirmation-email' );\n\t\t\t\tbreak;\n\t\t\tcase 'wuev-test-email':\n\t\t\t\t$submit_button_text = __( 'Send Test Email', 'woo-confirmation-email' );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$submit_button_text = __( 'Save Changes', 'woo-confirmation-email' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$tab_options = XlWUEV_Common::get_tab_options( $current );\n\n\t\tob_start();\n\t\t?>\n <div id=\"poststuff\">\n <div class=\"metabox-holder columns-2\" id=\"post-body\">\n <div id=\"post-body-content\">\n <div id=\"normal-sortables\" class=\"meta-box-sortables ui-sortable wuev_content\">\n <div id=\"dashboard_right_now\" class=\"postbox\">\n <h2 class=\"hndle ui-sortable-handle\"><span><?php echo $current_tabname; ?></span></h2>\n <div class=\"inside\">\n <div class=\"main\">\n <form method=\"post\" class=\"wuev-forms\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\tinclude_once 'settings-tabs/' . $current . '.php';\n\t\t\t\t\t\t\t\t\t\t?>\n <input type=\"hidden\" name=\"wuev_form_type\" value=\"<?php echo $current; ?>\">\n <input type=\"hidden\" name=\"_nonce\" value=\"<?php echo wp_create_nonce( 'wuev_form_submit' ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\tif ( 'wuev-bulk-verification' !== $current ) {\n\t\t\t\t\t\t\t\t\t\t\tsubmit_button( $submit_button_text );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t?>\n </form>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"postbox-container wuev_sidebar\" id=\"postbox-container-1\">\n\t\t\t\t\t<?php do_action( 'xlwuev_options_page_right_content' ); ?>\n </div>\n </div>\n </div>\n\n\t\t<?php\n\t\t$content .= ob_get_clean();\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "dbda09113388d5b05d1bb22b934b3a2d", "score": "0.557167", "text": "public function tabNavigation() {\n echo '<ul class=\"tabs\">';\n foreach($this->tabs as $tab) {\n $url = $this->tabURL($tab);\n if($this->currentTab() == $tab) {\n $class = 'class=\"active\"';\n } else {\n $class = '';\n }\n echo '<li '.$class.'><a href=\"'.$url.'\">'.$this->getLang('tab_'.$tab).'</a></li>';\n }\n echo '</ul>';\n }", "title": "" }, { "docid": "b80d7ef0cdfaf46d273169b2f77b950f", "score": "0.5566475", "text": "public function tabs() {\n\n\t\t// Stop if not on the relevant screen.\n\t\t$screen = get_current_screen();\n\t\tif ( 'data' != $screen->id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_network() ) {\n\t\t\t$start_heading = __( 'Network Data' );\n\t\t} else {\n\t\t\t$start_heading = __( 'Website Data' );\n\t\t}\n\n\t\t$start_heading = apply_filters( 'tabs_data_start_heading', $start_heading );\n\n\t\t// Start. Editor capability for post imporation.\n\t\t$screen->add_content_tab( [\n\t\t\t'id' => 'data-start',\n\t\t\t'capability' => 'edit_posts',\n\t\t\t'tab' => __( 'Data' ),\n\t\t\t'icon' => '',\n\t\t\t'heading' => $start_heading,\n\t\t\t'content' => '',\n\t\t\t'callback' => [ $this, 'start_tab' ]\n\t\t] );\n\n\t\t// Import data. Import capability.\n\t\t$screen->add_content_tab( [\n\t\t\t'id' => 'data-import',\n\t\t\t'url' => admin_url( 'import.php' ),\n\t\t\t'capability' => 'import',\n\t\t\t'tab' => __( 'Import' ),\n\t\t\t'icon' => '',\n\t\t\t'heading' => __( 'Import Data' ),\n\t\t\t'content' => '',\n\t\t\t'callback' => [ $this, 'import_tab' ]\n\t\t] );\n\n\t\t// Import data. Import capability.\n\t\t$screen->add_content_tab( [\n\t\t\t'id' => 'data-export',\n\t\t\t// 'url' => admin_url( 'export.php' ),\n\t\t\t'capability' => 'export',\n\t\t\t'tab' => __( 'Export' ),\n\t\t\t'icon' => '',\n\t\t\t'heading' => __( 'Export Data' ),\n\t\t\t'content' => '',\n\t\t\t'callback' => [ $this, 'export_tab' ]\n\t\t] );\n\n\t\t// User accounts data. Erase others personal data capability.\n\t\t$screen->add_content_tab( [\n\t\t\t'id' => 'data-accounts',\n\t\t\t'capability' => 'erase_others_personal_data',\n\t\t\t'tab' => __( 'Accounts' ),\n\t\t\t'icon' => '',\n\t\t\t'heading' => __( 'Accounts Data' ),\n\t\t\t'content' => '',\n\t\t\t'callback' => [ $this, 'accounts_tab' ]\n\t\t] );\n\t}", "title": "" }, { "docid": "30b5c9388612f739cc843d4325f26266", "score": "0.5558309", "text": "function msp_custom_description_tab( $tabs ){\n return $tabs;\n}", "title": "" }, { "docid": "cf68dec51173f31525b2b0ad1ff758f5", "score": "0.55582297", "text": "function tabsOutput(){\n global $printfriendly;\n /**\n * Remove the extras created by plugins we use\n */\n if( isset( $printfriendly ) ){\n remove_filter( 'the_content', array( $printfriendly, 'show_link' ) );\n remove_filter( 'the_excerpt', array( $printfriendly, 'show_link' ) );\n remove_action( 'wp_head', array( $printfriendly, 'front_head' ) );\n }\n remove_filter( 'the_content', 'auto_sociable' );\n \n \n //Filter for adding extra Tabs\n $extra_tabs = apply_filters('mat_extra_tabs', array('labels' => array(), 'content'=> array()) );\n \n \n echo '<div id=\"tabs\">\n <ul>';\n \n /**\n * Echo all the labels for the tabs\n */\n $count = 0;\n for( $i = 1; $i <8; $i ++ ){\n if(get_field( 'tab_'. $i. '_content') != '' ){\n printf( '<li><a href=\"#tab%s\">%s</a></li>', $i , get_field(\"tab_\". $i. \"_label\") );\n $count++;\n }\n }\n //extra labels\n foreach( $extra_tabs['labels'] as $label ){\n $count++;\n printf( '<li><a href=\"#tab%s\">%s</a></li>', $count , $label );\n }\n \n echo '</ul>' ;\n \n \n /**\n * Echo all the tabs contents\n */\n $count = 0;\n for( $i = 1; $i<8; $i++ ){\n if(get_field( \"tab_\".$i .\"_content\" ) != '' ){\n printf('<div id=\"tab%s\">%s</div>' , $i, get_field( 'tab_'. $i. '_content') );\n $count++;\n }\n }\n //extra content\n foreach( $extra_tabs['content'] as $content ){\n $count++;\n printf('<div id=\"tab%s\">%s</div>' , $count, $content);\n }\n \n echo '</div><!-- end #tabs -->';\n }", "title": "" }, { "docid": "77dbf950e84d5e637090afb0e092ca0a", "score": "0.5551932", "text": "function whats_new() {\n $this->prepareTabs($this->logged_user, 'whats_new');\n $this->response->assign('activity_logs', ActivityLogs::findRecent($this->logged_user));\n }", "title": "" }, { "docid": "7a52e9a9d5d910536eaacbe040e54575", "score": "0.55343217", "text": "public function ppc_page_html() {\n\t\t\trequire_once PPC_ABSPATH . 'includes/ppc-tabs.php';\n\t\t}", "title": "" }, { "docid": "6d079ff5d63df9caab3043f1a4bb1875", "score": "0.5518417", "text": "function render_menu_tabs() \r\n {\r\n $current_tab = $this->get_current_tab();\r\n\r\n echo '<h2 class=\"nav-tab-wrapper\">';\r\n foreach ( $this->menu_tabs as $tab_key => $tab_caption ) \r\n {\r\n $active = $current_tab == $tab_key ? 'nav-tab-active' : '';\r\n echo '<a class=\"nav-tab ' . $active . '\" href=\"?page=' . $this->menu_page_slug . '&tab=' . $tab_key . '\">' . $tab_caption . '</a>';\t\r\n }\r\n echo '</h2>';\r\n }", "title": "" }, { "docid": "ebd85979ca8e75f37add861ad2ee06e5", "score": "0.55073637", "text": "public function render_info_tab()\n {\n $html = \"\";\n\n $tablink = add_query_arg(array( 'tab' => \"infos\" ));\n $tabname = __('Informations', 'splash-wordpress-plugin');\n\n $html .= '<a href=\"'.$tablink.'\" class=\"nav-tab\">'.$tabname.'</a>';\n\n return $html;\n }", "title": "" }, { "docid": "879497e8f65526289a33c41bdd14342a", "score": "0.5504858", "text": "public function content() {\n\t\treturn sprintf(\n\t\t\t'<div id=\"%1$s\" class=\"wpseotab %2$s\">%3$s</div>',\n\t\t\tesc_attr( 'wpseo_' . $this->name ),\n\t\t\tesc_attr( $this->name ),\n\t\t\t$this->content\n\t\t);\n\t}", "title": "" }, { "docid": "0c31012787aa1c831aba665a1a691746", "score": "0.549979", "text": "private function create_tabs()\n {\n $tabs_renderer = new DynamicFormTabsRenderer($this->form_name, $this);\n \n $tabs_renderer->add_tab(\n new DynamicFormTab(\n self::TAB_GENERAL, \n (string) StringUtilities::getInstance()->createString(self::TAB_GENERAL)->upperCamelize(), \n null, \n 'build_general_tab_form_elements'));\n \n $tabs_renderer->add_tab(\n new DynamicFormTab(\n self::TAB_SETTINGS, \n (string) StringUtilities::getInstance()->createString(self::TAB_SETTINGS)->upperCamelize(), \n null, \n 'build_settings_tab_form_elements'));\n \n $tabs_renderer->add_tab(\n new DynamicFormTab(\n self::TAB_TOOLS, \n (string) StringUtilities::getInstance()->createString(self::TAB_TOOLS)->upperCamelize(), \n null, \n 'build_tools_tab_form_elements'));\n \n $tabs_renderer->add_tab(\n new DynamicFormTab(\n self::TAB_RIGHTS, \n (string) StringUtilities::getInstance()->createString(self::TAB_RIGHTS)->upperCamelize(), \n null, \n 'build_rights_tab_form_elements'));\n \n $tabs_renderer->render();\n }", "title": "" }, { "docid": "4f2eee1960005e37fee9650201bff290", "score": "0.54966724", "text": "public function getTab()\n\t{\n\t\tob_start();\n\t\trequire dirname(__FILE__) . '/tab.phtml';\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "6a9fe2f24ed933c2a8f6ae5953e696bc", "score": "0.5493316", "text": "function tabs($dbh,$current)\n\n\t\t{\n\t\t\t$current_tab = substr($current,0,-4);\n\n\t\t\t//Determine which tabs the user sees depending on their group membership\n\t\t\t$get_tab_config = $dbh->prepare('SELECT group_name,allowed_tabs FROM cm_groups WHERE group_name = ? ');\n\n\t\t\t$get_tab_config->bindParam(1, $_SESSION['group']);\n\n\t\t\t$get_tab_config->execute();\n\n\t\t\t$r = $get_tab_config->fetch();\n\n\t\t\t$group_tabs = unserialize($r['allowed_tabs']);\n\n\t\t\t//output the tabs\n\t\t\tob_start();\n\t\t\techo \"<div id='tabs'><ul>\";\n\n\t\t\tforeach ($group_tabs as $tab)\n\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($tab == $current_tab)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<li class='current' id = 'tab_$tab'><a href='index.php?i=\" . $tab . \".php'><span>$tab</span></a></li>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse\n\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<li><a id = 'tab_$tab' href='index.php?i=\" . $tab . \".php'><span>$tab</span></a></li>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\techo \"</ul></div>\";\n\t\t\t$tabs_html = ob_get_clean();\n\n\t\t\treturn $tabs_html;\n\n\n\t\t}", "title": "" }, { "docid": "f91fce044e47e361c4d4ae9c5c62d3f2", "score": "0.5487866", "text": "public function getTab() {\n\t\tob_start();\n\t\trequire __DIR__ . '/Templates/tab.phtml';\n\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "9d56b9da080417e0ec00cb23da3eb94d", "score": "0.54876035", "text": "function bs_tab( $atts, $content = '' ) {\n\t\textract(shortcode_atts(array(\n\t\t\t'title'\t\t=> 'Tab',\n\t\t\t'active'\t=> FALSE\n\t\t), $atts));\n\t\t$slug = 'tab-' . $GLOBALS['tab-id'] . '-' . sanitize_title( $title );\n\t\t$GLOBALS['tabs'][$slug] = $title;\n\t\t\n\t\t$el_class = 'tab-pane';\n\t\tif (strtoupper($active) == 'TRUE') {\n\t\t\t$GLOBALS['tab-active'] = $slug;\n\t\t\t$el_class .= ' active';\n\t\t}\n\t\t\n\t\treturn '<div id=\"' . $slug . '\" ' . $this->get_atts($el_class, $atts) . '>' . do_shortcode($content) . '</div>';\n\t}", "title": "" }, { "docid": "bde5f68a9365eb45dca320a9b770370d", "score": "0.548359", "text": "function startTab( $pID, $tabText, $paneid ) {\r\r\n\t\t// not needed anymore since DOM is ready when we start:\r\r\n\t\t//\t$js\t\t=\t'tabPane' . $pID . '.addTabPage(document.getElementById(\"cbtab' . $paneid . '\"));';\r\r\n\t\t//\t$this->_outputJs( $pID, $js );\r\r\n\t\treturn '<div class=\"tab-page\" id=\"cbtab' . $paneid . '\">'\r\r\n\t\t.\t'<h2 class=\"tab\">' . $tabText . '</h2>';\r\r\n\t}", "title": "" }, { "docid": "fecab3c0a2ac1b5c433ca0a6722d5b04", "score": "0.54704183", "text": "protected function actionNew() {\n\n\t\t// generate templates list\n\t\t$this->showDataLayoutContent();\n\t}", "title": "" }, { "docid": "9f140b8e333107c5aad0da37601aeee1", "score": "0.5464658", "text": "function render_menu_tabs()\r\n {\r\n $current_tab = $this->get_current_tab();\r\n\r\n echo '<h2 class=\"nav-tab-wrapper\">';\r\n foreach ($this->menu_tabs as $tab_key => $tab_caption) {\r\n $active = $current_tab == $tab_key ? 'nav-tab-active' : '';\r\n echo '<a class=\"nav-tab ' . $active . '\" href=\"?page=' . $this->dashboard_menu_page_slug . '&tab=' . $tab_key . '\">' . $tab_caption . '</a>';\r\n }\r\n echo '</h2>';\r\n }", "title": "" }, { "docid": "87f4a590041310f1f09d785b7b5bcd55", "score": "0.54640645", "text": "public function newAction()\n {\n $this->tag->prependTitle(\"文章发布 - \");\n }", "title": "" }, { "docid": "430d6c12534dc321e0b06faab13a494f", "score": "0.5458244", "text": "function getTab()\n {\n $controller = $this->controller;\n $action = $this->action;\n $error = (bool)$this->error;\n\n ob_start();\n require __DIR__ . '/requestPanel.tab.phtml.php';\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "f9a8f9dfe3f9523b0ffb86b1c87a0c79", "score": "0.544823", "text": "public function body() {\n\t\tBase_ActionBarCommon::add('back',__('Back'),$this->create_back_href());\n\t\tif ($this->is_back()) {\n\t\t\treturn Base_BoxCommon::pop_main();\n\t\t}\n\t\t\n\t\t$tb = $this->init_module(Utils_TabbedBrowser::module_name());\n\t\t$tb->set_tab(__('Chat'), array($this,'chat'),true,null);\n\t\t$tb->set_tab(__('History'), array($this,'history'),null);\n\t\t$this->display_module($tb);\n }", "title": "" }, { "docid": "efd59f7b45c35b472fad7bcea410e844", "score": "0.54370373", "text": "public function tab_content() {\n woocommerce_admin_fields($this->get_fields());\n }", "title": "" }, { "docid": "d0b07412a8ce0add878efcd50ec6b575", "score": "0.54370236", "text": "function woo_new_product_tab( $tabs ) {\n\n\tif(get_field('directions_for_use')){\n\t\t$tabs['directions_tab'] = array(\n\t\t'title' \t=> __( 'Directions for Use', 'woocommerce' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'woo_new_product_tab_content'\n\t\t);\n}\n\n\tif(get_field('ingredients')){\n\t\t$tabs['ingredients_tab'] = array(\n\t\t'title' \t=> __( 'Ingredients', 'woocommerce' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'woo_new_product_ta_content'\n\t\t);\n}\n\n\treturn $tabs;\n}", "title": "" }, { "docid": "e8a8e0eb98ee0e1bbd7c1ef727fc862a", "score": "0.54187554", "text": "public function createLastPage() {\n $module_name = $this->getRequest()->getModuleName();\n $class_name = $this->getRequest()->getControllerName();\n $action_name = $this->getRequest()->getActionName();\n $this->view->module_name = $module_name;\n $this->view->class_name = $class_name;\n $this->view->action_name = $action_name;\n }", "title": "" }, { "docid": "c693f032baa3281560c42579f9d00188", "score": "0.5407436", "text": "public function create_settings_tabs() {\n\t\t$my_plugin_tabs = XlWUEV_Common::get_default_plugin_settings_tabs();\n\t\techo '<div class=\"wrap\">';\n\t\techo '<h1>' . XLWUEV_FULL_NAME . '</h1>';\n\t\techo $this->create_tabs( $my_plugin_tabs );\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "926ab78813ea68e486d8452b5470e2f0", "score": "0.540621", "text": "public function create()\n\t{\n\t\t$this->auth->restrict('STEPS.Content.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_steps())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('steps_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'steps');\n\n\t\t\t\tTemplate::set_message(lang('steps_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/content/steps');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('steps_create_failure') . $this->steps_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('steps', 'steps.js');\n \n $deparments = $this->tab_model->find_all();\n Template::set('deparments', $deparments);\n\t\tTemplate::set('toolbar_title', lang('steps_create') . ' STEPS');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "e763c09db1615ed037c12448bc9261d2", "score": "0.5404798", "text": "public function tab1() {\n $this->data = new StdClass();\n\n $mode = $this->getConfigParam( 'action_mode' );\n\n if ( $mode == 'text' ) {\n\t $this->renderTextbaseView();\n \treturn $this->data;\n }\n \n if ($this->getConfigParam( 'action_mode' ) != 'terms_conditions') {\n $this->getHeader(1);\n }\n\n $this->showContent( 'agents' );\n return $this->data;\n }", "title": "" }, { "docid": "d521c9e269bcb8bab4f907fcf6810b91", "score": "0.54017746", "text": "public function settings_page_content() { ?>\n <div class=\"wrap\">\n <h1> Elementor Super Cat </h1>\n <div class=\"nav-tab-wrapper\" style=\"margin-bottom: 30px;\">\n <?php\n foreach($this->tabs as $k => $v){\n ?>\n\n <a class=\"nav-tab <?php echo $this->current_tab == $k || '' ? 'nav-tab-active' : ''; ?>\" href=\"<?php echo admin_url( 'admin.php?page=elementor-super-cat&tab='.$k ); ?>\"><?php _e( $v, 'elementor-super-cat' ); ?> </a>\n\n <?php\n }\n ?>\n </div>\n <form method=\"post\" action=\"options.php\">\n <input type=\"hidden\" name=\"super_cat_current_tab\" value=\"<?php echo($this->current_tab) ?>\">\n <?php\n settings_fields(\"elementor_super_cat\");\n $this->tab_handler->content();\n ?>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "8492d4ed2ca0c51a59720c896e057cf3", "score": "0.5400254", "text": "public function endTemplate(): Tabs\n {\n return $this->tabs;\n }", "title": "" }, { "docid": "f2e678a4aab31718168ee5c9875d93cd", "score": "0.53981996", "text": "public function setup_tab()\n\t{\n\t\t$this->tab_info = [\n\t\t\t'id' => 'log',\n\t\t\t'name' => esc_html_x( 'Log', 'tab name', 'helpful' ),\n\t\t];\n\t\t$this->tab_content = [ &$this, 'render_callback' ];\n\t}", "title": "" }, { "docid": "5fda82a185f1f450a069be63960e3c06", "score": "0.5396913", "text": "public function create()\n {\n return view('mystudio.tab.create', [\n 'forms' => MyStudio::where('type', 'form')->get(),\n 'tables' => MyStudio::where('type', 'table')->get(),\n 'refs' => MyStudio::where('type', 'form')->first(),\n ]);\n }", "title": "" }, { "docid": "2e61b2d518930131e61f0216bc73e2a5", "score": "0.53952175", "text": "public function tab1(){\n $this->layout = new \\stdClass();\n $this->layout->scroll[] = $this->components->getProductPage($this->getData('product_info', 'object'));\n return $this->layout;\n }", "title": "" }, { "docid": "280121ef1ce2ad1df8888eed10afe940", "score": "0.5391655", "text": "protected function addTemplateTabContent()\n\t{\n\t\t$aMetakeys = $this->getMetakeysForPosttype();\n\t\t$aTaxonomies = $this->getPosttypeTaxonomies();\n\t\t?>\n\t\t<div class=\"post-body\" data-tab-group=\"%%sIdent%%\">\n\t\t\t\t<div class=\"post-body-content\">\n\t\t\t\t\t<div class=\"options\">\n\t\t\t\t\t\t<span class=\"toggle closed\" data-element-group=\"%%sElementIdent%%\"></span>\n\t\t\t\t\t\t<h4 class=\"element-manager\"><?php _e( 'Options', 'custom-columns' ); ?></h4>\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- options content -->\n\t\t\t\t\t<div class=\"options-content\">\n\t\t\t\t\t\t<!-- sortable -->\n\t\t\t\t\t\t<div class=\"options-content-sortable\">\n\t\t\t\t\t\t\t<label for=\"tab-options-%%sIdent%%-options-sortable-makesortable\"><?php _e( 'Make column sortable:', 'custom-columns' ); ?>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"0\" name=\"aTabs[%%sIdent%%][aOptions][sortable][blMakeSortable]\" />\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" value=\"1\" name=\"aTabs[%%sIdent%%][aOptions][sortable][blMakeSortable]\" id=\"tab-options-%%sIdent%%-options-sortable-makesortable\" />\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- sortable options -->\n\t\t\t\t\t\t\t<div class=\"options-content-sortable-content\" rel=\"options\">\n\t\t\t\t\t\t\t\t<label for=\"tab-options-%%sIdent%%-options-sortable-type\"><?php _e( 'Choose sort type', 'custom-columns' ); ?></label>\n\t\t\t\t\t\t\t\t<select data-tab-group=\"%%sIdent%%\" id=\"tab-options-%%sIdent%%-options-sortable-type\" name=\"aTabs[%%sIdent%%][aOptions][sortable][sType]\">\n\t\t\t\t\t\t\t\t\t<option value=\"posts_table\"><?php _e( 'Posts-Table', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<?php if( count( $aMetakeys ) ): ?>\t\n\t\t\t\t\t\t\t\t\t<option value=\"post_meta\"><?php _e( 'Post Meta', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t<?php endif; ?>\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<?php if( count( $aTaxonomies ) ): ?>\n\t\t\t\t\t\t\t\t\t<option value=\"taxonomies\"><?php _e( 'Taxonomy', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<!-- sortable types -->\n\t\t\t\t\t\t\t\t<div id=\"tab-options-%%sIdent%%-options-sortable-type-posts_table\">\n\t\t\t\t\t\t\t\t\t<label for=\"tab-options-%%sIdent%%-options-sortable-type-posts_table-value\"><?php _e( 'Choose table column', 'custom-columns' ); ?></label>\n\t\t\t\t\t\t\t\t\t<select id=\"tab-options-%%sIdent%%-options-sortable-type-posts_table-value\" name=\"aTabs[%%sIdent%%][aOptions][sortable][posts_table]\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"ID\"><?php _e( 'ID', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"author\"><?php _e( 'Author', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_date\"><?php _e( 'Date', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_date_gmt\"><?php _e( 'Date GMT', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_content\"><?php _e( 'Content', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_title\"><?php _e( 'Title', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_excerpt\"><?php _e( 'Excerpt', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_status\"><?php _e( 'Status', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"comment_status\"><?php _e( 'Comment status', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"ping_status\"><?php _e( 'Ping status', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_password\"><?php _e( 'Post password', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_name\"><?php _e( 'Slug', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"to_ping\"><?php _e( 'Ping', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"pinged\"><?php _e( 'Pinged', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_modified\"><?php _e( 'Modified', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_modified_gmt\"><?php _e( 'Modified GMT', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_content_filtered\"><?php _e( 'Content filtered', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_parent\"><?php _e( 'Post parent', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"guid\"><?php _e( 'Url', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"menu_order\"><?php _e( 'Menu order', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_type\"><?php _e( 'Post type', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"post_mime_type\"><?php _e( 'Post mime type', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"comment_count\"><?php _e( 'Comment count', 'custom-columns' ); ?></option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div id=\"tab-options-%%sIdent%%-options-sortable-type-post_meta\">\n\t\t\t\t\t\t\t\t\t<label for=\"tab-options-%%sIdent%%-options-sortable-type-post_meta-value\"><?php _e( 'Choose a meta key', 'custom-columns' ); ?></label>\n\t\t\t\t\t\t\t\t\t<select id=\"tab-options-%%sIdent%%-options-sortable-type-post_meta-value\" name=\"aTabs[%%sIdent%%][aOptions][sortable][post_meta]\">\n\t\t\t\t\t\t\t\t\t\t<?php foreach( $aMetakeys as $oMetakey ): ?>\n\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $oMetakey->meta_key; ?>\"><?php echo $oMetakey->meta_key; ?></option>\n\t\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div id=\"tab-options-%%sIdent%%-options-sortable-type-taxonomies\">\n\t\t\t\t\t\t\t\t\t<label for=\"tab-options-%%sIdent%%-options-sortable-type-taxonomies-value\"><?php _e( 'Choose a taxonomy', 'custom-columns' ); ?></label>\n\t\t\t\t\t\t\t\t\t<select id=\"element_type_taxonomies_%%sElementIdent%%_taxonomies\" name=\"aTabs[%%sIdent%%][aOptions][sortable][taxonomies]\">\n\t\t\t\t\t\t\t\t\t\t<?php foreach( $aTaxonomies as $sTaxonomyId => $oTaxonomy ): ?>\n\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $sTaxonomyId; ?>\"><?php echo $oTaxonomy->labels->name; ?></option>\n\t\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\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\t<!-- // sortable types -->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- // sortable options -->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- // sortable -->\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- // options content -->\n\t\t\t\t\t<div class=\"top-bar\">\n\t\t\t\t\t\t<h4 class=\"element-manager\"><?php _e( 'Elements', 'custom-columns' ); ?></h4>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<span class=\"add-field button\" data-tab-group=\"%%sIdent%%\">&nbsp;</span>\t\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t<div class=\"sortable\">\n\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<?php\t\n\t}", "title": "" }, { "docid": "35cc09a8e8bb79095172d8126eb12671", "score": "0.5390608", "text": "public function getTabHtml()\n {\n $html = '';\n\n if ($this->hasTabs())\n {\n $html .= '<div class=\"' . self::COMPONENT_TAB_HOLDER_CLASSNAME . '\">';\n\n $html .= '<div class=\"' . self::COMPONENT_TAB_LINKS_HOLDER_CLASSNAME . '\">';\n\n $html .= '<ul>';\n\n $activeClass = 'active';\n\n // Generate the tab links\n foreach ($this->getTabs() as $tab)\n {\n $extraClass = '';\n\n if (!empty($tab['href']) && $tab['href'] != '#')\n $extraClass .= ' ' . self::COMPONENT_TAB_LINK_LOAD_DYNAMIC_CLASSNAME;\n\n $html .= '<li><a' . (!empty($activeClass) || !empty($extraClass) ? ' class=\"' . $activeClass . $extraClass . '\"' : '') . ' href=\"' . $tab['href'] . '\">' . $tab['label'] . '</a></li>';\n\n $activeClass = '';\n }\n\n $html .= '</ul>';\n\n $html .= '</div>';\n\n // Generate the tab contents\n $html .= '<div class=\"' . self::COMPONENT_TAB_CONTENTS_HOLDER_CLASSNAME . '\">';\n\n $activeClass = 'active';\n\n // Generate the tab links\n foreach ($this->getTabs() as $tab)\n {\n $html .= '<div class=\"' . self::COMPONENT_TAB_CONTENT_HOLDER_CLASSNAME . (!empty($activeClass) ? ' ' . $activeClass : '') . '\">' . $tab['content'] . '</div>';\n\n $activeClass = '';\n }\n\n $html .= '</div>';\n\n $html .= '</div>';\n }\n\n return $html;\n }", "title": "" }, { "docid": "e4d5b7baa4578353ff0fe919ca612572", "score": "0.5390188", "text": "public function closeTab(){\r\r\n\t\techo '</div>';\r\r\n\t}", "title": "" }, { "docid": "96106ad9e32716464aee4ce9f4da9fda", "score": "0.53879166", "text": "public function create()\n\t{\n\t\t$menuTab = $this->menuTab;\n\t return response()->view('admin.lessons.create', compact(['menuTab']));\n\t}", "title": "" }, { "docid": "350130429f4752caa7d51305a69f9fec", "score": "0.5387307", "text": "function custom_description_tabs($tabs) {\n global $post;\n if($tabs['description']) {\n $tabs['description']['title'] = $post->post_title;\n }\n return $tabs;\n }", "title": "" }, { "docid": "7d746c43dadf5be15c08af72025d315e", "score": "0.538486", "text": "static function displayTab( $obj, &$links ) {\n\n\n\t\t$button = '<button class=\"addToGroupsPage\" data-grouppage=\"Group:toto\" data-page=\"Horloge_de_Fibonacci\" > add to group</button>';\n\n\n\t\tif ( method_exists ( $obj, 'getTitle' ) ) {\n\t\t\t$title = $obj->getTitle();\n\t\t} else {\n\t\t\t$title = $obj->mTitle;\n\t\t}\n\t\t$groupNameSpace = [ NS_GROUP, NS_GROUP_TALK];\n\n\t\tif ( !isset( $title ) ||\n\t\t\t( !in_array( $title->getNamespace(), $groupNameSpace ) ) ) {\n\t\t\t\t\treturn true;\n\t\t}\n\n\t\t$form_create_tab = array(\n\t\t\t'class' => '',\n\t\t\t'text' => $button,\n\t\t\t'href' => $title->getLocalURL( 'action=formcreate' )\n\t\t);\n\n\t\t$content_actions = &$links['views'];\n\t\t$content_actions['addtogroup'] = $form_create_tab;\n\n\t\treturn true; // always return true, in order not to stop MW's hook processing!\n\t}", "title": "" }, { "docid": "d6588c16d2d08e39228c4507a9882935", "score": "0.53762525", "text": "function startPane($id)\n {\n echo '<div class=\"tab-page\" id=\"' . $id . '\">';\n echo '<script>var tabPane1 = new WebFXTabPane( document.getElementById( \"' . $id . '\" ), ' . $this->useCookies . ' )</script>';\n }", "title": "" }, { "docid": "1900e1a04e8f9ea6921f99b11a7cd20d", "score": "0.53654057", "text": "protected function actionNew() {\n\t\t$this->parser->setParserVar('mediaTypeListContent', $this->createMediaList());\n\t\t$this->showContent($this->parser->parseTemplate($this->templatesPath . 'cmt_table_media_frame.tpl'));\n\t}", "title": "" }, { "docid": "23d5b803ee525655eb9c836f06aee0a0", "score": "0.536204", "text": "public function actionPageTab()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$auth = new Authentication();\n\t\t//$page_liked = $auth->pageLiked();\n\t\t$status = $auth->authenticate();\n\t\t\n\t\tif($status['loggedIn']){\n\t\t\t//save user facebook info in cookies\n\t\t $this->saveCookie($status);\n\t\t\t//Save User Information in the table\n\t\t\t$this->saveUser($status);\n\t\t\t//send user to the landing page of the app\n\t\t\t$this->render('main');\n\t\t}else{\n\t\t\techo \"not logged in\";\n\t\t\t//$this->render('upload');\n\t\t\t$this->renderPartial('auth',array('url'=>$status['loginUrl']));\n\t\t}\n\t}", "title": "" }, { "docid": "b4f2b896be2ca329f76ac64d9c213b66", "score": "0.53562367", "text": "public function getTab();", "title": "" }, { "docid": "71e1a3dcdf1a6c1b7ffd49e5ad398e23", "score": "0.5354205", "text": "public static function insertTab()\n {\n $tab = new Tab;\n $module = new Packetery;\n $id_parent = Tab::getIdFromClassName('AdminParentOrders');\n $tab->id_parent = $id_parent;\n $tab->module = 'packetery';\n $tab->class_name = 'Adminpacketery';\n $tab->name = self::createMultiLangField($module->l('Packeta Orders', 'packetery.class'));\n $tab->position = $tab->getNewLastPosition($id_parent);\n $tab->add();\n return true;\n }", "title": "" }, { "docid": "d4bc89a54f78d2c61e1d8e90173b18e0", "score": "0.5353987", "text": "public function contentRenderMultiTabs() {\n $output = '';\n $output .= '<md-tabs md-selected=\"selectedIndex\" md-dynamic-height=\"\" md-border-bottom=\"\">';\n $output .= '<md-tab ng-repeat=\"block in block.middle.value\" label=\"{{block.title}}\">';\n\n $output .= '<div ng-switch=\"block.type\">';\n $output .= '<div ng-switch-when=\"chart\" class=\"{{block.class}}\">';\n $output .= $this->contentRenderCharts();\n $output .= '</div>';\n $output .= '<div ng-switch-when=\"commonTable\" class=\"{{block.class}}\">';\n $output .= $this->contentRenderTable();\n $output .= '</div>';\n $output .= '<div ng-switch-when=\"multiContainer\" class=\"{{block.class}} padding-0 multicontainer-in-multitabs\">';\n $output .= $this->contentRenderMultiContainer();\n $output .= '</div>';\n $output .= '<div ng-switch-when=\"googleMap\" class=\"{{block.class}}\">';\n $output .= $this->contentRenderGoogleMap();\n $output .= '</div>';\n $output .= '</div>';\n\n $output .= '</md-tab>';\n $output .= '</md-tabs>';\n\n return $output;\n }", "title": "" }, { "docid": "09457f4d71dc4999ecfffb1854264898", "score": "0.5348783", "text": "function jsOpenInNewTab(string $url): string\n{\n return JsResponses::jsOpenInNewTab($url);\n}", "title": "" }, { "docid": "7cac516ca11c443f25f4a03ae0ef72c1", "score": "0.5342751", "text": "public function get_name() {\n\t\treturn 'tabs';\n\t}", "title": "" }, { "docid": "a827e77f9570629563642a94569b8c9a", "score": "0.5335177", "text": "public function getTab($act) {\n\t\tglobal $LANG;\n\n\t\t// not a bootstrap link?\n\t\tif ( $act !== 'bootstrap' ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ($this->isRteMode()) {\n\t\t\tif ( isset($this->parentObject->classesAnchorJSOptions) ) {\n\t\t\t\t$this->parentObject->classesAnchorJSOptions[$act] = @$this->parentObject->classesAnchorJSOptions['page'];\n\t\t\t}\n\t\t}\n\n\t\t// default tab: modal\n\t\tif ( ! isset($this->keyValues['type']) ) {\n\t\t\t$this->keyValues['type'] = 'modal';\n\t\t}\n\n\t\t$content = '<!-- Twitter Bootstrap Links //-->';\n\t\t$content .= $this->getJSCode();\n\t\t$content .= '<form action=\"\" name=\"lurlform\" id=\"lurlform\">';\n\n\t\t// get (sub)tabs for bootstrap links\n\t\t$content .= $this->getSubTabs();\n\n\t\t// tab content 1: modal\n\t\t$content .= $this->getModalTabContent();\n\t\t// tab content 2: popover\n\t\t$content .= $this->getPopoverTabContent();\n\t\t// tab content 3: button\n\t\t$content .= $this->getButtonTabContent();\n\n\t\t// default additional fields\n\t\t$content .= $this->getAdditionalDefaultFields();\n\n\t\t$content .= '</form>';\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "6b1001e602395db03115f44f3a3d88d8", "score": "0.5334228", "text": "public function create()\n\t{\n\t\t$menuTab = $this->menuTab;\n\t return response()->view('admin.pages.create', compact(['menuTab']));\n\t}", "title": "" }, { "docid": "cb7736b3c5aec91190759e56329a00b5", "score": "0.5332936", "text": "public function newActionGet() : object\n {\n $title = \"New Movie | oophp\";\n\n $this->app->page->add(\"movie/new\");\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "25374a766b9f8dd38ea686fe8a450ff0", "score": "0.532442", "text": "function addTab(Tabbable $pane)\n\t{\n\t\t$this->panes[] = $pane;\n\t\t\n\t\t$tab = new Tab();\n\t\t$tab->setSize(25, 5);\n\t\t$index = count($this->tabs);\n\t\t$tab->background->setAction($this->createAction(array($this, 'clickOnTab'), $index));\n\t\t$tab->label->setText($pane->getTitle());\n\t\t\n\t\t$this->tabs[] = $tab;\n\t\t$this->tabsView->addComponent($tab);\n\t\t\n\t\tif($this->activeId == -1)\n\t\t\t$this->clickOnTab(null, 0);\n\t}", "title": "" }, { "docid": "ad99114cd7de6696a7225f768ce604c6", "score": "0.53076595", "text": "public function register_tab( $tabs, $current ) {\n\t\t$tabs['start'] = array(\n\t\t\t'id' => 'start',\n\t\t\t'name' => esc_html_x( 'Start', 'tab name', 'helpful' ),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "title": "" }, { "docid": "cf6a5e4a0ec7eea7ca10debfca3104a0", "score": "0.5306082", "text": "public function createTabLink()\n {\n $this->installTab('SalesLayerImport', 'Sales Layer', 'SELL');\n $this->installTab('AllConnectors', 'Connectors', 'SalesLayerImport');\n $this->installTab('AddConnectors', 'Add New Connector', 'SalesLayerImport');\n $this->installTab('HowToUse', 'How To Use', 'SalesLayerImport');\n $this->installTab('AdminDiagtools', 'Diagnostics', 'SalesLayerImport');\n return true;\n }", "title": "" }, { "docid": "66ac680a56b44ce06b1faf2b787d4312", "score": "0.52953416", "text": "function peerreview_tabs($coursemoduleid, $peerreviewid, $current='description') {\n global $CFG;\n\n $params = array('id' => $coursemoduleid, 'peerreviewid' => $peerreviewid);\n $tabs = array();\n $row = array();\n\n $link = new moodle_url($CFG->wwwroot.'/mod/peerreview/view.php', $params);\n $row[] = new tabobject('description', $link, get_string('description'));\n\n $link = new moodle_url($CFG->wwwroot.'/mod/peerreview/criteria.php', $params);\n $row[] = new tabobject('criteria', $link, get_string('criteria', 'peerreview'));\n\n $link = new moodle_url($CFG->wwwroot.'/mod/peerreview/submissions.php', $params);\n $row[] = new tabobject('submissions', $link, get_string('submissions', 'peerreview'));\n\n // $link = new moodle_url($CFG->wwwroot.'/mod/peerreview/analysis.php', $params);\n // $row[] = new tabobject('analysis', $link, get_string('analysis', 'peerreview'));\n\n $tabs[] = $row;\n return print_tabs($tabs, $current, null, null, true);\n}", "title": "" }, { "docid": "e9207f4de029734e4aba7fb31d0f3fd1", "score": "0.52899384", "text": "function featuredTab($number = 1, $name = 'Default', $date = null, $url = 'home', $featuredImage = null, $author = \"Default\")\n\t{\n\t\tif(empty($date))\n\t\t{\n\t\t\t$headerText = $name;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$headerText = $name.'<p>'.$date.' by '.$author.'.</p>';\n\t\t}\n\t\techo \"<div onClick=\\\"window.location.href='\".$url.\"'\\\" id=\\\"featuredTab\".$number.\"\\\" class=\\\"featuredPadding featuredTab\\\"\n\t\tstyle=\\\"background: url('\";\n\t\tif(!empty($featuredImage))\n\t\t{\n\t\t\techo themeDir().$featuredImage;\n\t\t}\n\t\telse{\n\t\t\techo themeDir(). 'images/featured/postPlaceholder.png';\n\t\t}\n\t\techo \"') no-repeat top center; background-size:cover;\\\">\n\t\t<span class=\\\"featuredText\\\">$headerText</span>\n\t\t</div>\";\n\t}", "title": "" }, { "docid": "813fed857a65caebc6ce9558dceec01a", "score": "0.52885085", "text": "public function addTab($title, $content, $weight = 1, $classes = NULL) {\n while (isset($this->tabs[$weight])) {\n $weight += 0.1;\n }\n $this->tabs[$weight][$this->env->getContext()] = array('title' => $title, 'content' => $content, 'classes' => $classes);\n }", "title": "" }, { "docid": "11c41d5316092f86267aba4bd71bb1ae", "score": "0.5277084", "text": "public function getTab()\n\t{\n\t\t$tab = Html::el('span');\n\t\t$image = $tab->create('img')->src($this->getIconSrc('flag_blue.png'))->id('TranslationPanel-icon');\n\t\t$tab->add('Translations');\n\t\t$tab->create('script')->type('text/javascript')->setHtml('translationPanel.init();');\n\t\treturn (string) $tab;\n\t}", "title": "" }, { "docid": "5e860ab41a8536e9d22730a9a23adec5", "score": "0.5275452", "text": "public function getTab() {\n\t\t$defaultSESSID = self::$defaultSESSID;\n\t\t$s = <<<EOF\n<span style=\"cursor:pointer;\" onclick=\"phpedpanel.switchMode();return false;\">\n<img src=\"data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAArlBMVEX///\n8dYnkdY3kdY3gfZXkfZHggZXkiZnohZ3kkaHonansna3oqbXwqbXsrbnwsb3stcHw4VlMxTkogOTItTkU4Vk4xVkoo\nQTkxTkUoSD0oRTktSD0jPjIjQTItTj0uaiI6fCtTjTySwX9zp1iWw3mVwnmfx4GmyYeuzpGvzpG10pnb68y20pm40p\ny40p3G3K7V58Lb6szn89vH3K/G267H26/L37TV5sLH266xrrEE7PJGAAAAAXRSTlMAQObYZgAAAJBJREFUeNptT4s\nOgjAQO3zjczCcMBV8gjoVRUX7/z8mamYm8ZIm1+Z6aYn+zrAsuAUcg2MMIl8z4XoBY5AwDlh2Y4wRH2mlf4nUPR0A\noXg9cwi9c6byY1e7fNk+qcV1n3S0ZWKn+WO5jW0efgSJ1mG3ma+aeCci8lBrJPF6VtdJCnCrWrHM8FPgt01Qaie+2xNk0Qw09mh70AAAAABJRU5ErkJggg==\"\n><span id=\"phpedpaneltext\">Off</span>\n</span>\n<script type=\"text/javascript\">\n/* <![CDATA[ */\n(function() {\n\tphpedpanel = {\n\t\tsetCookie : function (name, value) {\n\t\t\tdocument.cookie = name + \"=\" + value + \"; path=/\";\n\t\t },\n\n\t\tgetCookie : function (name) {\n\t\t\tvar nameEQ = name + \"=\";\n\t\t\tvar ca = document.cookie.split(';');\n\t\t\tfor(var i=0;i < ca.length;i++) {\n\t\t\t\tvar c = ca[i];\n\t\t\t\twhile (c.charAt(0)==' ') c = c.substring(1,c.length);\n\t\t\t\tif (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);\n\t\t\t}\n\t\t\treturn '';\n\t\t },\n\n\t\tswitchMode: function () {\n\t\t\tif (phpedpanel.isActive()) {\n\t\t\t\tphpedpanel.setCookie('DBGSESSID_OLD', phpedpanel.getCookie('DBGSESSID'));\n\t\t\t\tphpedpanel.setCookie('DBGSESSID', '');\n\t\t\t} else {\n\t\t\t\tphpedpanel.setCookie('DBGSESSID', phpedpanel.getCookie('DBGSESSID_OLD') != '' ? phpedpanel.getCookie('DBGSESSID_OLD'): {$defaultSESSID})\n\t\t\t}\n\t\t\tphpedpanel.redraw();\n\t\t},\n\n\t\tisActive: function () {\n\t\t\treturn phpedpanel.getCookie('DBGSESSID') != '' && phpedpanel.getCookie('DBGSESSID') != -1;\n\t\t},\n\n\t\tredraw: function() {\n\t\t\tvar $ = Nette.Query.factory;\n\t\t\td = $('#phpedpaneltext').dom();\n\n\t\t\tif (!phpedpanel.isActive()) {\n\t\t\t\td.style.color = \"#888\";\n\t\t\t\td.innerHTML = \"Off\";\n\t\t\t\td.title = \"PhpED Debugger is inactive. Click to activate.\";\n\t\t\t\td.style.fontWeight = \"normal\";\n\t\t\t} else {\n\t\t\t\td.style.color = \"green\";\n\t\t\t\td.style.fontWeight = \"bold\";\n\t\t\t\td.innerHTML = \"On\";\n\t\t\t\td.title = \"PhpED Debugger is active. Successive server requests will be controled by debugger. Click to deactivate.\";\n\t\t\t}\n\t\t}\n\t}\n\tphpedpanel.redraw();\n})();\n/* ]]> */\n</script>\nEOF;\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "d2356a7720075f66bbbec681682bcdac", "score": "0.52558917", "text": "function show_content() {\n global $page;\n\n if(!isset($_GET['active_tab']) || !array_key_exists($_GET['active_tab'], $page->menu())) {\n $_GET['active_tab'] = $page->default_page();\n }\n?>\n\n<ul id=\"tab_menu\">\n <?php\n\n foreach($page->menu() as $key => $title) {\n echo '<a href=\"?page='.$_GET['page'].'&active_tab='.$key.'\"><li';\n if($_GET['active_tab'] == $key)\n echo ' id=\"active_tab\" ';\n \n echo \">$title</li></a>\";\n }\n ?>\n</ul>\n<?php\n echo $page->get_tab($_GET['active_tab']);\n}", "title": "" }, { "docid": "c9fc18eb3031137bfe9f2873db6925a4", "score": "0.5250071", "text": "function mod_tabs($pro) {\n\n global $lib;\n\n\n\n\n $data = \"<div class='mod_tab mod_tab\" . $pro['myid'] . \"'>\";\n if ($pro['mytype'] == 'models') {\n $data .= modTabsGetModels($pro);\n } else {\n\n $data .= modTabsGetHtml($pro);\n }\n\n $data.=\"<script>updateTabModel('.mod_tab\" . $pro['myid'] . \"');</script></div>\";\n\n\n\n\n\n return $data;\n}", "title": "" }, { "docid": "c562d3fd6d0c36e19edb26d89e3f0284", "score": "0.5249478", "text": "private function render_tabs() {\n\t\tif ( $this->using_tabs && ! empty( $this->tabs ) ) {\n\t\t\techo '<div class=\"customify-mt-tabs\">';\n\t\t\techo '<ul class=\"customify-mt-tabs-list\">';\n\t\t\t$i = 0;\n\t\t\tforeach ( $this->tabs as $id => $tab ) {\n\t\t\t\t$icon = '';\n\t\t\t\t$class = ' customify-mt-tab-cont';\n\t\t\t\tif ( 0 == $i ) {\n\t\t\t\t\t$class .= ' active ';\n\t\t\t\t}\n\t\t\t\tif ( $this->is_valid_url( $tab['icon'] ) ) {\n\t\t\t\t\t$icon = '<img alt=\"\" src=\"' . esc_url( $tab['icon'] ) . '\"/>';\n\t\t\t\t} elseif ( $tab['icon'] ) {\n\t\t\t\t\t$icon = '<i class=\"' . esc_attr( $tab['icon'] ) . '\"></i>';\n\t\t\t\t}\n\n\t\t\t\techo '<li class=\"li-' . esc_attr( $id ) . $class . '\"><a href=\"#\" data-tab-id=\"' . esc_attr( $id ) . '\">' . $icon . esc_html( $tab['title'] ) . '</a></li>';\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t\techo '</ul>';\n\n\t\t\techo '<div class=\"customify-mt-tab-contents\">';\n\t\t\t$i = 0;\n\t\t\tforeach ( $this->tabs as $id => $tab ) {\n\t\t\t\t$class = 'customify-mt-tab-cont';\n\t\t\t\tif ( 0 == $i ) {\n\t\t\t\t\t$class .= ' active ';\n\t\t\t\t}\n\t\t\t\techo '<div class=\"' . $class . '\" data-tab-id=\"' . esc_attr( $id ) . '\">';\n\t\t\t\t$this->render_fields( $id );\n\t\t\t\techo '</div>';\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t\techo '</div>';\n\n\t\t\techo '</div>';\n\t\t}\n\t}", "title": "" }, { "docid": "9f7a067293c26f1a6f7e0827d77ec198", "score": "0.5248761", "text": "public function toHtml()\n {\n $contentClass = $this->contentClass;\n if ($contentClass) {\n $contentClass = sprintf('%s-content %s', $this->getDefaultClass(), $contentClass);\n } else {\n $contentClass = sprintf('%s-content', $this->getDefaultClass());\n }\n\n \t$html = sprintf('<ul %s>', $this->getAttributes(['id', 'class', 'style'])) . PHP_EOL;\n \tforeach ($this->names as $index => $name) {\n $tabId = sprintf('%s-tab-%s', $this->id, $index);\n $html .= sprintf('<li><a href=\"#%s\">%s</a></li>', $tabId, $name);\n \t}\n $html .= '</ul>' . PHP_EOL;\n\n \tforeach ($this->contents as $index => $content) {\n $tabId = sprintf('%s-tab-%s', $this->id, $index);\n $html .= sprintf('<div id=\"%s\" class=\"%s\">', $tabId, $contentClass) . PHP_EOL;\n $html .= $content . PHP_EOL;\n $html .= '</div>' . PHP_EOL;\n \t}\n $html .= sprintf('<script type=\"text/javascript\">neat.tabs.init(\"%s\");</script>', $this->id);\n\n \treturn $html;\n }", "title": "" }, { "docid": "d7a747e30d23fa0a92885b4452bc4fcf", "score": "0.52486724", "text": "function SYNTAX_tabs($template) {\r\n $tm=time();\r\n $tabs=chk_var($template);\r\n if(!$tabs[0]) {\r\n $tabs[0]=substr(md5(rand(10000, 1000000)),0,8);\r\n }\r\n $i=0;\r\n foreach($tabs as $k=>$v) {\r\n if($k>0) {\r\n $x=explode(\"->\",$v);\r\n if(strpos($x[1],'url:')!==false){\r\n $x[1]=str_replace('url:', '', $x[1]);\r\n $id_tab.='<li><a href=\"'.$x[1].'\">'.$x[0].'</a></li>';\r\n }else{\r\n $i++;\r\n $id_tab.='<li><a href=\"#tab-'.$tabs[0].'-'.$i.'\">'.$x[0].'</a></li>';\r\n $tab_content.='<div id=\"tab-'.$tabs[0].'-'.$i.'\"><p>'.$x[1].'</p></div>';\r\n } \r\n }\r\n }\r\n $fld=\"<div id=\\\"$tabs[0]\\\" class=\\\"tabs_box\\\"><ul> $id_tab </ul> $tab_content</div>\";\r\n return $fld ;\r\n}", "title": "" }, { "docid": "3d856a428abf7faa02750638ea14104c", "score": "0.5247642", "text": "public function language_tab_content_end() : string\n {\n return '</div>';\n }", "title": "" }, { "docid": "378fb118236daf8c9d58a03751a82773", "score": "0.52433324", "text": "public function getTab()\n\t{\n\t\treturn '<span title=\"Neo4j\">' .\n\t\t\t\t'<img alt=\"\" src=\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAQABADASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAACAYH/8QAHxAAAgIDAQEAAwAAAAAAAAAABAUDBgECBwgJEhMU/8QAFQEBAQAAAAAAAAAAAAAAAAAABwn/xAAdEQADAAMBAQEBAAAAAAAAAAADBAUBAgYTEgcR/9oADAMBAAIRAxEAPwCP5DdOE1vy5cq3buF0y99UtPQq7HVLy+KKFlRLBxUDCUBjMDquarkO2F7eAvau2IBg4w8IiP2AiXhmStP2r8wecefvOLrtlUu5k9gr0yTaw182EHarMYrI1DTYFpO0ukj8TCwpnCSLh05sJRqoUmWciMjX884B846d5m6cd0qk+l+gp67Wcoau+r1ae3IGkp3btXlyMU71fElgSQOawAftEIGGwFnNAdtckxGLxS4cHr0r2aawlH8iqvULrd+N8zd2hPQyLRfnVlEsCsBu2Erb6FYXKMmXwj1zYJalhAUwSQBfu3/o20NwMMltAuP/AKSOTydzoIAIVpTpu5FSnuUYnToV0pwl50Wg+coU/AM86xk0BrrhYdK4L0ZSIMc6B7Iig+zyyLO7SeykzIyCA4k0swXJTHGuPJD4JhgZsEb31+tQ+P8APncW5P/Z\" />' .\n\t\t\t\tcount($this->queries) . ' queries' .\n\t\t\t\t($this->queries ? ' / ' . sprintf('%0.1f', $this->totalTime * 1000) . ' ms' : '') .\n\t\t\t\t'</span>';\n\t}", "title": "" }, { "docid": "87cc904de7f213517f9942c906ea43f7", "score": "0.5236877", "text": "function cc_item_form_tabs($tabs)\n{\n // insert the map tab before the Miscellaneous tab\n $item = get_current_item();\n $ttabs = array();\n foreach($tabs as $key => $html) {\n if ($key == 'Miscellaneous') {\n $ttabs['CreativeCommons'] = cc_form($item);\n }\n $ttabs[$key] = $html;\n }\n $tabs = $ttabs;\n return $tabs;\n}", "title": "" }, { "docid": "feac8e73e2aa982becac43daac4e0bf4", "score": "0.5224699", "text": "function carton_admin_help_tab() {\n\tinclude_once( 'carton-admin-content.php' );\n\tcarton_admin_help_tab_content();\n}", "title": "" }, { "docid": "e8d5b3b8eec3dc495326d5a1d9f35162", "score": "0.5220463", "text": "function ContactUs_new() {\n\t\t\t$_PAGE = $this->oPagesModel->getPageContent(20);//BillResources Page ID here...(2)\n\t\t\t$this->oPagesView->showPage($_PAGE[0]);\n\t\t}", "title": "" }, { "docid": "024915c890c193cc2504f80d4902cd99", "score": "0.5220227", "text": "public function newPost() {\r\n $this->render('admin/newPost');\r\n }", "title": "" }, { "docid": "526522cc1f73734c47d90acdd7c9ca89", "score": "0.5220134", "text": "public function tabHeadAlert(){\n $tab = [\"Auteur\",\"Contenu\",\"Date de création\",\"Date de fin\"];\n $this->displayStartTab($tab);\n }", "title": "" }, { "docid": "207257d2624e6873b25b8571a41675f3", "score": "0.5219435", "text": "function defineTabs($options = array()) {\n global $LANG;\n $ong = array();\n $this->addDefaultFormTab($ong);\n if ($this->fields['id'] > 0) {\n if (!isset($options['withtemplate']) || empty($options['withtemplate'])) {\n $this->addStandardTab('PluginRtntestalexTask_Item', $ong, $options); // Items li�s aux t�ches\n $this->addStandardTab('Notepad', $ong, $options);\n $this->addStandardTab('Log', $ong, $options);\n $this->addStandardTab('Event', $ong, $options);\n } else {\n $this->addStandardTab('Log', $ong, $options);\n $this->addStandardTab('Event', $ong, $options);\n }\n } else {\n $ong[1] = __s('Main');\n }\n return $ong;\n }", "title": "" }, { "docid": "5c343003cc7a215afce5b5adfbaf84e9", "score": "0.52147436", "text": "public function add_tab( $tabs ) {\n\n\t\t$tab = array(\n\t\t\tself::SLUG => array(\n\t\t\t\t'name' => esc_html__( 'Access', 'wpforms-lite' ),\n\t\t\t\t'form' => true,\n\t\t\t\t'submit' => esc_html__( 'Save Settings', 'wpforms-lite' ),\n\t\t\t),\n\t\t);\n\n\t\treturn wpforms_list_insert_after( $tabs, 'integrations', $tab );\n\t}", "title": "" }, { "docid": "9240b5f486a1bac16d90bed1f098dad9", "score": "0.5210749", "text": "function cs_pb_tabs($die = 0){\n\tglobal $cs_node, $count_node, $post;\n\tif ( isset($_POST['action']) ) {\n\t\t$name = $_POST['action'];\n\t\t$counter = $_POST['counter'];\n\t\t$tabs_element_size = '50';\n\t\t$tab_title = '';\n\t\t$tab_text = '';\n\t}\n\telse {\n\t\t$name = $cs_node->getName();\n\t\t\t$count_node++;\n\t\t\t$tabs_element_size = $cs_node->tabs_element_size;\n\t\t\t$tab_title = $cs_node->tab_title;\n\t\t\t$tab_text = $cs_node->tab_text;\n\t\t\t\t$counter = $post->ID.$count_node;\n}\n?> \n\t<div id=\"<?php echo $name.$counter?>_del\" class=\"column parentdelete column_<?php echo $tabs_element_size?>\" item=\"tabs\" data=\"<?php echo element_size_data_array_index($tabs_element_size)?>\" >\n \t<div class=\"column-in\">\n <h5><?php echo ucfirst(str_replace(\"cs_pb_\",\"\",$name))?></h5>\n <input type=\"hidden\" name=\"tabs_element_size[]\" class=\"item\" value=\"<?php echo $tabs_element_size?>\" >\n <a href=\"javascript:hide_all('<?php echo $name.$counter?>')\" class=\"options\">Options</a> &nbsp; \n <a href=\"#\" class=\"delete-it btndeleteit\">Del</a> &nbsp; \n <a class=\"decrement\" onclick=\"javascript:decrement(this)\">Dec</a> &nbsp; \n <a class=\"increment\" onclick=\"javascript:increment(this)\">Inc</a>\n\t\t</div>\n \t<div class=\"poped-up\" id=\"<?php echo $name.$counter?>\" style=\"border:none; background:#f8f8f8;\" >\n <div class=\"opt-head\">\n <h5>Edit Tabs Options</h5>\n <a href=\"javascript:show_all('<?php echo $name.$counter?>')\" class=\"closeit\">&nbsp;</a>\n </div>\n\t\t\t\t<div class=\"wrapptabbox\">\n <div class=\"clone_append\">\n <?php\n\t\t\t\t\t\t$tabs_num = 0;\n if ( isset($cs_node) ){\n\t\t\t\t\t\t\t$tabs_num = count($cs_node->tab);\n foreach ( $cs_node->tab as $tab ){\n\t\t\t\t\t\t\t\tif ( $tab->tab_active == \"yes\" ) { $tab_active = \"selected\"; }\n\t\t\t\t\t\t\t\telse { $tab_active = \"\"; }\n\t\t\t\t\t\t\t\techo \"<div class='clone_form'>\";\n\t\t\t\t\t\t\t\t\techo \"<a href='#' class='deleteit_node'>Delete it</a>\";\n\t\t\t\t\t\t\t\t\techo '<label>Tab Title:</label> <input class=\"txtfield\" type=\"text\" name=\"tab_title[]\" value=\"'.$tab->tab_title.'\" />';\n\t\t\t\t\t\t\t\t\techo '<label>Tab Text:</label> <textarea class=\"txtfield\" name=\"tab_text[]\">'.$tab->tab_text.'</textarea>';\n\t\t\t\t\t\t\t\t\techo '<label>Title Icon:</label> <input class=\"txtfield\" type=\"text\" name=\"tab_title_icon[]\" value=\"'.$tab->tab_title_icon.'\" />';\n\t\t\t\t\t\t\t\t\techo '<label>Active:</label> <select name=\"tab_active[]\"><option>no</option><option '.$tab_active.'>yes</option></select> ';\n\t\t\t\t\t\t\t\techo \"</div>\";\n }\n }\n ?>\n </div>\n <div class=\"opt-conts\">\n <ul class=\"form-elements\">\n <li class=\"to-label\"><label></label></li>\n <li class=\"to-field\"><a href=\"#\" class=\"addedtab\">Add Tab</a></li>\n </ul>\n <ul class=\"form-elements noborder\">\n <li class=\"to-label\"></li>\n <li class=\"to-field\">\n <input type=\"hidden\" name=\"tabs_num[]\" value=\"<?php echo $tabs_num?>\" class=\"fieldCounter\" />\n <input type=\"hidden\" name=\"cs_orderby[]\" value=\"tabs\" />\n <input type=\"button\" value=\"Save\" style=\"margin-right:10px;\" onclick=\"javascript:show_all('<?php echo $name.$counter?>')\" />\n </li>\n </ul>\n </div>\n \t</div>\n \n </div>\n </div>\n<?php\n\tif ( $die <> 1 ) die();\n}", "title": "" }, { "docid": "9a0fff6c363029ab26abbdf4fb4b7d57", "score": "0.5208592", "text": "protected function add_tab()\n {\n $labels = array(\n 'name' => _x('Coupon', 'post type general name'),\n 'singular_name' => _x('優惠券', 'post type singular name'),\n 'add_new' => _x('追加優惠券產品', HKM_LANGUAGE_PACK),\n 'add_new_item' => __('追加優惠券產品', HKM_LANGUAGE_PACK),\n 'edit_item' => __('修改優惠券產品', HKM_LANGUAGE_PACK),\n 'new_item' => __('追加優惠券產品', HKM_LANGUAGE_PACK),\n 'all_items' => __('所有優惠券', HKM_LANGUAGE_PACK),\n 'view_item' => __('看覽優惠券產品', HKM_LANGUAGE_PACK),\n 'search_items' => __('搜查優惠券產品', HKM_LANGUAGE_PACK),\n 'not_found' => __('沒有發現產品', HKM_LANGUAGE_PACK),\n 'not_found_in_trash' => __('在垃圾中沒有發現產品', HKM_LANGUAGE_PACK),\n 'parent_item_colon' => '',\n 'menu_name' => __('優惠券', HKM_LANGUAGE_PACK)\n );\n return $labels;\n }", "title": "" }, { "docid": "5aae6329f192b3a865dcc265bf4ceff3", "score": "0.52084756", "text": "function admin_tabs($current = null) {\n $tabs = $this->tabs;\n $links = array();\n if (isset($_GET['tab'])) {\n $current = $_GET['tab'];\n } else {\n $current = $this->default_tab;\n }\n foreach ($tabs as $tab => $name) :\n if ($tab == $current) :\n $links[] = \"<a class='nav-tab nav-tab-active' href='?page=\" . $this->slug . \"&tab=$tab'>$name</a>\";\n else :\n $links[] = \"<a class='nav-tab' href='?page=\" . $this->slug . \"&tab=$tab'>$name</a>\";\n endif;\n endforeach;\n foreach ($links as $link)\n echo $link;\n }", "title": "" } ]
02134a0a37303eb812db1bc70ed03380
Deletes a single Entity from the database
[ { "docid": "c6f2926b73c12b53357eef509102b320", "score": "0.0", "text": "public function remove($urlEntity)\n {\n $this->entityManager->remove($urlEntity);\n $this->entityManager->flush();\n }", "title": "" } ]
[ { "docid": "619aabbf262d3aae1503bfe1a6cd7124", "score": "0.8615323", "text": "public function delete() {\n $this->entity->delete();\n }", "title": "" }, { "docid": "f1d4fa35b5a8af8683e18de9863714bf", "score": "0.8018985", "text": "public function delete()\n {\n $em = Database::getEntityManager();\n $em->beginTransaction();\n $em->remove($this);\n $em->commit();\n $em->flush();\n }", "title": "" }, { "docid": "0b5c9cc66943a1085a6acc58399c608c", "score": "0.79871285", "text": "protected function entityDelete(){\n // TODO: deal with errors\n $this->fragments()->each(function($item){\n $item->delete();\n });\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "title": "" }, { "docid": "089f9252c8c864d5616da93a194fbdef", "score": "0.78318053", "text": "public function delete($entity)\n {\n }", "title": "" }, { "docid": "67d63189410e80357217254609575053", "score": "0.78064555", "text": "abstract protected function entityDelete();", "title": "" }, { "docid": "31609182d4c371fd441394e401a17234", "score": "0.7802626", "text": "public function delete($entity)\n {\n $this->collection->deleteOne(['_id' => $entity->getId()]);\n }", "title": "" }, { "docid": "9ea1a3203afd616b4d655781fb8926a1", "score": "0.76154673", "text": "public function delete() {\n\t\t$this->getMapper()->delete($this->id);\n\t}", "title": "" }, { "docid": "f207122bcfe90253bc70802a3e859230", "score": "0.7569483", "text": "public function delete($entity)\n\t{\n\t\treturn $entity->delete();\n\t}", "title": "" }, { "docid": "c0023a3d7e30a457cba6abedd8462bc7", "score": "0.7542852", "text": "public function delete()\n {\n $model = $this->getModel();\n $model->removeById($this->id);\n }", "title": "" }, { "docid": "42e35f53883dd845edba688046b22d2f", "score": "0.7454593", "text": "public function Delete($entity)\n {\n $className = get_class($entity);\n $tableName = $this->GetTableNameFromEntityType($className);\n $fields = array_keys($this->dbSchema[$tableName]['fields']);\n $key = $this->dbSchema[$tableName]['key'];\n $keyName = array_keys($key)[0];\n $keyType = $this->dbSchema[$tableName]['fields'][$keyName];\n $id = $entity->$keyName;\n\n $query = \"DELETE FROM $tableName WHERE $keyName=:$keyName;\";\n\n error_log($query);\n $statement = $this->GetDbHandle()->prepare($query);\n $statement->bindValue(\n \":$keyName\",\n $id,\n $this->fieldTypeMap[$keyType]);\n $statement->execute();\n }", "title": "" }, { "docid": "da3060257d4b30e8c85a7f97fa2bb8f5", "score": "0.74082077", "text": "public function delete()\n {\n $this->deleteById($this->field['id']);\n }", "title": "" }, { "docid": "5a96291b3e6fc1c211fe1b73a463776f", "score": "0.7312724", "text": "abstract public function delete() : Entity;", "title": "" }, { "docid": "bac28264d30a24b5e1b0cb1d993cbf87", "score": "0.7302733", "text": "public function delete() {\n\t\t$m = static::get_object_manager();\n\t\t$filters = array(array(\"id=\" => $this->fields['id']));\n\t\treturn $m->delete($filters);\n\t}", "title": "" }, { "docid": "9289f93d3dd07173c0bdad26640c91c7", "score": "0.7276257", "text": "public function delete($entity)\n {\n if (!$entity instanceof Entity)\n {\n throw new \\InvalidArgumentException(\"ORM mapper delete method argument must be an Entity object\");\n }\n list($primary, $prefix, $table) = [$entity->getPrimary(), $entity->getPrefix(), $entity->getTable()];\n if ($entity->$primary === null)\n {\n throw new \\InvalidArgumentException(\"ORM mapper can't delete Entity without primary key value\");\n }\n $query = new Query(\"DELETE FROM $table WHERE $prefix$primary = :$primary\", [\":$primary\" => $entity->$primary]);\n return $this->mySql->executeQuery($query);\n }", "title": "" }, { "docid": "9754988b94e2fd07d914f20de7ef8a78", "score": "0.72699124", "text": "public function delete()\n {\n // todo test\n return $this->request->curl->delete(\"{$this->entity}/{$this->{$this->primaryKey}}\");\n }", "title": "" }, { "docid": "510419522e41c70915f69f1118da2290", "score": "0.72430515", "text": "public function delete(): void\n {\n self::deleteById($this->id);\n }", "title": "" }, { "docid": "98e6c3795d97267c0a68d32b904fba38", "score": "0.7242748", "text": "public function delete($entity) {\r\n\t\t$conditions = '';\r\n\t if ($entity instanceof Entity_Abstract) {\r\n\t $id = (int) $entity->id;\r\n\t\t\tif (!$id) {\r\n\t\t\t\t$conditions = $this->getPkValues($entity);\r\n\t\t\t}\r\n\t } else {\r\n\t\t\t$id = $entity;\r\n\t\t}\r\n\t return $this->_table->delete($id, $conditions);\r\n\t}", "title": "" }, { "docid": "fec2162027f1138884fc39f13616a00d", "score": "0.7241576", "text": "public function delete()\n {\n if (is_null($this->id)) trigger_error(\"Article::delete(): Attempt to delete an Article object that does not have its ID property set.\", E_USER_ERROR);\n\n $conn = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\n $st = $conn->prepare(\"DELETE FROM Phones WHERE id = :id LIMIT 1\");\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "8d16c46a155d23e2585c4a2a72abcd4c", "score": "0.7211782", "text": "public function delete(){\n\t\tif( false == $this->getId() ) return;\n\t\treturn $this->getMapper()->delete( ( int ) $this->getId() );\n\t}", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.7163655", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "d049ebcc3d9b5b088a88cb4912920d3b", "score": "0.71176946", "text": "public function deleteAction()\n {\n $entity = \\Zend_Registry::get('doctrine')->getEntityManager()->getRepository('\\ZF\\Entities\\User');\n //Spacial action to user entity, in other controllers use parent::delete($entity);\n if (!$ID = $this->getRequest()->getParam('ID', false))\n {\n return \\ZF\\Error\\Page::pageNotFound($this->getRequest());\n }\n\n if ( !$object = $entity->findOneById($ID) )\n {\n return \\ZF\\Error\\Page::pageNotFound($this->getRequest());\n }\n\n $em = \\Zend_Registry::get('doctrine')->getEntityManager();\n $object->setEmail($object->getEmail() . \"*deleted*\");\n $object->setNickname($object->getNickname() . \"*deleted*\");\n $object->setIsDeleted(true);\n $em->flush();\n $this->_redirect($this->view->url(array('controller'=>$this->getRequest()->getControllerName(),'action'=>'list'), 'default'));\n }", "title": "" }, { "docid": "0dfd52f3d0fa7f968c71b455d6d15be0", "score": "0.7110803", "text": "public function deleteById($entityId);", "title": "" }, { "docid": "0dfd52f3d0fa7f968c71b455d6d15be0", "score": "0.7110803", "text": "public function deleteById($entityId);", "title": "" }, { "docid": "0dfd52f3d0fa7f968c71b455d6d15be0", "score": "0.7110803", "text": "public function deleteById($entityId);", "title": "" }, { "docid": "d22ec6b1bfead1ecb5d86866ebfac621", "score": "0.7109545", "text": "public function delete() {\n\t\tif ($this->_newRecord) {\n\t\t\tthrow new Exception(\"Can't delete new record\");\n\t\t}\n\n\t\t$this->_beforeDelete();\n\n\t\t$criteria = array('_id' => $this->mongoId());\n\t\tstatic::collection()->remove($criteria, array('justOne' => true, 'safe' => true));\n\n\t\t$this->_afterDelete();\n\t}", "title": "" }, { "docid": "70704e67a89e506d26f1046ccf7e6eef", "score": "0.7047726", "text": "public function delete()\n {\n $this->orderEntities();\n $joins = array();\n $filter = array();\n $bounds = array();\n $fields = array();\n $count = sizeof($this->entities);\n for ($i = 0; $i < $count; $i++) {\n $e = $this->entities[$i];\n $joins[] = $e->getTable();\n if ($i == 0) {\n $filter[] = $e->getTable() . '.' . $e->getPkColumn() . ' = :' . $e->getTable() . '_' . $e->getPkColumn();\n $bounds[':' . $e->getTable() . '_' . $e->getPkColumn()] = $e->getPkVar();\n }\n if ($count > 1 && $i < $count - 1)\n $filter[] = $e->getTable() . '.' . $e->getFk() . ' = ' . $this->entities[$i + 1]->getTable() . '.' . $this->entities[$i + 1]->getPkColumn();\n }\n\n $sql = 'DELETE ' . implode(', ', $joins) . ' FROM ' . implode(', ', $joins) . ' WHERE ' . implode(' AND ', $filter);\n\n if ($stmt = DB::getDBConnection()->prepare($sql)) {\n if ($stmt->execute($bounds)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "6da21eceb0df8040d95d408287f1b8db", "score": "0.7042385", "text": "public function delete()\n {\n if (!$this->isNewObject()) {\n $this->factory->update(\"DELETE FROM \" . $this->getTableName() . \" WHERE \" . $this->getIdField() . \" = \" . $this->factory->escapeString($this->getId()));\n } else {\n throw new RecordNotFoundException(\"delete() failed: You can't delete this object from the database as it hasn't been saved yet.\");\n }\n }", "title": "" }, { "docid": "cafd35dfde1dc3b0deb4c9a5c7c93475", "score": "0.7030551", "text": "public function delete(){\n\t\t\t$this->deleted = 1;\n\t\t\t$this->save();\n\t\t}", "title": "" }, { "docid": "a31d22ef15986d3cfe1b07b14021c679", "score": "0.70273376", "text": "public function delete() {\r\n $this->db->delete(\"objects\", $this->db->quoteInto(\"o_id = ?\", $this->model->getO_id() ));\r\n }", "title": "" }, { "docid": "8e0c7f145451e9cabea776f15387aec6", "score": "0.7020396", "text": "public function delete()\n {\n $this->validator->check_request($_POST);\n \n $id = (int) $_POST['id'];\n $this->model->delete($id);\n }", "title": "" }, { "docid": "9d61d6d0e3d2ada66951c71af2910bd4", "score": "0.7020227", "text": "public function delete() \r\n\t{\r\n\t\t$this->_table->delete ('id='.$this->id);\r\n\t}", "title": "" }, { "docid": "c541d4f89d3ce9c2e2c0f80f9fb1e16f", "score": "0.70051914", "text": "public function delete() {\n $this->db->delete(static::getTableName() , $this->db->quoteInto(\"`key`= ?\", $this->model->getKey()));\n\n $this->model->clearDependentCache();\n }", "title": "" }, { "docid": "6e7bc31e352e46cb20078e1c108aae14", "score": "0.69783276", "text": "public function delete(): void\n {\n Database::getInstance()->deleteFromTable($this);\n $this->id = null;\n }", "title": "" }, { "docid": "e7c265afa8440a66b9f64362160224fa", "score": "0.6965317", "text": "public function delete($entity)\n {\n if ($entity instanceof $this->_entityClass) {\n $id = $entity->toArray()['id'];\n\n return $this->_adapter->delete($this->_entityTable, $id);\n } else {\n throw new DataMapperException('The specific entry is not allowed for this mapper');\n }\n }", "title": "" }, { "docid": "0fbed1b1b5183da5683451dfd8f643b2", "score": "0.6960929", "text": "public function delete(){\n\t\t\tLoader::db()->Execute(\"DELETE FROM {$this->tableName} WHERE id = ?\", array($this->id));\n\t\t}", "title": "" }, { "docid": "25b6948ac466673abca57b49815ce368", "score": "0.6951036", "text": "public function delete(DataEntityInterface $dataEntity);", "title": "" }, { "docid": "4955d9f83983ad94decb718554700162", "score": "0.69335806", "text": "public function delete()\n {\n if ($this->isNew()) {\n throw $this->_exception('ERR_CANNOT_DELETE_NEW_RECORD', array(\n 'class' => get_class($this),\n ));\n }\n \n if ($this->isDeleted()) {\n throw $this->_exception('ERR_DELETED', array(\n 'class' => get_class($this),\n ));\n }\n \n $this->_preDelete();\n \n $primary = $this->getPrimaryCol();\n $where = array(\n \"$primary = ?\" => $this->getPrimaryVal(),\n );\n \n $this->_model->delete($where);\n \n $this->_setSqlStatus(self::SQL_STATUS_DELETED);\n \n $this->_postDelete();\n }", "title": "" }, { "docid": "fc662665a0a9404729d207c4f645c017", "score": "0.6898539", "text": "public function delete() {\r\n\r\n if (static::$readOnly) {\r\n throw new Exception(\"Cannot write to READ ONLY tables.\");\r\n }\r\n\r\n if ($this->isNew()) {\r\n throw new Exception('Unable to delete object, record is new (and therefore doesn\\'t exist in the database).');\r\n }\r\n\r\n if ($this->preDelete() === false) {\r\n return;\r\n }\r\n\r\n // build sql statement\r\n $sql = sprintf(\"DELETE FROM %s WHERE %s = ?\", static::escape(static::getTableName()), static::escape(static::getTablePk()));\r\n $id = $this->id();\r\n\r\n // prepare, bind & execute\r\n static::sql($sql, self::FETCH_NONE, [$id]);\r\n\r\n $this->postDelete();\r\n }", "title": "" }, { "docid": "418591399a676612d781c668fd1f1838", "score": "0.6886147", "text": "public function delete(\\Repo\\EntityInterface $entity): void\n {\n }", "title": "" }, { "docid": "c3c074b4e40851887dc44beea47beceb", "score": "0.68721586", "text": "public function delete(): void\n {\n if (!$this->isDeleted) {\n $this->isDeleted = true;\n $delete = new Delete($this->getTable());\n $delete->where($this->getPrimaryKey(), '=', $this->getPrimaryValue());\n $delete->exec();\n }\n }", "title": "" }, { "docid": "408cee806ef8af17163a775c0d54b8f0", "score": "0.68589795", "text": "public function delete()\n {\n $database = cbSQLConnect::connect('object');\n if (isset($database))\n {\n return ($database->SQLDelete(self::$table_name, 'id', $this->id));\n }\n }", "title": "" }, { "docid": "750eaf920166d4247f918850b81133d4", "score": "0.6855291", "text": "function delete() {\r\n $this->db->delete(self::table_name, array('id' => $this->id));\r\n }", "title": "" }, { "docid": "a6edbd2b436835ee8d2d59eec3029046", "score": "0.6826228", "text": "public function delete($entity)\n {\n try {\n $em = $this->getEntityManager();\n $em->remove($entity);\n $em->flush();\n\n return true;\n } catch (DBALException $ex) {\n $message = sprintf('DBALException [%i]: %s', $ex->getCode(), $ex->getMessage());\n echo $message;\n }\n }", "title": "" }, { "docid": "b43ca359e56df71e63dbb260a4936071", "score": "0.6818894", "text": "public function delete()\n\t\t{\n\t\t\t$pkStatement = $this->createPkStatement();\n\t\t\t\n\t\t\t$sql = \"DELETE FROM `\" . $this->_dbAdapter->escape($this->_tableName) . \"` WHERE \" . $where_expr . \" LIMIT 1\";\n\t\t\t$this->_dbAdapter->exec($sql);\n\t\t}", "title": "" }, { "docid": "372180ce8af9d7f434dc38febf90a176", "score": "0.6794885", "text": "public function delete()\n {\n if ($this->request->isPost()) {\n $id = StaticFilter::filter('text', $this->request->getPost('id'));\n $record = call_user_func_array([$this->_modelName, 'get'], array($id));\n if (!$record) {\n $this->setMessage(\n FlashMessages::TYPE_WARNING,\n \"The specified \".\n $this->get('modelSingular') .\" does not exists.\"\n );\n } else {\n if ($record->delete()) {\n $this->setMessage(\n FlashMessages::TYPE_SUCCESS,\n ucfirst($this->get('modelSingular')) .\n \" successfully deleted.\"\n );\n }\n }\n\n }\n $this->redirect($this->get('modelPlural') .'/index');\n }", "title": "" }, { "docid": "eedfca7119bd40cc5d2a07d04406694c", "score": "0.67740357", "text": "public function delete(){\n $db = self::dbConnect();\n $del = $db->prepare('DELETE FROM ' . self::TABLE_NAME . ' WHERE id=?');\n $del->execute([$this->id]);\n $del->closeCursor();\n }", "title": "" }, { "docid": "df360d409ccec8fec5112517f6022429", "score": "0.6766563", "text": "public function delete()\n\t{\n\t\t$model = $this->model;\n\t\t$primary = $model->primary;\n\n\t\treturn $model->delete($this->$primary);\n\t}", "title": "" }, { "docid": "042dc536ffceb0cc81e73a7f994e3031", "score": "0.6762721", "text": "public function destroy(Entity $entity)\n {\n //\n }", "title": "" }, { "docid": "3a2fa374d4fa144b0fe47c3f8a00641d", "score": "0.67626995", "text": "public function delete()\n {\n $this->deleted_at = date('Y-m-d H:i:s');\n $this->save();\n }", "title": "" }, { "docid": "54a387b7bd89c7b21b61069e636e1951", "score": "0.676229", "text": "public function remove() {\n $em = new EntityManager($this);\n $em->remove();\n if ($em->getError() !== false) {\n // tratar retorno false\n echo $em->getMessage(); // mostra mensagem de erro\n } else {\n // zerar dados do objeto;\n $this->setDados(array());\n }\n }", "title": "" }, { "docid": "e790f4f7960841af454ddb37fd9bba2f", "score": "0.6761941", "text": "public function delete() {\n \n // Does the Form object have an ID?\n if ( is_null( $this->formId ) ) trigger_error ( \"Form::delete(): Attempt to delete an Form object that does not have its ID property set.\", E_USER_ERROR );\n \n // Delete the Form\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM form WHERE formId = :formId LIMIT 1\" );\n $st->bindValue( \":formId\", $this->formId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "10a0bc0ae400e831575486fbf474250f", "score": "0.6755806", "text": "public function delete(){\n $where = $this->idField . \" = '\" . $this->{$this->idField} . \"'\";\n return $this->adapter->delete($this->table, $where);\n }", "title": "" }, { "docid": "d8ff0930b2ad74ae231b231a402482e1", "score": "0.6744224", "text": "public function deleteEntityAction()\r\n {\r\n $id = $this->params()->fromRoute('id');\r\n if(!isset($id))\r\n {\r\n return $this->redirect()->toRoute('pms/reservation', []);\r\n }\r\n \r\n $reservationModel = $this->getServiceLocator()->get('ReservationModel');\r\n $sessionModels = new Container('models');\r\n if(isset($sessionModels->reservationModel))\r\n {\r\n $reservationModelData = $sessionModels->reservationModel;\r\n $reservationModel->setData($reservationModelData);\r\n $reservationModel->getReservedEntities();\r\n if(array_key_exists($id, $reservationModel->reservedEntities))\r\n {\r\n unset($reservationModel->reservedEntities[$id]);\r\n }\r\n $reservationModelData = $reservationModel->getData();\r\n $sessionModels->reservationModel = $reservationModelData;\r\n \r\n if(isset($reservationModel->id))\r\n {\r\n return $this->redirect()->toRoute('pms/reservation', [\r\n 'action' => 'edit',\r\n 'id' => $reservationModel->id,\r\n ]); \r\n } else \r\n {\r\n return $this->redirect()->toRoute('pms/reservation', [\r\n 'action' => 'edit',\r\n ]);\r\n } \r\n }\r\n \r\n return $this->redirect()->toRoute('pms/reservation');\r\n }", "title": "" }, { "docid": "700213478a73ecf5dabafd154657df57", "score": "0.6740815", "text": "public function delete()\n {\n try {\n //..if the post 'id' variable is not null, then get the variable and invokes the delete method of DAO object.\n if (!is_null($this->post['id'])) {\n $id = (int)$this->post['id'];\n $this->dao->delete($id);\n (new Message())->show(); //..show a message to user\n }\n } catch (\\Exception $ex) {\n (new Message(null, \"Erro: {$ex->getMessage()}.\"))->show();\n }\n }", "title": "" }, { "docid": "40f6c79c3c2a2aaabe177de414eee24d", "score": "0.6731495", "text": "public function Delete()\n {\n $this->deleteByParameter();\n $this->resetProperties();\n }", "title": "" }, { "docid": "3d4e4615075059b9af42c29e48b3203c", "score": "0.67309004", "text": "public function delete($oEntity, EntityMapping $oMapping, \\PDO $sPDO);", "title": "" }, { "docid": "744231aba6c4c6fd38508fa0886cb06c", "score": "0.6722339", "text": "public function delete(SkelInterface $entity, $flush = true);", "title": "" }, { "docid": "edf218cb016827a7c645d4b474a9d1df", "score": "0.670952", "text": "public function testDeleteSingleSuccess()\n {\n $entity = $this->findOneEntity();\n\n // Delete Entity\n $this->getClient(true)->request('DELETE', $this->getBaseUrl() . '/' . $entity->getId(),\n [], [], ['Authorization' => 'Bearer ' . $this->adminToken, 'HTTP_AUTHORIZATION' => 'Bearer ' . $this->adminToken]);\n $this->assertEquals(StatusCodesHelper::SUCCESSFUL_CODE, $this->getClient()->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "dc4e80cc5c21b03d73ea73219149e5eb", "score": "0.6669587", "text": "abstract public function delete(PersistentObject $persistentObject);", "title": "" }, { "docid": "836f98bed529c387aa7693b2c60b4e91", "score": "0.66695094", "text": "public static function delete(AbstractModel $entity)\n {\n $pkName = $entity::getPrimaryKey();\n $id = $entity->_get($pkName);\n return static::$_adapter->delete(static::$table, \"$pkName = '$id'\");\n }", "title": "" }, { "docid": "0ead365fc0c2f4d7bf53d6799f0655ac", "score": "0.6665276", "text": "public function delete() {\n $this->db->delete($this::DB_TABLE, array(\n $this::DB_TABLE_PK => $this->{$this::DB_TABLE_PK},\n ));\n unset($this->{$this::DB_TABLE_PK});\n }", "title": "" }, { "docid": "a7e886be6208db05c7888eb6b6da3375", "score": "0.665535", "text": "function delete(){\n if ( !is_null( $this->_object))\n $this->_object->remove();\n }", "title": "" }, { "docid": "790d76747e355493bdda220253f40587", "score": "0.66514707", "text": "public function testDelete(): void\n {\n $table = $this->getTableLocator()->get('SiteAuthors');\n $table->save(new Entity(['id' => 1, 'site_id' => 2]));\n $entity = $table->get([1, 1]);\n $result = $table->delete($entity);\n $this->assertTrue($result);\n\n $this->assertSame(4, $table->find('all')->count());\n $this->assertEmpty($table->find()->where(['id' => 1, 'site_id' => 1])->first());\n }", "title": "" }, { "docid": "4ef8894e283bbe9950ad315dde36c7ad", "score": "0.66417706", "text": "public function delete()\n\t{\n\t\tif(!$this->db) { throw New Exception(\"Unable to perform delete without a database object\"); }\n\n\t\t$reg = $this->getRegistry();\n\t\t$is_valid = false;\n\t\t$query = \"delete from \" . $this->getDBTable() . \" where id = \" . $this->db->quote($this->Id);\n\n\t\treturn $this->db->exec($query);\n\t}", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.66243494", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "a06e7c726fba457a6160643f2631457a", "score": "0.661861", "text": "public function delete() {\n $this->db->delete($this::DB_TABLE, array(\n $this::DB_TABLE_PK => $this->{$this::DB_TABLE_PK}, \n ));\n unset($this->{$this::DB_TABLE_PK});\n\n }", "title": "" }, { "docid": "86716cf114c6af30fc1e5f0e4dd54b94", "score": "0.6615669", "text": "public function delete() {\n $db = DBController::getConnection();\n $parameter = Model::ID;\n $where = \"$parameter = :$parameter\";\n $this->prepare();\n\n return $db->delete($this->table, $where, $this->prepareStatement);\n }", "title": "" }, { "docid": "6348f4ab28356e3f30cf10284cf84317", "score": "0.66110134", "text": "public function delete()\n \t{\n \t\tif (!$this->exists()) return false;\n \t\t$table = $this->table();\n \t\t$table->delete($this->where());\n \t}", "title": "" }, { "docid": "06ced5ecc98ca0c3129d271d8f10ff7c", "score": "0.6604373", "text": "public function delete() {\n $this->db->delete($this::DB_TABLE, array(\n $this::DB_TABLE_PK => $this->{$this::DB_TABLE_PK}, \n ));\n unset($this->{$this::DB_TABLE_PK});\n }", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6601064", "text": "public function delete() {}", "title": "" }, { "docid": "d3f17d5d93305f0dba5a0af19294dd12", "score": "0.659399", "text": "public function deleteAction($id){\n $entity = $this->getEm()->getRepository(self::ENTITY_UNITE)->find($id);\n if(!$entity){\n die('no entity');\n }\n // on persist cet objet\n $this->getEm()->persist($entity);\n // on le supprime\n $this->getEm()->remove($entity);\n $this->getEm()->flush();\n // on fait une rediretion\n return $this->redirectToRoute('indexunite');\n\n }", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.65792257", "text": "public function deleteById($id);", "title": "" }, { "docid": "147806a78f32e73c0dd07eef34591478", "score": "0.65722334", "text": "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/person/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Person', 'personId', self::$objectId);\n }", "title": "" }, { "docid": "bebc847ad2f0fba6d5ba797bca913b92", "score": "0.65717924", "text": "public function deleteEntity() { \r\n\t\t$cids = JRequest::getVar('cid', array(0), 'method', 'array');\r\n\t\t$option = JRequest::getVar('option');\r\n\t\t// Access check\r\n\t\tif(!$this->allowDelete($option)) {\r\n\t\t\t$this->setRedirect('index.php?option=com_jmap&task=sources.display', JTEXT::_('JERROR_ALERT_NOACCESS'));\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//Load della model e checkin before exit\r\n\t\t$model = $this->getModel();\r\n\t\t$result = $model->deleteEntity($cids);\r\n\r\n\t\t$msg = $result ? 'SUCCESS_DELETE' : 'ERROR_DELETE';\r\n\r\n\t\t$this->setRedirect(\"index.php?option=$option&task=sources.display\", JTEXT::_($msg));\r\n\t}", "title": "" }, { "docid": "068f52af05034fd239823b69dcfe3fc3", "score": "0.65704566", "text": "public function delete()\n {\n $class = $this->base_class;\n\n if ($this->constrains) {\n // TODO: Delete using constranis\n } else {\n // Usamos el where\n $class::$connection->delete($class::$table, $this->query['where']);\n }\n }", "title": "" }, { "docid": "ccbeade6eb08b0d3f5d632544ebd938c", "score": "0.65638727", "text": "public function deleteAction () {\n\t\t$this->validateHttpMethod(\"DELETE\");\n\t\t\n\t\t// Remember to update the status code of the record, rather than delete \n\t\t// the record entirely!\n\t\t\n\t}", "title": "" }, { "docid": "9b10ab094085d1d7a67e8e5fb8453731", "score": "0.6555578", "text": "public function delete() {\r\n $this->db->delete(\"object_query_\" . $this->model->getClassId(), $this->db->quoteInto(\"oo_id = ?\", $this->model->getId()));\r\n $this->db->delete(\"object_store_\" . $this->model->getClassId(), $this->db->quoteInto(\"oo_id = ?\", $this->model->getId()));\r\n $this->db->delete(\"object_relations_\" . $this->model->getClassId(), $this->db->quoteInto(\"src_id = ?\", $this->model->getId()));\r\n\r\n // delete fields wich have their own delete algorithm\r\n foreach ($this->model->getClass()->getFieldDefinitions() as $fd) {\r\n if (method_exists($fd, \"delete\")) {\r\n $fd->delete($this->model);\r\n }\r\n }\r\n\r\n parent::delete();\r\n }", "title": "" }, { "docid": "adcc827e6663857f96d6cf370bc1747f", "score": "0.65503716", "text": "public function delete()\n {\n $id = $this->request->getParam('id');\n $delete = ArticleManager::deleteById($id);\n\n $this->alertMessage('index', $delete, static::DELETE_SUCCESS);\n }", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.6549481", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "3e2b9147369d60c2ada397726f523215", "score": "0.65375423", "text": "public function deleteEntity() {\n\t\t$cids = $this->app->input->get ( 'cid', array (), 'array' );\n\t\t$option = $this->option;\n\t\t// Access check\n\t\tif(!$this->allowDelete($option)) {\n\t\t\t$this->setRedirect('index.php?option=com_jmap&task=pingomatic.display', JText::_('COM_JMAP_ERROR_ALERT_NOACCESS'), 'notice');\n\t\t\treturn false;\n\t\t}\n\t\t//Load della model e checkin before exit\n\t\t$model = $this->getModel ( );\n\t\t\n\t\tif(!$model->deleteEntity($cids)) {\n\t\t\t// Model set exceptions for something gone wrong, so enqueue exceptions and levels on application object then set redirect and exit\n\t\t\t$modelException = $model->getError(null, false);\n\t\t\t$this->app->enqueueMessage($modelException->getMessage(), $modelException->getErrorLevel());\n\t\t\t$this->setRedirect ( \"index.php?option=$option&task=pingomatic.display\", JText::_('COM_JMAP_ERROR_DELETE'));\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$this->setRedirect ( \"index.php?option=$option&task=pingomatic.display\", JText::_('COM_JMAP_SUCCESS_DELETE') );\n\t}", "title": "" }, { "docid": "649925c30b03c384931c82885ed60f0b", "score": "0.65369546", "text": "function delete(EntityInterface $entity)\n {\n // we prepare the delete code\n $sql = \"DELETE FROM user WHERE id = :user_id\";\n $query = $this->db->prepare($sql, array(\\PDO::ATTR_CURSOR => \\PDO::CURSOR_FWDONLY));\n $parameters = array(':user_id' => $entity->getId());\n\n // we execute it and return a boolean value: true -> deleted\n return $query->execute($parameters);\n }", "title": "" }, { "docid": "b0798e0678a1da7391387322fd2ffcfe", "score": "0.6536594", "text": "public function delete($obj) {\n $query = $this->tableData->getDeleteSQL($obj);\n $this->runQuery($query);\n if(!mysqli_affected_rows($this->db) > 0){\n throw new \\RuntimeException(\"Nothing was deleted, might be due to optimistic locking failure or simply that the entity no longer exists\");\n }\n }", "title": "" }, { "docid": "ca760c7acadedc3adc3970ed7a4089c8", "score": "0.6535583", "text": "public function delete() {\n }", "title": "" }, { "docid": "28fc3ee9c950ce4cf302bf01515283a8", "score": "0.6534653", "text": "public function delete() {\n\t\tif ($this->id == null) {\n\t\t\tthrow new InvalidOperationException('Unable to delete unsaved object');\n\t\t}\n\t\t\n\t\t//get write lock\n\t\t$this->writeLock(array('id'=> $this->id), true);\t\t\n\t\t\n\t\tif ($this->transaction->getAutoCommit()) {\r\n\t\t\t$this->transaction->commit();\r\n\t\t}\n\t\t\n\t\t$this->dataState = self::DATASTATE_NEW;\n\t\t$this->retrievedValues = array();\n\t\t$this->updatedValues = array();\n\t\t\n\t}", "title": "" }, { "docid": "0780c1900550509a10dd143002ed2e38", "score": "0.6527995", "text": "public function testDeleteSimpleEntity()\n {\n $entityName = \"EntityOne\";\n $entityStepKey = \"StepKey\";\n $dataKey = \"testKey\";\n $dataValue = \"testValue\";\n $scope = PersistedObjectHandler::TEST_SCOPE;\n $parserOutput = [\n 'entity' => [\n 'EntityOne' => [\n 'type' => 'testType',\n 'data' => [\n 0 => [\n 'key' => $dataKey,\n 'value' => $dataValue\n ]\n ]\n ]\n ]\n ];\n $jsonResponse = \"\n {\n \\\"\" . strtolower($dataKey) . \"\\\" : \\\"{$dataValue}\\\"\n }\n \";\n\n // Mock Classes\n $this->mockDataHandlerWithOutput($parserOutput);\n $this->mockCurlHandler($jsonResponse);\n $handler = PersistedObjectHandler::getInstance();\n\n // Call method\n $handler->createEntity(\n $entityStepKey,\n $scope,\n $entityName\n );\n\n $handler->deleteEntity(\n $entityStepKey,\n $scope\n );\n\n // Handler found and called Delete on existing entity\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "21abd2778c3ee33008f60728a5c96375", "score": "0.6527556", "text": "public function delete($id) {}", "title": "" }, { "docid": "56930049f85f8f4e295b9cb74a79912f", "score": "0.65263426", "text": "public function destroy($entity, $id)\n {\n }", "title": "" } ]
bc1f09f583a95f784bf8b994874e919d
function to recovr name of table
[ { "docid": "a26e6787b28b368d0143e55c0b92ad44", "score": "0.0", "text": "public function __construct (string $table) {\n\n $dsn = new db\\Database();\n $this->_pdo = $dsn->connect();\n $this->_table = $table;\n\n }", "title": "" } ]
[ { "docid": "def813a52e9b6f1652bb1d88d6c8ab88", "score": "0.83380145", "text": "abstract public function table_name ();", "title": "" }, { "docid": "78b33f9cf03f43c3ffaec39320093349", "score": "0.80636966", "text": "public static function getTable() : string {\n\t\t$namespacedClassParts = explode(\"\\\\\", get_called_class());\n\t\t$table = array_pop($namespacedClassParts);\n\t\t$table = preg_replace(\"/([a-z0-9])([A-Z0-9])/\", '$1_$2', $table);\n\t\t$table = strtolower($table);\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "9bd9d42d52f385607277b3b7abaf089b", "score": "0.8018838", "text": "public function table_name();", "title": "" }, { "docid": "3b2a1383ca76a85062c596eb6956254b", "score": "0.79554117", "text": "function getTableName() : string;", "title": "" }, { "docid": "8a215082dabcc4c277825aa01ac403a5", "score": "0.78834486", "text": "public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }", "title": "" }, { "docid": "fd136304aca85310288e30dc6dc16058", "score": "0.78664976", "text": "public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}", "title": "" }, { "docid": "8dd49bee707318b737deafdf4620c4d3", "score": "0.7813486", "text": "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "title": "" }, { "docid": "40912b102f7629d85426156125fee90f", "score": "0.7802554", "text": "public function get_table_name(){\n return $this->table_name();\n }", "title": "" }, { "docid": "3c635eaff1cf4de4a18dddd37bc8c2d8", "score": "0.7772972", "text": "public function get_tablename() : string\n\t{\n\t\treturn (string)$this->table;\n\t}", "title": "" }, { "docid": "966c420922cdd7aa605c74ee49975e3f", "score": "0.7727222", "text": "function get_table_name($table_name)\n{\n\tglobal $project_vars;\n\treturn $project_vars['mysql_table_prefix'] . $table_name;\n}", "title": "" }, { "docid": "599dd8cb66fe9bb9cb840d8fa4817340", "score": "0.77041817", "text": "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "title": "" }, { "docid": "c63b7641b12cede1fd766b49417070d2", "score": "0.7697513", "text": "abstract public function getTableName();", "title": "" }, { "docid": "cb8cd5a2ab0b8d6aefd92776d0cafc5b", "score": "0.7686279", "text": "public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}", "title": "" }, { "docid": "f258b834b402cd48b9af14d8a3290ef9", "score": "0.7676189", "text": "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "title": "" }, { "docid": "a3c5e84c429111dc8bcd7364b86f836d", "score": "0.7674636", "text": "abstract protected function getTableName();", "title": "" }, { "docid": "a3c5e84c429111dc8bcd7364b86f836d", "score": "0.7674636", "text": "abstract protected function getTableName();", "title": "" }, { "docid": "5ae97601011e23393c083c58b2debe45", "score": "0.76683575", "text": "function table_name($obj){\n $cls_name=get_class($obj);\n return substr($cls_name,0,strrpos($cls_name,'_'));\n }", "title": "" }, { "docid": "18d371525e9a391fb584cc3665d54679", "score": "0.7667436", "text": "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "title": "" }, { "docid": "1866a1ee8c69fb7f322173861f7060f5", "score": "0.76434326", "text": "function tableName($name)\n{\n //global $GLOBALS;\n $pos = strpos($name, '.');\n if ($pos !== FALSE)\n {\n $column = trim(substr($name, $pos+1));\n if ($column != \"*\") $column = \"[$column]\";\n return \"[\".$_SESSION[\"db_prefix\"].substr($name, 0, $pos).\"].$column\";\n }\n return \"[\".$_SESSION[\"db_prefix\"].\"$name]\";\n}", "title": "" }, { "docid": "10b5dd0980b4b7be82dac5c50037dac9", "score": "0.76418734", "text": "function getTableFullName()\n {\n return implode(' ', [$this->table_prefix . $this->table_name, $this->table_alias]);\n }", "title": "" }, { "docid": "bd4e41d39ec7406925a75fd95ab82db1", "score": "0.76292014", "text": "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "title": "" }, { "docid": "dfe0c12612fa46cfa88762fb9fd50966", "score": "0.7627057", "text": "public function getTableName(): string;", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.7624717", "text": "public function getTableName();", "title": "" }, { "docid": "639ab20597a8ed40135d938ea65a2703", "score": "0.7622079", "text": "function _table_name($table) {\n $table = mysql_escape_string($table);\n if (substr($table, 0, strlen($this->Prefix)) == $this->Prefix) return $table;\n return $this->Prefix . mysql_escape_string($table);\n}", "title": "" }, { "docid": "547c02bd7622b7f2787eee6e72621816", "score": "0.7617552", "text": "private function getTableName()\n {\n $class = get_class($this);\n\n $mem = new Cache();\n if ($tableName = $mem->get($class . '-table-name')) {\n return $tableName;\n }\n\n $break = explode('\\\\', $class);\n $ObjectName = end($break);\n $className = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $ObjectName));\n $tableName = Inflect::pluralize($className);\n\n $mem->add($class . '-table-name', $tableName, 1440);\n\n return $tableName;\n }", "title": "" }, { "docid": "4005b093a9e2c75d13666670efb64c86", "score": "0.7615041", "text": "abstract public static function getTableName();", "title": "" }, { "docid": "62c6ee38a5f5dbcfbe83749ff8253306", "score": "0.76063114", "text": "public function getForTableName(): string\n {\n if ($this->tableName === 'pages') {\n return 'pages_language_overlay';\n }\n return $this->tableName;\n }", "title": "" }, { "docid": "2025c8e1fdb3357b280239f82b23eb43", "score": "0.75943863", "text": "protected static function get_table_name() {\n return null;\n }", "title": "" }, { "docid": "52f972ab96ae118ace300f6fefb4159c", "score": "0.7593215", "text": "public function getTableName() {}", "title": "" }, { "docid": "52f972ab96ae118ace300f6fefb4159c", "score": "0.759312", "text": "public function getTableName() {}", "title": "" }, { "docid": "dcb03ff8e17bcafe6d24bf5374ec5507", "score": "0.75696534", "text": "public static function tableName(): string;", "title": "" }, { "docid": "108b76317a51ceb83f4489ba6b5508d8", "score": "0.7558672", "text": "public function getTablename(){\n\t\treturn $this->tablename;\n\t}", "title": "" }, { "docid": "63ceeb6d6b86c89d7c4fe4508a51730e", "score": "0.75528795", "text": "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "title": "" }, { "docid": "5db38ea28d4a5f919a2139ed32700175", "score": "0.7542701", "text": "static public function get_table_name() {\n return static::$tableName;\n }", "title": "" }, { "docid": "da4338740664784fdfc58eae417d7184", "score": "0.7539773", "text": "protected static function getTableName()\n {\n // by default we have tables in all lower case letters names after the unqualified model classes\n return strtolower(StringHelper::getNameWithoutNamespaces(get_called_class()));\n }", "title": "" }, { "docid": "55445bde6159f0cf3a413e8d6ba73cbe", "score": "0.75357944", "text": "protected function resolveTable() {\r\n\r\n\t\t$tableName = $this->_salt_obj->MODEL()->getTableName();\r\n\r\n\t\tif ($this->_salt_database !== NULL) {\r\n\t\t\t$tableName = SqlBindField::escapeName($this->_salt_database).'.'.$tableName;\r\n\t\t}\r\n\r\n\t\tif ($this->_salt_noAlias) {\r\n\t\t\treturn $tableName;\r\n\t\t}\r\n\t\treturn $tableName.' '.$this->_salt_alias;\r\n\t}", "title": "" }, { "docid": "49faf1da981b1c9d4647d1031d24fbd7", "score": "0.75281143", "text": "public function getFromTableName(): string\n {\n if ($this->tableName === 'pages_language_overlay') {\n return 'pages';\n }\n return $this->tableName;\n }", "title": "" }, { "docid": "128f97db9f258514a8de9b437027a62e", "score": "0.7527004", "text": "public function getTableName(): string\n {\n return $this->table->getTableName();\n }", "title": "" }, { "docid": "872c6f52cc394e0fbb27c41421e11a1d", "score": "0.7522711", "text": "function getTableName() {\n \t return $this->table_name;\n \t}", "title": "" }, { "docid": "28d7672cc374c627c17a5ba9b9b0375b", "score": "0.75218105", "text": "public function getTableName():string;", "title": "" }, { "docid": "0594fd1e574ede71a82d14f51fe9f533", "score": "0.75145453", "text": "protected function getTableName(): string\n {\n return (new $this->model)->getTable();\n }", "title": "" }, { "docid": "db13c168c861dc6f0a138a4238876c1f", "score": "0.7513933", "text": "public static function getTableName() {\r\n\t\t\r\n\t\treturn static::properties()->table->getName();\r\n\t\t\r\n\t}", "title": "" }, { "docid": "1b05cfe19f1735e6e76cdafe8a664a2f", "score": "0.7512591", "text": "public static function getTableName()\n\t{\t\n\t\treturn self::$table_name;\n\t}", "title": "" }, { "docid": "e205ae5431096007bd715114a2fdd636", "score": "0.75098675", "text": "public function getTableName($table_name){\n return $this->prefix.$table_name;\n }", "title": "" }, { "docid": "a6c785e07f387673f196a07c12fb2210", "score": "0.7480536", "text": "private function qualifiedTablename($table, $database= NULL) {\n $database= $this->database($database);\n if (NULL !== $database) return $database.'.'.$table;\n return $table;\n }", "title": "" }, { "docid": "364682e995c026534ef521d39bafbd51", "score": "0.7479698", "text": "function SqlTableName($table=\"\")\n {\n return $this->ApplicationObj->SqlUnitTableName(\"Friends\",$table);\n }", "title": "" }, { "docid": "16b5c2350ed9219a62450a5ea6abc1c2", "score": "0.74768144", "text": "public static function RawTableName(){\n return str_replace('}}','', str_replace('{{%','',static::tableName()));\n }", "title": "" }, { "docid": "e076974e0c051b41d329ea577d167b1b", "score": "0.7476765", "text": "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "title": "" }, { "docid": "155e76f25aed62cd80aa1ce670a7c2e9", "score": "0.74622947", "text": "public static function TABLE_NAME(): string\n\t{\n\t\treturn (self::TABLE_NAME);\n\t}", "title": "" }, { "docid": "b2ade445eabcecd3755dc67d5379b935", "score": "0.74591905", "text": "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "title": "" }, { "docid": "b282a85567ad0bc04660528553723740", "score": "0.74585545", "text": "static function name ($table) {\n\t\treturn strtolower(\\Str::plural(get_class($table)));\n\t}", "title": "" }, { "docid": "58b381d8fa59e64d08f72927496a2899", "score": "0.745567", "text": "public static function getTableName()\n\t{\n\t\treturn self::$table_name;\n\t}", "title": "" }, { "docid": "88cf4dc0c3a523cd544e6005c9871f16", "score": "0.7439308", "text": "protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }", "title": "" }, { "docid": "69c312fd9b39235673e7d629df1a5d43", "score": "0.7419229", "text": "public function get_table() {\n if(empty($this->table)) {\n\t\t\t$namespaced_dir_array = explode(DS, str_replace(['/','\\\\'], DS, get_class($this)));\n\t\t\t$class_name_without_ns = end($namespaced_dir_array);\n\t\t}\n\t\t\n\t\treturn !( empty($this->table) ) ? $this->table : strtolower($class_name_without_ns);\n\t\treturn !( empty($this->table) ) ? $this->table : strtolower(get_class($this));\n }", "title": "" }, { "docid": "8cfaa0449105cd7fcefc85098cdc8c28", "score": "0.74187344", "text": "public function getTablePrefix();", "title": "" }, { "docid": "5812bf65053adb1a93439ba9be77079d", "score": "0.7407221", "text": "protected function getStaticDatabaseTableName() {\r\n $paramDbPrefix=Parameter::getGlobalParameter('paramDbPrefix');\r\n return strtolower($paramDbPrefix . get_class($this));\r\n }", "title": "" }, { "docid": "d703e6f4ba8adc376ade8924072843e0", "score": "0.7396378", "text": "public function GetTable() : string{\n //return\n return $this->tableName;\n }", "title": "" }, { "docid": "71fe3faf22245d04c527d959837ad668", "score": "0.7392512", "text": "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "title": "" }, { "docid": "8997ff257c14e92b6a6f213d2d2da739", "score": "0.73855543", "text": "public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }", "title": "" }, { "docid": "16c7437f4933a05165e93c6a39dbdbaf", "score": "0.73851895", "text": "public function getTableName(): string\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "16c7437f4933a05165e93c6a39dbdbaf", "score": "0.73851895", "text": "public function getTableName(): string\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "05a8778e8cc3ac2fe3390e49c860a4cc", "score": "0.7383961", "text": "public function get_table_name() \n\t{\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "a4e1cba7dc59bddb9bdd0b7038b38ff7", "score": "0.7383821", "text": "public function getTable () {\n\t\treturn $this->getPrefix() . $this->getName();\n\t}", "title": "" }, { "docid": "b6ea064312af184759259fba637e160f", "score": "0.73776275", "text": "public function getTableName()\r\n {\r\n return $this->table_name;\r\n }", "title": "" }, { "docid": "17962423fac5f6ecd8ff13f9406696cc", "score": "0.73664784", "text": "public static function getTableName() : string\n {\n return 'x0i_demo_profile';\n }", "title": "" }, { "docid": "a0271646e95eaa65fd50c552422aa291", "score": "0.7360166", "text": "public function get_table_name()\r\n\t{\r\n\t\treturn $this->table_name;\r\n\t}", "title": "" }, { "docid": "dd9863596631246cb54904a513f264a8", "score": "0.735901", "text": "public function getTableName()\n {\n if (!isset($this->name)) {\n $this->name = static::uncamelcase(preg_replace('/^.+\\\\\\\\|Table$/i', '', get_class($this)));\n }\n \n return $this->name;\n }", "title": "" }, { "docid": "13c5e9f5382e9e4123eaa717a9120a7b", "score": "0.7355714", "text": "public function getTableKeyName()\n\t{\n\t\treturn \"id\".$this->getTableName();\n\t}", "title": "" }, { "docid": "a88e781d8216e6a116576d03fa46af46", "score": "0.73466206", "text": "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "title": "" }, { "docid": "463de1ba04a2a459182123214ea551cf", "score": "0.7346394", "text": "function SqlTableName($table=\"\")\n {\n return $this->ApplicationObj()->SqlUnitTableName(\"Events\",$table);\n }", "title": "" }, { "docid": "df91289b36f9083f1368e4b3c503f661", "score": "0.73443186", "text": "public function table_name()\n {\n return $this->table_name;\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.73353225", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.73353225", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.73353225", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "db53f27c8f5080f3c96d037081bc33a4", "score": "0.73257214", "text": "public function getTableName()\n {\n return $this->table_name;\n }", "title": "" }, { "docid": "2a13da0fac0ee25eaa7fb9588f1a5143", "score": "0.7322128", "text": "public function getTableName($table_name) {\r\n\t\treturn $this->prefix.$table_name;\r\n\t}", "title": "" }, { "docid": "d4b984a13f05186023d085dedda4516e", "score": "0.7319253", "text": "public static function table_name() {\n $table_name = strtolower(get_called_class());\n\n if (!in_array($table_name, ApplicationSql::tablenames()))\n throw new TableNotFoundException(\"Veritabanında böyle bir tablo mevcut değil\", $table_name);\n\n return $table_name;\n }", "title": "" }, { "docid": "bf3580c1a180eb6b89ebb4b50fb39eb6", "score": "0.7318976", "text": "public static function getTablename() { return \"Productos_01\"; }", "title": "" }, { "docid": "91f1dc771ad0cf818448a2f77ad5c91c", "score": "0.7317005", "text": "public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }", "title": "" }, { "docid": "8209a4f0fcc0e8c75e0b172f823b1409", "score": "0.73147726", "text": "public function getTable(): string\n {\n return $this->_table;\n }", "title": "" }, { "docid": "e0f01bcafdc7fdfbb226a786704bcf51", "score": "0.730983", "text": "public function getTableName()\n {\n global $wpdb;\n return $wpdb->prefix . static::TABLE_NAME;\n }", "title": "" }, { "docid": "7479f4ef48b22f8327a082dfba8f7ce3", "score": "0.730834", "text": "public static function full_tablename($tablename) {\n global $db_type;\n\n if ($db_type == 'pgsql') {\n\n $table_schemas = array( #todo get from database\n 'company' => 'market',\n 'quote' => 'market',\n );\n\n if (isset($table_schemas[$tablename])) {\n $schema = $table_schemas[$tablename];\n return \"$schema.$tablename\";\n }\n else {\n return $tablename;\n }\n }\n else {\n return $tablename;\n }\n }", "title": "" }, { "docid": "cc180fce62e984b70812197b5e6b29e0", "score": "0.73041075", "text": "public static function TableName(){\n\t\treturn \"{{%user}}\";\n\t}", "title": "" }, { "docid": "6dee3883e8360d4e0af1ad3cc28d3572", "score": "0.72977567", "text": "public function table($table_name)\n {\n return Mage::getSingleton('core/resource')->getTableName($table_name);\n }", "title": "" }, { "docid": "9bc578ac1b56cfaa0ac8acb9dd4fb725", "score": "0.728477", "text": "public function getTableName(): string {\n\t\t// get class name\n\t\t$manager = (new ReflectionClass($this))->getShortName();\n\n\t\t// extract from class name the table name\n\t\treturn strtolower(str_replace(\"Manager\", \"\", $manager));\n\t}", "title": "" }, { "docid": "b8d57611a50dabf7cdbc085be4b5df33", "score": "0.72810954", "text": "static function getTableName() \n\t\t\t{\n\t\t\treturn self::$_tableName;\n\t\t\t}", "title": "" }, { "docid": "1e25bda8f4b7e937462ee5cf5c1ce0ad", "score": "0.7275729", "text": "public function getBaseTableName()\n {\n return $this->table->getName();\n }", "title": "" }, { "docid": "4fe5d2650d5a4089031a845838c7bcec", "score": "0.727169", "text": "function sql_table($name) {\n global $MYSQL_PREFIX;\n\n if ($MYSQL_PREFIX) {\n return $MYSQL_PREFIX . 'nucleus_' . $name;\n } else {\n return 'nucleus_' . $name;\n }\n}", "title": "" }, { "docid": "8ad1c8bfd8759e60a05f1739e5caa07a", "score": "0.7265909", "text": "protected function TableName() {\n\tthrow new exception('2017-01-05 Is this being called?');\n }", "title": "" }, { "docid": "ab4d8f8638bcfe236f47105013cbb655", "score": "0.7259377", "text": "function tableName ($internalName) {\n\t\t$key = $internalName;\n\t\t/*\n\t\tif (array_key_exists($key, $this->tableDefinition) && array_key_exists(\"table\", $this->tableDefinition[$key])) {\n\t\t\t$internalName = $this->tableDefinition[$key]['table'];\n\t\t}\n\t\t*/\n\t\t$internalName = $this->tableDefinition[$key]['table'];\n\n\t\t$result = $internalName?$this->prefixTableName($internalName):\"\";\n\t\terror_log(\"Tablename $internalName -> $result\");\n\n\t\treturn ($result);\n\n\t\t//return $internalName?$this->prefixTableName($internalName):\"\";\n\t}", "title": "" }, { "docid": "ab437b2030f07c2099a7bf5392967ca3", "score": "0.72560686", "text": "function SqlTableName($table=\"\")\n {\n return $this->ApplicationObj->SqlEventTableName(\"Inscriptions\",$table);\n }", "title": "" }, { "docid": "7cb51b6a22fd861a303995c6c21f79a8", "score": "0.72556764", "text": "abstract public static function tableName() : string;", "title": "" }, { "docid": "ab8179e40c3c16b35520cf5412dd017b", "score": "0.7253564", "text": "public function getTableName()\n {\n return $this::TABLE;\n }", "title": "" }, { "docid": "142bbfda472ef7f8366a1530731cb483", "score": "0.7248991", "text": "public function getTableName()\n {\n return (string) $this->tableName;\n }", "title": "" }, { "docid": "f1b42572499119738f015d10c58c559a", "score": "0.72417486", "text": "public function getTableName($name){\n return $name.\"_\".$this->table_prefix;\n }", "title": "" }, { "docid": "b0bdd55de33d639ac0a602ee8ae4bed7", "score": "0.72411704", "text": "public function GetTableName()\n {\n return($this->tbName);\n }", "title": "" }, { "docid": "8ecafe80b652ebaac9445fc40dfff8f0", "score": "0.72404516", "text": "public function tableName()\n {\n if (!empty(Yii::app()->dressing->modelMap[get_class($this)]['tableName']))\n //throw new CException(Yii::t('dressing', 'Table not found in YiiDressing::tableMap for class :class.', array(':class' => get_class($this))));\n return Yii::app()->dressing->modelMap[get_class($this)]['tableName'];\n return str_replace('yd_', '', strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', get_class($this))));\n }", "title": "" }, { "docid": "886fd5e3537ad2fd6befaa638bde97d3", "score": "0.7235883", "text": "public function getTableName() {\n\t\treturn self::$TABLE_NAME;\n\t}", "title": "" }, { "docid": "bc6cdb4c227ed2bdfc3385b7787e9b76", "score": "0.7235568", "text": "public function getTableNames();", "title": "" }, { "docid": "046fed5eb4a5205ee9a05c98c1aaf637", "score": "0.72353685", "text": "public static function table(string $name)\n\t{\n\t\treturn Str::startsWith($name, 'sos') ? $name : \"sos_{$name}\";\n\t}", "title": "" }, { "docid": "478c5367706b3f5e51007829f1e0a467", "score": "0.7232361", "text": "function getItemTableName() ;", "title": "" } ]
83fe688503908a0407b9bfa07c523a24
the_content_shortcode function. Displays the post content
[ { "docid": "08c98556e170ab402ec605de414e8df8", "score": "0.7983875", "text": "function the_content_shortcode()\n\t{\n\t\t$content = get_the_content();\n\t\t$content = apply_filters('the_content', $content);\n\t\t$content = str_replace(']]>', ']]&gt;', $content);\n\n\t\treturn $content;\n\t}", "title": "" } ]
[ { "docid": "f265d01bc123a21d2b8bc72abbb6e1d4", "score": "0.81575704", "text": "function the_content_shortcode() {\n\n $content = apply_filters('the_content', get_post_field('post_content', $my_postid));\n\n return $content;\n}", "title": "" }, { "docid": "2e8ea6ba2810c9559243ecbb9f4a2ddc", "score": "0.7467738", "text": "function prism_content() {\n\t\tglobal $prism_content_length;\n\t\n\t\tif ( strtolower($prism_content_length) == 'full' ) {\n\t\t\t$post = get_the_content( prism_more_text() );\n\t\t\t$post = apply_filters('the_content', $post);\n\t\t\t$post = str_replace(']]>', ']]&gt;', $post);\n\t\t} elseif ( strtolower($prism_content_length) == 'excerpt') {\n\t\t\t$post = '';\n\t\t\t$post .= get_the_excerpt();\n\t\t\t$post = apply_filters('the_excerpt',$post);\n\t\t\tif ( apply_filters( 'prism_post_thumbs', TRUE) ) {\n\t\t\t\t$post_title = get_the_title();\n\t\t\t\t$size = apply_filters( 'prism_post_thumb_size' , array(100,100) );\n\t\t\t\t$attr = apply_filters( 'prism_post_thumb_attr', array('title'\t=> sprintf( esc_attr__('Permalink to %s', 'prism'), the_title_attribute( 'echo=0' ) ) ) );\n\t\t\t\tif ( has_post_thumbnail() ) {\n\t\t\t\t\t$post = sprintf('<a class=\"entry-thumb\" href=\"%s\" title=\"%s\">%s</a>',\n\t\t\t\t\t\t\t\t\tget_permalink() ,\n\t\t\t\t\t\t\t\t\tsprintf( esc_attr__('Permalink to %s', 'prism'), the_title_attribute( 'echo=0' ) ),\n\t\t\t\t\t\t\t\t\tget_the_post_thumbnail(get_the_ID(), $size, $attr)) . $post;\n\t\t\t\t\t}\n\t\t\t}\n\t\t} elseif ( strtolower($prism_content_length) == 'none') {\n\t\t} else {\n\t\t\t$post = get_the_content( prism_more_text() );\n\t\t\t$post = apply_filters('the_content', $post);\n\t\t\t$post = str_replace(']]>', ']]&gt;', $post);\n\t\t}\n\t\techo apply_filters('prism_post', $post);\n\t}", "title": "" }, { "docid": "a4f24f0239abb7991f0dcc332a05e7f4", "score": "0.73953444", "text": "function omfg_mobile_pro_pagecontent () {\n\n\tglobal $post, $wp_query;\n\t\n\t// Post ID\n\t$postid = $wp_query->post->ID;\n\t$page_content = get_post_meta($postid, '_omfg_page_content', true);\n\t$page_content = do_shortcode($page_content);\n\t$page_content = wpautop($page_content, 1);\n\t\n\techo $page_content;\n\n}", "title": "" }, { "docid": "81375a7c9043a350108c1fd6e97eb478", "score": "0.734623", "text": "protected function content($atts, $content = null) {\n\n extract(shortcode_atts(array(\n\t\t\t\"bgcolor\" => '',\n\t\t\t\"bgimage\" => '',\n\t\t\t\"border_color\" => '#3C3C3C',\n\t\t\t\"class\" => ''\n ), $atts));\n\n\n /* ================ Render Shortcodes ================ */\n\n ob_start();\n\n ?>\n \n <?php \n\t\t\t//$img = wp_get_attachment_image_src($el_image, \"large\"); \n\t\t\t//$imgSrc = $img[0];\n\t\t?>\n\n <!-- Element Code start -->\n \n <?php \n\t\t\n if($bgimage != ''){\n\t\t\t\n echo '<div class=\"pm_feature_container '. ($class !== '' ? esc_attr($class) : '') .'\" style=\"background-image:url('. esc_url($bgimage) .'); background-color:'. esc_attr($bgcolor) .'; border-bottom:8px solid '.esc_attr($border_color) .'; border-top:8px solid '. esc_attr($border_color) .';\">'. do_shortcode($content) .'</div>'; \n\t\t\t\n } else {\n\t\t\t\n echo '<div class=\"pm_feature_container '. ($class !== '' ? esc_attr($class) : '') .'\" style=\"background-color:'. esc_attr($bgcolor) .'; border-bottom:8px solid '. esc_attr($border_color) .'; border-top:8px solid '.esc_attr($border_color) .';\">'. do_shortcode($content) .'</div>'; \n\t\t\t\t\n\t\t}\n\t\t\n\t\t?>\n \n <!-- Element Code / END -->\n\n <?php\n\n $output = ob_get_clean();\n\n /* ================ Render Shortcodes ================ */\n\n return $output;\n\n }", "title": "" }, { "docid": "4ccc6e490aba9b790bfff6aff68c2699", "score": "0.7288849", "text": "function green_sc_content($atts, $content=null){\t\n\tif (green_sc_in_shortcode_blogger()) return '';\n extract(green_sc_html_decode(shortcode_atts(array(\n\t\t// Common params\n\t\t\"id\" => \"\",\n\t\t\"class\" => \"\",\n\t\t\"css\" => \"\",\n\t\t\"animation\" => \"\",\n\t\t\"top\" => \"\",\n\t\t\"bottom\" => \"\"\n ), $atts)));\n\t$css .= green_get_css_position_from_values('!'.($top), '', '!'.($bottom));\n\t$output = '<div' . ($id ? ' id=\"'.esc_attr($id).'\"' : '') \n\t\t. ' class=\"sc_content content_wrap' . ($class ? ' '.esc_attr($class) : '') . '\"'\n\t\t. (!green_sc_param_is_off($animation) ? ' data-animation=\"'.esc_attr(green_sc_get_animation_classes($animation)).'\"' : '')\n\t\t. ($css!='' ? ' style=\"'.esc_attr($css).'\"' : '').'>' \n\t\t. do_shortcode($content) \n\t\t. '</div>';\n\treturn apply_filters('green_shortcode_output', $output, 'trx_content', $atts, $content);\n}", "title": "" }, { "docid": "714a678f736689585b884838b8e7c929", "score": "0.72442085", "text": "function tcb_render_wp_shortcode( $content ) {\n\n\t$do_shortcode = is_editor_page() || wp_doing_ajax();\n\n\t/* fix for SUPP-5168, treat [embed] shortcodes separately by delegating the shortcode function to class-wp-embed.php */\n\tif ( $do_shortcode ) {\n\t\t$content = tve_handle_embed_shortcode( $content );\n\t}\n\t/**\n\t * This makes sure that the content doesn't contain any left-over <!-- gutenberg --> tags\n\t */\n\tif ( function_exists( 'do_blocks' ) ) {\n\t\t$content = do_blocks( $content );\n\t}\n\t$content = wptexturize( ( $content ) );\n\t$content = convert_smilies( $content );\n\t$content = convert_chars( $content );\n\n\t$content = shortcode_unautop( $content );\n\t$content = shortcode_unautop( wptexturize( $content ) );\n\n\tif ( $do_shortcode ) {\n\t\t$content = preg_replace( '#<!--more(.*?)-->#', '<span class=\"tcb-wp-more-tag\"></span>', $content );\n\t}\n\n\treturn $do_shortcode ? do_shortcode( $content ) : $content;\n}", "title": "" }, { "docid": "4c3d3c3c3145e0f124a2f413747c3856", "score": "0.72234", "text": "function adverts_the_content($content) {\n global $wp_query;\n \n if (is_singular('advert') && in_the_loop() ) {\n ob_start();\n $post_id = get_the_ID();\n \n $post_content = get_post( $post_id )->post_content;\n $post_content = wp_kses($post_content, wp_kses_allowed_html( 'post' ) );\n $post_content = apply_filters( \"adverts_the_content\", $post_content );\n \n include apply_filters( \"adverts_template_load\", ADVERTS_PATH . 'templates/single.php' );\n $content = ob_get_clean();\n } elseif( is_tax( 'advert_category' ) && in_the_loop() ) {\n add_action( 'adverts_sh_list_before', 'adverts_list_show_term_description' );\n $content = shortcode_adverts_list(array(\n \"category\" => $wp_query->get_queried_object_id()\n ));\n remove_action( 'adverts_sh_list_before', 'adverts_list_show_term_description' );\n }\n\n return $content;\n}", "title": "" }, { "docid": "00ce377ed36a442e20bc5904ecf580f9", "score": "0.7190889", "text": "public static function get_formated_content() {\n\t\t//(See wp-includes/class-wp.php::register_globals() and get_the_content())\n\t\tglobal $more;\n\t\t$more = 1; \n\t\t\n\t\t$post = get_post();\n\n\t\t$content = get_the_content();\n\n\t\t//Apply \"the_content\" filter : formats shortcodes etc... :\n\t\t$content = apply_filters( 'the_content', $content );\n\t\t$content = str_replace( ']]>', ']]&gt;', $content );\n\n\t\t$allowed_tags = '';\n\n\t\t/**\n\t\t * Filter that allows to set the HTML tags allowed for a given post.\n\t\t * By default $allowed_tags is empty, meaning that all tags are allowed.\n\t\t *\n\t\t * @param string \t$allowed_tags A string containing the concatenated list of allowed HTML tags.\n\t\t * @param WP_Post \t$post \t\t\tThe post object.\n\t\t */\n\t\t$allowed_tags = apply_filters( 'wpak_post_content_allowed_tags', $allowed_tags, $post );\n\n\t\tif ( !empty( $allowed_tags ) ) {\n\t\t\t$content = strip_tags( $content, $allowed_tags );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Filter a single post content.\n\t\t *\n\t\t * To override (replace) this default formatting completely, use\n\t\t * \"wpak_posts_list_post_content\" and \"wpak_page_content\" filters.\n\t\t *\n\t\t * @param string \t$content \tThe post content.\n\t\t * @param WP_Post \t$post \t\tThe post object.\n\t\t */\n\t\t$content = apply_filters( 'wpak_post_content_format', $content, $post );\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "effd0fb6ab9228a384ecaa3bf2fd6a4c", "score": "0.71471477", "text": "public function get_content() {\r\r\n\t\t$content = '';\r\r\n\t\tif ($this->post) {\r\r\n\t\t\t$content = $this->post->post_content;\r\r\n\t\t}\r\r\n\t\treturn $content;\r\r\n\t}", "title": "" }, { "docid": "895f21fee5f122574ec55620fc65a69b", "score": "0.714285", "text": "public function get_content_for_shortcode( $atts ) {\n\t\t$atts = shortcode_atts(\n\t\t\t[\n\t\t\t\t'id' => 0,\n\t\t\t],\n\t\t\t$atts,\n\t\t\t'wpc_print_content'\n\t\t);\n\n\t\tif ( empty( $atts['id'] ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$post_id = (int) $atts['id'];\n\n\t\tif ( empty( $post_id ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$post = get_post( $post_id );\n\n\t\tif ( empty( $post->post_content ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $post->post_content;\n\t}", "title": "" }, { "docid": "25bb2c0a4e8879dbfc5fe9b0d8c4f5df", "score": "0.7124252", "text": "public function get_the_post_content() {\n\t\t$post = $this->post;\n\n\t\t$content = \\get_post_field( 'post_content', $post );\n\n\t\treturn \\apply_filters( 'the_content', $content );\n\t}", "title": "" }, { "docid": "eb0595144b65f20f6b68f8b093b0bd33", "score": "0.7102515", "text": "protected function content($atts, $content = null) {\n\n extract(shortcode_atts(array(\n\t\t\t'tip' => '',\n\t\t\t'icon' => 'fa fa-file',\n\t\t\t'hover_icon' => 'fa fa-link',\n\t\t\t'title' => '',\n\t\t\t'link' => '#',\n\t\t\t'image' => '',\n ), $atts));\n\n\n /* ================ Render Shortcodes ================ */\n\n ob_start();\n\n ?>\n \n <?php \n\t\t\t$img = wp_get_attachment_image_src($image, \"large\"); \n\t\t\t$image = $img[0];\n\t\t?>\n\n <!-- Element Code start -->\n \n <div class=\"pm_image_panel\">\n \n <div class=\"pm_image_panel_header\">\n <?php if($tip !== ''){ ?>\n <h4><span><?php esc_attr_e($title); ?></span><a target=\"_self\" class=\"<?php esc_attr_e($icon); ?> pm_tip\" title=\"<?php esc_attr_e($tip); ?>\" href=\"<?php echo esc_url($link); ?>\"></a></h4>\n <?php } else { ?>\n <h4><span><?php esc_attr_e($title); ?></span><a target=\"_self\" class=\"<?php esc_attr_e($icon); ?>\" href=\"<?php echo esc_url($link); ?>\"></a></h4>\n <?php } ?> \n </div>\n \n <div class=\"pm-hover-item-image-panel\"> \n <div class=\"pm-hover-item-icon\"><a class=\"<?php esc_attr_e($hover_icon); ?>\" href=\"<?php echo esc_url($link); ?>\"></a></div> \n <div class=\"pm-hover-item-details\"></div> \n <div class=\"pm-hover-item-image-panel-img\"><img src=\"<?php echo esc_url($image); ?>\" /></div>\n \n </div> \n \n <?php //echo do_shortcode($content); ?>\n \n </div>\n \n <!-- Element Code / END -->\n\n <?php\n\n $output = ob_get_clean();\n\n /* ================ Render Shortcodes ================ */\n\n return $output;\n\n }", "title": "" }, { "docid": "011b8fc456c938a6f9a7e73645b17bcb", "score": "0.70790946", "text": "public function run_shortcode($content)\n {\n }", "title": "" }, { "docid": "6f6a9aac73c5e38f08f4caaa78ed15dc", "score": "0.707506", "text": "function portfolio_get_post_content( $content ) {\n\tif ( is_admin() ) {\n\t\treturn $link;\n\t}\n\n $p = preg_split( '/<!--more(.*?)?-->/', $content );\n if(isset($p[1]))\n return do_shortcode( nl2br($p[1]) );\n else\n return do_shortcode( nl2br($content) );\n}", "title": "" }, { "docid": "aea382ce0e7d8e4e4da1094ebd65b9e4", "score": "0.7065471", "text": "function display( array $atts , $content = '' ){\r\n\r\n ob_start();\r\n\r\n if( $atts['title'] && ! Better_Framework::widget_manager()->get_current_sidebar() && $atts['show_title']){\r\n $atts['element-type'] = $this->id;\r\n echo apply_filters( 'better-framework/shortcodes/title', $atts );\r\n }\r\n\r\n ?>\r\n <div class=\"bf-shortcode bs-about\">\r\n <div class=\"the-content\">\r\n <?php if( ! Better_Framework::widget_manager()->is_footer_sidebar() ){ ?>\r\n <h4>\r\n <?php\r\n if( $atts['logo_img'] ){ ?>\r\n <img class=\"logo-image img-responsive\" src=\"<?php echo $atts['logo_img'] ?>\" alt=\"<?php echo $atts['logo_text']; ?>\">\r\n <?php }else{\r\n echo $atts['logo_text'];\r\n } ?>\r\n </h4><?php\r\n }\r\n\r\n echo wpautop( do_shortcode( $atts['text'] ) ); ?>\r\n </div>\r\n </div>\r\n <?php\r\n\r\n return ob_get_clean();\r\n\r\n }", "title": "" }, { "docid": "d9aa3ce22b28c988cc31a5e9ac9c3c9b", "score": "0.7042571", "text": "function show_post(){\n\t\t$post = $this->m->ArkPost->get_post ($this->get('id'));\n\t\t\n\t\t$post['content'] = htmlspecialchars_decode($post['content']);\n\t\t$this->assign('post',$post);\n\t\t$this->display ( 'show_post.html' );\n\t}", "title": "" }, { "docid": "8ee355a91d4bd87681397a105c6ed10e", "score": "0.6969919", "text": "public static function do_shortcode($content){\n\t\t//additional parameter assigment here\n\t\treturn do_shortcode($content);\n\t}", "title": "" }, { "docid": "75a9db95d134dbf07e1e7126545c57b8", "score": "0.68866336", "text": "public static function get_the_content(): string {\n\t\treturn apply_filters( 'the_content', get_the_content( null, false, get_the_ID() ) );\n\t}", "title": "" }, { "docid": "8e16170b8875d02e1050de09e5c3b93a", "score": "0.6841133", "text": "public function get_content() {\n\t\treturn $this->post->post_content;\n\t}", "title": "" }, { "docid": "d4b66ae275ec043e96a3a2a3892d929c", "score": "0.67800176", "text": "function do_shortcode(string $content) : string\n{\n\treturn $GLOBALS['PACMEC']['hooks']->do_shortcode($content);\n}", "title": "" }, { "docid": "0dcac8ff21114a4fceb01b6a6ce5faa7", "score": "0.6748066", "text": "function pmxc_ShowContent()\n\t{\n\t\tglobal $context, $user_info, $txt;\n\n\t\t$numpost = count($this->posts);\n\t\techo '\n\t\t\t<div style=\"margin:-2px 0 2px 0;\">';\n\n\t\tforeach($this->posts as $post)\n\t\t{\n\t\t\t$numpost--;\n\t\t\tif(!empty($this->cfg['config']['settings']['showboard']))\n\t\t\t\techo '\n\t\t\t\t<div class=\"pmxshorttxt\"><b>'. $txt['pmx_text_board'] .'</b>'. $post['board']['link'] .'</div>';\n\n\t\t\tif(preg_match('~msg[0-9]+~i', $post['href'], $match) > 0)\n\t\t\t\t$post['href'] = str_replace('#new', '#'. $match[0], $post['href']);\n\n\t\t\techo '\n\t\t\t\t<div class=\"pmxshorttxt'. (empty($this->isRead[$user_info['id']][$post['topic']]) ? 'new\">\n\t\t\t\t\t<img src=\"'. $context['pmx_imageurl'] .'unread.gif\" alt=\"*\" title=\"\" />' : '\">') .'\n\t\t\t\t\t<b>'. $txt['pmx_text_topic'] .'</b>\n\t\t\t\t\t<a href=\"'. $post['href'] .'\">'. $post['subject'] .'</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"pmxshorttxt\"><b>'. $txt['by'] .'</b> '. $post['poster']['link'] . (!empty($this->cfg['config']['settings']['recentsplit']) ? ', ' : '<br />') .'['. $post['time'] .']</div>'. ($numpost > 0 ? '<hr class=\"pmx_hr\" />' : '');\n\t\t}\n\t\techo '\n\t\t\t</div>';\n\t}", "title": "" }, { "docid": "0dc6c680bcf4015ffce792cd62bf1a6a", "score": "0.66855294", "text": "function tve_handle_embed_shortcode( $content ) {\n\t/* if we find an [embed] tag, give the content to the run_shortcode() function from class-wp-embed */\n\tif ( strpos( $content, '[embed' ) !== false ) {\n\t\tglobal $wp_embed;\n\t\t$content = $wp_embed->run_shortcode( $content );\n\t}\n\n\treturn $content;\n}", "title": "" }, { "docid": "5c2023f3950940b7bfe22746bdb1dd8b", "score": "0.66784716", "text": "public static function el_display_portfolio_summary_content($post){\n\t\t$instance = self::getInstance();\n\t\t$html = '';\n\t\t\n\t\t$portfolio_full_page_content = get_post_meta($post->ID,'portfolio_full_page_content', true);\n\t\tif(!empty($portfolio_full_page_content)){\n\t\t\t\t\n\t\t\t$html .= '<div class=\"entry-content animation-container el-col-small-12 el-col-medium-8 el-col-medium-offset-2 small-align-center small-margin-bottom-medium \">';\n\t\t\t\t$html .= '<div class=\"content\">' . apply_filters('the_content', $portfolio_full_page_content) . '</div>';\n\t\t\t$html .= '</div>';\n\t\t}\n\t\t\n\t\techo $html;\n\t}", "title": "" }, { "docid": "1c5c15de062f024104a02324f56f3eb5", "score": "0.66542095", "text": "function obfx_show_post_grid_content( $settings ) {\n\t\tif ( empty( $settings ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$show_post_content = ! empty( $settings->show_post_content ) ? $settings->show_post_content : '';\n\t\tif ( $show_post_content === 'no' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$number_of_words = ! empty( $settings->content_length ) ? $settings->content_length : '';\n\t\techo '<div class=\"obfx-post-content\">';\n\t\tif ( ! empty( $number_of_words ) ) {\n\t\t\t$content = obfx_get_limited_content( $number_of_words, $settings );\n\t\t\techo '<p>' . wp_kses_post( $content ) . '</p>';\n\t\t}\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "e50c2dbb696b0dd80e985c15fd50adf8", "score": "0.6637869", "text": "function the_content($content) {\r\n if (is_single() || is_page()) {\r\n global $post;\r\n $saved_data = get_post_meta($post->ID, 'hoverable', true);\r\n\r\n if (!empty($saved_data)) {\r\n foreach ($saved_data as $key => $item) {\r\n $hover_title = $item['hover_title'];\r\n $hover_desc = $item['hover_desc'];\r\n $content = str_replace($hover_title, \"<a href=\\\"#hov$key\\\" class=\\\"facebox\\\">$hover_title</a>\", $content);\r\n $hidden_divs[$key] = \"<div id=\\\"hov$key\\\">$hover_desc</div>\";\r\n }\r\n }\r\n if (isset($hidden_divs)) {\r\n return $content . '<div class=\"hov-modal\">' . implode('', $hidden_divs) . '</div>';\r\n }\r\n }\r\n return $content;\r\n }", "title": "" }, { "docid": "b2ebdf76812b248617d0a2c76dba3f8f", "score": "0.66334313", "text": "function handle_shortcode() {\n\n\t\t$this->load_posts();\n\t\t$this->generate_html();\n\n\t\treturn $this->html;\n\t}", "title": "" }, { "docid": "bf3cba45a49b6a8d8f6829222b0b77f7", "score": "0.66276646", "text": "public function embed_page_content( $post_content, $post ) {\n\n\t\t$meta = $this->get_meta();\n\n\t\t$form_id = ! empty( $meta['form_id'] ) ? $meta['form_id'] : 0;\n\t\t$page_id = ! empty( $meta['embed_page'] ) ? $meta['embed_page'] : 0;\n\n\t\tif ( ! empty( $page_id ) || empty( $form_id ) ) {\n\t\t\treturn $post_content;\n\t\t}\n\n\t\tif ( wpforms_is_gutenberg_active() ) {\n\t\t\t$pattern = '<!-- wp:wpforms/form-selector {\"formId\":\"%d\"} /-->';\n\t\t} else {\n\t\t\t$pattern = '[wpforms id=\"%d\" title=\"false\" description=\"false\"]';\n\t\t}\n\n\t\treturn sprintf( $pattern, absint( $form_id ) );\n\t}", "title": "" }, { "docid": "74baa0d85d88f49060f27f04be76dead", "score": "0.6626694", "text": "private function retrieve_post_content()\n {\n }", "title": "" }, { "docid": "607c093692284569bb6ea55b5798bdfc", "score": "0.66249865", "text": "function display( array $atts, $content = '' ) {\n\n\t\tif ( ! empty( $content ) ) {\n\t\t\t$atts['content'] = $content;\n\t\t}\n\n\t\tob_start();\n\n\t\tpublisher_set_prop( 'shortcode-bs-about-atts', $atts );\n\n\t\tpublisher_get_view( 'shortcodes', 'bs-about' );\n\n\t\tpublisher_clear_props();\n\n\t\treturn ob_get_clean();\n\n\t}", "title": "" }, { "docid": "217ac7a6165bf7ec718a2da5ba71b90f", "score": "0.66052794", "text": "function display( array $atts , $content = '' ){\r\n\r\n ob_start();\r\n\r\n if( $atts['title'] && ! Better_Framework::widget_manager()->get_current_sidebar() && $atts['show_title']){\r\n $atts['element-type'] = $this->id;\r\n echo apply_filters( 'better-framework/shortcodes/title', $atts );\r\n }\r\n\r\n ?>\r\n <div class=\"bf-shortcode bf-shortcode-flickr clearfix\">\r\n <div class=\"the-content\">\r\n <?php\r\n if( ! empty( $atts['user_id'] ) ){\r\n $data = $this->get_data( $atts );\r\n\r\n if( $data != false ){ ?>\r\n <ul class=\"bf-flickr-photo-list\"><?php\r\n foreach( (array) $data as $index => $item ){\r\n\r\n if( $index >= $atts['photo_count'] ){\r\n break;\r\n }\r\n\r\n $this->get_li( $item, $atts );\r\n } ?>\r\n </ul><?php\r\n\r\n }\r\n }\r\n ?>\r\n </div>\r\n </div>\r\n <?php\r\n\r\n return ob_get_clean();\r\n }", "title": "" }, { "docid": "00f51c8dbadaa2c04fd462394f725047", "score": "0.6587745", "text": "function footer_text_post_content_add_shortcodes( $content ) {\n\n\t/* Add the original shortcodes back. */\n\tadd_footer_text_shortcodes();\n\n\t/* Return the post content. */\n\treturn $content;\n}", "title": "" }, { "docid": "1324beaa93848ae466be6cb7e5d6f6ab", "score": "0.658517", "text": "function pmxc_AdmBlock_content()\n\t{\n\t\tglobal $context, $scripturl, $txt;\n\n\t\t// show the content area\n\t\techo '\n\t\t\t\t\t<td valign=\"top\" colspan=\"2\" style=\"padding:4px;\">\n\t\t\t\t\t\t<div class=\"cat_bar catbg_grid\">\n\t\t\t\t\t\t\t<h4 class=\"catbg catbg_grid\">\n\t\t\t\t\t\t\t\t<a href=\"', $scripturl, '?action=helpadmin;help=pmx_fader_content_help\" onclick=\"return reqOverlayDiv(this.href);\" class=\"help\"><span class=\"generic_icons help\" title=\"', $txt['help'],'\"></span></a>\n\t\t\t\t\t\t\t\t<span class=\"cat_msg_title\">'. $txt['pmx_fader_content'] .'</span>\n\t\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<textarea name=\"'. $context['pmx']['script']['id'] .'\" id=\"'. $context['pmx']['script']['id'] .'\" style=\"display:block;width:'. $context['pmx']['script']['width'] .';height:'. $context['pmx']['script']['height'] .';\">'. $context['pmx']['script']['value'] .'</textarea>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>';\n\n\t\t// return the default settings\n\t\treturn $this->pmxc_AdmBlock_settings();\n\t}", "title": "" }, { "docid": "b579008dd647ebb4bfa74f1dab161cec", "score": "0.65810287", "text": "function render_content() { ?>\n\t\n\t<?php if (have_posts()) : while (have_posts()) : the_post(); ?>\n\t\t\t<div id=\"page-<?php the_ID(); ?>\" class=\"type-page\" itemscope itemtype=\"http://schema.org/Article\">\n\t\t\t\t\t\t\n\t\t\t<!-- page-title -->\n\t\t\t<h1 class=\"tf_page_title\" itemprop=\"name\"><?php the_title(); ?></h1>\n\t\t\t<!-- /page-title -->\n\n\t\t\t<div class=\"tf_page_content entry-content\" itemprop=\"articleBody\">\n\t\t\t\n\t\t\t\t<?php the_content(); ?>\n\t\t\t\n\t\t\t\t<?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:','themify-flow').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>\n\t\t\t\t\n\t\t\t\t<?php edit_post_link(__('Edit','themify-flow'), '[', ']'); ?>\n\t\t\t\t\n\t\t\t\t<!-- comments -->\n\t\t\t\t<?php comments_template(); ?>\n\t\t\t\t<!-- /comments -->\n\t\t\t\t\n\t\t\t</div>\n\t\t\t<!-- /.post-content -->\n\t\t\n\t\t\t</div><!-- /.type-page -->\n\t\t<?php endwhile; endif; ?>\n<?php\n}", "title": "" }, { "docid": "786650aec937b00ecb72850f6786f75c", "score": "0.6576379", "text": "public function show_shortcode($atts, $content = null ){\n\t\t\tob_start();\n\t\t\t$atts = shortcode_atts( array(\n\t\t\t\t'args' => 'startup,events,products,slider',\n\t\t\t\t'colors' => '#31A8DF,#895691,#ffa500,#F26831',\n\t\t\t\t'pos' => 'left',\n\t\t\t\t'time' => 2000\n\t\t ), $atts );\n\n\t\t extract($atts);\n\n\t\t require_once( HHLIGHTS_INCLUDES_DIR.'/hhlights-shortcode.php' );\n\t\t return ob_get_clean(); \n\t\t\t\n\t\t}", "title": "" }, { "docid": "c81d0b42b664e2d11c7470aa45247648", "score": "0.65649664", "text": "public static function the_product_page_content( $post ){\n $product_template_id = $this->get_register_single_product_template();\n if( !empty($product_template_id) ){\n echo Plugin::$instance->frontend->get_builder_content_for_display( $product_template_id );\n }else{\n the_content();\n }\n\t}", "title": "" }, { "docid": "2b11aa91a28ba03f96c11a3db9ca82c5", "score": "0.6555841", "text": "function get_post_page_content( $atts ) {\r\n\textract( shortcode_atts( array(\r\n\t\t'id' => null,\r\n\t\t'title' => false,\r\n\t\t\t), $atts \r\n\t\t) \r\n\t);\r\n\r\n\t$the_query = new WP_Query( 'page_id='.$id );\r\n\twhile ( $the_query->have_posts() ) {\r\n\t\t$the_query->the_post();\r\n\t\tif($title == true){\r\n\t\t\tthe_title();\r\n\t\t}\r\n\t\t\tthe_content();\r\n\t\t}\r\n\twp_reset_postdata();\r\n\r\n}", "title": "" }, { "docid": "bb00a51a6567828e1036f6a989bf7734", "score": "0.6555601", "text": "function hyperindian_modify_post_content( $content ) {\n if ( is_singular() )\n return $content;\n\n // Return the excerpt() if it exists other truncate.\n if ( has_excerpt() )\n $content = '<p>' . get_the_excerpt() . '</p>';\n else\n $content = '<p>' . wp_trim_words( get_the_content(), 60, '...' ) . '</p>';\n\n // Return content and readmore.\n return $content . '<p>' . beans_post_more_link() . '</p>';\n}", "title": "" }, { "docid": "a33619a776449abb02b5c23d24b05f2e", "score": "0.65429145", "text": "function do_shortcode($content) {\n\t$this->shortcode_tags;\n\n\tif (empty($this->shortcode_tags) || !is_array($this->shortcode_tags))\n\t\treturn $content;\n\n\t$pattern = $this->get_shortcode_regex();\n\treturn preg_replace_callback( \"/$pattern/s\", array('ShortcodeComponent', 'do_shortcode_tag') , $content );\n}", "title": "" }, { "docid": "688e2acaa84b0a6a802f4ea6bb128961", "score": "0.6525708", "text": "function cp_add_content( $content ) {\n\t\t\tif( is_single() || is_page() ){\n\t\t\t\t$content_str_array = cp_display_style_inline();\n\t\t\t\t$content .= '<span class=\"cp-load-after-post\"></span>';\n\t\t\t\t$content = $content_str_array[0].$content;\n\t\t\t\t$content .= $content_str_array[1];\n\t\t\t}\n\t\t\treturn $content;\n\t\t}", "title": "" }, { "docid": "03ceb43a1904b203fca228a37c2442bb", "score": "0.6521351", "text": "function html5_shortcode_demo($atts, $content = null)\n{\n\treturn '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "6c249e1cf380311f32ecb8272db951c6", "score": "0.65194285", "text": "function the_content( $content ) {\n\t\t\tif ( is_page_template() ) {\n\t\t\t\treturn $content;\n\t\t\t}\n\t\t\t// Don't show on Stacked slides\n\t\t\tif ( get_post_type() == 'slide' ) {\n\t\t\t\treturn $content;\n\t\t\t}\n\n\t\t\tglobal $wp_current_filter;\n\t\t\tif ( in_array( 'get_the_excerpt', (array) $wp_current_filter ) ) {\n\t\t\t\treturn $content;\n\t\t\t}\n\n\t\t\t$options = get_option( 'zilla_likes_settings' );\n\t\t\tif ( ! isset( $options[ 'add_to_posts' ] ) ) {\n\t\t\t\t$options[ 'add_to_posts' ] = '0';\n\t\t\t}\n\t\t\tif ( ! isset( $options[ 'add_to_pages' ] ) ) {\n\t\t\t\t$options[ 'add_to_pages' ] = '0';\n\t\t\t}\n\t\t\tif ( ! isset( $options[ 'add_to_other' ] ) ) {\n\t\t\t\t$options[ 'add_to_other' ] = '0';\n\t\t\t}\n\t\t\tif ( ! isset( $options[ 'exclude_from' ] ) ) {\n\t\t\t\t$options[ 'exclude_from' ] = '';\n\t\t\t}\n\n\t\t\t$ids = explode( ',', $options[ 'exclude_from' ] );\n\t\t\tif ( in_array( get_the_ID(), $ids ) ) {\n\t\t\t\treturn $content;\n\t\t\t}\n\n\t\t\tif ( is_singular( 'post' ) && $options[ 'add_to_posts' ] ) {\n\t\t\t\t$content .= $this->do_likes();\n\t\t\t}\n\t\t\tif ( is_page() && ! is_front_page() && $options[ 'add_to_pages' ] ) {\n\t\t\t\t$content .= $this->do_likes();\n\t\t\t}\n\t\t\tif ( ( is_front_page() || is_home() || is_category() || is_tag() || is_author() || is_date() || is_search() ) && $options[ 'add_to_other' ] ) {\n\t\t\t\t$content .= $this->do_likes();\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "title": "" }, { "docid": "eb375afea095bcea81115a46cdd297e0", "score": "0.65093285", "text": "function neat_post_format_content() {\r\n\t\tglobal $post;\r\n\t\tif( !isset( $post->ID ) )\r\n\t\t\treturn;\r\n\t\t$post_format\t=\tget_post_format( $post->ID );\r\n\t\t\r\n\t\tswitch ( $post_format ) {\r\n\t\t\tcase 'video':\r\n\t\t\t\t$content = get_post_meta( $post->ID, '_format_video_embed', true );\r\n\t\t\t\tif( $content ):\r\n\t\t\t\t?>\t\r\n\t\t\t\t\t<div class=\"media\">\r\n\t\t\t\t\t\t<div class=\"fitvids\">\r\n\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t * mediapress_media action.\r\n\t\t\t\t\t\t\t * hooked mediapress_get_media_object, 10, 1\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tdo_action( 'mediapress_media', get_the_ID() );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<?php do_action( 'mediapress_media_pagination', get_the_ID() );?>\r\n\t\t\t\t\t<?php do_action( 'mediapress_toolkit' );?>\r\n\t\t\t\t<?php endif;\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'audio':\r\n\t\t\t\t$content = get_post_meta( $post->ID, '_format_audio_embed', true );\r\n\t\t\t\tif( $content ):\r\n\t\t\t\t?>\r\n\t\t\t\t\t<div class=\"media\">\r\n\t\t\t\t\t\t<div class=\"fitvids\">\r\n\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t * mediapress_media action.\r\n\t\t\t\t\t\t\t * hooked mediapress_get_media_object, 10, 1\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tdo_action( 'mediapress_media', get_the_ID() );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<?php do_action( 'mediapress_media_pagination', get_the_ID() );?>\r\n\t\t\t\t\t<?php do_action( 'mediapress_toolkit' );?>\r\n\t\t\t\t<?php endif;\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'gallery':\r\n\t\t\t\t$content = get_post_meta( $post->ID, '_format_gallery_images', true );\r\n\t\t\t\tif( $content && is_array( $content ) ):\t\t\t\t\r\n\t\t\t\t?>\r\n\t\t\t\t<div class=\"media\">\r\n\t\t\t\t\t<div id=\"showcase-slider\" class=\"owl-carousel owl-theme\"> \r\n\t\t\t\t\t \t<?php for ($i = 0; $i < count( $content ); $i++):?>\r\n\t\t\t\t\t \t\t<?php \r\n\t\t\t\t\t \t\t/**\r\n\t\t\t\t\t \t\t * hooked neat_single_post_thumbnail_size, 10, 1\r\n\t\t\t\t\t \t\t * @var unknown_type\r\n\t\t\t\t\t \t\t */\r\n\t\t\t\t\t \t\t$src = wp_get_attachment_image_src($content[$i], apply_filters( 'neat_single_post_thumbnail_size' , 'large') );\r\n\t\t\t\t\t \t\t?>\r\n\t\t\t\t\t \t\t<div class=\"item\"><img src=\"<?php print $src[0];?>\" alt=\"Slider Image 1\"></div>\r\n\t\t\t\t\t \t<?php endfor;?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\t\t\t\t\r\n\t\t\t\t<?php \t\r\n\t\t\t\tendif;\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'quote':\r\n\t\t\t\tglobal $post;\r\n\t\t\t\t$source_name = get_post_meta( $post->ID, '_format_quote_source_name', true ) ? get_post_meta( $post->ID, '_format_quote_source_name', true ) : null;\r\n\t\t\t\t$source_url = get_post_meta( $post->ID, '_format_quote_source_url', true ) ? get_post_meta( $post->ID, '_format_quote_source_url', true ) : null;\r\n\t\t\t\t?>\r\n\t\t\t\t\t<div class=\"media\">\r\n\t\t\t\t\t\t<div class=\"quote-format\">\r\n\t\t\t\t\t\t\t<blockquote cite=\"<?php print $source_url;?>\">\r\n\t\t\t\t\t\t\t\t<?php print wp_filter_nohtml_kses( $post->post_content );?>\r\n\t\t\t\t\t\t\t\t<?php if( !empty( $source_name ) ):?><cite><?php print $source_name;?></cite><?php endif;?>\r\n\t\t\t\t\t\t\t</blockquote>\r\n\t\t\t\t\t\t</div>\t\r\n\t\t\t\t\t</div>\t\t\t\r\n\t\t\t\t<?php \r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'image':\r\n\t\t\t\tif( has_post_thumbnail( $post->ID ) ):\r\n\t\t\t\t?>\r\n\t\t\t\t\t<div class=\"media\">\r\n\t\t\t\t\t\t<?php print get_the_post_thumbnail( $post->ID, apply_filters( 'neat_single_post_thumbnail_size' , 'large') );?>\r\n\t\t\t\t\t</div>\t\t\t\t\r\n\t\t\t\t<?php \r\n\t\t\t\tendif;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "51ffbfc3de898345f673d30ab61db548", "score": "0.6502013", "text": "function blog_post_shortcode($atts){\n\textract( shortcode_atts( array(\n\t\t'title' => '',\n\t\t'link' => '',\n\t\t\n\t), $atts, 'blog_post' ) );\n\t\n $q = new WP_Query(\n array( 'posts_per_page' => '3', 'post_type' => 'post')\n );\n$list = '<div class=\"blog_post single floatright\"><h2 class=\"blog_title\">'.$title.'</h2><a href=\"'.$link.'\" class=\"blog_more\" >More</a>';\n\nwhile($q->have_posts()) : $q->the_post();\n //get the ID of your post in the loop\n $id = get_the_ID();\n\n $post_excerpt = get_post_meta($id, 'post_excerpt', true); \n\t$post_thumbnail= get_the_post_thumbnail( $post->ID, 'gallery-thumbnail' ); \n $list .= '\n\t\n\t\n\t\t\t\t\t<div class=\"single_blog\">\n\t\t\t\t\t\t<a href=\"'.get_permalink().'\">'.$post_thumbnail.'</a>\n\t\t\t\t\t\t<a href=\"'.get_permalink().'\">'.get_the_title().'</a>\n\t\t\t\t\t\t<p>'.get_the_excerpt('30').'</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t'; \nendwhile;\n$list.= '</div>';\nwp_reset_query();\nreturn $list;\n}", "title": "" }, { "docid": "f2de4047f85e1477533d7b6a9f45be78", "score": "0.64912534", "text": "public function get_the_content( $content ) {\n\n global $post;\n\n $settings = O3PO_Settings::instance();\n\n $post_id = $post->ID;\n $post_type = get_post_type($post_id);\n\n if ( get_post_type($post_id) === $this->get_publication_type_name() ) {\n $old_content = $content;\n $doi = $this->get_doi($post_id);\n $authors = $this->get_formated_authors($post_id);\n $type = get_post_meta( $post_id, $post_type . '_type', true );\n $number_target_dois = get_post_meta( $post_id, $post_type . '_number_target_dois', true );\n $target_dois = $this->get_post_meta_field_containing_array( $post_id, $post_type . '_target_dois');\n $number_authors = get_post_meta( $post_id, $post_type . '_number_authors', true );\n $author_given_names = $this->get_post_meta_field_containing_array( $post_id, $post_type . '_author_given_names');\n $author_surnames = $this->get_post_meta_field_containing_array( $post_id, $post_type . '_author_surnames');\n $author_urls = $this->get_post_meta_field_containing_array( $post_id, $post_type . '_author_urls');\n $author_affiliations = $this->get_post_meta_field_containing_array( $post_id, $post_type . '_author_affiliations');\n $affiliations = $this->get_post_meta_field_containing_array( $post_id, $post_type . '_affiliations');\n $citation = rtrim($this->get_formated_citation($post_id), '.');\n $journal = get_post_meta( $post_id, $post_type . '_journal', true );\n\n $content = '';\n $content .= '<header class=\"entry-header\">';\n if($settings->get_plugin_option('page_template_for_publication_posts')==='checked')\n $content .= '<h1 class=\"entry-title title citation_title\"><a href=\"#\">' . esc_html ( get_the_title( $post_id ) ) . '</a></h1>';\n\n if ( has_post_thumbnail( ) ) {\n $content .= '<img src=\"' . get_the_post_thumbnail_url($post_id) . '\" alt=\"\" width=\"300\" height=\"150\" class=\"alignright size-medium wp-image-1433\">';\n }\n\n $content .= $this->lead_in_paragraph($post_id);\n\n $all_authors_have_same_affiliation = true;\n if ( !empty($author_affiliations) ) {\n foreach($author_affiliations as $author_affiliation) {\n if( $author_affiliation !== end($author_affiliations) ) {\n $all_authors_have_same_affiliation = false;\n break;\n }\n }\n }\n\n $content .= \"<p><strong>By\";\n for ($x = 0; $x < $number_authors; $x++) {\n if( !empty($author_urls[$x]))\n $content .= ' <a href=\"' . $author_urls[$x] . '\">' . $author_given_names[$x] . ' ' . $author_surnames[$x] . '</a>';\n else\n $content .= ' ' . $author_given_names[$x] . ' ' . $author_surnames[$x];\n if( !$all_authors_have_same_affiliation && !empty($author_affiliations) && !empty($author_affiliations[$x]) )\n {\n $content .= ' (';\n $this_authors_affiliations = preg_split('/\\s*,\\s*/u', $author_affiliations[$x], -1, PREG_SPLIT_NO_EMPTY);\n $this_authors_affiliations_count = count($this_authors_affiliations);\n foreach($this_authors_affiliations as $y => $affiliation_num)\n {\n $content .= $affiliations[$affiliation_num-1];\n if( $y < $this_authors_affiliations_count-1 and $this_authors_affiliations_count > 2) $content .= \",\";\n if( $y < $this_authors_affiliations_count-1 ) $content .= \" \";\n if( $y === $this_authors_affiliations_count-2 ) $content .= \"and \";\n }\n $content .= ')';\n }\n if( $x < $number_authors-1 and $number_authors > 2) $content .= \",\";\n if( $x < $number_authors-1 ) $content .= \" \";\n if( $x === $number_authors-2 ) $content .= \"and \";\n }\n if(!empty($affiliations) && !empty(end($affiliations)) && $all_authors_have_same_affiliation && !empty($author_affiliations) ) {\n $this_authors_affiliations = preg_split('/\\s*,\\s*/u', $author_affiliations[0], -1, PREG_SPLIT_NO_EMPTY);\n $this_authors_affiliations_count = count($this_authors_affiliations);\n if($this_authors_affiliations_count > 0)\n {\n $content .= ' (';\n foreach($this_authors_affiliations as $y => $affiliation_num)\n {\n $content .= $affiliations[$affiliation_num-1];\n if( $y < $this_authors_affiliations_count-1 and $this_authors_affiliations_count > 2) $content .= \",\";\n if( $y < $this_authors_affiliations_count-1 ) $content .= \" \";\n if( $y === $this_authors_affiliations_count-2 ) $content .= \"and \";\n }\n $content .= ')';\n }\n }\n $content .= \".</strong></p>\\n\";\n\n $content .= '<table class=\"meta-data-table\">';\n $content .= '<tr><td>Published:</td><td>' . esc_html($this->get_formated_date_published( $post_id )) . ', ' . $this->get_formated_volume_html($post_id) . ', page ' . get_post_meta( $post_id, $post_type . '_pages', true ) . '</td></tr>';\n $content .= '<tr><td>Doi:</td><td><a href=\"' . esc_attr($this->get_journal_property('doi_url_prefix') . $doi) . '\">' . esc_html($this->get_journal_property('doi_url_prefix') . $doi ) . '</a></td></tr>';\n $content .= '<tr><td>Citation:</td><td>' . esc_html($citation) . '</td></tr>';\n $content .= '</table>';\n\n $content .= '<div class=\"publication-action-buttons\">';\n /* $content .= '<form action=\"javascript:if(window.print)window.print()\" method=\"post\"><input style=\"display:none;\" id=\"print-btn\" type=\"submit\" value=\"print page\"></form>'; */\n $content .= '<button id=\"print-btn\" style=\"display:none;\" class=\"btn-theme-primary pirate-forms-submit-button\" type=\"submit\" onclick=\"if(window.print)window.print()\">Print page</button>';\n $content .= '</div>';\n\n $content .= '<script type=\"text/javascript\">document.getElementById(\"print-btn\").style.display = \"inline-block\";</script>';//show button only if browser supports java script\n $content .= '</header>';\n\n $bbl = get_post_meta( $post_id, $post_type . '_bbl', true );\n $content .= O3PO_Latex::expand_cite_to_html($old_content, $bbl);\n\n if($type===\"Leap\")\n {\n $content .= $this->get_reviewers_summary_html($post_id);\n $content .= $this->get_reviewers_html($post_id);\n $content .= $this->get_author_commentary_html($post_id);\n }\n\n $content .= $this->get_bibtex_html($post_id);\n $content .= $this->get_bibliography_html($post_id);\n $content .= $this->get_cited_by($post_id);\n $content .= $this->get_license_information($post_id);\n return $content;\n }\n else\n return $content;\n }", "title": "" }, { "docid": "1db1e9611ca052a1d8cf3aec13e76f51", "score": "0.6483207", "text": "function add_dashboard_content() {\n\t$page = get_post( get_option( 'page_for_posts' ) );\n\n\tif ( ! $page ) {\n\t\treturn;\n\t}\n\n\t$content = wp_kses_post( $page->post_content );\n\t$content = do_shortcode( $content );\n\tinclude( CHILD_THEME_DIR . '/lib/views/dashboard.php' );\n}", "title": "" }, { "docid": "f55402386cf34251990ffdda27bce4d2", "score": "0.64766246", "text": "public function displayContent() {\n\n \t$html = '<h1 class=\"pageHeader\">'.$this -> pageInfo['pageHeading'].'</h1>'.\"\\n\";\n \n $html .= '<section>'.\"\\n\";\n \n $html .= '<aside>'.\"\\n\";\n $html .= '</aside>'.\"\\n\";\n \n \n $html .= '<div id=\"pageContent\">'.\"\\n\";\n\n if($_SESSION['userType'] != 'admin') {\n \t$html .= '<p class=\"error\">You do not have access to this page</p>'.\"\\n\";\n \t $html .= '</div>'.\"\\n\";\n \t $html .= '</section>'.\"\\n\";\n \t return $html;\n }\n\n if($_POST['submit'] == 'Update Post') {\n \t$edit = $this -> model -> processEditPost();\n\n if($edit['ok'] = true) {\n header('Location: index.php?page=news');\n } else {\n $msg = $edit['msg'];\n }\n }\n\n $item = $this -> model -> getNewsItem($_GET['id']);\n\n //print_r($_POST);\n //print_r($item);\n \n $html .= '<article class=\"news-item\">'.\"\\n\";\n $html .= '<h1>'.$item['postTitle'].'</h1>'.\"\\n\";\n $html .= '<p class=\"error\">'.$msg.'</p>'.\"\\n\";\n \n // Determine what type of media is being displayed\n if($item['postMediaType'] == 'image') {\n $html .= '<img src=\"images/news/'.$item['postMedia'].'\" alt=\"'.$item['postTitle'].'\" />'.\"\\n\";\n } elseif($item['postMediaType'] == 'video') {\n\n if($this -> model -> device == 'desktop') {\n $html .= '<iframe class=\"no-mobile\" src=\"http://www.youtube.com/embed/'.$item['postMedia'].'\" allowfullscreen></iframe>'.\"\\n\";\n } else {\n $html .= '<a href=\"http://www.youtube.com/watch?v='.$item['postMedia'].'\" target=\"blank\"><img src=\"http://img.youtube.com/vi/'.$item['postMedia'].'/0.jpg\" alt=\"'.$item['postTitle'].'\"/></a>';\n }\n } elseif($item['postMediaType'] == 'pdf') {\n $html .= '<p class=\"document\" ><a href=\"files/pdfs/'.$item['postMedia'].'\" target=\"blank\">Click here to download the PDF document</a></p>'.\"\\n\";\n } elseif($item['postMediaType'] == 'plain') {\n $html .= ''.\"\\n\";\n }\n $html .= '</article>'.\"\\n\";\n \n $html .= '<form method=\"post\" action=\"'.htmlentities($_SERVER['REQUEST_URI']).'\">'.\"\\n\";\n $html .= '<input type=\"hidden\" name=\"postID\" value=\"'.$_GET['id'].'\" />'.\"\\n\";\n $html .= '<input class=\"long\" type=\"text\" name=\"postTitle\" id=\"postTitle\" placeholder=\"Post Name\" value=\"'.htmlentities(stripslashes($item['postTitle'])).'\"/>'.\"\\n\";\n $html .= '<p id=\"postNameMsg\" class=\"error\">'.$edit['postTitle'].'</p>'.\"\\n\";\n\n\n $html .= '<textarea class=\"long\" name=\"postContent\" rows=\"7\" cols=\"20\" placeholder=\"Content\">'.htmlentities(stripslashes($item['postContent'])).'</textarea>'.\"\\n\";\n $html .= '<p class=\"error\">'.$edit['postContent'].'</p>'.\"\\n\";\n\n $html .= '<input type=\"submit\" class=\"submitButton\" name=\"submit\" value=\"Update Post\"/>'.\"\\n\";\n\n $html .= '</form>'.\"\\n\";\n\n \n $html .= '</div>'.\"\\n\";\n $html .= '</section>'.\"\\n\";\n\n return $html;\n\n\n\n\n\t}", "title": "" }, { "docid": "bec5cd44bbf5661a8d2b552ca1346d32", "score": "0.64588237", "text": "function asma_add_content($content){\n global $post;\n $post_id = $post->ID;\n if(get_field('short_description',$post_id)){\n $short = '<div class=\"short-desc\"><h4>Short Description</h4>' . get_field('short_description',$post_id) . '</div>'; \n }\n $full = asma_get_full_description($post);\n $hours = asma_get_houres($post);\n $start = asma_get_start_date($post);\n $end = asma_get_start_date($post);\n $instructor = asma_get_instructor($post);\n $admin = asma_get_admin($post);\n $enrollment = asma_get_enrollment($post);\n $status = asma_get_status($post);\n $cost = asma_get_cost($post);\n $schema = asma_get_schema($post);\n $target = asma_get_target_group($post);\n return $full . $short . $start . $end . $hours . $instructor . $admin . $enrollment . $status . $cost . $target . $schema . $content;\n}", "title": "" }, { "docid": "5d250c69ac1c46cac8d79871c0caf61e", "score": "0.64382184", "text": "function frack_page_content() {\n ?>\n <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>\n\n <?php if ( has_post_thumbnail() ) { ?>\n <style type=\"text/css\" media=\"all\"> #content { background: url(\"<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>\") no-repeat; } </style>\n <?php } ?>\n\n <article class=\"post\" role=\"article\">\n <header class=\"post-header\">\n <h1 class=\"post-title\">\n <a href=\"<?php the_permalink(); ?>\" rel=\"bookmark\" title=\"<?php the_title_attribute(); ?>\">\n <?php the_title(); ?>\n </a>\n </h1>\n </header>\n\n <div class=\"post-content\">\n <?php the_content(); ?>\n </div>\n </article>\n <?php endwhile; ?>\n <?php else : ?>\n <p>There has been an error. Please try again later.</p>\n <?php endif; ?>\n <?php\n}", "title": "" }, { "docid": "aa6854c73bcffaa532483b51abfbd31f", "score": "0.64204186", "text": "public function the_content() {\n\n\t\t// Extra cap check just for fun.\n\t\tif ( ! \\wpforms_current_user_can() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$content = esc_html__( 'This is a preview of your form. This page is not publicly accessible.', 'wpforms-lite' );\n\n\t\tif ( ! empty( $_GET['new_window'] ) ) { // phpcs:ignore\n\t\t\t$content .= ' <a href=\"javascript:window.close();\">' . esc_html__( 'Close this window', 'wpforms-lite' ) . '.</a>';\n\t\t}\n\n\t\t$content .= do_shortcode( '[wpforms id=\"' . absint( $this->form_data['id'] ) . '\"]' );\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "ad1d23b839bda617fea139e88b823b80", "score": "0.64033675", "text": "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "ad1d23b839bda617fea139e88b823b80", "score": "0.64033675", "text": "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "d7eae0a19d689033b4b32a108da12b41", "score": "0.63926643", "text": "function __2c_add_post_content($content) {\n\tif(!is_feed() && !is_home()) {\n\t\t$content .= '<p>This article is copyright &copy; '.date('Y').'&nbsp;'.bloginfo('name').'</p>';\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "f3fea77d283590b18174de311e25c982", "score": "0.63812685", "text": "function tve_do_wp_shortcodes( $content, $is_editor_page = false ) {\n\tif ( ! $is_editor_page ) {\n\t\t$content = tve_do_custom_content_shortcodes( $content );\n\t}\n\n\t$allowed_shortcodes = apply_filters( 'tcb_content_allowed_shortcodes', [], $is_editor_page );\n\n\tif ( ! empty( $allowed_shortcodes ) ) {\n\t\t$pattern = get_shortcode_regex( $allowed_shortcodes );\n\t\t$content = preg_replace_callback( \"/$pattern/\", 'do_shortcode_tag', $content );\n\t}\n\n\tlist( $start, $end ) = array(\n\t\t'___TVE_SHORTCODE_RAW__',\n\t\t'__TVE_SHORTCODE_RAW___',\n\t);\n\tif ( strpos( $content, $start ) === false ) {\n\t\treturn $content;\n\t}\n\tif ( ! preg_match_all( \"/{$start}((<p>)?(.+?)(<\\/p>)?){$end}/s\", $content, $matches, PREG_OFFSET_CAPTURE ) ) {\n\t\treturn $content;\n\t}\n\n\t$position_delta = 0;\n\tforeach ( $matches[1] as $i => $data ) {\n\t\t$raw_shortcode = $data[0]; // the actual matched regexp group\n\t\t$position = $matches[0][ $i ][1] + $position_delta; //the index at which the whole group starts in the string, at the current match\n\t\t$whole_group = $matches[0][ $i ][0];\n\n\t\t$raw_shortcode = html_entity_decode( $raw_shortcode );//we keep the code encoded and now we need to decode\n\n\t\t$replacement = tcb_render_wp_shortcode( $raw_shortcode );\n\n\t\t$replacement = ( $is_editor_page ? $whole_group : '' ) . ( '</div><div class=\"tve_shortcode_rendered\">' . $replacement );\n\t\t$content = substr_replace( $content, $replacement, $position, strlen( $whole_group ) );\n\t\t/* increment the positioning offsets for the string with the difference between replacement and original string length */\n\t\t$position_delta += strlen( $replacement ) - strlen( $whole_group );\n\t}\n\n\treturn $content;\n}", "title": "" }, { "docid": "35311d19165d624d5c6d7e7e7462259a", "score": "0.6379584", "text": "function wbp_the_content($content)\n{\n global $post;\n\n if ($post->post_type == 'sp_team') {\n ob_start();\n get_template_part('template-parts/elements/team', 'single-header');\n $header = ob_get_clean();\n\n $content = $header . $content;\n\n ob_start();\n wbp_news_widget();\n $widget = ob_get_clean();\n\n $content .= $widget;\n }\n return $content;\n}", "title": "" }, { "docid": "095337c8717578b6a0867964102fc6d3", "score": "0.63794625", "text": "public function display_content();", "title": "" }, { "docid": "d59d83449101d2cb518c21dc1cfe4a46", "score": "0.63787454", "text": "function custom_shortcode($atts, $content = null)\n{\n return '<div class=\"custom-shortcode\">' . do_shortcode($content) . '</div>';\n}", "title": "" }, { "docid": "2c19052fc97d87c853e3bc63238d59b8", "score": "0.63783723", "text": "public function display_content() {\n\t\tif ( $this->has_tabs() ) {\n\t\t\t$html = '<div id=\"%1$s\" class=\"wpseo-meta-section\">';\n\t\t\t$html .= '<div class=\"wpseo-metabox-tabs-div\">';\n\t\t\t$html .= '<ul class=\"wpseo-metabox-tabs %2$s\">%3$s</ul>%4$s';\n\t\t\t$html .= '</div></div>';\n\n\t\t\tprintf(\n\t\t\t\t$html,\n\t\t\t\tesc_attr( 'wpseo-meta-section-' . $this->name ),\n\t\t\t\tesc_attr( 'wpseo-metabox-tab-' . $this->name ),\n\t\t\t\t$this->tab_links(),\n\t\t\t\t$this->tab_content()\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "014b15e655478ef83672dce8ef65be82", "score": "0.63660794", "text": "public function displayContent()\n\t{\n\t\techo $this->contentHTML;\n\t}", "title": "" }, { "docid": "510dee0b8215ceed3a91e230c95c2821", "score": "0.6365419", "text": "public static function content($atts, $content = null, $base = '') {\n\n //Get Context\n $data = Timber::get_context();\n\n //Handle default values\n $atts = shortcode_atts([\n 'title' => '', \n 'description' => ''\n ], $atts);\n\n //Get the title\n $data['title'] = $atts['title'];\n\n //Get the content\n $data['description'] = self::decode($atts['description']);\n\n //Render\n return self::renderView('views/widgets/WPBakeryShortCode_lame_sample.twig', $data);\n }", "title": "" }, { "docid": "4b516612bec94f6ce3c7bc09a1156aa7", "score": "0.6358408", "text": "function welcome_post_shortcode($atts){\n\textract( shortcode_atts( array(\n\t\t'title' => '',\n\t\t'link' => '',\n\t\t\n\t), $atts, 'about_me' ) );\n\t\n $q = new WP_Query(\n array( 'posts_per_page' => '1', 'post_type' => 'welcome-message')\n );\n$list = '<div class=\"about_me single floatleft\"><h2 class=\"about_me_title\">'.$title.'</h2><a href=\"'.$link.'\" class=\"me_more\" >More</a>';\n\nwhile($q->have_posts()) : $q->the_post();\n //get the ID of your post in the loop\n $id = get_the_ID();\n\n\n\t$post_thumbnail= get_the_post_thumbnail( $post->ID, 'my-thumbnail' ); \n $list .= '\n\t\n\t'.$post_thumbnail.'\n\t<p>'.get_the_content().'</p>\t\t\t\t\t\n\t\t\t\t\t\t\n\t'; \nendwhile;\n$list.= '</div>';\nwp_reset_query();\nreturn $list;\n}", "title": "" }, { "docid": "d58276320f5e34c143af65f2a9d79a75", "score": "0.63350904", "text": "function display_content() {\n $content_object = $this->get_object();\n $display = ContentObjectDisplay :: factory($content_object);\n $DESCRIPTION = $display->get_description();\n\n $html = array();\n $children = $this->get_children();\n foreach ($children as $coid => $child) {\n $html[] = $this->display_child($child, $coid);\n }\n $CHILDREN = implode(StringUtilities::NEW_LINE, $html);\n\n $result = $this->get_content_template();\n return $this->process_template($result, get_defined_vars());\n }", "title": "" }, { "docid": "202da2b3902f8801ca56eb7ce5779a11", "score": "0.6326317", "text": "function tdshortcode_blogpost( $atts, $content = null) {\n\n\textract( shortcode_atts(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => '',\n\t\t\t\t\t'category' => '',\n\t\t\t\t\t'number' => '10',\n\t\t\t\t\t'words' => '55',\n\t\t\t\t\t'count' => '55',\n\t\t\t\t\t'orderby' => 'date',\n\t\t\t\t\t'image' => 'thumbnail',\n\t\t\t\t\t'showmeta' => 'yes',\n\t\t\t\t\t'titleicon' => ''\n\t\t\t\t), $atts)\n\t\t\t);\n\n\t$output = '';\n\n\tif($titleicon != ''){\n\t\t$icontag = tds_get_fontawsomeicontag($titleicon) . '&nbsp;';\n\t}else {\n\t\t$icontag = '';\n\t}\n\n\tif ( $title ) {\n\t\t$output .= '<h4>' .$icontag. $title . '</h4>';\n\t}\n\n\tif ( $category == '' || $category == 'all' ) {\n\t\t$args = array( 'category_name' => '');\n\t} else {\n\t\t$args = array( 'category_name' => $category );\n\t}\n\n\tif ( $orderby == 'random' ) {\n\t\t$orderby = 'rand';\n\t} elseif ( $orderby == 'popular' ) {\n\t\t$orderby = 'comment_count';\n\t} else {\n\t\t$orderby = 'date';\n\t}\n\n\t$words = (int) $count;\n\n\tif ( ! $image )\n\t\t$image = \"large\";\n\n\t$queryargs = array(\n\t\t'posts_per_page' \t\t=> $number,\n\t\t'no_found_rows' \t\t=> true,\n\t\t'post_status' \t\t=> 'publish',\n\t\t'ignore_sticky_posts' \t=> true,\n\t\t'order' \t\t\t=> 'desc',\n\t\t'orderby' \t\t\t=> $orderby\n\t);\n\n\t$queryargs = array_merge( $queryargs, $args );\n\n\n\t$r = new WP_Query( apply_filters( 'tdshortcode_latestpost_args', $queryargs, $atts ) );\n\n\n\tif ($r->have_posts()) {\n\n\t\t$output .= '<ul class=\"tds_postWidget_posts\">';\n\n\t\twhile ( $r->have_posts() ) {\n\n\t\t\t$r->the_post();\n\n\t\t\t$output .= '<li class=\"item-entry\">';\n\n\t\t\tif( has_post_thumbnail() ){\n\t\t\t\t$output .= get_the_post_thumbnail( null, $image, array( 'class' => $image . ' thumbs left-align' ) );\n\t\t\t}\n\n\t\t\t$output .= '<h4><a class=\"post-title\" href=\"' . get_permalink() . '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</a></h4><div class=\"item\">';\n\n\t\t\t$output .= '<div class=\"tds_postWidget_meta\">';\n\n\t\t\t$num_comments = get_comments_number();\n\n\t\t\tif ( $num_comments == 0 ) {\n\t\t\t\t$comments = '<span class=\"num\">0</span> ';\n\t\t\t} elseif ( $num_comments > 1 ) {\n\t\t\t\t$comments = '<span class=\"num\">' . $num_comments . '</span>';\n\t\t\t} else {\n\t\t\t\t$comments = '<span class=\"num\">1</span> ';\n\t\t\t}\n\n\t\t\tif ($showmeta == 'yes' ) {\n\t\t\t\t$output .= '<span>' . get_the_date() . '</span> <span class=\"sep\"> | </span> <span>'.tds_get_fontawsomeicontag('user').' <a href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ).'\">' . get_the_author() . '</a></span> ';\n\n\t\t\t\t$output .= ' <span class=\"sep\"> | </span> '.tds_get_fontawsomeicontag('comments').' <a href=\"' . get_comments_link() .'\"><span class=\"comment\">'. $comments.'</span></a>';\n\t\t\t}\n\n\t\t\t$output .= '</div><p>' . tdshortcodes_limited_excerpt($words) . ' </p>';\n\t\t\t$output .= '<div class=\"title-row\"></div>';\n\n\t\t\t$output .= '<div class=\"tds_postWidget_meta\">';\n\t\t\t$output .= '<a class=\"button small alignright\" href=\"' . get_permalink() . '\"><i class=\"fa fa-plus-circle\"></i> ' . __( ' Read more', 'tdshortcodes' ).'</a>';\n\n\t\t\tif ( $showmeta == 'yes' ) {\n\t\t\t\t$category = get_the_category();\n\n\t\t\t\tif($category[0]){\n\t\t\t\t\t$output .= tds_get_fontawsomeicontag('bookmark').' <a class=\"cat\" href=\"' . get_category_link( $category[0]->term_id ) . '\">' . $category[0]->cat_name . '</a> ';\n\t\t\t\t}\n\n\t\t\t\t$tags = get_the_tag_list( '',',','' );\n\n\t\t\t\tif ( $tags ) {\n\t\t\t\t\t$output .= '<br/> '.tds_get_fontawsomeicontag('tags'). $tags;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$output .= '</div></div>';\n\n\t\t\t$output .= '</li>';\n\t\t}\n\n\t\t$output .= '</ul>';\n\t\t$output .= '<script type=\"text/javascript\" src=\"' . TDS_PLUGIN_URL . 'js/tdac-slider.js\"></script>';\n\n\t} else {\n\t\t$output .= '<p>' . __( 'No posts found.', 'tdshortcodes' ) . '</p>';\n\t}\n\n\t// Reset the global $the_post as this query will have stomped on it\n\twp_reset_postdata();\n\n\n\treturn $output;\n\n}", "title": "" }, { "docid": "6e2c9eb652e0a5181d9c7bc580852a76", "score": "0.62813705", "text": "function document_shortcode( $atts, $content = null ) {\n extract( shortcode_atts( array( 'titre' => ''), $atts ) );\n\treturn '<div class=\"document\">\n <h3 class=\"document__title\">' . $titre . '</h3>\n <div class=\"document__content\">' . $content . '</div>\n </div>';\n}", "title": "" }, { "docid": "f2606723838cd9cfb088447aca7d23b7", "score": "0.62702256", "text": "function my_the_content( $more_link_text = null, $strip_teaser = false) {\r\n $content = get_the_content( $more_link_text, $strip_teaser );\r\n $content = apply_filters( 'the_content', $content );\r\n $content = str_replace( ']]>', ']]&gt;', $content );\r\n return $content;\r\n }", "title": "" }, { "docid": "6be00bef655c938bc94432b42f37e8e5", "score": "0.62559986", "text": "function wtm_latest_posts_shortcode( $atts, $content = '' ) {\n\textract( shortcode_atts( array(\n\t\t'title' => 'Latest blog',\n\t\t'viewall_url' => 'blog',\n\t\t'post_count' => 3\n\t), $atts ) );\n\n\t$out = sprintf(\n\t\t'<h3 class=\"blue\">%s</h3>\n\t <div class=\"viewall\">\n\t <a href=\"%s\">View all</a>\n\t </div>',\n\t\t$title,\n\t\t$viewall_url\n\t);\n\n\t$out .= '<div class=\"homepage_slider_section\">';\n\n\t$out .= latest_posts_slides( $post_count );\n\n\t$out .= '</div>';\n\n\treturn $out;\n}", "title": "" }, { "docid": "beb2d7e48f320f8eba6ae8d6facc98cf", "score": "0.6243459", "text": "function zig_fetch_welcomenote($id){\n\n $tlset = get_option( 'tlset' );\n $bt = get_post($id);\n $imgurl = wp_get_attachment_image_src(get_post_thumbnail_id($id),'full', true);\n $op = /* '<div class=\"carouselspaceholder\" style=\"height: 40px;\">&nbsp;</div> */ '<div class=\"welcomemsg\" ><div class=\"row\">';\n\n /* $op .= '<h3 class=\"cro_accent\">' . $bt->post_title . '</h3>'; */\n\n $op .= '<p class=\"cro_accent zig\">' . do_shortcode( $bt->post_content ) . '</p>';\n\n $op .= '</div></div>';\n\n\n return $op;\n}", "title": "" }, { "docid": "3cad0ebf1e5b017e011f66baec896652", "score": "0.6242665", "text": "function get_content() {\r\n\r\n /* ----------------------------------------------------------------------------\r\n Prepare the content\r\n */\r\n $content = get_the_content(__td('Continue', TD_THEME_NAME));\r\n $content = apply_filters('the_content', $content);\r\n $content = str_replace(']]>', ']]&gt;', $content);\r\n\r\n\r\n\r\n /** ----------------------------------------------------------------------------\r\n * Smart list support. class_exists and new object WORK VIA AUTOLOAD\r\n * @see td_autoload_classes::loading_classes\r\n */\r\n //$td_smart_list = get_post_meta($this->post->ID, 'td_smart_list', true);\r\n $td_smart_list = get_post_meta($this->post->ID, 'td_post_theme_settings', true);\r\n if (!empty($td_smart_list['smart_list_template'])) {\r\n\r\n $td_smart_list_class = $td_smart_list['smart_list_template'];\r\n if (class_exists($td_smart_list_class)) {\r\n /**\r\n * @var $td_smart_list_obj td_smart_list\r\n */\r\n $td_smart_list_obj = new $td_smart_list_class(); // make the class from string * magic :)\r\n\r\n // prepare the settings for the smart list\r\n $smart_list_settings = array(\r\n 'post_content' => $content,\r\n 'counting_order_asc' => false,\r\n 'td_smart_list_h' => 'h3',\r\n 'extract_first_image' => td_api_smart_list::get_key($td_smart_list_class, 'extract_first_image')\r\n );\r\n\r\n if (!empty($td_smart_list['td_smart_list_order'])) {\r\n $smart_list_settings['counting_order_asc'] = true;\r\n }\r\n\r\n if (!empty($td_smart_list['td_smart_list_h'])) {\r\n $smart_list_settings['td_smart_list_h'] = $td_smart_list['td_smart_list_h'];\r\n }\r\n return $td_smart_list_obj->render_from_post_content($smart_list_settings);\r\n } else {\r\n // there was an error?\r\n td_util::error(__FILE__, 'Missing smart list: ' . $td_smart_list_class . '. Did you disabled a tagDiv plugin?');\r\n }\r\n }\r\n /* ----------------------------------------------------------------------------\r\n end smart list - if we have a list, the function returns above\r\n */\r\n\r\n\r\n\r\n\r\n /* ----------------------------------------------------------------------------\r\n ad support on content\r\n */\r\n\r\n //read the current ad settings\r\n $tds_inline_ad_paragraph = td_util::get_option('tds_inline_ad_paragraph');\r\n $tds_inline_ad_align = td_util::get_option('tds_inline_ad_align');\r\n\r\n\r\n //add the inline ad\r\n if (td_util::is_ad_spot_enabled('content_inline') and is_single()) {\r\n\r\n if (empty($tds_inline_ad_paragraph)) {\r\n $tds_inline_ad_paragraph = 0;\r\n }\r\n\r\n $cnt = 0;\r\n $content_buffer = ''; // we replace the content with this buffer at the end\r\n\r\n $content_parts = preg_split('/(<p.*>)/U', $content, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\r\n\r\n $p_open_tag_count = 0; // count how many <p> tags we have added to the buffer\r\n foreach ($content_parts as $content_part_index => $content_part_value) {\r\n if (!empty($content_part_value)) {\r\n\r\n // Show the ad ONLY IF THE CURRENT PART IS A <p> opening tag and before the <p> -> so we will have <p>content</p> ~ad~ <p>content</p>\r\n // and prevent cases like <p> ~ad~ content</p>\r\n if (preg_match('/(<p.*>)/U', $content_part_value) === 1) {\r\n if ($tds_inline_ad_paragraph == $p_open_tag_count) {\r\n switch ($tds_inline_ad_align) {\r\n case 'left':\r\n $content_buffer .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_inline', 'align' => 'left'));\r\n break;\r\n\r\n case 'right':\r\n $content_buffer .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_inline', 'align' => 'right'));\r\n break;\r\n\r\n default:\r\n $content_buffer .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_inline'));\r\n break;\r\n }\r\n }\r\n $p_open_tag_count ++;\r\n }\r\n $content_buffer .= $content_part_value;\r\n $cnt++;\r\n }\r\n }\r\n $content = $content_buffer;\r\n }\r\n\r\n $td_display_top_ad = true;\r\n //disable the top ad on post template 1, it breaks the layout, the top image and ad should float on the left side of the content\r\n if (isset($td_smart_list['td_post_template']) && $td_smart_list['td_post_template'] == 'single_template_1') {\r\n $td_display_top_ad = false;\r\n\r\n //if the post individual template is not set, check the global settings, if template 1 is set disable the top ad\r\n } elseif (empty($td_smart_list['td_post_template'])) {\r\n $td_default_site_post_template = td_util::get_option('td_default_site_post_template');\r\n if(!empty($td_default_site_post_template) and $td_default_site_post_template == 'single_template_1') {\r\n $td_display_top_ad = false;\r\n }\r\n }\r\n\r\n //add the top ad\r\n if (td_util::is_ad_spot_enabled('content_top') && is_single() && $td_display_top_ad === true) {\r\n $content = td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_top')) . $content;\r\n }\r\n\r\n\r\n //add bottom ad\r\n if (td_util::is_ad_spot_enabled('content_bottom') && is_single()) {\r\n $content = $content . td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_bottom'));\r\n }\r\n\r\n\r\n return $content;\r\n }", "title": "" }, { "docid": "933343036ec6e3db7a909e008136b10e", "score": "0.6241476", "text": "function edd_incentives_render_content( $content ) {\n global $post;\n \n if( is_object( $post ) && edd_get_option( 'purchase_page' ) == $post->ID ) {\n $content .= '<div style=\"display: none;\">';\n $content .= '<div id=\"edd-incentives-display\">';\n\n $content .= '</div>';\n $content .= '</div>';\n }\n\n return $content;\n}", "title": "" }, { "docid": "31d9c884766208c3c8204bd466d14090", "score": "0.6235152", "text": "public static function do_shortcode($shortcode){\n ob_start();\n $returned_content = do_shortcode($shortcode);\n $content = trim(ob_get_clean()) ?: $returned_content;\n return $content;\n }", "title": "" }, { "docid": "447315b4cb6a7a9ff0c545b13bbc75d1", "score": "0.62299097", "text": "function qa_single_question_content($content) {\r\n\r\n\tglobal $post;\r\n\r\n\tif ($post->post_type == 'question') {\r\n\t\t\r\n\t\tob_start();\r\n\t\tinclude( QA_PLUGIN_DIR . 'templates/single-question/single-question.php' );\r\n\t\treturn ob_get_clean();\r\n\t}\r\n\telse{\r\n\t\treturn $content;\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "91c003e77b600a4cfdcdf1f6f3434051", "score": "0.62240523", "text": "function showContent(){\n $this->pageContent .= $this->createHeader();\n $this->pageContent .= $this->createContent();\n $this->pageContent .= $this->createFooter();\n return $this->pageContent;\n }", "title": "" }, { "docid": "1336aca68ab01fb6e5d294e18c52492f", "score": "0.62167543", "text": "function add_custom_page_contents() {\n\t$page = get_post( get_option( 'page_for_posts' ) );\n\n\tif ( ! $page ) {\n\t\treturn;\n\t}\n\n\t$content = wp_kses_post( $page->post_content );\n\t$content = do_shortcode( $content );\n\tinclude( CHILD_THEME_DIR . '/lib/views/page.php' );\n}", "title": "" }, { "docid": "d001e9e216aa0cbc7caca3071f337b40", "score": "0.6205997", "text": "public static function content()\n\t{\n\t\techo self::$_content;\n\t}", "title": "" }, { "docid": "abeade4700044cfffb3f528838fc984c", "score": "0.62003094", "text": "function page_content() {\r\n global $lang_string, $blog_config;\r\n \r\n // SUBJECT\r\n $entry_array = array();\r\n $entry_array[ 'subject' ] = $lang_string[ 'title' ];\r\n \r\n // PAGE CONTENT BEGIN\r\n ob_start();\r\n \r\n echo( $lang_string[ 'instructions' ] . '<p /><hr />');\r\n echo image_list();\r\n \r\n // PAGE CONTENT END\r\n $entry_array[ 'entry' ] = ob_get_clean();\r\n \r\n // THEME ENTRY\r\n echo( theme_staticentry( $entry_array ) );\r\n }", "title": "" }, { "docid": "408621cd9b6987f44317561db03f4226", "score": "0.6181397", "text": "function renderItem( WP_Post $post, $content ) {\n\t\t$pattern = array();\n\t\t$replacement = array();\n\t\tforeach ( $this->getTemplateVariables() as $var ) {\n\t\t\t$pattern[] = '/' . preg_quote( $var[0], '/' ) . '/';\n\t\t\t$replacement[] = preg_replace( '/\\\\$/', '\\\\\\$', $this->attribute( $var[1], $post, isset( $var[3] ) ? trim( $var[3] ) : '' ) );\n\t\t}\n\t\t\n\t\treturn preg_replace( $pattern, $replacement, do_shortcode( $content ) );\n\t}", "title": "" }, { "docid": "2f702fee29a403a75a990f5fdc5ee462", "score": "0.6179662", "text": "function shortcode($atts, $content = null) { \n\t\textract(shortcode_atts(array(), $atts));\n\t\tglobal $post;\n\t\t$ot_events = get_posts('numberposts=-1&meta_key=ot_e_date&orderby=meta_value&order=ASC&post_type=event&post_status=publish'); \n\t\t$master_return = ''; // this is the variable that actually gets returned.\n\t\t$master_return = '\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t.ot_event_list th {\n\t\t\t\tfont-size: 14px;\n\t\t\t\tline-height: 21px;\n\t\t\t\tpadding-bottom: 2px;\n\t\t\t\tborder-bottom: 1px solid #434343;\n\t\t\t\tfont-weight: normal;\n\t\t\t\ttext-align: left;\n\t\t\t}\n\t\t\t.ot_event_list td.e_date {\n\t\t\t\twidth: 10%;\n\t\t\t}\n\t\t\t.ot_event_list td.e_location {\n\t\t\t\twidth: 15%;\n\t\t\t}\n\t\t\t.ot_event_list td.e_details {\n\t\t\t\twidth: 40%;\n\t\t\t}\n\t\t\t.ot_event_list td.e_venue {\n\t\t\t\twidth: 20%;\n\t\t\t}\n\t\t\t.ot_event_list .e_details span.event_details {\n\t\t\t\tdisplay: block;\n\t\t\t\tmargin-top: 7px;\n\t\t\t}\n\t\t\t.ot_event_list td {\n\t\t\t\tborder-bottom: 1px solid #434343;\n\t\t\t\tpadding-bottom: 10px;\n\t\t\t\tpadding-top: 10px;\n\t\t\t\tline-height: 17px;\n\t\t\t\tfont-size: 13px;\n\t\t\t\tpadding-right: 10px;\n\t\t\t\tvertical-align: top;\n\t\t\t}\n\n\t\t\t.ot_event_list td.e_date {\n\t\t\t\tfont-size: 24px;\n\t\t\t\tline-height: 24px;\n\t\t\t\tpadding-left:10px\n\t\t\t}\n\t\t\ttd.even {\n\t\t\t\tbackground: #f5f5f5;\n\t\t\t}\n\t\t\t.ot_event_list tr.month td {\n\t\t\t\tfont-size: 24px;\n\t\t\t\tborder-bottom: 0px;\n\t\t\t\tpadding-top: 20px;\n\t\t\t\tfont-weight:normal;\n\t\t\t\tpadding-bottom: 14px;\n\t\t\t\tborder-bottom: 1px solid #434343;\n\t\t\t}\n\t\t\t.event_link a {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\n\t\t</style>\n\t\t<script>\n\t\tjQuery(document).ready(function() {\n\t\t\tjQuery(\"tr.ot_e_data:even td\").addClass(\"even\");\n\t\t});\n\t\t</script>\n\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"ot_event_list\">\n\t\t <tr>\n\t\t <th>Date</th>\n\t\t <th>Location</th>\n\t\t <th>Event</th>\n\t\t <th class=\"e_details\">Details</th>\n\t\t </tr>';\n\t\t$var = array();\n\t\tforeach($ot_events as $event) :\n\t\t\t$origDate = get_post_meta($event->ID, 'ot_e_date', true);\t\t\t\n\t\t\tif ($origDate) {\n\t\t\t\t$month = date('F', $origDate);\n\t\t\t\t$day = date('j', $origDate);\n\t\t\t\t$eventTime = $origDate;\n\t\t\t\t$venue = $event->post_title;\n\t\t\t\t$link = get_post_meta($event->ID, 'ot_e_link', true);\n\t\t\t\t$location = get_post_meta($event->ID, 'ot_e_location', true); \n\t\t\t\t$details = $event->post_content;\n\t\t\t\t$time = get_post_meta($event->ID, 'ot_e_time', true);\n\t\t\t\t\t$editlink = '';\n\t\t\t\tif (is_user_logged_in()) {\n\t\t\t\t\t$editlink = '<span class=\"edit_link\"><a href=\"'.get_edit_post_link( $event->ID).'\">Edit This Event</a></span>';\n\t\t\t\t}\n\t\t\t\t// Let's check to see if this date is not already passed:\n\t\t\t\tif ($origDate > strtotime('yesterday')) {\n\t\t\t\t\t$return = '\n\t\t\t\t\t<tr class=\"ot_e_data\">\n\t\t\t\t\t <td class=\"e_date\">'.$day.'</td>\n\t\t\t\t\t <td class=\"e_location\">'.$location.'</td>\n\t\t\t\t\t <td class=\"e_venue\">'.$venue.'</td>\n\t\t\t\t\t\t<td class=\"e_details\">'.apply_filters('the_content', $details);\n\t\t\t\t\t// this should be pretty self-explanitory\n\t\t\t\t\tif ($time or $link) {\n\t\t\t\t\t\t$return .= '<span class=\"event_details\">';\n\t\t\t\t\t\t// if time exists:\n\t\t\t\t\t\tif ($time) {\n\t\t\t\t\t\t\t$return .= '<span class=\"event_time\">'.$time.'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//if we are creating a string with the two:\n\t\t\t\t\t\tif ($time and $link) {\n\t\t\t\t\t\t\t$return .= ' - ';\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t// if link exists:\n\t\t\t\t\t\tif ($link) {\n\t\t\t\t\t\t\t$return.= '<span class=\"event_link\"><a href=\"'.$link.'\" target=\"_blank\">More Info &rarr;</a></span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$return .= '</span>'.$editlink;\n\t\t\t\t\t}\n\t\t\t\t\t$return.='</td>\n\t\t\t\t\t </tr>';\n\t\t\t\t\t$var[$eventTime] = $return;\n\t\t\t\t} // endif\n\t\t\t} // end check for date\n\t\t\tendforeach;\n\t\t\tksort($var);\n\t\t\t$currentMonth = '';\n\t\t\tforeach($var as $key => $value) {\n\t\t\t\t$month = date('F',$key);\n\t\t\t\tif (strcmp($month, $currentMonth) != 0) {\n\t\t\t\t\t$master_return .= '\n\t\t\t\t<tr class=\"month august\">\n\t\t\t\t <td colspan=\"5\">'.$month.'</td>\n\t\t\t\t </tr>';\n\t\t\t\t\t$currentMonth = $month;\n\t\t\t\t}\n\t\t\t\t$master_return .= $value;\n\t\t\t}\n\t\t\t$master_return .= '</table>';\n\t\t\treturn $master_return;\n\t}", "title": "" }, { "docid": "5e862a1d684e2f5d7d9d2f394328b78b", "score": "0.617668", "text": "function hidden_content($args=array(), $content) {\r\n\r\n $display = null;\r\n\r\n /* Arguments */\r\n $defaults = array(\r\n 'message' => 'on'\r\n );\r\n $args = wp_parse_args($args, $defaults);\r\n extract($args, EXTR_SKIP);\r\n\r\n /* Require login */\r\n if (!$this->user_can_view_content()) {\r\n\r\n if ($message !== 'off') {\r\n\r\n /* filter wildcards */\r\n $html = $this->get_option('html_private_content');\r\n $html = str_replace(\"{upme_current_uri}\", $this->current_page, $html);\r\n $display .= wpautop($html);\r\n if($this->get_option('html_private_content_form')){\r\n $display .= do_shortcode('[upme_login]'); \r\n } \r\n }\r\n } else { /* Show hidden content */\r\n /* Adding do_shortcode again to allow shortcode inside shortcode, now private content can have shortcode too */\r\n $display .= do_shortcode($content);\r\n }\r\n\r\n return $display;\r\n }", "title": "" }, { "docid": "3fa95037e67c0c1c6ca2151181456337", "score": "0.6176388", "text": "function render($atts, $content = null){\r\n extract(shortcode_atts(\r\n array(\r\n 'td_grid_style' => 'td-grid-style-1'\r\n ), $atts));\r\n\r\n\r\n $atts['limit'] = self::POST_LIMIT;\r\n\r\n parent::render($atts); // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)\r\n\r\n\r\n $buffy = '';\r\n\r\n $buffy .= '<div class=\"' . $this->get_block_classes(array($td_grid_style, 'td-hover-1')) . '\">';\r\n $buffy .= '<div id=' . $this->block_uid . ' class=\"td_block_inner\">';\r\n $buffy .= $this->inner($this->td_query->posts); //inner content of the block\r\n $buffy .= '<div class=\"clearfix\"></div>';\r\n $buffy .= '</div>';\r\n $buffy .= '</div> <!-- ./block -->';\r\n return $buffy;\r\n }", "title": "" }, { "docid": "70b8d12446c46385bb5491ca6dee0648", "score": "0.61675715", "text": "public function output( $atts, $content = null ) {\n\t\t\tob_start();\n\t\t\tdo_action( 'vcex_shortcode_before', 'vcex_post_type_flexslider', $atts );\n\t\t\tinclude( vcex_get_shortcode_template( 'vcex_post_type_flexslider' ) );\n\t\t\tdo_action( 'vcex_shortcode_after', 'vcex_post_type_flexslider', $atts );\n\t\t\treturn ob_get_clean();\n\t\t}", "title": "" }, { "docid": "2a859aa2ba12a0fa5aeae35cfd049097", "score": "0.61653054", "text": "function _custom_content () {\n\t}", "title": "" }, { "docid": "bb51fe7b1b52df68166d593c485f84d3", "score": "0.6162491", "text": "public function display_content()\n {\n }", "title": "" }, { "docid": "bb51fe7b1b52df68166d593c485f84d3", "score": "0.6162491", "text": "public function display_content()\n {\n }", "title": "" }, { "docid": "bb51fe7b1b52df68166d593c485f84d3", "score": "0.6162491", "text": "public function display_content()\n {\n }", "title": "" }, { "docid": "bb51fe7b1b52df68166d593c485f84d3", "score": "0.6161545", "text": "public function display_content()\n {\n }", "title": "" }, { "docid": "bb51fe7b1b52df68166d593c485f84d3", "score": "0.6161545", "text": "public function display_content()\n {\n }", "title": "" }, { "docid": "a4cfced9e272094717d8b6e12f0a2750", "score": "0.615923", "text": "function getavreprint( $atts, $content = null ) {\n// Wraps in CSS class to style\n\t\t$content = wpautop(trim($content));\n return '<div class=\"avreprint\">'. do_shortcode($content) .'</div>';\n}", "title": "" }, { "docid": "5d61f6452a87178a726ceccc1e12edaf", "score": "0.61582637", "text": "function df_posts_block_14( $atts, $content = null ){\r\n\t\t\tglobal $post, $df_column_block;\r\n\t\t\t$post_id_page = $post->ID;\r\n\t\t\t$col = $df_column_block;\r\n\r\n\t\t\t$page_template = $this->df_page_template_status( 'page-pagebuilder-witharchive.php' );\r\n\r\n\t\t\t$block_render = new DF_Render_Loop();\r\n\r\n\t\t\t$atts = vc_map_get_attributes( 'df_posts_block_14', $atts );\r\n\t\t\textract($atts);\r\n\r\n\t\t\t$paged = 1;\r\n\t\t\t$posts_per_page = $limit_post_number;\r\n\t\t\t$sidebar = 'no';\r\n\t\t\t\r\n\t\t\t$atts = wp_parse_args(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'paged' => $paged,\r\n\t\t\t\t\t'posts_per_page' => $posts_per_page,\r\n\t\t\t\t\t'no_found_rows' => true\r\n\t\t\t\t)\r\n\t\t\t, $atts );\r\n\t\t\t\r\n\t\t\t$args = self::$query_block->df_vc_atts_to_args( $atts, $sort_order );\r\n\t\t\t$posts = &self::$query_block->query_new_posts( $args );\r\n\r\n\t\t\t$totalpost = $posts->found_posts;\r\n\r\n\t\t\tif( $show_title == 'no' ){\r\n\t\t\t\t$zero_bottom_border = 'zero-border';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$title_text_color = ( isset($title_text_color) ) ? $title_text_color : '';\r\n\t\t\tob_start();\r\n\t\t\t?>\r\n\t\t\t<div class=\"df-shortcode-blocks style-14\">\r\n\t\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t\t<div class=\"df-shortcode-blocks-top clearfix <?php echo esc_attr( isset( $zero_bottom_border ) ? $zero_bottom_border : '' );?>\">\r\n\t\t\t\t\t\t<?php if( $show_title === 'yes' ): ?>\r\n\t\t\t\t\t\t\t<div class=\"df-shortcode-blocks-title\">\r\n\t\t\t\t\t\t\t\t<h5 style=\"color:<?php echo esc_attr( $title_text_color );?> ;\">\r\n\t\t\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t\t\techo ( $title_url != '' ) ? '<a href=\"'.esc_url( $title_url ).'\" >' : '';\r\n\t\t\t\t\t\t\t\t\techo $title;\r\n\t\t\t\t\t\t\t\t\techo ( $title_url != '' ) ? '</a>' : '';\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</h5>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<?php endif;?>\r\n\t\t\t\t\t\t<ul class=\"df-category-slider-btn list-inline pull-right\">\r\n\t\t\t\t\t\t\t<li class=\"custom-prev-arrow\"><span class=\"ion-chevron-left\"></span></li>\r\n\t\t\t\t\t\t\t<li class=\"custom-next-arrow\"><span class=\"ion-chevron-right\"></span></li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t<?php\r\n\t\t\tif( $posts->have_posts() ){\r\n\t\t\t\t$params_block = array(\r\n\t\t\t\t\t\t\t\t'sidebar' => $sidebar,\r\n\t\t\t\t\t\t\t\t'column' => $col,\r\n\t\t\t\t\t\t\t\t'posts_per_page' => $posts_per_page, \r\n\t\t\t\t\t\t\t\t'post_id_page' => $post_id_page,\r\n\t\t\t\t\t\t\t\t'page_template' => $page_template\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\techo $block_render->df_render_block_14( $posts, $params_block );\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t\t</div><!-- end of df-shortcode-blocks-->\r\n\t\t\t<?php\r\n\t\t\t$out = ob_get_contents();\r\n\t\t\tif (ob_get_contents()) ob_end_clean();\r\n\t\t\twp_reset_query();\r\n\t\t\twp_reset_postdata();\r\n\t\t\treturn $out;\r\n\t\t}", "title": "" }, { "docid": "56e341476ee21b2055689d82745ced09", "score": "0.61560744", "text": "public function render() {\n\t\t$content = isset( $this->data['text'] ) ? $this->data['text'] : '';\n\t\t$content = apply_filters( 'sliderpro_layer_content', $content );\n\n\t\t$html_output = \"\\r\\n\" . '\t\t\t' . '<div class=\"' . $this->get_classes() . '\"' . $this->get_attributes() . '>' . $content . '</div>';\n\n\t\t$html_output = do_shortcode( $html_output );\n\t\t$html_output = apply_filters( 'sliderpro_layer_markup', $html_output, $this->slider_id, $this->slide_index );\n\n\t\treturn $html_output;\n\t}", "title": "" }, { "docid": "0f37537b95b2fc7bfc12e2978cfd5913", "score": "0.61558855", "text": "public function facebookpost_shortcode( $atts ){\r\n\t\t$url = $atts[0];\r\n\t\t$string = $this->embed_code( $url );\r\n\t\treturn $string;\r\n\t}", "title": "" }, { "docid": "bc99fbd266fa5a09028fb36b11731224", "score": "0.615473", "text": "public function render_special_content( $data = array(), $format = '' ) {\n\t\tif ( empty( $data ) ) {\n\t\t\t$data = $this->compile_av_data();\n\t\t}\n\n\t\tif ( '' === $format ) {\n\t\t\t$format = $this->post_format;\n\t\t}\n\n\t\t// Unpack\n\t\t$defaults = array(\n\t\t\t'title' => '',\n\t\t\t'content' => '',\n\t\t\t'meta' => array(),\n\t\t\t'thumb' => 0\n\t\t);\n\t\twp_parse_args( $data, $defaults );\n\n\t\t$shortcodes = ( 'audio' === $format ) ? $this->audio_shortcodes : $this->video_shortcodes;\n\n\t\t// ID\n\t\tif ( is_int( $data['content'] ) ) {\n\t\t\t$url = wp_get_attachment_url( $data['content'] );\n\t\t\tif ( $url ) {\n\t\t\t\treturn call_user_func_array( apply_filters( 'wp_' . $format . '_shortcode_handler', 'wp_' . $format . '_shortcode' ), array( array( 'src' => $url ) ) );\n\t\t\t}\n\t\t}\n\n\t\t// URL\n\t\tif ( 0 === stripos( $data['content'], 'http' ) ) {\n\t\t\t// Try to generate the embed markup from the URL. Includes oEmbeds.\n\t\t\t$output = $GLOBALS['wp_embed']->shortcode( array(), $data['content'] );\n\t\t\tif ( $this->_shortcode_in_array( $output, $shortcodes ) ) {\n\t\t\t\treturn do_shortcode( $output );\n\t\t\t}\n\n\t\t\t// If that doesn't work, see if it has given us a link.\n\t\t\tif ( 0 === stripos( $output, 'http' ) ) {\n\t\t\t\treturn sprintf( '<a class=\"wp-post-format-link-%1$s\" href=\"%2$s\">%3$s</a>', $format, esc_url( $output ), esc_html( $output ) );\n\t\t\t}\n\n\t\t\t// If we made it to here, it's already the full embed code, so return it.\n\t\t\treturn $output;\n\t\t}\n\n\t\t// Shortcode\n\t\tif ( $this->_shortcode_in_array( $data['content'], $shortcodes ) ) {\n\t\t\treturn do_shortcode( $data['content'] );\n\t\t}\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "848035a08bf06238af9eafb1d912c0db", "score": "0.614569", "text": "function shop_isle_homepage_content() {\n\t\twhile ( have_posts() ) :\n\t\t\tthe_post();\n\n\t\t\tget_template_part( 'content', 'page' );\n\n\t\tendwhile; // end of the loop.\n\t}", "title": "" }, { "docid": "521a7601024a8353ca134b32a140f7aa", "score": "0.6132189", "text": "public static function nsync_post_edit_single_post($content) {\n\t\t\n\t\tunset( $nsync_options );\n\t\t$nsync_options = get_option( 'nsync_options' );\n\n\t\t$return_content = '';\n\t\tif (is_single()) {\n\t\t\t$pre_content = '';\n\t\t\t$post_content = '';\n\t\t\tif (isset($nsync_options['source_before']) && $nsync_options['source_before']) {\n\t\t\t\t$pre_content = Nsync_Posts::process_source_template();\n\t\t\t}\n\t\t\tif (isset($nsync_options['source_after']) && $nsync_options['source_after']) {\n\t\t\t\t$post_content = Nsync_Posts::process_source_template();\n\t\t\t}\n\t\t\t$return_content = $pre_content.$content.$post_content;\n\t\t} else {\n\t\t\t$return_content = $content;\n\t\t}\n\t\treturn $return_content;\n\t}", "title": "" }, { "docid": "91a46b20785ffe67848062d144ddbf1e", "score": "0.612409", "text": "public function do_shortcode( $atts, $content ) {\n\t\t\t$this->log( 3,\"do_shortcode() Started.\" );\n\t\t\t$textout = \"\";\n\n\t\t\t// output depends on the command given\n\t\t\tif( null !== $this->shortcodes ) {\n\t\t\t\t// extract the attributes, using the list of default values \n\t\t\t\t$allatts = shortcode_atts( $this->shortcode_defaults, $atts );\n\t\t\t\tif( array_key_exists( $allatts['command'], $this->shortcodes ) ) {\n\t\t\t\t\t$this->log( 3,\"do_shortcode() Execute class method \".$this->shortcodes[ $allatts['command'] ] );\n\t\t\t\t\t$func = $this->shortcodes[ $allatts['command'] ];\n\t\t\t\t\t$textout = $this->$func( $allatts );\n\t\t\t\t} else {\n\t\t\t\t\t$textout = \"[ERROR. Unknown command '\".$command.\"']\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$textout = \"[ERROR. Shortcode not supported.]\";\n\t\t\t}\t\t\n\t\t\treturn $textout;\n\t\t}", "title": "" }, { "docid": "76e634811fc6797f480a1cf67bcaf132", "score": "0.61216706", "text": "function kapee_template_single_portfolio_content() {\n\t\t\n\t\tkapee_get_template( 'template-parts/single-portfolio/content' );\n\t}", "title": "" }, { "docid": "536c6c4f01e283edb29ce0856e8ea8d4", "score": "0.6116331", "text": "function flatsome_product_bottom_content(){\n global $wc_cpdf;\n if($wc_cpdf->get_value(get_the_ID(), '_bottom_content')){\n echo do_shortcode($wc_cpdf->get_value(get_the_ID(), '_bottom_content'));\n }\n}", "title": "" }, { "docid": "991e78754b406dc3900eca5f49b5e88a", "score": "0.6107433", "text": "function onesie_pro_custom_content() {\n\n global $gpp;\n\n if( isset( $gpp[ 'onesie_pro_cen' ] ) )\n $cen = $gpp[ 'onesie_pro_cen' ];\n if( is_single() ) {\n return the_content( __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'onesie_pro' ) );\n } else {\n if( isset($cen) && 'the_content' == $cen )\n return the_content( __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'onesie_pro' ) );\n elseif( isset( $cen ) && 'the_excerpt' == $cen )\n return the_excerpt();\n else\n return '';\n }\n}", "title": "" }, { "docid": "b1b1240223ab3eabba492e8db5ab4bda", "score": "0.608618", "text": "function P_Shortcode( $atts, $content = null ){\r\n\t\textract( shortcode_atts(\r\n\t\t\tarray(\r\n\t\t\t\t'title' \t\t=> '',\r\n\t\t\t\t'description' \t=> '',\r\n\t\t\t\t'portfolio_id' \t=> '',\r\n\t\t\t\t'orderby' \t\t=> '',\r\n\t\t\t\t'order'\t\t\t=> '',\r\n\t\t\t\t'number' \t\t=> 5,\r\n\t\t\t\t'col1' \t\t\t=> 4,\r\n\t\t\t\t'col2' \t\t\t=> 4,\r\n\t\t\t\t'col3' \t\t\t=> 3,\r\n\t\t\t\t'col4' \t\t\t=> 2,\t\t\t\t\t\t\r\n\t\t\t\t'style' \t\t=> 'fitRows',\r\n\t\t\t\t'show_tab'\t\t=> 'yes',\r\n\t\t\t\t'show_loadmore'\t=> 'yes'\r\n\t\t\t), $atts )\r\n\t\t);\t\t\r\n\t\t$this->Portfolio_Script();\r\n\t\t\r\n\t\t$this->id ++;\r\n\t\t$pf_id = 'ya_portfolio_' . $this->id;\r\n\t\tif( $portfolio_id == '' ){\r\n\t\t\treturn __( 'Please select a category', 'sw_core' );\r\n\t\t}\r\n\t\t$portfolio = array();\r\n\t\tif( !is_array( $portfolio_id ) ){\r\n\t\t\t$portfolio = explode( ',', $portfolio_id );\r\n\t\t}\r\n\t\tob_start();\r\n\t\tinclude( sw_core_override_check( 'sw-portfolio', 'portfolio-item' ) );\r\n\t\t$content = ob_get_clean();\r\n\t\treturn $content;\r\n\t\t//ob_start();\r\n\t}", "title": "" }, { "docid": "770a7590ab9c7745550bb707bc823fb6", "score": "0.6086001", "text": "function parse_shortcode_content( $content ) {\n\n /* Parse nested shortcodes and add formatting. */\n $content = trim( do_shortcode( shortcode_unautop( $content ) ) );\n\n /* Remove '' from the start of the string. */\n if ( substr( $content, 0, 4 ) == '' )\n $content = substr( $content, 4 );\n\n /* Remove '' from the end of the string. */\n if ( substr( $content, -3, 3 ) == '' )\n $content = substr( $content, 0, -3 );\n\n /* Remove any instances of ''. */\n $content = str_replace( array( '<p></p>' ), '', $content );\n $content = str_replace( array( '<p> </p>' ), '', $content );\n\n return $content;\n}", "title": "" }, { "docid": "b69012d62b2312d3f4f38c58680ab703", "score": "0.6085636", "text": "public function post() {\r\n\t\t$content = $this->model(\"blogModel\");\r\n\t\t$posts = $content->getPostByURL(library::catalog()->url[1]);\r\n\t\t\r\n\t\t// --- create html array for rendering\r\n\t\t$html = array();\r\n\t\t$html[\"selected\"] = 'blog';\r\n\t\t$html[\"body\"] = '';\r\n\t\t$html[\"script\"] = '\t\tSyntaxHighlighter.defaults.toolbar = false;'.PHP_EOL.'\t\tSyntaxHighlighter.all();'.PHP_EOL;\r\n\t\t$html[\"script\"].= $this->view('initShadowboxJS', array(), true);\r\n\t\t$html['jsfiles'] = '<script type=\"text/javascript\" src=\"'.BASE_URL.'style/js/syntaxHighlighter.js\" charset=\"utf-8\"></script>'.PHP_EOL.'\t<link rel=\"stylesheet\" type=\"text/css\" id=\"syntax-core-css\" href=\"'.BASE_URL.'style/css/shCoreDefault.css\" media=\"all\"/>'.PHP_EOL.'\t<link rel=\"stylesheet\" type=\"text/css\" id=\"syntax-default-css\" href=\"'.BASE_URL.'style/css/shThemeDefault.css\" media=\"all\"/>'.PHP_EOL.'\t<script type=\"text/javascript\" src=\"'.BASE_URL.'style/js/shadowbox.js\" charset=\"utf-8\"></script>'.PHP_EOL.'\t<link rel=\"stylesheet\" type=\"text/css\" id=\"shadow-css\" href=\"'.BASE_URL.'style/css/shadowbox.css\" media=\"screen\"/>'.PHP_EOL;\r\n\t\t$html[\"sidebar\"] = '';\r\n\t\t$html[\"title\"] = '';\r\n\t\t$html[\"comments\"] = true;\r\n\t\t$html[\"canonicalBack\"] = '';\r\n\t\t$html[\"canonicalNow\"] = '';\r\n\t\t$html[\"canonicalNext\"] = '';\r\n\t\t\r\n\t\t// --- display page\r\n\t\tif(isset($posts[0])) {\r\n\t\t\t$cats = $content->getPostCats($posts[0][\"post_id\"]);\r\n\t\t\t$tags = $content->getPostTags($posts[0][\"post_id\"]);\r\n\r\n\t\t\t$html[\"title\"] = 'blog/'.strip_tags($posts[0][\"title\"]);\r\n\r\n\t\t\tif(isset($cats[0])) {\r\n\t\t\t\t$id = (int)$cats[0][\"blog_cat_id\"];\r\n\t\t\t\t$cat = $content->getCatByID($id);\r\n\t\t\t\t$mainCat = isset($cat[0]) ? $cat[0][\"url\"] : \"uncategorized\";\r\n\t\t\t\t$mainCatName = isset($cat[0]) ? $cat[0][\"name\"] : \"uncategorized\";\r\n\t\t\t} else {\r\n\t\t\t\t$mainCat = \"uncategorized\";\r\n\t\t\t}\r\n\t\t\t$first = $content->getFirstPost();\r\n\t\t\t$prev = $content->getPrevPost($posts[0][\"date\"]);\r\n\t\t\t$next = $content->getNextPost($posts[0][\"date\"]);\r\n\t\t\t$html[\"canonicalNext\"] = isset($prev[0]) ? '<a href=\"'.QOOB_DOMAIN.'blog/'.$prev[0][\"url\"].'\">previous post &gt; &gt;</a>' : '';\r\n\t\t\t$html[\"canonicalBack\"] = isset($next[0]) ? '<a href=\"'.QOOB_DOMAIN.'blog/'.$next[0][\"url\"].'\">&lt; &lt; next post </a>' : '';\r\n\t\t\t$html[\"canonicalNow\"] = '<a href=\"'.QOOB_DOMAIN.'blog/'.$mainCat.'\">'.$mainCatName.'</a> / <a href=\"'.QOOB_DOMAIN.'blog/'.$posts[0][\"url\"].'\">'.$posts[0][\"title\"].'</a>';\r\n\t\t\t$canonicalStartTitle = isset($first[0]) ? $first[0][\"title\"] : '';\r\n\t\t\t$canonicalStartURL = isset($first[0]) ? QOOB_DOMAIN.'blog/'.$first[0][\"url\"] : '';\r\n\t\t\t$canonicalURL = QOOB_DOMAIN.'blog/'.$posts[0][\"url\"];\r\n\t\t\t$canonicalNextTitle = isset($next[0]) ? $next[0][\"title\"] : '';\t\t\t\r\n\t\t\t$canonicalNextURL = isset($next[0]) ? QOOB_DOMAIN.'blog/'.$next[0][\"url\"] : '';\r\n\t\t\t$canonicalBackTitle = isset($prev[0])? $prev[0][\"title\"] : '';\r\n\t\t\t$canonicalBackURL = isset($prev[0]) ? QOOB_DOMAIN.'blog/'.$prev[0][\"url\"] : '';\r\n\t\t\t\r\n\t\t\t$html[\"meta\"] = \"<link rel='index' title='\".QOOB_DOMAIN.\"blog' href='\".QOOB_DOMAIN.\"blog/' />\".PHP_EOL;\r\n\t\t\t$html[\"meta\"].= \"\t<link rel='canonical' href='$canonicalURL' />\".PHP_EOL;\r\n\t\t\t$html[\"meta\"].= \"\t<link rel='start' title='$canonicalStartTitle' href='$canonicalStartURL' />\".PHP_EOL;\r\n\t\t\tif($canonicalBackURL != '') {\r\n\t\t\t\t$html[\"meta\"].= \"\t<link rel='prev' title='$canonicalBackTitle' href='$canonicalBackURL' />\".PHP_EOL;\r\n\t\t\t}\r\n\t\t\tif($canonicalNextURL != '') {\r\n\t\t\t\t$html[\"meta\"].= \"\t<link rel='next' title='$canonicalNextTitle' href='$canonicalNextURL' />\".PHP_EOL;\r\n\t\t\t}\r\n\r\n\t\t\t$catlist = '';\r\n\t\t\tif(is_array($cats)) {\r\n\t\t\t\tfor ($x = 0; $x < count($cats); $x++) {\r\n\t\t\t\t\t$id = (int)$cats[$x][\"blog_cat_id\"];\r\n\t\t\t\t\tif($id != $cats[$x][\"blog_cat_id\"]) {\r\n\t\t\t\t\t\t$cat = $content->getCatByID($id);\r\n\t\t\t\t\t\t$catlist.= '<a href=\"'.QOOB_DOMAIN.'blog/'.$cat[0][\"url\"].'/\" title=\"view all posts in: '.$cat[0][\"name\"].'\">'.$cat[0][\"name\"].'</a> / <a href=\"'.QOOB_DOMAIN.'blog/'.$cat[0][\"url\"].'/'.$cats[$x][\"url\"].'/\" title=\"view all posts in: '.$cats[$x][\"name\"].'\">'.$cats[$x][\"name\"].'</a>';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$catlist.= '<a href=\"'.QOOB_DOMAIN.'blog/'.$cats[$x][\"url\"].'/\" title=\"view all posts in: '.$cats[$x][\"name\"].'\">'.$cats[$x][\"name\"].'</a>';\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t\tif($x < count($cats)-1) {\r\n\t\t\t\t\t\t$catlist.= ', ';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$taglist = '';\r\n\t\t\tif(is_array($tags)) {\r\n\t\t\t\tfor ($x = 0; $x < count($tags); $x++) {\r\n\t\t\t\t\t$taglist.= '<a href=\"'.QOOB_DOMAIN.'blog/'.'tag/'.$tags[$x][\"url\"].'\" rel=\"tag\">'.$tags[$x][\"name\"].'</a>';\r\n\t\t\t\t\tif($x < count($tags)-1) {\r\n\t\t\t\t\t\t$taglist.= ', ';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$summary = strip_tags($posts[0][\"title\"].' : '.$posts[0][\"subtitle\"].'. posted in the categories: '.str_replace(' / ', ', ', $catlist).' and tagged: '.$taglist.'.');\r\n\r\n\t\t\t//---post meta\r\n\t\t\t$meta = array(\r\n\t\t\t\t\"day\" => date(\"d\", $posts[0][\"date\"]),\r\n\t\t\t\t\"month\" => date(\"M\", $posts[0][\"date\"]),\r\n\t\t\t\t\"year\" => date(\"Y\", $posts[0][\"date\"]),\r\n\t\t\t\t\"cats\" => ($catlist == '') ? $mainCat : $catlist,\r\n\t\t\t\t\"tags\" => $taglist,\r\n\t\t\t\t\"comments\" => $posts[0][\"comments\"],\r\n\t\t\t\t\"trackbacks\" => \"0\"\r\n\t\t\t);\r\n\t\t\t$metabox = $this->view(\"blog/post_meta\", $meta, true);\r\n\r\n\t\t\t//---post body\r\n\t\t\t$post = array(\r\n\t\t\t\t'mainCat' => $mainCat,\r\n\t\t\t\t'url' => 'blog/'.$posts[0][\"url\"],\r\n\t\t\t\t'title' => $posts[0][\"title\"],\r\n\t\t\t\t'subtitle' => $posts[0][\"subtitle\"],\r\n\t\t\t\t'content' => html_entity_decode($posts[0][\"content\"]).$metabox,\r\n\t\t\t\t'comments' => 0\r\n\t\t\t);\r\n\t\t\t$html[\"body\"] = $this->view(\"post\", $post, true);\r\n\r\n\t\t\t//---sidebar\r\n\t\t\t//meta\r\n\t\t\t$smeta = array(\r\n\t\t\t\t\"title\" => '<a href=\"'.QOOB_DOMAIN.'blog/'.$posts[0][\"url\"].'\">'.$posts[0][\"title\"].'</a>',\r\n\t\t\t\t\"date\" => strtolower(date(\"l F jS o\", $posts[0][\"date\"])).' at '.date(\"g:i a\", $posts[0][\"date\"]),\r\n\t\t\t\t\"cats\" => ($catlist == '') ? $mainCat : $catlist,\r\n\t\t\t\t\"tags\" => $taglist,\r\n\t\t\t\t\"comments\" => $posts[0][\"comments\"]\t\t\r\n\t\t\t);\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_meta\", $smeta, true);\r\n\t\t\t//tag cloud\r\n\t\t\t$tags = $content->getTags();\r\n\t\t\t$this->library(qoob_types::utility, \"cloud\");\r\n\t\t\t$this->cloud->setMax(175);\r\n\t\t\t$this->cloud->setMin(80);\r\n\t\t\t$cloud = array(\r\n\t\t\t\t\"tags\" => $this->cloud->make($tags, QOOB_DOMAIN.'blog/tag/')\r\n\t\t\t);\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_tags\", $cloud, true);\r\n\t\t\t//categories\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_categories\", array(), true);\r\n\t\t\t//qr code\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_qr\", array(), true);\r\n\t\t\t//feeds\r\n\t\t\t$feeds = array(\r\n\t\t\t\t\"showNewest\" => true,\r\n\t\t\t\t\"showCat\" => true,\r\n\t\t\t\t\"cat\" => $mainCat,\r\n\t\t\t\t\"showTag\" => false,\r\n\t\t\t\t\"tag\" => '',\r\n\t\t\t\t\"showComments\" => $posts[0][\"comments\"] == 0 ? false : true,\r\n\t\t\t\t\"post\" => $posts[0][\"url\"],\r\n\t\t\t);\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_feeds\", $feeds, true);\r\n\r\n\t\t// --- display 404\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"invalid url\", statusCodes::HTTP_NOT_FOUND);\r\n\t\t}\t\t\r\n\t\t$this->view(\"pixelgraff\", $html);\r\n\t}", "title": "" }, { "docid": "f1d3d9e78f5114da04ff9718eee12d61", "score": "0.608347", "text": "function sh_the_content_by_id( $post_id=0, $more_link_text = null, $stripteaser = false ){\n\t\t\t global $post;\n\t\t\t $post = &get_post($post_id);\n\t\t\t setup_postdata( $post, $more_link_text, $stripteaser );\n\t\t\t the_content();\n\t\t\t wp_reset_postdata( $post );\n\t\t\t}", "title": "" } ]